spree_core 5.0.2 → 5.0.3
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 61dc753fc9921cc827589519ccd19bdd4db91ff9ba052174e84e6681578b67a3
|
4
|
+
data.tar.gz: 9e992274856bc445de5a7b4041126721e992e1554aa0d677ff87c908a52c6cc9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a6b74d64d7be259de034cfc831f6eaf9877f9f801a3312adda2af3983060948e8434e2ef4d7ad4b3fdbeac7ff366ae6d87a210b27f7172769abbda9243e46b5
|
7
|
+
data.tar.gz: f31e47f912ee551e853fe190e1acd34009d3c191cc9666797db4986fbecbb445062e6533de35489998dbdea569d85fd9bf0fd54ee3e27047c5c373e6c2a62ad6
|
data/app/models/spree/store.rb
CHANGED
@@ -187,7 +187,7 @@ module Spree
|
|
187
187
|
#
|
188
188
|
default_scope { order(created_at: :asc) }
|
189
189
|
scope :by_custom_domain, ->(url) { left_joins(:custom_domains).where("#{Spree::CustomDomain.table_name}.url" => url) }
|
190
|
-
scope :by_url, ->(url) { where("#{table_name}.url like ?", "%#{url}%") }
|
190
|
+
scope :by_url, ->(url) { where(url: url).or(where("#{table_name}.url like ?", "%#{url}%")) }
|
191
191
|
|
192
192
|
#
|
193
193
|
# Delegations
|
data/app/models/spree/theme.rb
CHANGED
@@ -113,6 +113,9 @@ module Spree
|
|
113
113
|
end
|
114
114
|
end
|
115
115
|
|
116
|
+
# Creates a new preview for the theme
|
117
|
+
#
|
118
|
+
# @return [Spree::Theme]
|
116
119
|
def create_preview
|
117
120
|
ActiveRecord::Base.connected_to(role: :writing) do
|
118
121
|
ApplicationRecord.transaction do
|
@@ -152,16 +155,46 @@ module Spree
|
|
152
155
|
end
|
153
156
|
end
|
154
157
|
|
158
|
+
# Returns an array of available layout section classes for the theme
|
159
|
+
#
|
160
|
+
# @return [Array<Class>]
|
155
161
|
def available_layout_sections
|
156
|
-
|
162
|
+
[
|
163
|
+
*Rails.application.config.spree.theme_layout_sections,
|
164
|
+
*custom_layout_sections
|
165
|
+
]
|
166
|
+
end
|
167
|
+
|
168
|
+
# Returns an array of custom layout section classes for the theme
|
169
|
+
#
|
170
|
+
# @return [Array<Class>]
|
171
|
+
def custom_layout_sections
|
172
|
+
# you can override this method in your theme to return a list of custom layout sections for your theme
|
173
|
+
# [Spree::PageSections::Custom, Spree::PageSections::Custom2]
|
174
|
+
[]
|
157
175
|
end
|
158
176
|
|
177
|
+
# Returns an array of available page section classes for the theme
|
178
|
+
#
|
179
|
+
# @return [Array<Class>]
|
159
180
|
def available_page_sections
|
160
181
|
return @available_page_sections if @available_page_sections
|
161
182
|
|
162
|
-
@available_page_sections ||=
|
163
|
-
|
164
|
-
|
183
|
+
@available_page_sections ||= [
|
184
|
+
*Rails.application.config.spree.page_sections.find_all do |section_class|
|
185
|
+
section_class.role == 'content'
|
186
|
+
end,
|
187
|
+
*custom_page_sections
|
188
|
+
].sort_by(&:name)
|
189
|
+
end
|
190
|
+
|
191
|
+
# Returns an array of custom page section classes for the theme
|
192
|
+
#
|
193
|
+
# @return [Array<Class>]
|
194
|
+
def custom_page_sections
|
195
|
+
# you can override this method in your theme to return a list of custom page sections for your theme
|
196
|
+
# [Spree::PageSections::Custom, Spree::PageSections::Custom2]
|
197
|
+
[]
|
165
198
|
end
|
166
199
|
|
167
200
|
def restore_defaults!
|
data/config/locales/en.yml
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
class BackfillFriendlyIdSlugLocale < ActiveRecord::Migration[6.1]
|
2
2
|
def up
|
3
|
-
|
3
|
+
if Spree::Store.default.present? && Spree::Store.default.default_locale.present?
|
4
|
+
FriendlyId::Slug.unscoped.update_all(locale: Spree::Store.default.default_locale)
|
5
|
+
end
|
4
6
|
end
|
5
7
|
|
6
8
|
def down
|
data/lib/spree/core/engine.rb
CHANGED
@@ -257,14 +257,7 @@ module Spree
|
|
257
257
|
checkout_email_entered: 'Checkout Email Entered',
|
258
258
|
checkout_step_viewed: 'Checkout Step Viewed',
|
259
259
|
checkout_step_completed: 'Checkout Step Completed',
|
260
|
-
|
261
|
-
order_completed: 'Order Completed',
|
262
|
-
order_cancelled: 'Order Cancelled',
|
263
|
-
order_refunded: 'Order Refunded',
|
264
|
-
package_shipped: 'Package Shipped',
|
265
|
-
order_fulfilled: 'Order Fulfilled',
|
266
|
-
|
267
|
-
gift_card_issued: 'Gift Card Issued'
|
260
|
+
order_completed: 'Order Completed'
|
268
261
|
}
|
269
262
|
Rails.application.config.spree.analytics_event_handlers = []
|
270
263
|
end
|
data/lib/spree/core/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.
|
4
|
+
version: 5.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Schofield
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2025-
|
13
|
+
date: 2025-05-06 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: i18n-tasks
|
@@ -1308,9 +1308,9 @@ licenses:
|
|
1308
1308
|
- BSD-3-Clause
|
1309
1309
|
metadata:
|
1310
1310
|
bug_tracker_uri: https://github.com/spree/spree/issues
|
1311
|
-
changelog_uri: https://github.com/spree/spree/releases/tag/v5.0.
|
1311
|
+
changelog_uri: https://github.com/spree/spree/releases/tag/v5.0.3
|
1312
1312
|
documentation_uri: https://docs.spreecommerce.org/
|
1313
|
-
source_code_uri: https://github.com/spree/spree/tree/v5.0.
|
1313
|
+
source_code_uri: https://github.com/spree/spree/tree/v5.0.3
|
1314
1314
|
post_install_message:
|
1315
1315
|
rdoc_options: []
|
1316
1316
|
require_paths:
|