Class: PactBroker::UI::PathInfoFixer

Inherits:
Object
  • Object
show all
Defined in:
lib/pact_broker/ui/app.rb

Constant Summary collapse

PATH_INFO =
"PATH_INFO".freeze

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ PathInfoFixer

Returns a new instance of PathInfoFixer.



16
17
18
# File 'lib/pact_broker/ui/app.rb', line 16

def initialize app
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



20
21
22
23
# File 'lib/pact_broker/ui/app.rb', line 20

def call env
  env[PATH_INFO] = "/" if env[PATH_INFO] == ""
  @app.call(env)
end