Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Daemon Kit aims to simplify creating Ruby daemons by providing a sound application skeleton (through a generator), task specific generators (jabber bot, etc) and robust environment management code.

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
app_generators/daemon_kit
bin
daemon_generators
lib
rubygems_generators/install_rspec
script
spec
tasks
test
.gitignore
History.txt
Manifest.txt
PostInstall.txt
README.textile
Rakefile
TODO.txt
daemon-kit.gemspec

README.textile

Daemon Kit

Description

Daemon Kit aims to simplify creating Ruby daemons by providing a sound application skeleton (through a generator), task specific generators (jabber bot, etc) and robust environment management code.

Using simple built-in generators it is easy to created evented and non-evented daemons that perform a multitude of different tasks.

Supported generators:

  • Evented and non-evented Jabber Bot (coming next)
  • Evented and non-evented loops (coming soon)
  • Queue poller (SQS, AMQP, etc) (coming soon)

Features/Problems

  • Build it
  • Review TODO.txt

Synopsis

$ daemon-kit [/path/to/your/daemon] [options]

The above command generates a skeleton daemon environment for you to adapt.

$ daemon-kit [/path/to/your/daemon] -i jabber

Use the ‘jabber’ generator instead of the default one.

Generators

Currently only two generators exist, a ‘default’ generator and a ‘jabber’ generator.

The default generator creates a simple daemon with an infinite loop inside that you can adapt.

Jabber Generator

The jabber generator creates a simple daemon that leverages the xmpp4r-simple gem to process inbound messages. The daemon will manage the roster and other little tasks, leaving you to provide the hooks for processing messages, presence notifications and subscription request.

Cron Generator

The cron generator creates a simple daemon that leverages the rufus-scheduler gem to create a simple cron-lie daemon. Please be aware that this daemon could never be a replacement for the battle-tested cron utility shipped standard with most *nix distributions.

AMQP Consumer Generator

The AMQP generator creates a simple daemon that has all the stub code and configuration in place to help you write AMQP consumers quickly and effectively. The generated daemon relies on the presence of the amqp gem.

Requirements

  • Ruby 1.8.6
  • daemons 1.0.10
  • rspec 1.1.11 (for writing/running your specs)

Generator Requirements

Depending on the generator you choose for your daemon, it might require additional gems to run.

Generator Dependencies
jabber xmpp4r-simple
cron rufus-scheduler
amqp amqp

Install

$ git clone git://github.com/kennethkalmer/daemon-kit.git $ rake gem $ gem install pkg/daemon-kit-X.X.X.gem

License

(The MIT License)

Copyright © 2009 Kenneth Kalmer (Internet Exchange CC, Clear Planet Information Solutions Pty Ltd)

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.

Something went wrong with that request. Please try again.