spree_core 5.1.1 → 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: 7d8a34e50f4423209d4f31a31ef6c40055c0257c83ee28d41655bd0a6c004f83
4
- data.tar.gz: 49a23607e20571089a6443447413ea236f02bd5d92518de83ddd334d859b18b8
3
+ metadata.gz: 4653db5977ca32eb547d2b03e5813e9c8fbd20d554c4affed62c6b1eb264204c
4
+ data.tar.gz: 07f9f6dda2fa6f0a25266d6255db293aa82c97007d0fec0248f006fdc6e29573
5
5
  SHA512:
6
- metadata.gz: 3e85f284aeb474a1b25d9b4c9d0f15bfae581cab26a06e7433c74bc54756e837e079eab6aca88f9e895a1f36baee7ab12b6069a839a8c3a006cef5b29f94f02b
7
- data.tar.gz: b10269230a1ca074f7de2bc16a31aa7fdd58e858d6e5ae7fd143884e72f67a0b8b4e04754effbfde836ff91763fbc082c5f74311d842f06e550dddc76ffa69b5
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
@@ -30,6 +30,7 @@ module Spree
30
30
 
31
31
  def formatted_url
32
32
  return if url.blank?
33
+ return url if url.start_with?("mailto:")
33
34
 
34
35
  @formatted_url ||= url.match(/http:\/\/|https:\/\//) ? url : "http://#{url}"
35
36
  end
@@ -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]
@@ -686,7 +686,6 @@ en:
686
686
  associated_adjustment_closed: The associated adjustment is closed, and will not be recalculated. Do you want to open it?
687
687
  at_symbol: "@"
688
688
  attachments: Attachments
689
- audit_log: Audit Log
690
689
  author: Author
691
690
  authorization_failure: Authorization Failure
692
691
  authorized: Authorized
@@ -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.1'.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
@@ -9,6 +9,12 @@ FactoryBot.define do
9
9
  trait :with_description do
10
10
  description { '<div>Test <strong>description</strong></div>' }
11
11
  end
12
+
13
+ trait :with_header_image do
14
+ after(:create) do |taxon|
15
+ taxon.image.attach(io: File.new(Spree::Core::Engine.root.join('spec', 'fixtures', 'thinking-cat.jpg')), filename: 'thinking-cat.jpg')
16
+ end
17
+ end
12
18
  end
13
19
 
14
20
  factory :automatic_taxon, parent: :taxon do
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.1
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-08 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.1
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.1
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: