Skip to content

Commit 94f0875

Browse files
build(deps-dev): bump rubocop from 1.67.0 to 1.68.0 (#4054)
* build(deps-dev): bump rubocop from 1.67.0 to 1.68.0 Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.67.0 to 1.68.0. - [Release notes](https://github.com/rubocop/rubocop/releases) - [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md) - [Commits](rubocop/rubocop@v1.67.0...v1.68.0) --- updated-dependencies: - dependency-name: rubocop dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * Fix Style/MapIntoArray rubocop errors --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: M. Oleske <[email protected]>
1 parent a3a8688 commit 94f0875

File tree

6 files changed

+18
-28
lines changed

6 files changed

+18
-28
lines changed

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ group :test do
8585
gem 'rspec-its'
8686
gem 'rspec-rails', '~> 7.0.1'
8787
gem 'rspec-wait'
88-
gem 'rubocop', '~> 1.67.0'
88+
gem 'rubocop', '~> 1.68.0'
8989
gem 'rubocop-capybara'
9090
gem 'rubocop-factory_bot'
9191
gem 'rubocop-rails', '~> 2.27'

Gemfile.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ GEM
285285
rdoc (>= 4.0.0)
286286
reline (>= 0.4.2)
287287
jaro_winkler (1.5.6)
288-
json (2.7.4)
288+
json (2.7.5)
289289
json-diff (0.4.1)
290290
json-schema (5.0.1)
291291
addressable (~> 2.8)
@@ -472,7 +472,7 @@ GEM
472472
activesupport (>= 3.0.0)
473473
mustache (~> 1.0, >= 0.99.4)
474474
rspec (~> 3.0)
475-
rubocop (1.67.0)
475+
rubocop (1.68.0)
476476
json (~> 2.3)
477477
language_server-protocol (>= 3.17.0)
478478
parallel (~> 1.10)
@@ -482,7 +482,7 @@ GEM
482482
rubocop-ast (>= 1.32.2, < 2.0)
483483
ruby-progressbar (~> 1.7)
484484
unicode-display_width (>= 2.4.0, < 3.0)
485-
rubocop-ast (1.32.3)
485+
rubocop-ast (1.33.0)
486486
parser (>= 3.3.1.0)
487487
rubocop-capybara (2.21.0)
488488
rubocop (~> 1.41)
@@ -660,7 +660,7 @@ DEPENDENCIES
660660
rspec-rails (~> 7.0.1)
661661
rspec-wait
662662
rspec_api_documentation (>= 6.1.0)
663-
rubocop (~> 1.67.0)
663+
rubocop (~> 1.68.0)
664664
rubocop-capybara
665665
rubocop-factory_bot
666666
rubocop-rails (~> 2.27)

app/presenters/v3/relationship_presenter.rb

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,9 @@ def to_hash
1616
private
1717

1818
def build_relations
19-
data = []
20-
21-
@relationships.each do |relationship|
22-
data << { name: relationship.name, guid: relationship.guid, link: "/v2/#{@relation_url}/#{relationship.guid}" }
19+
@relationships.map do |relationship|
20+
{ name: relationship.name, guid: relationship.guid, link: "/v2/#{@relation_url}/#{relationship.guid}" }
2321
end
24-
25-
data
2622
end
2723
end
2824
end

app/presenters/v3/to_many_relationship_presenter.rb

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,9 @@ def to_hash
2525
private
2626

2727
def build_relations
28-
data = []
29-
30-
@relationships.each do |relationship|
31-
data << { guid: relationship.guid }
28+
@relationships.map do |relationship|
29+
{ guid: relationship.guid }
3230
end
33-
34-
data
3531
end
3632

3733
def build_links

docs/v3/helpers/docs_helpers.rb

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,13 @@ def current_version
1313
def extract_table_of_contents(html)
1414
page = Nokogiri::HTML(html)
1515

16-
headings = []
17-
page.css('h1,h2,h3').each do |heading|
18-
headings.push({
19-
id: heading.attribute('id').to_s,
20-
text: heading.content,
21-
level: heading.name[1].to_i,
22-
children: []
23-
})
16+
headings = page.css('h1,h2,h3').map do |heading|
17+
{
18+
id: heading.attribute('id').to_s,
19+
text: heading.content,
20+
level: heading.name[1].to_i,
21+
children: []
22+
}
2423
end
2524

2625
[3, 2].each do |heading_level|

lib/cloud_controller/metrics/periodic_updater.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,8 @@ def update_webserver_stats
159159

160160
local_stats = Puma.stats_hash
161161
worker_count = local_stats[:booted_workers]
162-
worker_stats = []
163-
local_stats[:worker_status].each do |worker_status|
164-
worker_stats << {
162+
worker_stats = local_stats[:worker_status].map do |worker_status|
163+
{
165164
started_at: Time.parse(worker_status[:started_at]).utc.to_i,
166165
index: worker_status[:index],
167166
pid: worker_status[:pid],

0 commit comments

Comments
 (0)