solidus_core 2.1.0.beta1 → 2.1.0.rc1

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.

Potentially problematic release.


This version of solidus_core might be problematic. Click here for more details.

Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/app/mailers/spree/base_mailer.rb +2 -7
  3. data/app/mailers/spree/carton_mailer.rb +3 -11
  4. data/app/mailers/spree/order_mailer.rb +3 -12
  5. data/app/models/concerns/spree/default_price.rb +2 -3
  6. data/app/models/concerns/spree/user_methods.rb +1 -1
  7. data/app/models/concerns/spree/user_payment_source.rb +0 -6
  8. data/app/models/spree/address.rb +0 -9
  9. data/app/models/spree/adjustment.rb +2 -63
  10. data/app/models/spree/app_configuration.rb +0 -22
  11. data/app/models/spree/calculator/flexi_rate.rb +7 -12
  12. data/app/models/spree/calculator/shipping/flat_percent_item_total.rb +1 -1
  13. data/app/models/spree/calculator/tiered_flat_rate.rb +3 -1
  14. data/app/models/spree/calculator/tiered_percent.rb +3 -1
  15. data/app/models/spree/country.rb +0 -7
  16. data/app/models/spree/gateway.rb +0 -9
  17. data/app/models/spree/order.rb +1 -15
  18. data/app/models/spree/order/checkout.rb +0 -41
  19. data/app/models/spree/payment.rb +0 -22
  20. data/app/models/spree/payment/processing.rb +1 -1
  21. data/app/models/spree/product/scopes.rb +1 -8
  22. data/app/models/spree/promotion/actions/create_adjustment.rb +6 -1
  23. data/app/models/spree/promotion/actions/create_item_adjustments.rb +6 -1
  24. data/app/models/spree/promotion/actions/create_quantity_adjustments.rb +6 -1
  25. data/app/models/spree/refund.rb +1 -1
  26. data/app/models/spree/store.rb +1 -2
  27. data/app/models/spree/zone.rb +12 -10
  28. data/lib/spree/core.rb +0 -10
  29. data/lib/spree/core/engine.rb +0 -2
  30. data/lib/spree/core/version.rb +1 -6
  31. data/spec/mailers/carton_mailer_spec.rb +0 -9
  32. data/spec/mailers/order_mailer_spec.rb +0 -14
  33. data/spec/models/spree/calculator/flexi_rate_spec.rb +132 -20
  34. data/spec/models/spree/calculator/shipping/flat_percent_item_total_spec.rb +4 -0
  35. data/spec/models/spree/calculator/tiered_flat_rate_spec.rb +41 -1
  36. data/spec/models/spree/calculator/tiered_percent_spec.rb +45 -1
  37. data/spec/models/spree/gateway/bogus_spec.rb +0 -7
  38. data/spec/models/spree/order/checkout_spec.rb +0 -119
  39. data/spec/models/spree/order/payment_spec.rb +19 -10
  40. data/spec/models/spree/order_spec.rb +0 -45
  41. data/spec/models/spree/payment_spec.rb +56 -63
  42. data/spec/models/spree/promotion/actions/create_item_adjustments_spec.rb +2 -2
  43. data/spec/models/spree/store_spec.rb +0 -8
  44. data/spec/models/spree/user_spec.rb +0 -7
  45. data/spec/models/spree/variant_spec.rb +0 -8
  46. metadata +2 -4
  47. data/config/initializers/spree_user.rb +0 -10
  48. data/lib/spree/core/routes.rb +0 -20
@@ -97,13 +97,13 @@ module Spree
97
97
 
98
98
  context "when the adjustable is actionable" do
99
99
  it "calls compute on the calculator" do
100
- expect(action.calculator).to receive(:compute).with(line_item)
100
+ expect(action.calculator).to receive(:compute).with(line_item).and_call_original
101
101
  action.compute_amount(line_item)
102
102
  end
103
103
 
104
104
  context "calculator returns amount greater than item total" do
105
105
  before do
