Skip to content

Commit

Permalink
additional fixes to resolve build errors (#2091)
Browse files Browse the repository at this point in the history
* auto gen rubocop todo for latest updates

* Disable specify inverse_of rule for now, until further investigation

* pin i18n until Rails and i18n can sort out compatibility rails/rails#33574
  • Loading branch information
mejackreed authored and cbeer committed Aug 15, 2018
1 parent d93b713 commit 4349f4e
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 21 deletions.
3 changes: 3 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,6 @@ Rails/ApplicationRecord:

Rails/ApplicationJob:
Enabled: false

Rails/InverseOf:
Enabled: false
58 changes: 37 additions & 21 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2018-04-25 16:12:58 -0700 using RuboCop version 0.55.0.
# on 2018-08-14 13:37:38 -0700 using RuboCop version 0.58.2.
# 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: 27
# Cop supports --auto-correct.
# Configuration parameters: EnabledMethods.
Capybara/FeatureMethods:
Exclude:
Expand All @@ -22,7 +23,12 @@ Capybara/FeatureMethods:
- 'spec/features/javascript/search_config_admin_spec.rb'
- 'spec/features/javascript/search_context_spec.rb'

# Offense count: 28
# Offense count: 38
# Cop supports --auto-correct.
FactoryBot/AttributeDefinedStatically:
Enabled: false

# Offense count: 27
# Cop supports --auto-correct.
# Configuration parameters: Include, TreatCommentsAsGroupSeparators.
# Include: **/*.gemspec
Expand Down Expand Up @@ -60,11 +66,6 @@ Lint/MissingCopEnableDirective:
- 'app/models/spotlight/blacklight_configuration.rb'
- 'lib/spotlight/engine.rb'

# Offense count: 1
# Configuration parameters: CountComments.
Metrics/ClassLength:
Max: 101

# Offense count: 6
# Configuration parameters: Blacklist.
# Blacklist: (?-mix:(^|\s)(EO[A-Z]{1}|END)(\s|$))
Expand All @@ -75,7 +76,9 @@ Naming/HeredocDelimiterNaming:
- 'spec/support/features/test_features_helpers.rb'
- 'spec/test_app_templates/lib/generators/test_app_generator.rb'

# Offense count: 8
# Offense count: 12
# Configuration parameters: EnforcedStyleForLeadingUnderscores.
# SupportedStylesForLeadingUnderscores: disallowed, required, optional
Naming/MemoizedInstanceVariableName:
Exclude:
- 'app/controllers/concerns/spotlight/controller.rb'
Expand All @@ -93,7 +96,7 @@ Naming/MemoizedInstanceVariableName:

# Offense count: 9
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
# AllowedNames: io, id, to, by, on, in, at
# AllowedNames: io, id, to, by, on, in, at, ip
Naming/UncommunicativeMethodParamName:
Exclude:
- 'app/helpers/spotlight/crop_helper.rb'
Expand All @@ -112,11 +115,13 @@ RSpec/AnyInstance:
RSpec/ContextWording:
Enabled: false

# Offense count: 189
# Offense count: 197
# Cop supports --auto-correct.
RSpec/EmptyLineAfterFinalLet:
Enabled: false

# Offense count: 20
# Cop supports --auto-correct.
RSpec/EmptyLineAfterSubject:
Exclude:
- 'spec/helpers/spotlight/main_app_helpers_spec.rb'
Expand All @@ -135,7 +140,7 @@ RSpec/EmptyLineAfterSubject:
- 'spec/models/spotlight/solr_document/uploaded_resource_spec.rb'
- 'spec/models/spotlight/user_spec.rb'

# Offense count: 264
# Offense count: 271
# Configuration parameters: Max.
RSpec/ExampleLength:
Enabled: false
Expand All @@ -147,13 +152,15 @@ RSpec/ExpectInHook:
- 'spec/services/spotlight/iiif_resource_resolver_spec.rb'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: implicit, each, example
RSpec/HookArgument:
Exclude:
- 'spec/spec_helper.rb'

# Offense count: 19
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: is_expected, should
RSpec/ImplicitExpect:
Expand All @@ -165,17 +172,19 @@ RSpec/ImplicitExpect:
- 'spec/models/spotlight/custom_field_spec.rb'
- 'spec/models/spotlight/solr_document_sidecar_spec.rb'

# Offense count: 28
# Offense count: 33
# Cop supports --auto-correct.
RSpec/LeadingSubject:
Enabled: false

# Offense count: 3
# Cop supports --auto-correct.
RSpec/LetBeforeExamples:
Exclude:
- 'spec/controllers/spotlight/feature_pages_controller_spec.rb'
- 'spec/models/solr_document_spec.rb'

# Offense count: 39
# Offense count: 40
RSpec/LetSetup:
Enabled: false

Expand All @@ -186,28 +195,36 @@ RSpec/MessageChain:
- 'spec/models/spotlight/blacklight_configuration_spec.rb'
- 'spec/views/spotlight/browse/_search.html.erb_spec.rb'

# Offense count: 189
# Offense count: 194
# Configuration parameters: EnforcedStyle.
# SupportedStyles: have_received, receive
RSpec/MessageSpies:
Enabled: false

# Offense count: 1
RSpec/MissingExampleGroupArgument:
Exclude:
- 'spec/views/spotlight/search_configurations/_facets.html.erb_spec.rb'

# Offense count: 1
# Cop supports --auto-correct.
RSpec/MultipleSubjects:
Exclude:
- 'spec/models/spotlight/page_spec.rb'

# Offense count: 795
# Offense count: 799
RSpec/NamedSubject:
Enabled: false

# Offense count: 84
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: not_to, to_not
RSpec/NotToNot:
Enabled: false

# Offense count: 38
# Cop supports --auto-correct.
# Configuration parameters: Strict, EnforcedStyle.
# SupportedStyles: inflected, explicit
RSpec/PredicateMatcher:
Expand Down Expand Up @@ -272,7 +289,7 @@ RSpec/SubjectStub:
- 'spec/models/spotlight/solr_document/atomic_updates_spec.rb'
- 'spec/services/spotlight/iiif_resource_resolver_spec.rb'

# Offense count: 60
# Offense count: 61
# Configuration parameters: IgnoreSymbolicNames.
RSpec/VerifiedDoubles:
Enabled: false
Expand Down Expand Up @@ -317,13 +334,12 @@ Rails/HasManyOrHasOneDependent:
- 'app/models/spotlight/resource.rb'
- 'app/models/spotlight/site.rb'

# Offense count: 7
# Offense count: 4
# Configuration parameters: Include.
# Include: app/models/**/*.rb
Rails/InverseOf:
Exclude:
- 'app/models/spotlight/exhibit.rb'
- 'app/models/spotlight/page.rb'
- 'app/models/spotlight/site.rb'

# Offense count: 3
Expand Down Expand Up @@ -419,7 +435,7 @@ Style/ExpandPathArguments:
- 'lib/spotlight/engine.rb'
- 'spec/spec_helper.rb'

# Offense count: 408
# Offense count: 411
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: when_needed, always, never
Expand Down Expand Up @@ -485,7 +501,7 @@ Style/RescueStandardError:
# Offense count: 28
# Cop supports --auto-correct.
# Configuration parameters: ConvertCodeThatCanStartToReturnNil, Whitelist.
# Whitelist: present?, blank?, presence, try
# Whitelist: present?, blank?, presence, try, try!
Style/SafeNavigation:
Exclude:
- 'app/controllers/concerns/spotlight/controller.rb'
Expand All @@ -504,7 +520,7 @@ Style/SafeNavigation:
- 'app/models/spotlight/resource.rb'
- 'app/models/spotlight/search.rb'

# Offense count: 69
# Offense count: 70
# Cop supports --auto-correct.
# Configuration parameters: MinSize.
# SupportedStyles: percent, brackets
Expand Down
1 change: 1 addition & 0 deletions blacklight-spotlight.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ these collections.)
s.add_dependency 'iiif_manifest'
s.add_dependency 'leaflet-rails'
s.add_dependency 'i18n-active_record'
s.add_dependency 'i18n', '< 1.1' # pinned until Rails and i18n sort our compatibility https://github.com/rails/rails/pull/33574

s.add_development_dependency 'sqlite3'
s.add_development_dependency 'rspec-rails', '~> 3.1'
Expand Down

0 comments on commit 4349f4e

Please sign in to comment.