solidus_core 3.1.9 → 3.2.0.alpha

Sign up to get free protection for your applications and to get access to all the features.
Files changed (95) hide show
  1. checksums.yaml +4 -4
  2. data/app/helpers/spree/products_helper.rb +1 -1
  3. data/app/models/concerns/spree/active_storage_adapter/attachment.rb +23 -10
  4. data/app/models/concerns/spree/active_storage_adapter.rb +1 -1
  5. data/app/models/concerns/spree/default_price.rb +28 -4
  6. data/app/models/concerns/spree/user_address_book.rb +11 -1
  7. data/app/models/spree/adjustment.rb +1 -0
  8. data/app/models/spree/carton.rb +1 -1
  9. data/app/models/spree/option_value.rb +9 -0
  10. data/app/models/spree/order.rb +68 -29
  11. data/app/models/spree/order_contents.rb +2 -1
  12. data/app/models/spree/order_inventory.rb +1 -1
  13. data/app/models/spree/order_merger.rb +2 -2
  14. data/app/models/spree/order_taxation.rb +6 -4
  15. data/app/models/spree/order_updater.rb +4 -3
  16. data/app/models/spree/payment_method.rb +11 -0
  17. data/app/models/spree/price.rb +1 -1
  18. data/app/models/spree/product/scopes.rb +21 -3
  19. data/app/models/spree/product.rb +1 -1
  20. data/app/models/spree/promotion/actions/create_adjustment.rb +4 -0
  21. data/app/models/spree/promotion/actions/create_item_adjustments.rb +5 -6
  22. data/app/models/spree/promotion/rules/product.rb +20 -8
  23. data/app/models/spree/promotion/rules/store.rb +4 -0
  24. data/app/models/spree/promotion/rules/taxon.rb +4 -0
  25. data/app/models/spree/promotion/rules/user.rb +4 -0
  26. data/app/models/spree/promotion.rb +34 -23
  27. data/app/models/spree/promotion_action.rb +4 -0
  28. data/app/models/spree/promotion_code.rb +8 -4
  29. data/app/models/spree/promotion_handler/cart.rb +26 -6
  30. data/app/models/spree/promotion_rule.rb +5 -0
  31. data/app/models/spree/reimbursement.rb +2 -2
  32. data/app/models/spree/return_item.rb +1 -2
  33. data/app/models/spree/stock/allocator/on_hand_first.rb +2 -2
  34. data/app/models/spree/stock/quantifier.rb +12 -8
  35. data/app/models/spree/stock/simple_coordinator.rb +2 -1
  36. data/app/models/spree/tax/item_tax.rb +3 -2
  37. data/app/models/spree/tax/order_tax.rb +3 -1
  38. data/app/models/spree/tax/tax_location.rb +4 -7
  39. data/app/models/spree/tax_rate.rb +2 -0
  40. data/app/models/spree/variant/price_selector.rb +1 -18
  41. data/app/models/spree/variant.rb +2 -2
  42. data/app/subscribers/spree/mailer_subscriber.rb +4 -0
  43. data/app/subscribers/spree/order_mailer_subscriber.rb +35 -0
  44. data/config/locales/en.yml +7 -253
  45. data/db/migrate/20201127212108_add_type_before_removal_to_spree_payment_methods.rb +7 -0
  46. data/db/migrate/20220317165036_set_promotions_with_any_policy_to_all_if_possible.rb +20 -0
  47. data/lib/generators/solidus/install/install_generator/bundler_context.rb +97 -0
  48. data/lib/generators/solidus/install/install_generator/install_frontend.rb +50 -0
  49. data/lib/generators/solidus/install/install_generator/support_solidus_frontend_extraction.rb +48 -0
  50. data/lib/generators/solidus/install/install_generator.rb +56 -49
  51. data/lib/generators/solidus/install/templates/config/initializers/spree.rb.tt +6 -16
  52. data/lib/generators/solidus/install/templates/vendor/assets/javascripts/spree/backend/all.js +2 -2
  53. data/lib/spree/app_configuration.rb +29 -3
  54. data/lib/spree/bus.rb +20 -0
  55. data/lib/spree/core/controller_helpers/auth.rb +9 -1
  56. data/lib/spree/core/controller_helpers/current_host.rb +1 -3
  57. data/lib/spree/core/controller_helpers/order.rb +10 -10
  58. data/lib/spree/core/controller_helpers/search.rb +1 -1
  59. data/lib/spree/core/engine.rb +33 -8
  60. data/lib/spree/core/state_machines/order.rb +1 -1
  61. data/lib/spree/core/stock_configuration.rb +18 -0
  62. data/lib/spree/core/validators/email.rb +3 -1
  63. data/lib/spree/core/version.rb +1 -1
  64. data/lib/spree/core.rb +20 -0
  65. data/lib/spree/event/subscriber_registry.rb +4 -6
  66. data/lib/spree/event.rb +1 -1
  67. data/lib/spree/migrations.rb +1 -1
  68. data/lib/spree/permission_sets/default_customer.rb +8 -1
  69. data/lib/spree/permitted_attributes.rb +4 -4
  70. data/lib/spree/preferences/configuration.rb +34 -12
  71. data/lib/spree/preferences/preferable.rb +0 -5
  72. data/lib/spree/preferences/preferable_class_methods.rb +3 -3
  73. data/lib/spree/preferences/preference_differentiator.rb +2 -1
  74. data/lib/spree/preferences/static_model_preferences.rb +0 -2
  75. data/lib/spree/rails_compatibility.rb +99 -0
  76. data/lib/spree/testing_support/bus_helpers.rb +101 -0
  77. data/lib/spree/testing_support/common_rake.rb +47 -19
  78. data/lib/spree/testing_support/dummy_app/assets/javascripts/spree/backend/all.js +1 -1
  79. data/lib/spree/testing_support/dummy_app/assets/javascripts/spree/frontend/all.js +1 -1
  80. data/lib/spree/testing_support/dummy_app.rb +6 -2
  81. data/lib/spree/testing_support/factories/address_factory.rb +7 -2
  82. data/lib/spree/testing_support/factories/inventory_unit_factory.rb +1 -1
  83. data/lib/spree/testing_support/factories/order_factory.rb +8 -4
  84. data/lib/spree/testing_support/factories/product_factory.rb +4 -1
  85. data/lib/spree/testing_support/factories/store_credit_factory.rb +4 -4
  86. data/lib/spree/testing_support/factory_bot.rb +1 -1
  87. data/lib/spree/testing_support/order_walkthrough.rb +5 -4
  88. data/lib/spree/testing_support/silence_deprecations.rb +9 -0
  89. data/lib/tasks/payment_method.rake +29 -0
  90. data/lib/tasks/solidus/delete_prices_with_nil_amount.rake +2 -2
  91. data/lib/tasks/solidus/split_promotions_with_any_match_policy.rake +33 -0
  92. data/solidus_core.gemspec +6 -2
  93. metadata +71 -26
  94. data/lib/generators/solidus/install/templates/vendor/assets/javascripts/spree/frontend/all.js +0 -10
  95. data/lib/generators/solidus/install/templates/vendor/assets/stylesheets/spree/frontend/all.css +0 -9
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: 3.1.9
4
+ version: 3.2.0.alpha
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: 2023-02-07 00:00:00.000000000 Z
11
+ date: 2022-08-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionmailer
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: '5.2'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: 6.2.x
22
+ version: 7.1.x
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: '5.2'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: 6.2.x
32
+ version: 7.1.x
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: actionpack
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -39,7 +39,7 @@ dependencies:
39
39
  version: '5.2'
