From 30712e69208d36d41df161eb55bd7cb57e43d709 Mon Sep 17 00:00:00 2001 From: Jenkins Date: Mon, 8 Jan 2024 02:40:38 -0800 Subject: [PATCH 1/3] Update Ruby dependencies --- Gemfile.lock | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 9477b6cf..db2d04ff 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -85,7 +85,7 @@ GEM aws-partitions (~> 1, >= 1.651.0) aws-sigv4 (~> 1.8) jmespath (~> 1, >= 1.6.1) - aws-sdk-kms (1.75.0) + aws-sdk-kms (1.76.0) aws-sdk-core (~> 3, >= 3.188.0) aws-sigv4 (~> 1.1) aws-sdk-s3 (1.142.0) @@ -95,6 +95,7 @@ GEM aws-sigv4 (1.8.0) aws-eventstream (~> 1, >= 1.0.2) base64 (0.2.0) + bigdecimal (3.1.5) builder (3.2.4) bundler-audit (0.9.1) bundler (>= 1.2.0, < 3) @@ -191,7 +192,8 @@ GEM dry-logic (>= 1.4, < 2) dry-types (>= 1.7, < 2) zeitwerk (~> 2.6) - dry-types (1.7.1) + dry-types (1.7.2) + bigdecimal (~> 3.0) concurrent-ruby (~> 1.0) dry-core (~> 1.0) dry-inflector (~> 1.0) @@ -266,7 +268,7 @@ GEM nokogiri nokogiri-happymapper mutex_m (0.2.0) - net-imap (0.4.9) + net-imap (0.4.9.1) date net-protocol net-pop (0.1.2) @@ -275,7 +277,7 @@ GEM timeout net-scp (4.0.0) net-ssh (>= 2.6.5, < 8.0.0) - net-smtp (0.4.0) + net-smtp (0.4.0.1) net-protocol net-ssh (7.2.1) nio4r (2.7.0) @@ -283,12 +285,12 @@ GEM racc (~> 1.4) nokogiri (1.16.0-x86_64-linux) racc (~> 1.4) - nokogiri-happymapper (0.9.0) + nokogiri-happymapper (0.10.0) nokogiri (~> 1.5) okcomputer (1.18.5) openapi_parser (1.0.0) parallel (1.24.0) - parser (3.2.2.4) + parser (3.3.0.2) ast (~> 2.4.1) racc pg (1.5.4) @@ -308,7 +310,7 @@ GEM psych (5.1.2) stringio public_suffix (5.0.4) - puma (6.4.1) + puma (6.4.2) nio4r (~> 2.0) racc (1.7.3) rack (2.2.8) @@ -359,7 +361,7 @@ GEM redis-client (0.19.1) connection_pool regexp_parser (2.8.3) - reline (0.4.1) + reline (0.4.2) io-console (~> 0.5) request_store (1.5.1) rack (>= 1.4) @@ -398,14 +400,14 @@ GEM parser (>= 3.2.1.0) rubocop-capybara (2.20.0) rubocop (~> 1.41) - rubocop-factory_bot (2.24.0) - rubocop (~> 1.33) + rubocop-factory_bot (2.25.1) + rubocop (~> 1.41) rubocop-rails (2.23.1) activesupport (>= 4.2.0) rack (>= 1.1) rubocop (>= 1.33.0, < 2.0) rubocop-ast (>= 1.30.0, < 2.0) - rubocop-rspec (2.25.0) + rubocop-rspec (2.26.1) rubocop (~> 1.40) rubocop-capybara (~> 2.17) rubocop-factory_bot (~> 2.22) @@ -442,7 +444,7 @@ GEM tzinfo (2.0.6) concurrent-ruby (~> 1.0) unicode-display_width (2.5.0) - view_component (3.8.0) + view_component (3.9.0) activesupport (>= 5.2.0, < 8.0) concurrent-ruby (~> 1.0) method_source (~> 1.0) From fc37c3b0595cf98576f42cb90261e0830037d06e Mon Sep 17 00:00:00 2001 From: Johnathan Martin Date: Mon, 8 Jan 2024 11:16:14 -0800 Subject: [PATCH 2/3] fix lint identified by new rubocop rspec rules --- spec/models/moab_record_spec.rb | 2 +- spec/services/audit/checksum_validator_utils_spec.rb | 2 +- spec/services/catalog_utils_spec.rb | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/models/moab_record_spec.rb b/spec/models/moab_record_spec.rb index 7038aa98..0655a32f 100644 --- a/spec/models/moab_record_spec.rb +++ b/spec/models/moab_record_spec.rb @@ -46,7 +46,7 @@ .to raise_error(ArgumentError, "'INVALID_MOAB' is not a valid status") end - it 'will accept a symbol, but will always return a string' do + it 'accepts a symbol, but will always return a string' do expect(described_class.new(status: :invalid_moab).status).to eq 'invalid_moab' end end diff --git a/spec/services/audit/checksum_validator_utils_spec.rb b/spec/services/audit/checksum_validator_utils_spec.rb index 4127122d..6ba2d544 100644 --- a/spec/services/audit/checksum_validator_utils_spec.rb +++ b/spec/services/audit/checksum_validator_utils_spec.rb @@ -85,7 +85,7 @@ end context 'when there are no MoabRecords to check' do - it 'will not create an instance of ChecksumValidator' do + it 'does not create an instance of ChecksumValidator' do expect(Audit::ChecksumValidationJob).not_to receive(:perform_later) described_class.validate_status_root('ok', root_name) end diff --git a/spec/services/catalog_utils_spec.rb b/spec/services/catalog_utils_spec.rb index 46d3804a..b2f944cf 100644 --- a/spec/services/catalog_utils_spec.rb +++ b/spec/services/catalog_utils_spec.rb @@ -172,7 +172,7 @@ expect(described_class.populate_catalog_for_dir(storage_dir).count).to eq 3 end - it 'will not ingest a MoabRecord for a druid that has already been cataloged' do + it 'does not create a new MoabRecord for a druid that has already been cataloged' do expect(MoabRecord.by_druid(druid).count).to eq 0 expect(described_class.populate_catalog_for_dir(storage_dir).count).to eq 3 expect(MoabRecord.by_druid(druid).count).to eq 1 @@ -194,7 +194,7 @@ describe '.populate_moab_storage_root' do before { described_class.populate_catalog_for_all_storage_roots } - it "won't change objects in a fully seeded db" do + it "doesn't change objects in a fully seeded db" do expect { described_class.populate_moab_storage_root('fixture_sr1') }.not_to change(MoabRecord, :count).from(17) expect(PreservedObject.count).to eq 17 end From 14581890fae3a9ff9700ed3edb865ea57fd24446 Mon Sep 17 00:00:00 2001 From: Johnathan Martin Date: Mon, 8 Jan 2024 11:17:06 -0800 Subject: [PATCH 3/3] add new rubocop rules --- .rubocop.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/.rubocop.yml b/.rubocop.yml index 589b851d..cfdd3905 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -616,3 +616,30 @@ RSpec/SpecFilePathFormat: # new in 2.24 Enabled: true RSpec/SpecFilePathSuffix: # new in 2.24 Enabled: true + +Lint/ItWithoutArgumentsInBlock: # new in 1.59 + Enabled: true +Lint/LiteralAssignmentInCondition: # new in 1.58 + Enabled: true +Style/SingleLineDoEndBlock: # new in 1.57 + Enabled: true +Style/SuperWithArgsParentheses: # new in 1.58 + Enabled: true +Rails/EnvLocal: # new in 2.22 + Enabled: true +Capybara/ClickLinkOrButtonStyle: # new in 2.19 + Enabled: true +Capybara/RedundantWithinFind: # new in 2.20 + Enabled: true +Capybara/RSpec/HaveSelector: # new in 2.19 + Enabled: true +Capybara/RSpec/PredicateMatcher: # new in 2.19 + Enabled: true +FactoryBot/ExcessiveCreateList: # new in 2.25 + Enabled: true +FactoryBot/IdSequence: # new in 2.24 + Enabled: true +RSpec/RedundantPredicateMatcher: # new in 2.26 + Enabled: true +RSpec/RemoveConst: # new in 2.26 + Enabled: true