robinmoisson / entourage-ror

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status Coverage Status

Prerequisites

Ruby 2.3.1 Rails 4.2.6

rbenv or rvm recommanded

Update API

aglio -i apiary.apib -o public/developer.html

Install aglio:

npm install -g aglio

Resolve dependencies and run server

$ gem install bundler
$ bundle install --without production
$ bundle exec rake db:migrate
$ bundle exec rails server

Rspec tests

Run tests with

$ rspec

Dredd tests

Test the API documentation compliance with Dredd

Install Dredd:

$ npm install -g dredd

Setup database for Dredd tests:

  • Reset DB to reset id sequence
  • Populate database with Dredd specific seeds (cf file ./db/seeds/dredd.rb)
$ rake db:reset dredd:seeds

rake dredd:seeds task description:

  • Removes all newsletter subscriptions
  • Removes all users
  • Generates the dredd user

Run Dredd:

$ rake dredd

Dredd config

Dredd options are listed in dredd.yml file

Guard

Guard Rspec (default)

Launch automatically tests with:

$ bundle exec guard

Guard Api blueprint

Launch automatically dredd and aglio (static documentation generation) with:

$ bundle exec guard -g apib

Redirection to app stores :

In order to redirect a mobile to the application from a SMS, we redirect toward a page on the website :

http://api.entourage.social/store_redirection

  • If you visit this page from an iOS device you will be redirected to the Appstore
  • If you visit this page from an Android device you will be redirected to the PlayStore

The logic and URL for the store can be found here : https://s3-eu-west-1.amazonaws.com/entourage-ressources/store_redirection.html

About

License:MIT License


Languages

Language:Ruby 63.3%Language:HTML 30.1%Language:API Blueprint 4.6%Language:JavaScript 1.3%Language:CSS 0.7%Language:Shell 0.1%