Skip to content
This repository was archived by the owner on Jul 14, 2024. It is now read-only.

Commit dd42281

Browse files
Daniela LemowDaniela Lemow
Daniela Lemow
authored and
Daniela Lemow
committed
feat: Upgrade rubocop
1 parent cc008df commit dd42281

File tree

7 files changed

+25
-21
lines changed

7 files changed

+25
-21
lines changed

Gemfile.lock

+16-12
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ GEM
183183
http-cookie (1.0.5)
184184
domain_name (~> 0.5)
185185
http-form_data (2.3.0)
186-
i18n (1.14.4)
186+
i18n (1.14.5)
187187
concurrent-ruby (~> 1.0)
188188
io-console (0.6.0)
189189
irb (1.6.4)
@@ -226,7 +226,7 @@ GEM
226226
mime-types-data (~> 3.2015)
227227
mime-types-data (3.2023.0218.1)
228228
mini_mime (1.1.5)
229-
minitest (5.22.2)
229+
minitest (5.22.3)
230230
multi_json (1.15.0)
231231
mysql2 (0.5.6)
232232
net-imap (0.4.10)
@@ -265,7 +265,7 @@ GEM
265265
nio4r (~> 2.0)
266266
raabro (1.4.0)
267267
racc (1.7.3)
268-
rack (2.2.8.1)
268+
rack (2.2.9)
269269
rack-mini-profiler (3.3.0)
270270
rack (>= 1.2.0)
271271
rack-proxy (0.7.6)
@@ -352,21 +352,25 @@ GEM
352352
unicode-display_width (>= 2.4.0, < 3.0)
353353
rubocop-ast (1.31.3)
354354
parser (>= 3.3.1.0)
355-
rubocop-capybara (2.18.0)
355+
rubocop-capybara (2.20.0)
356356
rubocop (~> 1.41)
357-
rubocop-factory_bot (2.23.1)
358-
rubocop (~> 1.33)
359-
rubocop-performance (1.17.1)
360-
rubocop (>= 1.7.0, < 2.0)
361-
rubocop-ast (>= 0.4.0)
362-
rubocop-rails (2.19.1)
357+
rubocop-factory_bot (2.25.1)
358+
rubocop (~> 1.41)
359+
rubocop-performance (1.21.0)
360+
rubocop (>= 1.48.1, < 2.0)
361+
rubocop-ast (>= 1.31.1, < 2.0)
362+
rubocop-rails (2.24.1)
363363
activesupport (>= 4.2.0)
364364
rack (>= 1.1)
365365
rubocop (>= 1.33.0, < 2.0)
366-
rubocop-rspec (2.22.0)
367-
rubocop (~> 1.33)
366+
rubocop-ast (>= 1.31.1, < 2.0)
367+
rubocop-rspec (2.29.2)
368+
rubocop (~> 1.40)
368369
rubocop-capybara (~> 2.17)
369370
rubocop-factory_bot (~> 2.22)
371+
rubocop-rspec_rails (~> 2.28)
372+
rubocop-rspec_rails (2.28.3)
373+
rubocop (~> 1.40)
370374
ruby-progressbar (1.13.0)
371375
ruby2_keywords (0.0.5)
372376
rubyzip (2.3.2)

app/models/extraction_job.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
class ExtractionJob < ApplicationRecord
66
include Job
77

8-
EXTRACTIONS_FOLDER = "#{Rails.root}/extractions/#{Rails.env}".freeze
8+
EXTRACTIONS_FOLDER = Rails.root.join("extractions/#{Rails.env}").to_s.freeze
99

1010
enum :kind, { full: 0, sample: 1 }, prefix: :is
1111

app/models/harvest_report.rb

+4-4
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ def completed?
4040
end
4141

4242
%i[extraction transformation load delete].each do |process|
43-
define_method("#{process}_running!") do
43+
define_method(:"#{process}_running!") do
4444
super()
45-
send(:update, "#{process}_start_time" => Time.zone.now) if send("#{process}_start_time").blank?
45+
send(:update, "#{process}_start_time" => Time.zone.now) if send(:"#{process}_start_time").blank?
4646
end
4747

48-
define_method("#{process}_completed!") do
48+
define_method(:"#{process}_completed!") do
4949
super()
5050
send(:update, "#{process}_end_time" => Time.zone.now)
5151
end
@@ -54,7 +54,7 @@ def completed?
5454
## These queries are all done atomically on the database
5555
# To prevent race conditions when multiple sidekiq processes are updating the same report at the same time.
5656
METRICS.each do |metric|
57-
define_method("increment_#{metric}!") do |amount = 1|
57+
define_method(:"increment_#{metric}!") do |amount = 1|
5858
with_lock do
5959
send(:increment!, metric, amount)
6060
end

app/models/parameter.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class Parameter < ApplicationRecord
77
enum :content_type, { static: 0, dynamic: 1, incremental: 2 }
88

99
def evaluate(response_object = nil)
10-
send("#{content_type}_evaluation", response_object)
10+
send(:"#{content_type}_evaluation", response_object)
1111
end
1212

1313
def static_evaluation(_response_object)

app/supplejack/transformation/raw_records_extractor.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def records(page_number)
1818
return [] if @documents[page_number.to_i].size_in_bytes > 10.megabytes
1919

2020
begin
21-
send("#{format.downcase}_extract", page_number)
21+
send(:"#{format.downcase}_extract", page_number)
2222
rescue NoMethodError, Nokogiri::XML::XPath::SyntaxError
2323
[]
2424
end

lib/tasks/fixtures.rake

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace :fixtures do
1414
`bin/rails db:fixtures:load`
1515

1616
puts 'Launching the extraction jobs...'
17-
ExtractionJob.all.each do |job|
17+
ExtractionJob.find_each do |job|
1818
job.create_folder
1919
ExtractionWorker.new.perform(job.id)
2020
end

spec/support/capybara.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
driven_by :rack_test
99
end
1010

11-
config.before(:each, js: true, type: :system) do
11+
config.before(:each, :js, type: :system) do
1212
driven_by :selenium_chrome_headless
1313
end
1414
end

0 commit comments

Comments
 (0)