alchemy-solidus 6.3.2 → 7.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +12 -11
- data/Rakefile +6 -16
- data/app/views/alchemy/admin/pages/_product_link_script.html.erb +10 -4
- data/lib/alchemy/solidus/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d86c94ee49a6cd83833924769726f3fc3031d9d52bf027f625193e834fe07b3f
|
4
|
+
data.tar.gz: 42a8cccc0ab2367ddb06503e3b74b9aaa8f18723417981fca1e8eb7dce97a173
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a4ea1882a360b2cdb1a5f98256ab18e0c4e7b8e5152b143875c935ce82c626fc43c8e651ccf753f1b3de33c95b0f8b57e0f74c61db894b306e4dd3e5850a015
|
7
|
+
data.tar.gz: 6ca23c0dd8267e5cb757bded3707adf8c749a36d3480ca03121f9a8a3e3bb514058d366d21879866487ca739a4f41a9446d6e56feb3939855b3ffa445489efef
|
data/README.md
CHANGED
@@ -19,8 +19,9 @@ This is a [AlchemyCMS](https://alchemy-cms.com) and [Solidus](https://solidus.io
|
|
19
19
|
|
20
20
|
### Solidus
|
21
21
|
|
22
|
-
This version runs with Solidus
|
22
|
+
This version runs with Solidus v4.0 and up.
|
23
23
|
|
24
|
+
- For a Solidus 3.x compatible version please use the `6.3-stable` branch or `6.3.1` gem version.
|
24
25
|
- For a Solidus < 2.11 compatible version please use the `3.1-stable` branch or `3.3.0` gem version.
|
25
26
|
- For a Solidus < 2.6 compatible version please use the `2.3-stable` branch or `2.3.2` gem version.
|
26
27
|
- For a Solidus 1.x compatible version please use the `1.0-stable` branch or `1.1.0` gem version.
|
@@ -29,7 +30,7 @@ This version runs with Solidus v3.0 and up.
|
|
29
30
|
|
30
31
|
### Alchemy
|
31
32
|
|
32
|
-
This version runs with Alchemy v7.0
|
33
|
+
This version runs with Alchemy v7.0 and v7.1
|
33
34
|
|
34
35
|
- For a Alchemy 6.x compatible version please use the `5.0-stable` branch or `5.0` gem version.
|
35
36
|
- For a Alchemy 5.x compatible version please use the `4.1-stable` branch or `4.1` gem version.
|
@@ -42,7 +43,7 @@ This version runs with Alchemy v7.0
|
|
42
43
|
Add this line to your applications `Gemfile`:
|
43
44
|
|
44
45
|
```ruby
|
45
|
-
gem 'alchemy-solidus', '~>
|
46
|
+
gem 'alchemy-solidus', '~> 7.0'
|
46
47
|
```
|
47
48
|
|
48
49
|
Install the gem with:
|
@@ -269,14 +270,14 @@ Please make yourself familiar with AlchemyCMS by [reading the guidelines](https:
|
|
269
270
|
```yaml
|
270
271
|
# config/alchemy/elements.yml
|
271
272
|
- name: product
|
272
|
-
|
273
|
-
|
274
|
-
|
273
|
+
ingredients:
|
274
|
+
- role: spree_product
|
275
|
+
type: SpreeProduct
|
275
276
|
|
276
277
|
- name: product_category
|
277
|
-
|
278
|
-
|
279
|
-
|
278
|
+
ingredients:
|
279
|
+
- role: spree_taxon
|
280
|
+
type: SpreeTaxon
|
280
281
|
```
|
281
282
|
|
282
283
|
### Generate the views
|
@@ -303,7 +304,7 @@ You can mix Alchemy and Solidus content in the same view.
|
|
303
304
|
<!-- app/views/alchemy/elements/_product_view.html.erb -->
|
304
305
|
<% cache element do %>
|
305
306
|
<%= element_view_for element do |el| %>
|
306
|
-
<% product = el.
|
307
|
+
<% product = el.value(:spree_product) %>
|
307
308
|
<h1><%= product.name %></h1>
|
308
309
|
<p><%= product.description %></p>
|
309
310
|
<%= el.render :text %>
|
@@ -321,7 +322,7 @@ Or for a list of taxon products
|
|
321
322
|
<h2><%= el.render :headline %></h2>
|
322
323
|
<%= el.render :description %>
|
323
324
|
|
324
|
-
<% taxon = el.
|
325
|
+
<% taxon = el.value(:spree_taxon) %>
|
325
326
|
<% taxon.products.each do |product| %>
|
326
327
|
<%= link_to product.name, spree.product_path(product) %>
|
327
328
|
<% end %>
|
data/Rakefile
CHANGED
@@ -12,25 +12,15 @@ RSpec::Core::RakeTask.new(:spec)
|
|
12
12
|
|
13
13
|
task default: %i[test_setup spec]
|
14
14
|
|
15
|
-
require "active_support/core_ext/string"
|
16
|
-
|
17
15
|
desc "Setup test app"
|
18
16
|
task :test_setup do
|
19
|
-
solidus_version = ENV.fetch("SOLIDUS_VERSION", "4.
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
solidus_install_options =
|
25
|
-
(
|
26
|
-
if solidus_version == "3.2"
|
27
|
-
solidus_32_install_options
|
28
|
-
else
|
29
|
-
solidus_33_install_options
|
30
|
-
end
|
31
|
-
)
|
17
|
+
solidus_version = ENV.fetch("SOLIDUS_VERSION", "4.3")
|
18
|
+
solidus_install_options = "--payment-method=none --frontend=none --authentication=none"
|
19
|
+
if solidus_version >= "4.3"
|
20
|
+
solidus_install_options += " --admin-preview=false"
|
21
|
+
end
|
32
22
|
Dir.chdir("spec/dummy") do
|
33
|
-
system
|
23
|
+
system <<~SETUP
|
34
24
|
bin/rake db:environment:set db:drop && \
|
35
25
|
bin/rake gutentag:install:migrations && \
|
36
26
|
bin/rails g gutentag:migration_versions && \
|
@@ -1,5 +1,7 @@
|
|
1
1
|
<script>
|
2
|
-
$("#overlay_tabs")
|
2
|
+
var $tabs = $("#overlay_tabs")
|
3
|
+
|
4
|
+
$tabs.on("SelectLinkTab.Alchemy", function(event, data) {
|
3
5
|
$("#product_link").select2("val", data.link.attr("href"))
|
4
6
|
})
|
5
7
|
$("#product_link").alchemyProductSelect({
|
@@ -31,9 +33,13 @@
|
|
31
33
|
id: Spree.mountedAt() + "products/"+ product.slug,
|
32
34
|
text: product.name
|
33
35
|
})
|
34
|
-
$
|
35
|
-
$("
|
36
|
-
|
36
|
+
if (typeof $tabs.tabs === "function") {
|
37
|
+
$tabs.tabs("option", "active",
|
38
|
+
$("#overlay_tabs > div").index($("#overlay_tab_product_link"))
|
39
|
+
)
|
40
|
+
} else {
|
41
|
+
$tabs.get(0).show('overlay_tab_product_link')
|
42
|
+
}
|
37
43
|
}
|
38
44
|
})
|
39
45
|
},
|
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: 7.0.1
|
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: 2024-01-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: alchemy_cms
|
@@ -36,7 +36,7 @@ dependencies:
|
|
36
36
|
requirements:
|
37
37
|
- - ">="
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version:
|
39
|
+
version: 4.0.0
|
40
40
|
- - "<"
|
41
41
|
- !ruby/object:Gem::Version
|
42
42
|
version: '5'
|
@@ -46,7 +46,7 @@ dependencies:
|
|
46
46
|
requirements:
|
47
47
|
- - ">="
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version:
|
49
|
+
version: 4.0.0
|
50
50
|
- - "<"
|
51
51
|
- !ruby/object:Gem::Version
|
52
52
|
version: '5'
|
@@ -56,7 +56,7 @@ dependencies:
|
|
56
56
|
requirements:
|
57
57
|
- - ">="
|
58
58
|
- !ruby/object:Gem::Version
|
59
|
-
version:
|
59
|
+
version: 4.0.0
|
60
60
|
- - "<"
|
61
61
|
- !ruby/object:Gem::Version
|
62
62
|
version: '5'
|
@@ -66,7 +66,7 @@ dependencies:
|
|
66
66
|
requirements:
|
67
67
|
- - ">="
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version:
|
69
|
+
version: 4.0.0
|
70
70
|
- - "<"
|
71
71
|
- !ruby/object:Gem::Version
|
72
72
|
version: '5'
|