From 08a7ef3c01c7998806d419f0e7bad16bcf69ee8f Mon Sep 17 00:00:00 2001 From: Paul van Tilburg Date: Tue, 15 Nov 2011 17:01:52 +0100 Subject: [PATCH] Small fix concerning static serving with Passenger; updated gitignore. --- .gitignore | 3 +++ stoptime.rb | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 5f4bfec..bcbd3cc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,7 @@ .sass-cache +htpasswd +db/* public/*.pdf public/*.tex public/stylesheets/*.css +tmp/* diff --git a/stoptime.rb b/stoptime.rb index 805121e..93b21d8 100644 --- a/stoptime.rb +++ b/stoptime.rb @@ -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