solidus_core 4.3.5 → 4.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (213) hide show
  1. checksums.yaml +4 -4
  2. data/app/helpers/spree/base_helper.rb +2 -2
  3. data/app/mailers/spree/base_mailer.rb +1 -1
  4. data/app/mailers/spree/carton_mailer.rb +1 -1
  5. data/app/mailers/spree/order_mailer.rb +3 -3
  6. data/app/mailers/spree/reimbursement_mailer.rb +1 -1
  7. data/app/models/concerns/spree/active_storage_adapter/normalization.rb +1 -1
  8. data/app/models/concerns/spree/active_storage_adapter.rb +1 -1
  9. data/app/models/concerns/spree/display_money.rb +1 -1
  10. data/app/models/concerns/spree/ordered_property_value_list.rb +2 -2
  11. data/app/models/concerns/spree/user_address_book.rb +4 -4
  12. data/app/models/concerns/spree/user_methods.rb +3 -3
  13. data/app/models/spree/address.rb +6 -6
  14. data/app/models/spree/adjustment.rb +13 -66
  15. data/app/models/spree/calculator/returns/default_refund_amount.rb +1 -1
  16. data/app/models/spree/carton.rb +2 -2
  17. data/app/models/spree/credit_card.rb +6 -6
  18. data/app/models/spree/deprecated_configurable_class.rb +40 -0
  19. data/app/models/spree/fulfilment_changer.rb +4 -4
  20. data/app/models/spree/inventory_unit.rb +2 -2
  21. data/app/models/spree/line_item.rb +1 -4
  22. data/app/models/spree/null_promotion_adjuster.rb +13 -0
  23. data/app/models/spree/null_promotion_advertiser.rb +9 -0
  24. data/app/models/spree/null_promotion_finder.rb +9 -0
  25. data/app/models/spree/null_promotion_handler.rb +44 -0
  26. data/app/models/spree/order.rb +15 -22
  27. data/app/models/spree/order_cancellations.rb +8 -8
  28. data/app/models/spree/order_mutex.rb +2 -2
  29. data/app/models/spree/order_shipping.rb +9 -9
  30. data/app/models/spree/order_updater.rb +6 -10
  31. data/app/models/spree/payment/processing.rb +2 -2
  32. data/app/models/spree/payment.rb +2 -2
  33. data/app/models/spree/payment_create.rb +1 -1
  34. data/app/models/spree/payment_method/store_credit.rb +1 -1
  35. data/app/models/spree/payment_source.rb +5 -1
  36. data/app/models/spree/permission_set.rb +11 -0
  37. data/app/models/spree/product.rb +7 -28
  38. data/app/models/spree/refund.rb +1 -1
  39. data/app/models/spree/reimbursement.rb +4 -4
  40. data/app/models/spree/reimbursement_performer.rb +3 -3
  41. data/app/models/spree/reimbursement_tax_calculator.rb +2 -2
  42. data/app/models/spree/reimbursement_type/credit.rb +1 -1
  43. data/app/models/spree/reimbursement_type/reimbursement_helpers.rb +6 -6
  44. data/app/models/spree/reimbursement_type/store_credit.rb +1 -1
  45. data/app/models/spree/return_item.rb +9 -9
  46. data/app/models/spree/role.rb +3 -1
  47. data/app/models/spree/role_permission.rb +8 -0
  48. data/app/models/spree/shipment.rb +7 -7
  49. data/app/models/spree/shipping_category.rb +2 -0
  50. data/app/models/spree/shipping_rate.rb +1 -1
  51. data/app/models/spree/{order_contents.rb → simple_order_contents.rb} +4 -11
  52. data/app/models/spree/stock/estimator.rb +1 -1
  53. data/app/models/spree/stock/inventory_unit_builder.rb +1 -1
  54. data/app/models/spree/stock/package.rb +2 -2
  55. data/app/models/spree/stock/simple_coordinator.rb +1 -1
  56. data/app/models/spree/stock_location.rb +5 -5
  57. data/app/models/spree/store.rb +1 -1
  58. data/app/models/spree/store_credit.rb +15 -15
  59. data/app/models/spree/store_credit_event.rb +3 -3
  60. data/app/models/spree/tax_calculator/default.rb +2 -2
  61. data/app/models/spree/tax_calculator/shipping_rate.rb +1 -1
  62. data/app/models/spree/tax_category.rb +3 -1
  63. data/app/models/spree/tax_rate.rb +3 -3
  64. data/app/models/spree/taxonomy.rb +2 -2
  65. data/app/models/spree/unit_cancel.rb +1 -2
  66. data/app/models/spree/variant/vat_price_generator.rb +1 -1
  67. data/app/models/spree/variant.rb +7 -2
  68. data/app/models/spree/wallet.rb +2 -2
  69. data/app/views/spree/order_mailer/cancel_email.html.erb +1 -1
  70. data/app/views/spree/order_mailer/cancel_email.text.erb +1 -1
  71. data/app/views/spree/order_mailer/confirm_email.html.erb +5 -5
  72. data/app/views/spree/order_mailer/confirm_email.text.erb +5 -5
  73. data/config/locales/en.yml +4 -90
  74. data/db/default/spree/permission_sets.rb +10 -0
  75. data/db/default/spree/return_reasons.rb +3 -1
  76. data/db/default/spree/states.rb +1 -1
  77. data/db/migrate/20160101010000_solidus_one_four.rb +0 -127
  78. data/db/migrate/20240821173254_create_spree_permission_sets_in_core.rb +9 -0
  79. data/db/migrate/20240821173341_create_spree_roles_permissions_in_core.rb +9 -0
  80. data/db/migrate/20240821173641_add_description_to_spree_roles.rb +5 -0
  81. data/db/migrate/20240904152041_add_privilege_and_category_to_spree_permission_sets.rb +6 -0
  82. data/db/seeds.rb +1 -0
  83. data/lib/generators/solidus/install/app_templates/frontend/starter.rb +1 -1
  84. data/lib/generators/solidus/update/update_generator.rb +1 -1
  85. data/lib/generators/spree/dummy/templates/rails/test.rb +6 -1
  86. data/lib/spree/app_configuration.rb +53 -84
  87. data/lib/spree/core/class_constantizer.rb +2 -2
  88. data/lib/spree/core/controller_helpers/payment_parameters.rb +1 -1
  89. data/lib/spree/core/engine.rb +1 -0
  90. data/lib/spree/core/environment/calculators.rb +35 -3
  91. data/lib/spree/core/environment/promotions.rb +25 -4
  92. data/lib/spree/core/environment_extension.rb +16 -2
  93. data/lib/spree/core/importer/order.rb +5 -5
  94. data/lib/spree/core/importer/product.rb +3 -3
  95. data/lib/spree/core/nested_class_set.rb +28 -0
  96. data/lib/spree/core/null_promotion_configuration.rb +84 -0
  97. data/lib/spree/core/product_filters.rb +1 -1
  98. data/lib/spree/core/search/variant.rb +2 -2
  99. data/lib/spree/core/state_machines/order.rb +0 -1
  100. data/lib/spree/core/validators/email.rb +1 -1
  101. data/lib/spree/core/version.rb +2 -2
  102. data/lib/spree/core.rb +2 -6
  103. data/lib/spree/deprecator.rb +9 -0
  104. data/lib/spree/i18n.rb +1 -1
  105. data/lib/spree/mailer_previews/carton_preview.rb +1 -1
  106. data/lib/spree/permission_sets/base.rb +13 -1
  107. data/lib/spree/permission_sets/configuration_display.rb +10 -0
  108. data/lib/spree/permission_sets/configuration_management.rb +10 -0
  109. data/lib/spree/permission_sets/dashboard_display.rb +12 -0
  110. data/lib/spree/permission_sets/default_customer.rb +11 -1
  111. data/lib/spree/permission_sets/order_display.rb +10 -0
  112. data/lib/spree/permission_sets/order_management.rb +10 -0
  113. data/lib/spree/permission_sets/product_display.rb +10 -0
  114. data/lib/spree/permission_sets/product_management.rb +10 -0
  115. data/lib/spree/permission_sets/restricted_stock_display.rb +10 -0
  116. data/lib/spree/permission_sets/restricted_stock_management.rb +10 -0
  117. data/lib/spree/permission_sets/stock_display.rb +10 -0
  118. data/lib/spree/permission_sets/stock_management.rb +10 -0
  119. data/lib/spree/permission_sets/super_user.rb +10 -0
  120. data/lib/spree/permission_sets/user_display.rb +10 -0
  121. data/lib/spree/permission_sets/user_management.rb +10 -0
  122. data/lib/spree/permission_sets.rb +0 -2
  123. data/lib/spree/permitted_attributes.rb +2 -2
  124. data/lib/spree/preferences/store.rb +2 -2
  125. data/lib/spree/testing_support/capybara_ext.rb +1 -1
  126. data/lib/spree/testing_support/dummy_ability.rb +7 -0
  127. data/lib/spree/testing_support/dummy_app/database.yml +2 -2
  128. data/lib/spree/testing_support/dummy_app/migrations.rb +8 -15
  129. data/lib/spree/testing_support/dummy_app/rake_tasks.rb +2 -2
  130. data/lib/spree/testing_support/dummy_app.rb +17 -12
  131. data/lib/spree/testing_support/factories/adjustment_factory.rb +1 -2
  132. data/lib/spree/testing_support/factories/calculator_factory.rb +1 -5
  133. data/lib/spree/testing_support/factories/carton_factory.rb +2 -2
  134. data/lib/spree/testing_support/factories/customer_return_factory.rb +2 -2
  135. data/lib/spree/testing_support/factories/inventory_unit_factory.rb +3 -3
  136. data/lib/spree/testing_support/factories/order_factory.rb +5 -24
  137. data/lib/spree/testing_support/factories/product_factory.rb +1 -1
  138. data/lib/spree/testing_support/factories/shipment_factory.rb +1 -1
  139. data/lib/spree/testing_support/factories/stock_item_factory.rb +5 -1
  140. data/lib/spree/testing_support/factories/stock_package_factory.rb +1 -1
  141. data/lib/spree/testing_support/factories/user_factory.rb +1 -1
  142. data/lib/spree/testing_support/factories/zone_factory.rb +1 -1
  143. data/lib/spree/testing_support/order_walkthrough.rb +3 -3
  144. data/lib/spree/testing_support/shared_examples/calculator.rb +10 -0
  145. data/lib/spree/testing_support/shared_examples/order_factory.rb +141 -0
  146. data/lib/spree/testing_support/shared_examples/working_factory.rb +15 -0
  147. data/lib/tasks/colorado_delivery_fee.rake +2 -2
  148. data/solidus_core.gemspec +7 -7
  149. metadata +60 -93
  150. data/app/jobs/spree/promotion_code_batch_job.rb +0 -26
  151. data/app/mailers/spree/promotion_code_batch_mailer.rb +0 -15
  152. data/app/models/spree/calculator/distributed_amount.rb +0 -33
  153. data/app/models/spree/calculator/flat_percent_item_total.rb +0 -23
  154. data/app/models/spree/calculator/flexi_rate.rb +0 -22
  155. data/app/models/spree/calculator/percent_on_line_item.rb +0 -13
  156. data/app/models/spree/calculator/tiered_flat_rate.rb +0 -52
  157. data/app/models/spree/calculator/tiered_percent.rb +0 -62
  158. data/app/models/spree/line_item_action.rb +0 -8
  159. data/app/models/spree/order_promotion.rb +0 -27
  160. data/app/models/spree/promotion/actions/create_adjustment.rb +0 -81
  161. data/app/models/spree/promotion/actions/create_item_adjustments.rb +0 -98
  162. data/app/models/spree/promotion/actions/create_quantity_adjustments.rb +0 -139
  163. data/app/models/spree/promotion/actions/free_shipping.rb +0 -59
  164. data/app/models/spree/promotion/order_adjustments_recalculator.rb +0 -92
  165. data/app/models/spree/promotion/rules/first_order.rb +0 -38
  166. data/app/models/spree/promotion/rules/first_repeat_purchase_since.rb +0 -36
  167. data/app/models/spree/promotion/rules/item_total.rb +0 -86
  168. data/app/models/spree/promotion/rules/minimum_quantity.rb +0 -59
  169. data/app/models/spree/promotion/rules/nth_order.rb +0 -45
  170. data/app/models/spree/promotion/rules/one_use_per_user.rb +0 -25
  171. data/app/models/spree/promotion/rules/option_value.rb +0 -50
  172. data/app/models/spree/promotion/rules/product.rb +0 -86
  173. data/app/models/spree/promotion/rules/store.rb +0 -26
  174. data/app/models/spree/promotion/rules/taxon.rb +0 -91
  175. data/app/models/spree/promotion/rules/user.rb +0 -34
  176. data/app/models/spree/promotion/rules/user_logged_in.rb +0 -20
  177. data/app/models/spree/promotion/rules/user_role.rb +0 -45
  178. data/app/models/spree/promotion.rb +0 -271
  179. data/app/models/spree/promotion_action.rb +0 -47
  180. data/app/models/spree/promotion_category.rb +0 -8
  181. data/app/models/spree/promotion_chooser.rb +0 -34
  182. data/app/models/spree/promotion_code/batch_builder.rb +0 -64
  183. data/app/models/spree/promotion_code.rb +0 -54
  184. data/app/models/spree/promotion_code_batch.rb +0 -27
  185. data/app/models/spree/promotion_handler/cart.rb +0 -75
  186. data/app/models/spree/promotion_handler/coupon.rb +0 -123
  187. data/app/models/spree/promotion_handler/page.rb +0 -26
  188. data/app/models/spree/promotion_handler/shipping.rb +0 -61
  189. data/app/models/spree/promotion_rule.rb +0 -55
  190. data/app/models/spree/promotion_rule_store.rb +0 -10
  191. data/app/models/spree/promotion_rule_taxon.rb +0 -8
  192. data/app/models/spree/promotion_rule_user.rb +0 -10
  193. data/app/views/spree/promotion_code_batch_mailer/promotion_code_batch_errored.text.erb +0 -2
  194. data/app/views/spree/promotion_code_batch_mailer/promotion_code_batch_finished.text.erb +0 -2
  195. data/bin/rails +0 -13
  196. data/db/migrate/20161017102621_create_spree_promotion_code_batch.rb +0 -38
  197. data/db/migrate/20180202190713_create_promotion_rule_stores.rb +0 -12
  198. data/db/migrate/20180328172631_add_join_characters_to_promotion_code_batch.rb +0 -11
  199. data/db/migrate/20190106184413_remove_code_from_spree_promotions.rb +0 -42
  200. data/db/migrate/20220317165036_set_promotions_with_any_policy_to_all_if_possible.rb +0 -20
  201. data/db/migrate/20230322085416_remove_match_policy_from_spree_promotion.rb +0 -5
  202. data/db/migrate/20230325132905_remove_unused_columns_from_promotion_rules.rb +0 -6
  203. data/db/migrate/20230325161633_drop_unused_promo_action_line_items.rb +0 -13
  204. data/db/migrate/20231027084517_add_order_promotions_foreign_key.rb +0 -10
  205. data/db/migrate/20231031175215_add_promotion_order_promotion_foreign_key.rb +0 -10
  206. data/lib/solidus/migrations/promotions_with_code_handlers.rb +0 -66
  207. data/lib/spree/permission_sets/promotion_display.rb +0 -25
  208. data/lib/spree/permission_sets/promotion_management.rb +0 -25
  209. data/lib/spree/ransack_4_1_patch.rb +0 -16
  210. data/lib/spree/testing_support/factories/order_promotion_factory.rb +0 -8
  211. data/lib/spree/testing_support/factories/promotion_category_factory.rb +0 -7
  212. data/lib/spree/testing_support/factories/promotion_code_factory.rb +0 -8
  213. data/lib/spree/testing_support/factories/promotion_factory.rb +0 -98
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.3.5
4
+ version: 4.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Solidus Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-05-24 00:00:00.000000000 Z
11
+ date: 2024-11-18 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: '7.0'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '7.2'
22
+ version: 8.0.0.beta1
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: '7.0'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '7.2'
32
+ version: 8.0.0.beta1
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: '7.0'
40
40
  - - "<"
41
41
  - !ruby/object:Gem::Version
42
- version: '7.2'
42
+ version: 8.0.0.beta1
43
43
  type: :runtime
44
44
  prerelease: false
45
45
  version_requirements: !ruby/object:Gem::Requirement
@@ -49,7 +49,7 @@ dependencies:
49
49
  version: '7.0'
50
50
  - - "<"
51
51
  - !ruby/object:Gem::Version
52
- version: '7.2'
52
+ version: 8.0.0.beta1
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: '7.0'
60
60
  - - "<"
61
61
  - !ruby/object:Gem::Version
62
- version: '7.2'
62
+ version: 8.0.0.beta1
63
63
  type: :runtime
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
@@ -69,7 +69,7 @@ dependencies:
69
69
  version: '7.0'
70
70
  - - "<"
71
71
  - !ruby/object:Gem::Version
72
- version: '7.2'
72
+ version: 8.0.0.beta1
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: '7.0'
80
80
  - - "<"
81
81
  - !ruby/object:Gem::Version
82
- version: '7.2'
82
+ version: 8.0.0.beta1
83
83
  type: :runtime
84
84
  prerelease: false
85
85
  version_requirements: !ruby/object:Gem::Requirement
@@ -89,7 +89,7 @@ dependencies:
89
89
  version: '7.0'
