spree_core 3.0.1 → 3.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/friendly_id/slug_decorator.rb +3 -0
- data/app/models/spree/adjustment.rb +1 -1
- data/app/models/spree/calculator.rb +5 -0
- data/app/models/spree/customer_return.rb +22 -16
- data/app/models/spree/gateway/bogus.rb +4 -0
- data/app/models/spree/line_item.rb +1 -1
- data/app/models/spree/order.rb +22 -48
- data/app/models/spree/order/checkout.rb +270 -255
- data/app/models/spree/order_contents.rb +64 -61
- data/app/models/spree/order_merger.rb +65 -0
- data/app/models/spree/payment.rb +5 -0
- data/app/models/spree/payment/processing.rb +2 -1
- data/app/models/spree/payment_method/check.rb +12 -2
- data/app/models/spree/product.rb +5 -0
- data/app/models/spree/promotion_handler/cart.rb +18 -14
- data/app/models/spree/shipment.rb +1 -1
- data/app/models/spree/stock/availability_validator.rb +10 -9
- data/app/models/spree/stock/content_item.rb +8 -0
- data/app/models/spree/stock/package.rb +8 -0
- data/app/models/spree/stock_item.rb +5 -1
- data/app/models/spree/stock_movement.rb +6 -1
- data/app/models/spree/variant.rb +18 -15
- data/app/models/spree/zone.rb +39 -29
- data/app/views/spree/order_mailer/cancel_email.html.erb +1 -1
- data/app/views/spree/order_mailer/cancel_email.text.erb +1 -1
- data/app/views/spree/order_mailer/confirm_email.html.erb +1 -1
- data/app/views/spree/order_mailer/confirm_email.text.erb +1 -1
- data/config/initializers/user_class_extensions.rb +4 -0
- data/config/locales/en.yml +4 -3
- data/db/default/spree/default_reimbursement_type.rb +1 -0
- data/db/migrate/20150515211137_fix_adjustment_order_id.rb +70 -0
- data/db/migrate/20150522181728_add_deleted_at_to_friendly_id_slugs.rb +6 -0
- data/db/migrate/20150609093816_increase_scale_on_pre_tax_amounts.rb +16 -0
- data/db/migrate/20150707204155_enable_acts_as_paranoid_on_calculators.rb +6 -0
- data/lib/spree/core/controller_helpers/auth.rb +1 -1
- data/lib/spree/core/engine.rb +7 -0
- data/lib/spree/core/validators/email.rb +7 -3
- data/lib/spree/core/version.rb +1 -1
- data/lib/spree/permitted_attributes.rb +2 -2
- data/lib/spree/testing_support/common_rake.rb +3 -8
- data/lib/spree/testing_support/factories.rb +1 -1
- data/lib/spree/testing_support/factories/order_factory.rb +11 -0
- data/lib/spree/testing_support/order_walkthrough.rb +1 -1
- metadata +11 -4
@@ -16,15 +16,10 @@ namespace :common do
|
|
16
16
|
Spree::InstallGenerator.start ["--lib_name=#{ENV['LIB_NAME']}", "--auto-accept", "--migrate=false", "--seed=false", "--sample=false", "--quiet", "--user_class=#{args[:user_class]}"]
|
17
17
|
|
18
18
|
puts "Setting up dummy database..."
|
19
|
-
|
19
|
+
system("bundle exec rake db:drop db:create db:migrate > #{File::NULL}")
|
20
20
|
|
21
|
-
|
22
|
-
|
23
|
-
else
|
24
|
-
cmd += " >/dev/null"
|
25
|
-
end
|
26
|
-
|
27
|
-
system(cmd)
|
21
|
+
puts "Precompiling assets..."
|
22
|
+
system("bundle exec rake assets:precompile > #{File::NULL}")
|
28
23
|
|
29
24
|
begin
|
30
25
|
require "generators/#{ENV['LIB_NAME']}/install/install_generator"
|
@@ -17,6 +17,17 @@ FactoryGirl.define do
|
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
20
|
+
factory :order_with_line_item_quantity do
|
21
|
+
transient do
|
22
|
+
line_items_quantity 1
|
23
|
+
end
|
24
|
+
|
25
|
+
after(:create) do |order, evaluator|
|
26
|
+
create(:line_item, order: order, price: evaluator.line_items_price, quantity: evaluator.line_items_quantity)
|
27
|
+
order.line_items.reload # to ensure order.line_items is accessible after
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
20
31
|
factory :order_with_line_items do
|
21
32
|
bill_address
|
22
33
|
ship_address
|
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: 3.0.
|
4
|
+
version: 3.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Schofield
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-07-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemerchant
|
@@ -260,14 +260,14 @@ dependencies:
|
|
260
260
|
requirements:
|
261
261
|
- - "~>"
|
262
262
|
- !ruby/object:Gem::Version
|
263
|
-
version: 4.2.
|
263
|
+
version: 4.2.2
|
264
264
|
type: :runtime
|
265
265
|
prerelease: false
|
266
266
|
version_requirements: !ruby/object:Gem::Requirement
|
267
267
|
requirements:
|
268
268
|
- - "~>"
|
269
269
|
- !ruby/object:Gem::Version
|
270
|
-
version: 4.2.
|
270
|
+
version: 4.2.2
|
271
271
|
- !ruby/object:Gem::Dependency
|
272
272
|
name: ransack
|
273
273
|
requirement: !ruby/object:Gem::Requirement
|
@@ -397,6 +397,7 @@ files:
|
|
397
397
|
- app/models/concerns/spree/user_api_authentication.rb
|
398
398
|
- app/models/concerns/spree/user_payment_source.rb
|
399
399
|
- app/models/concerns/spree/user_reporting.rb
|
400
|
+
- app/models/friendly_id/slug_decorator.rb
|
400
401
|
- app/models/spree/ability.rb
|
401
402
|
- app/models/spree/address.rb
|
402
403
|
- app/models/spree/adjustable/adjustments_updater.rb
|
@@ -444,6 +445,7 @@ files:
|
|
444
445
|
- app/models/spree/order/payments.rb
|
445
446
|
- app/models/spree/order_contents.rb
|
446
447
|
- app/models/spree/order_inventory.rb
|
448
|
+
- app/models/spree/order_merger.rb
|
447
449
|
- app/models/spree/order_updater.rb
|
448
450
|
- app/models/spree/payment.rb
|
449
451
|
- app/models/spree/payment/gateway_options.rb
|
@@ -570,6 +572,7 @@ files:
|
|
570
572
|
- config/locales/en.yml
|
571
573
|
- config/routes.rb
|
572
574
|
- db/default/spree/countries.rb
|
575
|
+
- db/default/spree/default_reimbursement_type.rb
|
573
576
|
- db/default/spree/roles.rb
|
574
577
|
- db/default/spree/states.rb
|
575
578
|
- db/default/spree/stores.rb
|
@@ -776,6 +779,10 @@ files:
|
|
776
779
|
- db/migrate/20150128060325_remove_spree_configurations.rb
|
777
780
|
- db/migrate/20150216173445_add_index_to_spree_stock_items_variant_id.rb
|
778
781
|
- db/migrate/20150309161154_ensure_payments_have_numbers.rb
|
782
|
+
- db/migrate/20150515211137_fix_adjustment_order_id.rb
|
783
|
+
- db/migrate/20150522181728_add_deleted_at_to_friendly_id_slugs.rb
|
784
|
+
- db/migrate/20150609093816_increase_scale_on_pre_tax_amounts.rb
|
785
|
+
- db/migrate/20150707204155_enable_acts_as_paranoid_on_calculators.rb
|
779
786
|
- db/seeds.rb
|
780
787
|
- lib/generators/spree/custom_user/custom_user_generator.rb
|
781
788
|
- lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
|