From 026442673176ef98b8d9c971026ba33b5b9ef227 Mon Sep 17 00:00:00 2001 From: Shinichi Maeshima Date: Thu, 2 Oct 2025 17:02:26 +0900 Subject: [PATCH 1/2] Add latest rubies to CI matrix - Add Ruby 3.2, 3.3, 3.4 and JRuby 9.4, 10.0. - Remove JRuby 9.2 since setup-ruby on Ubuntu 24.4 only provides builds for JRuby 9.4 and later. - Update actions/checkout to the latest --- .github/workflows/test-and-deploy.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-and-deploy.yml b/.github/workflows/test-and-deploy.yml index 05c62cb..9c41a56 100644 --- a/.github/workflows/test-and-deploy.yml +++ b/.github/workflows/test-and-deploy.yml @@ -17,10 +17,10 @@ jobs: timeout-minutes: 20 strategy: matrix: - ruby: [ '2.4', '2.5', '2.6', '2.7', '3.0', '3.1' ] + ruby: [ '2.4', '2.5', '2.6', '2.7', '3.0', '3.1', '3.2', '3.3', '3.4', 'jruby-9.4', 'jruby-10.0' ] steps: - name: Checkout ruby-http-client - uses: actions/checkout@v2 + uses: actions/checkout@v6 with: fetch-depth: 0 @@ -52,7 +52,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout ruby-http-client - uses: actions/checkout@v2 + uses: actions/checkout@v6 with: fetch-depth: 0 From bc67313b0a14d33b7abc1efa3f750dde608b4680 Mon Sep 17 00:00:00 2001 From: Shinichi Maeshima Date: Thu, 2 Oct 2025 18:24:30 +0900 Subject: [PATCH 2/2] Fix a lint error that occurred when using Ruby 3.4 In Ruby 3.4, base64 is no longer part of the standard library, which was causing the following error. ``` Run bundle exec rake rubocop bundle exec rake rubocop shell: /usr/bin/bash -e {0} rubocop -c .rubocop.yml --display-only-fail-level-offenses -D /home/runner/work/ruby-http-client/ruby-http-client/vendor/bundle/ruby/3.4.0/gems/rubocop-1.24.1/lib/rubocop/formatter/html_formatter.rb:5: warning: ostruct was loaded from the standard library, but will no longer be part of the default gems starting from Ruby 3.5.0. You can add ostruct to your Gemfile or gemspec to silence this warning. /home/runner/work/ruby-http-client/ruby-http-client/vendor/bundle/ruby/3.4.0/gems/rubocop-1.24.1/lib/rubocop/formatter/html_formatter.rb:6: warning: base64 was loaded from the standard library, but is not part of the default gems starting from Ruby 3.4.0. You can add base64 to your Gemfile or gemspec to silence this warning. /opt/hostedtoolcache/Ruby/3.4.6/x64/lib/ruby/3.4.0/bundled_gems.rb:82:in 'Kernel.require': cannot load such file -- base64 (LoadError) from /opt/hostedtoolcache/Ruby/3.4.6/x64/lib/ruby/3.4.0/bundled_gems.rb:82:in 'block (2 levels) in Kernel#replace_require' from /home/runner/work/ruby-http-client/ruby-http-client/vendor/bundle/ruby/3.4.0/gems/rubocop-1.24.1/lib/rubocop/formatter/html_formatter.rb:6:in '' from /home/runner/work/ruby-http-client/ruby-http-client/vendor/bundle/ruby/3.4.0/gems/rubocop-1.24.1/lib/rubocop.rb:669:in 'Kernel#require_relative' from /home/runner/work/ruby-http-client/ruby-http-client/vendor/bundle/ruby/3.4.0/gems/rubocop-1.24.1/lib/rubocop.rb:669:in '' from /opt/hostedtoolcache/Ruby/3.4.6/x64/lib/ruby/3.4.0/bundled_gems.rb:82:in 'Kernel.require' from /opt/hostedtoolcache/Ruby/3.4.6/x64/lib/ruby/3.4.0/bundled_gems.rb:82:in 'block (2 levels) in Kernel#replace_require' from /home/runner/work/ruby-http-client/ruby-http-client/vendor/bundle/ruby/3.4.0/gems/rubocop-1.24.1/exe/rubocop:6:in '' from /home/runner/work/ruby-http-client/ruby-http-client/vendor/bundle/ruby/3.4.0/bin/rubocop:25:in 'Kernel#load' from /home/runner/work/ruby-http-client/ruby-http-client/vendor/bundle/ruby/3.4.0/bin/rubocop:25:in '
' rake aborted! Command failed with status (1): [rubocop -c .rubocop.yml --display-only-fail-level-offenses -D] /home/runner/work/ruby-http-client/ruby-http-client/Rakefile:9:in 'block in ' /home/runner/work/ruby-http-client/ruby-http-client/vendor/bundle/ruby/3.4.0/gems/rake-13.3.0/exe/rake:27:in '' /opt/hostedtoolcache/Ruby/3.4.6/x64/bin/bundle:25:in 'Kernel#load' /opt/hostedtoolcache/Ruby/3.4.6/x64/bin/bundle:25:in '
' ``` --- .github/workflows/test-and-deploy.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-and-deploy.yml b/.github/workflows/test-and-deploy.yml index 9c41a56..c659455 100644 --- a/.github/workflows/test-and-deploy.yml +++ b/.github/workflows/test-and-deploy.yml @@ -33,7 +33,9 @@ jobs: - run: make install - name: Set up linter - run: bundle add rubocop --version "~> 1.24.1" --group "development" --skip-install + run: | + bundle add rubocop --version "~> 1.24.1" --group "development" --skip-install + bundle add base64 --group "development" --skip-install if: ${{ matrix.ruby != '2.4' }} - run: bundle install --with development