90
90
  - - "<"
91
91
  - !ruby/object:Gem::Version
92
- version: '7.2'
92
+ version: 8.0.0.beta1
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: '7.0'
100
100
  - - "<"
101
101
  - !ruby/object:Gem::Version
102
- version: '7.2'
102
+ version: 8.0.0.beta1
103
103
  type: :runtime
104
104
  prerelease: false
105
105
  version_requirements: !ruby/object:Gem::Requirement
@@ -109,7 +109,7 @@ dependencies:
109
109
  version: '7.0'
110
110
  - - "<"
111
111
  - !ruby/object:Gem::Version
112
- version: '7.2'
112
+ version: 8.0.0.beta1
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: '7.0'
120
120
  - - "<"
121
121
  - !ruby/object:Gem::Version
122
- version: '7.2'
122
+ version: 8.0.0.beta1
123
123
  type: :runtime
124
124
  prerelease: false
125
125
  version_requirements: !ruby/object:Gem::Requirement
@@ -129,7 +129,7 @@ dependencies:
129
129
  version: '7.0'
130
130
  - - "<"
131
131
  - !ruby/object:Gem::Version
132
- version: '7.2'
132
+ version: 8.0.0.beta1
133
133
  - !ruby/object:Gem::Dependency
134
134
  name: activestorage