40
40
  - - "<"
41
41
  - !ruby/object:Gem::Version
42
- version: 6.2.x
42
+ version: 7.1.x
43
43
  type: :runtime
44
44
  prerelease: false
45
45
  version_requirements: !ruby/object:Gem::Requirement
@@ -49,7 +49,7 @@ dependencies:
49
49
  version: '5.2'
50
50
  - - "<"
51
51
  - !ruby/object:Gem::Version
52
- version: 6.2.x
52
+ version: 7.1.x
53
53
  - !ruby/object:Gem::Dependency
54
54
  name: actionview
55
55
  requirement: !ruby/object:Gem::Requirement
@@ -59,7 +59,7 @@ dependencies:
59
59
  version: '5.2'
60
60
  - - "<"
61
61
  - !ruby/object:Gem::Version
62
- version: 6.2.x
62
+ version: 7.1.x
63
63
  type: :runtime
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
@@ -69,7 +69,7 @@ dependencies:
69
69
  version: '5.2'
70
70
  - - "<"
71
71
  - !ruby/object:Gem::Version
72
- version: 6.2.x
72
+ version: 7.1.x
73
73
  - !ruby/object:Gem::Dependency
74
74
  name: activejob
75
75
  requirement: !ruby/object:Gem::Requirement
@@ -79,7 +79,7 @@ dependencies:
79
79
  version: '5.2'
