Skip to content

Instantly share code, notes, and snippets.

@macournoyer
Created June 5, 2009 21:09
Show Gist options
  • Save macournoyer/124505 to your computer and use it in GitHub Desktop.
Save macournoyer/124505 to your computer and use it in GitHub Desktop.
class PusherWare
def initialize(app)
@app = app
@pusher = Pusher::App.new
end
def call(env)
if env["PATH_INFO"] ~= /\/pusher/
@pusher.call(env)
else
@app.call(env)
end
end
end
# in Sinatra
use PusherWare
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment