Skip to content

Commit

Permalink
require_dependency for calculator
Browse files Browse the repository at this point in the history
Since our class declarations are so busted, we need to ensure this is
lodaed first.
  • Loading branch information
Clarke Brunsdon committed Nov 8, 2017
1 parent faf3ce0 commit 8215101
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/app/models/spree/calculator/free_shipping.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
require_dependency 'spree/calculator'

module Spree
# @deprecated This calculator will be removed in future versions of Spree.
# The only case where it was used was for Free Shipping Promotions. There is
Expand Down
2 changes: 2 additions & 0 deletions core/app/models/spree/calculator/percent_on_line_item.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
require_dependency 'spree/calculator'

module Spree
class Calculator
class PercentOnLineItem < Calculator
Expand Down
2 changes: 2 additions & 0 deletions core/app/models/spree/calculator/percent_per_item.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
require_dependency 'spree/calculator'

module Spree
# A calculator for promotions that calculates a percent-off discount
# for all matching products in an order. This should not be used as a
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require_dependency 'spree/calculator'
require_dependency 'spree/returns_calculator'

module Spree
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require_dependency 'spree/calculator'
require_dependency 'spree/shipping_calculator'

module Spree
Expand Down
1 change: 1 addition & 0 deletions core/app/models/spree/calculator/shipping/flat_rate.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require_dependency 'spree/calculator'
require_dependency 'spree/shipping_calculator'

module Spree
Expand Down
1 change: 1 addition & 0 deletions core/app/models/spree/calculator/shipping/flexi_rate.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require_dependency 'spree/calculator'
require_dependency 'spree/shipping_calculator'

module Spree
Expand Down
1 change: 1 addition & 0 deletions core/app/models/spree/calculator/shipping/per_item.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require_dependency 'spree/calculator'
require_dependency 'spree/shipping_calculator'

module Spree
Expand Down
1 change: 1 addition & 0 deletions core/app/models/spree/calculator/shipping/price_sack.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require_dependency 'spree/calculator'
require_dependency 'spree/shipping_calculator'

module Spree
Expand Down
2 changes: 2 additions & 0 deletions core/spec/models/spree/calculator/percent_per_item_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
require_dependency 'spree/calculator'

require 'rails_helper'
require 'shared_examples/calculator_shared_examples'

Expand Down

0 comments on commit 8215101

Please sign in to comment.