Skip to content
Merged
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
19 changes: 1 addition & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,17 @@ jobs:
fail-fast: false
matrix:
alchemy_branch:
- "7.1-stable"
- "7.2-stable"
- "7.3-stable"
- "7.4-stable"
- "main"
ruby:
- "3.2"
- "3.3"
- "3.4"
rails:
- "7.1"
- "7.2"
database:
- mysql
- postgresql
- sqlite
exclude:
- alchemy_branch: "7.1-stable"
rails: "7.2"
- alchemy_branch: "7.2-stable"
rails: "7.2"
- alchemy_branch: "7.1-stable"
ruby: "3.4"
- alchemy_branch: "7.2-stable"
ruby: "3.4"
- rails: "7.1"
ruby: "3.4"

env:
DB: ${{ matrix.database }}
Expand Down Expand Up @@ -107,8 +92,6 @@ jobs:

Lint:
runs-on: ubuntu-22.04
env:
ALCHEMY_BRANCH: 7.3-stable
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
4 changes: 3 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
source "https://rubygems.org"

alchemy_branch = ENV.fetch("ALCHEMY_BRANCH", "7.4-stable")
alchemy_branch = ENV.fetch("ALCHEMY_BRANCH", "main")
gem "alchemy_cms", github: "AlchemyCMS/alchemy_cms", branch: alchemy_branch

rails_version = ENV.fetch("RAILS_VERSION", "7.2")
Expand All @@ -22,3 +22,5 @@ end
gem "github_fast_changelog", require: false

gem "standardrb", "~> 1.0", require: false

gem "propshaft", "~> 1.1"
2 changes: 1 addition & 1 deletion alchemy-devise.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Gem::Specification.new do |s|

s.files = Dir["{app,config,db,lib}/**/*", "LICENSE", "CHANGELOG.md", "README.md"]

s.add_dependency "alchemy_cms", ["~> 7.0"]
s.add_dependency "alchemy_cms", [">= 8.0.0.a", "< 9.0"]
s.add_dependency "devise", ["~> 4.9"]

s.add_development_dependency "capybara"
Expand Down
2 changes: 1 addition & 1 deletion app/mailers/alchemy/notifications.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module Alchemy
class Notifications < ActionMailer::Base
default(from: Config.get(:mailer)["mail_from"])
default(from: Alchemy.config.get(:mailer)["mail_from"])

def member_created(user)
@user = user
Expand Down
4 changes: 2 additions & 2 deletions app/models/alchemy/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class User < ActiveRecord::Base
scope :logged_in, -> { where("last_request_at > ?", logged_in_timeout.seconds.ago) }
scope :logged_out, -> { where("last_request_at is NULL or last_request_at <= ?", logged_in_timeout.seconds.ago) }

ROLES = Config.get(:user_roles)
ROLES = Alchemy.config.user_roles

class << self
def ransackable_attributes(_auth_object = nil)
Expand Down Expand Up @@ -65,7 +65,7 @@ def human_rolename(role)
end

def logged_in_timeout
Config.get(:auto_logout_time).minutes.to_i
Alchemy.config.get(:auto_logout_time).minutes.to_i
end
end

Expand Down
2 changes: 1 addition & 1 deletion app/views/alchemy/admin/users/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<% end %>

<%= content_for :toolbar do %>
<%= toolbar_button(
<%= render Alchemy::Admin::ToolbarButton.new(
icon: :plus,
label: Alchemy.t(:create_user),
url: alchemy.new_admin_user_path,
Expand Down
12 changes: 1 addition & 11 deletions config/initializers/alchemy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,6 @@
Rails.application.config.to_prepare do
require "alchemy/devise/ability"

alchemy_7_4 = Gem::Version.new("7.4.0.a")

icon = if Alchemy.gem_version.between? Gem::Version.new("7.1.0-b1"), alchemy_7_4
"group-line"
elsif Alchemy.gem_version > alchemy_7_4
"group"
else
"users"
end

Alchemy.register_ability(Alchemy::Devise::Ability)

Alchemy::Modules.register_module({
Expand All @@ -23,7 +13,7 @@
name: "modules.users",
controller: "/alchemy/admin/users",
action: "index",
icon: icon
icon: "group"
}
})

Expand Down
2 changes: 1 addition & 1 deletion lib/alchemy/devise/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Alchemy
module Devise
VERSION = "7.4.1"
VERSION = "8.0.0.a"
end
end
4 changes: 2 additions & 2 deletions lib/generators/alchemy/devise/install/templates/devise.rb.tt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Devise.setup do |config|
# Configure the e-mail address which will be shown in Devise::Mailer,
# note that it will be overwritten if you use your own mailer class
# with default "from" parameter.
config.mailer_sender = Alchemy::Config.get(:mailer)['mail_from']
config.mailer_sender = Alchemy.config.mailer.mail_from

# Configure the class responsible to send e-mails.
config.mailer = "Alchemy::Notifications"
Expand Down Expand Up @@ -188,7 +188,7 @@ Devise.setup do |config|
# ==> 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.auto_logout_time.minutes

# ==> Configuration for :lockable
# Defines which strategy will be used to lock an account.
Expand Down
Empty file removed spec/dummy/app/assets/builds/.keep
Empty file.
3 changes: 0 additions & 3 deletions spec/dummy/app/assets/builds/application.js

This file was deleted.

7 changes: 0 additions & 7 deletions spec/dummy/app/assets/builds/application.js.map

This file was deleted.

1 change: 0 additions & 1 deletion spec/dummy/app/assets/config/manifest.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
//= link_tree ../images
//= link_directory ../stylesheets .css
//= link_tree ../builds
194 changes: 0 additions & 194 deletions spec/dummy/config/alchemy/config.yml.defaults

This file was deleted.

1 change: 0 additions & 1 deletion spec/dummy/config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# require "action_text/engine"
require "action_view/railtie"
# require "action_cable/engine"
require "sprockets/railtie"
# require "rails/test_unit/railtie"

# Require the gems listed in Gemfile, including any gems
Expand Down
Loading
Loading