From decf596a4ac10e70d90f4007d328bc7171d82879 Mon Sep 17 00:00:00 2001 From: eddgrant Date: Tue, 19 Dec 2023 10:00:05 +0000 Subject: [PATCH] TRG-1256: Update Ruby from 2.7.7 to 3.2.2 Doing this as `bundler` started failing our builds today since Ruby 2.7.7 is EOL: >ERROR: Error installing bundler: The last version of bundler (>= 0) to support your Ruby & RubyGems was 2.4.22. Try installing it with `gem install bundler -v 2.4.22` bundler requires Ruby version >= 3.0.0. The current ruby version is 2.7.7.221. Upgrading to 3.2.2 required the explicit addition of the `rexml` gem. `rexml` was a default gem in 2.7.7 whereas it is a bundled gem in 3.2.2. Also upgraded `vcr` to resolve this issue, which was observed running `rspec`: >warning: Exception in finalizer # /home/egrant/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/vcr-6.0.0/lib/vcr/library_hooks/webmock.rb:36:in `block in global_hook_disabled_requests': wrong number of arguments (given 1, expected 0) (ArgumentError) --- .github/workflows/ci.yml | 2 ++ .ruby-version | 2 +- Gemfile | 1 + Gemfile.lock | 14 +++++++++----- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8ea702f..75838d9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,6 +5,8 @@ jobs: steps: - uses: actions/checkout@v2 - uses: ruby/setup-ruby@v1 + with: + ruby-version: '3' - uses: actions/cache@v1 with: path: vendor/bundle diff --git a/.ruby-version b/.ruby-version index a603bb5..be94e6f 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.7.5 +3.2.2 diff --git a/Gemfile b/Gemfile index c1de96e..41bdff7 100644 --- a/Gemfile +++ b/Gemfile @@ -13,4 +13,5 @@ group :test do gem 'timecop' gem 'vcr' gem 'webmock' + gem 'rexml' end diff --git a/Gemfile.lock b/Gemfile.lock index e4ef3ac..36d08f3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,11 +1,12 @@ GEM remote: https://rubygems.org/ specs: - activesupport (5.2.4.3) + activesupport (6.0.6.1) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) minitest (~> 5.1) tzinfo (~> 1.1) + zeitwerk (~> 2.2, >= 2.2.2) addressable (2.8.0) public_suffix (>= 2.0.2, < 5.0) chronic (0.10.2) @@ -50,12 +51,13 @@ GEM llhttp-ffi (0.4.0) ffi-compiler (~> 1.0) rake (~> 13.0) - minitest (5.14.1) + minitest (5.20.0) multipart-post (2.1.1) octokit (4.12.0) sawyer (~> 0.8.0, >= 0.5.3) public_suffix (4.0.6) rake (13.0.6) + rexml (3.2.6) rspec (3.12.0) rspec-core (~> 3.12.0) rspec-expectations (~> 3.12.0) @@ -81,11 +83,12 @@ GEM unf (0.1.4) unf_ext unf_ext (0.0.8) - vcr (6.0.0) + vcr (6.2.0) webmock (3.4.2) addressable (>= 2.3.6) crack (>= 0.3.2) hashdiff + zeitwerk (2.6.12) PLATFORMS ruby @@ -96,13 +99,14 @@ DEPENDENCIES http octokit rake + rexml rspec timecop vcr webmock RUBY VERSION - ruby 2.7.5p203 + ruby 3.2.2p53 BUNDLED WITH - 2.1.4 + 2.4.2