Spree AMS is a module namspaced under Spree's Api module, providing a Spree Application with a collection of routes that behave identically to the regular api routes, but instead respond with serialized models (via the Active Model Serializers gem).
This gem does not modify Spree's existing API - it can be used alongside this gem.
Add spree_ams to your Spree store's Gemfile:
gem 'spree_ams', :github => 'hhff/spree_ams', :branch => '2-3-alpha'
Spree uses Paperclip, which works in the model scope, and therefore knows nothing about your hostname.
If you'd like the Image Serializer to output absolute URLs (requisite for Spree Ember), you'll need to set a config.action_controller.asset_host in your Rails environment configuration.
i.e. for your
development environment in
config.action_controller.asset_host = 'http://localhost:3000'
Install the Initializer:
rails g spree:api:ams:install
bundle and you're good to go!
First bundle your dependencies, then run
rake will default to building the dummy app if it does not exist, then it will run specs. The dummy app can be regenerated by using
bundle bundle exec rake
Generate docs from the Acceptance Tests (you'll need to generate your dummy test_app first)!
Copyright (c) 2014 Hugh Francis, released under the New BSD License