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 @@ -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'
Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 1 addition & 3 deletions app/actions/deployment_create.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion app/models/runtime/helpers/organization_role_mixin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion app/models/runtime/helpers/space_role_mixin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/sequel_plugins/vcap_relations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion middleware/below_min_cli_warning.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion middleware/cef_logs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion spec/unit/lib/services/service_brokers/v2/schema_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Loading