Sha256: 4f9e0e2bfb7aff26a8c735100b137b62786efc4933713404b6ada8d80931cb56

Contents?: true

Size: 476 Bytes

Versions: 33

Compression:

Stored size: 476 Bytes

Contents

module Rack
  module Adapter
    class Camping
      def initialize(app)
        @app = app
      end

      def call(env)
        env["PATH_INFO"] ||= ""
        env["SCRIPT_NAME"] ||= ""
        controller = @app.run(env['rack.input'], env)
        h = controller.headers
        h.each_pair do |k,v|
          if v.kind_of? URI
            h[k] = v.to_s
          end
        end
        [controller.status, controller.headers, controller.body]
      end
    end
  end
end

Version data entries

33 entries across 33 versions & 9 rubygems

Version Path
relevance-castronaut-0.5.4 vendor/rack/lib/rack/adapter/camping.rb
technomancy-rack-0.3.0 lib/rack/adapter/camping.rb
merb-core-1.1.3 spec10/public/webrat/test_app/gems/gems/rack-0.4.0/lib/rack/adapter/camping.rb
merb-core-1.1.2 spec10/public/webrat/test_app/gems/gems/rack-0.4.0/lib/rack/adapter/camping.rb
merb-core-1.1.1 spec10/public/webrat/test_app/gems/gems/rack-0.4.0/lib/rack/adapter/camping.rb
merb-core-1.1.0 spec10/public/webrat/test_app/gems/gems/rack-0.4.0/lib/rack/adapter/camping.rb
merb-core-1.1.0.rc1 spec10/public/webrat/test_app/gems/gems/rack-0.4.0/lib/rack/adapter/camping.rb
merb-core-1.1.0.pre spec10/public/webrat/test_app/gems/gems/rack-0.4.0/lib/rack/adapter/camping.rb
mack-0.8.2 lib/gems/rack-0.4.0/lib/rack/adapter/camping.rb
rack-0.4.0 lib/rack/adapter/camping.rb
rack-0.3.0 lib/rack/adapter/camping.rb
rack-0.2.0 lib/rack/adapter/camping.rb
sinatra-0.2.2 vendor/rack/lib/rack/adapter/camping.rb