Lookup order based on user_id to prevent started orders from showing after logout. Fixes #4940
Fix specs for i18n changes. Fixes #4998
Disassociate inventory units when a ReturnAuthorization is destroyed

Avoid leaving the inventory units in a bad state.

Fixes #4935
Undo change to current_example.
Revert "Use prepend_before_filter to try calling before apply_coupon_code. refs #4926"

This reverts commit 4c2f3618358feb5f1a160f1522580ee02a52eb24.
Change price * quantity to amount.

This is defined within line_item. It simplifies the code a little bit,
plus now it has API compatibility with orders. This should hopefully
allow us to remove some of the 3 percent off calculators that do almost
exactly the same thing...

Re-factor flat_percent_item_total.

The data here is now always a BigDecimal.

- The preference returned is a BigDecimal so it doesn't need to be
  converted to a string, and then back to BigDecimal
- Big Decimal provides round, so we don't need to convert to a float,
  round and then go back.

Extract quantity to it's own function.

Quantity is used by some of the calculators, and this will maintain
compatibility between calculators for use on both LineItems and Orders.

It also simplifies some of the code!

Add calcuators to LineItem adjustments.

With some minor modifications these calculators now work with line items
as well as whole orders.  This will allow store owners to set up
discounts of a specified amount on a product or set of products, rather
than only percentage discounts.

Fixes #5007

Conflicts:
	core/spec/models/spree/order_spec.rb
Improvements to API performance.

Refactor BaseController#product_scope to allow subclasses
to override the associations that are eager-loaded from a product.
In doing so, removed two associations that were eager-loaded
but never referenced (product.properties, variant.prices).

In Product#total_on_hand, don't load and instantiate all the
variants if all we need to know is whether any of them
track inventory. And don't load all the stock_items to sum their
counts on hand.  (Fix to 368b89786).

Fixes #5008
More code coverage.
Reduce the number of cascading touches.

For better performance when saving a product with many variants,
don't call `touch` when not necessary.

* After saving a product, but neither the product nor its
  default price changed, don't touch it.
* After saving a stock item, only touch the variants if the stock
  item changed.

Background: in ActiveRecord, if a product has not changed,
product.save will not write to the DB--but it *will* fire
the `after_save` callback. In that case there is no need to
touch anything.

Also factored out a method in variant.rb.

Fixes #5009
Fix simple_current_order to not conflict with order.
Fixes #4611
call credit with amount and make sure we update the order after cancel.

Fixes #4504
Closes #5005
make unique SKU for sample data
Avoid browser default font on backend icons

In the Spree backend UI, icons are used by adding classes to existing elements, without adding something like `<i class="icon-something"></i>`.
But font-awesome-rails sets the font-family to just `FontAwesome`, which results in the browser default font-family (usually, Times New Roman) being used for any text that appears next to an icon (on Firefox, at least).
Screenshot: http://adobe.ly/1mb9oOH

Fixes #4885
Validate uniqueness of variants sku. Fixes #5015
Fix analytics check to run only when there is an order. Fixes #4929
Fix duplicate sku in samples.
Order history should be reverse chronological. Fixes #5024
allow specifying Kaminari page_method_name

only define custom page method if page_method_name != page to avoid recursion
Fixes #5035
Use the proper flash

This is not a success
Fixes #5034
Update Google Analytics

Updates GA tracking code to support Display Advertising. See: https://support.google.com/analytics/answer/2444872 for more.
Fixes #5030