From 6cf84cbbb14671a992507040f5407f3f67fa44ac Mon Sep 17 00:00:00 2001 From: Peter Postma Date: Fri, 5 Jan 2024 12:09:23 +0100 Subject: [PATCH] Update RuboCop gems. --- .rubocop.yml | 12 +--- Gemfile | 2 +- Gemfile.lock | 71 +++++++++++-------- .../payment_requests_subscription_spec.rb | 2 +- .../api/resources/payment_requests_spec.rb | 2 +- spec/tikkie/api/resources/payment_spec.rb | 2 +- spec/tikkie/api/resources/refund_spec.rb | 4 +- spec/tikkie/notification_spec.rb | 6 +- 8 files changed, 52 insertions(+), 49 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index aa24ddb..bce39a6 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -13,18 +13,15 @@ AllCops: - 'spec/tikkie/api/v1/**/*' - 'vendor/**/*' +Gemspec/DevelopmentDependencies: + Enabled: false Layout/LineLength: Enabled: false - Metrics/AbcSize: Max: 50 -Metrics/BlockLength: - Exclude: - - 'spec/**/*' - Metrics/CyclomaticComplexity: Max: 11 @@ -34,16 +31,11 @@ Metrics/MethodLength: Metrics/PerceivedComplexity: Max: 10 - -RSpec/FactoryBot: - Enabled: false - RSpec/ExampleLength: Max: 12 RSpec/MultipleExpectations: Max: 8 - Style/SafeNavigation: Enabled: false diff --git a/Gemfile b/Gemfile index 3bf11d1..22a5981 100644 --- a/Gemfile +++ b/Gemfile @@ -7,7 +7,7 @@ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" } # Specify your gem's dependencies in tikkie-api.gemspec gemspec -gem 'rubocop', '~> 1.12.0' +gem 'rubocop' gem 'rubocop-performance' gem 'rubocop-rake' gem 'rubocop-rspec' diff --git a/Gemfile.lock b/Gemfile.lock index e1a1f3d..364eaff 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -6,22 +6,26 @@ PATH GEM remote: https://rubygems.org/ specs: - addressable (2.8.4) + addressable (2.8.6) public_suffix (>= 2.0.2, < 6.0) ast (2.4.2) crack (0.4.5) rexml diff-lcs (1.5.0) - hashdiff (1.0.1) - jwt (2.2.2) - parallel (1.20.1) - parser (3.2.2.1) + hashdiff (1.1.0) + json (2.7.1) + jwt (2.7.1) + language_server-protocol (3.17.0.3) + parallel (1.24.0) + parser (3.2.2.4) ast (~> 2.4.1) - public_suffix (4.0.7) + racc + public_suffix (5.0.4) + racc (1.7.3) rainbow (3.1.1) - rake (13.0.1) - regexp_parser (2.8.0) - rexml (3.2.5) + rake (13.1.0) + regexp_parser (2.8.3) + rexml (3.2.6) rspec (3.12.0) rspec-core (~> 3.12.0) rspec-expectations (~> 3.12.0) @@ -31,33 +35,40 @@ GEM rspec-expectations (3.12.3) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) - rspec-mocks (3.12.5) + rspec-mocks (3.12.6) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) - rspec-support (3.12.0) - rubocop (1.12.1) + rspec-support (3.12.1) + rubocop (1.59.0) + json (~> 2.3) + language_server-protocol (>= 3.17.0) parallel (~> 1.10) - parser (>= 3.0.0.0) + parser (>= 3.2.2.4) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) - rexml - rubocop-ast (>= 1.2.0, < 2.0) + rexml (>= 3.2.5, < 4.0) + rubocop-ast (>= 1.30.0, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 1.4.0, < 3.0) - rubocop-ast (1.4.1) - parser (>= 2.7.1.5) - rubocop-performance (1.10.2) - rubocop (>= 0.90.0, < 2.0) - rubocop-ast (>= 0.4.0) - rubocop-rake (0.5.1) - rubocop - rubocop-rspec (2.2.0) + unicode-display_width (>= 2.4.0, < 3.0) + rubocop-ast (1.30.0) + parser (>= 3.2.1.0) + rubocop-capybara (2.20.0) + rubocop (~> 1.41) + rubocop-factory_bot (2.25.0) + rubocop (~> 1.33) + rubocop-performance (1.20.1) + rubocop (>= 1.48.1, < 2.0) + rubocop-ast (>= 1.30.0, < 2.0) + rubocop-rake (0.6.0) rubocop (~> 1.0) - rubocop-ast (>= 1.1.0) + rubocop-rspec (2.26.0) + rubocop (~> 1.40) + rubocop-capybara (~> 2.17) + rubocop-factory_bot (~> 2.22) ruby-progressbar (1.13.0) - timecop (0.9.6) - unicode-display_width (2.4.2) - webmock (3.18.1) + timecop (0.9.8) + unicode-display_width (2.5.0) + webmock (3.19.1) addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) @@ -70,7 +81,7 @@ DEPENDENCIES jwt (>= 1.0) rake (~> 13.0) rspec (~> 3.0) - rubocop (~> 1.12.0) + rubocop rubocop-performance rubocop-rake rubocop-rspec @@ -79,4 +90,4 @@ DEPENDENCIES webmock (~> 3.18) BUNDLED WITH - 2.2.19 + 2.1.4 diff --git a/spec/tikkie/api/clients/payment_requests_subscription_spec.rb b/spec/tikkie/api/clients/payment_requests_subscription_spec.rb index 4425da0..25d2c1a 100644 --- a/spec/tikkie/api/clients/payment_requests_subscription_spec.rb +++ b/spec/tikkie/api/clients/payment_requests_subscription_spec.rb @@ -25,7 +25,7 @@ stub_request(:delete, 'https://api.abnamro.com/v2/tikkie/paymentrequestssubscription').to_return(status: 204) payment_requests_subscription = client.delete - expect(payment_requests_subscription).to be nil + expect(payment_requests_subscription).to be_nil end end end diff --git a/spec/tikkie/api/resources/payment_requests_spec.rb b/spec/tikkie/api/resources/payment_requests_spec.rb index 8e90fe0..759d6e8 100644 --- a/spec/tikkie/api/resources/payment_requests_spec.rb +++ b/spec/tikkie/api/resources/payment_requests_spec.rb @@ -47,7 +47,7 @@ describe '#previous' do it 'returns nil when no previous page exists' do previous_page = resource.previous - expect(previous_page).to be nil + expect(previous_page).to be_nil end end end diff --git a/spec/tikkie/api/resources/payment_spec.rb b/spec/tikkie/api/resources/payment_spec.rb index eae50b8..9864c95 100644 --- a/spec/tikkie/api/resources/payment_spec.rb +++ b/spec/tikkie/api/resources/payment_spec.rb @@ -10,7 +10,7 @@ describe '#payment_request_token' do it 'returns the payment request token' do - expect(resource.payment_request_token).to be nil + expect(resource.payment_request_token).to be_nil end end diff --git a/spec/tikkie/api/resources/refund_spec.rb b/spec/tikkie/api/resources/refund_spec.rb index 1b9a8d1..35bed2e 100644 --- a/spec/tikkie/api/resources/refund_spec.rb +++ b/spec/tikkie/api/resources/refund_spec.rb @@ -10,13 +10,13 @@ describe '#payment_request_token' do it 'returns the payment request token' do - expect(resource.payment_request_token).to be nil + expect(resource.payment_request_token).to be_nil end end describe '#payment_token' do it 'returns the payment token' do - expect(resource.payment_token).to be nil + expect(resource.payment_token).to be_nil end end diff --git a/spec/tikkie/notification_spec.rb b/spec/tikkie/notification_spec.rb index 2652aee..e12c6c9 100644 --- a/spec/tikkie/notification_spec.rb +++ b/spec/tikkie/notification_spec.rb @@ -42,7 +42,7 @@ describe '.parse' do it 'ignores the notification and returns nil' do notification = described_class.parse(body) - expect(notification).to be nil + expect(notification).to be_nil end end end @@ -53,7 +53,7 @@ describe '.parse' do it 'ignores the notification and returns nil' do notification = described_class.parse(body) - expect(notification).to be nil + expect(notification).to be_nil end end end @@ -64,7 +64,7 @@ describe '.parse' do it 'ignores the notification and returns nil' do notification = described_class.parse(body) - expect(notification).to be nil + expect(notification).to be_nil end end end