From 805186ef36a48236e00dca5783e18faf00c000fa Mon Sep 17 00:00:00 2001 From: Gary Hall Date: Mon, 14 Sep 2026 09:57:33 -0500 Subject: [PATCH] [improvement] Added support for Rails 8.1 and Ruby 4.0 (30m) - Widened the gemspec's Rails constraint from < 8.1 to < 8.2 - Pinned json < 3 in the Gemfile: json 3.0 made JSON.parse options keyword-only, which breaks ActiveSupport::JSON.decode on all current Rails releases (test-environment only; doesn't constrain consumers) - Added Ruby 4.0 to the CI matrix and bumped actions/checkout to v4 Co-Authored-By: Claude Fable 5 --- .github/workflows/ci.yml | 4 ++-- Gemfile | 4 ++++ ep_postmaster.gemspec | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0070ff6..628afc8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,10 +7,10 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - ruby: ["3.2", "3.3", "3.4"] + ruby: ["3.2", "3.3", "3.4", "4.0"] steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Setup Ruby uses: ruby/setup-ruby@v1 with: diff --git a/Gemfile b/Gemfile index 6756fe7..2c2c617 100644 --- a/Gemfile +++ b/Gemfile @@ -5,6 +5,10 @@ source "https://rubygems.org" # development dependencies will be added by default to the :development group. gemspec +# json 3.0 made JSON.parse options keyword-only, which breaks +# ActiveSupport::JSON.decode (as of Rails 8.1.3.1); remove once Rails supports json 3 +gem "json", "< 3" + # Declare any dependencies that are still in development here instead of in # your gemspec. These might include edge Rails or gems from your path or # Git. Remember to move these dependencies to your gemspec before releasing diff --git a/ep_postmaster.gemspec b/ep_postmaster.gemspec index fb4e7e0..06a37d9 100644 --- a/ep_postmaster.gemspec +++ b/ep_postmaster.gemspec @@ -16,7 +16,7 @@ Gem::Specification.new do |s| s.files = Dir["{app,config,db,lib}/**/*", "MIT-LICENSE", "Rakefile", "README.rdoc"] s.test_files = Dir["test/**/*"] - s.add_dependency "rails", ">= 4.2.1", "< 8.1" + s.add_dependency "rails", ">= 4.2.1", "< 8.2" s.add_development_dependency "sqlite3" s.add_development_dependency "rr"