Skip to content

Commit

Permalink
Bump rubocop from 1.69.2 to 1.70.0 (#20225)
Browse files Browse the repository at this point in the history
* 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]>

* RuboCop Auto-Correct: Style/MultipleComparison

* RuboCop Auto-Correct: Style/SymbolArray

* RuboCop Auto-Correct: Style/WordArray

* RuboCop Auto-Correct: Style/RedundantParentheses

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Lindsey Hattamer <[email protected]>
Co-authored-by: Eric Boehs <[email protected]>
  • Loading branch information
3 people authored Jan 10, 2025
1 parent 4f29626 commit db83484
Show file tree
Hide file tree
Showing 12 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -952,7 +952,7 @@ GEM
actionpack (>= 5.2, < 8.1)
railties (>= 5.2, < 8.1)
rtesseract (3.1.3)
rubocop (1.69.2)
rubocop (1.70.0)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class VirtualAgentClaimStatusController < ApplicationController
include IgnoreNotFound
service_tag 'virtual-agent'
rescue_from 'EVSS::ErrorMiddleware::EVSSError', with: :service_exception_handler
unless Settings.vsp_environment.downcase == 'localhost' || Settings.vsp_environment.downcase == 'development'
unless %w[localhost development].include?(Settings.vsp_environment.downcase)
before_action { authorize :lighthouse, :access? }
end

Expand Down
2 changes: 1 addition & 1 deletion app/models/expiry_scanner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def self.scan_certs
messages = ["Vets-Api #{Settings.vsp_environment} - SSL certificate scan result"]
cert_paths = Dir.glob(directories)
cert_paths.each do |cert_path|
if File.extname(cert_path) == '.pem' || File.extname(cert_path) == '.crt'
if ['.pem', '.crt'].include?(File.extname(cert_path))
message = define_expiry_urgency(cert_path)
if message.present?
messages << message
Expand Down
2 changes: 1 addition & 1 deletion app/models/va_profile_redis/veteran_status.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def title38_status
# @return [Boolean]
#
def military_person?
title38_status == 'V3' || title38_status == 'V6'
%w[V3 V6].include?(title38_status)
end

def status
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def build_statsd_keys

keys << "#{STATSD_KEY_PREFIX}.#{added_from_type}.#{added_type}.added"

if added_from_type == MHV_TYPE || added_from_type == DSLOGON_TYPE
if [MHV_TYPE, DSLOGON_TYPE].include?(added_from_type)
keys << "#{STATSD_KEY_PREFIX}.#{MHV_TYPE}_#{DSLOGON_TYPE}.#{added_type}.added"
end

Expand Down
2 changes: 1 addition & 1 deletion app/services/login/user_verifier.rb
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def backing_idme_uuid
end

def type_with_backing_idme_uuid
type == MHV_TYPE || type == DSLOGON_TYPE
[MHV_TYPE, DSLOGON_TYPE].include?(type)
end

def type
Expand Down
2 changes: 1 addition & 1 deletion app/services/sign_in/user_loader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def multifactor
end

def idme_or_logingov_service
sign_in[:service_name] == Constants::Auth::IDME || sign_in[:service_name] == Constants::Auth::LOGINGOV
[Constants::Auth::IDME, Constants::Auth::LOGINGOV].include?(sign_in[:service_name])
end

def user_is_verified?
Expand Down
2 changes: 1 addition & 1 deletion app/sidekiq/education_form/education_facility.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def self.region_for(model)
address = routing_address(record, form_type: model.form_type)

# special case 0993 and 1990s
return :western if model.form_type == '0993' || model.form_type == '1990s'
return :western if %w[0993 1990s].include?(model.form_type)

# special case 0994
# special case 10203
Expand Down
2 changes: 1 addition & 1 deletion lib/sidekiq/form526_backup_submission_process/processor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def instantiate_upload_info_from_lighthouse

def evidence_526_split
is_526_or_evidence = docs.group_by do |doc|
doc[:type] == FORM_526_DOC_TYPE || doc[:type] == FORM_526_UPLOADS_DOC_TYPE
[FORM_526_DOC_TYPE, FORM_526_UPLOADS_DOC_TYPE].include?(doc[:type])
end
[is_526_or_evidence[true], is_526_or_evidence[false]]
end
Expand Down
2 changes: 1 addition & 1 deletion lib/va_profile/veteran_status/service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def title38_status
# @return [Boolean]
#
def military_person?
title38_status == 'V3' || title38_status == 'V6'
%w[V3 V6].include?(title38_status)
end

# VA Profile endpoints use the OID (Organizational Identifier), the EDIPI,
Expand Down
2 changes: 1 addition & 1 deletion modules/ivc_champva/spec/models/vha_10_10d_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@

it 'returns stamps for all applicants' do
stamps = vha1010d_with_multiple_applicants.desired_stamps
expect(stamps.count { |stamp| stamp[:text] == 'Canada' || stamp[:text] == 'Mexico' }).to eq(2)
expect(stamps.count { |stamp| %w[Canada Mexico].include?(stamp[:text]) }).to eq(2)
expect(stamps).to include(
hash_including(coords: [520, 470], text: 'Canada', page: 0),
hash_including(coords: [520, 354], text: 'Mexico', page: 0)
Expand Down
6 changes: 3 additions & 3 deletions spec/rswag_override.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def stop(_notification = nil)
v.each_pair do |_verb, value|
is_hash = value.is_a?(Hash)
if is_hash && value[:parameters]
schema_param = value[:parameters]&.find { |p| (p[:in] == :body || p[:in] == :formData) && p[:schema] }
schema_param = value[:parameters]&.find { |p| %i[body formData].include?(p[:in]) && p[:schema] }
mime_list = value[:consumes] || doc[:consumes]
if value && schema_param && mime_list
value[:requestBody] = { content: {} } unless value.dig(:requestBody, :content)
Expand All @@ -51,7 +51,7 @@ def stop(_notification = nil)
end
end

value[:parameters].reject! { |p| p[:in] == :body || p[:in] == :formData }
value[:parameters].reject! { |p| %i[body formData].include?(p[:in]) }
end
remove_invalid_operation_keys!(value)
end
Expand All @@ -74,7 +74,7 @@ def stop(_notification = nil)
private # Added methods

def request_examples(value)
examples = value[:parameters]&.find { |p| (p[:in] == :body || p[:in] == :formData) && p[:examples] }
examples = value[:parameters]&.find { |p| %i[body formData].include?(p[:in]) && p[:examples] }
if examples && examples[:examples]
{ examples: examples[:examples] }
else
Expand Down

0 comments on commit db83484

Please sign in to comment.