Created
September 24, 2010 04:02
-
-
Save stve/594848 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| source "http://rubygems.org" | |
| gem 'tweetstream' | |
| gem 'yajl-ruby' | |
| gem 'growl' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'rubygems' | |
| require 'yajl' | |
| require 'tweetstream' | |
| require 'growl' | |
| username = 'username' | |
| password = 'password' | |
| twitter_logo = File.join(File.expand_path(File.dirname(__FILE__)), 'twitter.png') | |
| keywords = %w(yankees rays) | |
| TweetStream::Client.new(username, password, :yajl).track(*keywords) do |status| | |
| Growl.notify do |n| | |
| n.message = status.text | |
| n.title = status.user.screen_name | |
| n.image = twitter_logo | |
| end if Growl.installed? | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
