spree_core 2.2.3 → 2.2.4
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 92fd29fe255bb2c31f173def5f8f34ea17620370
|
4
|
+
data.tar.gz: bfb2e716ea91a48d83f18df9fb25a1e926ddbb27
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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 |
|
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
|
data/lib/spree/core/version.rb
CHANGED