Skip to content

Commit f8a6d76

Browse files
authored
Merge pull request #362 from plural/update-rubocop
Update rubocop and fix new violations.
2 parents 67ff3f6 + 0cbf2c1 commit f8a6d76

20 files changed

+34
-26
lines changed

.rubocop.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11
require:
22
- rubocop-factory_bot
3+
- rubocop-rspec_rails
4+
5+
plugins:
36
- rubocop-rails
47
- rubocop-rspec
5-
- rubocop-rspec_rails
8+
9+
AllCops:
10+
Exclude:
11+
- 'bin/*'
12+
- 'db/schema.rb'
13+
- 'vendor/**/*'
614

715
Metrics/AbcSize:
816
Enabled: false
@@ -16,13 +24,15 @@ Metrics/PerceivedComplexity:
1624
Enabled: false
1725
Rails/BulkChangeTable:
1826
Enabled: false
27+
Rails/FilePath:
28+
Enabled: false
1929
Rails/HasManyOrHasOneDependent:
2030
Enabled: false
2131
RSpec/ExampleLength:
2232
Enabled: false
2333
RSpec/ExampleWording:
2434
Enabled: false
25-
RSpec/FilePath:
26-
Enabled: false
2735
RSpec/MultipleExpectations:
2836
Enabled: false
37+
RSpec/NoExpectationExample:
38+
Enabled: false

Gemfile.lock

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ GEM
177177
kramdown (2.5.1)
178178
rexml (>= 3.3.9)
179179
language_server-protocol (3.17.0.4)
180+
lint_roller (1.1.0)
180181
logger (1.6.6)
181182
loofah (2.24.0)
182183
crass (~> 1.0.2)
@@ -414,7 +415,7 @@ GEM
414415
opentelemetry-api (~> 1.0)
415416
ostruct (0.6.1)
416417
parallel (1.26.3)
417-
parser (3.3.6.0)
418+
parser (3.3.7.1)
418419
ast (~> 2.4.1)
419420
racc
420421
parslet (2.0.0)
@@ -507,34 +508,33 @@ GEM
507508
activesupport (>= 3.0.0)
508509
mustache (~> 1.0, >= 0.99.4)
509510
rspec (~> 3.0)
510-
rubocop (1.69.1)
511+
rubocop (1.72.1)
511512
json (~> 2.3)
512-
language_server-protocol (>= 3.17.0)
513+
language_server-protocol (~> 3.17.0.2)
514+
lint_roller (~> 1.1.0)
513515
parallel (~> 1.10)
514516
parser (>= 3.3.0.2)
515517
rainbow (>= 2.2.2, < 4.0)
516518
regexp_parser (>= 2.9.3, < 3.0)
517-
rubocop-ast (>= 1.36.2, < 2.0)
519+
rubocop-ast (>= 1.38.0, < 2.0)
518520
ruby-progressbar (~> 1.7)
519521
unicode-display_width (>= 2.4.0, < 4.0)
520-
rubocop-ast (1.36.2)
522+
rubocop-ast (1.38.0)
521523
parser (>= 3.3.1.0)
522-
rubocop-capybara (2.21.0)
523-
rubocop (~> 1.41)
524-
rubocop-factory_bot (2.25.1)
525-
rubocop (~> 1.41)
526-
rubocop-rails (2.24.1)
524+
rubocop-factory_bot (2.26.1)
525+
rubocop (~> 1.61)
526+
rubocop-rails (2.30.0)
527527
activesupport (>= 4.2.0)
528+
lint_roller (~> 1.1)
528529
rack (>= 1.1)
529-
rubocop (>= 1.33.0, < 2.0)
530-
rubocop-ast (>= 1.31.1, < 2.0)
531-
rubocop-rspec (2.29.2)
532-
rubocop (~> 1.40)
533-
rubocop-capybara (~> 2.17)
534-
rubocop-factory_bot (~> 2.22)
535-
rubocop-rspec_rails (~> 2.28)
536-
rubocop-rspec_rails (2.28.3)
537-
rubocop (~> 1.40)
530+
rubocop (>= 1.72.1, < 2.0)
531+
rubocop-ast (>= 1.38.0, < 2.0)
532+
rubocop-rspec (3.5.0)
533+
lint_roller (~> 1.1)
534+
rubocop (~> 1.72, >= 1.72.1)
535+
rubocop-rspec_rails (2.30.0)
536+
rubocop (~> 1.61)
537+
rubocop-rspec (~> 3, >= 3.0.1)
538538
ruby-progressbar (1.13.0)
539539
scenic (1.8.0)
540540
activerecord (>= 4.0.0)

lib/search_query_builder.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,7 @@ def self.search_filter_docs
209209
class << self
210210
attr_reader :fields
211211
end
212-
def fields
213-
self.class.fields
214-
end
212+
delegate :fields, to: :class
215213

216214
# Maps operators as accepted by the parser to their SQL counterparts
217215
@@operators = { # rubocop:disable Style/ClassVars

spec/resources/printing/reads_spec.rb renamed to spec/resources/printing_resource_reads_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
expect(data.pronouns).to eq(printing.pronouns)
6666
expect(data.pronunciation_approximation).to eq(printing.pronunciation_approximation)
6767
expect(data.pronunciation_ipa).to eq(printing.pronunciation_ipa)
68-
expect(data.images).not_to be(nil)
68+
expect(data.images).not_to be_nil
6969
expect(data.card_abilities).to eq(printing.card_abilities.stringify_keys)
7070
expect(data.latest_printing_id).to eq(printing.latest_printing_id)
7171
expect(data.restrictions).to eq(printing.restrictions.stringify_keys)

0 commit comments

Comments
 (0)