Skip to content

Instantly share code, notes, and snippets.

@tobinharris
Created April 25, 2009 19:23
Show Gist options
  • Save tobinharris/101726 to your computer and use it in GitHub Desktop.
Save tobinharris/101726 to your computer and use it in GitHub Desktop.
#
# 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