ripta / merb-juggernaut

Juggernaut-compatible merb slice

This URL has Read+Write access

name age message
file .gitignore Fri Dec 05 10:12:12 -0800 2008 Ignore sqlite3 database files [Riptide]
file LICENSE Tue Nov 25 08:22:26 -0800 2008 Initial commit of an empty slice [Riptide]
file README.textile Fri Dec 05 10:12:12 -0800 2008 Add juggernaut send commands [Riptide]
file Rakefile Tue Nov 25 08:56:43 -0800 2008 Update author information [Riptide]
file TODO Tue Nov 25 08:22:26 -0800 2008 Initial commit of an empty slice [Riptide]
directory app/ Fri Dec 05 10:14:43 -0800 2008 Chat demo [Riptide]
directory config/ Fri Dec 05 10:11:15 -0800 2008 Add juggernaut-jquery files [ripta]
directory lib/ Thu Dec 11 05:48:45 -0800 2008 Directly use the json library [ripta]
file merb-juggernaut.gemspec Fri Dec 05 10:14:41 -0800 2008 Add gemspec [ripta]
directory public/ Fri Dec 05 10:12:13 -0800 2008 Allow logging to the "Error Console" in Safari [ripta]
directory spec/ Tue Nov 25 08:43:37 -0800 2008 Chat demo skeleton [Riptide]
directory stubs/ Tue Nov 25 08:22:26 -0800 2008 Initial commit of an empty slice [Riptide]
README.textile

MerbJuggernaut

Written by Ripta Pasay <github@r8y.org>. Contains scripts and code, some modified
and some as-is, from juggernaut-jquery1 and the original juggernaut2.
Even this README contains chunks from 2.

http://github.com/ripta/merb-juggernaut

A slice of Juggernaut pie. For more information about what Juggernaut is, see 3.

Requirements

Requires the gems juggernaut >= 0.5.7 and merb >= 1.0.

How to install

Install it as a gem, from github. If you haven’t, add the github gem repository
as a source:


	$ [sudo] gem sources -a http://gems.github.com

Then install the gem:


	$ [sudo] gem install ripta-merb-juggernaut

which should also install the prerequisite gems juggernaut and merb if you don’t
have them already.

How to use in your Merb app

Add the gem as a dependency in your Merb app’s config/init.rb:


	dependency "ripta-merb-juggernaut", :require_as => "merb-juggernaut"

The :require_as option is required because of the qualified gem names on github.

How to run the demos

Download the sources, and change into the directory. Once there, start up
the juggernaut standalone daemon, and then start up the slice server:


	$ juggernaut -c config/juggernaut.yml
	$ slice

The slice should now be available, usually on port 4000.

To send a command from the command line, you can start up the Merb slices
interactive console:


	$ slice -i

And send away. For example, to alert all connected Juggernaut clients, type
the following line into the interactive console:


	MerbJuggernaut::Commands.send_to_all('alert("This is a test!");')

Contributing

To contribute, you should try running the above demos. You can start coding away.
Be sure to send me pull requests through github.

1 http://github.com/dvdplm/juggernaut-jquery/
fn2. http://github.com/maccman/juggernaut_gem/
fn3. http://juggernaut.rubyforge.org/