An open API service indexing awesome lists of open source software.

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

Juggernaut-compatible merb slice
https://github.com/ripta/merb-juggernaut

Last synced: 8 months ago
JSON representation

Juggernaut-compatible merb slice

Awesome Lists containing this project

README

          

h1. MerbJuggernaut

Written by Ripta Pasay . Contains scripts and code, some modified
and some as-is, from juggernaut-jquery[1] and the original juggernaut[2].
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].

h2. Requirements

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

h2. 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.

h2. 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.

h2. 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!");')

h2. Contributing

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

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