From 5e35623d92ada932938f95fc8a93aba0d1edcd12 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Mon, 29 Dec 2025 15:03:19 -0800 Subject: [PATCH 1/3] Modernize CI --- .github/workflows/test.yml | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ebca0f5..a1a8137 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,27 +8,28 @@ on: - master jobs: + ruby-versions: + uses: ruby/actions/.github/workflows/ruby_versions.yml@master + test: + needs: ruby-versions + runs-on: ubuntu-latest + strategy: fail-fast: false matrix: - ruby: [2.4, 2.5, 2.6, 2.7, '3.0', 3.1, 3.2, jruby-9.2] - os: [ubuntu-20.04, windows-2022] - include: - - { ruby: 3.1, os: ubuntu-20.04, matrix: pipeline } - - runs-on: ${{ matrix.os }} - - env: - CI_MATRIX: ${{ matrix.matrix }} + ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Ruby - uses: ruby/setup-ruby@v1 + uses: ruby/setup-ruby-pkgs@v1 with: ruby-version: ${{ matrix.ruby }} + apt-get: "haveged libyaml-dev" + brew: libyaml + vcpkg: libyaml bundler-cache: true - name: Test things From 283d1ea5a2bd61cf8e15c45027dbc9aaaea8b8c6 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Mon, 29 Dec 2025 16:34:14 -0800 Subject: [PATCH 2/3] Add dependency on CGI --- net-http-persistent.gemspec | 1 + 1 file changed, 1 insertion(+) diff --git a/net-http-persistent.gemspec b/net-http-persistent.gemspec index 5eb683f..58ac1db 100644 --- a/net-http-persistent.gemspec +++ b/net-http-persistent.gemspec @@ -18,5 +18,6 @@ Gem::Specification.new do |s| s.summary = "Manages persistent connections using Net::HTTP including a thread pool for connecting to multiple hosts".freeze s.add_runtime_dependency(%q.freeze, ["~> 2.2", ">= 2.2.4"]) + s.add_runtime_dependency(%q.freeze, "~> 0.5.1") end From 03ff20295525c0ccabf37202cd11990cfc9ec746 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Mon, 29 Dec 2025 16:42:10 -0800 Subject: [PATCH 3/3] loosen the delta requirements for truffle --- test/test_net_http_persistent.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_net_http_persistent.rb b/test/test_net_http_persistent.rb index 145f3cc..80b7e1f 100644 --- a/test/test_net_http_persistent.rb +++ b/test/test_net_http_persistent.rb @@ -1003,7 +1003,7 @@ def test_requestx # There's some roounding issue on jruby preventing this from passing unless RUBY_PLATFORM == "java" - assert_in_delta Time.now, c.last_use + assert_in_delta Time.now, c.last_use, 0.003 end assert_equal 1, c.requests