solidus_core 2.11.15 → 2.11.16

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: 170be97648ddea982ac1e60483efd0c1c9f335e435e5f800b68610bf23588bf1
4
- data.tar.gz: 43b3b39eba6eea77b196bb386d35f21cc6ab0fb4168a46a0ee0a440f9ba3f2ae
3
+ metadata.gz: eca3c22f4ee132c33aece457789669a65671005ce5b1c985a142813b699e35b0
4
+ data.tar.gz: d049f348d8cea36cb7b94a842a44a8ac818e09aa8db7bd1893f97a6217bb8459
5
5
  SHA512:
6
- metadata.gz: 4a873724850ac63a210c93304bbe5f974a85299720677cdec7c67b841728728a42d376adce4685c53b0cfcbdf46c03b27c4e282ef9a626c7e3072e519adc1ec5
7
- data.tar.gz: 657463dd2bff50cca895615e6e26660e9f3b36e4a79e6305b211364ea35aa9352eb0f7eeba798c6b339304c062c92965bcffea644b9faf9ef5e49901223d45ac
6
+ metadata.gz: 96235dffd078546e6319b38e7f582d316a009bcacf45103a8962bb6d7a7e2402bc3c867e5ad29006a461267be4bab536704a8ae2527a0f996a314c2514a01632
7
+ data.tar.gz: 4955b7cc26bfa9ca9e33023fbba57dc58b91c149971d8676fcc3779bb3852bfcd8ae3daa26091072419bda8a2ad5e16121974edca644ff7385a96f045c6785a4
@@ -30,7 +30,9 @@ module Spree
30
30
  size = style_to_size(style)
31
31
  @attachment.variant(
32
32
  resize_to_limit: size,
33
- strip: true
33
+ saver: {
34
+ strip: true
35
+ }
34
36
  ).processed
35
37
  end
36
38
 
@@ -58,7 +60,7 @@ module Spree
58
60
  end
59
61
 
60
62
  def normalize_styles(styles)
61
- styles.transform_values { |v| v.split('x') }
63
+ styles.transform_values { |v| v.split('x').map(&:to_i) }
62
64
  end
63
65
 
64
66
  def style_to_size(style)
@@ -476,8 +476,8 @@ module Spree
476
476
  "Spree::MailerSubscriber#order_finalized.",
477
477
  caller(1)
478
478
 
479
- Spree::Config.order_mailer_class.confirm_email(order).deliver_later
480
- order.update_column(:confirmation_delivered, true)
479
+ Spree::Config.order_mailer_class.confirm_email(self).deliver_later
480
+ update_column(:confirmation_delivered, true)
481
481
  end
482
482
 
483
483
  # Helper methods for checkout steps
@@ -62,18 +62,15 @@ class Spree::OrderShipping
62
62
  end
63
63
 
64
64
  inventory_units.map(&:shipment).uniq.each do |shipment|
65
- # Temporarily propagate the tracking number to the shipment as well
66
- # TODO: Remove tracking numbers from shipments.
67
- shipment.update!(tracking: tracking_number)
68
-
69
- next unless shipment.inventory_units.reload.all? { |iu| iu.shipped? || iu.canceled? }
70
- # TODO: make OrderShipping#ship_shipment call Shipment#ship! rather than
71
- # having Shipment#ship! call OrderShipping#ship_shipment. We only really
72
- # need this `update_columns` for the specs, until we make that change.
73
- shipment.update_columns(state: 'shipped', shipped_at: Time.current)
65
+ if shipment.inventory_units.reload.all? { |iu| iu.shipped? || iu.canceled? }
66
+ shipment.update!(state: "shipped", shipped_at: Time.current, tracking: tracking_number)
67
+ else
68
+ shipment.update!(tracking: tracking_number)
69
+ end
74
70
  end
75
71
 
76
72
  send_shipment_emails(carton) if stock_location.fulfillable? && !suppress_mailer # e.g. digital gift cards that aren't actually shipped
