Skip to content

Commit 2122d31

Browse files
committed
Support Rails 7.2
1 parent 8e3debe commit 2122d31

File tree

15 files changed

+75
-51
lines changed

15 files changed

+75
-51
lines changed

.github/workflows/test.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,28 +50,31 @@ jobs:
5050
ports:
5151
- 5432:5432
5252
strategy:
53+
fail-fast: false
5354
# Unlike TravisCI, the database will not be part of the matrix. Each
5455
# sub-job in the matrix tests all three databases. Alternatively, we could
5556
# have set this up with each database as a separate job, but then we'd be
5657
# duplicating the matrix configuration three times.
5758
matrix:
5859
gemfile:
59-
["rails_5.2", "rails_6.0", "rails_6.1", "rails_7.0", "rails_7.1"]
60+
["rails_5.2", "rails_6.0", "rails_6.1", "rails_7.0", "rails_7.1", "rails_7.2"]
6061

6162
# To keep matrix size down, only test highest and lowest rubies. In
62-
# `.rubocopy.yml`, set `TargetRubyVersion`, to the lowest ruby version
63+
# `.rubocop.yml`, set `TargetRubyVersion`, to the lowest ruby version
6364
# tested here.
64-
ruby: ["2.6", "2.7"]
65+
ruby: ["2.6", "3.3"]
6566

