From 82e8a4aa7966ef97ba8df15f083accc362dd5d42 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Feb 2026 11:11:01 +0000 Subject: [PATCH 1/2] build(deps-dev): bump rubocop from 1.84.0 to 1.84.1 Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.84.0 to 1.84.1. - [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.84.0...v1.84.1) --- updated-dependencies: - dependency-name: rubocop dependency-version: 1.84.1 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Gemfile | 2 +- Gemfile.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Gemfile b/Gemfile index e7dffa5f72..58f7dfa284 100644 --- a/Gemfile +++ b/Gemfile @@ -79,7 +79,7 @@ group :test do gem 'rspec-its' gem 'rspec-rails', '~> 8.0.2' gem 'rspec-wait' - gem 'rubocop', '~> 1.84.0' + gem 'rubocop', '~> 1.84.1' gem 'rubocop-capybara' gem 'rubocop-factory_bot' gem 'rubocop-rails', '~> 2.34' diff --git a/Gemfile.lock b/Gemfile.lock index f923480137..4785f1cb06 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -273,7 +273,7 @@ GEM rdoc (>= 4.0.0) reline (>= 0.4.2) jaro_winkler (1.6.1) - json (2.18.0) + json (2.18.1) json-diff (0.4.1) json-schema (6.1.0) addressable (~> 2.8) @@ -475,7 +475,7 @@ GEM activesupport (>= 3.0.0) mustache (~> 1.0, >= 0.99.4) rspec (~> 3.0) - rubocop (1.84.0) + rubocop (1.84.1) json (~> 2.3) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.1.0) @@ -679,7 +679,7 @@ DEPENDENCIES rspec-rails (~> 8.0.2) rspec-wait rspec_api_documentation (>= 6.1.0) - rubocop (~> 1.84.0) + rubocop (~> 1.84.1) rubocop-capybara rubocop-factory_bot rubocop-rails (~> 2.34) From ebbe3b71726cf9414b643c98def05930d597861c Mon Sep 17 00:00:00 2001 From: Philipp Thun Date: Wed, 4 Feb 2026 10:53:29 +0100 Subject: [PATCH 2/2] Correct Rubocop offenses --- app/fetchers/app_list_fetcher.rb | 16 ++++++++-------- app/fetchers/queries/app_query.rb | 4 ++-- app/models/runtime/organization.rb | 2 +- app/models/runtime/route.rb | 12 ++++++------ app/models/runtime/space.rb | 14 +++++++------- middleware/cors.rb | 2 +- .../models/runtime/pollable_job_model_spec.rb | 2 +- 7 files changed, 26 insertions(+), 26 deletions(-) diff --git a/app/fetchers/app_list_fetcher.rb b/app/fetchers/app_list_fetcher.rb index 9db86889a0..44ce19774c 100644 --- a/app/fetchers/app_list_fetcher.rb +++ b/app/fetchers/app_list_fetcher.rb @@ -38,24 +38,24 @@ def filter(message, dataset) when BuildpackLifecycleDataModel::LIFECYCLE_TYPE dataset = dataset.where( guid: BuildpackLifecycleDataModel. - where(Sequel.~(app_guid: nil)). - select(:app_guid) + where(Sequel.~(app_guid: nil)). + select(:app_guid) ) when DockerLifecycleDataModel::LIFECYCLE_TYPE dataset = dataset.exclude( guid: BuildpackLifecycleDataModel. - where(Sequel.~(app_guid: nil)). - select(:app_guid) + where(Sequel.~(app_guid: nil)). + select(:app_guid) ).exclude( guid: CNBLifecycleDataModel. - where(Sequel.~(app_guid: nil)). - select(:app_guid) + where(Sequel.~(app_guid: nil)). + select(:app_guid) ) when CNBLifecycleDataModel::LIFECYCLE_TYPE dataset = dataset.where( guid: CNBLifecycleDataModel. - where(Sequel.~(app_guid: nil)). - select(:app_guid) + where(Sequel.~(app_guid: nil)). + select(:app_guid) ) end end diff --git a/app/fetchers/queries/app_query.rb b/app/fetchers/queries/app_query.rb index f305389801..537de0411c 100644 --- a/app/fetchers/queries/app_query.rb +++ b/app/fetchers/queries/app_query.rb @@ -28,8 +28,8 @@ def stack_filter(dataset, cond) dataset.where( app: VCAP::CloudController::AppModel.where( buildpack_lifecycle_data: VCAP::CloudController::BuildpackLifecycleDataModel.where(stack: stack_names). - exclude(app_guid: nil). - select(:guid) + exclude(app_guid: nil). + select(:guid) ).select(:guid) ) end diff --git a/app/models/runtime/organization.rb b/app/models/runtime/organization.rb index b2f43a0ff9..226d7dda88 100644 --- a/app/models/runtime/organization.rb +++ b/app/models/runtime/organization.rb @@ -57,7 +57,7 @@ class Organization < Sequel::Model # r.qualified_right_key = :private_domain_id # r.predicate_key = :organization_id VCAP::CloudController::Domain.dataset.where(owning_organization_id: id). - or(id: db[r.join_table_source].select(r.qualified_right_key).where(r.predicate_key => id)) + or(id: db[r.join_table_source].select(r.qualified_right_key).where(r.predicate_key => id)) }, before_add: proc { |org, private_domain| org.cancel_action unless private_domain.addable_to_organization?(org) }, before_remove: proc { |org, private_domain| org.cancel_action if private_domain.owned_by?(org) }, diff --git a/app/models/runtime/route.rb b/app/models/runtime/route.rb index 1a54bd72b4..bdefff78c4 100644 --- a/app/models/runtime/route.rb +++ b/app/models/runtime/route.rb @@ -189,12 +189,12 @@ def validate_changed_space(new_space) def self.user_visibility_filter(user) { space_id: user.space_developer_space_ids. - union(user.space_manager_space_ids, from_self: false). - union(user.space_auditor_space_ids, from_self: false). - union(user.space_supporter_space_ids, from_self: false). - union(Space.join(user.org_manager_org_ids, organization_id: :organization_id).select(:spaces__id)). - union(Space.join(user.org_auditor_org_ids, organization_id: :organization_id).select(:spaces__id)). - select(:space_id) + union(user.space_manager_space_ids, from_self: false). + union(user.space_auditor_space_ids, from_self: false). + union(user.space_supporter_space_ids, from_self: false). + union(Space.join(user.org_manager_org_ids, organization_id: :organization_id).select(:spaces__id)). + union(Space.join(user.org_auditor_org_ids, organization_id: :organization_id).select(:spaces__id)). + select(:space_id) } end diff --git a/app/models/runtime/space.rb b/app/models/runtime/space.rb index de02068b54..18324a8be8 100644 --- a/app/models/runtime/space.rb +++ b/app/models/runtime/space.rb @@ -75,7 +75,7 @@ class DBNameUniqueRaceError < Sequel::ValidationFailed; end many_to_many :security_groups, dataset: lambda { SecurityGroup.left_join(:security_groups_spaces, security_group_id: :id). - where(Sequel.or(security_groups_spaces__space_id: id, security_groups__running_default: true)).distinct(:id) + where(Sequel.or(security_groups_spaces__space_id: id, security_groups__running_default: true)).distinct(:id) }, eager_loader: lambda { |spaces_map| space_ids = spaces_map[:id_map].keys @@ -99,7 +99,7 @@ class DBNameUniqueRaceError < Sequel::ValidationFailed; end right_key: :staging_security_group_id, dataset: lambda { SecurityGroup.left_join(:staging_security_groups_spaces, staging_security_group_id: :id). - where(Sequel.or(staging_security_groups_spaces__staging_space_id: id, security_groups__staging_default: true)).distinct(:id) + where(Sequel.or(staging_security_groups_spaces__staging_space_id: id, security_groups__staging_default: true)).distinct(:id) }, eager_loader: lambda { |spaces_map| space_ids = spaces_map[:id_map].keys @@ -277,11 +277,11 @@ def number_service_keys def self.user_visibility_filter(user) { spaces__id: user.space_developer_space_ids. - union(user.space_manager_space_ids, from_self: false). - union(user.space_auditor_space_ids, from_self: false). - union(user.space_supporter_space_ids, from_self: false). - union(dataset.join(user.org_manager_org_ids, organization_id: :organization_id).select(:spaces__id), from_self: false). - select(:space_id) + union(user.space_manager_space_ids, from_self: false). + union(user.space_auditor_space_ids, from_self: false). + union(user.space_supporter_space_ids, from_self: false). + union(dataset.join(user.org_manager_org_ids, organization_id: :organization_id).select(:spaces__id), from_self: false). + select(:space_id) } end diff --git a/middleware/cors.rb b/middleware/cors.rb index ee3125f292..5883462629 100644 --- a/middleware/cors.rb +++ b/middleware/cors.rb @@ -29,7 +29,7 @@ def call(env) 'Access-Control-Allow-Methods' => 'GET,PUT,POST,DELETE', 'Access-Control-Max-Age' => '900', 'Access-Control-Allow-Headers' => Set.new(%w[origin content-type authorization]). - merge(env['HTTP_ACCESS_CONTROL_REQUEST_HEADERS'].to_s.split(',').map(&:strip).map(&:downcase)).to_a.join(',') + merge(env['HTTP_ACCESS_CONTROL_REQUEST_HEADERS'].to_s.split(',').map(&:strip).map(&:downcase)).to_a.join(',') }) end diff --git a/spec/unit/models/runtime/pollable_job_model_spec.rb b/spec/unit/models/runtime/pollable_job_model_spec.rb index c35058ef99..4e34dbaed5 100644 --- a/spec/unit/models/runtime/pollable_job_model_spec.rb +++ b/spec/unit/models/runtime/pollable_job_model_spec.rb @@ -95,7 +95,7 @@ module VCAP::CloudController it 'returns true if the resource exists' do organization_quota = QuotaDefinition.make job = PollableJobModel.make(resource_type: 'organization_quota', resource_guid: organization_quota. - guid) + guid) expect(job.resource_exists?).to be(true) end