Try and make asset tagging actually work.

This commit is contained in:
Tom Hughes 2007-12-06 18:42:45 +00:00
parent 7ee377352e
commit 15c492ebfe
6 changed files with 36 additions and 10 deletions

View file

@ -32,8 +32,8 @@
<% zoom = '12' %>
<% end %>
<script type="text/javascript" src="/openlayers/OpenLayers.js"></script>
<script type="text/javascript" src="/openlayers/OpenStreetMap.js"></script>
<%= javascript_include_tag '/openlayers/OpenLayers.js' %>
<%= javascript_include_tag '/openlayers/OpenStreetMap.js' %>
<%= javascript_include_tag 'map.js' %>
<script type="text/javascript">

View file

@ -43,7 +43,7 @@
<a href="http://wiki.openstreetmap.org/index.php/Editing">Several other options</a> are also available
for editing OpenStreetMap.
</div>
<script type="text/javascript" src="/javascripts/swfobject.js"></script>
<%= javascript_include_tag 'swfobject.js' %>
<script type="text/javascript">
var brokenContentSize = $("content").offsetWidth == 0;
var fo = new SWFObject("/potlatch/potlatch.swf?d="+Math.round(Math.random()*1000), "potlatch", "700", "600", "6", "#FFFFFF");

View file

@ -72,8 +72,8 @@ by the OpenStreetMap project and it's contributors.
<% end %>
<% end %>
<script type="text/javascript" src="/openlayers/OpenLayers.js"></script>
<script type="text/javascript" src="/openlayers/OpenStreetMap.js"></script>
<%= javascript_include_tag '/openlayers/OpenLayers.js' %>
<%= javascript_include_tag '/openlayers/OpenStreetMap.js' %>
<%= javascript_include_tag 'map.js' %>

View file

@ -46,8 +46,8 @@
<% zoom = '12' %>
<% end %>
<script type="text/javascript" src="/openlayers/OpenLayers.js"></script>
<script type="text/javascript" src="/openlayers/OpenStreetMap.js"></script>
<%= javascript_include_tag '/openlayers/OpenLayers.js' %>
<%= javascript_include_tag '/openlayers/OpenStreetMap.js' %>
<%= javascript_include_tag 'map.js' %>
<script type="text/javascript">

View file

@ -7,9 +7,6 @@ Process.setrlimit Process::RLIMIT_AS, 640*1024*1024, Process::RLIM_INFINITY
# you don't control web/app server and can't set it the proper way
ENV['RAILS_ENV'] ||= 'production'
# Don't add asset tags
ENV["RAILS_ASSET_ID"] = ''
# Specifies gem version of Rails to use when vendor/rails is not present
RAILS_GEM_VERSION = '1.2.3'
@ -77,6 +74,24 @@ end
# inflect.uncountable %w( fish sheep )
# end
# Hack the AssetTagHelper to make asset tagging work better
module ActionView
module Helpers
module AssetTagHelper
private
alias :old_compute_public_path :compute_public_path
def compute_public_path(source, dir, ext)
path = old_compute_public_path(source, dir, ext)
if path =~ /(.+)\?(\d+)\??$/
path = "#{$1}/#{$2}"
end
path
end
end
end
end
# Set to :readonly to put the API in read-only mode or :offline to
# take it completely offline
API_STATUS = :online

View file

@ -7,6 +7,7 @@ server.modules = (
"mod_cgi",
"mod_compress",
"mod_evasive",
"mod_expire",
"mod_fastcgi",
"mod_redirect",
"mod_status"
@ -78,6 +79,16 @@ compress.filetype = (
"text/plain"
)
#
# Set expiry for static content
#
expire.url = (
"/images/" => "access 10 years",
"/javascripts/" => "access 10 years",
"/openlayers/" => "access 10 years",
"/stylesheets/" => "access 10 years"
)
#
# Cache compressed content
#