This is a sinatra bootstrat app ready to implement a json api or a frontend app.
- Ready to use Active Record.
- Ready to implement JSON APIs.
- Ready to test with Rspec (it also includes shoulda-matchers, database_cleaner and factory_girl).
- Ready to deploy with capistrano.
It includes some useful tasks, such:
-
database tasks:
- db:create
- db:destroy
- db:generate_migration NAME=create_pets
- db:migrate
- db:rollback
-
console
It includes some useful capistrano tasks, such:
-
database tasks:
- db:create
- db:destroy
- db:migrate
- db:rollback
- db:seed
-
upload tasks:
- upload:db_config
- upload:vhost
$ cp config/database.sample.yml config/database.yml
$ rake RACK_ENV=test db:create
$ rake RACK_ENV=test db:migrate
$ rspec
$ rake db:create
$ rake db:migrate
$ rake console
$ rackup
$ cp config/deploy/production.sample.conf config/deploy/production.conf
$ cp config/deploy/staging.sample.conf config/deploy/staging.conf
$ cp config/apache.sample.conf config/apache.conf
$ cap production upload:vhost
$ cap production upload:db_config
$ cap production deploy
$ cap production db:create
$ cap production db:migrate
Yay, your app is online :D
- Move resource_controller to a sinatra module?