Skip to content

Commit

Permalink
Alphabetize environment configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
kennyadsl committed Jul 9, 2019
1 parent a3d639f commit beccb28
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions core/lib/spree/app_configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,27 @@ def events

def environment
@environment ||= Spree::Core::Environment.new(self).tap do |env|
env.calculators.promotion_actions_create_adjustments = %w[
Spree::Calculator::FlatPercentItemTotal
Spree::Calculator::FlatRate
Spree::Calculator::FlexiRate
Spree::Calculator::TieredPercent
Spree::Calculator::TieredFlatRate
]

env.calculators.promotion_actions_create_item_adjustments = %w[
Spree::Calculator::DistributedAmount
Spree::Calculator::FlatRate
Spree::Calculator::FlexiRate
Spree::Calculator::PercentOnLineItem
Spree::Calculator::TieredPercent
]

env.calculators.promotion_actions_create_quantity_adjustments = %w[
Spree::Calculator::PercentOnLineItem
Spree::Calculator::FlatRate
]

env.calculators.shipping_methods = %w[
Spree::Calculator::Shipping::FlatPercentItemTotal
Spree::Calculator::Shipping::FlatRate
Expand All @@ -487,11 +508,6 @@ def environment
Spree::Calculator::DefaultTax
]

env.stock_splitters = %w[
Spree::Stock::Splitter::ShippingCategory
Spree::Stock::Splitter::Backordered
]

env.payment_methods = %w[
Spree::PaymentMethod::BogusCreditCard
Spree::PaymentMethod::SimpleBogusCreditCard
Expand Down Expand Up @@ -525,25 +541,9 @@ def environment
Spree::Promotion::Actions::FreeShipping
]

env.calculators.promotion_actions_create_adjustments = %w[
Spree::Calculator::FlatPercentItemTotal
Spree::Calculator::FlatRate
Spree::Calculator::FlexiRate
Spree::Calculator::TieredPercent
Spree::Calculator::TieredFlatRate
]

env.calculators.promotion_actions_create_item_adjustments = %w[
Spree::Calculator::DistributedAmount
Spree::Calculator::FlatRate
Spree::Calculator::FlexiRate
Spree::Calculator::PercentOnLineItem
Spree::Calculator::TieredPercent
]

env.calculators.promotion_actions_create_quantity_adjustments = %w[
Spree::Calculator::PercentOnLineItem
Spree::Calculator::FlatRate
env.stock_splitters = %w[
Spree::Stock::Splitter::ShippingCategory
Spree::Stock::Splitter::Backordered
]
end
end
Expand Down

0 comments on commit beccb28

Please sign in to comment.