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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f8f179eed81a4a5773fe95c383a4a48610e3019b
4
- data.tar.gz: 2ef4dd915925f516a00cb89356de314a2a6b42fc
3
+ metadata.gz: 9eca458eb8cb28ced3d5d101ae8b09ba55fc474e
4
+ data.tar.gz: 3c46d9ac6eb9b54d2fa18d4008c1faa516f303a8
5
5
  SHA512:
6
- metadata.gz: 4a4195bf3e8539dbde5ba0f11c71e28b9308d4dcc51447fa7186ece83f55eb682952431471f009a7f1d1b15e6636ae85619fa3d9be8bc7289c2250ccf4bec66d
7
- data.tar.gz: 17b1db2c5d929d68840834625dafae8239af8e6af3cd02cde1af73e068044fb205416ed17b2cb396d9725fa76f7d9e9b2eb527312715bf9823a9e4c6ff7c5e45
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: :update_order
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 update_order
72
+ def fulfill_order
73
73
  self.reload
74
- order.update!
74
+ order.fulfill!
75
75
  end
76
76
  end
77
77
  end
@@ -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)
@@ -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.source = adjustment.originator
18
- adjustment.save
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
@@ -1,5 +1,5 @@
1
1
  module Spree
2
2
  def self.version
3
- "2.2.9"
3
+ "2.2.10"
4
4
  end
5
5
  end
@@ -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, :type => :controller
52
- config.extend Spree::TestingSupport::AuthorizationHelpers::Request, :type => :feature
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.9
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: 2014-12-23 00:00:00.000000000 Z
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: '0'
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: '0'
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.2.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.