Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
matrix:
alchemy_branch:
- "8.0-stable"
- "rails-8.1"
- "main"
ruby:
- "3.2"
Expand All @@ -22,10 +23,20 @@ jobs:
rails:
- "7.2"
- "8.0"
- "8.1"
database:
- mysql
- postgresql
- sqlite
exclude:
- alchemy_branch: "8.0-stable"
rails: "8.1"
- alchemy_branch: "main"
rails: "8.1"
- alchemy_branch: "rails-8.1"
rails: "8.0"
- alchemy_branch: "rails-8.1"
rails: "7.2"

env:
DB: ${{ matrix.database }}
Expand Down
4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ gem "puma", "~> 7.0"
# Specify your gem's dependencies in alchemy-solidus.gemspec
gemspec

if rails_version == "8.1"
gem "awesome_nested_set", github: "caonUlisses/awesome_nested_set", branch: "main"
end

group :test do
if ENV["DB"].nil? || ENV["DB"] == "sqlite"
gem "sqlite3", "~> 2.5"
Expand Down
5 changes: 2 additions & 3 deletions config/routes.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
Alchemy::Engine.routes.draw do
namespace :admin, {
namespace :admin,
path: Alchemy.admin_path,
constraints: Alchemy.admin_constraints
} do
constraints: Alchemy.admin_constraints do
devise_for :user,
class_name: "Alchemy::User",
singular: :user,
Expand Down
8 changes: 6 additions & 2 deletions spec/models/user_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,9 @@ module Alchemy
describe "#logged_in?" do
let(:user) { build(:alchemy_user) }

before { stub_alchemy_config(:auto_logout_time, 60) }
before do
allow(Alchemy.config).to receive(:auto_logout_time).and_return(60)
end

it "should return logged in status" do
user.last_request_at = 30.minutes.ago
Expand All @@ -296,7 +298,9 @@ module Alchemy
describe "#logged_out?" do
let(:user) { build(:alchemy_user) }

before { stub_alchemy_config(:auto_logout_time, 60) }
before do
allow(Alchemy.config).to receive(:auto_logout_time).and_return(60)
end

it "should return logged in status" do
user.last_request_at = 2.hours.ago
Expand Down
Loading