sevenwire / retweet forked from vijum/retweet

A simple Twitter application template, built in Ruby with Sinatra and ActiveRecord

This URL has Read+Write access

name age message
file .gitignore Thu Jan 29 19:51:11 -0800 2009 initial commit [zapnap]
file MIT-LICENSE Thu Jan 29 19:51:11 -0800 2009 initial commit [zapnap]
file README.rdoc Tue Apr 28 08:06:52 -0700 2009 changed the readme to explain the changes I've ... [vijum]
file Rakefile Tue Apr 28 08:03:11 -0700 2009 Added all of my changes (I should have forked f... [Vijay Hawoldar]
file application.rb Loading commit data...
file config.ru Thu Jan 29 19:51:11 -0800 2009 initial commit [zapnap]
directory db/
file environment.rb Tue Apr 28 08:09:56 -0700 2009 Added a todo, tidied up some comments [Vijay Hawoldar]
directory lib/
directory public/ Thu Jan 29 19:51:11 -0800 2009 initial commit [zapnap]
directory spec/ Wed Apr 29 02:52:35 -0700 2009 Fixed spec for AR random and implemented orderi... [Vijay Hawoldar]
directory views/ Thu Jan 29 19:51:11 -0800 2009 initial commit [zapnap]
README.rdoc

Active Record Support

This is a fork of the Retweet application template by zapnap. I have changed it from using DataMapper to ActiveRecord, as I wanted to have a play with it today, but there appears to be an issue with extlib/mash conflicts when using the original DM version.

Retweet: A Twitter Application Template

A base application template for building simple Twitter web apps with Sinatra and DataMapper. 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. 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

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 db:migrate
  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.