80
80
  - - "<"
81
81
  - !ruby/object:Gem::Version
82
- version: 6.2.x
82
+ version: 7.1.x
83
83
  type: :runtime
84
84
  prerelease: false
85
85
  version_requirements: !ruby/object:Gem::Requirement
@@ -89,7 +89,7 @@ dependencies:
89
89
  version: '5.2'
90
90
  - - "<"
91
91
  - !ruby/object:Gem::Version
92
- version: 6.2.x
92
+ version: 7.1.x
93
93
  - !ruby/object:Gem::Dependency
94
94
  name: activemodel
95
95
  requirement: !ruby/object:Gem::Requirement
@@ -99,7 +99,7 @@ dependencies:
99
99
  version: '5.2'
100
100
  - - "<"
101
101
  - !ruby/object:Gem::Version
102
- version: 6.2.x
102
+ version: 7.1.x
103
103
  type: :runtime
104
104
  prerelease: false
105
105
  version_requirements: !ruby/object:Gem::Requirement
@@ -109,7 +109,7 @@ dependencies:
109
109
  version: '5.2'
110
110
  - - "<"
111
111
  - !ruby/object:Gem::Version
112
- version: 6.2.x
112
+ version: 7.1.x
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: activerecord
115
115
  requirement: !ruby/object:Gem::Requirement
@@ -119,7 +119,7 @@ dependencies:
119
119
  version: '5.2'
120
120
  - - "<"
121
121
  - !ruby/object:Gem::Version
122
- version: 6.2.x
122
+ version: 7.1.x
123
123
  type: :runtime
124
124
  prerelease: false
125
125
  version_requirements: !ruby/object:Gem::Requirement
@@ -129,7 +129,7 @@ dependencies:
129
129
  version: '5.2'
130
130
  - - "<"
131
131
  - !ruby/object:Gem::Version
132
- version: 6.2.x
132
+ version: 7.1.x
133
133
  - !ruby/object:Gem::Dependency
134
134
  name: activesupport
135
135
  requirement: !ruby/object:Gem::Requirement
@@ -139,7 +139,7 @@ dependencies:
139
139
  version: '5.2'
140
140
  - - "<"
141
141
  - !ruby/object:Gem::Version
142
- version: 6.2.x
142
+ version: 7.1.x
143
143
  type: :runtime
144
144
  prerelease: false
145
145
  version_requirements: !ruby/object:Gem::Requirement
@@ -149,7 +149,7 @@ dependencies:
149
149
  version: '5.2'
150
150
  - - "<"
151
151
  - !ruby/object:Gem::Version
152
- version: 6.2.x
152
+ version: 7.1.x
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: railties
155
155
  requirement: !ruby/object:Gem::Requirement
@@ -159,7 +159,7 @@ dependencies:
159
159
  version: '5.2'
160
160
  - - "<"
161
161
  - !ruby/object:Gem::Version
162
- version: 6.2.x
162
+ version: 7.1.x
163
163
  type: :runtime
164
164
  prerelease: false
165
165
  version_requirements: !ruby/object:Gem::Requirement
@@ -169,7 +169,7 @@ dependencies:
169
169
  version: '5.2'
170
170
  - - "<"
171
171
  - !ruby/object:Gem::Version
172
- version: 6.2.x
172
+ version: 7.1.x
173
173
  - !ruby/object:Gem::Dependency
174
174
  name: activemerchant
175
175
  requirement: !ruby/object:Gem::Requirement
@@ -334,16 +334,22 @@ dependencies:
334
334
  name: kt-paperclip
335
335
  requirement: !ruby/object:Gem::Requirement
336
336
  requirements:
337
- - - "~>"
337
+ - - ">="
338
338
  - !ruby/object:Gem::Version
