Skip to content

Commit

Permalink
build(deps-dev): bump rubocop from 1.69.2 to 1.70.0 (#4167)
Browse files Browse the repository at this point in the history
* build(deps-dev): bump rubocop from 1.69.2 to 1.70.0

Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.69.2 to 1.70.0.
- [Release notes](https://github.com/rubocop/rubocop/releases)
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md)
- [Commits](rubocop/rubocop@v1.69.2...v1.70.0)

---
updated-dependencies:
- dependency-name: rubocop
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Fix rubocop 1.70 errors

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: M. Oleske <[email protected]>
  • Loading branch information
dependabot[bot] and moleske authored Jan 11, 2025
1 parent a2a3c65 commit b536c96
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ group :test do
gem 'rspec-its'
gem 'rspec-rails', '~> 7.1.0'
gem 'rspec-wait'
gem 'rubocop', '~> 1.69.2'
gem 'rubocop', '~> 1.70.0'
gem 'rubocop-capybara'
gem 'rubocop-factory_bot'
gem 'rubocop-rails', '~> 2.28'
Expand Down
6 changes: 3 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ GEM
activesupport (>= 3.0.0)
mustache (~> 1.0, >= 0.99.4)
rspec (~> 3.0)
rubocop (1.69.2)
rubocop (1.70.0)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
Expand Down Expand Up @@ -560,7 +560,7 @@ GEM
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
uber (0.1.0)
unicode-display_width (3.1.2)
unicode-display_width (3.1.3)
unicode-emoji (~> 4.0, >= 4.0.4)
unicode-emoji (4.0.4)
useragent (0.16.10)
Expand Down Expand Up @@ -647,7 +647,7 @@ DEPENDENCIES
rspec-rails (~> 7.1.0)
rspec-wait
rspec_api_documentation (>= 6.1.0)
rubocop (~> 1.69.2)
rubocop (~> 1.70.0)
rubocop-capybara
rubocop-factory_bot
rubocop-rails (~> 2.28)
Expand Down
2 changes: 1 addition & 1 deletion app/actions/task_cancel.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def cancel(task:, user_audit_info:)
attr_reader :config

def reject_invalid_states!(task)
return unless task.state == TaskModel::SUCCEEDED_STATE || task.state == TaskModel::FAILED_STATE
return unless [TaskModel::SUCCEEDED_STATE, TaskModel::FAILED_STATE].include?(task.state)

raise InvalidCancel.new("Task state is #{task.state} and therefore cannot be canceled")
end
Expand Down
2 changes: 1 addition & 1 deletion app/messages/app_manifest_message.rb
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ def convert_to_bytes_per_second(human_readable_byte_value)
end

def validate_byte_format(human_readable_byte_value, attribute_name, allow_unlimited: false)
byte_converter.convert_to_mb(human_readable_byte_value) unless allow_unlimited && (human_readable_byte_value.to_s == '-1' || human_readable_byte_value.to_s == '0')
byte_converter.convert_to_mb(human_readable_byte_value) unless allow_unlimited && ['-1', '0'].include?(human_readable_byte_value.to_s)

nil
rescue ByteConverter::InvalidUnitsError
Expand Down
4 changes: 1 addition & 3 deletions lib/cloud_controller/diego/task_environment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ def build

task_env = task_env.merge('VCAP_PLATFORM_OPTIONS' => credhub_url) if credhub_url.present? && cred_interpolation_enabled?

if app.lifecycle_type == BuildpackLifecycleDataModel::LIFECYCLE_TYPE || app.lifecycle_type == CNBLifecycleDataModel::LIFECYCLE_TYPE
task_env = task_env.merge('LANG' => DEFAULT_LANG)
end
task_env = task_env.merge('LANG' => DEFAULT_LANG) if [BuildpackLifecycleDataModel::LIFECYCLE_TYPE, CNBLifecycleDataModel::LIFECYCLE_TYPE].include?(app.lifecycle_type)
task_env = task_env.merge('DATABASE_URL' => app.database_uri) if app.database_uri

task_env
Expand Down
2 changes: 1 addition & 1 deletion lib/cloud_controller/diego/tasks_sync.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def diego_task_missing?(task_guid)

def task_finished_while_iterating?(task_guid)
cc_task = TaskModel.find(guid: task_guid)
cc_task.state == TaskModel::FAILED_STATE || cc_task.state == TaskModel::SUCCEEDED_STATE
[TaskModel::FAILED_STATE, TaskModel::SUCCEEDED_STATE].include?(cc_task.state)
end

def batched_cc_tasks
Expand Down
2 changes: 1 addition & 1 deletion spec/unit/lib/vcap/rest_api/query_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ class Subscriber < Sequel::Model
@queryable_attributes, q:)

expected = Author.all.select do |a|
a.str_val == 'str 1' || a.str_val == 'str 2'
['str 1', 'str 2'].include?(a.str_val)
end

expect(ds.all).to match_array(expected)
Expand Down

0 comments on commit b536c96

Please sign in to comment.