135
135
  requirement: !ruby/object:Gem::Requirement
@@ -139,7 +139,7 @@ dependencies:
139
139
  version: '7.0'
140
140
  - - "<"
141
141
  - !ruby/object:Gem::Version
142
- version: '7.2'
142
+ version: 8.0.0.beta1
143
143
  type: :runtime
144
144
  prerelease: false
145
145
  version_requirements: !ruby/object:Gem::Requirement
@@ -149,7 +149,7 @@ dependencies:
149
149
  version: '7.0'
150
150
  - - "<"
151
151
  - !ruby/object:Gem::Version
152
- version: '7.2'
152
+ version: 8.0.0.beta1
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: activesupport
155
155
  requirement: !ruby/object:Gem::Requirement
@@ -159,7 +159,7 @@ dependencies:
159
159
  version: '7.0'
160
160
  - - "<"
161
161
  - !ruby/object:Gem::Version
162
- version: '7.2'
162
+ version: 8.0.0.beta1
163
163
  type: :runtime
164
164
  prerelease: false
165
165
  version_requirements: !ruby/object:Gem::Requirement
@@ -169,7 +169,7 @@ dependencies:
169
169
  version: '7.0'
170
170
  - - "<"
171
171
  - !ruby/object:Gem::Version
172
- version: '7.2'
172
+ version: 8.0.0.beta1
173
173
  - !ruby/object:Gem::Dependency
174
174
  name: railties
175
175
  requirement: !ruby/object:Gem::Requirement
@@ -179,7 +179,7 @@ dependencies:
179
179
  version: '7.0'
180
180
  - - "<"
181
181
  - !ruby/object:Gem::Version
182
- version: '7.2'
182
+ version: 8.0.0.beta1
183
183
  type: :runtime
184
184
  prerelease: false
185
185
  version_requirements: !ruby/object:Gem::Requirement
@@ -189,7 +189,7 @@ dependencies:
189
189
  version: '7.0'
190
190
  - - "<"
191
191
  - !ruby/object:Gem::Version
192
- version: '7.2'
192
+ version: 8.0.0.beta1
193
193
  - !ruby/object:Gem::Dependency
194
194
  name: activemerchant
195
195
  requirement: !ruby/object:Gem::Requirement
@@ -225,6 +225,9 @@ dependencies:
225
225
  - - "~>"
226
226
  - !ruby/object:Gem::Version
227
227
  version: '3.3'
228
+ - - ">="
229
+ - !ruby/object:Gem::Version
230
+ version: 3.7.0
228
231
  type: :runtime
229
232
  prerelease: false
230
233
  version_requirements: !ruby/object:Gem::Requirement
@@ -232,6 +235,9 @@ dependencies:
232
235
  - - "~>"
233
236
  - !ruby/object:Gem::Version
234
237
  version: '3.3'
238
+ - - ">="
239
+ - !ruby/object:Gem::Version
240
+ version: 3.7.0
235
241
  - !ruby/object:Gem::Dependency
236
242
  name: cancancan
237
243
  requirement: !ruby/object:Gem::Requirement
@@ -379,7 +385,7 @@ dependencies:
379
385
  version: 4.0.1
380
386
  - - "<"
381
387
  - !ruby/object:Gem::Version
382
- version: '5.0'
388
+ version: '6.0'
383
389
  type: :runtime
384
390
  prerelease: false
385
391
  version_requirements: !ruby/object:Gem::Requirement
@@ -389,7 +395,7 @@ dependencies:
389
395
  version: 4.0.1
390
396
  - - "<"
391
397
  - !ruby/object:Gem::Version
392
- version: '5.0'
398
+ version: '6.0'
393
399
  - !ruby/object:Gem::Dependency
394
400
  name: ransack
395
401
  requirement: !ruby/object:Gem::Requirement
@@ -397,6 +403,9 @@ dependencies:
397
403
  - - "~>"
398
404
  - !ruby/object:Gem::Version
399
405
  version: '4.0'
406
+ - - "<"
407
+ - !ruby/object:Gem::Version
408
+ version: '5'
400
409
  type: :runtime
401
410
  prerelease: false
402
411
  version_requirements: !ruby/object:Gem::Requirement
@@ -404,20 +413,23 @@ dependencies:
404
413
  - - "~>"
405
414
  - !ruby/object:Gem::Version
406
415
  version: '4.0'
416
+ - - "<"
417
+ - !ruby/object:Gem::Version
418
+ version: '5'
407
419
  - !ruby/object:Gem::Dependency
408
420
  name: sprockets-rails
409
421
  requirement: !ruby/object:Gem::Requirement
