Skip to content

Commit

Permalink
Bump rubocop-rails from 2.3.2 to 2.4.1 (#3702)
Browse files Browse the repository at this point in the history
* Bump rubocop-rails from 2.3.2 to 2.4.1

Bumps [rubocop-rails](https://github.com/rubocop-hq/rubocop-rails) from 2.3.2 to 2.4.1.
- [Release notes](https://github.com/rubocop-hq/rubocop-rails/releases)
- [Changelog](https://github.com/rubocop-hq/rubocop-rails/blob/master/CHANGELOG.md)
- [Commits](rubocop/rubocop-rails@v2.3.2...v2.4.1)

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

* fix rubocop Metrics/LineLength

* Bump ox from 2.8.2 to 2.12.0 (#3689)

* fix rake cops and ignore Rails/FilePath

Co-authored-by: Lindsey Hattamer <[email protected]>
Co-authored-by: Anna Carey <[email protected]>
  • Loading branch information
3 people committed Dec 30, 2019
1 parent 30d365a commit ee1c48a
Show file tree
Hide file tree
Showing 13 changed files with 31 additions and 25 deletions.
6 changes: 6 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
inherit_from: .rubocop_todo.yml

# in rakelib/lint.rake we require rubocop-thread_safety for the CI env only,
# because codeclimate does not support rubocop-thread_safety
require:
- rubocop-rails
- rubocop-rspec
Expand Down Expand Up @@ -321,3 +323,7 @@ RSpec/SubjectStub:
- 'spec/services/evss_claim_service_spec.rb'
- 'spec/services/mhv_accounts_service_spec.rb'
- 'spec/uploaders/evss_claim_document_uploader_spec.rb'

# the default style recently changed, but it's not worth changing
Rails/FilePath:
EnforcedStyle: arguments
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ GEM
activerecord (>= 4.2)
request_store (~> 1.1)
parallel (1.19.1)
parser (2.6.5.0)
parser (2.7.0.0)
ast (~> 2.4.0)
pdf-core (0.7.0)
pdf-forms (1.2.0)
Expand Down Expand Up @@ -598,7 +598,7 @@ GEM
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 1.7)
rubocop-junit-formatter (0.1.4)
rubocop-rails (2.3.2)
rubocop-rails (2.4.1)
rack (>= 1.1)
rubocop (>= 0.72.0)
rubocop-rspec (1.35.0)
Expand Down
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Rails.application.load_tasks

unless Rails.env.production?
require 'rspec/core/rake_task'
task(:spec).clear
task(spec: :environment).clear
RSpec::Core::RakeTask.new(:spec) do |t|
t.pattern = Dir.glob(['spec/**/*_spec.rb', 'modules/*/spec/**/*_spec.rb'])
t.verbose = false
Expand Down
4 changes: 2 additions & 2 deletions app/models/evss_claim_document.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class EVSSClaimDocument < Common::Base
validate :unencrypted_pdf?
before_validation :normalize_text

# rubocop:disable LineLength
# rubocop:disable Metrics/LineLength
DOCUMENT_TYPES = {
'L015' => 'Buddy/Lay Statement',
'L018' => 'Civilian Police Reports',
Expand Down Expand Up @@ -46,7 +46,7 @@ class EVSSClaimDocument < Common::Base
'L703' => 'Goldmann Perimetry Chart/Field Of Vision Chart',
'L827' => 'VA Form 21-4142a - General Release for Medical Provider Information'
}.freeze
# rubocop:enable LineLength
# rubocop:enable Metrics/LineLength

EVSS_TEXT_ENCODING = 'ascii' # EVSS only accepts text files written in ASCII
MINIMUM_ENCODING_CONFIDENCE = 0.5
Expand Down
4 changes: 2 additions & 2 deletions app/workers/education_form/forms/va5490.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module EducationForm::Forms
class VA5490 < Base
# rubocop:disable LineLength
# rubocop:disable Metrics/LineLength
PREVIOUS_BENEFITS = {
'disability' => 'DISABILITY COMPENSATION OR PENSION',
'dic' => "DEPENDENTS' INDEMNITY COMPENSATION",
Expand All @@ -11,7 +11,7 @@ class VA5490 < Base
'chapter33' => "VETERANS EDUCATION ASSISTANCE BASED ON SOMEONE ELSE'S SERVICE: CHAPTER 33 - POST-9/11 GI BILL MARINE GUNNERY SERGEANT DAVID FRY SCHOLARSHIP",
'transferOfEntitlement' => "VETERANS EDUCATION ASSISTANCE BASED ON SOMEONE ELSE'S SERVICE: TRANSFERRED ENTITLEMENT"
}.freeze
# rubocop:enable LineLength
# rubocop:enable Metrics/LineLength

HIGH_SCHOOL_STATUS = {
'graduated' => 'Graduated from high school',
Expand Down
4 changes: 2 additions & 2 deletions lib/hca/enrollment_system.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
require 'hca/validations'

module HCA
# rubocop:disable ModuleLength
# rubocop:disable Metrics/ModuleLength
module EnrollmentSystem
module_function

Expand Down Expand Up @@ -745,5 +745,5 @@ def veteran_to_save_submit_form(veteran, current_user)
request
end
end
# rubocop:enable ModuleLength
# rubocop:enable Metrics/ModuleLength
end
4 changes: 2 additions & 2 deletions lib/mvi/responses/profile_parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def parse

private

# rubocop:disable MethodLength
# rubocop:disable Metrics/MethodLength
def build_mvi_profile(patient)
name = parse_name(get_patient_name(patient))
full_mvi_ids = get_extensions(patient.locate('id'))
Expand Down Expand Up @@ -118,7 +118,7 @@ def build_mvi_profile(patient)
icn_with_aaid: parsed_mvi_ids[:icn_with_aaid]
)
end
# rubocop:enable MethodLength
# rubocop:enable Metrics/MethodLength

def get_extensions(id_array)
id_array.map do |id_object|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

RSpec.describe 'VBA Document SNS upload complete notification', type: :request do
context 'with a subscriptionconfirmation message type' do
# rubocop:disable LineLength
# rubocop:disable Metrics/LineLength
let(:headers) do
{
'x-amz-sns-message-type' => 'SubscriptionConfirmation',
Expand Down Expand Up @@ -36,7 +36,7 @@
'SigningCertURL' => 'https://sns.us-west-2.amazonaws.com/SimpleNotificationService-f3ecfb7224c7233fe7bb5f59f96de52f.pem'
}.to_json
end
# rubocop:enable LineLength
# rubocop:enable Metrics/LineLength

context 'verified message' do
it 'confirms the subscription' do
Expand Down Expand Up @@ -91,7 +91,7 @@
context 'with a notification message type' do
let(:upload) { FactoryBot.create(:upload_submission) }

# rubocop:disable LineLength
# rubocop:disable Metrics/LineLength
let(:headers) do
{
'x-amz-sns-message-type' => 'Notification',
Expand Down Expand Up @@ -120,7 +120,7 @@
'UnsubscribeURL' => 'https://sns.us-west-2.amazonaws.com/?Action=Unsubscribe&SubscriptionArn=arn:aws:sns:us-west-2:123456789012:MyTopic:2bcfbf39-05c3-41de-beaa-fcfcc21c8f55'
}.to_json
end
# rubocop:enable LineLength
# rubocop:enable Metrics/LineLength

context 'verified message' do
it 'queues a processor working on the uploaded object-key' do
Expand Down Expand Up @@ -176,7 +176,7 @@
end

context 'with any other message type' do
# rubocop:disable LineLength
# rubocop:disable Metrics/LineLength
let(:headers) do
{
'x-amz-sns-message-type' => 'OtherMessageType',
Expand Down Expand Up @@ -204,7 +204,7 @@
'SigningCertURL' => 'https://sns.us-west-2.amazonaws.com/SimpleNotificationService-f3ecfb7224c7233fe7bb5f59f96de52f.pem'
}.to_json
end
# rubocop:enable LineLength
# rubocop:enable Metrics/LineLength

it 'responds with a parameter missing error' do
with_settings(Settings.vba_documents.sns,
Expand Down
2 changes: 1 addition & 1 deletion rakelib/lint.rake
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ require 'open3'
require './rakelib/support/shell_command'

desc 'shortcut to run all linting tools, at the same time.'
task :lint do
task lint: :environment do
require 'rainbow'

opts = '-r rubocop-thread_safety '
Expand Down
4 changes: 2 additions & 2 deletions rakelib/mvi.rake
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ middle_name="W" last_name="Smith" birth_date="1945-01-25" gender="M" ssn="555443
end

desc "Given a ssn update a mocked user's correlation ids"
task :update_ids, [:environment] do
task update_ids: :environment do
ssn = ENV['ssn']
raise ArgumentError, 'ssn is required, usage: `rake mvi:update_ids ssn=111223333 icn=abc123`' unless ssn

Expand All @@ -148,7 +148,7 @@ middle_name="W" last_name="Smith" birth_date="1945-01-25" gender="M" ssn="555443
end

desc 'Create missing cache files from mock_mvi_responses.yml'
task :migrate_mock_data, [:environment] do
task migrate_mock_data: :environment do
yaml = YAML.safe_load(
File.read(File.join('config', 'mvi_schema', 'mock_mvi_responses.yml'))
)
Expand Down
2 changes: 1 addition & 1 deletion rakelib/security.rake
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ require 'open3'
require './rakelib/support/shell_command'

desc 'shortcut to run all linting tools, at the same time.'
task :security do
task security: :environment do
require 'rainbow'

puts 'running Brakeman security scan...'
Expand Down
4 changes: 2 additions & 2 deletions spec/jobs/education_form/forms/va5490_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@
end

it 'previous_benefits should return the right value' do
# rubocop:disable LineLength
# rubocop:disable Metrics/LineLength
expect(subject.previous_benefits).to eq("DISABILITY COMPENSATION OR PENSION\nDEPENDENTS' INDEMNITY COMPENSATION\nVOCATIONAL REHABILITATION BENEFITS (Chapter 31)\nVETERANS EDUCATION ASSISTANCE BASED ON SOMEONE ELSE'S SERVICE: CHAPTER 35 - SURVIVORS' AND DEPENDENTS' EDUCATIONAL ASSISTANCE PROGRAM (DEA)\nVETERANS EDUCATION ASSISTANCE BASED ON SOMEONE ELSE'S SERVICE: CHAPTER 33 - POST-9/11 GI BILL MARINE GUNNERY SERGEANT DAVID FRY SCHOLARSHIP\nVETERANS EDUCATION ASSISTANCE BASED ON SOMEONE ELSE'S SERVICE: TRANSFERRED ENTITLEMENT\nVETERANS EDUCATION ASSISTANCE BASED ON YOUR OWN SERVICE SPECIFY BENEFIT(S): foo\nOTHER; Specify benefit(s): other")
# rubocop:enable LineLength
# rubocop:enable Metrics/LineLength
end

it 'previously_applied_for_benefits? should return true' do
Expand Down
4 changes: 2 additions & 2 deletions spec/lib/string_helpers_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@
end

context 'heuristics' do
# rubocop:disable LineLength
# rubocop:disable Metrics/LineLength
fixtures = [
['319111111', '319111111', { length: [9, 9], only_digits: [true, true], encoding: %w[UTF-8 UTF-8], levenshtein_distance: 0 }],
['319121111', '319111111', { length: [9, 9], only_digits: [true, true], encoding: %w[UTF-8 UTF-8], levenshtein_distance: 1 }],
['319-11-1111', '319111111', { length: [11, 9], only_digits: [false, true], encoding: %w[UTF-8 UTF-8], levenshtein_distance: 2 }],
['319-11-1111', '319-11-1111', { length: [11, 11], only_digits: [false, false], encoding: %w[UTF-8 UTF-8], levenshtein_distance: 0 }]
]
# rubocop:enable LineLength
# rubocop:enable Metrics/LineLength

fixtures.each do |w1, w2, heuristic_hash|
it "returns heuristics hash #{heuristic_hash}" do
Expand Down

0 comments on commit ee1c48a

Please sign in to comment.