From 96fe5ede7d55ef50c06b49928864ad480351a101 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 22 Apr 2025 11:27:58 +0000 Subject: [PATCH 1/2] build(deps-dev): bump rubocop from 1.75.2 to 1.75.3 Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.75.2 to 1.75.3. - [Release notes](https://github.com/rubocop/rubocop/releases) - [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop/compare/v1.75.2...v1.75.3) --- updated-dependencies: - dependency-name: rubocop dependency-version: 1.75.3 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Gemfile | 2 +- Gemfile.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index 48d36e7971..7f1e2bf849 100644 --- a/Gemfile +++ b/Gemfile @@ -83,7 +83,7 @@ group :test do gem 'rspec-its' gem 'rspec-rails', '~> 7.1.1' gem 'rspec-wait' - gem 'rubocop', '~> 1.75.2' + gem 'rubocop', '~> 1.75.3' gem 'rubocop-capybara' gem 'rubocop-factory_bot' gem 'rubocop-rails', '~> 2.31' diff --git a/Gemfile.lock b/Gemfile.lock index 1800a0ea27..c6f6eeb547 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -469,7 +469,7 @@ GEM activesupport (>= 3.0.0) mustache (~> 1.0, >= 0.99.4) rspec (~> 3.0) - rubocop (1.75.2) + rubocop (1.75.3) json (~> 2.3) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.1.0) @@ -671,7 +671,7 @@ DEPENDENCIES rspec-rails (~> 7.1.1) rspec-wait rspec_api_documentation (>= 6.1.0) - rubocop (~> 1.75.2) + rubocop (~> 1.75.3) rubocop-capybara rubocop-factory_bot rubocop-rails (~> 2.31) From 289280ce09ec93812a292e12466dda9a57c1fca3 Mon Sep 17 00:00:00 2001 From: "M. Oleske" Date: Sat, 26 Apr 2025 21:34:34 -0700 Subject: [PATCH 2/2] Run rubocop autocorrect --- app/presenters/v3/droplet_presenter.rb | 2 +- lib/cloud_controller/diego/app_recipe_builder.rb | 4 ++-- spec/logcache/container_metric_batcher_spec.rb | 4 ++-- spec/support/legacy_api_dsl.rb | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/presenters/v3/droplet_presenter.rb b/app/presenters/v3/droplet_presenter.rb index 6bc69ae830..177eee8d2d 100644 --- a/app/presenters/v3/droplet_presenter.rb +++ b/app/presenters/v3/droplet_presenter.rb @@ -70,7 +70,7 @@ def droplet_buildpack_info name_to_lookup = buildpack.buildpack_url name_to_print = CloudController::UrlSecretObfuscator.obfuscate(buildpack.buildpack_url) end - detect_output = droplet.buildpack_receipt_buildpack == (name_to_lookup) ? droplet.buildpack_receipt_detect_output : nil + detect_output = droplet.buildpack_receipt_buildpack == name_to_lookup ? droplet.buildpack_receipt_detect_output : nil { name: name_to_print, detect_output: detect_output, diff --git a/lib/cloud_controller/diego/app_recipe_builder.rb b/lib/cloud_controller/diego/app_recipe_builder.rb index 0b8a3dc704..9cbf197fc6 100644 --- a/lib/cloud_controller/diego/app_recipe_builder.rb +++ b/lib/cloud_controller/diego/app_recipe_builder.rb @@ -166,8 +166,8 @@ def generate_routes(info) { CF_ROUTES_KEY => Oj.dump(http_routes), - TCP_ROUTES_KEY => Oj.dump((info['tcp_routes'] || [])), - INTERNAL_ROUTES_KEY => Oj.dump((info['internal_routes'] || [])) + TCP_ROUTES_KEY => Oj.dump(info['tcp_routes'] || []), + INTERNAL_ROUTES_KEY => Oj.dump(info['internal_routes'] || []) } end diff --git a/spec/logcache/container_metric_batcher_spec.rb b/spec/logcache/container_metric_batcher_spec.rb index 3b50ffc0ba..6a40a6e939 100644 --- a/spec/logcache/container_metric_batcher_spec.rb +++ b/spec/logcache/container_metric_batcher_spec.rb @@ -512,7 +512,7 @@ def generate_batch(size, offset: 0, last_timestamp: TimeUtils.to_nanoseconds(Tim Timecop.freeze do subject - start_time = TimeUtils.to_nanoseconds((Time.now - lookback_window)) + start_time = TimeUtils.to_nanoseconds(Time.now - lookback_window) end_time = TimeUtils.to_nanoseconds(Time.now) expect(wrapped_logcache_client).to have_received(:container_metrics). with(hash_including(start_time:, end_time:)) @@ -545,7 +545,7 @@ def generate_batch(size, offset: 0, last_timestamp: TimeUtils.to_nanoseconds(Tim Timecop.freeze(call_time) do expect(subject).to have(2001).items - start_time = TimeUtils.to_nanoseconds((call_time - lookback_window)) + start_time = TimeUtils.to_nanoseconds(call_time - lookback_window) expect(wrapped_logcache_client).to have_received(:container_metrics). with(hash_including(start_time: start_time, end_time: call_time_ns)) diff --git a/spec/support/legacy_api_dsl.rb b/spec/support/legacy_api_dsl.rb index 54ab3deb48..0f10247e79 100644 --- a/spec/support/legacy_api_dsl.rb +++ b/spec/support/legacy_api_dsl.rb @@ -213,7 +213,7 @@ def standard_list_parameters(controller, outer_model: nil, exclude_parameters: [ query_parameter_description += 'Format queries as <filter><op><value>
' query_parameter_description += ' Valid ops: : >= <= < > IN
' query_parameter_description += " Valid filters: #{query_parameters.to_a.join(', ')}" - if outer_model && query_parameters.include?((outer_model.to_s + '_guid')) + if outer_model && query_parameters.include?(outer_model.to_s + '_guid') query_parameter_description += "
(Note that filtering on #{outer_model}_guid will return an empty list " \ 'if you specify anything other than the guid included in the path.)' end