lib/golf/rack.rb in golf-0.0.2 vs lib/golf/rack.rb in golf-0.0.3
- old
+ new
@@ -4,14 +4,14 @@
def initialize(app = nil)
@app = app if app
end
def call(env)
- #compile it before we pass it to static
- #Golf::Compiler.compile!(env)
- ['200', { 'Content-Type' => 'application/javascript', 'Content-Length' => '5'}, ['asasd']]
- #@app.call(env) if @app
+ if env["REQUEST_METHOD"] == "GET" and env["PATH_INFO"] == "/component.js"
+ ['200', { 'Content-Type' => 'application/javascript', 'Content-Length' => '5'}, ['asasd']]
+ else
+ @app.call if @app
+ end
end
-
end
end