Created
May 10, 2011 09:37
-
-
Save bakkdoor/964180 to your computer and use it in GitHub Desktop.
test.rb
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
backtype ~/projects/btbot $ ruby test.rb | |
connected! | |
authenticated! | |
disconnected! | |
backtype ~/projects/btbot $ ruby -v | |
ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0] |
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
backtype ~/projects/btbot $ rbx test.rb | |
connected! | |
An exception occurred running test.rb | |
closed stream (Jabber::ClientAuthenticationFailure) | |
Backtrace: | |
Jabber::Client#auth at /Users/backtype/projects/rubinius/gems/1.8 | |
/gems/xmpp4r-0.5/lib/xmpp4r/client.rb:118 | |
Object#__script__ at test.rb:7 | |
Rubinius::CodeLoader#load_script at kernel/delta/codeloader.rb:65 | |
Rubinius::CodeLoader.load_script at kernel/delta/codeloader.rb:90 | |
Rubinius::Loader#script at kernel/loader.rb:591 | |
Rubinius::Loader#main at kernel/loader.rb:721 | |
Rubinius::Loader.main at kernel/loader.rb:760 | |
Object#__script__ at kernel/loader.rb:771 | |
backtype ~/projects/btbot $ rbx -v | |
rubinius 1.2.4dev (1.8.7 06c3412a yyyy-mm-dd JI) [x86_64-apple-darwin10.7.0] |
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
require "rubygems" | |
require "xmpp4r" | |
jid = Jabber::JID.new "user@host.com" | |
client = Jabber::Client.new jid | |
client.connect | |
puts "connected!" | |
client.auth "mysecretpassword" | |
puts "authenticated!" | |
client.close | |
puts "disconnected!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment