This code has been run on Ruby 2.1.
- Sinatra - Ruby framework
- Thin - Web server
- json - JSON specification
- sinatra-contrib - Sinatra extensions
- Nokogiri - XML parser
- JSON-schema - JSON schema validator
- Rest-client - HTTP and REST client
- Yard - Documentation generator tool
- rerun - Restarts the app when a file changes (used in development environment)
After you cloned the source from the repository, you can run
bundle install
Which will install all the gems.
For tests execute
rspec
The API is documented with yardoc and can be built with a rake task:
rake yard
from here you can use the yard server to browse the docs from the source root:
yard server
and they can be viewed from http://localhost:8808/
The following shows how to start the API server:
rake start
POST '/registerService' with the following content:
{
"service_name" => "servivceName",
"service_host" => "IP",
"service_port" => "Port"
}