solidus_support 0.14.0 → 0.14.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/lib/solidus_support/engine_extensions.rb +18 -12
- data/lib/solidus_support/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f806b6a51765583aba92e5da3dc943006b383572af0aaf02d1aba0ecce33ed5a
|
4
|
+
data.tar.gz: 46bb34278a3de81f7af8e2d90c4a3852430f204248904e37df898fbff4bac874
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a2ffa3274fb6a3bb433a50de1051083567c11b79d770281cd7001b2aca0b184c8ffb6c3f08c2f67c82c34fee941260e3f270e0b7ef7a689e7bb7d090fb40edbb
|
7
|
+
data.tar.gz: a8d1e98aa2fbc7657c0d2c78a84597c6950ca7618b26dd5b1c57a3dd24ea34fdbf80020bc6bbb7e0b5a70d7eb88a42782ebcc38e60dd3ee68d78102f968f8e98
|
@@ -37,16 +37,16 @@ module SolidusSupport
|
|
37
37
|
# This allows to add event subscribers to extensions without explicitly subscribing them,
|
38
38
|
# similarly to what happens in Solidus core.
|
39
39
|
def load_solidus_subscribers_from(path)
|
40
|
-
|
41
|
-
path.glob("**/*_subscriber.rb") do |subscriber_path|
|
42
|
-
require_dependency(subscriber_path)
|
43
|
-
end
|
40
|
+
return unless SolidusSupport::LegacyEventCompat.using_legacy?
|
44
41
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
42
|
+
path.glob("**/*_subscriber.rb") do |subscriber_path|
|
43
|
+
require_dependency(subscriber_path)
|
44
|
+
end
|
45
|
+
|
46
|
+
if Spree::Event.respond_to?(:activate_all_subscribers)
|
47
|
+
Spree::Event.activate_all_subscribers
|
48
|
+
else
|
49
|
+
Spree::Event.subscribers.each(&:subscribe!)
|
50
50
|
end
|
51
51
|
end
|
52
52
|
|
@@ -130,13 +130,19 @@ module SolidusSupport
|
|
130
130
|
end
|
131
131
|
|
132
132
|
initializer "#{engine_name}_#{engine}_patch_paths" do
|
133
|
-
|
134
|
-
|
133
|
+
if SolidusSupport.send(:"#{engine}_available?")
|
134
|
+
patch_paths = root.join("lib/patches/#{engine}").glob("*")
|
135
|
+
Flickwerk.patch_paths += patch_paths
|
136
|
+
end
|
135
137
|
end
|
136
138
|
|
137
139
|
initializer "#{engine_name}_#{engine}_user_patches" do |app|
|
138
140
|
app.reloader.to_prepare do
|
139
|
-
Flickwerk.aliases["Spree.user_class"] = Spree.user_class_name
|
141
|
+
Flickwerk.aliases["Spree.user_class"] = if Spree.respond_to?(:user_class_name)
|
142
|
+
Spree.user_class_name
|
143
|
+
else
|
144
|
+
Spree.user_class.name
|
145
|
+
end
|
140
146
|
end
|
141
147
|
end
|
142
148
|
|