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 support: Remove custom essences #90

Merged
merged 9 commits into from
Mar 31, 2023
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
12 changes: 7 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,27 @@ jobs:
ruby-version:
- "3.0"
- "3.1"
- "3.2"
alchemy:
- "6.0"
- "6.1"
- "7.0.0-a"
solidus:
- "3.2"
- "3.3"
env:
ALCHEMY_VERSION: ${{ matrix.alchemy }}
SOLIDUS_VERSION: ${{ matrix.solidus }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- name: Set up Node
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: 14
- name: Prepare tests
run: bundle exec rake test_setup
- name: Run tests
run: bundle exec rake
run: bundle exec rspec
8 changes: 4 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ gem "solidus_core", "~> #{solidus_version}.0"
gem "solidus_frontend", "~> #{solidus_version}.0"
gem "solidus_backend", "~> #{solidus_version}.0"

alchemy_version = ENV.fetch("ALCHEMY_VERSION", "6.1")
gem "alchemy_cms", "~> #{alchemy_version}.0"
gem "alchemy-devise", "~> #{alchemy_version}.0"
gem "alchemy_cms", "~> 7.0.0-a"
gem "alchemy-devise", github: "AlchemyCMS/alchemy-devise", branch: "main"

# Specify your gem's dependencies in alchemy-solidus.gemspec
gemspec

gem "sqlite3"
gem "pry-rails"
gem "sprockets", "< 4"
gem "sprockets", "~> 4.0"
gem "jsbundling-rails", "~> 1.1"
gem "rails", "~> 6.1.0"
gem "listen"
gem "puma"
Expand Down
4 changes: 3 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ task :test_setup do
bin/rails g gutentag:migration_versions && \
bin/rails g solidus:install --force --auto-accept --no-seed --no-sample #{solidus_install_options} && \
bin/rails g solidus_frontend:install --force --auto-accept && \
bin/rails javascript:install:esbuild && \
bin/rails g alchemy:solidus:install --auto-accept --force && \
bin/rake db:test:prepare
bin/rake db:test:prepare && \
bin/rails javascript:build
SETUP
exit($?.exitstatus) unless $?.success?
end
Expand Down
4 changes: 2 additions & 2 deletions alchemy-solidus.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ Gem::Specification.new do |gem|
gem.require_paths = ["lib"]
gem.version = Alchemy::Solidus::VERSION

gem.add_dependency("alchemy_cms", [">= 6.0.0", "< 7"])
gem.add_dependency("alchemy_cms", [">= 7.0.0.a", "< 8"])
gem.add_dependency("solidus_core", [">= 3.0.0", "< 4.0"])
gem.add_dependency("solidus_backend", [">= 3.0.0", "< 4.0"])
gem.add_dependency("solidus_support", [">= 0.1.1"])
gem.add_dependency("deface", ["~> 1.0"])

gem.add_development_dependency("rspec-rails", ["~> 5.0"])
gem.add_development_dependency("rspec-rails", ["~> 6.0"])
gem.add_development_dependency("shoulda-matchers", ["~> 4.0"])
gem.add_development_dependency("capybara", ["~> 2.15"])
gem.add_development_dependency("capybara-screenshot", ["~> 1.0"])
Expand Down
30 changes: 0 additions & 30 deletions app/models/alchemy/essence_spree_product.rb

This file was deleted.

30 changes: 0 additions & 30 deletions app/models/alchemy/essence_spree_taxon.rb

This file was deleted.

29 changes: 0 additions & 29 deletions app/models/alchemy/essence_spree_variant.rb

This file was deleted.

26 changes: 0 additions & 26 deletions app/views/alchemy/essences/_essence_spree_product_editor.html.erb

This file was deleted.

Empty file.
26 changes: 0 additions & 26 deletions app/views/alchemy/essences/_essence_spree_taxon_editor.html.erb

This file was deleted.

Empty file.
26 changes: 0 additions & 26 deletions app/views/alchemy/essences/_essence_spree_variant_editor.html.erb

This file was deleted.

Empty file.
4 changes: 1 addition & 3 deletions spec/dummy/app/assets/config/manifest.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@

//= link_tree ../images
//= link_directory ../javascripts .js
//= link_directory ../stylesheets .css
//= link rails5_engine_manifest.js
//= link_tree ../builds
13 changes: 13 additions & 0 deletions spec/dummy/app/views/alchemy/elements/_all_you_can_eat.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<%- cache(all_you_can_eat) do -%>
<%= element_view_for(all_you_can_eat) do |el| -%>
<div class="product">
<%= el.render(:product) %>
</div>
<div class="variant">
<%= el.render(:variant) %>
</div>
<div class="taxon">
<%= el.render(:taxon) %>
</div>
<%- end -%>
<%- end -%>
2 changes: 1 addition & 1 deletion spec/dummy/app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<%= csrf_meta_tags %>

<%= stylesheet_link_tag 'application', media: 'all' %>
<%= javascript_include_tag 'application' %>
<%= javascript_include_tag "application", "data-turbo-track": "reload", defer: true %>
</head>

<body>
Expand Down
4 changes: 4 additions & 0 deletions spec/dummy/config/alchemy/elements.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# == In this configuration, you set up Alchemy's element layouts.
#
# For further information please see http://guides.alchemy-cms.com/stable/elements.html

4 changes: 4 additions & 0 deletions spec/dummy/db/seeds.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

Spree::Core::Engine.load_seed if defined?(Spree::Core)
Spree::Auth::Engine.load_seed if defined?(Spree::Auth)
Alchemy::Seeder.seed!
11 changes: 11 additions & 0 deletions spec/dummy/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "app",
"private": "true",
"dependencies": {
"@alchemy_cms/admin": "~7.0.0-a",
"esbuild": "^0.17.14"
},
"scripts": {
"build": "esbuild app/javascript/*.* --bundle --sourcemap --outdir=app/assets/builds --public-path=assets"
}
}
1 change: 0 additions & 1 deletion spec/features/alchemy/alchemy_admin_integrations_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
require "alchemy/version"
require "rails_helper"
require "alchemy/devise/test_support/factories"

RSpec.feature "Admin Integration", type: :feature do
let!(:user) do
Expand Down
71 changes: 0 additions & 71 deletions spec/models/alchemy/essence_spree_product_spec.rb

This file was deleted.

Loading