Skip to content

Instantly share code, notes, and snippets.

@benlangfeld
Created June 2, 2011 10:43
Show Gist options
  • Save benlangfeld/1004234 to your computer and use it in GitHub Desktop.
Save benlangfeld/1004234 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'blather/client'
setup ENV['JID'], ENV['JPASSWORD']
# Auto approve subscription requests
subscription :request? do |s|
write_to_stream s.approve!
end
# Echo back what was said
message :chat?, :body do |m|
say m.from, "You said: #{m.body}"
end
source 'http://rubygems.org'
gem 'blather'
gem 'foreman'
{10:55}[ruby-1.9.2]~/Desktop/blather-heroku@master✗✗✗ ben% heroku config:add [email protected] JPASSWORD=somepassword
Adding config vars:
JID => [email protected]
JPASSWORD => somepassword
Restarting app... done, v3.
bot: bundle exec ruby app.rb -D
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment