Split line items across shipments
- Easily create new shipments from existing shipments
- Move items between shipments on an order
Add #in_stock? method to Spree::Variant

As proposed by @jdutil in spree/spree_wishlist#37

[Fixes #3163]
Fix build specs and split shipment edit button [Fixes #3167]

They were mostly failing due to a js error and shiping labels
Cache product API responses for 3 minutes to make things like Backbone cache them
Remove Gemfile.lock within build.sh to make testing easier
Remove spree_dash until Jirafe issues are resolved
Correct habtm association for shipping_method zones

Related to #3174
[api] LineItems#create will now increase quantity of existing line items, rather than creating duplicates
Fixed notification when Gemfile.lock not exists

Related to #3205
Created function for removing Gemfile.lock + removed dash from rake tasks

Related to #3205
Added :number to attr_accessible for Spree::Shipments.
Add Product#total_on_hand convenience method.
[API] Checkouts API update now can take line item attributes
Only create promo items if order is eligible

Add a doc block to CreateLineItem.perform block to explain why it's not
suitable for Add to Cart events and explained another possible caveat

[Fixes #3275]
Fix race condition with product permalink generation

See this comment for a nice script on how to reproduce: https://github.com/spree/spree/issues/2714#issuecomment-19798918

Product creation in the API will now automatically be retried if an ActiveRecord::RecordNotUnique exception is thrown. This would be thrown due to the unique index which now exists on the spree_products table.

This commit also adds similar unique indexes to the orders, shipments and stock_transfers tables, although I was unable to get these showing similar behaviour to the products API in my testing.

Fixes #2714
[api] Require authorization to update an order
CreditCard model will now validate that the expiry is not in the past
Recreate shipments in frontend when necessary

Every time a customer gets to the point where shipments were created,
delivery step, and then decides to go back and change some item quantity
or add a new product we need to recreate the shipments so they properly
reflect the current order state.

I initially tried to apply these changes on the spree_core level but it
turns out to be really difficult because while both backend and frontend
use the same API in backend inventory units are created as soon as items
are included on the order. On the other hand in frontend inventory units
are only created when customers reaches the delivery step

Fixes #3339
Fix wrong discount calculation with flat percent promotions when there are more than one line item in the order

Fixes #3054
Add default order to the variants_including_master product association