Small fix concerning static serving with Passenger; updated gitignore.

This commit is contained in:
Paul van Tilburg 2011-11-15 17:01:52 +01:00
parent cfb8fd37ee
commit 08a7ef3c01
2 changed files with 7 additions and 2 deletions

3
.gitignore vendored
View File

@ -1,4 +1,7 @@
.sass-cache
htpasswd
db/*
public/*.pdf
public/*.tex
public/stylesheets/*.css
tmp/*

View File

@ -982,7 +982,7 @@ module StopTime::Controllers
#
# path:: /static/_path_
# view:: N/A (X-Sendfile)
class Static < R '/static/(.+)'
class Static < R '/static/(.*?)'
# Sets the headers such that the web server will fetch and offer
# the file identified by the _path_ relative to the +public/+ subdirectory.
def get(path)
@ -1007,8 +1007,10 @@ module StopTime::Views
xhtml_strict do
head do
title "Stop… Camping Time!"
# FIXME: improve static serving so that the hack below is not needed.
link :rel => "stylesheet", :type => "text/css",
:media => "screen", :href => R(Static, "stylesheets/style.css")
:media => "screen",
:href => (R(Static, "") + "stylesheets/style.css")
end
body do
div.wrapper! do