From bcd6e17997d39d00601af58f6a3cbb54eb042c89 Mon Sep 17 00:00:00 2001 From: Sascha Karnatz <68833+kulturbande@users.noreply.github.com> Date: Sat, 7 Feb 2026 16:45:18 +0100 Subject: [PATCH] Allow Alchemy 8.1 and Rails 8.1 Loosen the requirements to support the latest versions of Alchemy. The new Alchemy version comes also with Rails 8.1 support. --- .github/workflows/test.yml | 3 +++ Gemfile | 9 ++++++--- alchemy-solid_errors.gemspec | 4 ++-- spec/dummy/config/initializers/devise.rb | 2 +- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 973b10b..10cbc7d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,6 +21,9 @@ jobs: - alchemy_cms: "8.0" rails: "8.0" ruby: "3.4" + - alchemy_cms: "8.1" + rails: "8.1" + ruby: "3.4" env: RAILS_VERSION: ${{ matrix.rails }} ALCHEMY_CMS_VERSION: ${{ matrix.alchemy_cms }} diff --git a/Gemfile b/Gemfile index 1b4964b..1c20c2a 100644 --- a/Gemfile +++ b/Gemfile @@ -4,10 +4,13 @@ gem "puma" gem "sqlite3" alchemy_cms_version = ENV.fetch("ALCHEMY_CMS_VERSION", "8.0") -if alchemy_cms_version == "8.0" - gem "alchemy_cms", github: "AlchemyCMS/alchemy_cms", branch: "8.0-stable" - gem "alchemy-devise", github: "AlchemyCMS/alchemy-devise", branch: "main" +if alchemy_cms_version.start_with?("8.") gem "propshaft" +end + +if alchemy_cms_version == "8.1" + gem "alchemy_cms", github: "AlchemyCMS/alchemy_cms", branch: "8.1-stable" + gem "alchemy-devise", github: "AlchemyCMS/alchemy-devise", branch: "main" else gem "alchemy_cms", "~> #{alchemy_cms_version}" gem "alchemy-devise", "~> #{alchemy_cms_version}" diff --git a/alchemy-solid_errors.gemspec b/alchemy-solid_errors.gemspec index 64a6a0e..4b452d8 100644 --- a/alchemy-solid_errors.gemspec +++ b/alchemy-solid_errors.gemspec @@ -21,8 +21,8 @@ Gem::Specification.new do |spec| Dir["{app,config,db,lib}/**/*", "LICENSE", "Rakefile", "README.md"] end - spec.add_dependency "rails", ">= 7.2.0", "< 8.1" - spec.add_dependency "alchemy_cms", ">= 7.4.0", "< 8.1" + spec.add_dependency "rails", ">= 7.2.0", "< 9.0" + spec.add_dependency "alchemy_cms", ">= 7.4.0", "< 8.2" spec.add_dependency "solid_errors", ">= 0.7", "< 1.0" spec.add_development_dependency "capybara", ["~> 3.0"] diff --git a/spec/dummy/config/initializers/devise.rb b/spec/dummy/config/initializers/devise.rb index b2e7bbe..8dabbc5 100644 --- a/spec/dummy/config/initializers/devise.rb +++ b/spec/dummy/config/initializers/devise.rb @@ -189,7 +189,7 @@ # ==> Configuration for :timeoutable # The time you want to timeout the user session without activity. After this # time the user will be asked for credentials again. Default is 30 minutes. - config.timeout_in = Rails.env.development? ? nil : Alchemy::Config.get(:auto_logout_time).minutes + config.timeout_in = Rails.env.development? ? nil : alchemy_config.get(:auto_logout_time).minutes # ==> Configuration for :lockable # Defines which strategy will be used to lock an account.