spree_core 5.3.0 → 5.3.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5d6583fe2ea61bf166c3e25d8739ea9b953b396c35acfbb4e47edde6d612d59d
4
- data.tar.gz: 3bc0a7d98a739e16e3857eabdf23cbb25a989f17cf7186ae0632ced2bff36ac4
3
+ metadata.gz: 955b622bdd29054fb4bdb3e336a4a72e36c03f20e54cec6704aed0ed00407f17
4
+ data.tar.gz: 2b0d4168fa45ce1814d16b42c54241b1b63034a586281bccd5fb6297f1634aac
5
5
  SHA512:
6
- metadata.gz: 66a7c9d1bbe53c07cf36032a2b61ebf850489a3e5b3e515c2916ad9bfa685b10e7a2bc7d8d0a5de1cb8241e7b96e0c31eb60de3351e306e6347a25f52032faf3
7
- data.tar.gz: 9dca332fe825e8342f9b2492bbd555e3d6b2868ae1a5a9f5f99a163d86efd28fba5c0bb63df74f9b304f1b2fb65f8aa9481bbca22c6757b13c7a05851c1d456e
6
+ metadata.gz: 68f6b6296a2d489c54009a8d52586e268d01c7894785c6cf1d5d0d428a6e8fa2365b8b29296bbc4a4452004efedea81c397d73ceb3047f6e9d9e9370af41fc7e
7
+ data.tar.gz: 6ec77c2ecee5028ee57e03664dfb2fec39794867e04659fb0fcb1d7042287a8b912705f1c20674a9be68c00c0050a54d6cc3e05bc73b36f9112b1c2bfb931619
@@ -10,6 +10,7 @@ module Spree
10
10
  return failure(nil, error: 'No image link') if get_image_link(input[:variant], input[:product]).nil?
11
11
 
12
12
  information['id'] = input[:variant].id
13
+ information['item_group_id'] = input[:product].id
13
14
  information['title'] = format_title(input[:product], input[:variant])
14
15
  information['description'] = get_description(input[:product], input[:variant])
15
16
  information['link'] = "#{input[:store].url}/products/#{input[:product].slug}"
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  # Applies a gift card to an order
3
4
  # under the hood it creates a store credit payment record and updates the gift card amount used
4
5
  # @param gift_card [Spree::GiftCard] the gift card to apply
@@ -16,6 +17,14 @@ module Spree
16
17
  # we shouldn't allow a gift card to be applied to an order with a different currency
17
18
  return failure(:gift_card_mismatched_currency) if gift_card.currency != order.currency
18
19
 
20
+ # gift card requires logged user
21
+ if gift_card.user.present?
22
+ # user must be logged in
23
+ return failure(:gift_card_customer_not_logged_in) if order.user.blank?
24
+ # user must be the same as the gift card user
25
+ return failure(:gift_card_mismatched_customer) if gift_card.user != order.user
26
+ end
27
+
19
28
  amount = [gift_card.amount_remaining, order.total].min
20
29
  store = order.store
21
30
 
@@ -1190,7 +1190,10 @@ en:
1190
1190
  gift_card_already_redeemed: The Gift Card has already been redeemed.
1191
1191
  gift_card_applied: The Gift Card was successfully applied to your order!
1192
1192
  gift_card_batch: Gift Card Batch
1193
+ gift_card_customer_not_logged_in: Gift Card cannot be applied with guest user.
1193
1194
  gift_card_expired: The Gift Card has expired.
1195
+ gift_card_mismatched_currency: Gift Card cannot be applied with current currency.
1196
+ gift_card_mismatched_customer: This gift card is associated with another user.
1194
1197
  gift_card_removed: The Gift Card was successfully removed from your order
1195
1198
  gift_card_using_store_credit_error: You can't apply the Gift Card after you applied the store credit.
1196
1199
  gift_cards: Gift Cards
@@ -1,5 +1,5 @@
1
1
  module Spree
2
- VERSION = '5.3.0'.freeze
2
+ VERSION = '5.3.1'.freeze
3
3
 
4
4
  def self.version
5
5
  VERSION
@@ -20,8 +20,7 @@ namespace :common do
20
20
  javascript_enabled = args[:javascript].to_b
21
21
  css_enabled = args[:css].to_b
22
22
 
23
- # Admin and Storefront require JavaScript and CSS (Tailwind) to function properly
24
- javascript_enabled ||= install_admin || install_storefront
23
+ # Admin and Storefront require CSS (Tailwind) to function properly
25
24
  css_enabled ||= install_admin || install_storefront
26
25
 
27
26
  puts args
@@ -32,9 +31,6 @@ namespace :common do
32
31
  dummy_app_args = [
33
32
  "--lib_name=#{ENV['LIB_NAME']}"
34
33
  ]
35
- # Use API mode only if no frontend components are needed
36
- use_api_mode = !install_storefront && !install_admin && !javascript_enabled && !css_enabled
37
- dummy_app_args << '--api' if use_api_mode
38
34
  dummy_app_args << '--javascript' if javascript_enabled
39
35
  dummy_app_args << '--css=tailwind' if css_enabled
40
36
 
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.3.0
4
+ version: 5.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Schofield
@@ -107,6 +107,20 @@ dependencies:
107
107
  - - ">="
108
108
  - !ruby/object:Gem::Version
109
109
  version: 3.3.1
110
+ - !ruby/object:Gem::Dependency
111
+ name: benchmark
112
+ requirement: !ruby/object:Gem::Requirement
113
+ requirements:
114
+ - - ">="
115
+ - !ruby/object:Gem::Version
116
+ version: '0'
117
+ type: :runtime
118
+ prerelease: false
119
+ version_requirements: !ruby/object:Gem::Requirement
120
+ requirements:
121
+ - - ">="
122
+ - !ruby/object:Gem::Version
123
+ version: '0'
110
124
  - !ruby/object:Gem::Dependency
111
125
  name: carmen
112
126
  requirement: !ruby/object:Gem::Requirement
@@ -1703,9 +1717,9 @@ licenses:
1703
1717
  - BSD-3-Clause
1704
1718
  metadata:
1705
1719
  bug_tracker_uri: https://github.com/spree/spree/issues
1706
- changelog_uri: https://github.com/spree/spree/releases/tag/v5.3.0
1720
+ changelog_uri: https://github.com/spree/spree/releases/tag/v5.3.1
1707
1721
  documentation_uri: https://docs.spreecommerce.org/
1708
- source_code_uri: https://github.com/spree/spree/tree/v5.3.0
1722
+ source_code_uri: https://github.com/spree/spree/tree/v5.3.1
1709
1723
  rdoc_options: []
1710
1724
  require_paths:
1711
1725
  - lib
@@ -1720,7 +1734,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1720
1734
  - !ruby/object:Gem::Version
1721
1735
  version: 1.8.23
1722
1736
  requirements: []
1723
- rubygems_version: 4.0.2
1737
+ rubygems_version: 4.0.3
1724
1738
  specification_version: 4
1725
1739
  summary: The bare bones necessary for Spree
1726
1740
  test_files: []