spree_core 3.7.13 → 3.7.14

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f9f75219d11cb54b947ce48ebb17a52e01450c2f50cdff948834e62c9dc4b361
4
- data.tar.gz: d5a2c10eab2ae86b458a485cbd344f721836aad8ec0afe4962ebbb0531a9dd51
3
+ metadata.gz: db7ef1ac4cb8684ad8106e7256c62711ae39583483358c12173d5e42238a21da
4
+ data.tar.gz: 604c39df5d7b3f055e414bd8e9f55e29a4ae413b2e120c2e40fce898bbb29273
5
5
  SHA512:
6
- metadata.gz: 9abe87071a55db7e85e1acc9e2ac3a0e9f5640422124953438dcf729bd3f81a2efb4b2e6489a52d17f0c6f00031e31763439f4044667076e9c47bab77cce245c
7
- data.tar.gz: 3c6dc6abb264dc37f8b709e266137bd0afac072d0666904e918c765fb1343bc621fa1ac9900af91a46bb1b0d026f53d2548b8ed5f8bd99f7065902fc2bf8801a
6
+ metadata.gz: dbb968cb80558e385960b5c9434acd12ac03c56a20c6294ac7988e2f4441594a367071fb572fbc205983c382c2f08286d24bcb7b1a42f931a434ecd39df7c9db
7
+ data.tar.gz: bd08a00195b528ca9f62790a905e89fb7d177b63458679a7290b3187d22cd3f37e99ea2811a131d272d39c41bbe398795efaaa4751a077f937dc4b0179359983
@@ -24,10 +24,9 @@ module Spree
24
24
  attribute :month, ActiveRecord::Type::Integer.new
25
25
  attribute :year, ActiveRecord::Type::Integer.new
26
26
 
27
- attr_reader :number
27
+ attr_reader :number, :verification_value
28
28
  attr_accessor :encrypted_data,
29
29
  :imported,
30
- :verification_value,
31
30
  :manual_entry
32
31
 
33
32
  with_options if: :require_card_numbers?, on: :create do
@@ -101,9 +100,11 @@ module Spree
101
100
  end
102
101
  end
103
102
 
103
+ def verification_value=(value)
104
+ @verification_value = value.to_s.gsub(/\s/, '')
105
+ end
106
+
104
107
  def set_last_digits
105
- number.to_s.gsub!(/\s/, '')
106
- verification_value.to_s.gsub!(/\s/, '')
107
108
  self.last_digits ||= number.to_s.length <= 4 ? number : number.to_s.slice(-4..-1)
108
109
  end
109
110
 
@@ -100,7 +100,7 @@ module Spree::Preferences::Preferable
100
100
  if value.is_a?(FalseClass) ||
101
101
  value.nil? ||
102
102
  value == 0 ||
103
- value =~ /^(f|false|0)$/i ||
103
+ value&.to_s =~ /^(f|false|0)$/i ||
104
104
  (value.respond_to?(:empty?) && value.empty?)
105
105
  false
106
106
  else
@@ -25,7 +25,6 @@ module Spree
25
25
 
26
26
  def remove(coupon_code)
27
27
  promotion = order.promotions.with_coupon_code(coupon_code)
28
-
29
28
  if promotion.present?
30
29
  # Order promotion has to be destroyed before line item removing
31
30
  order.order_promotions.find_by!(promotion_id: promotion.id).destroy
@@ -76,7 +75,7 @@ module Spree
76
75
  line_item = order.find_line_item_by_variant(item.variant)
77
76
  next if line_item.blank?
78
77
 
79
- Spree::Dependencies.cart_remove_item_service(order: order, item: item.variant, quantity: item.quantity)
78
+ Spree::Dependencies.cart_remove_item_service.constantize.call(order: order, item: item.variant, quantity: item.quantity)
80
79
  end
81
80
  end
82
81
 
@@ -135,7 +135,7 @@ end
135
135
  end
136
136
 
137
137
  def gemfile_path
138
- core_gems = ['spree/core', 'spree/api', 'spree/backend', 'spree/frontend']
138
+ core_gems = ['spree/core', 'spree/api', 'spree/backend', 'spree/frontend', 'spree/sample']
139
139
 
140
140
  if core_gems.include?(lib_name)
141
141
  '../../../../../Gemfile'
@@ -1,5 +1,7 @@
1
1
  module Spree
2
+ VERSION = '3.7.14'.freeze
3
+
2
4
  def self.version
3
- '3.7.13'
5
+ VERSION
4
6
  end
5
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.7.13
4
+ version: 3.7.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Schofield
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-10 00:00:00.000000000 Z
11
+ date: 2021-03-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemerchant
@@ -1084,7 +1084,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1084
1084
  - !ruby/object:Gem::Version
1085
1085
  version: 1.8.23
1086
1086
  requirements: []
1087
- rubygems_version: 3.1.2
1087
+ rubygems_version: 3.1.4
1088
1088
  signing_key:
1089
1089
  specification_version: 4
1090
1090
  summary: The bare bones necessary for Spree.