Template for medium-sized applications based on Sinatra.
It's inspired by Rails as it's a well-known structure - but it's NOT Rails! ;)
To avoid polluting global namespaces, everything is packed inside a
MyApp module, so you may consider renaming the
MyApp module stored in
init.rb and its derivatives:
Configuring the application
The template reads the app config from
config/config.yml in the
initialize method at
Start the application in the port 4567 with:
rackup -p 4567
You can set the environment mode in
ENV['RACK_ENV'] = 'deployment'
Adding helper or controller files
You can create a
app/helpers directory with modules inside and include all of them into the current helpers module at
The same applies for controllers.
If you don't test your apps (which is a bad thing, TAFT FTW!) feel free to delete
The template includes ready to use helpers to start testing your application with Test::Unit and Cucumber. Both of them make the Rack::Test available in your tests.
It also includes working examples, which could be useful as a starting point.
Disclaimer: I'm learning Cucumber, if you have any suggestions please let me know.
Raul Murciano Copyright (c) 2009 Released under the MIT license (see MIT-LICENSE)
This is a mere bunch of files and dirs, actual credits correspond to the awesome brains behind Sinatra and Rack projects.
Thank you very very very much to all of them!!!