Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

update growl example

  • Loading branch information...
commit 0454771faf87f5a5a7d5520e4ecc0985c8fd8c32 1 parent 4beed83
@stve stve authored
Showing with 10 additions and 2 deletions.
  1. +10 −2 examples/growl_daemon.rb
View
12 examples/growl_daemon.rb
@@ -4,11 +4,19 @@
if args_start = ARGV.index('--')
username, password = ARGV[args_start + 1].split(':')
- tracks = ARGV[args_start + 2 .. -1]
+ tracks = ARGV[args_start + 2 .. -1]
puts "Starting a GrowlTweet to track: #{tracks.inspect}"
end
-TweetStream::Daemon.new(username,password).track(*tracks) do |status|
+TweetStream.configure do |config|
+ config.consumer_key = 'abcdefghijklmnopqrstuvwxyz'
+ config.consumer_secret = '0123456789'
+ config.oauth_token = 'abcdefghijklmnopqrstuvwxyz'
+ config.oauth_token_secret = '0123456789'
+ config.auth_method = :oauth
+end
+
+TweetStream::Daemon.new('tracker').track(*tracks) do |status|
g = Growl.new 'localhost', 'growltweet', ['tweet']
g.notify 'tweet', status.user.screen_name, status.text
end
Please sign in to comment.
Something went wrong with that request. Please try again.