Rack middleware for easy pubsub with Firehose.io
Ruby
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 1 commit ahead of jch:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib/rack
spec
.gitignore
.rspec
.travis.yml
.yardopts
Gemfile
LICENSE
README.md
config.ru
rack-firehose.gemspec

README.md

Rack::Firehose Build Status Dependency Status

rack-firehose is middleware that mounts a rack application alongside Firehose.io and provides a convenience DSL for accessing it.

Example

require 'sinatra'
require 'rack-firehose'

use Rack::Firehose

get '/' do
  chunk 'hello world', :to => '/hello'
  "other content here"
end
# window 1: start server
thin start -p 9292

# window 2: subscribe to firehose /hello
curl http://localhost:9292/hello

# window 3: sinatra publishes to /hello, shows in window 2
curl http://localhost:9292/

Installation

rack-firehose requires redis ~> 2.6

# OSX
brew install --devel redis

In your Gemfile:

gem 'rack-firehose'

From your terminal:

bundle

Related Reference