From b964831e1d981475ccde16902b3774a7e249c283 Mon Sep 17 00:00:00 2001 From: "Daniel (dB.) Doubrovkine" Date: Fri, 20 Mar 2026 08:58:26 -0400 Subject: [PATCH] Upgrade to Ruby 4.0.2 and refresh GitHub Actions Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/lint.yml | 4 +- .github/workflows/test.yml | 8 +- Gemfile | 2 +- Gemfile.lock | 162 ++++++++++-------- .../endpoints/it_behaves_like_a_cursor_api.rb | 4 +- 5 files changed, 97 insertions(+), 83 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index a81b3c0..7891d88 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -6,9 +6,9 @@ jobs: RuboCop: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v6 - uses: ruby/setup-ruby@v1 with: - ruby-version: "3.4.6" + ruby-version: "4.0.2" bundler-cache: true - run: bundle exec rubocop diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8545694..f737084 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,19 +6,19 @@ jobs: RSpec: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: browser-actions/setup-firefox@latest + - uses: actions/checkout@v6 + - uses: browser-actions/setup-firefox@v1 with: firefox-version: '143.0.3' - uses: browser-actions/setup-geckodriver@latest with: geckodriver-version: "0.36.0" - - uses: supercharge/mongodb-github-action@1.7.0 + - uses: supercharge/mongodb-github-action@v1 with: mongodb-version: "8.0" - uses: ruby/setup-ruby@v1 with: - ruby-version: "3.4.6" + ruby-version: "4.0.2" bundler-cache: true - uses: GabrielBB/xvfb-action@v1 with: diff --git a/Gemfile b/Gemfile index dec84de..7f3b18f 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,6 @@ source 'https://rubygems.org' -ruby '3.4.6' +ruby '4.0.2' gem 'irb' gem 'kaminari-grape' diff --git a/Gemfile.lock b/Gemfile.lock index 6fba618..3be0a11 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,34 +1,33 @@ GEM remote: https://rubygems.org/ specs: - activemodel (8.0.3) - activesupport (= 8.0.3) - activesupport (8.0.3) + activemodel (8.1.2) + activesupport (= 8.1.2) + activesupport (8.1.2) base64 - benchmark (>= 0.3) bigdecimal concurrent-ruby (~> 1.0, >= 1.3.1) connection_pool (>= 2.2.5) drb i18n (>= 1.6, < 2) + json logger (>= 1.4.2) minitest (>= 5.1) securerandom (>= 0.3) tzinfo (~> 2.0, >= 2.0.5) uri (>= 0.13.1) - addressable (2.8.7) - public_suffix (>= 2.0.2, < 7.0) + addressable (2.8.9) + public_suffix (>= 2.0.2, < 8.0) ast (2.4.3) - async (2.33.0) + async (2.38.1) console (~> 1.29) fiber-annotation io-event (~> 1.11) metrics (~> 0.12) traces (~> 0.18) base64 (0.3.0) - benchmark (0.4.1) - bigdecimal (3.2.3) - bson (5.1.1) + bigdecimal (4.0.1) + bson (5.2.0) capybara (3.40.0) addressable matrix @@ -38,55 +37,58 @@ GEM rack-test (>= 0.6.3) regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) - concurrent-ruby (1.3.5) - connection_pool (2.5.4) - console (1.34.0) + concurrent-ruby (1.3.6) + connection_pool (3.0.2) + console (1.34.3) fiber-annotation fiber-local (~> 1.1) json - crack (1.0.0) + crack (1.0.1) bigdecimal rexml database_cleaner-core (2.0.1) database_cleaner-mongoid (2.0.1) database_cleaner-core (~> 2.0.0) mongoid - date (3.4.1) + date (3.5.1) declarative (0.0.20) diff-lcs (1.6.2) domain_name (0.6.20240107) drb (2.2.3) - dry-core (1.1.0) + dry-configurable (1.3.0) + dry-core (~> 1.1) + zeitwerk (~> 2.6) + dry-core (1.2.0) concurrent-ruby (~> 1.0) logger zeitwerk (~> 2.6) - dry-inflector (1.2.0) + dry-inflector (1.3.1) dry-logic (1.6.0) bigdecimal concurrent-ruby (~> 1.0) dry-core (~> 1.1) zeitwerk (~> 2.6) - dry-types (1.8.3) - bigdecimal (~> 3.0) + dry-types (1.9.1) + bigdecimal (>= 3.0) concurrent-ruby (~> 1.0) dry-core (~> 1.0) dry-inflector (~> 1.0) dry-logic (~> 1.4) zeitwerk (~> 2.6) - erb (5.0.2) + erb (6.0.2) fabrication (3.0.0) - faker (3.5.2) + faker (3.6.1) i18n (>= 1.8.11, < 2) faraday (2.14.1) faraday-net_http (>= 2.0, < 3.5) json logger - faraday-follow_redirects (0.4.0) + faraday-follow_redirects (0.5.0) faraday (>= 1, < 3) - faraday-mashify (1.0.0) + faraday-mashify (1.0.2) faraday (~> 2.0) hashie - faraday-multipart (1.1.1) + faraday-multipart (1.2.0) multipart-post (~> 2.0) faraday-net_http (3.4.2) net-http (~> 0.5) @@ -102,8 +104,9 @@ GEM thor (~> 1.4) gli (2.22.2) ostruct - grape (2.4.0) - activesupport (>= 6.1) + grape (3.1.1) + activesupport (>= 7.1) + dry-configurable dry-types (>= 1.1) mustermann-grape (~> 1.1.0) rack (>= 2) @@ -112,11 +115,11 @@ GEM grape multi_json roar (~> 1.1.0) - grape-swagger (2.1.2) - grape (>= 1.7, < 3.0) - rack-test (~> 2) + grape-swagger (2.1.4) + grape (>= 1.7, < 4.0) hashdiff (1.2.1) - hashie (5.0.0) + hashie (5.1.0) + logger http-accept (1.7.0) http-cookie (1.1.0) domain_name (~> 0.5) @@ -125,15 +128,19 @@ GEM faraday (>= 2) faraday-follow_redirects faraday_hal_middleware (>= 0.2) - i18n (1.14.7) + i18n (1.14.8) concurrent-ruby (~> 1.0) - io-console (0.8.1) - io-event (1.14.0) - irb (1.15.2) + io-console (0.8.2) + io-event (1.14.4) + irb (1.17.0) pp (>= 0.6.0) + prism (>= 1.3.0) rdoc (>= 4.0.0) reline (>= 0.4.2) json (2.19.2) + json-schema (6.2.0) + addressable (~> 2.8) + bigdecimal (>= 3.1, < 5) kaminari-core (1.2.2) kaminari-grape (1.0.1) grape @@ -144,19 +151,23 @@ GEM mailchimp_api_v3 (0.2.18) rest-client (~> 2) matrix (0.4.3) + mcp (0.9.0) + json-schema (>= 4.1) metrics (0.15.0) mime-types (3.7.0) logger mime-types-data (~> 3.2025, >= 3.2025.0507) - mime-types-data (3.2025.0924) + mime-types-data (3.2026.0317) mini_mime (1.1.5) mini_portile2 (2.8.9) - minitest (5.25.5) - mongo (2.21.3) + minitest (6.0.2) + drb (~> 2.0) + prism (~> 1.5) + mongo (2.23.0) base64 bson (>= 4.14.1, < 6.0.0) - mongoid (9.0.8) - activemodel (>= 5.1, < 8.1, != 7.0.0) + mongoid (9.0.10) + activemodel (>= 5.1, < 8.2, != 7.0.0) concurrent-ruby (>= 1.0.5, < 2.0) mongo (>= 2.18.0, < 3.0.0) mongoid-compatibility (1.0.0) @@ -169,7 +180,7 @@ GEM i18n mongoid (>= 3.0.0) mongoid-compatibility - multi_json (1.17.0) + multi_json (1.19.1) multipart-post (2.4.1) mustermann (3.0.4) ruby2_keywords (~> 0.0.1) @@ -178,25 +189,26 @@ GEM net-http (0.9.1) uri (>= 0.11.1) netrc (0.11.0) - newrelic_rpm (9.21.0) - nio4r (2.7.4) - nokogiri (1.19.1) + newrelic_rpm (10.2.0) + logger + nio4r (2.7.5) + nokogiri (1.19.2) mini_portile2 (~> 2.8.2) racc (~> 1.4) ostruct (0.6.3) parallel (1.27.0) - parser (3.3.9.0) + parser (3.3.10.2) ast (~> 2.4.1) racc - pp (0.6.2) + pp (0.6.3) prettyprint prettyprint (0.2.0) - prism (1.5.1) - psych (5.2.6) + prism (1.9.0) + psych (5.3.1) date stringio - public_suffix (6.0.2) - puma (7.0.4) + public_suffix (7.0.5) + puma (7.2.0) nio4r (~> 2.0) racc (1.8.1) rack (3.2.5) @@ -210,15 +222,16 @@ GEM rack rack-test (2.2.0) rack (>= 1.3) - rackup (2.2.1) + rackup (2.3.1) rack (>= 3) rainbow (3.1.1) - rake (13.3.0) - rdoc (6.14.2) + rake (13.3.1) + rdoc (7.2.0) erb psych (>= 4.0.0) + tsort regexp_parser (2.11.3) - reline (0.6.2) + reline (0.6.3) io-console (~> 0.5) representable (3.2.0) declarative (< 0.1.0) @@ -232,47 +245,48 @@ GEM rexml (3.4.4) roar (1.1.1) representable (~> 3.0) - rspec (3.13.1) + rspec (3.13.2) rspec-core (~> 3.13.0) rspec-expectations (~> 3.13.0) rspec-mocks (~> 3.13.0) - rspec-core (3.13.5) + rspec-core (3.13.6) rspec-support (~> 3.13.0) rspec-expectations (3.13.5) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) - rspec-mocks (3.13.5) + rspec-mocks (3.13.8) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) - rspec-support (3.13.6) - rubocop (1.81.1) + rspec-support (3.13.7) + rubocop (1.85.1) json (~> 2.3) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.1.0) + mcp (~> 0.6) parallel (~> 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 2.9.3, < 3.0) - rubocop-ast (>= 1.47.1, < 2.0) + rubocop-ast (>= 1.49.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 4.0) - rubocop-ast (1.47.1) + rubocop-ast (1.49.1) parser (>= 3.3.7.2) - prism (~> 1.4) + prism (~> 1.7) rubocop-capybara (2.22.1) lint_roller (~> 1.1) rubocop (~> 1.72, >= 1.72.1) rubocop-rake (0.7.1) lint_roller (~> 1.1) rubocop (>= 1.72.1) - rubocop-rspec (3.7.0) + rubocop-rspec (3.9.0) lint_roller (~> 1.1) - rubocop (~> 1.72, >= 1.72.1) + rubocop (~> 1.81) ruby-progressbar (1.13.0) ruby2_keywords (0.0.5) - rubyzip (3.1.1) + rubyzip (3.2.2) securerandom (0.4.1) - selenium-webdriver (4.35.0) + selenium-webdriver (4.41.0) base64 (~> 0.2) logger (~> 1.4) rexml (~> 3.2, >= 3.2.5) @@ -295,34 +309,34 @@ GEM slack-ruby-bot-server-mailchimp (0.3.0) mailchimp_api_v3 slack-ruby-bot-server (>= 2.0.1) - slack-ruby-client (3.0.0) + slack-ruby-client (3.1.0) faraday (>= 2.0.1) faraday-mashify faraday-multipart gli hashie logger - stringio (3.1.7) - thor (1.4.0) + stringio (3.2.0) + thor (1.5.0) traces (0.18.2) trailblazer-option (0.1.2) + tsort (0.2.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) uber (0.1.0) unicode-display_width (3.2.0) unicode-emoji (~> 4.1) - unicode-emoji (4.1.0) + unicode-emoji (4.2.0) uri (1.1.1) - vcr (6.3.1) - base64 - webmock (3.25.1) + vcr (6.4.0) + webmock (3.26.2) addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) websocket (1.2.11) xpath (3.2.0) nokogiri (~> 1.8) - zeitwerk (2.7.3) + zeitwerk (2.7.5) PLATFORMS ruby @@ -359,7 +373,7 @@ DEPENDENCIES webmock RUBY VERSION - ruby 3.4.6p54 + ruby 4.0.2p0 BUNDLED WITH 2.7.2 diff --git a/spec/support/api/endpoints/it_behaves_like_a_cursor_api.rb b/spec/support/api/endpoints/it_behaves_like_a_cursor_api.rb index 42b33de..75b4370 100644 --- a/spec/support/api/endpoints/it_behaves_like_a_cursor_api.rb +++ b/spec/support/api/endpoints/it_behaves_like_a_cursor_api.rb @@ -33,7 +33,7 @@ }) break unless response._links[:next] - next_cursor = Hash[CGI.parse(URI.parse(response._links.next._url).query).map { |a| [a[0], a[1][0]] }] + next_cursor = URI.decode_www_form(URI.parse(response._links.next._url).query.to_s).to_h end expect(models_ids.uniq.count).to eq model.all.count end @@ -48,7 +48,7 @@ }) break unless response._links[:next] - next_cursor = Hash[CGI.parse(URI.parse(response._links.next._url).query).map { |a| [a[0], a[1][0]] }] + next_cursor = URI.decode_www_form(URI.parse(response._links.next._url).query.to_s).to_h end expect(models_ids.uniq.count).to eq model.all.count - 3 end