spree_core 5.1.2 → 5.1.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: 5a078eb338ddec6ce51734169a4a549a0beb103e9e771826813e9fba21cfd26a
4
- data.tar.gz: be388de6fdef55db241a7f5eb5655bfeefe835eb68b3dbca2c4e5b0f46e4ddd2
3
+ metadata.gz: 4653db5977ca32eb547d2b03e5813e9c8fbd20d554c4affed62c6b1eb264204c
4
+ data.tar.gz: 07f9f6dda2fa6f0a25266d6255db293aa82c97007d0fec0248f006fdc6e29573
5
5
  SHA512:
6
- metadata.gz: 411fc129ceb5be8c3c7486c14869906b4005ee3ea8caab930c0107d06c591ae865f22cf594c16896bedc3ff6d4a414b3acbe9f6fad9d981cc675d5dfe99f7188
7
- data.tar.gz: 5b0e582898ce11cd04e842faef59eebda6fca7bdf991bae9a976bcb8ef97681c11dc8094989c9ec95b9c1d8d7987b691acceab8c64b94f366ce4af5c1725aa46
6
+ metadata.gz: 958124d59a881d5c5acf8e0ed3c0bff113fefeac06bf72cd6da310628122f15bae784f321709d2f7ab0d75fd655621c669e0c3fc97a1b53841d803106fcffe81
7
+ data.tar.gz: 022d0ac938c12b166d69d4a3e83b3e472da68b5a752079249288b99bcd490cfe3608853d3cd1313453ab21e89b42f130e57f80beb03aad079a2294892e877df0
@@ -39,8 +39,12 @@ module Spree
39
39
  # this is only a fail-safe solution if developer didn't set this in environment files
40
40
  # http://guides.rubyonrails.org/action_mailer_basics.html#generating-urls-in-action-mailer-views
41
41
  def ensure_default_action_mailer_url_host(store_url = nil)
42
+ host_url = store_url.presence || current_store.try(:url_or_custom_domain)
43
+
44
+ return if host_url.blank?
45
+
42
46
  ActionMailer::Base.default_url_options ||= {}
43
- ActionMailer::Base.default_url_options[:host] ||= store_url.presence || current_store.url
47
+ ActionMailer::Base.default_url_options[:host] = host_url
44
48
  end
45
49
 
46
50
  def set_email_locale
@@ -29,7 +29,7 @@ module Spree
29
29
  return if url.blank?
30
30
  parts = url.split('.')
31
31
 
32
- errors.add(:url, 'use domain or subdomain') if (parts[0] != 'www' && parts.size > 3) || (parts[0] == 'www' && parts.size > 4) || parts.size < 2
32
+ errors.add(:url, 'use domain or subdomain') if parts.size > 4 || parts.size < 2
33
33
  end
34
34
 
35
35
  def ensure_default
@@ -221,6 +221,11 @@ module Spree
221
221
  inventory_units.where(line_item_id: line_item.id, variant_id: line_item.variant_id || variant.id)
222
222
  end
223
223
 
224
+ # Returns the total quantity of all line items in the shipment
225
+ def item_quantity
226
+ manifest.sum(&:quantity)
227
+ end
228
+
224
229
  # Returns the cost of the shipment
225
230
  #
226
231
  # @return [BigDecimal]
@@ -140,8 +140,8 @@ module Spree
140
140
  option_value_identificator = if opt[:option_value_name].present?
141
141
  opt[:option_value_name]
142
142
  else
143
- opt[:option_value_presentation].parameterize
144
- end.strip
143
+ opt[:option_value_presentation]
144
+ end.parameterize.strip
145
145
 
146
146
  option_value = option_type.option_values.where(name: option_value_identificator).first_or_initialize do |o|
147
147
  o.presentation = opt[:option_value_presentation]
@@ -38,6 +38,7 @@ module Spree
38
38
  opts[:skip_spring] = true
39
39
  opts[:skip_test] = true
40
40
  opts[:skip_bootsnap] = true
41
+ opts[:skip_asset_pipeline] = true # skip installing propshaft, we're still using sprockets as a dependency
41
42
 
42
43
  puts 'Generating dummy Rails application...'
43
44
  invoke Rails::Generators::AppGenerator,
@@ -1,5 +1,5 @@
1
1
  module Spree
2
- VERSION = '5.1.2'.freeze
2
+ VERSION = '5.1.3'.freeze
3
3
 
4
4
  def self.version
5
5
  VERSION
@@ -2,7 +2,7 @@ require 'spree/testing_support/common_rake'
2
2
 
3
3
  desc 'Generates a dummy app for testing an extension'
4
4
  namespace :extension do
5
- task :test_app, [:user_class] do |_t, args|
5
+ task :test_app, [:authentication, :user_class] do |_t, args|
6
6
  Spree::DummyGeneratorHelper.inject_extension_requirements = true
7
7
  Rake::Task['common:test_app'].execute(args.with_defaults(install_admin: true, install_storefront: true))
8
8
  end
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.1.2
4
+ version: 5.1.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-07-14 00:00:00.000000000 Z
13
+ date: 2025-07-20 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: i18n-tasks
@@ -1382,9 +1382,9 @@ licenses:
1382
1382
  - BSD-3-Clause
1383
1383
  metadata:
1384
1384
  bug_tracker_uri: https://github.com/spree/spree/issues
1385
- changelog_uri: https://github.com/spree/spree/releases/tag/v5.1.2
1385
+ changelog_uri: https://github.com/spree/spree/releases/tag/v5.1.3
1386
1386
  documentation_uri: https://docs.spreecommerce.org/
1387
- source_code_uri: https://github.com/spree/spree/tree/v5.1.2
1387
+ source_code_uri: https://github.com/spree/spree/tree/v5.1.3
1388
1388
  post_install_message:
1389
1389
  rdoc_options: []
1390
1390
  require_paths: