solidus_promotions 4.4.2 → 4.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (24) hide show
  1. checksums.yaml +4 -4
  2. data/MIGRATING.md +1 -1
  3. data/README.md +11 -8
  4. data/app/{decorators/models/solidus_promotions/adjustment_decorator.rb → patches/models/solidus_promotions/adjustment_patch.rb} +1 -1
  5. data/app/{decorators/models/solidus_promotions/line_item_decorator.rb → patches/models/solidus_promotions/line_item_patch.rb} +1 -1
  6. data/app/{decorators/models/solidus_promotions/order_decorator.rb → patches/models/solidus_promotions/order_patch.rb} +1 -1
  7. data/app/{decorators/models/solidus_promotions/order_recalculator_decorator.rb → patches/models/solidus_promotions/order_recalculator_patch.rb} +1 -1
  8. data/app/{decorators/models/solidus_promotions/shipment_decorator.rb → patches/models/solidus_promotions/shipment_patch.rb} +1 -1
  9. data/app/{decorators/models/solidus_promotions/shipping_rate_decorator.rb → patches/models/solidus_promotions/shipping_rate_patch.rb} +1 -1
  10. data/config/locales/promotion_categories.en.yml +8 -1
  11. data/config/locales/promotions.en.yml +3 -0
  12. data/config/routes.rb +1 -1
  13. data/lib/components/admin/solidus_promotions/promotion_categories/edit/component.html.erb +16 -0
  14. data/lib/components/admin/solidus_promotions/promotion_categories/edit/component.rb +16 -0
  15. data/lib/components/admin/solidus_promotions/promotion_categories/edit/component.yml +4 -0
  16. data/lib/components/admin/solidus_promotions/promotion_categories/index/component.rb +21 -8
  17. data/lib/components/admin/solidus_promotions/promotion_categories/new/component.html.erb +16 -0
  18. data/lib/components/admin/solidus_promotions/promotion_categories/new/component.rb +16 -0
  19. data/lib/components/admin/solidus_promotions/promotion_categories/new/component.yml +4 -0
  20. data/lib/controllers/admin/solidus_promotions/promotion_categories_controller.rb +25 -17
  21. data/lib/controllers/backend/solidus_promotions/admin/benefits_controller.rb +1 -1
  22. data/lib/solidus_promotions/engine.rb +7 -4
  23. data/solidus_promotions.gemspec +2 -3
  24. metadata +25 -22
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6c806b16cf91750622bd6577afe715ac790b156131f78111827f6fd357cd3fcb
4
- data.tar.gz: 35a5c2ec0bbf7d6edb53b1322da77c4128336ae805d94c4579e9e40e25ad574b
3
+ metadata.gz: c29599ba7fd8a620fcfa9355d74acafe458da6953a96b613ab06dbaf0fb9b60f
4
+ data.tar.gz: 9ee74c996b06ea7091b3208ebefb1787beeb7bf8ecabbeac12451ce4287cab13
5
5
  SHA512:
6
- metadata.gz: 8a470f82057f41699defd90c694caba8c525ff7d54b0672c0f1ea27b5bf9786512b6b2f87b4d0f4f9c326c7e0a8b2bf6c6a4660589285f58509ff67c2d6e7030
7
- data.tar.gz: 74f76a2e69d156e4104dd80934867fa96fac155df112c5799309e715475f9be5a6f4ca92d2aac49d4aecc6acd0fd06eaacc3cf9113ab103be8225a7e666c74e2
6
+ metadata.gz: 76bb17aa1e739cb65059244e1c145b18f06200cbd0462793b66f9fcf39f0e85ce33c8f2a0416c4cfd05227d7c8ab23841ff5a382cfa72aa2cb1d8ed42b2370c5
7
+ data.tar.gz: aae8b4bc12d464a52be035683d6d32af234708e63bc3cf6449f08dadbe90e3369cbc2454b950bf2e5c4996a0ada7819f4f2a4c060d47f05beb8c23da0f0d5b5f
data/MIGRATING.md CHANGED
@@ -44,7 +44,7 @@ bundle exec rails solidus_promotions:migrate_existing_promotions
44
44
 
45
45
  This will create equivalents of the legacy promotion configuration in SolidusPromotions.
46
46
 
47
- Now, change `config/initializers/solidus_promotions.rb` to use your new promotion configuration:
47
+ Now, change `config/initializers/spree.rb` to use your new promotion configuration:
48
48
 
49
49
  ## Change store behavior to use SolidusPromotions
50
50
 
data/README.md CHANGED
@@ -2,17 +2,22 @@
2
2
 
3
3
  This gem contains Solidus' recommended promotion system. It is slated to replace the promotion system in the `legacy_promotions` gem.
4
4
 
5
- The basic architecture is very similar to the legacy promotion system, but with a few decisive tweaks, which I'll explain in the coming sections.
5
+ The basic architecture is very similar to the legacy promotion system, but with a few decisive tweaks, which are explained in the subsequent sections.
6
+
7
+ > [!IMPORTANT]
8
+ > If you are upgrading from a previous version of Solidus, it is advised that you update also the promotion system to the new gem. Please consult the [Migration Guide](./MIGRATING.md).
9
+ > While the current version of Solidus still installs the legacy promotion system, we advise a migration at the earliest convinience to avoid having to rush the migration in the future.
10
+
6
11
 
7
12
  ## Architecture
8
13
 
9
- This extension centralizes promotion handling in the order updater. A service class, the `SolidusPromotions::OrderAdjuster` applies the current promotion configuration to the order, adjusting or removing adjustments as necessary.
14
+ This extension centralizes promotion handling in the order updater significantly improving the performance of cart calculations. A service class, the `SolidusPromotions::OrderAdjuster` applies the current promotion configuration to the order, adjusting or removing adjustments as necessary.
10
15
 
11
16
  `SolidusPromotions::Promotion` objects have benefits, and benefits have conditions. For example, a promotion that is "20% off shirts" would have a benefit of type "AdjustLineItem", and that benefit would have a condition of type "LineItemTaxon" that makes sure only line items with the "shirts" taxon will get the benefit.
12
17
 
13
18
  ### Promotion lanes
14
19
 
15
- Promotions get applied by "lane". Promotions within a lane conflict with each other, whereas promotions that do not share a lane will apply sequentially in the order of the lanes. By default these are "pre", "default" and "post", but you can configure this using the SolidusPromotions initializer:
20
+ Promotions get applied by "lane". Promotions within a lane conflict with each other, whereas promotions that do not share a lane will apply sequentially in the order of the lanes. By default these are "pre", "default" and "post", but they can be configured using the SolidusPromotions initializer:
16
21
 
17
22
  ```rb
18
23
  SolidusPromotions.configure do |config|
@@ -25,11 +30,9 @@ SolidusPromotions.configure do |config|
25
30
  end
26
31
  ```
27
32
 
28
- ### Benefits
29
-
30
- Solidus Friendly Promotions ships with only three benefit types by default that should cover most use cases: `AdjustLineItem`, `AdjustShipment` and `CreateDiscountedItem`. There is no benefit that creates order-level adjustments, as this feature of Solidus' legacy promotions system has proven to be very difficult for customer service and finance departments due to the difficulty of accruing order-level adjustments to individual line items when e.g. processing returns. In order to give a fixed discount to all line items in an order, use the `AdjustLineItem` benefit with the `DistributedAmount` calculator.
33
+ ### Types of Benefits
31
34
 
32
- Alle benefits are calculable. By setting their `calculator` to one of the classes provided, a great range of discounts is possible.
35
+ The new Solidus Promotions Systems ships with three benefit types: `AdjustLineItem`, `AdjustShipment` and `CreateDiscountedItem`. To allow more efficient processing of returns and reduce the complexity for bookkeping and support departmentes fixed discount to all line items in an order can now be given through the `AdjustLineItem` benefit through the `DistributedAmount` calculator significantly reducing amministration issues with refunds.
33
36
 
34
37
  #### `AdjustLineItem`
35
38
 
@@ -119,4 +122,4 @@ SolidusDevSupport::TestingSupport::Factories.load_for(SolidusPromotions::Engine)
119
122
 
120
123
  ## License
121
124
 
122
- Copyright (c) 2024 Martin Meyerhoff, Solidus Team, released under the New BSD License.
125
+ Copyright (c) 2024 Martin Meyerhoff, Solidus Team, released under the [license of the parent repository](https://github.com/solidusio/solidus/blob/main/LICENSE.md).
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SolidusPromotions
4
- module AdjustmentDecorator
4
+ module AdjustmentPatch
5
5
  def self.prepended(base)
6
6
  base.scope :solidus_promotion, -> { where(source_type: "SolidusPromotions::Benefit") }
7
7
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SolidusPromotions
4
- module LineItemDecorator
4
+ module LineItemPatch
5
5
  def self.prepended(base)
6
6
  base.attr_accessor :quantity_setter
7
7
  base.belongs_to :managed_by_order_benefit, class_name: "SolidusPromotions::Benefit", optional: true
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SolidusPromotions
4
- module OrderDecorator
4
+ module OrderPatch
5
5
  module ClassMethods
6
6
  def allowed_ransackable_associations
7
7
  super + ["solidus_promotions", "solidus_order_promotions"]
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SolidusPromotions
4
- module OrderRecalculatorDecorator
4
+ module OrderRecalculatorPatch
5
5
  # This is only needed for stores upgrading from the legacy promotion system.
6
6
  # Once we've removed support for the legacy promotion system, we can remove this.
7
7
  def recalculate
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SolidusPromotions
4
- module ShipmentDecorator
4
+ module ShipmentPatch
5
5
  Spree::Shipment.prepend SolidusPromotions::DiscountableAmount
6
6
 
7
7
  def reset_current_discounts
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SolidusPromotions
4
- module ShippingRateDecorator
4
+ module ShippingRatePatch
5
5
  def self.prepended(base)
6
6
  base.class_eval do
7
7
  has_many :discounts,
@@ -1,6 +1,13 @@
1
1
  en:
2
+ solidus_admin:
3
+ promotion_categories:
4
+ title: "Promotion Categories"
2
5
  solidus_promotions:
3
6
  promotion_categories:
4
7
  title: "Promotion Categories"
8
+ create:
9
+ success: "Promotion category was successfully created."
10
+ update:
11
+ success: "Promotion category was successfully updated."
5
12
  destroy:
6
- success: "Promotion Categories were successfully removed."
13
+ success: "Promotion categories were successfully removed."
@@ -1,4 +1,7 @@
1
1
  en:
2
+ solidus_admin:
3
+ promotions:
4
+ title: "Promotions"
2
5
  solidus_promotions:
3
6
  promotions:
4
7
  title: "Promotions"
data/config/routes.rb CHANGED
@@ -12,7 +12,7 @@ SolidusPromotions::Engine.routes.draw do
12
12
  }) do
13
13
  scope :admin do
14
14
  scope :solidus do
15
- admin_resources :promotion_categories, only: [:index, :destroy]
15
+ admin_resources :promotion_categories, except: [:show]
16
16
  admin_resources :promotions, only: [:index, :destroy]
17
17
  end
18
18
  end
@@ -0,0 +1,16 @@
1
+ <%= turbo_frame_tag :resource_modal, target: "_top" do %>
2
+ <%= render component("ui/modal").new(title: t(".title")) do |modal| %>
3
+ <%= form_for @promotion_category, url: form_url, html: { id: form_id } do |f| %>
4
+ <div class="flex flex-col gap-6 pb-4">
5
+ <%= render component("ui/forms/field").text_field(f, :name, class: "required") %>
6
+ <%= render component("ui/forms/field").text_field(f, :code, class: "required") %>
7
+ </div>
8
+ <% modal.with_actions do %>
9
+ <form method="dialog">
10
+ <%= render component("ui/button").new(scheme: :secondary, text: t('.cancel')) %>
11
+ </form>
12
+ <%= render component("ui/button").new(form: form_id, type: :submit, text: t('.submit')) %>
13
+ <% end %>
14
+ <% end %>
15
+ <% end %>
16
+ <% end %>
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ class SolidusPromotions::PromotionCategories::Edit::Component < SolidusAdmin::BaseComponent
4
+ def initialize(record)
5
+ super
6
+ @promotion_category = record
7
+ end
8
+
9
+ def form_id
10
+ dom_id(@promotion_category, "#{stimulus_id}_edit_promotion_category_form")
11
+ end
12
+
13
+ def form_url
14
+ solidus_promotions.promotion_category_path(@promotion_category, **search_filter_params)
15
+ end
16
+ end
@@ -0,0 +1,4 @@
1
+ en:
2
+ title: "Edit Promotion Category"
3
+ cancel: "Cancel"
4
+ submit: "Update Promotion Category"
@@ -5,15 +5,24 @@ class SolidusPromotions::PromotionCategories::Index::Component < SolidusAdmin::U
5
5
  SolidusPromotions::PromotionCategory
6
6
  end
7
7
 
8
- def row_url(promotion_category)
9
- solidus_promotions.edit_admin_promotion_category_path(promotion_category)
8
+ def title
9
+ t('solidus_promotions.promotion_categories.title')
10
+ end
11
+
12
+ def edit_path(record)
13
+ solidus_promotions.edit_promotion_category_path(record, **search_filter_params)
14
+ end
15
+
16
+ def turbo_frames
17
+ %w[resource_modal]
10
18
  end
11
19
 
12
20
  def page_actions
13
21
  render component("ui/button").new(
14
22
  tag: :a,
15
23
  text: t(".add"),
16
- href: solidus_promotions.new_admin_promotion_category_path,
24
+ href: solidus_promotions.new_promotion_category_path(**search_filter_params),
25
+ data: { turbo_frame: :resource_modal },
17
26
  icon: "add-line"
18
27
  )
19
28
  end
@@ -22,7 +31,7 @@ class SolidusPromotions::PromotionCategories::Index::Component < SolidusAdmin::U
22
31
  [
23
32
  {
24
33
  label: t(".batch_actions.delete"),
25
- action: solidus_promotions.promotion_categories_path,
34
+ action: solidus_promotions.promotion_categories_path(**search_filter_params),
26
35
  method: :delete,
27
36
  icon: "delete-bin-7-line"
28
37
  }
@@ -39,8 +48,10 @@ class SolidusPromotions::PromotionCategories::Index::Component < SolidusAdmin::U
39
48
  def name_column
40
49
  {
41
50
  header: :name,
42
- data: ->(promotion_category) do
43
- content_tag :div, promotion_category.name
51
+ data: ->(record) do
52
+ link_to record.name, edit_path(record),
53
+ data: { turbo_frame: :resource_modal },
54
+ class: 'body-link'
44
55
  end
45
56
  }
46
57
  end
@@ -48,8 +59,10 @@ class SolidusPromotions::PromotionCategories::Index::Component < SolidusAdmin::U
48
59
  def code_column
49
60
  {
50
61
  header: :code,
51
- data: ->(promotion_category) do
52
- content_tag :div, promotion_category.code
62
+ data: ->(record) do
63
+ link_to record.code, edit_path(record),
64
+ data: { turbo_frame: :resource_modal },
65
+ class: 'body-link'
53
66
  end
54
67
  }
55
68
  end
@@ -0,0 +1,16 @@
1
+ <%= turbo_frame_tag :resource_modal, target: "_top" do %>
2
+ <%= render component("ui/modal").new(title: t(".title")) do |modal| %>
3
+ <%= form_for @promotion_category, url: form_url, html: { id: form_id } do |f| %>
4
+ <div class="flex flex-col gap-6 pb-4">
5
+ <%= render component("ui/forms/field").text_field(f, :name, class: "required") %>
6
+ <%= render component("ui/forms/field").text_field(f, :code, class: "required") %>
7
+ </div>
8
+ <% modal.with_actions do %>
9
+ <form method="dialog">
10
+ <%= render component("ui/button").new(scheme: :secondary, text: t('.cancel')) %>
11
+ </form>
12
+ <%= render component("ui/button").new(form: form_id, type: :submit, text: t('.submit')) %>
13
+ <% end %>
14
+ <% end %>
15
+ <% end %>
16
+ <% end %>
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ class SolidusPromotions::PromotionCategories::New::Component < SolidusAdmin::BaseComponent
4
+ def initialize(record)
5
+ super
6
+ @promotion_category = record
7
+ end
8
+
9
+ def form_id
10
+ dom_id(@promotion_category, "#{stimulus_id}_new_promotion_category_form")
11
+ end
12
+
13
+ def form_url
14
+ solidus_promotions.promotion_categories_path(**search_filter_params)
15
+ end
16
+ end
@@ -0,0 +1,4 @@
1
+ en:
2
+ title: "New Promotion Category"
3
+ cancel: "Cancel"
4
+ submit: "Add Promotion Category"
@@ -1,32 +1,40 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SolidusPromotions
4
- class PromotionCategoriesController < SolidusAdmin::BaseController
5
- include SolidusAdmin::ControllerHelpers::Search
4
+ class PromotionCategoriesController < SolidusAdmin::ResourcesController
5
+ private
6
+
7
+ def resource_class = SolidusPromotions::PromotionCategory
6
8
 
7
- def index
8
- promotion_categories = apply_search_to(
9
- SolidusPromotions::PromotionCategory.all,
10
- param: :q
11
- )
9
+ def permitted_resource_params
10
+ params.require(:promotion_category).permit(:name, :code)
11
+ end
12
12
 
13
- set_page_and_extract_portion_from(promotion_categories)
13
+ def resources_collection = SolidusPromotions::PromotionCategory.unscoped
14
14
 
15
- respond_to do |format|
16
- format.html { render component("solidus_promotions/categories/index").new(page: @page) }
17
- end
15
+ def index_component
16
+ component("solidus_promotions/categories/index")
18
17
  end
19
18
 
20
- def destroy
21
- @promotion_categories = SolidusPromotions::PromotionCategory.where(id: params[:id])
19
+ def new_component
20
+ component("solidus_promotions/categories/new")
21
+ end
22
22
 
23
- SolidusPromotions::PromotionCategory.transaction { @promotion_categories.destroy_all }
23
+ def edit_component
24
+ component("solidus_promotions/categories/edit")
25
+ end
24
26
 
25
- flash[:notice] = t(".success")
26
- redirect_back_or_to solidus_promotions.promotion_categories_path, status: :see_other
27
+ def after_create_path
28
+ solidus_promotions.promotion_categories_path(**search_filter_params)
27
29
  end
28
30
 
29
- private
31
+ def after_update_path
32
+ solidus_promotions.promotion_categories_path(**search_filter_params)
33
+ end
34
+
35
+ def after_destroy_path
36
+ solidus_promotions.promotion_categories_path(**search_filter_params)
37
+ end
30
38
 
31
39
  def authorization_subject
32
40
  SolidusPromotions::PromotionCategory
@@ -28,7 +28,7 @@ module SolidusPromotions
28
28
  if params.dig(:benefit, :calculator_type)
29
29
  @benefit.calculator_type = params[:benefit][:calculator_type]
30
30
  end
31
- render layout: false, status: :unprocessable_entity
31
+ render layout: false
32
32
  end
33
33
 
34
34
  def update
@@ -16,6 +16,10 @@ module SolidusPromotions
16
16
  g.test_framework :rspec
17
17
  end
18
18
 
19
+ initializer "solidus_promotions.flickwerk_alias" do
20
+ Flickwerk.aliases["Spree::Config.order_recalculator_class"] = Spree::Config.order_recalculator_class_name
21
+ end
22
+
19
23
  initializer "solidus_promotions.assets" do |app|
20
24
  if SolidusSupport.backend_available?
21
25
  app.config.assets.precompile << "solidus_promotions/manifest.js"
@@ -40,10 +44,7 @@ module SolidusPromotions
40
44
 
41
45
  initializer "solidus_promotions.spree_config", after: "spree.load_config_initializers" do
42
46
  Spree::Config.adjustment_promotion_source_types << "SolidusPromotions::Benefit"
43
-
44
- Rails.application.config.to_prepare do
45
- Spree::Order.line_item_comparison_hooks << :free_from_order_benefit?
46
- end
47
+ Spree::Config.line_item_comparison_hooks << :free_from_order_benefit?
47
48
  end
48
49
 
49
50
  initializer "solidus_promotions.core.pub_sub", after: "spree.core.pub_sub" do |app|
@@ -60,6 +61,8 @@ module SolidusPromotions
60
61
 
61
62
  SolidusAdmin::Config.components["solidus_promotions/promotions/index"] = "SolidusPromotions::Promotions::Index::Component"
62
63
  SolidusAdmin::Config.components["solidus_promotions/categories/index"] = "SolidusPromotions::PromotionCategories::Index::Component"
64
+ SolidusAdmin::Config.components["solidus_promotions/categories/new"] = "SolidusPromotions::PromotionCategories::New::Component"
65
+ SolidusAdmin::Config.components["solidus_promotions/categories/edit"] = "SolidusPromotions::PromotionCategories::Edit::Component"
63
66
  end
64
67
  end
65
68
 
@@ -24,12 +24,11 @@ Gem::Specification.new do |spec|
24
24
  files = Dir.chdir(__dir__) { `git ls-files -z`.split("\x0") }
25
25
  spec.files = files.grep_v(%r{^(spec|bin)/})
26
26
 
27
- spec.add_development_dependency "solidus_legacy_promotions"
28
-
27
+ spec.add_dependency "csv", "~> 3.0"
29
28
  spec.add_dependency "importmap-rails", "~> 1.2"
30
29
  spec.add_dependency "ransack-enum", "~> 1.0"
31
30
  spec.add_dependency "solidus_core", [">= 4.0.0", "< 5"]
32
- spec.add_dependency "solidus_support", "~> 0.5"
31
+ spec.add_dependency "solidus_support", ">= 0.12.0"
33
32
  spec.add_dependency "stimulus-rails", "~> 1.2"
34
33
  spec.add_dependency "turbo-rails", ">= 1.4"
35
34
  end
metadata CHANGED
@@ -1,30 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solidus_promotions
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.4.2
4
+ version: 4.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Meyerhoff
8
8
  - Solidus Team
9
- autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2024-12-09 00:00:00.000000000 Z
11
+ date: 2025-03-06 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
- name: solidus_legacy_promotions
14
+ name: csv
16
15
  requirement: !ruby/object:Gem::Requirement
17
16
  requirements:
18
- - - ">="
17
+ - - "~>"
19
18
  - !ruby/object:Gem::Version
20
- version: '0'
21
- type: :development
19
+ version: '3.0'
20
+ type: :runtime
22
21
  prerelease: false
23
22
  version_requirements: !ruby/object:Gem::Requirement
24
23
  requirements:
25
- - - ">="
24
+ - - "~>"
26
25
  - !ruby/object:Gem::Version
27
- version: '0'
26
+ version: '3.0'
28
27
  - !ruby/object:Gem::Dependency
29
28
  name: importmap-rails
30
29
  requirement: !ruby/object:Gem::Requirement
@@ -77,16 +76,16 @@ dependencies:
77
76
  name: solidus_support
78
77
  requirement: !ruby/object:Gem::Requirement
79
78
  requirements:
80
- - - "~>"
79
+ - - ">="
81
80
  - !ruby/object:Gem::Version
82
- version: '0.5'
81
+ version: 0.12.0
83
82
  type: :runtime
84
83
  prerelease: false
85
84
  version_requirements: !ruby/object:Gem::Requirement
86
85
  requirements:
87
- - - "~>"
86
+ - - ">="
88
87
  - !ruby/object:Gem::Version
89
- version: '0.5'
88
+ version: 0.12.0
90
89
  - !ruby/object:Gem::Dependency
91
90
  name: stimulus-rails
92
91
  requirement: !ruby/object:Gem::Requirement
@@ -127,12 +126,6 @@ files:
127
126
  - README.md
128
127
  - Rakefile
129
128
  - app/assets/config/solidus_promotions/manifest.js
130
- - app/decorators/models/solidus_promotions/adjustment_decorator.rb
131
- - app/decorators/models/solidus_promotions/line_item_decorator.rb
132
- - app/decorators/models/solidus_promotions/order_decorator.rb
133
- - app/decorators/models/solidus_promotions/order_recalculator_decorator.rb
134
- - app/decorators/models/solidus_promotions/shipment_decorator.rb
135
- - app/decorators/models/solidus_promotions/shipping_rate_decorator.rb
136
129
  - app/helpers/solidus_promotions/admin/benefits_helper.rb
137
130
  - app/helpers/solidus_promotions/admin/conditions_helper.rb
138
131
  - app/helpers/solidus_promotions/admin/promotions_helper.rb
@@ -217,6 +210,12 @@ files:
217
210
  - app/models/solidus_promotions/promotion_handler/coupon.rb
218
211
  - app/models/solidus_promotions/promotion_handler/page.rb
219
212
  - app/models/solidus_promotions/shipping_rate_discount.rb
213
+ - app/patches/models/solidus_promotions/adjustment_patch.rb
214
+ - app/patches/models/solidus_promotions/line_item_patch.rb
215
+ - app/patches/models/solidus_promotions/order_patch.rb
216
+ - app/patches/models/solidus_promotions/order_recalculator_patch.rb
217
+ - app/patches/models/solidus_promotions/shipment_patch.rb
218
+ - app/patches/models/solidus_promotions/shipping_rate_patch.rb
220
219
  - app/subscribers/solidus_promotions/order_promotion_subscriber.rb
221
220
  - config/importmap.rb
222
221
  - config/locales/en.yml
@@ -247,7 +246,13 @@ files:
247
246
  - lib/components/admin/solidus_admin/orders/show/adjustments/index/source/solidus_promotions_benefit/component.rb
248
247
  - lib/components/admin/solidus_promotions/orders/index/component.rb
249
248
  - lib/components/admin/solidus_promotions/orders/index/component.yml
249
+ - lib/components/admin/solidus_promotions/promotion_categories/edit/component.html.erb
250
+ - lib/components/admin/solidus_promotions/promotion_categories/edit/component.rb
251
+ - lib/components/admin/solidus_promotions/promotion_categories/edit/component.yml
250
252
  - lib/components/admin/solidus_promotions/promotion_categories/index/component.rb
253
+ - lib/components/admin/solidus_promotions/promotion_categories/new/component.html.erb
254
+ - lib/components/admin/solidus_promotions/promotion_categories/new/component.rb
255
+ - lib/components/admin/solidus_promotions/promotion_categories/new/component.yml
251
256
  - lib/components/admin/solidus_promotions/promotions/index/component.rb
252
257
  - lib/components/admin/solidus_promotions/promotions/index/component.yml
253
258
  - lib/controllers/admin/solidus_promotions/promotion_categories_controller.rb
@@ -357,7 +362,6 @@ licenses:
357
362
  - BSD-3-Clause
358
363
  metadata:
359
364
  homepage_uri: https://github.com/solidusio/solidus/blob/main/promotions/README.md
360
- post_install_message:
361
365
  rdoc_options: []
362
366
  require_paths:
363
367
  - lib
@@ -372,8 +376,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
372
376
  - !ruby/object:Gem::Version
373
377
  version: '0'
374
378
  requirements: []
375
- rubygems_version: 3.5.3
376
- signing_key:
379
+ rubygems_version: 3.6.5
377
380
  specification_version: 4
378
381
  summary: New promotion system for Solidus
379
382
  test_files: []