Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Update rubocop and fix new violations. #362

Merged
merged 2 commits into from
Feb 17, 2025
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
16 changes: 13 additions & 3 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
require:
- rubocop-factory_bot
- rubocop-rspec_rails

plugins:
- rubocop-rails
- rubocop-rspec
- rubocop-rspec_rails

AllCops:
Exclude:
- 'bin/*'
- 'db/schema.rb'
- 'vendor/**/*'

Metrics/AbcSize:
Enabled: false
Expand All @@ -16,13 +24,15 @@ Metrics/PerceivedComplexity:
Enabled: false
Rails/BulkChangeTable:
Enabled: false
Rails/FilePath:
Enabled: false
Rails/HasManyOrHasOneDependent:
Enabled: false
RSpec/ExampleLength:
Enabled: false
RSpec/ExampleWording:
Enabled: false
RSpec/FilePath:
Enabled: false
RSpec/MultipleExpectations:
Enabled: false
RSpec/NoExpectationExample:
Enabled: false
38 changes: 19 additions & 19 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ GEM
kramdown (2.5.1)
rexml (>= 3.3.9)
language_server-protocol (3.17.0.4)
lint_roller (1.1.0)
logger (1.6.6)
loofah (2.24.0)
crass (~> 1.0.2)
Expand Down Expand Up @@ -414,7 +415,7 @@ GEM
opentelemetry-api (~> 1.0)
ostruct (0.6.1)
parallel (1.26.3)
parser (3.3.6.0)
parser (3.3.7.1)
ast (~> 2.4.1)
racc
parslet (2.0.0)
Expand Down Expand Up @@ -507,34 +508,33 @@ GEM
activesupport (>= 3.0.0)
mustache (~> 1.0, >= 0.99.4)
rspec (~> 3.0)
rubocop (1.69.1)
rubocop (1.72.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.1.0)
parallel (~> 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 2.9.3, < 3.0)
rubocop-ast (>= 1.36.2, < 2.0)
rubocop-ast (>= 1.38.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 4.0)
rubocop-ast (1.36.2)
rubocop-ast (1.38.0)
parser (>= 3.3.1.0)
rubocop-capybara (2.21.0)
rubocop (~> 1.41)
rubocop-factory_bot (2.25.1)
rubocop (~> 1.41)
rubocop-rails (2.24.1)
rubocop-factory_bot (2.26.1)
rubocop (~> 1.61)
rubocop-rails (2.30.0)
activesupport (>= 4.2.0)
lint_roller (~> 1.1)
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-rspec (2.29.2)
rubocop (~> 1.40)
rubocop-capybara (~> 2.17)
rubocop-factory_bot (~> 2.22)
rubocop-rspec_rails (~> 2.28)
rubocop-rspec_rails (2.28.3)
rubocop (~> 1.40)
rubocop (>= 1.72.1, < 2.0)
rubocop-ast (>= 1.38.0, < 2.0)
rubocop-rspec (3.5.0)
lint_roller (~> 1.1)
rubocop (~> 1.72, >= 1.72.1)
rubocop-rspec_rails (2.30.0)
rubocop (~> 1.61)
rubocop-rspec (~> 3, >= 3.0.1)
ruby-progressbar (1.13.0)
scenic (1.8.0)
activerecord (>= 4.0.0)
Expand Down
4 changes: 1 addition & 3 deletions lib/search_query_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,7 @@ def self.search_filter_docs
class << self
attr_reader :fields
end
def fields
self.class.fields
end
delegate :fields, to: :class

# Maps operators as accepted by the parser to their SQL counterparts
@@operators = { # rubocop:disable Style/ClassVars
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
expect(data.pronouns).to eq(printing.pronouns)
expect(data.pronunciation_approximation).to eq(printing.pronunciation_approximation)
expect(data.pronunciation_ipa).to eq(printing.pronunciation_ipa)
expect(data.images).not_to be(nil)
expect(data.images).not_to be_nil
expect(data.card_abilities).to eq(printing.card_abilities.stringify_keys)
expect(data.latest_printing_id).to eq(printing.latest_printing_id)
expect(data.restrictions).to eq(printing.restrictions.stringify_keys)
Expand Down