410
422
  requirements:
411
- - - ">="
423
+ - - "!="
412
424
  - !ruby/object:Gem::Version
413
- version: '0'
425
+ version: 3.5.0
414
426
  type: :runtime
415
427
  prerelease: false
416
428
  version_requirements: !ruby/object:Gem::Requirement
417
429
  requirements:
418
- - - ">="
430
+ - - "!="
419
431
  - !ruby/object:Gem::Version
420
- version: '0'
432
+ version: 3.5.0
421
433
  - !ruby/object:Gem::Dependency
422
434
  name: state_machines-activerecord
423
435
  requirement: !ruby/object:Gem::Requirement
@@ -469,11 +481,9 @@ files:
469
481
  - app/helpers/spree/products_helper.rb
470
482
  - app/helpers/spree/store_helper.rb
471
483
  - app/helpers/spree/taxons_helper.rb
472
- - app/jobs/spree/promotion_code_batch_job.rb
473
484
  - app/mailers/spree/base_mailer.rb
474
485
  - app/mailers/spree/carton_mailer.rb
475
486
  - app/mailers/spree/order_mailer.rb
476
- - app/mailers/spree/promotion_code_batch_mailer.rb
477
487
  - app/mailers/spree/reimbursement_mailer.rb
478
488
  - app/models/concerns/spree/active_storage_adapter.rb
479
489
  - app/models/concerns/spree/active_storage_adapter/attachment.rb
@@ -501,25 +511,20 @@ files:
501
511
  - app/models/spree/billing_integration.rb
502
512
  - app/models/spree/calculator.rb
503
513
  - app/models/spree/calculator/default_tax.rb
504
- - app/models/spree/calculator/distributed_amount.rb
505
514
  - app/models/spree/calculator/flat_fee.rb
506
- - app/models/spree/calculator/flat_percent_item_total.rb
507
515
  - app/models/spree/calculator/flat_rate.rb
508
- - app/models/spree/calculator/flexi_rate.rb
509
- - app/models/spree/calculator/percent_on_line_item.rb
510
516
  - app/models/spree/calculator/returns/default_refund_amount.rb
511
517
  - app/models/spree/calculator/shipping/flat_percent_item_total.rb
512
518
  - app/models/spree/calculator/shipping/flat_rate.rb
513
519
  - app/models/spree/calculator/shipping/flexi_rate.rb
514
520
  - app/models/spree/calculator/shipping/per_item.rb
515
521
  - app/models/spree/calculator/shipping/price_sack.rb
516
- - app/models/spree/calculator/tiered_flat_rate.rb
517
- - app/models/spree/calculator/tiered_percent.rb
518
522
  - app/models/spree/carton.rb
519
523
  - app/models/spree/classification.rb
520
524
  - app/models/spree/country.rb
521
525
  - app/models/spree/credit_card.rb
522
526
  - app/models/spree/customer_return.rb
527
+ - app/models/spree/deprecated_configurable_class.rb
523
528
  - app/models/spree/distributed_amounts_handler.rb
524
529
  - app/models/spree/exchange.rb
525
530
  - app/models/spree/fulfilment_changer.rb
@@ -531,8 +536,11 @@ files:
531
536
  - app/models/spree/inventory_unit.rb
532
537
  - app/models/spree/legacy_user.rb
533
538
  - app/models/spree/line_item.rb
534
- - app/models/spree/line_item_action.rb
535
539
  - app/models/spree/log_entry.rb
540
+ - app/models/spree/null_promotion_adjuster.rb
541
+ - app/models/spree/null_promotion_advertiser.rb
542
+ - app/models/spree/null_promotion_finder.rb
543
+ - app/models/spree/null_promotion_handler.rb
536
544
  - app/models/spree/option_type.rb
537
545
  - app/models/spree/option_value.rb
538
546
  - app/models/spree/option_values_variant.rb
@@ -540,11 +548,9 @@ files:
540
548
  - app/models/spree/order/number_generator.rb
541
549
  - app/models/spree/order/payments.rb
542
550
  - app/models/spree/order_cancellations.rb
543
- - app/models/spree/order_contents.rb
544
551
  - app/models/spree/order_inventory.rb
545
552
  - app/models/spree/order_merger.rb
546
553
  - app/models/spree/order_mutex.rb
547
- - app/models/spree/order_promotion.rb
548
554
  - app/models/spree/order_shipping.rb
549
555
  - app/models/spree/order_taxation.rb
550
556
  - app/models/spree/order_update_attributes.rb
@@ -561,6 +567,7 @@ files:
561
567
  - app/models/spree/payment_method/simple_bogus_credit_card.rb
562
568
  - app/models/spree/payment_method/store_credit.rb
563
569
  - app/models/spree/payment_source.rb
570
+ - app/models/spree/permission_set.rb
564
571
  - app/models/spree/preference.rb
565
572
  - app/models/spree/price.rb
566
573
  - app/models/spree/product.rb
@@ -568,39 +575,6 @@ files:
568
575
  - app/models/spree/product_option_type.rb
569
576
  - app/models/spree/product_promotion_rule.rb
570
577
  - app/models/spree/product_property.rb
