Created
June 2, 2011 10:43
-
-
Save benlangfeld/1004234 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| 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 |
This file contains hidden or 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
| source 'http://rubygems.org' | |
| gem 'blather' | |
| gem 'foreman' |
This file contains hidden or 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
| {10:55}[ruby-1.9.2]~/Desktop/blather-heroku@master✗✗✗ ben% heroku config:add JID=someone@jabber.org JPASSWORD=somepassword | |
| Adding config vars: | |
| JID => someone@jabber.org | |
| JPASSWORD => somepassword | |
| Restarting app... done, v3. |
This file contains hidden or 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
| 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