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
@@ -6,6 +6,10 @@ FactoryBot.define do
6
6
  association :stock_location, factory: :stock_location_without_variant_propagation
7
7
  variant
8
8
 
9
- after(:create) { |object| object.adjust_count_on_hand(10) }
9
+ transient do
10
+ on_hand { 10 }
11
+ end
12
+
13
+ after(:create) { |object, evaluator| object.adjust_count_on_hand(evaluator.on_hand) }
10
14
  end
11
15
  end
@@ -14,7 +14,7 @@ FactoryBot.define do
14
14
 
15
15
  after(:build) do |package, evaluator|
16
16
  evaluator.variants_contents.each do |variant, count|
17
- package.add_multiple build_list(:inventory_unit, count, variant: variant, stock_location: evaluator.stock_location)
17
+ package.add_multiple build_list(:inventory_unit, count, variant:, stock_location: evaluator.stock_location)
18
18
  end
19
19
  end
20
20
 
@@ -14,7 +14,7 @@ FactoryBot.define do
14
14
 
15
15
  trait :with_orders do
16
16
  after(:create) do |user, _|
17
- create(:order, user: user)
17
+ create(:order, user:)
18
18
  end
19
19
  end
20
20
 
@@ -6,7 +6,7 @@ FactoryBot.define do
6
6
  zone_members do |proxy|
7
7
  zone = proxy.instance_eval { @instance }
8
8
  Spree::Country.all.map do |c|
9
- Spree::ZoneMember.create(zoneable: c, zone: zone)
9
+ Spree::ZoneMember.create(zoneable: c, zone:)
10
10
  end
11
11
  end
12
12
  end
@@ -4,7 +4,7 @@ module Spree
4
4
  module TestingSupport
5
5
  class OrderWalkthrough
6
6
  def self.up_to(state, user: nil)
7
- new.up_to(state, user: user)
7
+ new.up_to(state, user:)
8
8
  end
9
9
 
10
10
  def up_to(state, user: nil)
@@ -23,7 +23,7 @@ module Spree
23
23
  end
24
24
 
25
25
  order = Spree::Order.create!(
26
- user: user,
26
+ user:,
27
27
  email: "solidus@example.com",
28
28
  store: Spree::Store.first || ::FactoryBot.create(:store)
29
29
  )
@@ -47,7 +47,7 @@ module Spree
47
47
  private
48
48
 
49
49
  def add_line_item!(order)
50
- ::FactoryBot.create(:line_item, order: order)
50
+ ::FactoryBot.create(:line_item, order:)
51
51
  order.reload
52
52
  end
53
53
 
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ RSpec.shared_examples_for 'a calculator with a description' do
4
+ describe ".description" do
5
+ subject { described_class.description }
6
+ it "has a description" do
7
+ expect(subject.size).to be > 0
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,141 @@
1
+ # frozen_string_literal: true
2
+
3
+ RSpec.shared_examples "shipping methods are assigned" do
4
+ context "given a shipping method" do
5
+ let(:shipping_method) { create(:shipping_method) }
6
+
7
+ it "assigns the shipping method when created" do
8
+ expect(
9
+ create(
10
+ factory,
11
+ shipping_method:
12
+ ).shipments.map(&:shipping_method)
13
+ ).to all(eq(shipping_method))
14
+ end
15
+
16
+ it "assigns the shipping method when built" do
17
+ expect(
18
+ build(
19
+ factory,
20
+ shipping_method:
21
+ ).shipments.map(&:shipping_method)
22
+ ).to all(eq(shipping_method))
23
+ end
24
+ end
25
+ end
26
+
27
+ RSpec.shared_examples "an order with line items factory" do |expected_order_state, expected_inventory_unit_state|
28
+ # This factory cannot be built correctly because Shipment#set_up_inventory
29
+ # requires records to be saved.
30
+ context "when created" do
31
+ let(:stock_location) { create(:stock_location) }
32
+ let(:first_variant) { create(:variant) }
33
+ let(:second_variant) { create(:variant) }
34
+ let(:shipping_method) { create(:shipping_method) }
35
+ let(:order) do
36
+ create(
37
+ factory,
38
+ stock_location:,
39
+ line_items_attributes: [
40
+ { variant: first_variant, quantity: 1, price: 1 },
41
+ { variant: second_variant, quantity: 2, price: 2 }
42
+ ],
43
+ shipment_cost: 3,
44
+ shipping_method:
45
+ )
46
+ end
47
+
48
+ it "has the expected attributes" do
49
+ aggregate_failures "for line items" do
50
+ expect(order.line_items.count).to eq 2
51
+ expect(order.line_items[0]).to have_attributes(
52
+ quantity: 1,
53
+ price: 1.0
54
+ )
55
+ expect(order.line_items[1]).to have_attributes(
56
+ price: 2.0,
57
+ quantity: 2
58
+ )
59
+ end
60
+
61
+ aggregate_failures "for shipments" do
62
+ expect(order.shipments.count).to eq 1
63
+ expect(order.shipments[0]).to have_attributes(
64
+ amount: 3.0,
65
+ stock_location:
66
+ )
67
+
68
+ expect(order.shipments[0].shipping_method).to eq(shipping_method)
69
+
70
+ # Explicitly order by line item id, because otherwise these can be in
71
+ # an arbitrary order.
72
+ inventory_units = order.shipments[0].inventory_units.sort_by(&:line_item_id)
73
+
74
+ expect(inventory_units.count).to eq(3)
75
+ expect(inventory_units[0]).to have_attributes(
76
+ order:,
77
+ shipment: order.shipments[0],
78
+ line_item: order.line_items[0],
79
+ variant: order.line_items[0].variant,
80
+ state: expected_inventory_unit_state
81
+ )
82
+ expect(inventory_units[1]).to have_attributes(
83
+ order:,
84
+ shipment: order.shipments[0],
85
+ line_item: order.line_items[1],
86
+ variant: order.line_items[1].variant,
87
+ state: expected_inventory_unit_state
88
+ )
89
+ expect(inventory_units[2]).to have_attributes(
90
+ order:,
91
+ shipment: order.shipments[0],
92
+ line_item: order.line_items[1],
93
+ variant: order.line_items[1].variant,
94
+ state: expected_inventory_unit_state
95
+ )
96
+ end
97
+
98
+ expect(order).to have_attributes(
99
+ item_total: 5.0,
100
+ ship_total: 3.0,
101
+ total: 8.0,
102
+ state: expected_order_state
103
+ )
104
+ end
105
+ end
106
+
107
+ context 'when shipments should be taxed' do
108
+ let!(:ship_address) { create(:address) }
109
+ let!(:tax_zone) { create(:global_zone) } # will include the above address
110
+ let!(:tax_rate) { create(:tax_rate, amount: 0.10, zone: tax_zone, tax_categories: [tax_category]) }
111
+
112
+ let(:tax_category) { create(:tax_category) }
113
+ let(:shipping_method) { create(:shipping_method, tax_category:, zones: [tax_zone]) }
114
+
115
+ it 'shipments get a tax adjustment' do
116
+ order = create(factory, ship_address:, shipping_method:)
117
+ shipment = order.shipments[0]
118
+
119
+ expect(shipment.additional_tax_total).to be > 0
120
+ end
121
+ end
122
+ end
123
+
124
+ RSpec.shared_examples 'supplied completed_at is respected' do
125
+ context 'when passed a completed_at timestamp' do
126
+ let(:completed_at) { 2.days.ago }
127
+ let(:order) { create(factory, completed_at:) }
128
+
129
+ it 'respects the timestamp' do
130
+ expect(order.completed_at).to be_within(5.seconds).of(completed_at)
131
+ end
132
+ end
133
+
134
+ context 'when no completed_at timestamp is passed' do
135
+ let(:order) { create(factory) }
136
+
137
+ it 'defaults to the current time' do
138
+ expect(order.completed_at).to be_within(2.seconds).of(Time.current)
139
+ end
140
+ end
141
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ RSpec.shared_examples_for 'a working factory' do
4
+ it "builds successfully" do
5
+ expect(build(factory)).to be_a(factory_class)
6
+ end
7
+
8
+ it "creates successfully" do
9
+ expect(create(factory)).to be_a(factory_class)
10
+ end
11
+
12
+ it "is creates a valid record" do
13
+ expect(create(factory)).to be_valid
14
+ end
15
+ end
@@ -16,8 +16,8 @@ namespace :taxes do
16
16
  calculator = Spree::Calculator::FlatFee.new
17
17
  rate = Spree::TaxRate.create!(
18
18
  name: "Colorado Delivery Fee",
19
- calculator: calculator,
20
- zone: zone,
19
+ calculator:,
20
+ zone:,
21
21
  amount: 0.27,
22
22
  show_rate_in_label: false,
23
23
  level: "order"
data/solidus_core.gemspec CHANGED
@@ -17,22 +17,22 @@ Gem::Specification.new do |s|
17
17
  s.metadata['rubygems_mfa_required'] = 'true'
18
18
 
19
19
  s.files = `git ls-files -z`.split("\x0").reject do |f|
20
- f.match(%r{^(spec|script)/})
20
+ f.match(%r{^(spec|bin)/})
21
21
  end
22
22
 
23
- s.required_ruby_version = '>= 3.0.0'
23
+ s.required_ruby_version = '>= 3.1.0'
24
24
  s.required_rubygems_version = '>= 1.8.23'
25
25
 
26
26
  %w[
27
27
  actionmailer actionpack actionview activejob activemodel activerecord
28
28
  activestorage activesupport railties
29
29
  ].each do |rails_dep|
30
- s.add_dependency rails_dep, ['>= 7.0', '< 7.2']
30
+ s.add_dependency rails_dep, ['>= 7.0', '< 8.0.0.beta1']
31
31
  end
32
32
 
33
33
  s.add_dependency 'activemerchant', '~> 1.66'
34
34
  s.add_dependency 'acts_as_list', '< 2.0'
35
- s.add_dependency 'awesome_nested_set', '~> 3.3'
35
+ s.add_dependency 'awesome_nested_set', ['~> 3.3', '>= 3.7.0']
36
36
  s.add_dependency 'cancancan', ['>= 2.2', '< 4.0']
37
37
  s.add_dependency 'carmen', '~> 1.1.0'
38
38
  s.add_dependency 'discard', '~> 1.0'
@@ -42,9 +42,9 @@ Gem::Specification.new do |s|
42
42
  s.add_dependency 'mini_magick', '~> 4.10'
43
43
  s.add_dependency 'monetize', '~> 1.8'
44
44
  s.add_dependency 'kt-paperclip', ['>= 6.3', '< 8']
45
- s.add_dependency 'psych', ['>= 4.0.1', '< 5.0']
46
- s.add_dependency 'ransack', '~> 4.0'
47
- s.add_dependency 'sprockets-rails'
45
+ s.add_dependency 'psych', ['>= 4.0.1', '< 6.0']
46
+ s.add_dependency 'ransack', ['~> 4.0', '< 5']
47
+ s.add_dependency 'sprockets-rails', '!= 3.5.0'
48
48
  s.add_dependency 'state_machines-activerecord', '~> 0.6'
49
49
  s.add_dependency 'omnes', '~> 0.2.2'
50
50