spree_core 4.1.4 → 4.1.5

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: 14259887630a60331633df140cfe4f7b9e94b9ecdf95342c5e8a31011dbfb807
4
- data.tar.gz: 2801ca34a2ad369726b829ea9e3decf00ae64c9fcc4cc673cf04e0dc0aa826c5
3
+ metadata.gz: 1643c4f1dedde056b96b0c1e6c312c452084a0d34bc2d5ed2abc648d2185f43a
4
+ data.tar.gz: cbc7c195925ef217208fa373120ebbd8cef241815dadedd24972bcd9cf904eb4
5
5
  SHA512:
6
- metadata.gz: f644cd935bca9d371a3a558ffe76994143bc8af738ac9ff8621a778eef743d79339b3f5bda697e84a287c51e12e235bac989c500dd4923ca08f52a89ba8d80ac
7
- data.tar.gz: 62203be51964aa4ccd9ea69a5e5fd47ea7408c6028e257a5c30a7769de7178127aecef002305731f58d5e676bd209c15b776d182246f23dc07a4a0679801d5d3
6
+ metadata.gz: 337338d05ac9009476f2e66e099abc21f13461b1db2e02e85a571d722de625f6bcc38fd1009ae8a78bef10ff19aee2e687438da5415a5888125e930ee6865c21
7
+ data.tar.gz: 92275d9db7cecb217bc2922898e9e1ce0359eac14606e11686ed339b5173826a2cd85329adc9c3a4bd713740e9f419f9e2909bef4024280c947bf301ce3d8a35
@@ -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
@@ -138,7 +138,7 @@ end
138
138
  end
139
139
 
140
140
  def gemfile_path
141
- core_gems = ['spree/core', 'spree/api', 'spree/backend', 'spree/frontend']
141
+ core_gems = ['spree/core', 'spree/api', 'spree/backend', 'spree/frontend', 'spree/sample']
142
142
 
143
143
  if core_gems.include?(lib_name)
144
144
  '../../../../../Gemfile'
@@ -1,5 +1,5 @@
1
1
  module Spree
2
2
  def self.version
3
- '4.1.4'
3
+ '4.1.5'
4
4
  end
5
5
  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.1.4
4
+ version: 4.1.5
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-04-07 00:00:00.000000000 Z
11
+ date: 2020-04-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemerchant
@@ -1105,7 +1105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1105
1105
  - !ruby/object:Gem::Version
1106
1106
  version: 1.8.23
1107
1107
  requirements: []
1108
- rubygems_version: 3.0.6
1108
+ rubygems_version: 3.1.2
1109
1109
  signing_key:
1110
1110
  specification_version: 4
1111
1111
  summary: The bare bones necessary for Spree.