gentoo/GenTwoo-backend — pull request #12 by naota (2013-11-06 22:53:31+00:00)
Title: Implement register rpc call #3

This pull request implement application's base layout and register rpc call.

These three commits are important:

- 63b67a0a3b8afa10fc9e3552aafc2bcb071af059 implement database model
- 900f616d966cda065be51616ef45245766bdfae5 implement register handler
- 9e246568c15b2ecf5db5dcf1b9f9f14e03ff7349 is test code

Some test results:

```
$ curl localhost:3000/ --header "accept: application/json"
{"message":"Not Found"}%
$ curl -d '' localhost:3000/ --header "accept: application/json"
{"message":"Not Found"}%
$ curl -d '' localhost:3000/v0/register --header "accept: application/json"
{"message":"Invalid Arguments","errors":["ParseError {errorContexts = [\"demandInput\"], errorMessage = \"not enough bytes\", errorPosition = 1:1}"]}%
$ curl -d '{"foo": "bar"}' localhost:3000/v0/register --header "accept: application/json"
{"message":"Invalid Arguments","errors":["The key \"uuid\" was not found"]}%
$ curl -d '{"uuid": "foo"}' localhost:3000/v0/register --header "accept: application/json"
{"message":"Permission Denied. Specified UUID already exist"}%
$ curl -d '{"uuid": "foobar"}' localhost:3000/v0/register --header "accept: application/json"
{"status":"registered"}%
```