Fix error when running 'rake db:seed'
Fix random encoding issue with spree/states.rb sample data
Revert "Fix error when running 'rake db:seed'"

This reverts commit 6725f9f666e6f2e99fc1baaab006fb83defd220d.
Fix incorrect translation - price stack -> price sack
Cleaner factories with build test.
Bump state_machine to 1.2.0
Add currency_thousands_separator and currency_decimal_mark config options

This fixes an issue in #2632 where the incorrect decimal mark was being used
Allow authenticated users to access api without key

Fixes #2817
Fix issue where all payment method fields were shown on payment screen

Fixes #2785
Fixes #2813
[api] Improve description of updating stock item test + add validation that count_on_hand is correct before proceeding
Create a product in stock location factory, rather than variants

This is so simply a master variant is created, rather than a master and another variant. The master variant still creates stock item records, so this factory will still behave as expected... it just won't create 4 variants when it only needs 2.
Remove duplicate call to create_stock_items from StockLocation
Adjust count on hand for stock items based on variant in stock location factory

Given that stock_location.stock_items is unsorted, the behaviour of calling 'first' and 'last' is effectively random, leading it update the same stock item to have 30 items on hand.

By explicitly defining that we want THIS stock item to be updated with 10 and THIS one with 20, we don't run into that problem.

This is only a problem on MySQL when using InnoDB and on PostgreSQL always.
[api] We want the first stock item in the database in stock_items_controller_spec

Not the first one the database feels like barfing out
Disambiguate syntax in update_shipment_state_for_canceled_orders so it can run
on MySQL and PostgreSQL.

See it break the build here: http://ci.spreecommerce.com/viewLog.html?buildId=2232&buildTypeId=bt2&tab=buildLog#_focus=372
Set deleted_at timestamp in the past for product_properties_controller +
products_controller tests

This is because MySQL's time columns don't differentiate between events which happen in the same second. PostgreSQL and SQLite do.
Use separate databases depending on the value of ENV['TC_AGENT_NUMBER']
Slow down some TOO FAST tests in backend

- Product properties
- Option Types
- Promotions

All these tests were attempting to run code on elements on the page which hadn't loaded. Gotta sloooowwww down and wait for the elements to become available.
No need for tap within a couple InventoryUnit tests
Grab the real first stock_item in InventoryUnit spec