diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 42f8fa8b..1efb2596 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -59,7 +59,7 @@ jobs: # have set this up with each database as a separate job, but then we'd be # duplicating the matrix configuration three times. matrix: - gemfile: [ 'rails_6.1', 'rails_7.0' ] + gemfile: [ 'rails_6.1', 'rails_7.0', 'rails_7.1' ] # To keep matrix size down, only test highest and lowest rubies. # See "Lowest supported ruby version" in CONTRIBUTING.md diff --git a/Appraisals b/Appraisals index 4dcbf496..c0041883 100644 --- a/Appraisals +++ b/Appraisals @@ -18,3 +18,8 @@ appraise "rails-7.0" do gem "rails", "~> 7.0.3.1" gem "rails-controller-testing", "~> 1.0.5" end + +appraise "rails-7.1" do + gem "rails", "~> 7.1.0" + gem "rails-controller-testing", "~> 1.0.5" +end diff --git a/CHANGELOG.md b/CHANGELOG.md index ea25fdbd..02aa8e03 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,7 @@ recommendations of [keepachangelog.com](http://keepachangelog.com/). ### Added -- None +- support for Rails 7.1 ### Fixed diff --git a/README.md b/README.md index de7c0668..a0562d8b 100644 --- a/README.md +++ b/README.md @@ -92,7 +92,7 @@ Choose version: | paper_trail | branch | ruby | activerecord | |-------------|------------|----------|---------------| -| unreleased | master | >= 3.0.0 | >= 6.1, < 7.1 | +| unreleased | master | >= 3.0.0 | >= 6.1, < 7.2 | | 15 | 15-stable | >= 3.0.0 | >= 6.1, < 7.1 | | 14 | 14-stable | >= 2.7.0 | >= 6.0, < 7.1 | | 13 | 13-stable | >= 2.6.0 | >= 5.2, < 7.1 | diff --git a/gemfiles/rails_7.1.gemfile b/gemfiles/rails_7.1.gemfile new file mode 100644 index 00000000..94b10cdc --- /dev/null +++ b/gemfiles/rails_7.1.gemfile @@ -0,0 +1,8 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "rails", "~> 7.1.0" +gem "rails-controller-testing", "~> 1.0.5" + +gemspec path: "../" diff --git a/lib/paper_trail/compatibility.rb b/lib/paper_trail/compatibility.rb index 35416745..57947005 100644 --- a/lib/paper_trail/compatibility.rb +++ b/lib/paper_trail/compatibility.rb @@ -18,7 +18,7 @@ module PaperTrail # versions. module Compatibility ACTIVERECORD_GTE = ">= 6.1" # enforced in gemspec - ACTIVERECORD_LT = "< 7.1" # not enforced in gemspec + ACTIVERECORD_LT = "< 7.2" # not enforced in gemspec E_INCOMPATIBLE_AR = <<-EOS PaperTrail %s is not compatible with ActiveRecord %s. We allow PT diff --git a/spec/paper_trail/compatibility_spec.rb b/spec/paper_trail/compatibility_spec.rb index 60bbe471..a3fe3aab 100644 --- a/spec/paper_trail/compatibility_spec.rb +++ b/spec/paper_trail/compatibility_spec.rb @@ -14,7 +14,7 @@ module PaperTrail context "when incompatible" do it "writes a warning to stderr" do - ar_version = ::Gem::Version.new("7.1.0") + ar_version = ::Gem::Version.new("7.2.0") expect { described_class.check_activerecord(ar_version) }.to output(/not compatible/).to_stderr