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.



14
15
16
# File 'lib/pact_broker/ui/app.rb', line 14

def initialize app
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



18
19
20
21
# File 'lib/pact_broker/ui/app.rb', line 18

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