106
- expect(action.calculator).to receive(:compute).with(line_item).and_return(300)
106
+ action.calculator.preferred_amount = 300
107
107
  allow(line_item).to receive_messages(amount: 100)
108
108
  end
109
109
 
@@ -23,14 +23,6 @@ describe Spree::Store, type: :model do
23
23
 
24
24
  delegate :current, to: :described_class
25
25
 
26
- context "with no argument" do
27
- it 'should return default' do
28
- Spree::Deprecation.silence do
29
- expect(current).to eql(store_default)
30
- end
31
- end
32
- end
33
-
34
26
  context "with no match" do
35
27
  it 'should return the default domain' do
36
28
  expect(current('foobar.com')).to eql(store_default)
@@ -94,13 +94,6 @@ describe Spree::LegacyUser, type: :model do
94
94
  it "has payment sources" do
95
95
  expect(user.payment_sources.first.gateway_customer_profile_id).not_to be_empty
96
96
  end
97
-
98
- it "drops payment source" do
99
- Spree::Deprecation.silence do
100
- user.drop_payment_source cc
101
- end
102
- expect(cc.gateway_customer_profile_id).to be_nil
103
- end
104
97
  end
105
98
  end
106
99
  end
@@ -178,14 +178,6 @@ describe Spree::Variant, type: :model do
178
178
  end
179
179
  end
180
180
 
181
- context "#currency" do
182
- it "returns the globally configured currency" do
183
- Spree::Deprecation.silence do
184
- expect(variant.currency).to eql "USD"
185
- end
186
- end
187
- end
188
-
189
181
  context "#display_amount" do
190
182
  it "returns a Spree::Money" do
191
183
  variant.price = 21.22
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solidus_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0.beta1
4
+ version: 2.1.0.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Solidus Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-06 00:00:00.000000000 Z
11
+ date: 2016-12-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemerchant
@@ -586,7 +586,6 @@ files:
586
586
  - config/initializers/assets.rb
587
587
  - config/initializers/friendly_id.rb
588
588
  - config/initializers/premailer_assets.rb
589
- - config/initializers/spree_user.rb
590
589
  - config/locales/en.yml
591
590
  - db/default/spree/countries.rb
592
591
  - db/default/spree/return_reasons.rb
@@ -938,7 +937,6 @@ files:
938
937
  - lib/spree/core/product_duplicator.rb
939
938
  - lib/spree/core/product_filters.rb
940
939
  - lib/spree/core/role_configuration.rb
941
- - lib/spree/core/routes.rb
942
940
  - lib/spree/core/search/base.rb
943
941
  - lib/spree/core/search/variant.rb
944
942
  - lib/spree/core/stock_configuration.rb
@@ -1,10 +0,0 @@
1
- # Ensure that Spree.user_class includes the UserMethods concern
2
- # Previously these methods were injected automatically onto the class, which we
3
- # are still doing for compatability, but with a warning.
4
-
5
- Spree::Core::Engine.config.to_prepare do
6
- if Spree.user_class && !Spree.user_class.included_modules.include?(Spree::UserMethods)
7
- Spree::Deprecation.warn "#{Spree.user_class} must include Spree::UserMethods"
8
- Spree.user_class.include Spree::UserMethods
9
- end
10
- end
@@ -1,20 +0,0 @@
1
- module Spree
2
- module Core
3
- class Engine < ::Rails::Engine
4
- def self.add_routes(&block)
5
- Spree::Deprecation.warn "Spree::Core::Engine.add_routes is deprecated, use Spree::Core::Engine.routes.draw instead"
6
- routes.draw(&block)
7
- end
8
-
9
- def self.append_routes(&block)
10
- Spree::Deprecation.warn "Spree::Core::Engine.append_routes is deprecated, use Spree::Core::Engine.routes.append instead"
11
- routes.append(&block)
12
- end
13
-
14
- def self.draw_routes(&block)
15
- Spree::Deprecation.warn "Spree::Core::Engine.draw_routes is deprecated, use Spree::Core::Engine.routes.draw instead"
16
- routes.draw(&block)
17
- end
18
- end
19
- end
20
- end