solidus_core 2.11.16 → 3.0.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of solidus_core might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/app/assets/javascripts/spree.js.erb +0 -51
- data/app/helpers/spree/store_helper.rb +0 -11
- data/app/mailers/spree/carton_mailer.rb +1 -5
- data/app/models/concerns/spree/active_storage_adapter/attachment.rb +11 -13
- data/app/models/concerns/spree/active_storage_adapter.rb +0 -2
- data/app/models/concerns/spree/adjustment_source.rb +0 -15
- data/app/models/concerns/spree/calculated_adjustments.rb +0 -18
- data/app/models/concerns/spree/soft_deletable.rb +2 -4
- data/app/models/concerns/spree/user_address_book.rb +0 -37
- data/app/models/concerns/spree/user_methods.rb +2 -11
- data/app/models/spree/ability.rb +0 -37
- data/app/models/spree/address/name.rb +2 -20
- data/app/models/spree/address.rb +8 -187
- data/app/models/spree/adjustment.rb +0 -28
- data/app/models/spree/base.rb +12 -48
- data/app/models/spree/calculator/flexi_rate.rb +0 -5
- data/app/models/spree/calculator.rb +0 -11
- data/app/models/spree/country.rb +1 -6
- data/app/models/spree/credit_card.rb +0 -27
- data/app/models/spree/customer_return.rb +1 -4
- data/app/models/spree/image/active_storage_attachment.rb +2 -10
- data/app/models/spree/image/paperclip_attachment.rb +1 -1
- data/app/models/spree/image.rb +0 -7
- data/app/models/spree/inventory_unit.rb +0 -21
- data/app/models/spree/line_item.rb +2 -45
- data/app/models/spree/order.rb +4 -137
- data/app/models/spree/order_cancellations.rb +4 -24
- data/app/models/spree/order_shipping.rb +9 -6
- data/app/models/spree/order_updater.rb +2 -11
- data/app/models/spree/payment/cancellation.rb +3 -22
- data/app/models/spree/payment.rb +0 -3
- data/app/models/spree/payment_create.rb +1 -13
- data/app/models/spree/payment_method/bogus_credit_card.rb +9 -13
- data/app/models/spree/payment_method/credit_card.rb +1 -3
- data/app/models/spree/payment_method/simple_bogus_credit_card.rb +4 -4
- data/app/models/spree/payment_method.rb +2 -106
- data/app/models/spree/product/scopes.rb +0 -27
- data/app/models/spree/product.rb +0 -39
- data/app/models/spree/promotion/actions/create_adjustment.rb +0 -3
- data/app/models/spree/promotion/actions/create_item_adjustments.rb +0 -3
- data/app/models/spree/promotion/actions/create_quantity_adjustments.rb +0 -3
- data/app/models/spree/promotion/rules/taxon.rb +2 -15
- data/app/models/spree/promotion.rb +2 -6
- data/app/models/spree/promotion_action.rb +2 -12
- data/app/models/spree/promotion_code/batch_builder.rb +0 -14
- data/app/models/spree/promotion_code.rb +2 -2
- data/app/models/spree/promotion_rule.rb +0 -4
- data/app/models/spree/refund.rb +0 -60
- data/app/models/spree/reimbursement.rb +3 -41
- data/app/models/spree/reimbursement_performer.rb +2 -8
- data/app/models/spree/reimbursement_type/credit.rb +1 -4
- data/app/models/spree/reimbursement_type/reimbursement_helpers.rb +1 -2
- data/app/models/spree/reimbursement_type/store_credit.rb +1 -4
- data/app/models/spree/return_authorization.rb +1 -4
- data/app/models/spree/return_item.rb +1 -19
- data/app/models/spree/shipment.rb +1 -54
- data/app/models/spree/shipping_method.rb +0 -25
- data/app/models/spree/shipping_rate.rb +0 -2
- data/app/models/spree/state.rb +0 -4
- data/app/models/spree/stock/simple_coordinator.rb +1 -20
- data/app/models/spree/stock/splitter/base.rb +2 -7
- data/app/models/spree/stock_item.rb +1 -7
- data/app/models/spree/store.rb +0 -12
- data/app/models/spree/store_credit.rb +0 -8
- data/app/models/spree/store_credit_category.rb +0 -32
- data/app/models/spree/tax_calculator/shipping_rate.rb +1 -12
- data/app/models/spree/tax_rate.rb +0 -27
- data/app/models/spree/taxon/active_storage_attachment.rb +0 -5
- data/app/models/spree/taxon/paperclip_attachment.rb +0 -5
- data/app/models/spree/taxon.rb +0 -11
- data/app/models/spree/user_address.rb +0 -5
- data/app/models/spree/variant.rb +2 -46
- data/config/locales/en.yml +0 -8
- data/db/migrate/20180416083007_add_apply_to_all_to_variant_property_rule.rb +1 -1
- data/lib/generators/solidus/install/install_generator.rb +13 -2
- data/lib/generators/solidus/install/templates/config/initializers/spree.rb.tt +3 -39
- data/lib/generators/spree/dummy/dummy_generator.rb +2 -1
- data/lib/generators/spree/dummy/templates/rails/database.yml +6 -1
- data/lib/generators/spree/dummy/templates/rails/storage.yml +3 -0
- data/lib/generators/spree/dummy/templates/rails/test.rb +2 -0
- data/lib/spree/app_configuration.rb +6 -73
- data/lib/spree/core/class_constantizer.rb +2 -0
- data/lib/spree/core/controller_helpers/auth.rb +1 -14
- data/lib/spree/core/controller_helpers/order.rb +2 -22
- data/lib/spree/core/controller_helpers/payment_parameters.rb +0 -54
- data/lib/spree/core/controller_helpers/pricing.rb +0 -8
- data/lib/spree/core/controller_helpers/strong_parameters.rb +0 -4
- data/lib/spree/core/engine.rb +0 -43
- data/lib/spree/core/environment_extension.rb +0 -9
- data/lib/spree/core/product_filters.rb +0 -40
- data/lib/spree/core/role_configuration.rb +0 -14
- data/lib/spree/core/search/base.rb +0 -26
- data/lib/spree/core/state_machines.rb +2 -11
- data/lib/spree/core/validators/email.rb +1 -1
- data/lib/spree/core/version.rb +1 -1
- data/lib/spree/core.rb +9 -8
- data/lib/spree/event/configuration.rb +0 -5
- data/lib/spree/event/subscriber.rb +0 -18
- data/lib/spree/event/subscriber_registry.rb +3 -1
- data/lib/spree/event.rb +0 -31
- data/lib/spree/i18n.rb +0 -22
- data/lib/spree/money.rb +3 -18
- data/lib/spree/permitted_attributes.rb +3 -60
- data/lib/spree/testing_support/blacklist_urls.rb +1 -1
- data/lib/spree/testing_support/capybara_ext.rb +0 -30
- data/lib/spree/testing_support/controller_requests.rb +0 -82
- data/lib/spree/testing_support/dummy_app/migrations.rb +0 -3
- data/lib/spree/testing_support/dummy_app.rb +6 -16
- data/lib/spree/testing_support/factories/order_factory.rb +0 -1
- data/lib/spree/testing_support/factories/refund_factory.rb +0 -1
- data/lib/spree/testing_support/order_walkthrough.rb +0 -3
- data/lib/spree/testing_support/preferences.rb +0 -25
- data/lib/spree/testing_support.rb +1 -1
- data/lib/tasks/migrations/migrate_default_billing_addresses_to_address_book.rake +20 -15
- data/solidus_core.gemspec +1 -24
- metadata +9 -74
- data/app/mailers/spree/test_mailer.rb +0 -13
- data/app/models/concerns/spree/user_payment_source.rb +0 -26
- data/app/models/spree/calculator/free_shipping.rb +0 -22
- data/app/models/spree/calculator/percent_per_item.rb +0 -51
- data/app/models/spree/calculator/price_sack.rb +0 -28
- data/app/models/spree/gateway/bogus.rb +0 -13
- data/app/models/spree/gateway/bogus_simple.rb +0 -13
- data/app/models/spree/gateway.rb +0 -14
- data/app/models/spree/order/checkout.rb +0 -244
- data/app/models/spree/order_capturing.rb +0 -50
- data/app/models/spree/promotion_handler/free_shipping.rb +0 -9
- data/lib/generators/spree/install/install_generator.rb +0 -15
- data/lib/solidus/migrations/rename_gateways.rb +0 -41
- data/lib/spree/core/current_store.rb +0 -24
- data/lib/spree/paranoia_deprecations.rb +0 -41
- data/lib/spree/preferences/persistable.rb +0 -23
- data/lib/spree/promo/environment.rb +0 -12
- data/lib/spree/testing_support/bar_ability.rb +0 -19
- data/lib/spree/testing_support/fixtures/file.txt +0 -1
- data/lib/tasks/core.rake +0 -104
- data/lib/tasks/email.rake +0 -12
- data/lib/tasks/migrations/copy_order_bill_address_to_credit_card.rake +0 -119
- data/lib/tasks/migrations/migrate_shipping_rate_taxes.rake +0 -22
- data/lib/tasks/migrations/migrate_user_addresses.rake +0 -34
- data/lib/tasks/migrations/rename_gateways.rake +0 -23
- data/lib/tasks/order_capturing.rake +0 -27
- data/lib/tasks/solidus/check_orders_with_invalid_email.rake +0 -18
@@ -25,7 +25,7 @@ module Spree
|
|
25
25
|
factory_bot_paths: "Spree::TestingSupport::FactoryBot.definition_file_paths",
|
26
26
|
check_factory_bot_version: "Spree::TestingSupport::FactoryBot.check_version",
|
27
27
|
load_all_factories: "Spree::TestingSupport::FactoryBot.add_paths_and_load!",
|
28
|
-
deprecator: Spree::
|
28
|
+
deprecator: Spree::Deprecator
|
29
29
|
)
|
30
30
|
end
|
31
31
|
end
|
@@ -3,29 +3,34 @@
|
|
3
3
|
namespace :solidus do
|
4
4
|
namespace :migrations do
|
5
5
|
namespace :migrate_default_billing_addresses_to_address_book do
|
6
|
-
task
|
7
|
-
|
8
|
-
print "Migrating default billing addresses to address book in batches of #{batch_size} ... "
|
6
|
+
task up: :environment do
|
7
|
+
print "Migrating default billing addresses to address book ... "
|
9
8
|
if Spree::UserAddress.where(default_billing: true).any?
|
10
|
-
Spree.
|
11
|
-
batch.update_all(bill_address_id: nil) # rubocop:disable Rails/SkipsModelValidations
|
12
|
-
end
|
9
|
+
Spree::LegacyUser.joins(:bill_address).update_all(bill_address_id: nil) # rubocop:disable Rails/SkipsModelValidations
|
13
10
|
end
|
14
|
-
Spree::
|
15
|
-
|
11
|
+
adapter_type = Spree::Base.connection.adapter_name.downcase.to_sym
|
12
|
+
if adapter_type == :mysql2
|
13
|
+
sql = <<~SQL
|
14
|
+
UPDATE spree_user_addresses
|
16
15
|
JOIN spree_users ON spree_user_addresses.user_id = spree_users.id
|
17
|
-
|
16
|
+
AND spree_user_addresses.address_id = spree_users.bill_address_id
|
17
|
+
SET spree_user_addresses.default_billing = true
|
18
|
+
SQL
|
19
|
+
else
|
20
|
+
sql = <<~SQL
|
21
|
+
UPDATE spree_user_addresses
|
22
|
+
SET default_billing = true
|
23
|
+
FROM spree_users
|
24
|
+
WHERE spree_user_addresses.address_id = spree_users.bill_address_id
|
25
|
+
AND spree_user_addresses.user_id = spree_users.id;
|
18
26
|
SQL
|
19
|
-
).in_batches(of: batch_size).each do |batch|
|
20
|
-
batch.update_all(default_billing: true) # rubocop:disable Rails/SkipsModelValidations
|
21
27
|
end
|
22
|
-
|
28
|
+
Spree::Base.connection.execute sql
|
23
29
|
puts "Success"
|
24
30
|
end
|
25
31
|
|
26
|
-
task
|
27
|
-
|
28
|
-
Spree::UserAddress.in_batches(of: batch_size).update_all(default_billing: false) # rubocop:disable Rails/SkipsModelValidations
|
32
|
+
task down: :environment do
|
33
|
+
Spree::UserAddress.update_all(default_billing: false) # rubocop:disable Rails/SkipsModelValidations
|
29
34
|
puts "Rolled back default billing address migration to address book"
|
30
35
|
end
|
31
36
|
end
|
data/solidus_core.gemspec
CHANGED
@@ -39,30 +39,7 @@ Gem::Specification.new do |s|
|
|
39
39
|
s.add_dependency 'kaminari-activerecord', '~> 1.1'
|
40
40
|
s.add_dependency 'mini_magick', '~> 4.10'
|
41
41
|
s.add_dependency 'monetize', '~> 1.8'
|
42
|
-
s.add_dependency 'kt-paperclip',
|
43
|
-
s.add_dependency 'paranoia', '~> 2.4'
|
42
|
+
s.add_dependency 'kt-paperclip', '~> 6.3'
|
44
43
|
s.add_dependency 'ransack', '~> 2.0'
|
45
44
|
s.add_dependency 'state_machines-activerecord', '~> 0.6'
|
46
|
-
|
47
|
-
s.post_install_message = <<-MSG
|
48
|
-
-------------------------------------------------------------
|
49
|
-
Thank you for using Solidus
|
50
|
-
-------------------------------------------------------------
|
51
|
-
If this is a fresh install, don't forget to run the Solidus
|
52
|
-
installer with the following command:
|
53
|
-
|
54
|
-
$ bin/rails g solidus:install
|
55
|
-
|
56
|
-
If you are updating Solidus from an older version, please run
|
57
|
-
the following commands to complete the update:
|
58
|
-
|
59
|
-
$ bin/rails railties:install:migrations
|
60
|
-
$ bin/rails db:migrate
|
61
|
-
$ bin/rails solidus:upgrade:two_point_eleven
|
62
|
-
|
63
|
-
Please report any issues at:
|
64
|
-
- https://github.com/solidusio/solidus/issues
|
65
|
-
- http://slack.solidus.io/
|
66
|
-
-------------------------------------------------------------
|
67
|
-
MSG
|
68
45
|
end
|
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:
|
4
|
+
version: 3.0.0.rc2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Solidus Team
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-03-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionmailer
|
@@ -332,38 +332,18 @@ dependencies:
|
|
332
332
|
version: '1.8'
|
333
333
|
- !ruby/object:Gem::Dependency
|
334
334
|
name: kt-paperclip
|
335
|
-
requirement: !ruby/object:Gem::Requirement
|
336
|
-
requirements:
|
337
|
-
- - ">="
|
338
|
-
- !ruby/object:Gem::Version
|
339
|
-
version: 4.4.0
|
340
|
-
- - "<"
|
341
|
-
- !ruby/object:Gem::Version
|
342
|
-
version: '7'
|
343
|
-
type: :runtime
|
344
|
-
prerelease: false
|
345
|
-
version_requirements: !ruby/object:Gem::Requirement
|
346
|
-
requirements:
|
347
|
-
- - ">="
|
348
|
-
- !ruby/object:Gem::Version
|
349
|
-
version: 4.4.0
|
350
|
-
- - "<"
|
351
|
-
- !ruby/object:Gem::Version
|
352
|
-
version: '7'
|
353
|
-
- !ruby/object:Gem::Dependency
|
354
|
-
name: paranoia
|
355
335
|
requirement: !ruby/object:Gem::Requirement
|
356
336
|
requirements:
|
357
337
|
- - "~>"
|
358
338
|
- !ruby/object:Gem::Version
|
359
|
-
version: '
|
339
|
+
version: '6.3'
|
360
340
|
type: :runtime
|
361
341
|
prerelease: false
|
362
342
|
version_requirements: !ruby/object:Gem::Requirement
|
363
343
|
requirements:
|
364
344
|
- - "~>"
|
365
345
|
- !ruby/object:Gem::Version
|
366
|
-
version: '
|
346
|
+
version: '6.3'
|
367
347
|
- !ruby/object:Gem::Dependency
|
368
348
|
name: ransack
|
369
349
|
requirement: !ruby/object:Gem::Requirement
|
@@ -421,7 +401,6 @@ files:
|
|
421
401
|
- app/mailers/spree/order_mailer.rb
|
422
402
|
- app/mailers/spree/promotion_code_batch_mailer.rb
|
423
403
|
- app/mailers/spree/reimbursement_mailer.rb
|
424
|
-
- app/mailers/spree/test_mailer.rb
|
425
404
|
- app/models/concerns/spree/active_storage_adapter.rb
|
426
405
|
- app/models/concerns/spree/active_storage_adapter/attachment.rb
|
427
406
|
- app/models/concerns/spree/active_storage_adapter/normalization.rb
|
@@ -436,7 +415,6 @@ files:
|
|
436
415
|
- app/models/concerns/spree/user_address_book.rb
|
437
416
|
- app/models/concerns/spree/user_api_authentication.rb
|
438
417
|
- app/models/concerns/spree/user_methods.rb
|
439
|
-
- app/models/concerns/spree/user_payment_source.rb
|
440
418
|
- app/models/concerns/spree/user_reporting.rb
|
441
419
|
- app/models/spree/ability.rb
|
442
420
|
- app/models/spree/address.rb
|
@@ -453,10 +431,7 @@ files:
|
|
453
431
|
- app/models/spree/calculator/flat_percent_item_total.rb
|
454
432
|
- app/models/spree/calculator/flat_rate.rb
|
455
433
|
- app/models/spree/calculator/flexi_rate.rb
|
456
|
-
- app/models/spree/calculator/free_shipping.rb
|
457
434
|
- app/models/spree/calculator/percent_on_line_item.rb
|
458
|
-
- app/models/spree/calculator/percent_per_item.rb
|
459
|
-
- app/models/spree/calculator/price_sack.rb
|
460
435
|
- app/models/spree/calculator/returns/default_refund_amount.rb
|
461
436
|
- app/models/spree/calculator/shipping/flat_percent_item_total.rb
|
462
437
|
- app/models/spree/calculator/shipping/flat_rate.rb
|
@@ -475,9 +450,6 @@ files:
|
|
475
450
|
- app/models/spree/fulfilment_changer.rb
|
476
451
|
- app/models/spree/gallery/product_gallery.rb
|
477
452
|
- app/models/spree/gallery/variant_gallery.rb
|
478
|
-
- app/models/spree/gateway.rb
|
479
|
-
- app/models/spree/gateway/bogus.rb
|
480
|
-
- app/models/spree/gateway/bogus_simple.rb
|
481
453
|
- app/models/spree/image.rb
|
482
454
|
- app/models/spree/image/active_storage_attachment.rb
|
483
455
|
- app/models/spree/image/paperclip_attachment.rb
|
@@ -490,11 +462,9 @@ files:
|
|
490
462
|
- app/models/spree/option_value.rb
|
491
463
|
- app/models/spree/option_values_variant.rb
|
492
464
|
- app/models/spree/order.rb
|
493
|
-
- app/models/spree/order/checkout.rb
|
494
465
|
- app/models/spree/order/number_generator.rb
|
495
466
|
- app/models/spree/order/payments.rb
|
496
467
|
- app/models/spree/order_cancellations.rb
|
497
|
-
- app/models/spree/order_capturing.rb
|
498
468
|
- app/models/spree/order_contents.rb
|
499
469
|
- app/models/spree/order_inventory.rb
|
500
470
|
- app/models/spree/order_merger.rb
|
@@ -548,7 +518,6 @@ files:
|
|
548
518
|
- app/models/spree/promotion_code_batch.rb
|
549
519
|
- app/models/spree/promotion_handler/cart.rb
|
550
520
|
- app/models/spree/promotion_handler/coupon.rb
|
551
|
-
- app/models/spree/promotion_handler/free_shipping.rb
|
552
521
|
- app/models/spree/promotion_handler/page.rb
|
553
522
|
- app/models/spree/promotion_handler/shipping.rb
|
554
523
|
- app/models/spree/promotion_rule.rb
|
@@ -752,10 +721,9 @@ files:
|
|
752
721
|
- lib/generators/spree/dummy/templates/rails/database.yml
|
753
722
|
- lib/generators/spree/dummy/templates/rails/routes.rb
|
754
723
|
- lib/generators/spree/dummy/templates/rails/script/rails
|
724
|
+
- lib/generators/spree/dummy/templates/rails/storage.yml
|
755
725
|
- lib/generators/spree/dummy/templates/rails/test.rb
|
756
|
-
- lib/generators/spree/install/install_generator.rb
|
757
726
|
- lib/solidus/migrations/promotions_with_code_handlers.rb
|
758
|
-
- lib/solidus/migrations/rename_gateways.rb
|
759
727
|
- lib/solidus_core.rb
|
760
728
|
- lib/spree/app_configuration.rb
|
761
729
|
- lib/spree/config.rb
|
@@ -771,7 +739,6 @@ files:
|
|
771
739
|
- lib/spree/core/controller_helpers/search.rb
|
772
740
|
- lib/spree/core/controller_helpers/store.rb
|
773
741
|
- lib/spree/core/controller_helpers/strong_parameters.rb
|
774
|
-
- lib/spree/core/current_store.rb
|
775
742
|
- lib/spree/core/engine.rb
|
776
743
|
- lib/spree/core/environment.rb
|
777
744
|
- lib/spree/core/environment/calculators.rb
|
@@ -813,7 +780,6 @@ files:
|
|
813
780
|
- lib/spree/migration_helpers.rb
|
814
781
|
- lib/spree/migrations.rb
|
815
782
|
- lib/spree/money.rb
|
816
|
-
- lib/spree/paranoia_deprecations.rb
|
817
783
|
- lib/spree/permission_sets.rb
|
818
784
|
- lib/spree/permission_sets/base.rb
|
819
785
|
- lib/spree/permission_sets/configuration_display.rb
|
@@ -835,18 +801,15 @@ files:
|
|
835
801
|
- lib/spree/permission_sets/user_management.rb
|
836
802
|
- lib/spree/permitted_attributes.rb
|
837
803
|
- lib/spree/preferences/configuration.rb
|
838
|
-
- lib/spree/preferences/persistable.rb
|
839
804
|
- lib/spree/preferences/preferable.rb
|
840
805
|
- lib/spree/preferences/preferable_class_methods.rb
|
841
806
|
- lib/spree/preferences/scoped_store.rb
|
842
807
|
- lib/spree/preferences/static_model_preferences.rb
|
843
808
|
- lib/spree/preferences/statically_configurable.rb
|
844
809
|
- lib/spree/preferences/store.rb
|
845
|
-
- lib/spree/promo/environment.rb
|
846
810
|
- lib/spree/testing_support.rb
|
847
811
|
- lib/spree/testing_support/ability_helpers.rb
|
848
812
|
- lib/spree/testing_support/authorization_helpers.rb
|
849
|
-
- lib/spree/testing_support/bar_ability.rb
|
850
813
|
- lib/spree/testing_support/blacklist_urls.rb
|
851
814
|
- lib/spree/testing_support/caching.rb
|
852
815
|
- lib/spree/testing_support/capybara_ext.rb
|
@@ -925,7 +888,6 @@ files:
|
|
925
888
|
- lib/spree/testing_support/factories/zone_factory.rb
|
926
889
|
- lib/spree/testing_support/factory_bot.rb
|
927
890
|
- lib/spree/testing_support/fixtures/blank.jpg
|
928
|
-
- lib/spree/testing_support/fixtures/file.txt
|
929
891
|
- lib/spree/testing_support/flash.rb
|
930
892
|
- lib/spree/testing_support/job_helpers.rb
|
931
893
|
- lib/spree/testing_support/order_walkthrough.rb
|
@@ -939,16 +901,8 @@ files:
|
|
939
901
|
- lib/spree/testing_support/url_helpers.rb
|
940
902
|
- lib/spree/user_class_handle.rb
|
941
903
|
- lib/spree_core.rb
|
942
|
-
- lib/tasks/core.rake
|
943
|
-
- lib/tasks/email.rake
|
944
|
-
- lib/tasks/migrations/copy_order_bill_address_to_credit_card.rake
|
945
904
|
- lib/tasks/migrations/migrate_address_names.rake
|
946
905
|
- lib/tasks/migrations/migrate_default_billing_addresses_to_address_book.rake
|
947
|
-
- lib/tasks/migrations/migrate_shipping_rate_taxes.rake
|
948
|
-
- lib/tasks/migrations/migrate_user_addresses.rake
|
949
|
-
- lib/tasks/migrations/rename_gateways.rake
|
950
|
-
- lib/tasks/order_capturing.rake
|
951
|
-
- lib/tasks/solidus/check_orders_with_invalid_email.rake
|
952
906
|
- lib/tasks/upgrade.rake
|
953
907
|
- solidus_core.gemspec
|
954
908
|
- vendor/assets/javascripts/jquery.payment.js
|
@@ -958,26 +912,7 @@ homepage: http://solidus.io
|
|
958
912
|
licenses:
|
959
913
|
- BSD-3-Clause
|
960
914
|
metadata: {}
|
961
|
-
post_install_message:
|
962
|
-
-------------------------------------------------------------
|
963
|
-
Thank you for using Solidus
|
964
|
-
-------------------------------------------------------------
|
965
|
-
If this is a fresh install, don't forget to run the Solidus
|
966
|
-
installer with the following command:
|
967
|
-
|
968
|
-
$ bin/rails g solidus:install
|
969
|
-
|
970
|
-
If you are updating Solidus from an older version, please run
|
971
|
-
the following commands to complete the update:
|
972
|
-
|
973
|
-
$ bin/rails railties:install:migrations
|
974
|
-
$ bin/rails db:migrate
|
975
|
-
$ bin/rails solidus:upgrade:two_point_eleven
|
976
|
-
|
977
|
-
Please report any issues at:
|
978
|
-
- https://github.com/solidusio/solidus/issues
|
979
|
-
- http://slack.solidus.io/
|
980
|
-
-------------------------------------------------------------
|
915
|
+
post_install_message:
|
981
916
|
rdoc_options: []
|
982
917
|
require_paths:
|
983
918
|
- lib
|
@@ -992,8 +927,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
992
927
|
- !ruby/object:Gem::Version
|
993
928
|
version: 1.8.23
|
994
929
|
requirements: []
|
995
|
-
rubygems_version: 3.
|
996
|
-
signing_key:
|
930
|
+
rubygems_version: 3.1.4
|
931
|
+
signing_key:
|
997
932
|
specification_version: 4
|
998
933
|
summary: Essential models, mailers, and classes for the Solidus e-commerce project.
|
999
934
|
test_files: []
|
@@ -1,13 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Spree
|
4
|
-
class TestMailer < BaseMailer
|
5
|
-
def test_email(email)
|
6
|
-
Spree::Deprecation.warn("Spree::TestMailer has been deprecated and will be removed with Solidus 3.0")
|
7
|
-
|
8
|
-
store = Spree::Store.default
|
9
|
-
subject = "#{store.name} #{t('.subject')}"
|
10
|
-
mail(to: email, from: from_address(store), subject: subject)
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
@@ -1,26 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Spree
|
4
|
-
module UserPaymentSource
|
5
|
-
extend ActiveSupport::Concern
|
6
|
-
|
7
|
-
def default_credit_card
|
8
|
-
Spree::Deprecation.warn(
|
9
|
-
"user.default_credit_card is deprecated. Please use user.wallet.default_wallet_payment_source instead.",
|
10
|
-
caller
|
11
|
-
)
|
12
|
-
default = wallet.default_wallet_payment_source
|
13
|
-
if default && default.payment_source.is_a?(Spree::CreditCard)
|
14
|
-
default.payment_source
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
def payment_sources
|
19
|
-
Spree::Deprecation.warn(
|
20
|
-
"user.payment_sources is deprecated. Please use user.wallet.wallet_payment_sources instead.",
|
21
|
-
caller
|
22
|
-
)
|
23
|
-
credit_cards.with_payment_profile
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
@@ -1,22 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require_dependency 'spree/calculator'
|
4
|
-
|
5
|
-
module Spree
|
6
|
-
# @deprecated This calculator will be removed in future versions of Spree.
|
7
|
-
# The only case where it was used was for Free Shipping Promotions. There is
|
8
|
-
# now a Promotion Action which deals with these types of promotions instead.
|
9
|
-
class Calculator::FreeShipping < Calculator
|
10
|
-
def compute(object)
|
11
|
-
Spree::Deprecation.warn('This method is deprecated, because it is no longer used')
|
12
|
-
if object.is_a?(Array)
|
13
|
-
return if object.empty?
|
14
|
-
order = object.first.order
|
15
|
-
else
|
16
|
-
order = object
|
17
|
-
end
|
18
|
-
|
19
|
-
order.ship_total
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
@@ -1,51 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require_dependency 'spree/calculator'
|
4
|
-
|
5
|
-
module Spree
|
6
|
-
# A calculator for promotions that calculates a percent-off discount
|
7
|
-
# for all matching products in an order. This should not be used as a
|
8
|
-
# shipping calculator since it would be the same thing as a flat percent
|
9
|
-
# off the entire order.
|
10
|
-
#
|
11
|
-
#
|
12
|
-
# TODO Should be deprecated now that we have adjustments at the line item level in spree core
|
13
|
-
|
14
|
-
class Calculator::PercentPerItem < Calculator
|
15
|
-
preference :percent, :decimal, default: 0
|
16
|
-
|
17
|
-
def compute(object = nil)
|
18
|
-
Spree::Deprecation.warn('This method is deprecated, please use adjustments at line item level')
|
19
|
-
|
20
|
-
return 0 if object.nil?
|
21
|
-
object.line_items.sum { |line_item|
|
22
|
-
value_for_line_item(line_item)
|
23
|
-
}
|
24
|
-
end
|
25
|
-
|
26
|
-
private
|
27
|
-
|
28
|
-
# Returns all products that match this calculator, but only if the calculator
|
29
|
-
# is attached to a promotion. If attached to a ShippingMethod, nil is returned.
|
30
|
-
# Copied from per_item.rb
|
31
|
-
def matching_products
|
32
|
-
if compute_on_promotion?
|
33
|
-
calculable.promotion.rules.flat_map do |rule|
|
34
|
-
rule.respond_to?(:products) ? rule.products : []
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
def value_for_line_item(line_item)
|
40
|
-
if compute_on_promotion?
|
41
|
-
return 0 unless matching_products.blank? || matching_products.include?(line_item.product)
|
42
|
-
end
|
43
|
-
((line_item.price * line_item.quantity) * preferred_percent) / 100
|
44
|
-
end
|
45
|
-
|
46
|
-
# Determines wether or not the calculable object is a promotion
|
47
|
-
def compute_on_promotion?
|
48
|
-
@compute_on_promotion ||= calculable.respond_to?(:promotion)
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|
@@ -1,28 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require_dependency 'spree/calculator'
|
4
|
-
|
5
|
-
module Spree
|
6
|
-
class Calculator::PriceSack < Calculator
|
7
|
-
preference :minimal_amount, :decimal, default: 0
|
8
|
-
preference :normal_amount, :decimal, default: 0
|
9
|
-
preference :discount_amount, :decimal, default: 0
|
10
|
-
preference :currency, :string, default: ->{ Spree::Config[:currency] }
|
11
|
-
|
12
|
-
# as object we always get line items, as calculable we have Coupon, ShippingMethod
|
13
|
-
def compute(object)
|
14
|
-
Spree::Deprecation.warn('This method is deprecated, please use adjustments at line item level')
|
15
|
-
if object.is_a?(Array)
|
16
|
-
base = object.sum { |element| element.respond_to?(:amount) ? element.amount : BigDecimal(element.to_s) }
|
17
|
-
else
|
18
|
-
base = object.respond_to?(:amount) ? object.amount : BigDecimal(object.to_s)
|
19
|
-
end
|
20
|
-
|
21
|
-
if base < preferred_minimal_amount
|
22
|
-
preferred_normal_amount
|
23
|
-
else
|
24
|
-
preferred_discount_amount
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
@@ -1,13 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Spree
|
4
|
-
# @deprecated Use Spree::PaymentMethod::BogusCreditCard instead
|
5
|
-
class Gateway::Bogus < PaymentMethod::BogusCreditCard
|
6
|
-
def initialize(*args)
|
7
|
-
Spree::Deprecation.warn \
|
8
|
-
'Spree::Gateway::Bogus is deprecated. ' \
|
9
|
-
'Please use Spree::PaymentMethod::BogusCreditCard instead'
|
10
|
-
super
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
@@ -1,13 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Spree
|
4
|
-
# @deprecated Use Spree::PaymentMethod::SimpleBogusCreditCard instead
|
5
|
-
class Gateway::BogusSimple < Spree::PaymentMethod::SimpleBogusCreditCard
|
6
|
-
def initialize(*args)
|
7
|
-
Spree::Deprecation.warn \
|
8
|
-
'Spree::Gateway::BogusSimple is deprecated. ' \
|
9
|
-
'Please use Spree::PaymentMethod::SimpleBogusCreditCard instead'
|
10
|
-
super
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
data/app/models/spree/gateway.rb
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Spree
|
4
|
-
# @deprecated Use Spree::PaymentMethod::CreditCard or Spree::PaymentMethod instead
|
5
|
-
class Gateway < PaymentMethod::CreditCard
|
6
|
-
def initialize(*args)
|
7
|
-
Spree::Deprecation.warn \
|
8
|
-
"Using Spree::Gateway as parent class of payment methods is deprecated. " \
|
9
|
-
"Please use Spree::PaymentMethod::CreditCard for credit card based payment methods " \
|
10
|
-
"or Spree::PaymentMethod for non credit card payment methods instead."
|
11
|
-
super
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|