73
+ @order.shipments.reload
77
74
  @order.recalculate
78
75
 
79
76
  carton
@@ -36,6 +36,14 @@ module Spree
36
36
  end
37
37
  end
38
38
 
39
+ # Sets this price's amount to a new value, parsing it if the new value is
40
+ # a string.
41
+ #
42
+ # @param price [String, #to_d] a new amount
43
+ def amount=(price)
44
+ self[:amount] = Spree::LocalizedNumber.parse(price)
45
+ end
46
+
39
47
  def description
40
48
  payment.payment_method.name
41
49
  end
@@ -40,6 +40,14 @@ class Spree::StoreCredit < Spree::PaymentSource
40
40
  extend Spree::DisplayMoney
41
41
  money_methods :amount, :amount_used, :amount_authorized
42
42
 
43
+ # Sets this store credit's amount to a new value,
44
+ # parsing it as a localized number if the new value is a string.
45
+ #
46
+ # @param number [String, #to_d] a new amount
47
+ def amount=(number)
48
+ self[:amount] = Spree::LocalizedNumber.parse(number)
49
+ end
50
+
43
51
  def amount_remaining
44
52
  return 0.0.to_d if invalidated?
45
53
  amount - amount_used - amount_authorized
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Spree
4
- VERSION = "2.11.15"
4
+ VERSION = "2.11.16"
5
5
 
6
6
  def self.solidus_version
7
7
  VERSION
@@ -77,6 +77,7 @@ module DummyApp
77
77
  }
78
78
  }
79
79
  config.active_storage.service = :test
80
+ config.active_storage.variant_processor = ENV.fetch('ACTIVE_STORAGE_VARIANT_PROCESSOR', :mini_magick).to_sym
80
81
  end
81
82
  end
82
83
 
data/solidus_core.gemspec CHANGED
@@ -39,7 +39,7 @@ Gem::Specification.new do |s|
39
39
  s.add_dependency 'kaminari-activerecord', '~> 1.1'
40
40
  s.add_dependency 'mini_magick', '~> 4.10'
41
41
  s.add_dependency 'monetize', '~> 1.8'
42
- s.add_dependency 'kt-paperclip', '>= 4.4.0'
42
+ s.add_dependency 'kt-paperclip', ['>= 4.4.0', '< 7']
43
43
  s.add_dependency 'paranoia', '~> 2.4'
44
44
  s.add_dependency 'ransack', '~> 2.0'
45
45
  s.add_dependency 'state_machines-activerecord', '~> 0.6'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solidus_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.11.15
4
+ version: 2.11.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Solidus Team
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-10 00:00:00.000000000 Z
11
+ date: 2022-06-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionmailer
@@ -337,6 +337,9 @@ dependencies:
337
337
  - - ">="
338
338
  - !ruby/object:Gem::Version
339
339
  version: 4.4.0
340
+ - - "<"
341
+ - !ruby/object:Gem::Version
342
+ version: '7'
340
343
  type: :runtime
341
344
  prerelease: false
342
345
  version_requirements: !ruby/object:Gem::Requirement
@@ -344,6 +347,9 @@ dependencies:
344
347
  - - ">="
345
348
  - !ruby/object:Gem::Version
346
349
  version: 4.4.0
350
+ - - "<"
351
+ - !ruby/object:Gem::Version
352
+ version: '7'
347
353
  - !ruby/object:Gem::Dependency
348
354
  name: paranoia
349
355
  requirement: !ruby/object:Gem::Requirement
@@ -986,8 +992,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
986
992
  - !ruby/object:Gem::Version
987
993
  version: 1.8.23
988
994
  requirements: []
989
- rubygems_version: 3.0.3
990
- signing_key:
995
+ rubygems_version: 3.2.31
996
+ signing_key:
991
997
  specification_version: 4
992
998
  summary: Essential models, mailers, and classes for the Solidus e-commerce project.
993
999
  test_files: []