571
- - app/models/spree/promotion.rb
572
- - app/models/spree/promotion/actions/create_adjustment.rb
573
- - app/models/spree/promotion/actions/create_item_adjustments.rb
574
- - app/models/spree/promotion/actions/create_quantity_adjustments.rb
575
- - app/models/spree/promotion/actions/free_shipping.rb
576
- - app/models/spree/promotion/order_adjustments_recalculator.rb
577
- - app/models/spree/promotion/rules/first_order.rb
578
- - app/models/spree/promotion/rules/first_repeat_purchase_since.rb
579
- - app/models/spree/promotion/rules/item_total.rb
580
- - app/models/spree/promotion/rules/minimum_quantity.rb
581
- - app/models/spree/promotion/rules/nth_order.rb
582
- - app/models/spree/promotion/rules/one_use_per_user.rb
583
- - app/models/spree/promotion/rules/option_value.rb
584
- - app/models/spree/promotion/rules/product.rb
585
- - app/models/spree/promotion/rules/store.rb
586
- - app/models/spree/promotion/rules/taxon.rb
587
- - app/models/spree/promotion/rules/user.rb
588
- - app/models/spree/promotion/rules/user_logged_in.rb
589
- - app/models/spree/promotion/rules/user_role.rb
590
- - app/models/spree/promotion_action.rb
591
- - app/models/spree/promotion_category.rb
592
- - app/models/spree/promotion_chooser.rb
593
- - app/models/spree/promotion_code.rb
594
- - app/models/spree/promotion_code/batch_builder.rb
595
- - app/models/spree/promotion_code_batch.rb
596
- - app/models/spree/promotion_handler/cart.rb
597
- - app/models/spree/promotion_handler/coupon.rb
598
- - app/models/spree/promotion_handler/page.rb
599
- - app/models/spree/promotion_handler/shipping.rb
600
- - app/models/spree/promotion_rule.rb
601
- - app/models/spree/promotion_rule_store.rb
602
- - app/models/spree/promotion_rule_taxon.rb
603
- - app/models/spree/promotion_rule_user.rb
604
578
  - app/models/spree/property.rb
605
579
  - app/models/spree/refund.rb
606
580
  - app/models/spree/refund_reason.rb
@@ -630,6 +604,7 @@ files:
630
604
  - app/models/spree/return_reason.rb
631
605
  - app/models/spree/returns_calculator.rb
632
606
  - app/models/spree/role.rb
607
+ - app/models/spree/role_permission.rb
633
608
  - app/models/spree/role_user.rb
634
609
  - app/models/spree/shipment.rb
635
610
  - app/models/spree/shipping_calculator.rb
@@ -641,6 +616,7 @@ files:
641
616
  - app/models/spree/shipping_method_zone.rb
642
617
  - app/models/spree/shipping_rate.rb
643
618
  - app/models/spree/shipping_rate_tax.rb
619
+ - app/models/spree/simple_order_contents.rb
644
620
  - app/models/spree/state.rb
645
621
  - app/models/spree/state_change.rb
646
622
  - app/models/spree/stock/allocator/base.rb
@@ -727,8 +703,6 @@ files:
727
703
  - app/views/spree/order_mailer/confirm_email.text.erb
728
704
  - app/views/spree/order_mailer/inventory_cancellation_email.html.erb
729
705
  - app/views/spree/order_mailer/inventory_cancellation_email.text.erb
730
- - app/views/spree/promotion_code_batch_mailer/promotion_code_batch_errored.text.erb
731
- - app/views/spree/promotion_code_batch_mailer/promotion_code_batch_finished.text.erb
732
706
  - app/views/spree/reimbursement_mailer/reimbursement_email.html.erb
733
707
  - app/views/spree/reimbursement_mailer/reimbursement_email.text.erb
734
708
  - app/views/spree/shared/_base_mailer_footer.html.erb
@@ -736,7 +710,6 @@ files:
736
710
  - app/views/spree/shared/_error_messages.html.erb
737
711
  - app/views/spree/test_mailer/test_email.html.erb
738
712
  - app/views/spree/test_mailer/test_email.text.erb
739
- - bin/rails
740
713
  - config/i18n-tasks.yml
741
714
  - config/initializers/assets.rb
742
715
  - config/initializers/friendly_id.rb
@@ -744,6 +717,7 @@ files:
744
717
  - config/initializers/money.rb
745
718
  - config/locales/en.yml
746
719
  - db/default/spree/countries.rb
720
+ - db/default/spree/permission_sets.rb
747
721
  - db/default/spree/refund_reasons.rb
748
722
  - db/default/spree/return_reasons.rb
749
723
  - db/default/spree/roles.rb
@@ -759,7 +733,6 @@ files:
759
733
  - db/migrate/20160924135758_remove_is_default_from_prices.rb
760
734
  - db/migrate/20161009141333_remove_currency_from_line_items.rb
761
735
  - db/migrate/20161014221052_add_available_to_columns_and_remove_display_on_from_payment_methods.rb
762
- - db/migrate/20161017102621_create_spree_promotion_code_batch.rb
763
736
  - db/migrate/20161123154034_add_available_to_users_and_remove_display_on_from_shipping_methods.rb
764
737
  - db/migrate/20161129035810_add_index_to_spree_payments_number.rb
765
738
  - db/migrate/20170223235001_remove_spree_store_credits_column.rb
@@ -770,14 +743,11 @@ files:
770
743
  - db/migrate/20170522143442_add_time_range_to_tax_rate.rb
771
744
  - db/migrate/20170608074534_rename_bogus_gateways.rb
772
745
  - db/migrate/20170831201542_remove_default_tax_from_spree_zones.rb
773
- - db/migrate/20180202190713_create_promotion_rule_stores.rb
774
746
  - db/migrate/20180202222641_create_store_shipping_methods.rb
775
747
  - db/migrate/20180313220213_add_available_locales_to_stores.rb
776
748
  - db/migrate/20180322142651_add_amount_remaining_to_store_credit_events.rb
777
- - db/migrate/20180328172631_add_join_characters_to_promotion_code_batch.rb
778
749
  - db/migrate/20180416083007_add_apply_to_all_to_variant_property_rule.rb
779
750
  - db/migrate/20180710170104_create_spree_store_credit_reasons_table.rb
780
- - db/migrate/20190106184413_remove_code_from_spree_promotions.rb
781
751
  - db/migrate/20190220093635_drop_spree_store_credit_update_reasons.rb
782
752
  - db/migrate/20200320144521_add_default_billng_flag_to_user_addresses.rb
783
753
  - db/migrate/20200530111458_add_bcc_email_to_spree_stores.rb
@@ -786,17 +756,15 @@ files:
786
756
  - db/migrate/20210122110141_add_name_to_spree_addresses.rb
