Skip to content

Instantly share code, notes, and snippets.

@jugyo
Created April 5, 2011 10:00
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save jugyo/903370 to your computer and use it in GitHub Desktop.
Save jugyo/903370 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