Skip to content

Instantly share code, notes, and snippets.

@sss
Forked from jugyo/event_notifier.rb
Created April 21, 2011 14:11
Show Gist options
  • Save sss/934600 to your computer and use it in GitHub Desktop.
Save sss/934600 to your computer and use it in GitHub Desktop.
event_notifier.rb
# event_notifier plugin
Earthquake.init do
output do |item|
if item["event"] && item["source"]["screen_name"] != twitter.info["screen_name"]
notify "#{item["source"]["screen_name"]} => #{item["target"]["screen_name"]}" +
(item["target_object"] ? " : #{item["target_object"]["text"].u}" : ""),
:title => "[#{item["event"]}]"
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment