From d520771c736fe7da47180af2d4d0ebcd13e7af63 Mon Sep 17 00:00:00 2001 From: Sam Saffron Date: Tue, 19 Feb 2013 11:02:00 +1100 Subject: [PATCH] move stylesheet cache into the upload dir so its less crazy to sync across servers --- app/assets/javascripts/discourse/models/onebox.js.coffee | 3 --- app/models/site_customization.rb | 3 ++- spec/models/site_customization_spec.rb | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/app/assets/javascripts/discourse/models/onebox.js.coffee b/app/assets/javascripts/discourse/models/onebox.js.coffee index f82d1d1a651..815d8b25e17 100644 --- a/app/assets/javascripts/discourse/models/onebox.js.coffee +++ b/app/assets/javascripts/discourse/models/onebox.js.coffee @@ -7,9 +7,6 @@ Discourse.Onebox = (-> cache = (url, contents) -> localCache[url] = contents - - #if localStorage && localStorage.setItem - # localStorage.setItme null lookupCache = (url) -> diff --git a/app/models/site_customization.rb b/app/models/site_customization.rb index ed19ada587b..fe338c8ff00 100644 --- a/app/models/site_customization.rb +++ b/app/models/site_customization.rb @@ -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 diff --git a/spec/models/site_customization_spec.rb b/spec/models/site_customization_spec.rb index 004e71e4d0f..0b4b50a5016 100644 --- a/spec/models/site_customization_spec.rb +++ b/spec/models/site_customization_spec.rb @@ -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 == - "" + "" end it 'should fix stylesheet files after changing the stylesheet' do