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.



12
13
14
# File 'lib/pact_broker/ui/app.rb', line 12

def initialize app
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



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

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