github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

zapnap / sinatra-template

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 168
    • 57
  • Source
  • Commits
  • Network (57)
  • Issues (0)
  • Downloads (1)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (2)
    • couchdb
    • master ✓
  • Tags (1)
    • v0.1.0
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

A base Sinatra application template with DataMapper, RSpec, and Haml. Just fork and build. — Read more

  cancel

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

add console 
zapnap (author)
Sat Oct 17 14:31:26 -0700 2009
commit  386856aab710e59532e68a53db9666dc3c914ca4
tree    717f9643600edfd16875f4200d795847b51671a4
parent  2fa1bf4b1b1262bfa3bc0cca6159dcb9d484c57c
sinatra-template /
name age
history
message
file MIT-LICENSE Fri Jan 23 11:06:35 -0800 2009 initial import [zapnap]
file README.rdoc Sun Jan 25 10:56:44 -0800 2009 update instructions [zapnap]
file Rakefile Wed Apr 01 21:13:53 -0700 2009 because Rack::Test is the new hotness [zapnap]
file application.rb Wed Mar 25 08:32:01 -0700 2009 backtrace dump should use Kernel.puts [zapnap]
file config.ru Sun Aug 16 08:00:07 -0700 2009 fix sinatra logging under passenger [zapnap]
file environment.rb Fri Jan 23 11:06:35 -0800 2009 initial import [zapnap]
directory lib/ Fri Jan 23 11:06:35 -0800 2009 initial import [zapnap]
directory public/ Fri Jan 23 11:06:35 -0800 2009 initial import [zapnap]
directory script/ Sat Oct 17 14:31:26 -0700 2009 add console [zapnap]
directory spec/ Fri Apr 03 17:21:52 -0700 2009 sample spec language cleanup [zapnap]
directory views/ Fri Jan 23 11:06:35 -0800 2009 initial import [zapnap]
README.rdoc

Sinatra Application Template

A base Sinatra application template. Just fork and build. Yay! Includes DataMapper, RSpec, and Haml, all ready to go.

Configuration

Dependencies and all configuration is done in environment.rb. Your database is also set up here. DataMapper will use sqlite3 by default. Tests use the sqlite3-memory adapter (no configuration needed).

Add your controller actions in application.rb. Views for these actions are placed in the views directory. Static files, including a stock stylesheet, go in the public directory. Models go in the lib directory and are auto-loaded.

Testing

Add your specs in spec; just require spec_helper.rb to pre-configure the test environment. A number of samples are provided (including a sample model, which can be removed). To run the specs:

  rake spec

Getting Started

  rake db:migrate
  ruby application.rb
Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server