GithubHelp home page GithubHelp logo

omsolution / spree_ams Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vinsol-spree-contrib/spree_ams

0.0 1.0 0.0 135 KB

:floppy_disk: A module for Spree's API that responds as per Active Model Serializers

License: BSD 3-Clause "New" or "Revised" License

Ruby 100.00%

spree_ams's Introduction

Spree AMS

Build Status Dependency Status

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.

Installation

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/environments/development.rb set

config.action_controller.asset_host = 'http://localhost:3000'

Install the Initializer:

rails g spree:api:ams:install

Then run bundle and you're good to go!

Testing

First bundle your dependencies, then run rake. 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 rake test_app.

bundle
bundle exec rake

Contributing

Generate docs from the Acceptance Tests (you'll need to generate your dummy test_app first)!

rake app:docs:generate

Copyright (c) 2014 Hugh Francis, released under the New BSD License

spree_ams's People

Contributors

hhff avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.