787
757
  - db/migrate/20210312061050_change_column_null_on_prices.rb
788
758
  - db/migrate/20210815004823_add_unique_index_to_option_values_variants.rb
789
- - db/migrate/20220317165036_set_promotions_with_any_policy_to_all_if_possible.rb
790
759
  - db/migrate/20220805202442_add_level_to_spree_tax_rates.rb
791
760
  - db/migrate/20221123152807_add_shipping_category_to_spree_variants.rb
792
761
  - db/migrate/20230321161854_change_column_null_option_values_option_type_id.rb
793
- - db/migrate/20230322085416_remove_match_policy_from_spree_promotion.rb
794
- - db/migrate/20230325132905_remove_unused_columns_from_promotion_rules.rb
795
- - db/migrate/20230325161633_drop_unused_promo_action_line_items.rb
796
762
  - db/migrate/20230425103509_remove_taxon_position.rb
797
763
  - db/migrate/20230427095534_drop_deprecated_address_id_from_shipments.rb
798
- - db/migrate/20231027084517_add_order_promotions_foreign_key.rb
799
- - db/migrate/20231031175215_add_promotion_order_promotion_foreign_key.rb
764
+ - db/migrate/20240821173254_create_spree_permission_sets_in_core.rb
765
+ - db/migrate/20240821173341_create_spree_roles_permissions_in_core.rb
766
+ - db/migrate/20240821173641_add_description_to_spree_roles.rb
767
+ - db/migrate/20240904152041_add_privilege_and_category_to_spree_permission_sets.rb
800
768
  - db/seeds.rb
801
769
  - lib/generators/solidus/install/app_templates/authentication/custom.rb
802
770
  - lib/generators/solidus/install/app_templates/authentication/devise.rb
@@ -825,7 +793,6 @@ files:
825
793
  - lib/generators/spree/dummy/templates/rails/script/rails
826
794
  - lib/generators/spree/dummy/templates/rails/storage.yml
827
795
  - lib/generators/spree/dummy/templates/rails/test.rb
828
- - lib/solidus/migrations/promotions_with_code_handlers.rb
829
796
  - lib/solidus_core.rb
830
797
  - lib/spree/app_configuration.rb
831
798
  - lib/spree/bus.rb
@@ -849,6 +816,8 @@ files:
849
816
  - lib/spree/core/importer.rb
850
817
  - lib/spree/core/importer/order.rb
851
818
  - lib/spree/core/importer/product.rb
819
+ - lib/spree/core/nested_class_set.rb
820
+ - lib/spree/core/null_promotion_configuration.rb
852
821
  - lib/spree/core/permalinks.rb
853
822
  - lib/spree/core/product_duplicator.rb
854
823
  - lib/spree/core/product_filters.rb
@@ -870,6 +839,7 @@ files:
870
839
  - lib/spree/core/versioned_value.rb
871
840
  - lib/spree/deprecated_instance_variable_proxy.rb
872
841
  - lib/spree/deprecation.rb
842
+ - lib/spree/deprecator.rb
873
843
  - lib/spree/encryptor.rb
874
844
  - lib/spree/i18n.rb
875
845
  - lib/spree/localized_number.rb
@@ -889,8 +859,6 @@ files:
889
859
  - lib/spree/permission_sets/order_management.rb
890
860
  - lib/spree/permission_sets/product_display.rb
891
861
  - lib/spree/permission_sets/product_management.rb
892
- - lib/spree/permission_sets/promotion_display.rb
893
- - lib/spree/permission_sets/promotion_management.rb
894
862
  - lib/spree/permission_sets/restricted_stock_display.rb
895
863
  - lib/spree/permission_sets/restricted_stock_management.rb
896
864
  - lib/spree/permission_sets/stock_display.rb
@@ -908,7 +876,6 @@ files:
908
876
  - lib/spree/preferences/static_model_preferences.rb
909
877
  - lib/spree/preferences/statically_configurable.rb
910
878
  - lib/spree/preferences/store.rb
911
- - lib/spree/ransack_4_1_patch.rb
912
879
  - lib/spree/testing_support/ability_helpers.rb
913
880
  - lib/spree/testing_support/authorization_helpers.rb
914
881
  - lib/spree/testing_support/blacklist_urls.rb
@@ -917,6 +884,7 @@ files:
917
884
  - lib/spree/testing_support/capybara_ext.rb
918
885
  - lib/spree/testing_support/common_rake.rb
919
886
  - lib/spree/testing_support/controller_requests.rb
887
+ - lib/spree/testing_support/dummy_ability.rb
920
888
  - lib/spree/testing_support/dummy_app.rb
921
889
  - lib/spree/testing_support/dummy_app/assets/javascripts/spree/backend/all.js
922
890
  - lib/spree/testing_support/dummy_app/assets/stylesheets/solidus_admin/tailwind.css
@@ -941,16 +909,12 @@ files:
941
909
  - lib/spree/testing_support/factories/option_type_factory.rb
942
910
  - lib/spree/testing_support/factories/option_value_factory.rb
943
911
  - lib/spree/testing_support/factories/order_factory.rb
944
- - lib/spree/testing_support/factories/order_promotion_factory.rb
945
912
  - lib/spree/testing_support/factories/payment_factory.rb
946
913
  - lib/spree/testing_support/factories/payment_method_factory.rb
947
914
  - lib/spree/testing_support/factories/price_factory.rb
948
915
  - lib/spree/testing_support/factories/product_factory.rb
949
916
  - lib/spree/testing_support/factories/product_option_type_factory.rb
950
917
  - lib/spree/testing_support/factories/product_property_factory.rb
951
- - lib/spree/testing_support/factories/promotion_category_factory.rb
952
- - lib/spree/testing_support/factories/promotion_code_factory.rb
953
- - lib/spree/testing_support/factories/promotion_factory.rb
954
918
  - lib/spree/testing_support/factories/property_factory.rb
