Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Align on current samvera style guide #96

Merged
merged 1 commit into from
Jun 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
require: rubocop-rspec
inherit_gem:
bixby: bixby_default.yml

inherit_from: .rubocop_todo.yml

AllCops:
TargetRubyVersion: 2.3
TargetRubyVersion: 2.6
DisplayCopNames: true
Exclude:
- 'db/**/*'
- 'script/**/*'
- 'vendor/**/*'

Bundler/DuplicatedGem:
Enabled: false
Expand Down
97 changes: 30 additions & 67 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,107 +1,70 @@
require: rubocop-rspec

# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2016-10-25 09:12:51 -0700 using RuboCop version 0.42.0.
# on 2020-06-11 15:56:41 -0400 using RuboCop version 0.85.1.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.

# Offense count: 47
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes.
# URISchemes: http, https
Metrics/LineLength:
Max: 120

# Offense count: 2
# Configuration parameters: Max.
RSpec/ExampleLength:
Exclude:
- 'spec/unit/db_minter_spec.rb'
- 'spec/unit/file_minter_spec.rb'

RSpec/MessageSpies:
Enabled: false

RSpec/ExpectInHook:
Exclude:
- 'spec/support/shared_examples/minter.rb'

# Offense count: 6
# Configuration parameters: CustomTransform.
RSpec/FilePath:
Exclude:
- 'spec/unit/config_spec.rb'
- 'spec/unit/db_minter_spec.rb'
- 'spec/unit/file_minter_spec.rb'
- 'spec/unit/noid_spec.rb'
- 'spec/unit/service_spec.rb'
- 'spec/unit/rspec_spec.rb'

# Offense count: 9
RSpec/LeadingSubject:
Exclude:
- 'spec/unit/config_spec.rb'
- 'spec/unit/file_minter_spec.rb'

# Offense count: 3
# Configuration parameters: AssignmentOnly.
RSpec/InstanceVariable:
Exclude:
- 'spec/unit/rspec_spec.rb'

# Offense count: 4
RSpec/MessageChain:
# Offense count: 2
# Cop supports --auto-correct.
RSpec/LeadingSubject:
Exclude:
- 'spec/unit/config_spec.rb'
- 'spec/unit/db_minter_spec.rb'
- 'spec/unit/file_minter_spec.rb'

# Offense count: 5
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: allow, expect
RSpec/MessageExpectation:
Exclude:
- 'spec/support/shared_examples/minter.rb'
- 'spec/unit/service_spec.rb'

# Offense count: 7
RSpec/MultipleExpectations:
Max: 5
# Configuration parameters: .
# SupportedStyles: have_received, receive
RSpec/MessageSpies:
EnforcedStyle: receive

# Offense count: 36
# Offense count: 27
# Configuration parameters: IgnoreSharedExamples.
RSpec/NamedSubject:
Exclude:
- 'spec/support/shared_examples/minter.rb'
- 'spec/unit/config_spec.rb'
- 'spec/unit/db_minter_spec.rb'
- 'spec/unit/file_minter_spec.rb'
- 'spec/unit/noid_spec.rb'
- 'spec/unit/service_spec.rb'

# Offense count: 12
# Configuration parameters: MaxNesting.
RSpec/NestedGroups:
# Offense count: 3
RSpec/SubjectStub:
Exclude:
- 'spec/unit/config_spec.rb'
- 'spec/unit/noid_spec.rb'
- 'spec/unit/rspec_spec.rb'
- 'spec/support/shared_examples/minter.rb'

# Offense count: 3
# Configuration parameters: IgnoreSymbolicNames.
# Offense count: 1
# Configuration parameters: IgnoreNameless, IgnoreSymbolicNames.
RSpec/VerifiedDoubles:
Exclude:
- 'spec/unit/config_spec.rb'
- 'spec/unit/service_spec.rb'

# Offense count: 11
Style/Documentation:
# Offense count: 1
# Cop supports --auto-correct.
Rails/ActiveRecordAliases:
Exclude:
- 'spec/**/*'
- 'test/**/*'
- 'app/models/minter_state.rb'
- 'db/migrate/20160610010003_create_minter_states.rb'
- 'db/migrate/20161021203429_rename_minter_state_random_to_rand.rb'

- 'lib/noid/rails/minter/db.rb'

Lint/AmbiguousBlockAssociation:
# Offense count: 2
# Cop supports --auto-correct.
# Configuration parameters: Include.
# Include: **/Rakefile, **/*.rake
Rails/RakeEnvironment:
Exclude:
- 'spec/unit/rspec_spec.rb'
- 'lib/capistrano/tasks/**/*.rake'
- 'Rakefile'
- 'lib/tasks/noid_tasks.rake'
3 changes: 1 addition & 2 deletions noid-rails.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,11 @@ Gem::Specification.new do |spec|
spec.add_dependency 'actionpack', '>= 5.0.0', '< 7'
spec.add_dependency 'noid', '~> 0.9'

spec.add_development_dependency 'bixby', '~> 3.0.0'
spec.add_development_dependency 'bundler', '>= 1.7'
spec.add_development_dependency 'engine_cart', '~> 2.2'
spec.add_development_dependency 'rake', '>= 11'
spec.add_development_dependency 'rspec', '~> 3.8'
spec.add_development_dependency 'rspec_junit_formatter'
spec.add_development_dependency 'rubocop', '~> 0.52.0'
spec.add_development_dependency 'rubocop-rspec', '~> 1.20.1'
spec.add_development_dependency 'sqlite3'
end