Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Alchemy 7.1 support #192

Merged
merged 3 commits into from
Jan 11, 2024
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
16 changes: 3 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ jobs:
fail-fast: false
matrix:
alchemy_branch:
- main
- "7.0-stable"
- "main"
ruby:
- "3.0"
- "3.1"
- "3.2"
- "3.3"
database:
- mysql
- postgresql
Expand Down Expand Up @@ -71,18 +73,6 @@ jobs:
sudo apt update -qq
sudo apt install -qq --fix-missing libmysqlclient-dev -o dir::cache::archives="/home/runner/apt/cache"
sudo chown -R runner /home/runner/apt/cache
- name: Restore node modules cache
id: yarn-cache
uses: actions/cache@v3
with:
path: spec/dummy/node_modules
key: ${{ runner.os }}-yarn-dummy-${{ hashFiles('./package.json') }}
restore-keys: |
${{ runner.os }}-yarn-dummy-
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 16
- name: Prepare database
run: bundle exec rake alchemy:spec:prepare
- name: Run tests & publish code coverage
Expand Down
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.0-rc1", "< 8"]
s.add_dependency "alchemy_cms", [">= 7.0.0", "< 8"]
s.add_dependency "devise", [">= 4.7.1", "< 5"]

s.add_development_dependency "capybara"
Expand Down
6 changes: 5 additions & 1 deletion app/views/alchemy/admin/users/_fields.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@
<% if can_update_role? %>
<%= f.input :alchemy_roles,
collection: @user_roles,
input_html: {multiple: true, class: 'alchemy_selectbox'},
input_html: {
multiple: true,
is: 'alchemy-select',
class: 'alchemy_selectbox'
},
as: 'select' %>
<% end %>
<% unless while_signup? %>
Expand Down
2 changes: 1 addition & 1 deletion config/initializers/alchemy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
name: "modules.users",
controller: "/alchemy/admin/users",
action: "index",
icon: "users"
icon: (Alchemy.gem_version > Gem::Version.new("7.0")) ? "group-line" : "users"
}
})

Expand Down
2 changes: 1 addition & 1 deletion spec/rails_helper.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

require_relative "./spec_helper"
require_relative "spec_helper"

# Configure Rails Environment
ENV["RAILS_ENV"] ||= "test"
Expand Down