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
3mix-castronaut-0.5.0.2 vendor/rack/lib/rack/adapter/camping.rb
kastner-rack-0.3.171 lib/rack/adapter/camping.rb
masover-castronaut-0.4.4.4 vendor/rack/lib/rack/adapter/camping.rb
masover-castronaut-0.4.4.5 vendor/rack/lib/rack/adapter/camping.rb
masover-castronaut-0.5.0.1 vendor/rack/lib/rack/adapter/camping.rb
relevance-castronaut-0.2.0 vendor/rack/lib/rack/adapter/camping.rb
relevance-castronaut-0.2.5 vendor/rack/lib/rack/adapter/camping.rb
relevance-castronaut-0.3.0 vendor/rack/lib/rack/adapter/camping.rb
relevance-castronaut-0.3.5 vendor/rack/lib/rack/adapter/camping.rb
relevance-castronaut-0.3.6 vendor/rack/lib/rack/adapter/camping.rb
relevance-castronaut-0.4.1 vendor/rack/lib/rack/adapter/camping.rb
relevance-castronaut-0.4.2 vendor/rack/lib/rack/adapter/camping.rb
relevance-castronaut-0.4.3 vendor/rack/lib/rack/adapter/camping.rb
relevance-castronaut-0.4.4 vendor/rack/lib/rack/adapter/camping.rb
relevance-castronaut-0.4.5 vendor/rack/lib/rack/adapter/camping.rb
relevance-castronaut-0.4.6 vendor/rack/lib/rack/adapter/camping.rb
relevance-castronaut-0.5.0 vendor/rack/lib/rack/adapter/camping.rb
relevance-castronaut-0.5.1 vendor/rack/lib/rack/adapter/camping.rb
relevance-castronaut-0.5.2 vendor/rack/lib/rack/adapter/camping.rb
relevance-castronaut-0.5.3 vendor/rack/lib/rack/adapter/camping.rb