spree_core 4.0.6 → 4.0.7

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: b9c76746a8aefcd58da169e77b4e30d436ce5c7b670dccbe5a949fa68f1bac08
4
- data.tar.gz: f72936183c3f4c62db43b9b9fae337cd0ebf60c55f49fe7bdc051662d5490244
3
+ metadata.gz: 24d8697b01ebe0da73f0747dc3ddc9a45522db809a92ebc93a97dc9e8c4fccef
4
+ data.tar.gz: 691bcf5bba6d78868abb9b39893b63737398dae79d5e939381cc9c02ef6a6286
5
5
  SHA512:
6
- metadata.gz: 454bcf0cafdf6205eddc4360e49a54a9d1c8afa0e4f352311a34988312628c2d6c7cd50b07944c9be4dccd98dadd1232052b60d97ff80f03ad3ed91cd670471f
7
- data.tar.gz: f20f81616c612d250ba5080ccc2696fd55a758ece0b35002edb19b3b7ed353de720a95ecb9b2aaf0dbbea37f3e5b904afdf37521ff7ad9cf4490767985f70a29
6
+ metadata.gz: 79a9d22bd03b122d64e7bf5a2505df120e4671442945eb2c2c0d8a63be3a592f344252730add4fde3bbf757282d9016fb8e2f6cf21b405415b6094d45d0407cf
7
+ data.tar.gz: c12bb814fa2b091c153e5ebdc18c33c645ae6e5c40e4d0bf78e2fd36bc712f3017ee7b0149904402bca5376193e496df652a56cfed8486a908ee59b35e4d83ab
@@ -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
 
@@ -137,7 +137,7 @@ end
137
137
  end
138
138
 
139
139
  def gemfile_path
140
- core_gems = ['spree/core', 'spree/api', 'spree/backend', 'spree/frontend']
140
+ core_gems = ['spree/core', 'spree/api', 'spree/backend', 'spree/frontend', 'spree/sample']
141
141
 
142
142
  if core_gems.include?(lib_name)
143
143
  '../../../../../Gemfile'
@@ -1,5 +1,7 @@
1
1
  module Spree
2
+ VERSION = '4.0.7'.freeze
3
+
2
4
  def self.version
3
- '4.0.6'
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: 4.0.6
4
+ version: 4.0.7
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-30 00:00:00.000000000 Z
11
+ date: 2021-03-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemerchant
@@ -1063,9 +1063,9 @@ licenses:
1063
1063
  - BSD-3-Clause
1064
1064
  metadata:
1065
1065
  bug_tracker_uri: https://github.com/spree/spree/issues
1066
- changelog_uri: https://github.com/spree/spree/releases/tag/v4.0.6
1066
+ changelog_uri: https://github.com/spree/spree/releases/tag/v4.0.7
1067
1067
  documentation_uri: https://guides.spreecommerce.org/
1068
- source_code_uri: https://github.com/spree/spree/tree/v4.0.6
1068
+ source_code_uri: https://github.com/spree/spree/tree/v4.0.7
1069
1069
  post_install_message:
1070
1070
  rdoc_options: []
1071
1071
  require_paths:
@@ -1081,7 +1081,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1081
1081
  - !ruby/object:Gem::Version
1082
1082
  version: 1.8.23
1083
1083
  requirements: []
1084
- rubygems_version: 3.1.2
1084
+ rubygems_version: 3.2.3
1085
1085
  signing_key:
1086
1086
  specification_version: 4
1087
1087
  summary: The bare bones necessary for Spree.