lib/jugglite/app.rb in jugglite-0.0.1.alpha vs lib/jugglite/app.rb in jugglite-0.0.2.alpha
- old
+ new
@@ -14,19 +14,19 @@
@app = app
@options = {
path: '/stream',
keepalive_timeout: 20
}.merge(options)
- STDERR.puts "Registered Jugglite to listen to #{@options[:path]}"
@subscription_map = {}
EventMachine::next_tick { setup_redis }
EventMachine::next_tick { setup_keepalive }
end
def call(env)
if @app.nil? || (env["PATH_INFO"] == @options[:path])
handle_stream(env)
else
+ # Running as middleware and path did not match so pass it along
@app.call(env)
end
end
private