bin/jobim in jobim-0.4.2 vs bin/jobim in jobim-0.4.3
- old
+ new
@@ -14,11 +14,12 @@
require 'rack'
require 'rack/rewrite'
app = Rack::Builder.new do
use Rack::Rewrite do
- rewrite %r{(.*)/$}, "$1/index.html", :if => -> (env) {
- File.exists?("#{$1}/index,html")
+ rewrite %r{^(.*)/$}, "$1/index.html", :if => -> (env) {
+ env["REQUEST_PATH"][-1,1] == "/" and
+ File.exists?(File.join(opts[:Dir], env["REQUEST_PATH"], "index.html"))
}
end
use Rack::CommonLogger, STDOUT