public
Description: Framework for periodically searching any web service.
Homepage: http://github.com/tyler/petticoat_junction
Clone URL: git://github.com/tyler/petticoat_junction.git
dancroak (author)
Sun Nov 09 11:44:59 -0800 2008
commit  4ce3e634bc4163e1c515ba722079f71706ae9499
tree    3b05f78e837c80ee19d73ea3f95c0fd0aefd950b
parent  9b79e518112822d10ea5fe8360be8685e9a44a4e
README.textile

Petticoat Junction

Framework for periodically searching any web service.

Usage

Set up your db schema:

create_table “refreshes”, :force => true do |t| t.integer “term_id” t.string “story_type” t.datetime “queued_at” t.datetime “searched_at” t.datetime “created_at” t.datetime “updated_at” end create_table “stories”, :force => true do |t| t.integer “term_id” t.integer “content_id” t.string “content_type” t.datetime “created_at” t.datetime “updated_at” t.datetime “content_created_at” end add_index “stories”, [“content_created_at”], :name => “index_stories_on_content_created_at” create_table “terms”, :force => true do |t| t.string “text” t.datetime “created_at” t.datetime “updated_at” t.integer “latest_twitter_id” t.datetime “last_viewed_at” end add_index “terms”, [“last_viewed_at”], :name => “index_terms_on_last_viewed_at” add_index “terms”, [“last_viewed_at”], :name => “index_terms_on_last_viewed_at_and_last_searched_at”

Create these models:

class Term < ActiveRecord::Base

include PetticoatJunction::Term
end

class Story < ActiveRecord::Base
include PetticoatJunction::Story
end

class Refresh < ActiveRecord::Base
include PetticoatJunction::Refresh
end

Now, for any kind of content you need (Tweet, Article, Video, Photo, Audio):

class FooBar < ActiveRecord::Base

include PetticoatJunction::Content
end

Requirements

  • starling (sudo gem install starling-starling —source=http://gems.github.com)
  • metaid (sudo gem install metaid)

Plans for the future

  • Remove reliance on Starling so you can plug in other queuing systems like SQS