Skip to content

Commit b536c96

Browse files
build(deps-dev): bump rubocop from 1.69.2 to 1.70.0 (#4167)
* 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]>
1 parent a2a3c65 commit b536c96

File tree

7 files changed

+9
-11
lines changed

7 files changed

+9
-11
lines changed

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ group :test do
8383
gem 'rspec-its'
8484
gem 'rspec-rails', '~> 7.1.0'
8585
gem 'rspec-wait'
86-
gem 'rubocop', '~> 1.69.2'
86+
gem 'rubocop', '~> 1.70.0'
8787
gem 'rubocop-capybara'
8888
gem 'rubocop-factory_bot'
8989
gem 'rubocop-rails', '~> 2.28'

Gemfile.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ GEM
458458
activesupport (>= 3.0.0)
459459
mustache (~> 1.0, >= 0.99.4)
460460
rspec (~> 3.0)
461-
rubocop (1.69.2)
461+
rubocop (1.70.0)
462462
json (~> 2.3)
463463
language_server-protocol (>= 3.17.0)
464464
parallel (~> 1.10)
@@ -560,7 +560,7 @@ GEM
560560
tzinfo (2.0.6)
561561
concurrent-ruby (~> 1.0)
562562
uber (0.1.0)
563-
unicode-display_width (3.1.2)
563+
unicode-display_width (3.1.3)
564564
unicode-emoji (~> 4.0, >= 4.0.4)
565565
unicode-emoji (4.0.4)
566566
useragent (0.16.10)
@@ -647,7 +647,7 @@ DEPENDENCIES
647647
rspec-rails (~> 7.1.0)
648648
rspec-wait
649649
rspec_api_documentation (>= 6.1.0)
650-
rubocop (~> 1.69.2)
650+
rubocop (~> 1.70.0)
651651
rubocop-capybara
652652
rubocop-factory_bot
653653
rubocop-rails (~> 2.28)

app/actions/task_cancel.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def cancel(task:, user_audit_info:)
2626
attr_reader :config
2727

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

3131
raise InvalidCancel.new("Task state is #{task.state} and therefore cannot be canceled")
3232
end

app/messages/app_manifest_message.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ def convert_to_bytes_per_second(human_readable_byte_value)
347347
end
348348

349349
def validate_byte_format(human_readable_byte_value, attribute_name, allow_unlimited: false)
350-
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')
350+
byte_converter.convert_to_mb(human_readable_byte_value) unless allow_unlimited && ['-1', '0'].include?(human_readable_byte_value.to_s)
351351

352352
nil
353353
rescue ByteConverter::InvalidUnitsError

lib/cloud_controller/diego/task_environment.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@ def build
2323

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

26-
if app.lifecycle_type == BuildpackLifecycleDataModel::LIFECYCLE_TYPE || app.lifecycle_type == CNBLifecycleDataModel::LIFECYCLE_TYPE
27-
task_env = task_env.merge('LANG' => DEFAULT_LANG)
28-
end
26+
task_env = task_env.merge('LANG' => DEFAULT_LANG) if [BuildpackLifecycleDataModel::LIFECYCLE_TYPE, CNBLifecycleDataModel::LIFECYCLE_TYPE].include?(app.lifecycle_type)
2927
task_env = task_env.merge('DATABASE_URL' => app.database_uri) if app.database_uri
3028

3129
task_env

lib/cloud_controller/diego/tasks_sync.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def diego_task_missing?(task_guid)
9191

9292
def task_finished_while_iterating?(task_guid)
9393
cc_task = TaskModel.find(guid: task_guid)
94-
cc_task.state == TaskModel::FAILED_STATE || cc_task.state == TaskModel::SUCCEEDED_STATE
94+
[TaskModel::FAILED_STATE, TaskModel::SUCCEEDED_STATE].include?(cc_task.state)
9595
end
9696

9797
def batched_cc_tasks

spec/unit/lib/vcap/rest_api/query_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ class Subscriber < Sequel::Model
447447
@queryable_attributes, q:)
448448

449449
expected = Author.all.select do |a|
450-
a.str_val == 'str 1' || a.str_val == 'str 2'
450+
['str 1', 'str 2'].include?(a.str_val)
451451
end
452452

453453
expect(ds.all).to match_array(expected)

0 commit comments

Comments
 (0)