alchemy-solidus 7.1.0 → 7.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/alchemy/solidus/admin/select2_config.js +1 -0
- data/app/decorators/models/spree/spree_product_decorator.rb +27 -0
- data/app/decorators/models/spree/spree_taxon_decorator.rb +12 -0
- data/app/decorators/models/spree/spree_variant_decorator.rb +12 -0
- data/app/models/alchemy_solidus/touch_alchemy_ingredients.rb +18 -0
- data/lib/alchemy/solidus/engine.rb +1 -0
- data/lib/alchemy/solidus/version.rb +1 -1
- metadata +20 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7e50bb72fd9136b75ae2b8ea66ca80acb37edf3322f2aa750e0ca1f9bc5e1071
|
4
|
+
data.tar.gz: b6cbccde4616f51672baf1b45df5f06d11ad63edf13fdb0c1a6f100ee0b9e819
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a8324f5ffbf7fc02fd449f30d6b3bb80378cf188b3b4f6f966bcf95b467437160f0511e37eabf1e19ee6a6ae4bf970fb4491b5f6c99989dff9abf1fdedc59fb1
|
7
|
+
data.tar.gz: 5dd149df193cfe5638e9abd2d73d127d6c334de0d2a7ab7cebc868b98e34249af41796b4ad3518b9b1a35d50796c616f8609da2d1fee924df41c7c8288369365
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Spree
|
4
|
+
module SpreeProductDecorator
|
5
|
+
def self.prepended(base)
|
6
|
+
base.include AlchemySolidus::TouchAlchemyIngredients
|
7
|
+
base.has_many :alchemy_ingredients, class_name: "Alchemy::Ingredients::SpreeProduct", as: :related_object, dependent: :nullify
|
8
|
+
end
|
9
|
+
|
10
|
+
private
|
11
|
+
|
12
|
+
# Overwritten Solidus' default behavior
|
13
|
+
#
|
14
|
+
# The Solidus implementation did not trigger `touch` on taxons, but
|
15
|
+
# updated the `updated_at` timestamp in an `update_all`.
|
16
|
+
#
|
17
|
+
# Since we want to invalidate ingredient spree taxons cache as well
|
18
|
+
# we need to use `touch` here and use the `after_touch` callback of
|
19
|
+
# Spree::Taxon
|
20
|
+
#
|
21
|
+
def touch_taxons
|
22
|
+
taxons.each(&:touch)
|
23
|
+
end
|
24
|
+
|
25
|
+
::Spree::Product.prepend self
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Spree
|
4
|
+
module SpreeTaxonDecorator
|
5
|
+
def self.prepended(base)
|
6
|
+
base.include AlchemySolidus::TouchAlchemyIngredients
|
7
|
+
base.has_many :alchemy_ingredients, class_name: "Alchemy::Ingredients::SpreeTaxon", as: :related_object, dependent: :nullify
|
8
|
+
end
|
9
|
+
|
10
|
+
::Spree::Taxon.prepend self
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Spree
|
4
|
+
module SpreeVariantDecorator
|
5
|
+
def self.prepended(base)
|
6
|
+
base.include AlchemySolidus::TouchAlchemyIngredients
|
7
|
+
base.has_many :alchemy_ingredients, class_name: "Alchemy::Ingredients::SpreeVariant", as: :related_object, dependent: :nullify
|
8
|
+
end
|
9
|
+
|
10
|
+
::Spree::Variant.prepend self
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module AlchemySolidus
|
4
|
+
module TouchAlchemyIngredients
|
5
|
+
extend ActiveSupport::Concern
|
6
|
+
|
7
|
+
included do
|
8
|
+
after_update :touch_alchemy_ingredients
|
9
|
+
after_touch :touch_alchemy_ingredients
|
10
|
+
end
|
11
|
+
|
12
|
+
private
|
13
|
+
|
14
|
+
def touch_alchemy_ingredients
|
15
|
+
alchemy_ingredients.each(&:touch)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
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: 7.1
|
4
|
+
version: 7.2.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: 2024-
|
11
|
+
date: 2024-05-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: alchemy_cms
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: 7.0.0
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
22
|
+
version: '7.2'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: 7.0.0
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
32
|
+
version: '7.2'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: solidus_core
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -77,6 +77,9 @@ dependencies:
|
|
77
77
|
- - ">="
|
78
78
|
- !ruby/object:Gem::Version
|
79
79
|
version: 0.1.1
|
80
|
+
- - "<"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '1'
|
80
83
|
type: :runtime
|
81
84
|
prerelease: false
|
82
85
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -84,6 +87,9 @@ dependencies:
|
|
84
87
|
- - ">="
|
85
88
|
- !ruby/object:Gem::Version
|
86
89
|
version: 0.1.1
|
90
|
+
- - "<"
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: '1'
|
87
93
|
- !ruby/object:Gem::Dependency
|
88
94
|
name: deface
|
89
95
|
requirement: !ruby/object:Gem::Requirement
|
@@ -186,16 +192,16 @@ dependencies:
|
|
186
192
|
name: github_changelog_generator
|
187
193
|
requirement: !ruby/object:Gem::Requirement
|
188
194
|
requirements:
|
189
|
-
- - "
|
195
|
+
- - "~>"
|
190
196
|
- !ruby/object:Gem::Version
|
191
|
-
version: '
|
197
|
+
version: '1.16'
|
192
198
|
type: :development
|
193
199
|
prerelease: false
|
194
200
|
version_requirements: !ruby/object:Gem::Requirement
|
195
201
|
requirements:
|
196
|
-
- - "
|
202
|
+
- - "~>"
|
197
203
|
- !ruby/object:Gem::Version
|
198
|
-
version: '
|
204
|
+
version: '1.16'
|
199
205
|
- !ruby/object:Gem::Dependency
|
200
206
|
name: selenium-webdriver
|
201
207
|
requirement: !ruby/object:Gem::Requirement
|
@@ -242,9 +248,13 @@ files:
|
|
242
248
|
- app/components/alchemy/ingredients/spree_product_view.rb
|
243
249
|
- app/components/alchemy/ingredients/spree_taxon_view.rb
|
244
250
|
- app/components/alchemy/ingredients/spree_variant_view.rb
|
251
|
+
- app/decorators/models/spree/spree_product_decorator.rb
|
252
|
+
- app/decorators/models/spree/spree_taxon_decorator.rb
|
253
|
+
- app/decorators/models/spree/spree_variant_decorator.rb
|
245
254
|
- app/models/alchemy/ingredients/spree_product.rb
|
246
255
|
- app/models/alchemy/ingredients/spree_taxon.rb
|
247
256
|
- app/models/alchemy/ingredients/spree_variant.rb
|
257
|
+
- app/models/alchemy_solidus/touch_alchemy_ingredients.rb
|
248
258
|
- app/overrides/alchemy/admin/pages/link/product_link.html.erb.deface
|
249
259
|
- app/overrides/alchemy/admin/pages/link/product_link_panel.html.erb.deface
|
250
260
|
- app/overrides/alchemy/admin/pages/link/product_link_sl_tab.html.erb.deface
|
@@ -280,7 +290,7 @@ files:
|
|
280
290
|
- lib/generators/alchemy/solidus/install/install_generator.rb
|
281
291
|
homepage: https://github.com/AlchemyCMS/alchemy-solidus
|
282
292
|
licenses:
|
283
|
-
- BSD
|
293
|
+
- BSD-3-Clause
|
284
294
|
metadata: {}
|
285
295
|
post_install_message:
|
286
296
|
rdoc_options: []
|
@@ -297,7 +307,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
297
307
|
- !ruby/object:Gem::Version
|
298
308
|
version: '0'
|
299
309
|
requirements: []
|
300
|
-
rubygems_version: 3.
|
310
|
+
rubygems_version: 3.5.9
|
301
311
|
signing_key:
|
302
312
|
specification_version: 4
|
303
313
|
summary: The World's Most Flexible E-Commerce Platform meets The World's Most Flexible
|