lib/alephant/broker/app/rack.rb in alephant-broker-0.0.3 vs lib/alephant/broker/app/rack.rb in alephant-broker-0.1.0

- old
+ new

@@ -1,24 +1,24 @@ $: << File.dirname(__FILE__) require 'alephant/broker/app' +require 'alephant/broker/call_environment' module Alephant module Broker class RackApplication < Application def call(env) - response = handle( - request_from(env['PATH_INFO'], env['QUERY_STRING']) - ) + RequestStore.store[:env] ||= CallEnvironment.new(env) + response = handle send response end def send(response) [ response.status, - {"Content-Type" => response.content_type}, - [response.content.to_s] + { "Content-Type" => response.content_type }, + [ response.content.to_s ] ] end end end end