spree_core 2.2.9 → 2.2.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/spree/inventory_unit.rb +3 -3
- data/app/models/spree/order.rb +6 -0
- data/config/locales/en.yml +2 -0
- data/db/migrate/20130807024301_upgrade_adjustments.rb +5 -4
- data/lib/spree/core/version.rb +1 -1
- data/lib/spree/testing_support/authorization_helpers.rb +8 -2
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9eca458eb8cb28ced3d5d101ae8b09ba55fc474e
|
4
|
+
data.tar.gz: 3c46d9ac6eb9b54d2fa18d4008c1faa516f303a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6689b26acf76584fea6e4b36975256ecfd8f377ef9e209413df095d868843519dc4c5d915162eecf883e6da7cb53cc136f0c5dd2e73ec2f3bd3ba646c6ae1d9b
|
7
|
+
data.tar.gz: e13ef5aef9cd7250ed48d33113ff37964b4fe7a4da798b41f7e3c666077673b3cfdb0555c7b3253bf5c68b696e883e95281d38a670bb6211f56b986f6c8c6e64
|
@@ -21,7 +21,7 @@ module Spree
|
|
21
21
|
event :fill_backorder do
|
22
22
|
transition to: :on_hand, from: :backordered
|
23
23
|
end
|
24
|
-
after_transition on: :fill_backorder, do: :
|
24
|
+
after_transition on: :fill_backorder, do: :fulfill_order
|
25
25
|
|
26
26
|
event :ship do
|
27
27
|
transition to: :shipped, if: :allow_ship?
|
@@ -69,9 +69,9 @@ module Spree
|
|
69
69
|
Spree::Config[:allow_backorder_shipping] || self.on_hand?
|
70
70
|
end
|
71
71
|
|
72
|
-
def
|
72
|
+
def fulfill_order
|
73
73
|
self.reload
|
74
|
-
order.
|
74
|
+
order.fulfill!
|
75
75
|
end
|
76
76
|
end
|
77
77
|
end
|
data/app/models/spree/order.rb
CHANGED
@@ -356,6 +356,12 @@ module Spree
|
|
356
356
|
consider_risk
|
357
357
|
end
|
358
358
|
|
359
|
+
def fulfill!
|
360
|
+
shipments.each { |shipment| shipment.update!(self) if shipment.persisted? }
|
361
|
+
updater.update_shipment_state
|
362
|
+
save!
|
363
|
+
end
|
364
|
+
|
359
365
|
def deliver_order_confirmation_email
|
360
366
|
OrderMailer.confirm_email(self.id).deliver
|
361
367
|
update_column(:confirmation_delivered, true)
|
data/config/locales/en.yml
CHANGED
@@ -1162,7 +1162,9 @@ en:
|
|
1162
1162
|
usage_limit: Usage Limit
|
1163
1163
|
use_app_default: Use App Default
|
1164
1164
|
use_billing_address: Use Billing Address
|
1165
|
+
use_existing_cc: Use an existing card on file
|
1165
1166
|
use_new_cc: Use a new card
|
1167
|
+
use_new_cc_or_payment_method: Use a new card / payment method
|
1166
1168
|
use_s3: Use Amazon S3 For Images
|
1167
1169
|
user: User
|
1168
1170
|
user_rule:
|
@@ -9,13 +9,14 @@ class UpgradeAdjustments < ActiveRecord::Migration
|
|
9
9
|
# Account for possible invalid data
|
10
10
|
next if adjustment.source.nil?
|
11
11
|
adjustment.source.update_column(:cost, adjustment.amount)
|
12
|
-
adjustment.destroy
|
12
|
+
adjustment.destroy!
|
13
13
|
end
|
14
14
|
|
15
15
|
# Tax adjustments have their sources altered
|
16
16
|
Spree::Adjustment.where(:originator_type => "Spree::TaxRate").find_each do |adjustment|
|
17
|
-
adjustment.
|
18
|
-
adjustment.
|
17
|
+
adjustment.source_id = adjustment.originator_id
|
18
|
+
adjustment.source_type = "Spree::TaxRate"
|
19
|
+
adjustment.save!
|
19
20
|
end
|
20
21
|
|
21
22
|
# Promotion adjustments have their source altered also
|
@@ -33,7 +34,7 @@ class UpgradeAdjustments < ActiveRecord::Migration
|
|
33
34
|
# Fail silently. This is primarily in instances where the calculator no longer exists
|
34
35
|
end
|
35
36
|
|
36
|
-
adjustment.save
|
37
|
+
adjustment.save!
|
37
38
|
end
|
38
39
|
end
|
39
40
|
end
|
data/lib/spree/core/version.rb
CHANGED
@@ -28,6 +28,12 @@ module Spree
|
|
28
28
|
ability = Spree::TestingSupport::AuthorizationHelpers::Request::SuperAbility
|
29
29
|
Spree::Ability.register_ability(ability)
|
30
30
|
end
|
31
|
+
|
32
|
+
before do
|
33
|
+
allow(Spree.user_class).to receive(:find_by).
|
34
|
+
with(hash_including(:spree_api_key)).
|
35
|
+
and_return(Spree.user_class.new)
|
36
|
+
end
|
31
37
|
end
|
32
38
|
|
33
39
|
def custom_authorization!(&block)
|
@@ -48,6 +54,6 @@ module Spree
|
|
48
54
|
end
|
49
55
|
|
50
56
|
RSpec.configure do |config|
|
51
|
-
config.extend Spree::TestingSupport::AuthorizationHelpers::Controller, :
|
52
|
-
config.extend Spree::TestingSupport::AuthorizationHelpers::Request, :
|
57
|
+
config.extend Spree::TestingSupport::AuthorizationHelpers::Controller, type: :controller
|
58
|
+
config.extend Spree::TestingSupport::AuthorizationHelpers::Request, type: :feature
|
53
59
|
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: 2.2.
|
4
|
+
version: 2.2.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Schofield
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-03-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemerchant
|
@@ -210,16 +210,16 @@ dependencies:
|
|
210
210
|
name: monetize
|
211
211
|
requirement: !ruby/object:Gem::Requirement
|
212
212
|
requirements:
|
213
|
-
- - "
|
213
|
+
- - "~>"
|
214
214
|
- !ruby/object:Gem::Version
|
215
|
-
version: '
|
215
|
+
version: '1.1'
|
216
216
|
type: :runtime
|
217
217
|
prerelease: false
|
218
218
|
version_requirements: !ruby/object:Gem::Requirement
|
219
219
|
requirements:
|
220
|
-
- - "
|
220
|
+
- - "~>"
|
221
221
|
- !ruby/object:Gem::Version
|
222
|
-
version: '
|
222
|
+
version: '1.1'
|
223
223
|
- !ruby/object:Gem::Dependency
|
224
224
|
name: paperclip
|
225
225
|
requirement: !ruby/object:Gem::Requirement
|
@@ -759,7 +759,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
759
759
|
version: '0'
|
760
760
|
requirements: []
|
761
761
|
rubyforge_project:
|
762
|
-
rubygems_version: 2.
|
762
|
+
rubygems_version: 2.4.5
|
763
763
|
signing_key:
|
764
764
|
specification_version: 4
|
765
765
|
summary: The bare bones necessary for Spree.
|