Maintenance: Updated rubocop(-* gems) to latest version (1.10.0).

This commit is contained in:
Thorsten Eckel 2021-02-18 17:23:33 +01:00
parent 1aa4e68c6c
commit 027a1d4d63
5 changed files with 10 additions and 8 deletions

View file

@ -248,7 +248,7 @@ GEM
http-form_data (2.1.1)
http_parser.rb (0.6.0)
httpclient (2.8.3)
i18n (1.8.8)
i18n (1.8.9)
concurrent-ruby (~> 1.0)
icalendar (2.5.3)
ice_cube (~> 0.16)
@ -454,7 +454,7 @@ GEM
rspec-support (~> 3.9.0)
rspec-support (3.9.3)
rszr (0.5.2)
rubocop (1.9.1)
rubocop (1.10.0)
parallel (~> 1.10)
parser (>= 3.0.0.0)
rainbow (>= 2.2.2, < 4.0)
@ -472,7 +472,7 @@ GEM
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 0.90.0, < 2.0)
rubocop-rspec (2.1.0)
rubocop-rspec (2.2.0)
rubocop (~> 1.0)
rubocop-ast (>= 1.1.0)
ruby-progressbar (1.11.0)

View file

@ -119,7 +119,7 @@ curl http://localhost/api/v1/monitoring/health_check?token=XXX
handler_attempts_map[job_name][:attempts] += job.attempts
end
Hash[handler_attempts_map.sort].each_with_index do |(job_name, job_data), index|
handler_attempts_map.sort.to_h.each_with_index do |(job_name, job_data), index|
issues.push "Failed to run background job ##{index + 1} '#{job_name}' #{job_data[:count]} time(s) with #{job_data[:attempts]} attempt(s)."
end

View file

@ -411,7 +411,7 @@ returns
array.each { |elem| elem.append(nil) if elem.one? }
Hash[*array.flatten]
Hash[*array.flatten] # rubocop:disable Style/HashConversion
end
# Parses RFC822 header

View file

@ -26,7 +26,9 @@ module ActiveRecord
def pluck_as_hash_map(keys, values)
if keys.one?
Hash[keys.first, values]
{
keys.first => values
}
else
keys.zip(values).to_h
end

View file

@ -597,7 +597,7 @@ class AdminObjectManagerTest < TestCase
# lexicographically ordered list of option strings
options = %w[0 000.000 1 100.100 100.200 2 200.100 200.200 3 ä b n ö p sr ß st t ü v]
options_hash = Hash[options.reverse.collect { |o| [o, o] }]
options_hash = options.reverse.collect { |o| [o, o] }.to_h
object_manager_attribute_create(
data: {
@ -678,7 +678,7 @@ class AdminObjectManagerTest < TestCase
url: browser_url,
)
options = Hash[ %w[äöü cat delete dog ß].map { |x| [x, "#{x.capitalize} Display"] } ]
options = %w[äöü cat delete dog ß].map { |x| [x, "#{x.capitalize} Display"] }.to_h
options_no_dog = options.except('dog')
options_no_dog_no_delete = options_no_dog.except('delete')