spree/spree — pull request #5741 by mushishi78 (2014-12-09 23:22:39+00:00)
Title: Introduces accumulator and selector classes to handle multi-action promotions

Previously selecting the best promotion meant selecting the best promotion adjustment for each adjustable, rather then selecting the promotion with best discount overall when all it's adjustments are tallied up.

Promotion actions are now given an accumulated total so that multiple actions don't exceed the available possible discount and percentages can be calculated from the total after previous discounts have been applied.