From 3c74d7379a062a9c10f4779112903d526f247648 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 7 Aug 2026 11:03:53 +0000 Subject: [PATCH 1/2] build(deps-dev): bump rubocop from 1.88.2 to 1.89.0 Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.88.2 to 1.89.0. - [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.88.2...v1.89.0) --- updated-dependencies: - dependency-name: rubocop dependency-version: 1.89.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Gemfile | 2 +- Gemfile.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index 7af76d27548..729dbe3b17e 100644 --- a/Gemfile +++ b/Gemfile @@ -59,7 +59,7 @@ group :test do gem 'rspec-its' gem 'rspec-rails', '~> 8.0.4' gem 'rspec-wait' - gem 'rubocop', '~> 1.88.2' + gem 'rubocop', '~> 1.89.0' gem 'rubocop-capybara' gem 'rubocop-factory_bot' gem 'rubocop-rails', '~> 2.36' diff --git a/Gemfile.lock b/Gemfile.lock index fbf0edfea37..9f8cde7f961 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -296,7 +296,7 @@ GEM activesupport (>= 3.0.0) mustache (~> 1.0, >= 0.99.4) rspec (~> 3.0) - rubocop (1.88.2) + rubocop (1.89.0) json (~> 2.3) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.1.0) @@ -479,7 +479,7 @@ DEPENDENCIES rspec-rails (~> 8.0.4) rspec-wait rspec_api_documentation (>= 6.1.0) - rubocop (~> 1.88.2) + rubocop (~> 1.89.0) rubocop-capybara rubocop-factory_bot rubocop-rails (~> 2.36) From 85db16939a4f87eb37f631d23756b59f70c52fe3 Mon Sep 17 00:00:00 2001 From: johha Date: Tue, 11 Aug 2026 10:14:34 +0200 Subject: [PATCH 2/2] fix linitng --- app/actions/deployment_create.rb | 4 +--- app/models/runtime/helpers/organization_role_mixin.rb | 2 +- app/models/runtime/helpers/space_role_mixin.rb | 2 +- lib/sequel_plugins/vcap_relations.rb | 2 +- middleware/below_min_cli_warning.rb | 2 +- middleware/cef_logs.rb | 2 +- spec/unit/lib/services/service_brokers/v2/schema_spec.rb | 2 +- 7 files changed, 7 insertions(+), 9 deletions(-) diff --git a/app/actions/deployment_create.rb b/app/actions/deployment_create.rb index 47d89d5994f..e8f5134c618 100644 --- a/app/actions/deployment_create.rb +++ b/app/actions/deployment_create.rb @@ -95,14 +95,12 @@ def enhanced_deployment_create_error(e, app) org_error_msg = org_error_msg_1 + org_error_msg_2 error_message = e.message - # rubocop:disable Style/ArrayIntersect -- e.message is a String, not an Array + # -- e.message is a String, not an Array if space_quota_errors.any? { |substring| e.message.include?(substring) } error_message += space_error_msg elsif org_quota_errors.any? { |substring| e.message.include?(substring) } error_message += org_error_msg end - # rubocop:enable Style/ArrayIntersect - error = DeploymentCreate::Error.new(error_message) error.set_backtrace(e.backtrace) error diff --git a/app/models/runtime/helpers/organization_role_mixin.rb b/app/models/runtime/helpers/organization_role_mixin.rb index fd81b8942b3..9184b709320 100644 --- a/app/models/runtime/helpers/organization_role_mixin.rb +++ b/app/models/runtime/helpers/organization_role_mixin.rb @@ -17,7 +17,7 @@ def around_save yield rescue Sequel::UniqueConstraintViolation => e unique_indexes = %w[org_users_idx org_auditors_idx org_managers_idx org_billing_managers_idx] - raise e unless unique_indexes.any? { |pattern| e.message.include?(pattern) } # rubocop:disable Style/ArrayIntersect -- e.message is a String, not an Array + raise e unless unique_indexes.any? { |pattern| e.message.include?(pattern) } # -- e.message is a String, not an Array errors.add(%i[organization_id user_id], :unique) raise validation_failed_error diff --git a/app/models/runtime/helpers/space_role_mixin.rb b/app/models/runtime/helpers/space_role_mixin.rb index bb1a3205ae0..49871a39106 100644 --- a/app/models/runtime/helpers/space_role_mixin.rb +++ b/app/models/runtime/helpers/space_role_mixin.rb @@ -17,7 +17,7 @@ def around_save yield rescue Sequel::UniqueConstraintViolation => e unique_indexes = %w[space_developers_idx space_auditors_idx space_managers_idx spaces_supporters_user_space_index] - raise e unless unique_indexes.any? { |pattern| e.message.include?(pattern) } # rubocop:disable Style/ArrayIntersect -- e.message is a String, not an Array + raise e unless unique_indexes.any? { |pattern| e.message.include?(pattern) } # -- e.message is a String, not an Array errors.add(%i[space_id user_id], :unique) raise validation_failed_error diff --git a/lib/sequel_plugins/vcap_relations.rb b/lib/sequel_plugins/vcap_relations.rb index 7ab769f02c2..89b3994f059 100644 --- a/lib/sequel_plugins/vcap_relations.rb +++ b/lib/sequel_plugins/vcap_relations.rb @@ -73,7 +73,7 @@ def many_to_many(name, opts={}) end rescue Sequel::UniqueConstraintViolation => e # ignore the error and rollback the inner transaction - raise Sequel::Rollback if opts[:ignored_unique_constraint_violation_errors]&.any? { |pattern| e.message.include?(pattern) } # rubocop:disable Style/ArrayIntersect -- e.message is a String, not an Array + raise Sequel::Rollback if opts[:ignored_unique_constraint_violation_errors]&.any? { |pattern| e.message.include?(pattern) } # -- e.message is a String, not an Array raise e end diff --git a/middleware/below_min_cli_warning.rb b/middleware/below_min_cli_warning.rb index 1c376fb0f32..85f70d2da94 100644 --- a/middleware/below_min_cli_warning.rb +++ b/middleware/below_min_cli_warning.rb @@ -11,7 +11,7 @@ def call(env) included_endpoints = %w[/v3/spaces /v3/organizations /v2/spaces /v2/organizations] - if included_endpoints.any? { |ep| env['REQUEST_PATH'].include?(ep) } && is_below_min_cli_version?(env['HTTP_USER_AGENT']) # rubocop:disable Style/ArrayIntersect -- env['REQUEST_PATH'] is a String, not an Array + if included_endpoints.any? { |ep| env['REQUEST_PATH'].include?(ep) } && is_below_min_cli_version?(env['HTTP_USER_AGENT']) # -- env['REQUEST_PATH'] is a String, not an Array # Ensure existing warnings are appended by ',' (unicode %2C) new_warning = env['X-Cf-Warnings'].nil? ? escaped_warning : "#{env['X-Cf-Warnings']}%2C#{escaped_warning}" headers['X-Cf-Warnings'] = new_warning diff --git a/middleware/cef_logs.rb b/middleware/cef_logs.rb index 702b5f6c01c..2546475230a 100644 --- a/middleware/cef_logs.rb +++ b/middleware/cef_logs.rb @@ -36,7 +36,7 @@ def call(env) "cs2Label=vcapRequestId cs2=#{escape_extension(env['cf.request_id'])} " \ "cs3Label=result cs3=#{get_result(status)} " \ "cs4Label=httpStatusCode cs4=#{status} " \ - "cs5Label=xForwardedFor cs5=#{escape_extension(request.headers['HTTP_X_FORWARDED_FOR'])}" \ + "cs5Label=xForwardedFor cs5=#{escape_extension(request.headers['HTTP_X_FORWARDED_FOR'])}" ) [status, headers, body] diff --git a/spec/unit/lib/services/service_brokers/v2/schema_spec.rb b/spec/unit/lib/services/service_brokers/v2/schema_spec.rb index ecb1abec018..aff6ed654e2 100644 --- a/spec/unit/lib/services/service_brokers/v2/schema_spec.rb +++ b/spec/unit/lib/services/service_brokers/v2/schema_spec.rb @@ -73,7 +73,7 @@ module VCAP::Services::ServiceBrokers::V2 it 'add a schema error message with a wrapped error' do expect(schema.validate).to be false expect(schema.errors.full_messages.length).to eq 1 - expect(schema.errors.full_messages.first).to eq 'Must conform to JSON Schema Draft 04 (experimental support for later versions): whoops' \ + expect(schema.errors.full_messages.first).to eq 'Must conform to JSON Schema Draft 04 (experimental support for later versions): whoops' end end