From f1415469c6cb39a682c483b910759a8299ef2bc8 Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Sat, 23 Mar 2024 17:08:03 -0400 Subject: [PATCH 1/3] ci: update actions/checkout fromv v2 to v4 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 35a4aa6..73a6e5c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,7 +24,7 @@ jobs: steps: - name: Check out - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up ruby and bundle uses: ruby/setup-ruby@v1 From 195f5ebb9f4c04679e9d905750498adcb56c2226 Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Sat, 23 Mar 2024 17:08:22 -0400 Subject: [PATCH 2/3] ci: add coverage for ruby 3.2 and 3.3 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 73a6e5c..848367a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: matrix: os: [ubuntu] # We still kind of support Ruby 1.8.7 - ruby: [2.7, "3.0", 3.1, head, jruby] + ruby: ["2.7", "3.0", "3.1", "3.2", "3.3", "head", "jruby"] name: >- ${{matrix.os}}:ruby-${{matrix.ruby}} From 554d38a8639e404e955c6c1a2f038335d2d56e9f Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Sat, 23 Mar 2024 17:20:50 -0400 Subject: [PATCH 3/3] test: get to passing on JRuby - update error message - avoid race condition on cookie expiration --- test/helper.rb | 2 +- test/test_http_cookie_jar.rb | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/test/helper.rb b/test/helper.rb index 6b463ad..1e1a514 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -50,6 +50,6 @@ def test_file(filename) def sleep_until(time) if (s = time - Time.now) > 0 - sleep s + sleep s + 0.01 end end diff --git a/test/test_http_cookie_jar.rb b/test/test_http_cookie_jar.rb index 969ee7f..e59c018 100644 --- a/test/test_http_cookie_jar.rb +++ b/test/test_http_cookie_jar.rb @@ -10,10 +10,8 @@ def test_nonexistent_store end def test_nonexistent_store_in_config - assert_raise_with_message( - ArgumentError, - /cookie store unavailable: :nonexistent, error: cannot load .*nonexistent_store/ - ) { + expected = /cookie store unavailable: :nonexistent, error: (cannot load|no such file to load) .*nonexistent_store/ + assert_raise_with_message(ArgumentError, expected) { HTTP::CookieJar.new(store: :nonexistent) } end