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.



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

def initialize app
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



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

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