From 3cd77fb5e30efa0b34ba0a90c47826414e0fa0f2 Mon Sep 17 00:00:00 2001 From: Bohdan Zhuravel Date: Tue, 22 Oct 2024 15:12:43 +0300 Subject: [PATCH 01/13] Support Rails 8.0 --- .github/workflows/test.yml | 4 +++- CHANGELOG.md | 2 +- CONTRIBUTING.md | 14 +++++++++----- README.md | 2 +- authlogic.gemspec | 6 +++--- gemfiles/rails_5.2.rb | 2 +- gemfiles/rails_6.0.rb | 2 +- gemfiles/rails_6.1.rb | 2 +- gemfiles/rails_7.0.rb | 2 +- gemfiles/rails_7.1.rb | 2 +- gemfiles/rails_7.2.rb | 2 +- gemfiles/rails_8.0.rb | 10 ++++++++++ 12 files changed, 33 insertions(+), 17 deletions(-) create mode 100644 gemfiles/rails_8.0.rb diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b0950165..7e94c7bd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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" @@ -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: diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f2ea655..52a980e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e72cb2ae..d5cb3118 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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 ``` @@ -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 @@ -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 diff --git a/README.md b/README.md index abb5115d..5e2a95ce 100644 --- a/README.md +++ b/README.md @@ -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 | diff --git a/authlogic.gemspec b/authlogic.gemspec index c57f4851..d0eb418c 100644 --- a/authlogic.gemspec +++ b/authlogic.gemspec @@ -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" diff --git a/gemfiles/rails_5.2.rb b/gemfiles/rails_5.2.rb index 2bc3332a..4840c6f5 100644 --- a/gemfiles/rails_5.2.rb +++ b/gemfiles/rails_5.2.rb @@ -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" diff --git a/gemfiles/rails_6.0.rb b/gemfiles/rails_6.0.rb index 9e2d6b31..69147ebe 100644 --- a/gemfiles/rails_6.0.rb +++ b/gemfiles/rails_6.0.rb @@ -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" diff --git a/gemfiles/rails_6.1.rb b/gemfiles/rails_6.1.rb index 4b9e1c13..ed03ee5b 100644 --- a/gemfiles/rails_6.1.rb +++ b/gemfiles/rails_6.1.rb @@ -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" diff --git a/gemfiles/rails_7.0.rb b/gemfiles/rails_7.0.rb index e919463d..1fdddbbc 100644 --- a/gemfiles/rails_7.0.rb +++ b/gemfiles/rails_7.0.rb @@ -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" diff --git a/gemfiles/rails_7.1.rb b/gemfiles/rails_7.1.rb index c247ed79..fecba797 100644 --- a/gemfiles/rails_7.1.rb +++ b/gemfiles/rails_7.1.rb @@ -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" diff --git a/gemfiles/rails_7.2.rb b/gemfiles/rails_7.2.rb index 3710dbbb..8904a020 100644 --- a/gemfiles/rails_7.2.rb +++ b/gemfiles/rails_7.2.rb @@ -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" diff --git a/gemfiles/rails_8.0.rb b/gemfiles/rails_8.0.rb new file mode 100644 index 00000000..f75c48e4 --- /dev/null +++ b/gemfiles/rails_8.0.rb @@ -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" From 318c758ad5cc8901a0d4c52c90af28519e0f8d19 Mon Sep 17 00:00:00 2001 From: Bohdan Zhuravel Date: Fri, 8 Nov 2024 11:45:26 +0200 Subject: [PATCH 02/13] Cleanup --- gemfiles/rails_8.0.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gemfiles/rails_8.0.rb b/gemfiles/rails_8.0.rb index f75c48e4..f7270f39 100644 --- a/gemfiles/rails_8.0.rb +++ b/gemfiles/rails_8.0.rb @@ -3,8 +3,8 @@ source "https://rubygems.org" gemspec path: ".." -gem "activerecord", "~> 8.0.0.beta" -gem "activesupport", "~> 8.0.0.beta" +gem "activerecord", "~> 8.0.0" +gem "activesupport", "~> 8.0.0" gem "mysql2", "~> 0.5.6" gem "pg", "~> 1.5.8" gem "sqlite3", "~> 2.1.0" From 71ad6410b81c2565973966c6276ccd86fb8957bd Mon Sep 17 00:00:00 2001 From: Brendon Muir Date: Fri, 28 Mar 2025 11:36:39 +1300 Subject: [PATCH 03/13] mutex_m is a seperate gem now --- authlogic.gemspec | 1 + 1 file changed, 1 insertion(+) diff --git a/authlogic.gemspec b/authlogic.gemspec index d0eb418c..e1a45ae7 100644 --- a/authlogic.gemspec +++ b/authlogic.gemspec @@ -34,6 +34,7 @@ require "authlogic/version" s.add_development_dependency "coveralls_reborn", "~> 0.28.0" s.add_development_dependency "minitest", "< 5.19.0" # See https://github.com/binarylogic/authlogic/issues/766 s.add_development_dependency "minitest-reporters", "~> 1.3" + s.add_development_dependency "mutex_m", "~> 0.3.0" s.add_development_dependency "rake", "~> 13.0" s.add_development_dependency "rubocop", "~> 0.80.1" s.add_development_dependency "rubocop-performance", "~> 1.1" From a55947747871353197be7bb636673f0d6606dcd6 Mon Sep 17 00:00:00 2001 From: Brendon Muir Date: Fri, 28 Mar 2025 11:40:26 +1300 Subject: [PATCH 04/13] Lean on require_relative Remove `require "active_record"` --- authlogic.gemspec | 4 ++-- lib/authlogic.rb | 60 ++++++++++++++++++++--------------------------- 2 files changed, 28 insertions(+), 36 deletions(-) diff --git a/authlogic.gemspec b/authlogic.gemspec index e1a45ae7..407d9194 100644 --- a/authlogic.gemspec +++ b/authlogic.gemspec @@ -1,8 +1,8 @@ # frozen_string_literal: true require "English" -$LOAD_PATH.push File.expand_path("lib", __dir__) -require "authlogic/version" + +require_relative "lib/authlogic/version" ::Gem::Specification.new do |s| s.name = "authlogic" diff --git a/lib/authlogic.rb b/lib/authlogic.rb index 13e94c11..d3a18de1 100644 --- a/lib/authlogic.rb +++ b/lib/authlogic.rb @@ -1,5 +1,29 @@ # frozen_string_literal: true +require_relative "authlogic/errors" +require_relative "authlogic/i18n" +require_relative "authlogic/random" +require_relative "authlogic/config" + +require_relative "authlogic/controller_adapters/abstract_adapter" +require_relative "authlogic/cookie_credentials" + +require_relative "authlogic/crypto_providers" + +require_relative "authlogic/acts_as_authentic/email" +require_relative "authlogic/acts_as_authentic/logged_in_status" +require_relative "authlogic/acts_as_authentic/login" +require_relative "authlogic/acts_as_authentic/magic_columns" +require_relative "authlogic/acts_as_authentic/password" +require_relative "authlogic/acts_as_authentic/perishable_token" +require_relative "authlogic/acts_as_authentic/persistence_token" +require_relative "authlogic/acts_as_authentic/session_maintenance" +require_relative "authlogic/acts_as_authentic/single_access_token" +require_relative "authlogic/acts_as_authentic/base" + +require_relative "authlogic/session/magic_column/assigns_last_request_at" +require_relative "authlogic/session/base" + # Authlogic uses ActiveSupport's core extensions like `strip_heredoc` and # `squish`. ActiveRecord does not `require` these exensions, so we must. # @@ -8,37 +32,5 @@ # decision if it becomes a problem. require "active_support/all" -require "active_record" - -path = File.dirname(__FILE__) + "/authlogic/" - -[ - "errors", - "i18n", - "random", - "config", - - "controller_adapters/abstract_adapter", - "cookie_credentials", - - "crypto_providers", - - "acts_as_authentic/email", - "acts_as_authentic/logged_in_status", - "acts_as_authentic/login", - "acts_as_authentic/magic_columns", - "acts_as_authentic/password", - "acts_as_authentic/perishable_token", - "acts_as_authentic/persistence_token", - "acts_as_authentic/session_maintenance", - "acts_as_authentic/single_access_token", - "acts_as_authentic/base", - - "session/magic_column/assigns_last_request_at", - "session/base" -].each do |library| - require path + library -end - -require path + "controller_adapters/rails_adapter" if defined?(Rails) -require path + "controller_adapters/sinatra_adapter" if defined?(Sinatra) +require_relative "authlogic/controller_adapters/rails_adapter" if defined?(Rails) +require_relative "authlogic/controller_adapters/sinatra_adapter" if defined?(Sinatra) From 6f7d8a05085fc3d2929e9b444c450121e761892e Mon Sep 17 00:00:00 2001 From: Brendon Muir Date: Fri, 28 Mar 2025 11:40:47 +1300 Subject: [PATCH 05/13] Use ActiveSupport.on_load :active_record to mount authlogic --- lib/authlogic/acts_as_authentic/base.rb | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/lib/authlogic/acts_as_authentic/base.rb b/lib/authlogic/acts_as_authentic/base.rb index 54b3c402..e58fd327 100644 --- a/lib/authlogic/acts_as_authentic/base.rb +++ b/lib/authlogic/acts_as_authentic/base.rb @@ -104,13 +104,15 @@ def first_column_to_exist(*columns_to_check) end end -::ActiveRecord::Base.send :include, Authlogic::ActsAsAuthentic::Base -::ActiveRecord::Base.send :include, Authlogic::ActsAsAuthentic::Email -::ActiveRecord::Base.send :include, Authlogic::ActsAsAuthentic::LoggedInStatus -::ActiveRecord::Base.send :include, Authlogic::ActsAsAuthentic::Login -::ActiveRecord::Base.send :include, Authlogic::ActsAsAuthentic::MagicColumns -::ActiveRecord::Base.send :include, Authlogic::ActsAsAuthentic::Password -::ActiveRecord::Base.send :include, Authlogic::ActsAsAuthentic::PerishableToken -::ActiveRecord::Base.send :include, Authlogic::ActsAsAuthentic::PersistenceToken -::ActiveRecord::Base.send :include, Authlogic::ActsAsAuthentic::SessionMaintenance -::ActiveRecord::Base.send :include, Authlogic::ActsAsAuthentic::SingleAccessToken +ActiveSupport.on_load :active_record do + ActiveRecord::Base.send :include, Authlogic::ActsAsAuthentic::Base + ActiveRecord::Base.send :include, Authlogic::ActsAsAuthentic::Email + ActiveRecord::Base.send :include, Authlogic::ActsAsAuthentic::LoggedInStatus + ActiveRecord::Base.send :include, Authlogic::ActsAsAuthentic::Login + ActiveRecord::Base.send :include, Authlogic::ActsAsAuthentic::MagicColumns + ActiveRecord::Base.send :include, Authlogic::ActsAsAuthentic::Password + ActiveRecord::Base.send :include, Authlogic::ActsAsAuthentic::PerishableToken + ActiveRecord::Base.send :include, Authlogic::ActsAsAuthentic::PersistenceToken + ActiveRecord::Base.send :include, Authlogic::ActsAsAuthentic::SessionMaintenance + ActiveRecord::Base.send :include, Authlogic::ActsAsAuthentic::SingleAccessToken +end From ee03da0ea9f45aa080ff894bbf06fb0c69852c3f Mon Sep 17 00:00:00 2001 From: Brendon Muir Date: Fri, 28 Mar 2025 11:41:04 +1300 Subject: [PATCH 06/13] require "rubygems" causes a circular dependency warning --- lib/authlogic/version.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/authlogic/version.rb b/lib/authlogic/version.rb index 5002164a..5ac0a0db 100644 --- a/lib/authlogic/version.rb +++ b/lib/authlogic/version.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require "rubygems" - # :nodoc: module Authlogic # Returns a `::Gem::Version`, the version number of the authlogic gem. From c40ca5d28e49692837eeebf55681d5636060dd4a Mon Sep 17 00:00:00 2001 From: Brendon Muir Date: Fri, 28 Mar 2025 12:19:39 +1300 Subject: [PATCH 07/13] Convert additional require calls to require_relative --- lib/authlogic/acts_as_authentic/login.rb | 4 ++-- lib/authlogic/i18n.rb | 2 +- lib/authlogic/test_case.rb | 12 ++++++------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/authlogic/acts_as_authentic/login.rb b/lib/authlogic/acts_as_authentic/login.rb index c445ca2b..b553f108 100644 --- a/lib/authlogic/acts_as_authentic/login.rb +++ b/lib/authlogic/acts_as_authentic/login.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true -require "authlogic/acts_as_authentic/queries/case_sensitivity" -require "authlogic/acts_as_authentic/queries/find_with_case" +require_relative "queries/case_sensitivity" +require_relative "queries/find_with_case" module Authlogic module ActsAsAuthentic diff --git a/lib/authlogic/i18n.rb b/lib/authlogic/i18n.rb index 7334c25e..15bc54b9 100644 --- a/lib/authlogic/i18n.rb +++ b/lib/authlogic/i18n.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require "authlogic/i18n/translator" +require_relative "i18n/translator" module Authlogic # This class allows any message in Authlogic to use internationalization. In diff --git a/lib/authlogic/test_case.rb b/lib/authlogic/test_case.rb index 8c7b655b..067c4b33 100644 --- a/lib/authlogic/test_case.rb +++ b/lib/authlogic/test_case.rb @@ -1,11 +1,11 @@ # frozen_string_literal: true -require File.dirname(__FILE__) + "/test_case/rails_request_adapter" -require File.dirname(__FILE__) + "/test_case/mock_api_controller" -require File.dirname(__FILE__) + "/test_case/mock_cookie_jar" -require File.dirname(__FILE__) + "/test_case/mock_controller" -require File.dirname(__FILE__) + "/test_case/mock_logger" -require File.dirname(__FILE__) + "/test_case/mock_request" +require_relative "test_case/rails_request_adapter" +require_relative "test_case/mock_api_controller" +require_relative "test_case/mock_cookie_jar" +require_relative "test_case/mock_controller" +require_relative "test_case/mock_logger" +require_relative "test_case/mock_request" # :nodoc: module Authlogic From 97babdb07a72e22508e279ba41271c802431d6f6 Mon Sep 17 00:00:00 2001 From: Brendon Muir Date: Fri, 28 Mar 2025 12:25:34 +1300 Subject: [PATCH 08/13] Upgrade rubygems and loosen bundler version requirement --- .github/workflows/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7e94c7bd..1dbb5fe1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -82,7 +82,8 @@ jobs: ruby-version: ${{ matrix.ruby }} - name: Bundle run: | - gem install bundler -v 2.4.22 + gem update --system + gem install bundler bundle install --jobs 4 --retry 3 env: BUNDLE_GEMFILE: gemfiles/rails_${{ matrix.rails }}.rb From ed212a253dfbe172c0fdef794443e3ebc61168f3 Mon Sep 17 00:00:00 2001 From: Brendon Muir Date: Fri, 28 Mar 2025 12:31:12 +1300 Subject: [PATCH 09/13] Try not bundling explicitly --- .github/workflows/test.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1dbb5fe1..72077705 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -80,11 +80,6 @@ jobs: uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} - - name: Bundle - run: | - gem update --system - gem install bundler - bundle install --jobs 4 --retry 3 env: BUNDLE_GEMFILE: gemfiles/rails_${{ matrix.rails }}.rb From 143db02f67d37fb9fc317963d0d63807e40e5177 Mon Sep 17 00:00:00 2001 From: Brendon Muir Date: Fri, 28 Mar 2025 12:52:23 +1300 Subject: [PATCH 10/13] Update ruby and rails matrix to supported versions --- .github/workflows/test.yml | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 72077705..6ddda6ed 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -59,20 +59,21 @@ jobs: # To keep matrix size down, only test highest and lowest rubies. In # `.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", "8.0"] + ruby: ["3.1", "3.2", "3.3", "3.4"] + rails: ["7.0", "7.1", "7.2", "8.0"] exclude: # rails 7 requires ruby >= 2.7.0 - - ruby: "2.6" - rails: "7.0" - - ruby: "2.6" - rails: "7.1" - - ruby: "2.6" - rails: "7.2" - - ruby: "2.6" - rails: "8.0" - - ruby: "3.3" - rails: "5.2" + - rails: "7.0" + ruby: "3.1" + - rails: "7.0" + ruby: "3.2" + - rails: "7.0" + ruby: "3.3" + - rails: "7.0" + ruby: "3.4" + - rails: "8.0" + ruby: "3.1" + steps: - name: Checkout source uses: actions/checkout@v4 From 165109ed91a7b4ca557dfc413c59ab694c43535e Mon Sep 17 00:00:00 2001 From: Brendon Muir Date: Fri, 28 Mar 2025 12:58:45 +1300 Subject: [PATCH 11/13] Declare the gemfile globally --- .github/workflows/test.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6ddda6ed..87465b80 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -73,7 +73,8 @@ jobs: ruby: "3.4" - rails: "8.0" ruby: "3.1" - + env: + BUNDLE_GEMFILE: gemfiles/rails_${{ matrix.rails }}.rb steps: - name: Checkout source uses: actions/checkout@v4 @@ -81,8 +82,6 @@ jobs: uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} - env: - BUNDLE_GEMFILE: gemfiles/rails_${{ matrix.rails }}.rb # MySQL db was created above, sqlite will be created during test suite, # when migrations occur, so we only need to create the postgres db. I @@ -106,13 +105,11 @@ jobs: - name: Test, sqlite run: bundle exec rake test env: - BUNDLE_GEMFILE: gemfiles/rails_${{ matrix.rails }}.rb DB: sqlite - name: Test, mysql run: bundle exec rake test env: BACKTRACE: 1 - BUNDLE_GEMFILE: gemfiles/rails_${{ matrix.rails }}.rb DB: mysql AUTHLOGIC_DB_NAME: authlogic AUTHLOGIC_DB_USER: root @@ -122,7 +119,6 @@ jobs: run: bundle exec rake test env: BACKTRACE: 1 - BUNDLE_GEMFILE: gemfiles/rails_${{ matrix.rails }}.rb DB: postgres AUTHLOGIC_DB_NAME: authlogic AUTHLOGIC_DB_USER: postgres From cd75c887feef30019c55cf7c3f7cdf796e84a19a Mon Sep 17 00:00:00 2001 From: Brendon Muir Date: Fri, 28 Mar 2025 13:02:35 +1300 Subject: [PATCH 12/13] Try bundler cache --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 87465b80..487e5304 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -82,7 +82,7 @@ jobs: uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} - + bundler-cache: true # MySQL db was created above, sqlite will be created during test suite, # when migrations occur, so we only need to create the postgres db. I # tried something like `cd .....dummy_app && ....db:create`, but couldn't From f2c01d453ec7f4ded078483e010f1673dc13d3c6 Mon Sep 17 00:00:00 2001 From: Ben Johnson Date: Thu, 10 Apr 2025 18:05:51 -0700 Subject: [PATCH 13/13] Release 6.5.0 Signed-off-by: Ben Johnson --- CHANGELOG.md | 3 +++ README.md | 4 +++- lib/authlogic/version.rb | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 52a980e9..2317c2b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,12 +7,15 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## Unreleased +## 6.5.0 (2025-04-10) + - Breaking Changes - None - Added - None - Fixed - [#770](https://github.com/binarylogic/authlogic/pull/770) - Adds support for Rails 7.2 and 8.0 + - [#777](https://github.com/binarylogic/authlogic/pull/777) - Loads authlogic once Active Record has successfully loaded ## 6.4.3 (2023-12-17) diff --git a/README.md b/README.md index 5e2a95ce..d8c621f7 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ An unobtrusive ruby authentication library based on ActiveRecord. | Version | Documentation | | ---------- | ----------------------------------------------------------------- | | Unreleased | https://github.com/binarylogic/authlogic/blob/master/README.md | +| 6.5.0 | https://github.com/binarylogic/authlogic/blob/v6.5.0/README.md | | 6.4.3 | https://github.com/binarylogic/authlogic/blob/v6.4.3/README.md | | 5.2.0 | https://github.com/binarylogic/authlogic/blob/v5.2.0/README.md | | 4.5.0 | https://github.com/binarylogic/authlogic/blob/v4.5.0/README.md | @@ -490,7 +491,8 @@ in `authlogic/session/base.rb`. | Version | branch | ruby | activerecord | | ------- | ---------- | -------- | ------------- | -| 6.4.3 | 6-4-stable | >= 2.4.0 | >= 5.2, < 8.1 | +| 6.5.0 | 6-5-stable | >= 2.4.0 | >= 5.2, < 8.0 | +| 6.4.3 | 6-4-stable | >= 2.4.0 | >= 5.2, < 7.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 | diff --git a/lib/authlogic/version.rb b/lib/authlogic/version.rb index 5ac0a0db..debf43e4 100644 --- a/lib/authlogic/version.rb +++ b/lib/authlogic/version.rb @@ -15,6 +15,6 @@ module Authlogic # # @api public def self.gem_version - ::Gem::Version.new("6.4.3") + ::Gem::Version.new("6.5.0") end end