Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ group :test do
gem 'rspec-its'
gem 'rspec-rails', '~> 6.1.4'
gem 'rspec-wait'
gem 'rubocop', '~> 1.67.0'
gem 'rubocop', '~> 1.68.0'
gem 'rubocop-capybara'
gem 'rubocop-factory_bot'
gem 'rubocop-rails', '~> 2.27'
Expand Down
8 changes: 4 additions & 4 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ GEM
rdoc (>= 4.0.0)
reline (>= 0.4.2)
jaro_winkler (1.5.6)
json (2.7.4)
json (2.7.5)
json-diff (0.4.1)
json-schema (5.0.1)
addressable (~> 2.8)
Expand Down Expand Up @@ -471,7 +471,7 @@ GEM
activesupport (>= 3.0.0)
mustache (~> 1.0, >= 0.99.4)
rspec (~> 3.0)
rubocop (1.67.0)
rubocop (1.68.0)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
Expand All @@ -481,7 +481,7 @@ GEM
rubocop-ast (>= 1.32.2, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.32.3)
rubocop-ast (1.33.0)
parser (>= 3.3.1.0)
rubocop-capybara (2.21.0)
rubocop (~> 1.41)
Expand Down Expand Up @@ -659,7 +659,7 @@ DEPENDENCIES
rspec-rails (~> 6.1.4)
rspec-wait
rspec_api_documentation (>= 6.1.0)
rubocop (~> 1.67.0)
rubocop (~> 1.68.0)
rubocop-capybara
rubocop-factory_bot
rubocop-rails (~> 2.27)
Expand Down
8 changes: 2 additions & 6 deletions app/presenters/v3/relationship_presenter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,9 @@ def to_hash
private

def build_relations
data = []

@relationships.each do |relationship|
data << { name: relationship.name, guid: relationship.guid, link: "/v2/#{@relation_url}/#{relationship.guid}" }
@relationships.map do |relationship|
{ name: relationship.name, guid: relationship.guid, link: "/v2/#{@relation_url}/#{relationship.guid}" }
end

data
end
end
end
Expand Down
8 changes: 2 additions & 6 deletions app/presenters/v3/to_many_relationship_presenter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,9 @@ def to_hash
private

def build_relations
data = []

@relationships.each do |relationship|
data << { guid: relationship.guid }
@relationships.map do |relationship|
{ guid: relationship.guid }
end

data
end

def build_links
Expand Down
15 changes: 7 additions & 8 deletions docs/v3/helpers/docs_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,13 @@ def current_version
def extract_table_of_contents(html)
page = Nokogiri::HTML(html)

headings = []
page.css('h1,h2,h3').each do |heading|
headings.push({
id: heading.attribute('id').to_s,
text: heading.content,
level: heading.name[1].to_i,
children: []
})
headings = page.css('h1,h2,h3').map do |heading|
{
id: heading.attribute('id').to_s,
text: heading.content,
level: heading.name[1].to_i,
children: []
}
end

[3, 2].each do |heading_level|
Expand Down
5 changes: 2 additions & 3 deletions lib/cloud_controller/metrics/periodic_updater.rb
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,8 @@ def update_webserver_stats

local_stats = Puma.stats_hash
worker_count = local_stats[:booted_workers]
worker_stats = []
local_stats[:worker_status].each do |worker_status|
worker_stats << {
worker_stats = local_stats[:worker_status].map do |worker_status|
{
started_at: Time.parse(worker_status[:started_at]).utc.to_i,
index: worker_status[:index],
pid: worker_status[:pid],
Expand Down