The OpenTourBuilder API server provides a multi-tenant REST API for geographic tours.
- Ruby 2.4.1+
- 5.2.x
- PostgreSQL 9.6.9
- Plugins*
- pgcrypto
- uuid-ossp
- plpgsql
- Plugins*
* Database plugins are enabled during the install process
TODO: How does cloning work with submodules? TODO: Note about rbenv.
bundle install
bundle exec rake db:create
bundle exec rake db:schema:load
bundle exec rake db:migrate
Run the development under https to avoid mix content errors. Note: this will generate a self-signed certificate. There are ways to tell your browser to trust these certs, but that is beyond the scope of this README.
bundle exec puma -b 'ssl://0.0.0.0:3000?key=<path to key>&cert=<path to cert>
bundle exec rspec ./spec
The OTB API sever uses the Apartment gem to support multitenancy. TODO: Write blog post and link here.
TODO: List REST endpoints
Use Capistrano for deployment. General deployment configuration is defined in deploy.rb. Environment specific configurations can be found in config/deploy.
Example:
cap deploy staging
We use the Git-Flow branching model. Please submit pull requests against the develop branch.
OpenTourBuilder API Server is released under the MIT License.