Skip to content

Commit

Permalink
Add support rails 7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
hatsu38 committed Oct 5, 2023
1 parent d84270f commit 54dbebe
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ recommendations of [keepachangelog.com](http://keepachangelog.com/).

### Added

- None
- support for Rails 7.1

### Fixed

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
8 changes: 8 additions & 0 deletions gemfiles/rails_7.1.gemfile
Original file line number Diff line number Diff line change
@@ -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: "../"
2 changes: 1 addition & 1 deletion lib/paper_trail/compatibility.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion spec/paper_trail/compatibility_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 54dbebe

Please sign in to comment.