RestApiDoc is a tool for creating, running and sharing automated acceptance tests for RESTful APIs. The test suites and projects can be published to provide a wiki-style documenation of the API functionality.
Here is a nice tutorial about setting up the development environment on a Mac. We highly recommend the following tools:
- Latest Xcode with command line tool installed
- Hombrew
- RVM
- Janus
- Oh-My-Zsh
- iTerm
- Tmux
- Postgres 9.1.x The project uses the latest 9.1.x PostgreSQL release.
RestApiDoc is a Ruby on Rails application that uses Ruby v2.0.0. The project includes a .ruby-version and .ruby-gemset files that will automatically load the current version for you if you are using RVM.
To clone the code from the lastest GitHub commit run:
git clone git@github.com:stanchino/RestApiDoc.git rest-api-doc && cd rest-api-doc
To install all development dependencies on the project (this might take a few minutes):
bundle install
To create the database you will need to copy the default database config file and run the appropriate rake tasks like so:
cp config/database.sample.yml config/database.yml
rake db:create db:migrate db:test:load db:test:prepare
In order to populate the database with sample data run:
rake db:seed
The default application server that is configured is Unicorn. There is also a Procfile you can use to deploy to Heroku. In order to start the application locally you will need to configured your some environment variables and then run:
rails server unicorn
- MAIL_HOSTNAME - The SMTP server hostname used for sending emails
- MAIL_PORT - The SMTP server port
- MAIL_USERNAME - Username to be used for SMTP authentication
- MAIL_PASSWORD - Password to authenticate agains the SMTP server
- HTTPAUTH_USERNAME - Basic HTTP authentication username to access the applciation
- HTTPAUTH_PASSWORD - Basic HTTP authentication password to access the application
Note: If you don't provide HTTPAUTH_USERNAME or HTTPAUTH_PASSWORD HTTP Basic Authentication will be disabled.