6667
exclude:
67-
# rails 7 requires ruby >= 2.7.0
68+
# rails 7.0 requires ruby >= 2.7.0
6869
- ruby: "2.6"
6970
gemfile: "rails_7.0"
7071
- ruby: "2.6"
7172
gemfile: "rails_7.1"
73+
- ruby: "2.6"
74+
gemfile: "rails_7.2"
7275
steps:
7376
- name: Checkout source
74-
uses: actions/checkout@v2
77+
uses: actions/checkout@v4
7578
- name: Setup ruby
7679
uses: ruby/setup-ruby@v1
7780
with:

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1212
- Added
1313
- None
1414
- Fixed
15-
- None
15+
- [#770](https://github.com/binarylogic/authlogic/pull/770) - Adds support for Rails 7.2
1616

1717
## 6.4.3 (2023-12-17)
1818

CONTRIBUTING.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,16 @@ BUNDLE_GEMFILE=gemfiles/rails_7.0.rb bundle exec rake
5252
# Rails 7.1
5353
BUNDLE_GEMFILE=gemfiles/rails_7.1.rb bundle install
5454
BUNDLE_GEMFILE=gemfiles/rails_7.1.rb bundle exec rake
55+
56+
# Rails 7.2
57+
BUNDLE_GEMFILE=gemfiles/rails_7.2.rb bundle install
58+
BUNDLE_GEMFILE=gemfiles/rails_7.2.rb bundle exec rake
5559
```
5660

5761
To run a single test:
5862

5963
```
60-
BUNDLE_GEMFILE=gemfiles/rails_6.0.rb \
64+
BUNDLE_GEMFILE=gemfiles/rails_7.2.rb \
6165
bundle exec ruby -I test path/to/test.rb
6266
```
6367

@@ -72,14 +76,14 @@ ruby –I test path/to/test.rb
7276

7377
```
7478
mysql -e 'drop database authlogic; create database authlogic;' && \
75-
DB=mysql BUNDLE_GEMFILE=gemfiles/rails_5.2.rb bundle exec rake
79+
DB=mysql BUNDLE_GEMFILE=gemfiles/rails_7.2.rb bundle exec rake
7680
```
7781

7882
### Test PostgreSQL
7983

8084
```
8185
psql -c 'create database authlogic;' -U postgres
82-
DB=postgres BUNDLE_GEMFILE=gemfiles/rails_6.0.rb bundle exec rake
86+
DB=postgres BUNDLE_GEMFILE=gemfiles/rails_7.2.rb bundle exec rake
8387
```
8488

8589
### Linting
@@ -88,13 +92,13 @@ Running `rake` also runs a linter, rubocop. Contributions must pass both
8892
the linter and the tests. The linter can be run on its own.
8993

9094
```
91-
BUNDLE_GEMFILE=gemfiles/rails_6.0.rb bundle exec rubocop
95+
BUNDLE_GEMFILE=gemfiles/rails_7.2.rb bundle exec rubocop
9296
```
9397

9498
To run the tests without linting, use `rake test`.
9599

96100
```
97-
BUNDLE_GEMFILE=gemfiles/rails_6.0.rb bundle exec rake test
101+
BUNDLE_GEMFILE=gemfiles/rails_7.2.rb bundle exec rake test
98102
```
99103

100104
### Version Control Branches

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ in `authlogic/session/base.rb`.
490490

491491
| Version | branch | ruby | activerecord |
492492
| ------- | ---------- | -------- | ------------- |
493-
| 6.4.3 | 6-4-stable | >= 2.4.0 | >= 5.2, < 7.2 |
493+
| 6.4.3 | 6-4-stable | >= 2.4.0 | >= 5.2, < 8.0 |
494494
| 5.2 | 5-2-stable | >= 2.3.0 | >= 5.2, < 6.1 |
495495
| 4.5 | 4-5-stable | >= 2.3.0 | >= 4.2, < 5.3 |
496496
| 4.3 | 4-3-stable | >= 2.3.0 | >= 4.2, < 5.3 |

Rakefile

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,7 @@ Rake::TestTask.new(:test) do |test|
1212
test.verbose = false
1313

1414
# Set interpreter warning level to 2 (verbose)
15-
#
16-
# Warnings are set to 0 on TravisCI because it has a maximum
17-
# log length of 4MB and the following warning is printed thousands of times:
18-
#
19-
# > ../postgresql/database_statements.rb:24:
20-
# > warning: rb_tainted_str_new is deprecated and will be removed in Ruby 3.2.
21-
warning_level = ENV.fetch("TRAVIS", "false") == "true" ? 0 : 2
22-
test.ruby_opts += [format("-W%d", warning_level)]
15+
test.ruby_opts += [format("-W%d", 2)]
2316
end
2417

2518
require "rubocop/rake_task"

authlogic.gemspec

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,24 +25,20 @@ require "authlogic/version"
2525
s.required_ruby_version = ">= 2.6.0"
2626

2727
# See doc/rails_support_in_authlogic_5.0.md
28-
s.add_dependency "activemodel", [">= 5.2", "< 7.2"]
29-
s.add_dependency "activerecord", [">= 5.2", "< 7.2"]
30-
s.add_dependency "activesupport", [">= 5.2", "< 7.2"]
28+
s.add_dependency "activemodel", [">= 5.2", "< 8.0"]
29+
s.add_dependency "activerecord", [">= 5.2", "< 8.0"]
30+
s.add_dependency "activesupport", [">= 5.2", "< 8.0"]
3131
s.add_dependency "request_store", "~> 1.0"
3232
s.add_development_dependency "bcrypt", "~> 3.1"
33-
s.add_development_dependency "byebug", "~> 10.0"
34-
s.add_development_dependency "coveralls", "~> 0.8.22"
33+
s.add_development_dependency "coveralls_reborn", "~> 0.28.0"
3534
s.add_development_dependency "minitest", "< 5.19.0" # See https://github.com/binarylogic/authlogic/issues/766
3635
s.add_development_dependency "minitest-reporters", "~> 1.3"
37-
s.add_development_dependency "mysql2", "~> 0.5.2"
38-
s.add_development_dependency "pg", "~> 1.1.4"
3936
s.add_development_dependency "rake", "~> 13.0"
4037
s.add_development_dependency "rubocop", "~> 0.80.1"
4138
s.add_development_dependency "rubocop-performance", "~> 1.1"
4239
s.add_development_dependency "scrypt", ">= 1.2", "< 4.0"
43-
s.add_development_dependency "simplecov", "~> 0.16.1"
44-
s.add_development_dependency "simplecov-console", "~> 0.4.2"
45-
s.add_development_dependency "sqlite3", "~> 1.4.0"
40+
s.add_development_dependency "simplecov", "~> 0.22.0"
41+
s.add_development_dependency "simplecov-console", "~> 0.9.1"
4642
s.add_development_dependency "timecop", "~> 0.7"
4743

4844
# To reduce gem size, only the minimum files are included.

gemfiles/rails_5.2.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,9 @@
33
source "https://rubygems.org"
44
gemspec path: ".."
55

6-
gem "activerecord", "~> 5.2.1"
7-
gem "activesupport", "~> 5.2.1"
6+
gem "activerecord", "~> 5.2.8.1"
7+
gem "activesupport", "~> 5.2.8.1"
8+
gem "byebug", "~> 10.0"
9+
gem "mysql2", "~> 0.5.2"
10+
gem "pg", "~> 1.1.4"
11+
gem "sqlite3", "~> 1.4.0"

gemfiles/rails_6.0.rb

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
source "https://rubygems.org"
44
gemspec path: ".."
55

6-
# Rails 6 beta 1 has been released, so you might expect us to use exactly that
7-
# version here, but it is still in flux, so we may continue using git for a
8-
# while, maybe until RC 1 is released.
9-
gem "activerecord", "~> 6.0.0"
10-
gem "activesupport", "~> 6.0.0"
6+
gem "activerecord", "~> 6.0.6.1"
7+
gem "activesupport", "~> 6.0.6.1"
8+
gem "byebug", "~> 10.0"
9+
gem "mysql2", "~> 0.5.2"
10+
gem "pg", "~> 1.1.4"
11+
gem "sqlite3", "~> 1.4.0"

gemfiles/rails_6.1.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,9 @@
33
source "https://rubygems.org"
44
gemspec path: ".."
55

6-
gem "activerecord", "~> 6.1.0"
7-
gem "activesupport", "~> 6.1.0"
6+
gem "activerecord", "~> 6.1.7.8"
7+
gem "activesupport", "~> 6.1.7.8"
8+
gem "byebug", "~> 10.0"
9+
gem "mysql2", "~> 0.5.2"
10+
gem "pg", "~> 1.1.4"
11+
gem "sqlite3", "~> 1.4.0"

gemfiles/rails_7.0.rb

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# frozen_string_literal: true
22

3-
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
4-
53
source "https://rubygems.org"
64
gemspec path: ".."
75

8-
gem "activerecord", "~> 7.0.0"
9-
gem "activesupport", "~> 7.0.0"
6+
gem "activerecord", "~> 7.0.8.4"
7+
gem "activesupport", "~> 7.0.8.4"
8+
gem "byebug", "~> 10.0"
9+
gem "mysql2", "~> 0.5.2"
10+
gem "pg", "~> 1.1.4"
11+
gem "sqlite3", "~> 1.4.0"

0 commit comments

Comments
 (0)