Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A simple Twitter application template, built in Ruby with Sinatra and DataMapper
branch: couchdb

This branch is even with zapnap:couchdb

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
public
spec
views
.gitignore
MIT-LICENSE
README.rdoc
Rakefile
application.rb
config.ru
environment.rb

README.rdoc

Retweet: A Twitter Application Template

A base application template for building simple Twitter web apps with Sinatra and CouchDB. If you just want to build a simple keyword-based aggregator (such as tweetdreams.org), all you need to do is edit environment.rb to set the name of your app and the API search keyword(s), edit the CSS, and go.

Configuration

Dependencies and all configuration is done in environment.rb. Your database is also set up here. Go ahead and change the connection string for CouchDB if you like; just make sure it's running and databases should be auto-created as 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

Rspec is included in the template. Add your specs in spec; just require spec_helper.rb to pre-configure the test environment. To run the specs:

rake spec

Getting Started

rake twitter:update
ruby application.rb

Status Updates

Run rake twitter:update to update the cached tweets. You can schedule this as a cron job to fire every few minutes if you like.

Something went wrong with that request. Please try again.