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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 302063843d99ebf185eba30cd4adf6842262c5209ed9bfcb28df3245f8613345
4
- data.tar.gz: 6738fa959535147c86bb3f5fbc39433f25ba11cc487dde90344b69c3f1b6a651
3
+ metadata.gz: 7e50bb72fd9136b75ae2b8ea66ca80acb37edf3322f2aa750e0ca1f9bc5e1071
4
+ data.tar.gz: b6cbccde4616f51672baf1b45df5f06d11ad63edf13fdb0c1a6f100ee0b9e819
5
5
  SHA512:
6
- metadata.gz: 2f7a580d2cc138a1325879a28107532eb10a54e0eacbf75946e38c213dd3bc06041622de03a87c4fb122448e68cde6786c8fad0a820b1bbfd97001ad7fc20015
7
- data.tar.gz: d7630e8bd505c5108163ced9ac740db11dc7e0b228f03ce197c660e8e4a79f66825d7ba4f715061f0aca5cba067e5b2413629dd94960fedf67bec6a732387afd
6
+ metadata.gz: a8324f5ffbf7fc02fd449f30d6b3bb80378cf188b3b4f6f966bcf95b467437160f0511e37eabf1e19ee6a6ae4bf970fb4491b5f6c99989dff9abf1fdedc59fb1
7
+ data.tar.gz: 5dd149df193cfe5638e9abd2d73d127d6c334de0d2a7ab7cebc868b98e34249af41796b4ad3518b9b1a35d50796c616f8609da2d1fee924df41c7c8288369365
@@ -9,6 +9,7 @@ Alchemy.Solidus.getSelect2Config = function (options) {
9
9
  return {
10
10
  placeholder: options.placeholder,
11
11
  minimumInputLength: 3,
12
+ allowClear: true,
12
13
  initSelection:
13
14
  options.initSelection ||
14
15
  function (_$el, callback) {
@@ -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
@@ -7,6 +7,7 @@ require "solidus_support"
7
7
  module Alchemy
8
8
  module Solidus
9
9
  class Engine < ::Rails::Engine
10
+ include SolidusSupport::EngineExtensions
10
11
  engine_name "alchemy_solidus"
11
12
 
12
13
  config.to_prepare do
@@ -1,5 +1,5 @@
1
1
  module Alchemy
2
2
  module Solidus
3
- VERSION = "7.1.0"
3
+ VERSION = "7.2.1"
4
4
  end
5
5
  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.0
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-03-08 00:00:00.000000000 Z
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: '8'
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: '8'
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: '0'
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: '0'
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 New
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.4.19
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