These are some chunks of code I wrote to support a talk on XMPP at Austin on Rails (2008/09/23).
You’ll see references to ‘tiamat.local’ herein. That’s the name of my development box. You’ll want to swap that out.
Nearly all of them are dependent upon the ‘xmpp4r’ gem and my fork of the ‘xmpp4r-simple’ gem (github.com/bdainton/xmpp4r-simple).
NOTE FOR EARLY ADOPTERS/CLONERS: my mods to xmpp4r-simple are still in progress. If you head over to the fork and don’t see the changes there…be patient. I’ll get em in soon. Until then, please just imagine them working. kthx!
Several examples depend on the awesome ‘httparty’ gem from jnunemaker (github.com/jnunemaker/httparty). If you don’t have it already, you want it.
Oh, and you’ll want to set up a Jabber server somewhere. I used a local ejabberd installation.
For the Gnip examples, grab the ‘gnip-ruby’ gem from github.com/gnip/gnip-ruby.
The MIT License
Copyright © 2008 Brian Dainton
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.