Skip to content
This repository was archived by the owner on Jun 2, 2021. It is now read-only.

Commit 3059c46

Browse files
committed
Update rubocop to 0.80.1
Authored-by: Greg Cobb <gcobb@pivotal.io>
1 parent dee6adb commit 3059c46

7 files changed

Lines changed: 22 additions & 14 deletions

File tree

.rubocop.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,9 +193,6 @@ Style/Alias:
193193
Style/BlockDelimiters:
194194
Enabled: false
195195

196-
Style/BracesAroundHashParameters:
197-
Enabled: false
198-
199196
Style/ClassAndModuleChildren:
200197
Enabled: false
201198

@@ -300,3 +297,12 @@ Style/TrivialAccessors:
300297

301298
Style/WordArray:
302299
Enabled: false
300+
301+
Style/HashEachMethods:
302+
Enabled: false
303+
304+
Style/HashTransformKeys:
305+
Enabled: true
306+
307+
Style/HashTransformValues:
308+
Enabled: true

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ group :test do
8888
gem 'rspec-rails', '~> 3.9.1'
8989
gem 'rspec-wait'
9090
gem 'rspec_api_documentation', '>= 6.1.0'
91-
gem 'rubocop', '~> 0.79.0'
91+
gem 'rubocop', '~> 0.80.1'
9292
gem 'timecop'
9393
gem 'webmock', '> 2.3.1'
9494
end

Gemfile.lock

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ GEM
305305
parallel (1.19.2)
306306
parallel_tests (3.3.0)
307307
parallel
308-
parser (2.7.1.5)
308+
parser (2.7.2.0)
309309
ast (~> 2.4.1)
310310
pg (1.2.3)
311311
posix-spawn (0.3.15)
@@ -356,6 +356,7 @@ GEM
356356
retryable (3.0.5)
357357
reverse_markdown (2.0.0)
358358
nokogiri
359+
rexml (3.2.4)
359360
rfc822 (0.1.5)
360361
roodi (5.0.0)
361362
ruby_parser (~> 3.2, >= 3.2.2)
@@ -393,11 +394,12 @@ GEM
393394
activesupport (>= 3.0.0)
394395
mustache (~> 1.0, >= 0.99.4)
395396
rspec (~> 3.0)
396-
rubocop (0.79.0)
397+
rubocop (0.80.1)
397398
jaro_winkler (~> 1.5.1)
398399
parallel (~> 1.10)
399400
parser (>= 2.7.0.1)
400401
rainbow (>= 2.2.2, < 4.0)
402+
rexml
401403
ruby-progressbar (~> 1.7)
402404
unicode-display_width (>= 1.4.0, < 1.7)
403405
ruby-debug-ide (0.7.2)
@@ -561,7 +563,7 @@ DEPENDENCIES
561563
rspec-rails (~> 3.9.1)
562564
rspec-wait
563565
rspec_api_documentation (>= 6.1.0)
564-
rubocop (~> 0.79.0)
566+
rubocop (~> 0.80.1)
565567
ruby-debug-ide (>= 0.7.0.beta4)
566568
rubyzip (>= 1.3.0)
567569
scientist (~> 1.1.0)

app/messages/base_message.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def self.from_params(params, to_array_keys, fields: [])
6868

6969
fields.each do |key|
7070
if opts[key].is_a?(Hash)
71-
opts[key].keys.each do |attribute|
71+
opts[key].each_key do |attribute|
7272
to_array! opts[key], attribute
7373
end
7474
end

app/presenters/v3/revision_presenter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def build_links
5757
end
5858

5959
def processes
60-
revision.commands_by_process_type.map { |k, v| [k, { 'command' => v }] }.to_h
60+
revision.commands_by_process_type.transform_values { |v| { 'command' => v } }
6161
end
6262

6363
def sidecars

lib/cloud_controller/uaa/uaa_client.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def users_for_ids(user_ids)
4545
end
4646

4747
def usernames_for_ids(user_ids)
48-
fetch_users(user_ids).map { |id, user| [id, user['username']] }.to_h
48+
fetch_users(user_ids).transform_values { |user| user['username'] }
4949
rescue UaaUnavailable, CF::UAA::UAAError => e
5050
logger.error("Failed to retrieve usernames from UAA: #{e.inspect}")
5151
{}

lib/tasks/db.rake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ namespace :db do
2121
end
2222
end
2323
RUBY
24-
puts'*' * 134
25-
puts''
24+
puts '*' * 134
25+
puts ''
2626
puts "The migration is in #{File.join(migrations_dir, filename)}"
2727
puts ''
2828
puts 'Before writing a migration review our style guide: https://github.com/cloudfoundry/cloud_controller_ng/wiki/CAPI-Migration-Style-Guide'
29-
puts''
30-
puts'*' * 134
29+
puts ''
30+
puts '*' * 134
3131
end
3232
end
3333

0 commit comments

Comments
 (0)