Created
April 25, 2009 19:23
-
-
Save tobinharris/101726 to your computer and use it in GitHub Desktop.
This file contains 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
# | |
# A simple ruby script that will run in the cloud. | |
# You need to setup GitHub to call http://blah.com/shout on post-commit | |
# | |
require 'rubygems' | |
require 'xmpp4r-simple' | |
require 'sinatra' | |
get '/shout' do | |
username = 'bot-name@gmail.com' | |
password = 'xxxxx' | |
broadcast = ['userA@gmail.com','userB@gmail.com'] | |
jabber = Jabber::Simple.new(username, password) | |
broadcast.each do |user| | |
jabber.deliver(user, "Hello..!") | |
sleep(10) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment