This is a simple Ruby application that shows how to use Webmachine, HAL/JSON and Cucumber together.
1. Clone this repository:
$ git clone https://github.com/tbalthazar/webmachine-hal-json-api-demo.git
2. Change directory to webmachine-hal-json-api-demo
and run the bootstrap script:
It will install the required gems, create a SQLite database in db/database.db
and seed the database with sample data.
$ cd webmachine-hal-json-api-demo
$ script/bootstrap
3. Run the server:
$ script/run
4. Run the client:
Run the client in another terminal to connect to the server.
$ ruby client.rb login
$ ruby client.rb categories list
$ ruby client.rb categories new
Get help.
$ ruby client.rb help
The app allows Users
to manage Articles
which belong to a Category
, and grant/revoke Readers
access to those articles. The client is really basic and doesn't handle all the edge cases, but it allows to interact with the app easily.
You can run the tests using:
$ script/test
Please see LICENSE for licensing details.