spree_core 2.2.3 → 2.2.4

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
  SHA1:
3
- metadata.gz: f612c6f42ba3ade084e50bdca945ccf34f1ce76f
4
- data.tar.gz: f84f159adfe58ab3b210da9b0d596a54d3d758c2
3
+ metadata.gz: 92fd29fe255bb2c31f173def5f8f34ea17620370
4
+ data.tar.gz: bfb2e716ea91a48d83f18df9fb25a1e926ddbb27
5
5
  SHA512:
6
- metadata.gz: 39a5a14c31bfeb6eaff2d0f2b99eacd506e01f882fa5c20f6f03efc1d8e74d7f965a37e0d1f5f857ef25e0735056905708c8960b89310a776d2fc506d702b9d3
7
- data.tar.gz: 7c92311fcbbd4cc550c32c3473352f719e94d40367fde91c05779a7274eff4a34c6d3ed096c69fc9eacbb921ab4f20ad3c3ba722d8060646e4ace2813e2d9dcb
6
+ metadata.gz: 6940b7c73074114e90bf31b084ca912ce042b2c6dc1d3b84e1fdebe4373f348363c5ef2fad136ed8e398d7f4d53b26d16e50336b0838a24e8029b9a683c3f410
7
+ data.tar.gz: 32dff2ab726e1acd863fbaaa7a7f439ffffb07ed343db015e0f223d653f225b2ba2dd5237d4ba20b38a84697022dc9f9a7848cbe5c88fd6298402908797c579d
@@ -106,6 +106,17 @@ module Spree
106
106
  gateway_customer_profile_id.present? || gateway_payment_profile_id.present?
107
107
  end
108
108
 
109
+ # ActiveMerchant needs first_name/last_name because we pass it a Spree::CreditCard and it calls those methods on it.
110
+ # Looking at the ActiveMerchant source code we should probably be calling #to_active_merchant before passing
111
+ # the object to ActiveMerchant but this should do for now.
112
+ def first_name
113
+ super || name.to_s.split(/[[:space:]]/, 2)[0]
114
+ end
115
+
116
+ def last_name
117
+ super || name.to_s.split(/[[:space:]]/, 2)[1]
118
+ end
119
+
109
120
  def to_active_merchant
110
121
  ActiveMerchant::Billing::CreditCard.new(
111
122
  :number => number,
@@ -8,7 +8,7 @@ class AddLineItemIdToSpreeInventoryUnits < ActiveRecord::Migration
8
8
  shipments = Spree::Shipment.includes(:inventory_units, :order)
9
9
 
10
10
  shipments.find_each do |shipment|
11
- shipment.inventory_units.group_by(&:variant_id).each do |variant, units|
11
+ shipment.inventory_units.group_by(&:variant_id).each do |variant_id, units|
12
12
 
13
13
  line_item = shipment.order.line_items.find_by(variant_id: variant_id)
14
14
  next unless line_item
@@ -1,5 +1,5 @@
1
1
  module Spree
2
2
  def self.version
3
- "2.2.3"
3
+ "2.2.4"
4
4
  end
5
5
  end
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: 2.2.3
4
+ version: 2.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Schofield