Skip to content
This repository

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.

Merge pull request #80 from wjsantos/master

accepting ERB interpolation into YAML config files
latest commit ae0c37c17d
Marc Bowes marcbowes authored
Octocat-spinner-32 bin Running 'daemon-kit' without argument should display help September 11, 2013
Octocat-spinner-32 config Docs and docs May 31, 2009
Octocat-spinner-32 features Cuke the upgrade rake task September 16, 2013
Octocat-spinner-32 gemfiles Coveralls attempt number 1 September 14, 2013
Octocat-spinner-32 lib accepting ERB interpolation into YAML config files April 04, 2014
Octocat-spinner-32 spec accepting ERB interpolation into YAML config files April 04, 2014
Octocat-spinner-32 tasks Fixing rspec patterns to not try and load spec/fixtures September 17, 2013
Octocat-spinner-32 templates god configs should make more sense October 06, 2009
Octocat-spinner-32 .gitignore Removed and ignored the Gemfile.lock. December 17, 2013
Octocat-spinner-32 .rspec Fixing rspec patterns to not try and load spec/fixtures September 17, 2013
Octocat-spinner-32 .travis.yml Coveralls attempt number 1 September 14, 2013
Octocat-spinner-32 Configuration.txt Added note for privilege dropping issues on OSX with Ruby 1.8.6 August 12, 2009
Octocat-spinner-32 Deployment.txt Docs on deployment June 06, 2009
Octocat-spinner-32 Gemfile Use https for Rubygems August 17, 2013
Octocat-spinner-32 History.txt Removed all support for nanite August 23, 2013
Octocat-spinner-32 Logging.txt Added some clarity on logging September 16, 2009
Octocat-spinner-32 README.md Fix typo of `cron-lie` in README.md December 11, 2013
Octocat-spinner-32 Rakefile Promoted 'features' task to default rake tasks September 11, 2013
Octocat-spinner-32 RuoteParticipants.txt Documentation for writing ruote participants August 01, 2009
Octocat-spinner-32 TODO.txt Documentation update for XMPP January 24, 2010
Octocat-spinner-32 Upgrading.md Updated Upgrading.md September 16, 2013
Octocat-spinner-32 daemon-kit.gemspec Removed dependency on I18n. December 17, 2013
README.md

Daemon Kit

Code Climate Gem Version Build Status Coverage Status

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 create evented and non-evented daemons that perform a multitude of different tasks.

Supported generators:

  • XMPP bot (evented)
  • AMQP consumer (evented)
  • SQS consumer
  • Nanite agent (requires < 0.3)
  • Cron-style daemon
  • ruote remote participants

Features/Problems

  • Build it
  • Review TODO.txt

Synopsis

  $ daemon-kit -h

Get some help

  $ 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 xmpp

Use the 'xmpp' generator instead of the default one.

Generators

Currently five generators exist: default, xmpp, amqp, cron, ruote. Prior to version 0.3 there was a nanite generator too.

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

XMPP Generator

The jabber generator creates a simple daemon that leverages the blather 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-like daemon. Please be aware that this daemon could never be a replacement for the battle-tested cron[http://www.gentoo.org/doc/en/cron-guide.xml] 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.

ruote Remote Participants

The ruote remote participant generator speeds up the development of workflow participants that run outside of the Ruby process that houses the engine. Daemon-kit handles all the communication and delegation logic, allowing you to focus purely on your participant's activities.

Requirements

  • Ruby 1.8.7 or later (developed on REE/1.9.1)
  • eventmachine-0.12.10
  • rspec (for writing/running your specs)

Generator Requirements

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

The generators are all written using Thor, which is bundled with daemon-kit and not needed for running any of the generators.

Install

Currently recommended to stick to the git repo:

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

Stable versions, when released are available directly from Rubygems:

  $ gem install daemon-kit

Upgrading

When upgrading daemons generated from earlier versions of daemon-kit, it is easier in most cases to re-generate the daemon. Since 0.1.8 the generators use Thor, which allows you to review a diff of each file before deciding to overwrite it.

Further reading

License

(The MIT License)

Copyright (c) 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.