move stylesheet cache into the upload dir so its less crazy to sync across servers

This commit is contained in:
Sam Saffron 2013-02-19 11:02:00 +11:00
parent 3be7bde401
commit d520771c73
3 changed files with 3 additions and 5 deletions

View file

@ -7,9 +7,6 @@ Discourse.Onebox = (->
cache = (url, contents) ->
localCache[url] = contents
#if localStorage && localStorage.setItem
# localStorage.setItme
null
lookupCache = (url) ->

View file

@ -1,7 +1,8 @@
class SiteCustomization < ActiveRecord::Base
ENABLED_KEY = '7e202ef2-56d7-47d5-98d8-a9c8d15e57dd'
CACHE_PATH = 'stylesheet-cache'
# placing this in uploads to ease deployment rules
CACHE_PATH = 'uploads/stylesheet-cache'
@lock = Mutex.new
before_create do

View file

@ -58,7 +58,7 @@ describe SiteCustomization do
it 'should allow me to lookup a filename containing my preview stylesheet' do
SiteCustomization.custom_stylesheet(customization.key).should ==
"<link class=\"custom-css\" rel=\"stylesheet\" href=\"/stylesheet-cache/#{customization.key}.css?#{customization.stylesheet_hash}\" type=\"text/css\" media=\"screen\">"
"<link class=\"custom-css\" rel=\"stylesheet\" href=\"/uploads/stylesheet-cache/#{customization.key}.css?#{customization.stylesheet_hash}\" type=\"text/css\" media=\"screen\">"
end
it 'should fix stylesheet files after changing the stylesheet' do