spree/spree — pull request #5275 by metade (2014-08-27 16:43:13+00:00)
Title: Importing Spree::Shipments should use the admin_name rather than the name for finding the Shipping Method

Our application ships from multiple stock locations, and each one has different shipping methods available to it depending on the country (e.g. Royal Mail in the UK, USPS in the US). However, we will want to use the same customer facing label for these (e.g. Free shipping), whilst having different internal names (i.e the admin_name, e.g. Royal Mail, USPS).

When importing orders, `Spree::Core::Importer::Order` uses `Spree::ShippingMethod.find_by_name!`, and we believe it should really use `Spree::ShippingMethod.find_by_admin_name!` to cover these situations.

However, so that we don't break existing implementations I decided to extract that call into it's own method with a deprecation warning so that we can easily override the call in the time being.