This project is an (example) implementation of the Party Time API using @mattetti's Weasel Diesel web service DSL, and the Weasel Diesel Sinatra gem.
- First, clone the repo and bundle the app's dependencies:
$ git clone git://github.com/mikesea/partytime_wd.git
$ cd partytime_wd
$ bundle install
- Then, migrate the database (this will create a
development.sqlite3
database in thedb/
directory:
$ rake db:migrate RACK_ENV=development
- Now, start the server!
$ bundle exec rackup
- Or, boot up the console instead:
$ bundle exec bin/console
Available endpoints are limited to:
POST /playlists
GET /playlists/:id
POST /playlists/:playlist_id/tracks
DELETE /playlists/:playlist_id/tracks/:id
Documentation for the API is found under the doc/
directory. Open doc/index.html
in your browser to navigate the docs. These docs are generated automatically by Weasel Diesel, so feel free to remove that directory and generate the documentation again with the following rake task:
rake doc:services
To run the test, migrate the test database:
$ rake db:migrate RACK_ENV=test
Then, run the specs!
$ rake test