339
339
  version: '6.3'
340
+ - - "<"
341
+ - !ruby/object:Gem::Version
342
+ version: '8'
340
343
  type: :runtime
341
344
  prerelease: false
342
345
  version_requirements: !ruby/object:Gem::Requirement
343
346
  requirements:
344
- - - "~>"
347
+ - - ">="
345
348
  - !ruby/object:Gem::Version
346
349
  version: '6.3'
350
+ - - "<"
351
+ - !ruby/object:Gem::Version
352
+ version: '8'
347
353
  - !ruby/object:Gem::Dependency
348
354
  name: psych
349
355
  requirement: !ruby/object:Gem::Requirement
@@ -378,6 +384,20 @@ dependencies:
378
384
  - - "~>"
379
385
  - !ruby/object:Gem::Version
380
386
  version: '2.0'
387
+ - !ruby/object:Gem::Dependency
388
+ name: sprockets-rails
389
+ requirement: !ruby/object:Gem::Requirement
390
+ requirements:
391
+ - - ">="
392
+ - !ruby/object:Gem::Version
393
+ version: '0'
394
+ type: :runtime
395
+ prerelease: false
396
+ version_requirements: !ruby/object:Gem::Requirement
397
+ requirements:
398
+ - - ">="
399
+ - !ruby/object:Gem::Version
400
+ version: '0'
381
401
  - !ruby/object:Gem::Dependency
382
402
  name: state_machines-activerecord
383
403
  requirement: !ruby/object:Gem::Requirement
@@ -392,6 +412,20 @@ dependencies:
392
412
  - - "~>"
393
413
  - !ruby/object:Gem::Version
394
414
  version: '0.6'
415
+ - !ruby/object:Gem::Dependency
416
+ name: omnes
417
+ requirement: !ruby/object:Gem::Requirement
418
+ requirements:
419
+ - - "~>"
420
+ - !ruby/object:Gem::Version
421
+ version: 0.2.2
422
+ type: :runtime
423
+ prerelease: false
424
+ version_requirements: !ruby/object:Gem::Requirement
425
+ requirements:
426
+ - - "~>"
427
+ - !ruby/object:Gem::Version
428
+ version: 0.2.2
395
429
  description: Essential models, mailers, and classes for the Solidus e-commerce project.
396
430
  email: contact@solidus.io
397
431
  executables: []
@@ -661,6 +695,7 @@ files:
661
695
  - app/models/spree/zone.rb
662
696
  - app/models/spree/zone_member.rb
663
697
  - app/subscribers/spree/mailer_subscriber.rb
698
+ - app/subscribers/spree/order_mailer_subscriber.rb
664
699
  - app/views/layouts/spree/base_mailer.html.erb
665
700
  - app/views/spree/carton_mailer/shipped_email.html.erb
666
701
  - app/views/spree/carton_mailer/shipped_email.text.erb
@@ -723,15 +758,18 @@ files:
723
758
  - db/migrate/20200320144521_add_default_billng_flag_to_user_addresses.rb
724
759
  - db/migrate/20200530111458_add_bcc_email_to_spree_stores.rb
725
760
  - db/migrate/20201008213609_add_discontinue_on_to_spree_products.rb
761
+ - db/migrate/20201127212108_add_type_before_removal_to_spree_payment_methods.rb
726
762
  - db/migrate/20210122110141_add_name_to_spree_addresses.rb
727
763
  - db/migrate/20210312061050_change_column_null_on_prices.rb
764
+ - db/migrate/20220317165036_set_promotions_with_any_policy_to_all_if_possible.rb
728
765
  - db/seeds.rb
729
766
  - lib/generators/solidus/install/install_generator.rb
767
+ - lib/generators/solidus/install/install_generator/bundler_context.rb
768
+ - lib/generators/solidus/install/install_generator/install_frontend.rb
769
+ - lib/generators/solidus/install/install_generator/support_solidus_frontend_extraction.rb
730
770
  - lib/generators/solidus/install/templates/config/initializers/spree.rb.tt
731
771
  - lib/generators/solidus/install/templates/vendor/assets/javascripts/spree/backend/all.js
