2012-01-30 20:39:34 +00:00
|
|
|
# -*- encoding : utf-8 -*-
|
2011-11-15 21:58:27 +00:00
|
|
|
module Grack
|
|
|
|
class Handler < Base
|
|
|
|
def initialize(app, config)
|
|
|
|
@app = app
|
|
|
|
@config = config
|
|
|
|
end
|
|
|
|
|
|
|
|
def call(env)
|
2011-11-17 21:57:30 +00:00
|
|
|
super
|
|
|
|
if git?
|
2011-11-15 21:58:27 +00:00
|
|
|
::GitHttp::App.new(@config).call(env)
|
|
|
|
else
|
|
|
|
@app.call(env)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|