radar/spree — pull request #4 by huoxito (2013-08-15 19:23:31+00:00)
Title: Introduce a separate class to create line item adjustments

That will receive only a line item object and its role would be basically the same as CreateAdjustment. It calculates the proper adjustment amount and creates the adjustments with the given line item as adjustable.

Previously the code were receiving and order object and looping through line items to create an adjustment for each one of them. I don't think this is any good as there will be cases where we might not want to give the discount / adjustment for all order items.

The commits and diff should give you more insight. Thoughts?