732
- - lib/generators/solidus/install/templates/vendor/assets/javascripts/spree/frontend/all.js
733
772
  - lib/generators/solidus/install/templates/vendor/assets/stylesheets/spree/backend/all.css
734
- - lib/generators/solidus/install/templates/vendor/assets/stylesheets/spree/frontend/all.css
735
773
  - lib/generators/solidus/update/templates/config/initializers/new_solidus_defaults.rb.tt
736
774
  - lib/generators/solidus/update/update_generator.rb
737
775
  - lib/generators/spree/custom_user/custom_user_generator.rb
@@ -748,6 +786,7 @@ files:
748
786
  - lib/solidus/migrations/promotions_with_code_handlers.rb
749
787
  - lib/solidus_core.rb
750
788
  - lib/spree/app_configuration.rb
789
+ - lib/spree/bus.rb
751
790
  - lib/spree/config.rb
752
791
  - lib/spree/core.rb
753
792
  - lib/spree/core/active_merchant_dependencies.rb
@@ -832,10 +871,12 @@ files:
832
871
  - lib/spree/preferences/static_model_preferences.rb
833
872
  - lib/spree/preferences/statically_configurable.rb
834
873
  - lib/spree/preferences/store.rb
874
+ - lib/spree/rails_compatibility.rb
835
875
  - lib/spree/testing_support.rb
836
876
  - lib/spree/testing_support/ability_helpers.rb
837
877
  - lib/spree/testing_support/authorization_helpers.rb
838
878
  - lib/spree/testing_support/blacklist_urls.rb
879
+ - lib/spree/testing_support/bus_helpers.rb
839
880
  - lib/spree/testing_support/caching.rb
840
881
  - lib/spree/testing_support/capybara_ext.rb
841
882
  - lib/spree/testing_support/common_rake.rb
@@ -923,12 +964,15 @@ files:
923
964
  - lib/spree/testing_support/rake.rb
924
965
  - lib/spree/testing_support/sequences.rb
925
966
  - lib/spree/testing_support/shared_examples/gallery.rb
967
+ - lib/spree/testing_support/silence_deprecations.rb
926
968
  - lib/spree/testing_support/translations.rb
927
969
  - lib/spree/testing_support/url_helpers.rb
928
970
  - lib/spree/user_class_handle.rb
929
971
  - lib/spree_core.rb
972
+ - lib/tasks/payment_method.rake
930
973
  - lib/tasks/solidus/check_orders_with_invalid_email.rake
931
974
  - lib/tasks/solidus/delete_prices_with_nil_amount.rake
975
+ - lib/tasks/solidus/split_promotions_with_any_match_policy.rake
932
976
  - solidus_core.gemspec
933
977
  - vendor/assets/javascripts/jquery.payment.js
934
978
  - vendor/assets/javascripts/jsuri.js
@@ -936,7 +980,8 @@ files:
936
980
  homepage: http://solidus.io
937
981
  licenses:
938
982
  - BSD-3-Clause
939
- metadata: {}
983
+ metadata:
984
+ rubygems_mfa_required: 'true'
940
985
  post_install_message: |
941
986
  -------------------------------------------------------------
942
987
  Thank you for using Solidus
@@ -974,8 +1019,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
974
1019
  - !ruby/object:Gem::Version
975
1020
  version: 1.8.23
976
1021
  requirements: []
977
- rubygems_version: 3.3.7
978
- signing_key:
1022
+ rubygems_version: 3.1.2
1023
+ signing_key:
979
1024
  specification_version: 4
980
1025
  summary: Essential models, mailers, and classes for the Solidus e-commerce project.
981
1026
  test_files: []
@@ -1,10 +0,0 @@
1
- // This is a manifest file that'll be compiled into including all the files listed below.
2
- // Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
3
- // be included in the compiled file accessible from http://example.com/assets/application.js
4
- // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
5
- // the compiled file.
6
- //
7
- //= require jquery
8
- //= require rails-ujs
9
- //= require spree/frontend
10
- //= require_tree .
@@ -1,9 +0,0 @@
1
- /*
2
- * This is a manifest file that'll automatically include all the stylesheets available in this directory
3
- * and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
4
- * the top of the compiled file, but it's generally better to create a new file per style scope.
5
- *
6
- *= require spree/frontend
7
- *= require_self
8
- *= require_tree .
9
- */