Permalink
Browse files

whitespace errors

  • Loading branch information...
1 parent 2cb17e0 commit b26fd9ab343e03de7e8a81a8a231b342e28c739f @rtomayko rtomayko committed Oct 10, 2010
Showing with 9 additions and 9 deletions.
  1. +6 −6 lib/rack/contrib/try_static.rb
  2. +3 −3 test/spec_rack_try_static.rb
@@ -1,13 +1,13 @@
module Rack
- # The Rack::TryStatic middleware delegates requests to Rack::Static middleware
+ # The Rack::TryStatic middleware delegates requests to Rack::Static middleware
# trying to match a static file
- #
+ #
# Examples
#
- # use Rack::TryStatic,
+ # use Rack::TryStatic,
# :root => "public", # static files root dir
- # :urls => %w[/], # match all requests
+ # :urls => %w[/], # match all requests
# :try => ['.html', 'index.html', '/index.html'] # try these postfixes sequentially
#
# uses same options as Rack::Static with extra :try option which is an array
@@ -19,7 +19,7 @@ def initialize(app, options)
@app = app
@try = ['', *options.delete(:try)]
@static = ::Rack::Static.new(
- lambda { [404, {}, []] },
+ lambda { [404, {}, []] },
options)
end
@@ -29,7 +29,7 @@ def call(env)
@try.each do |path|
resp = @static.call(env.merge!({'PATH_INFO' => orig_path + path}))
break if 404 != resp[0] && found = resp
- end
+ end
found or @app.call(env.merge!('PATH_INFO' => orig_path))
end
end
@@ -10,10 +10,10 @@ def request(options = {})
:root => ::File.expand_path(::File.dirname(__FILE__)),
})
- @request =
+ @request =
Rack::MockRequest.new(
- Rack::TryStatic.new(
- lambda {[200, {}, ["Hello World"]]},
+ Rack::TryStatic.new(
+ lambda {[200, {}, ["Hello World"]]},
options))
end

0 comments on commit b26fd9a

Please sign in to comment.