mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 09:36:19 -05:00
move stylesheet cache into the upload dir so its less crazy to sync across servers
This commit is contained in:
parent
3be7bde401
commit
d520771c73
3 changed files with 3 additions and 5 deletions
|
@ -7,9 +7,6 @@ Discourse.Onebox = (->
|
|||
|
||||
cache = (url, contents) ->
|
||||
localCache[url] = contents
|
||||
|
||||
#if localStorage && localStorage.setItem
|
||||
# localStorage.setItme
|
||||
null
|
||||
|
||||
lookupCache = (url) ->
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue