move stylesheet cache into the upload dir so its less crazy to sync across servers
This commit is contained in:
parent
3be7bde401
commit
d520771c73
|
@ -7,9 +7,6 @@ Discourse.Onebox = (->
|
||||||
|
|
||||||
cache = (url, contents) ->
|
cache = (url, contents) ->
|
||||||
localCache[url] = contents
|
localCache[url] = contents
|
||||||
|
|
||||||
#if localStorage && localStorage.setItem
|
|
||||||
# localStorage.setItme
|
|
||||||
null
|
null
|
||||||
|
|
||||||
lookupCache = (url) ->
|
lookupCache = (url) ->
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
class SiteCustomization < ActiveRecord::Base
|
class SiteCustomization < ActiveRecord::Base
|
||||||
|
|
||||||
ENABLED_KEY = '7e202ef2-56d7-47d5-98d8-a9c8d15e57dd'
|
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
|
@lock = Mutex.new
|
||||||
|
|
||||||
before_create do
|
before_create do
|
||||||
|
|
|
@ -58,7 +58,7 @@ describe SiteCustomization do
|
||||||
|
|
||||||
it 'should allow me to lookup a filename containing my preview stylesheet' do
|
it 'should allow me to lookup a filename containing my preview stylesheet' do
|
||||||
SiteCustomization.custom_stylesheet(customization.key).should ==
|
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
|
end
|
||||||
|
|
||||||
it 'should fix stylesheet files after changing the stylesheet' do
|
it 'should fix stylesheet files after changing the stylesheet' do
|
||||||
|
|
Loading…
Reference in New Issue