alchemy-solidus 3.3.0 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -3
- data/Rakefile +3 -1
- data/app/assets/javascripts/alchemy/solidus/admin/select2_config.js +1 -1
- data/app/assets/javascripts/alchemy/solidus/admin/taxon_select.js +1 -1
- data/app/models/alchemy/essence_spree_product.rb +5 -3
- data/app/models/alchemy/essence_spree_taxon.rb +5 -3
- data/app/models/alchemy/essence_spree_variant.rb +4 -2
- data/app/views/alchemy/essences/_essence_spree_taxon_editor.html.erb +1 -1
- data/app/views/alchemy/ingredients/_spree_product_editor.html.erb +26 -0
- data/app/views/alchemy/ingredients/_spree_product_view.html.erb +1 -0
- data/app/views/alchemy/ingredients/_spree_taxon_editor.html.erb +26 -0
- data/app/views/alchemy/ingredients/_spree_taxon_view.html.erb +1 -0
- data/app/views/alchemy/ingredients/_spree_variant_editor.html.erb +26 -0
- data/app/views/alchemy/ingredients/_spree_variant_view.html.erb +1 -0
- data/config/initializers/alchemy.rb +3 -1
- data/lib/alchemy/solidus/engine.rb +3 -12
- data/lib/alchemy/solidus/version.rb +1 -1
- data/lib/generators/alchemy/solidus/install/install_generator.rb +0 -3
- data/lib/models/alchemy/ingredients/spree_product.rb +15 -0
- data/lib/models/alchemy/ingredients/spree_taxon.rb +15 -0
- data/lib/models/alchemy/ingredients/spree_variant.rb +15 -0
- metadata +26 -21
- data/config/initializers/solidus.rb +0 -29
- data/lib/alchemy/solidus/spree_custom_user_generator_fix.rb +0 -9
- data/lib/alchemy/solidus/spree_install_generator_fix.rb +0 -29
- data/lib/views/spree/admin/shared/_tabs.html.erb +0 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 83174dea5ed68edc46ddb776b57d178ec200c6b63c2d674c177efcee4d8766c7
|
4
|
+
data.tar.gz: 579502a6211889f8cc709503c03d80c5542f349af0e856284e10130e01bfc631
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c50e7d485496ae38dd9524760cbfb4561f550c9ff735a9ec3fb1bbcf2c8af202409f2e620f2f704be84c2e0025c76bb76ebfc70a2093b98bdcb8108ef09d5ca
|
7
|
+
data.tar.gz: d6a22895a674dfdaee445a3b631dc684dc4557985f120bc3743d6e5eb153c4cd85078e06d57bf30bf9c3b76f3b67f7393108b96fb13164a13eb7771855f82b2e
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
[![
|
1
|
+
[![CI](https://github.com/AlchemyCMS/alchemy-solidus/workflows/CI/badge.svg?branch=main)](https://github.com/AlchemyCMS/alchemy-solidus/actions?query=workflow%3ACI+branch%3Amain)
|
2
2
|
[![Gem Version](https://badge.fury.io/rb/alchemy-solidus.svg)](https://badge.fury.io/rb/alchemy-solidus)
|
3
3
|
|
4
4
|
# Alchemy-Solidus
|
@@ -13,15 +13,19 @@ This is a [AlchemyCMS](https://alchemy-cms.com) and [Solidus](https://solidus.io
|
|
13
13
|
|
14
14
|
### Solidus
|
15
15
|
|
16
|
-
This version runs with Solidus
|
16
|
+
This version runs with Solidus v2.11 and v3.0.
|
17
17
|
|
18
|
+
- For a Solidus < 2.11 compatible version please use the `3.1-stable` branch or `3.3.0` gem version.
|
18
19
|
- For a Solidus < 2.6 compatible version please use the `2.3-stable` branch or `2.3.2` gem version.
|
19
20
|
- For a Solidus 1.x compatible version please use the `1.0-stable` branch or `1.1.0` gem version.
|
20
21
|
|
22
|
+
> **NOTE:** If you are using Solidus v3.0 with Alchemy v5.3, make sure to also use Rails v6.0 and the legacy image attachment adapter (paperclip) and not the active storage adapter, since this needs Rails >= 6.1 and Alchemy v5.3 is not Rails 6.1 compatible. You need Alchemy v6.0 for Rails >= 6.1.
|
23
|
+
|
21
24
|
### Alchemy
|
22
25
|
|
23
|
-
This version runs with Alchemy
|
26
|
+
This version runs with Alchemy v5.x and v6.0.
|
24
27
|
|
28
|
+
- For a Alchemy 4.x compatible version please use the `3.1-stable` branch or `3.3.0` gem version.
|
25
29
|
- For a Alchemy 4.0 compatible version please use the `2.3-stable` branch or `2.3.2` gem version.
|
26
30
|
- For a Alchemy 3.x compatible version please use the `1.0-stable` branch or `1.1.0` gem version.
|
27
31
|
|
data/Rakefile
CHANGED
@@ -20,7 +20,9 @@ task :test_setup do
|
|
20
20
|
system <<-SETUP.strip_heredoc
|
21
21
|
export RAILS_ENV=test && \
|
22
22
|
bin/rake db:environment:set db:drop && \
|
23
|
-
bin/
|
23
|
+
bin/rake gutentag:install:migrations && \
|
24
|
+
bin/rails g gutentag:migration_versions && \
|
25
|
+
bin/rails g #{ENV["SOLIDUS_BRANCH"].match?(/^2.+/) ? "spree" : "solidus"}:install --force --auto-accept --no-seed --no-sample && \
|
24
26
|
bin/rails g alchemy:solidus:install --auto-accept --force
|
25
27
|
SETUP
|
26
28
|
exit($?.exitstatus) unless $?.success?
|
@@ -4,14 +4,16 @@ module Alchemy
|
|
4
4
|
class EssenceSpreeProduct < ActiveRecord::Base
|
5
5
|
PRODUCT_ID = /\A\d+\z/
|
6
6
|
|
7
|
-
belongs_to :product,
|
8
|
-
|
7
|
+
belongs_to :product,
|
8
|
+
class_name: "Spree::Product",
|
9
|
+
optional: true,
|
10
|
+
foreign_key: "spree_product_id"
|
9
11
|
|
10
12
|
acts_as_essence(ingredient_column: :product)
|
11
13
|
|
12
14
|
def ingredient=(product_or_id)
|
13
15
|
case product_or_id
|
14
|
-
when PRODUCT_ID
|
16
|
+
when PRODUCT_ID, ""
|
15
17
|
self.spree_product_id = product_or_id
|
16
18
|
when Spree::Product
|
17
19
|
self.product = product_or_id
|
@@ -4,14 +4,16 @@ module Alchemy
|
|
4
4
|
class EssenceSpreeTaxon < ActiveRecord::Base
|
5
5
|
TAXON_ID = /\A\d+\z/
|
6
6
|
|
7
|
-
belongs_to :taxon,
|
8
|
-
|
7
|
+
belongs_to :taxon,
|
8
|
+
class_name: "Spree::Taxon",
|
9
|
+
optional: true,
|
10
|
+
foreign_key: "taxon_id"
|
9
11
|
|
10
12
|
acts_as_essence(ingredient_column: :taxon)
|
11
13
|
|
12
14
|
def ingredient=(taxon_or_id)
|
13
15
|
case taxon_or_id
|
14
|
-
when TAXON_ID
|
16
|
+
when TAXON_ID, ""
|
15
17
|
self.taxon_id = taxon_or_id
|
16
18
|
when Spree::Taxon
|
17
19
|
self.taxon = taxon_or_id
|
@@ -4,13 +4,15 @@ module Alchemy
|
|
4
4
|
class EssenceSpreeVariant < ActiveRecord::Base
|
5
5
|
VARIANT_ID = /\A\d+\z/
|
6
6
|
|
7
|
-
belongs_to :variant,
|
7
|
+
belongs_to :variant,
|
8
|
+
class_name: "Spree::Variant",
|
9
|
+
optional: true
|
8
10
|
|
9
11
|
acts_as_essence(ingredient_column: :variant)
|
10
12
|
|
11
13
|
def ingredient=(variant_or_id)
|
12
14
|
case variant_or_id
|
13
|
-
when VARIANT_ID
|
15
|
+
when VARIANT_ID, ""
|
14
16
|
self.variant_id = variant_or_id
|
15
17
|
when Spree::Variant
|
16
18
|
self.variant = variant_or_id
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<%= content_tag :div,
|
2
|
+
class: spree_product_editor.css_classes,
|
3
|
+
data: spree_product_editor.data_attributes do %>
|
4
|
+
<%= element_form.fields_for(:ingredients, spree_product_editor.ingredient) do |f| %>
|
5
|
+
<%= ingredient_label(spree_product_editor, :product_id) %>
|
6
|
+
<%= f.text_field :product_id,
|
7
|
+
value: spree_product_editor.product&.id,
|
8
|
+
id: spree_product_editor.form_field_id(:product_id),
|
9
|
+
class: 'alchemy_selectbox full_width' %>
|
10
|
+
<% end %>
|
11
|
+
<% end %>
|
12
|
+
|
13
|
+
<script>
|
14
|
+
$('#<%= spree_product_editor.form_field_id(:product_id) %>').alchemyProductSelect({
|
15
|
+
placeholder: "<%= Alchemy.t(:search_product, scope: 'solidus') %>",
|
16
|
+
apiToken: "<%= current_alchemy_user.spree_api_key %>",
|
17
|
+
baseUrl: "<%= spree.api_products_path %>",
|
18
|
+
query_params: <%== spree_product_editor.settings[:query_params].to_json %>,
|
19
|
+
<% if spree_product_editor.product %>
|
20
|
+
initialSelection: {
|
21
|
+
id: <%= spree_product_editor.product.id %>,
|
22
|
+
text: "<%= spree_product_editor.product.name %>"
|
23
|
+
}
|
24
|
+
<% end %>
|
25
|
+
})
|
26
|
+
</script>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= spree_product_view.product&.name %>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<%= content_tag :div,
|
2
|
+
class: spree_taxon_editor.css_classes,
|
3
|
+
data: spree_taxon_editor.data_attributes do %>
|
4
|
+
<%= element_form.fields_for(:ingredients, spree_taxon_editor.ingredient) do |f| %>
|
5
|
+
<%= ingredient_label(spree_taxon_editor, :taxon_id) %>
|
6
|
+
<%= f.text_field :taxon_id,
|
7
|
+
value: spree_taxon_editor.taxon&.id,
|
8
|
+
id: spree_taxon_editor.form_field_id(:taxon_id),
|
9
|
+
class: 'alchemy_selectbox full_width' %>
|
10
|
+
<% end %>
|
11
|
+
<% end %>
|
12
|
+
|
13
|
+
<script>
|
14
|
+
$('#<%= spree_taxon_editor.form_field_id(:taxon_id) %>').alchemyTaxonSelect({
|
15
|
+
placeholder: "<%= Alchemy.t(:search_taxon, scope: 'solidus') %>",
|
16
|
+
apiToken: "<%= current_alchemy_user.spree_api_key %>",
|
17
|
+
baseUrl: "<%= spree.api_taxons_path %>",
|
18
|
+
query_params: <%== spree_taxon_editor.settings[:query_params].to_json %>,
|
19
|
+
<% if spree_taxon_editor.taxon %>
|
20
|
+
initialSelection: {
|
21
|
+
id: <%= spree_taxon_editor.taxon.id %>,
|
22
|
+
text: "<%= spree_taxon_editor.taxon.pretty_name %>"
|
23
|
+
}
|
24
|
+
<% end %>
|
25
|
+
})
|
26
|
+
</script>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= spree_taxon_view.taxon&.name %>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<%= content_tag :div,
|
2
|
+
class: spree_variant_editor.css_classes,
|
3
|
+
data: spree_variant_editor.data_attributes do %>
|
4
|
+
<%= element_form.fields_for(:ingredients, spree_variant_editor.ingredient) do |f| %>
|
5
|
+
<%= ingredient_label(spree_variant_editor, :variant_id) %>
|
6
|
+
<%= f.text_field :variant_id,
|
7
|
+
value: spree_variant_editor.variant&.id,
|
8
|
+
id: spree_variant_editor.form_field_id(:variant_id),
|
9
|
+
class: 'alchemy_selectbox full_width' %>
|
10
|
+
<% end %>
|
11
|
+
<% end %>
|
12
|
+
|
13
|
+
<script>
|
14
|
+
$('#<%= spree_variant_editor.form_field_id(:variant_id) %>').alchemyVariantSelect({
|
15
|
+
placeholder: "<%= Alchemy.t(:search_variant, scope: 'solidus') %>",
|
16
|
+
apiToken: "<%= current_alchemy_user.spree_api_key %>",
|
17
|
+
baseUrl: "<%= spree.api_variants_path %>",
|
18
|
+
query_params: <%== spree_variant_editor.settings[:query_params].to_json %>,
|
19
|
+
<% if spree_variant_editor.variant %>
|
20
|
+
initialSelection: {
|
21
|
+
id: <%= spree_variant_editor.variant.id %>,
|
22
|
+
text: "<%= spree_variant_editor.variant.name %>"
|
23
|
+
}
|
24
|
+
<% end %>
|
25
|
+
})
|
26
|
+
</script>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= spree_variant_view.variant&.name %>
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'alchemy_cms'
|
2
|
+
require 'alchemy/version'
|
2
3
|
require 'solidus_core'
|
3
4
|
require 'solidus_backend'
|
4
5
|
require 'solidus_support'
|
@@ -23,11 +24,6 @@ module Alchemy
|
|
23
24
|
require 'alchemy/solidus/spree_admin_unauthorized_redirect'
|
24
25
|
end
|
25
26
|
|
26
|
-
if Spree.solidus_gem_version < Gem::Version.new('2.5')
|
27
|
-
require 'alchemy/solidus/spree_custom_user_generator_fix'
|
28
|
-
require 'alchemy/solidus/spree_install_generator_fix'
|
29
|
-
end
|
30
|
-
|
31
27
|
if SolidusSupport.frontend_available?
|
32
28
|
# Allows to render Alchemy content within Solidus' controller views
|
33
29
|
require_dependency 'alchemy/solidus/alchemy_in_solidus'
|
@@ -47,13 +43,8 @@ module Alchemy
|
|
47
43
|
end
|
48
44
|
end
|
49
45
|
|
50
|
-
|
51
|
-
|
52
|
-
# passing this option.) This option is used to configure the paths
|
53
|
-
# for which a given tab is active.
|
54
|
-
#
|
55
|
-
if Spree.solidus_gem_version < Gem::Version.new('2.8')
|
56
|
-
paths['app/views'] << 'lib/views'
|
46
|
+
if Alchemy.gem_version >= Gem::Version.new('6.0.0.b1')
|
47
|
+
paths['app/models'] << 'lib/models'
|
57
48
|
end
|
58
49
|
end
|
59
50
|
end
|
@@ -55,9 +55,6 @@ module Alchemy
|
|
55
55
|
arguments = options[:auto_accept] ? ['Alchemy::User', '--force'] : ['Alchemy::User']
|
56
56
|
Spree::CustomUserGenerator.start(arguments)
|
57
57
|
gsub_file 'lib/spree/authentication_helpers.rb', /main_app\./, 'Alchemy.'
|
58
|
-
if Spree.solidus_gem_version < Gem::Version.new('2.5.0')
|
59
|
-
gsub_file 'config/initializers/spree.rb', /Spree\.user_class.?=.?.+$/, 'Spree.user_class = "Alchemy::User"'
|
60
|
-
end
|
61
58
|
rake('db:migrate', abort_on_failure: true)
|
62
59
|
end
|
63
60
|
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Alchemy
|
4
|
+
module Ingredients
|
5
|
+
class SpreeProduct < Alchemy::Ingredient
|
6
|
+
related_object_alias :product, class_name: "Spree::Product"
|
7
|
+
|
8
|
+
def preview_text(maxlength)
|
9
|
+
return unless product
|
10
|
+
|
11
|
+
product.name[0..maxlength - 1]
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Alchemy
|
4
|
+
module Ingredients
|
5
|
+
class SpreeTaxon < Alchemy::Ingredient
|
6
|
+
related_object_alias :taxon, class_name: "Spree::Taxon"
|
7
|
+
|
8
|
+
def preview_text(maxlength)
|
9
|
+
return unless taxon
|
10
|
+
|
11
|
+
taxon.name[0..maxlength - 1]
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Alchemy
|
4
|
+
module Ingredients
|
5
|
+
class SpreeVariant < Alchemy::Ingredient
|
6
|
+
related_object_alias :variant, class_name: "Spree::Variant"
|
7
|
+
|
8
|
+
def preview_text(maxlength)
|
9
|
+
return unless variant
|
10
|
+
|
11
|
+
variant.descriptive_name[0..maxlength - 1]
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alchemy-solidus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas von Deyen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-04-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: alchemy_cms
|
@@ -16,60 +16,60 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 5.0.0
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '6.
|
22
|
+
version: '6.1'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
29
|
+
version: 5.0.0
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '6.
|
32
|
+
version: '6.1'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: solidus_core
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
37
|
- - ">="
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version: 2.
|
39
|
+
version: 2.10.0
|
40
40
|
- - "<"
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: '
|
42
|
+
version: '4.0'
|
43
43
|
type: :runtime
|
44
44
|
prerelease: false
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
47
|
- - ">="
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version: 2.
|
49
|
+
version: 2.10.0
|
50
50
|
- - "<"
|
51
51
|
- !ruby/object:Gem::Version
|
52
|
-
version: '
|
52
|
+
version: '4.0'
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
54
|
name: solidus_backend
|
55
55
|
requirement: !ruby/object:Gem::Requirement
|
56
56
|
requirements:
|
57
57
|
- - ">="
|
58
58
|
- !ruby/object:Gem::Version
|
59
|
-
version: 2.
|
59
|
+
version: 2.10.0
|
60
60
|
- - "<"
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: '
|
62
|
+
version: '4.0'
|
63
63
|
type: :runtime
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
67
|
- - ">="
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: 2.
|
69
|
+
version: 2.10.0
|
70
70
|
- - "<"
|
71
71
|
- !ruby/object:Gem::Version
|
72
|
-
version: '
|
72
|
+
version: '4.0'
|
73
73
|
- !ruby/object:Gem::Dependency
|
74
74
|
name: solidus_support
|
75
75
|
requirement: !ruby/object:Gem::Requirement
|
@@ -104,14 +104,14 @@ dependencies:
|
|
104
104
|
requirements:
|
105
105
|
- - "~>"
|
106
106
|
- !ruby/object:Gem::Version
|
107
|
-
version: '
|
107
|
+
version: '5.0'
|
108
108
|
type: :development
|
109
109
|
prerelease: false
|
110
110
|
version_requirements: !ruby/object:Gem::Requirement
|
111
111
|
requirements:
|
112
112
|
- - "~>"
|
113
113
|
- !ruby/object:Gem::Version
|
114
|
-
version: '
|
114
|
+
version: '5.0'
|
115
115
|
- !ruby/object:Gem::Dependency
|
116
116
|
name: shoulda-matchers
|
117
117
|
requirement: !ruby/object:Gem::Requirement
|
@@ -220,9 +220,14 @@ files:
|
|
220
220
|
- app/views/alchemy/essences/_essence_spree_taxon_view.html.erb
|
221
221
|
- app/views/alchemy/essences/_essence_spree_variant_editor.html.erb
|
222
222
|
- app/views/alchemy/essences/_essence_spree_variant_view.html.erb
|
223
|
+
- app/views/alchemy/ingredients/_spree_product_editor.html.erb
|
224
|
+
- app/views/alchemy/ingredients/_spree_product_view.html.erb
|
225
|
+
- app/views/alchemy/ingredients/_spree_taxon_editor.html.erb
|
226
|
+
- app/views/alchemy/ingredients/_spree_taxon_view.html.erb
|
227
|
+
- app/views/alchemy/ingredients/_spree_variant_editor.html.erb
|
228
|
+
- app/views/alchemy/ingredients/_spree_variant_view.html.erb
|
223
229
|
- app/views/spree/admin/shared/_alchemy_sub_menu.html.erb
|
224
230
|
- config/initializers/alchemy.rb
|
225
|
-
- config/initializers/solidus.rb
|
226
231
|
- config/locales/alchemy_solidus_en.yml
|
227
232
|
- config/locales/alchemy_solidus_it.yml
|
228
233
|
- config/locales/en.yml
|
@@ -234,14 +239,14 @@ files:
|
|
234
239
|
- lib/alchemy/solidus/alchemy_user_extension.rb
|
235
240
|
- lib/alchemy/solidus/engine.rb
|
236
241
|
- lib/alchemy/solidus/spree_admin_unauthorized_redirect.rb
|
237
|
-
- lib/alchemy/solidus/spree_custom_user_generator_fix.rb
|
238
|
-
- lib/alchemy/solidus/spree_install_generator_fix.rb
|
239
242
|
- lib/alchemy/solidus/spree_user_extension.rb
|
240
243
|
- lib/alchemy/solidus/use_solidus_layout.rb
|
241
244
|
- lib/alchemy/solidus/version.rb
|
242
245
|
- lib/generators/alchemy/solidus/install/files/db/seeds/alchemy/pages.yml
|
243
246
|
- lib/generators/alchemy/solidus/install/install_generator.rb
|
244
|
-
- lib/
|
247
|
+
- lib/models/alchemy/ingredients/spree_product.rb
|
248
|
+
- lib/models/alchemy/ingredients/spree_taxon.rb
|
249
|
+
- lib/models/alchemy/ingredients/spree_variant.rb
|
245
250
|
homepage: https://github.com/AlchemyCMS/alchemy-solidus
|
246
251
|
licenses:
|
247
252
|
- BSD New
|
@@ -261,7 +266,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
261
266
|
- !ruby/object:Gem::Version
|
262
267
|
version: '0'
|
263
268
|
requirements: []
|
264
|
-
rubygems_version: 3.
|
269
|
+
rubygems_version: 3.1.6
|
265
270
|
signing_key:
|
266
271
|
specification_version: 4
|
267
272
|
summary: The World's Most Flexible E-Commerce Platform meets The World's Most Flexible
|
@@ -1,29 +0,0 @@
|
|
1
|
-
# In versions of Solidus prior to 2.8, we override this class to
|
2
|
-
# add the match_path option to the initializer. (Version 2.8 has
|
3
|
-
# this option already.) This option is used in the tabs partial
|
4
|
-
# to configure the paths for which a given tab is active.
|
5
|
-
#
|
6
|
-
if Spree.solidus_gem_version < Gem::Version.new('2.8')
|
7
|
-
Spree::BackendConfiguration::MenuItem.class_eval do
|
8
|
-
attr_reader :match_path
|
9
|
-
|
10
|
-
def initialize(
|
11
|
-
sections,
|
12
|
-
icon,
|
13
|
-
condition: nil,
|
14
|
-
label: nil,
|
15
|
-
partial: nil,
|
16
|
-
url: nil,
|
17
|
-
match_path: nil
|
18
|
-
)
|
19
|
-
|
20
|
-
@condition = condition || -> { true }
|
21
|
-
@sections = sections
|
22
|
-
@icon = icon
|
23
|
-
@label = label || sections.first
|
24
|
-
@partial = partial
|
25
|
-
@url = url
|
26
|
-
@match_path = match_path
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
@@ -1,9 +0,0 @@
|
|
1
|
-
require 'active_record/migration'
|
2
|
-
require 'generators/spree/custom_user/custom_user_generator'
|
3
|
-
|
4
|
-
Spree::CustomUserGenerator.class_eval do
|
5
|
-
def self.next_migration_number(dirname)
|
6
|
-
next_migration_number = current_migration_number(dirname) + 1
|
7
|
-
ActiveRecord::Migration.next_migration_number(next_migration_number)
|
8
|
-
end
|
9
|
-
end
|
@@ -1,29 +0,0 @@
|
|
1
|
-
require 'generators/spree/install/install_generator'
|
2
|
-
|
3
|
-
Spree::InstallGenerator.class_eval do
|
4
|
-
CORE_MOUNT_ROUTE = "mount Spree::Core::Engine"
|
5
|
-
|
6
|
-
def install_routes
|
7
|
-
routes_file_path = File.join('config', 'routes.rb')
|
8
|
-
unless File.read(routes_file_path).include? CORE_MOUNT_ROUTE
|
9
|
-
insert_into_file routes_file_path, after: "Rails.application.routes.draw do\n" do
|
10
|
-
<<-ROUTES
|
11
|
-
# This line mounts Solidus's routes at the root of your application.
|
12
|
-
# This means, any requests to URLs such as /products, will go to Spree::ProductsController.
|
13
|
-
# If you would like to change where this engine is mounted, simply change the :at option to something different.
|
14
|
-
#
|
15
|
-
# We ask that you don't use the :as option here, as Solidus relies on it being the default of "spree"
|
16
|
-
#{CORE_MOUNT_ROUTE}, at: '/'
|
17
|
-
|
18
|
-
ROUTES
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
unless options[:quiet]
|
23
|
-
puts "*" * 50
|
24
|
-
puts "We added the following line to your application's config/routes.rb file:"
|
25
|
-
puts " "
|
26
|
-
puts " #{CORE_MOUNT_ROUTE}, at: '/'"
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
@@ -1,15 +0,0 @@
|
|
1
|
-
<% Spree::Backend::Config.menu_items.each do |menu_item| %>
|
2
|
-
<% if instance_exec(&menu_item.condition) %>
|
3
|
-
<%=
|
4
|
-
tab(
|
5
|
-
*menu_item.sections,
|
6
|
-
icon: menu_item.icon,
|
7
|
-
label: menu_item.label,
|
8
|
-
url: menu_item.url.is_a?(Symbol) ? spree.public_send(menu_item.url) : menu_item.url,
|
9
|
-
match_path: menu_item.match_path
|
10
|
-
) do
|
11
|
-
%>
|
12
|
-
<%- render partial: menu_item.partial if menu_item.partial %>
|
13
|
-
<%- end %>
|
14
|
-
<% end %>
|
15
|
-
<% end %>
|