2009, March 09 (Mon) | |
Programmierung – Jabber components | |
---|---|
I could not really find an easy example how to get started with Jabber components (using xmpp4r), so this I will cover the absolute basics here. You will need a Jabber server to connect your component to. I suggest to install ejabberd locally. Also needed is xmpp4r, which can be installed through rubygems (e.g. using The following snippet is used to configure ejabberd to listen for your component. After altering the configuration, do not forget to restart ejabberd. DNS seems to be important for elang-stuff, so make sure the host you use (e.g. localhost) can be resolved properly. Now you can create this small file, name it mycomponent.rb and use the following content: Using this kind of Hash as configuration makes it very easy to use YAML to store your configuration in a file. If ruby can’t find xmpp4r, you might have to Now you can run your component and send messages to mycomponent.localhost. The |
|
Programmierung – Ruby Logger Singleton | |
Sometimes you might want a Singleton Logger in Ruby. Here is what works:
|
|
2009, March 19 (Thu) | |
Programmierung – Jabber component mapping Microblogging to Multi-User-Chat | |
I have put some glue between xmpp4r and twitter, et voila, a Jabber component mapping Working right now:
Missing:
You can try this out by joining the MUC-room {identi.ca|twitter}@omb.jabber.teamidiot.de The repository (mercurial) is at: http://gonzo.teamidiot.de/repos/ombmuc/. |
|
Navigation | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
« | (older) | (newer) | » | |||||||
« | February 2009 | « | Main | ‹ | All articles list (Archives) | › | Search | » | April 2009 | » |