From 15e91f2da94e22a5559615495e47557d7bc028db Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Tue, 3 Jun 2014 16:46:32 -0400 Subject: [PATCH] FIX: detect css changes in plugins that use register_css --- lib/sass/discourse_stylesheets.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/sass/discourse_stylesheets.rb b/lib/sass/discourse_stylesheets.rb index 16b3f6b133f..94d18886cc1 100644 --- a/lib/sass/discourse_stylesheets.rb +++ b/lib/sass/discourse_stylesheets.rb @@ -42,8 +42,11 @@ class DiscourseStylesheets end def self.max_file_mtime - [ Dir.glob("#{Rails.root}/app/assets/stylesheets/**/*.*css").map {|x| File.mtime(x) }.max, - Dir.glob("#{Rails.root}/plugins/**/assets/stylesheets/**/*.*css").map {|x| File.mtime(x) }.max ].compact.max.to_i + [ "#{Rails.root}/app/assets/stylesheets/**/*.*css", + "#{Rails.root}/plugins/**/*.*css", + "#{Rails.root}/plugins/**/plugin.rb" ].map do |pattern| + Dir.glob(pattern).map { |x| File.mtime(x) }.max + end.compact.max.to_i end