955
919
  - lib/spree/testing_support/factories/refund_factory.rb
956
920
  - lib/spree/testing_support/factories/refund_reason_factory.rb
@@ -997,7 +961,10 @@ files:
997
961
  - lib/spree/testing_support/preferences.rb
998
962
  - lib/spree/testing_support/rake.rb
999
963
  - lib/spree/testing_support/sequences.rb
964
+ - lib/spree/testing_support/shared_examples/calculator.rb
1000
965
  - lib/spree/testing_support/shared_examples/gallery.rb
966
+ - lib/spree/testing_support/shared_examples/order_factory.rb
967
+ - lib/spree/testing_support/shared_examples/working_factory.rb
1001
968
  - lib/spree/testing_support/silence_deprecations.rb
1002
969
  - lib/spree/testing_support/translations.rb
1003
970
  - lib/spree/testing_support/url_helpers.rb
@@ -1045,14 +1012,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
1045
1012
  requirements:
1046
1013
  - - ">="
1047
1014
  - !ruby/object:Gem::Version
1048
- version: 3.0.0
1015
+ version: 3.1.0
1049
1016
  required_rubygems_version: !ruby/object:Gem::Requirement
1050
1017
  requirements:
1051
1018
  - - ">="
1052
1019
  - !ruby/object:Gem::Version
1053
1020
  version: 1.8.23
1054
1021
  requirements: []
1055
- rubygems_version: 3.5.9
1022
+ rubygems_version: 3.5.22
1056
1023
  signing_key:
1057
1024
  specification_version: 4
1058
1025
  summary: Essential models, mailers, and classes for the Solidus e-commerce project.
@@ -1,26 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Spree
4
- class PromotionCodeBatchJob < ActiveJob::Base
5
- queue_as :default
6
-
7
- def perform(promotion_code_batch)
8
- PromotionCode::BatchBuilder.new(
9
- promotion_code_batch
10
- ).build_promotion_codes
11
-
12
- if promotion_code_batch.email?
13
- Spree::Config.promotion_code_batch_mailer_class
14
- .promotion_code_batch_finished(promotion_code_batch)
15
- .deliver_now
16
- end
17
- rescue StandardError => error
18
- if promotion_code_batch.email?
19
- Spree::Config.promotion_code_batch_mailer_class
20
- .promotion_code_batch_errored(promotion_code_batch)
21
- .deliver_now
22
- end
23
- raise error
24
- end
25
- end
26
- end
@@ -1,15 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Spree
4
- class PromotionCodeBatchMailer < Spree::BaseMailer
5
- def promotion_code_batch_finished(promotion_code_batch)
6
- @promotion_code_batch = promotion_code_batch
7
- mail(to: promotion_code_batch.email)
8
- end
9
-
10
- def promotion_code_batch_errored(promotion_code_batch)
11
- @promotion_code_batch = promotion_code_batch
12
- mail(to: promotion_code_batch.email)
13
- end
14
- end
15
- end
@@ -1,33 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_dependency 'spree/calculator'
4
-
5
- # This is a calculator for line item adjustment actions. It accepts a line item
6
- # and calculates its weighted adjustment amount based on the value of the
7
- # preferred amount and the price of the other line items. More expensive line
8
- # items will receive a greater share of the preferred amount.
9
-
10
- module Spree
11
- class Calculator::DistributedAmount < Calculator
12
- preference :amount, :decimal, default: 0
13
- preference :currency, :string, default: -> { Spree::Config[:currency] }
14
-
15
- def compute_line_item(line_item)
16
- return 0 unless line_item
17
- return 0 unless preferred_currency.casecmp(line_item.currency).zero?
18
- return 0 unless calculable.promotion.line_item_actionable?(line_item.order, line_item)
19
- Spree::DistributedAmountsHandler.new(
20
- actionable_line_items(line_item.order),
21
- preferred_amount
22
- ).amount(line_item)
23
- end
24
-
25
- private
26
-
27
- def actionable_line_items(order)
28
- order.line_items.select do |line_item|
29
- calculable.promotion.line_item_actionable?(order, line_item)
30
- end
31
- end
32
- end
33
- end
@@ -1,23 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_dependency 'spree/calculator'
4
-
5
- module Spree
6
- class Calculator::FlatPercentItemTotal < Calculator
7
- preference :flat_percent, :decimal, default: 0
8
-
9
- def compute(object)
10
- order = object.is_a?(Order) ? object : object.order
11
- preferred_currency = order.currency
12
- currency_exponent = ::Money::Currency.find(preferred_currency).exponent
13
- computed_amount = (object.amount * preferred_flat_percent / 100).round(currency_exponent)
14
-
15
- # We don't want to cause the promotion adjustments to push the order into a negative total.
16
- if computed_amount > object.amount
17
- object.amount
18
- else
19
- computed_amount
20
- end
21
- end
22
- end
23
- end
@@ -1,22 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_dependency 'spree/calculator'
4
-
5
- module Spree
6
- class Calculator::FlexiRate < Calculator
7
- preference :first_item, :decimal, default: 0
8
- preference :additional_item, :decimal, default: 0
9
- preference :max_items, :integer, default: 0
10
- preference :currency, :string, default: ->{ Spree::Config[:currency] }
11
-
12
- def compute(object)
13
- items_count = object.quantity
14
- items_count = [items_count, preferred_max_items].min unless preferred_max_items.zero?
15
-
16
- return BigDecimal(0) if items_count == 0
17
-
18
- additional_items_count = items_count - 1
19
- preferred_first_item + preferred_additional_item * additional_items_count
20
- end
21
- end
22
- end
@@ -1,13 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_dependency 'spree/calculator'
4
-
5
- module Spree
6
- class Calculator::PercentOnLineItem < Calculator
7
- preference :percent, :decimal, default: 0
8
-
9
- def compute(object)
10
- (object.amount * preferred_percent) / 100
11
- end
12
- end
13
- end