Sha256: 24986a9124abcdf5c28312707e9c38f308ce7f2789fde0df80369e61271bcbe6

Contents?: true

Size: 439 Bytes

Versions: 29

Compression:

Stored size: 439 Bytes

Contents

require 'rack'

module Rack

  class Dummy

    def call(env)
      puts "-> Rack::Dummy"
      lines = []
      req = Rack::Request.new(env)
      lines <<  req.path
      lines <<  req.params.inspect
      lines <<  req.host
      lines <<  req.env.inspect
      lines <<  "SUBDOMAIN: #{env['SUBDOMAIN']}"
      lines << '<a href="/some/resource">'
      [200, {"Content-Type"  => "text/plain"}, lines.join("\n")]
    end

  end

end



Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
rewritten-0.5.0 lib/rack/dummy.rb
rewritten-0.4.0 lib/rack/dummy.rb
rewritten-0.3.3 lib/rack/dummy.rb
rewritten-0.3.2 lib/rack/dummy.rb
rewritten-0.3.1 lib/rack/dummy.rb
rewritten-0.3.0 lib/rack/dummy.rb
rewritten-0.2.2 lib/rack/dummy.rb
rewritten-0.2.1 lib/rack/dummy.rb
rewritten-0.2.0 lib/rack/dummy.rb