Skip to content

Commit

Permalink
Support Rails 8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuravel committed Oct 22, 2024
1 parent 261891e commit 3cd77fb
Show file tree
Hide file tree
Showing 12 changed files with 33 additions and 17 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
# `.rubocop.yml`, set `TargetRubyVersion`, to the lowest ruby version
# tested here.
ruby: ["2.6", "3.3"]
rails: ["5.2", "6.0", "6.1", "7.0", "7.1", "7.2"]
rails: ["5.2", "6.0", "6.1", "7.0", "7.1", "7.2", "8.0"]
exclude:
# rails 7 requires ruby >= 2.7.0
- ruby: "2.6"
Expand All @@ -69,6 +69,8 @@ jobs:
rails: "7.1"
- ruby: "2.6"
rails: "7.2"
- ruby: "2.6"
rails: "8.0"
- ruby: "3.3"
rails: "5.2"
steps:
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Added
- None
- Fixed
- [#770](https://github.com/binarylogic/authlogic/pull/770) - Adds support for Rails 7.2
- [#770](https://github.com/binarylogic/authlogic/pull/770) - Adds support for Rails 7.2 and 8.0

## 6.4.3 (2023-12-17)

Expand Down
14 changes: 9 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,16 @@ BUNDLE_GEMFILE=gemfiles/rails_7.1.rb bundle exec rake
# Rails 7.2
BUNDLE_GEMFILE=gemfiles/rails_7.2.rb bundle install
BUNDLE_GEMFILE=gemfiles/rails_7.2.rb bundle exec rake
# Rails 8.0
BUNDLE_GEMFILE=gemfiles/rails_8.0.rb bundle install
BUNDLE_GEMFILE=gemfiles/rails_8.0.rb bundle exec rake
```

To run a single test:

```
BUNDLE_GEMFILE=gemfiles/rails_7.2.rb \
BUNDLE_GEMFILE=gemfiles/rails_8.0.rb \
bundle exec ruby -I test path/to/test.rb
```

Expand All @@ -76,14 +80,14 @@ ruby –I test path/to/test.rb

```
mysql -e 'drop database authlogic; create database authlogic;' && \
DB=mysql BUNDLE_GEMFILE=gemfiles/rails_7.2.rb bundle exec rake
DB=mysql BUNDLE_GEMFILE=gemfiles/rails_8.0.rb bundle exec rake
```

### Test PostgreSQL

```
psql -c 'create database authlogic;' -U postgres
DB=postgres BUNDLE_GEMFILE=gemfiles/rails_7.2.rb bundle exec rake
DB=postgres BUNDLE_GEMFILE=gemfiles/rails_8.0.rb bundle exec rake
```

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

```
BUNDLE_GEMFILE=gemfiles/rails_7.2.rb bundle exec rubocop
BUNDLE_GEMFILE=gemfiles/rails_8.0.rb bundle exec rubocop
```

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

```
BUNDLE_GEMFILE=gemfiles/rails_7.2.rb bundle exec rake test
BUNDLE_GEMFILE=gemfiles/rails_8.0.rb bundle exec rake test
```

### Version Control Branches
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ in `authlogic/session/base.rb`.

| Version | branch | ruby | activerecord |
| ------- | ---------- | -------- | ------------- |
| 6.4.3 | 6-4-stable | >= 2.4.0 | >= 5.2, < 8.0 |
| 6.4.3 | 6-4-stable | >= 2.4.0 | >= 5.2, < 8.1 |
| 5.2 | 5-2-stable | >= 2.3.0 | >= 5.2, < 6.1 |
| 4.5 | 4-5-stable | >= 2.3.0 | >= 4.2, < 5.3 |
| 4.3 | 4-3-stable | >= 2.3.0 | >= 4.2, < 5.3 |
Expand Down
6 changes: 3 additions & 3 deletions authlogic.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ require "authlogic/version"
s.required_ruby_version = ">= 2.6.0"

# See doc/rails_support_in_authlogic_5.0.md
s.add_dependency "activemodel", [">= 5.2", "< 8.0"]
s.add_dependency "activerecord", [">= 5.2", "< 8.0"]
s.add_dependency "activesupport", [">= 5.2", "< 8.0"]
s.add_dependency "activemodel", [">= 5.2", "< 8.1"]
s.add_dependency "activerecord", [">= 5.2", "< 8.1"]
s.add_dependency "activesupport", [">= 5.2", "< 8.1"]
s.add_dependency "request_store", "~> 1.0"
s.add_development_dependency "bcrypt", "~> 3.1"
s.add_development_dependency "byebug", "~> 11.1.3"
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/rails_5.2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
gem "activerecord", "~> 5.2.0"
gem "activesupport", "~> 5.2.0"
gem "mysql2", "~> 0.5.6"
gem "pg", "~> 1.5.7"
gem "pg", "~> 1.5.8"
gem "sqlite3", "~> 1.4.0"
2 changes: 1 addition & 1 deletion gemfiles/rails_6.0.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
gem "activerecord", "~> 6.0.0"
gem "activesupport", "~> 6.0.0"
gem "mysql2", "~> 0.5.6"
gem "pg", "~> 1.5.7"
gem "pg", "~> 1.5.8"
gem "sqlite3", "~> 1.4.0"
2 changes: 1 addition & 1 deletion gemfiles/rails_6.1.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
gem "activerecord", "~> 6.1.0"
gem "activesupport", "~> 6.1.0"
gem "mysql2", "~> 0.5.6"
gem "pg", "~> 1.5.7"
gem "pg", "~> 1.5.8"
gem "sqlite3", "~> 1.4.0"
2 changes: 1 addition & 1 deletion gemfiles/rails_7.0.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
gem "activerecord", "~> 7.0.0"
gem "activesupport", "~> 7.0.0"
gem "mysql2", "~> 0.5.6"
gem "pg", "~> 1.5.7"
gem "pg", "~> 1.5.8"
gem "sqlite3", "~> 1.6.0"
2 changes: 1 addition & 1 deletion gemfiles/rails_7.1.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
gem "activerecord", "~> 7.1.0"
gem "activesupport", "~> 7.1.0"
gem "mysql2", "~> 0.5.6"
gem "pg", "~> 1.5.7"
gem "pg", "~> 1.5.8"
gem "sqlite3", "~> 1.6.0"
2 changes: 1 addition & 1 deletion gemfiles/rails_7.2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
gem "activerecord", "~> 7.2.0"
gem "activesupport", "~> 7.2.0"
gem "mysql2", "~> 0.5.6"
gem "pg", "~> 1.5.7"
gem "pg", "~> 1.5.8"
gem "sqlite3", "~> 2.0.0"
10 changes: 10 additions & 0 deletions gemfiles/rails_8.0.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# frozen_string_literal: true

source "https://rubygems.org"
gemspec path: ".."

gem "activerecord", "~> 8.0.0.beta"
gem "activesupport", "~> 8.0.0.beta"
gem "mysql2", "~> 0.5.6"
gem "pg", "~> 1.5.8"
gem "sqlite3", "~> 2.1.0"

0 comments on commit 3cd77fb

Please sign in to comment.