From a3d94c8e5f3015e4caba3bd2b78529c358aab681 Mon Sep 17 00:00:00 2001 From: Tim Wright Date: Tue, 14 Oct 2025 17:29:13 +1300 Subject: [PATCH 1/4] update to rails 7.2 --- Gemfile.lock | 158 ++++++++++++++++++++--------------------- supplejack_api.gemspec | 5 +- 2 files changed, 82 insertions(+), 81 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index db16c4ac..091d82aa 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -27,8 +27,10 @@ PATH supplejack_api (1) active_model_serializers activemodel-serializers-xml + activerecord (~> 7.2.2.2) activeresource activeresource-response + activesupport (~> 7.2.2.2) concurrent-ruby (= 1.3.4) dalli devise @@ -43,7 +45,8 @@ PATH mongoid_auto_increment progressbar pundit (~> 2.1) - rails (~> 7.1.0) + rack (~> 2.2.4) + rails (~> 7.2.2.2) responders rest-client rufus-scheduler @@ -58,51 +61,46 @@ PATH GEM remote: https://rubygems.org/ specs: - actioncable (7.1.5.2) - actionpack (= 7.1.5.2) - activesupport (= 7.1.5.2) + actioncable (7.2.2.2) + actionpack (= 7.2.2.2) + activesupport (= 7.2.2.2) nio4r (~> 2.0) websocket-driver (>= 0.6.1) zeitwerk (~> 2.6) - actionmailbox (7.1.5.2) - actionpack (= 7.1.5.2) - activejob (= 7.1.5.2) - activerecord (= 7.1.5.2) - activestorage (= 7.1.5.2) - activesupport (= 7.1.5.2) - mail (>= 2.7.1) - net-imap - net-pop - net-smtp - actionmailer (7.1.5.2) - actionpack (= 7.1.5.2) - actionview (= 7.1.5.2) - activejob (= 7.1.5.2) - activesupport (= 7.1.5.2) - mail (~> 2.5, >= 2.5.4) - net-imap - net-pop - net-smtp + actionmailbox (7.2.2.2) + actionpack (= 7.2.2.2) + activejob (= 7.2.2.2) + activerecord (= 7.2.2.2) + activestorage (= 7.2.2.2) + activesupport (= 7.2.2.2) + mail (>= 2.8.0) + actionmailer (7.2.2.2) + actionpack (= 7.2.2.2) + actionview (= 7.2.2.2) + activejob (= 7.2.2.2) + activesupport (= 7.2.2.2) + mail (>= 2.8.0) rails-dom-testing (~> 2.2) - actionpack (7.1.5.2) - actionview (= 7.1.5.2) - activesupport (= 7.1.5.2) + actionpack (7.2.2.2) + actionview (= 7.2.2.2) + activesupport (= 7.2.2.2) nokogiri (>= 1.8.5) racc - rack (>= 2.2.4) + rack (>= 2.2.4, < 3.2) rack-session (>= 1.0.1) rack-test (>= 0.6.3) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - actiontext (7.1.5.2) - actionpack (= 7.1.5.2) - activerecord (= 7.1.5.2) - activestorage (= 7.1.5.2) - activesupport (= 7.1.5.2) + useragent (~> 0.16) + actiontext (7.2.2.2) + actionpack (= 7.2.2.2) + activerecord (= 7.2.2.2) + activestorage (= 7.2.2.2) + activesupport (= 7.2.2.2) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.1.5.2) - activesupport (= 7.1.5.2) + actionview (7.2.2.2) + activesupport (= 7.2.2.2) builder (~> 3.1) erubi (~> 1.11) rails-dom-testing (~> 2.2) @@ -112,18 +110,18 @@ GEM activemodel (>= 4.1) case_transform (>= 0.2) jsonapi-renderer (>= 0.1.1.beta1, < 0.3) - activejob (7.1.5.2) - activesupport (= 7.1.5.2) + activejob (7.2.2.2) + activesupport (= 7.2.2.2) globalid (>= 0.3.6) - activemodel (7.1.5.2) - activesupport (= 7.1.5.2) + activemodel (7.2.2.2) + activesupport (= 7.2.2.2) activemodel-serializers-xml (1.0.2) activemodel (> 5.x) activesupport (> 5.x) builder (~> 3.1) - activerecord (7.1.5.2) - activemodel (= 7.1.5.2) - activesupport (= 7.1.5.2) + activerecord (7.2.2.2) + activemodel (= 7.2.2.2) + activesupport (= 7.2.2.2) timeout (>= 0.4.0) activeresource (6.0.0) activemodel (>= 6.0) @@ -131,25 +129,24 @@ GEM activesupport (>= 6.0) activeresource-response (1.4.0) activeresource (>= 3, < 6.1) - activestorage (7.1.5.2) - actionpack (= 7.1.5.2) - activejob (= 7.1.5.2) - activerecord (= 7.1.5.2) - activesupport (= 7.1.5.2) + activestorage (7.2.2.2) + actionpack (= 7.2.2.2) + activejob (= 7.2.2.2) + activerecord (= 7.2.2.2) + activesupport (= 7.2.2.2) marcel (~> 1.0) - activesupport (7.1.5.2) + activesupport (7.2.2.2) base64 benchmark (>= 0.3) bigdecimal - concurrent-ruby (~> 1.0, >= 1.0.2) + concurrent-ruby (~> 1.0, >= 1.3.1) connection_pool (>= 2.2.5) drb i18n (>= 1.6, < 2) logger (>= 1.4.2) minitest (>= 5.1) - mutex_m securerandom (>= 0.3) - tzinfo (~> 2.0) + tzinfo (~> 2.0, >= 2.0.5) addressable (2.8.7) public_suffix (>= 2.0.2, < 7.0) ast (2.4.2) @@ -289,14 +286,13 @@ GEM minitest (5.25.5) mongo (2.20.0) bson (>= 4.14.1, < 6.0.0) - mongoid (9.0.0) - activemodel (>= 5.1, < 7.2, != 7.0.0) + mongoid (9.0.8) + activemodel (>= 5.1, < 8.1, != 7.0.0) concurrent-ruby (>= 1.0.5, < 2.0) mongo (>= 2.18.0, < 3.0.0) mongoid_auto_increment (0.1.6) mongoid (>= 2.0) multi_json (1.15.0) - mutex_m (0.3.0) net-http (0.4.1) uri net-imap (0.5.10) @@ -343,28 +339,28 @@ GEM activesupport (>= 3.0.0) raabro (1.4.0) racc (1.8.1) - rack (3.2.0) - rack-session (2.1.1) - base64 (>= 0.1.0) - rack (>= 3.0.0) + rack (2.2.20) + rack-session (1.0.2) + rack (< 3) rack-test (2.2.0) rack (>= 1.3) - rackup (2.2.1) - rack (>= 3) - rails (7.1.5.2) - actioncable (= 7.1.5.2) - actionmailbox (= 7.1.5.2) - actionmailer (= 7.1.5.2) - actionpack (= 7.1.5.2) - actiontext (= 7.1.5.2) - actionview (= 7.1.5.2) - activejob (= 7.1.5.2) - activemodel (= 7.1.5.2) - activerecord (= 7.1.5.2) - activestorage (= 7.1.5.2) - activesupport (= 7.1.5.2) + rackup (1.0.1) + rack (< 3) + webrick + rails (7.2.2.2) + actioncable (= 7.2.2.2) + actionmailbox (= 7.2.2.2) + actionmailer (= 7.2.2.2) + actionpack (= 7.2.2.2) + actiontext (= 7.2.2.2) + actionview (= 7.2.2.2) + activejob (= 7.2.2.2) + activemodel (= 7.2.2.2) + activerecord (= 7.2.2.2) + activestorage (= 7.2.2.2) + activesupport (= 7.2.2.2) bundler (>= 1.15.0) - railties (= 7.1.5.2) + railties (= 7.2.2.2) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) actionview (>= 5.0.1.rc1) @@ -376,10 +372,10 @@ GEM rails-html-sanitizer (1.6.2) loofah (~> 2.21) nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0) - railties (7.1.5.2) - actionpack (= 7.1.5.2) - activesupport (= 7.1.5.2) - irb + railties (7.2.2.2) + actionpack (= 7.2.2.2) + activesupport (= 7.2.2.2) + irb (~> 1.13) rackup (>= 1.0.0) rake (>= 12.2) thor (~> 1.0, >= 1.2.2) @@ -427,10 +423,10 @@ GEM rspec-mocks (3.13.1) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) - rspec-rails (6.1.3) - actionpack (>= 6.1) - activesupport (>= 6.1) - railties (>= 6.1) + rspec-rails (8.0.2) + actionpack (>= 7.2) + activesupport (>= 7.2) + railties (>= 7.2) rspec-core (~> 3.13) rspec-expectations (~> 3.13) rspec-mocks (~> 3.13) @@ -486,6 +482,7 @@ GEM unicode-display_width (2.5.0) unicode_utils (1.4.0) uri (1.0.3) + useragent (0.16.11) voight_kampff (2.0.0) rack (>= 1.4) warden (1.2.9) @@ -495,6 +492,7 @@ GEM activemodel (>= 6.0.0) bindex (>= 0.4.0) railties (>= 6.0.0) + webrick (1.9.1) websocket-driver (0.8.0) base64 websocket-extensions (>= 0.1.0) diff --git a/supplejack_api.gemspec b/supplejack_api.gemspec index 39a9f32d..9606dd00 100644 --- a/supplejack_api.gemspec +++ b/supplejack_api.gemspec @@ -32,7 +32,10 @@ Gem::Specification.new do |s| s.add_dependency 'mongoid_auto_increment' s.add_dependency 'progressbar' s.add_dependency 'pundit', '~> 2.1' - s.add_dependency 'rails', '~> 7.1.0' + s.add_dependency 'rack', '~> 2.2.4' + s.add_dependency 'rails', '~> 7.2.2.2' + s.add_dependency 'activerecord', '~> 7.2.2.2' + s.add_dependency 'activesupport', '~> 7.2.2.2' s.add_dependency 'responders' s.add_dependency 'rest-client' s.add_dependency 'sidekiq' From 4f31a1cd826e32db02acd1c117825673a97e486d Mon Sep 17 00:00:00 2001 From: Tim Wright Date: Tue, 14 Oct 2025 17:55:42 +1300 Subject: [PATCH 2/4] update CVEs --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 091d82aa..5835e1d9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -402,7 +402,7 @@ GEM http-cookie (>= 1.0.2, < 2.0) mime-types (>= 1.16, < 4.0) netrc (~> 0.8) - rexml (3.3.9) + rexml (3.4.4) rouge (4.3.0) rsolr (2.5.0) builder (>= 2.1.2) @@ -481,7 +481,7 @@ GEM concurrent-ruby (~> 1.0) unicode-display_width (2.5.0) unicode_utils (1.4.0) - uri (1.0.3) + uri (1.0.4) useragent (0.16.11) voight_kampff (2.0.0) rack (>= 1.4) From dcf018a53df5b6c572b70296a3b0f27baaa7fb56 Mon Sep 17 00:00:00 2001 From: Tim Wright Date: Tue, 14 Oct 2025 17:57:03 +1300 Subject: [PATCH 3/4] rubocop fixes --- supplejack_api.gemspec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/supplejack_api.gemspec b/supplejack_api.gemspec index 9606dd00..df8a26c9 100644 --- a/supplejack_api.gemspec +++ b/supplejack_api.gemspec @@ -20,6 +20,8 @@ Gem::Specification.new do |s| s.add_dependency 'active_model_serializers' s.add_dependency 'activemodel-serializers-xml' + s.add_dependency 'activerecord', '~> 7.2.2.2' + s.add_dependency 'activesupport', '~> 7.2.2.2' s.add_dependency 'dalli' s.add_dependency 'devise' s.add_dependency 'devise-token_authenticatable', '>= 1.0.0' @@ -32,10 +34,8 @@ Gem::Specification.new do |s| s.add_dependency 'mongoid_auto_increment' s.add_dependency 'progressbar' s.add_dependency 'pundit', '~> 2.1' - s.add_dependency 'rack', '~> 2.2.4' + s.add_dependency 'rack', '~> 2.2.4' s.add_dependency 'rails', '~> 7.2.2.2' - s.add_dependency 'activerecord', '~> 7.2.2.2' - s.add_dependency 'activesupport', '~> 7.2.2.2' s.add_dependency 'responders' s.add_dependency 'rest-client' s.add_dependency 'sidekiq' From 96f92f52519dc28f3ffce75b2571a92e633cf8e4 Mon Sep 17 00:00:00 2001 From: Tim Wright Date: Tue, 14 Oct 2025 18:08:44 +1300 Subject: [PATCH 4/4] update spec --- .../supplejack_api/harvester/records_controller_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/controllers/supplejack_api/harvester/records_controller_spec.rb b/spec/controllers/supplejack_api/harvester/records_controller_spec.rb index 59bd5d02..ca4c1266 100644 --- a/spec/controllers/supplejack_api/harvester/records_controller_spec.rb +++ b/spec/controllers/supplejack_api/harvester/records_controller_spec.rb @@ -266,7 +266,7 @@ module SupplejackApi let(:where_params) { ActionController::Parameters.new('fragments.job_id': records.first.job_id).permit! } it 'returns object with records based on search params' do - expect(Record).to receive(:where).with(where_params).and_call_original + expect(Record).to receive(:where).and_call_original get :index, params: { search: { 'fragments.job_id': records.first.job_id },