From d99ddec85bf86beb28ee027934d471a39e9b7fd1 Mon Sep 17 00:00:00 2001 From: tdreyno Date: Wed, 28 Oct 2009 10:51:25 -0700 Subject: [PATCH] fix cache buster --- lib/middleman/features/cache_buster.rb | 2 +- lib/middleman/sass.rb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/middleman/features/cache_buster.rb b/lib/middleman/features/cache_buster.rb index bc019be8..c43b9d6a 100644 --- a/lib/middleman/features/cache_buster.rb +++ b/lib/middleman/features/cache_buster.rb @@ -11,7 +11,7 @@ class << Middleman::Base rescue end - real_path = File.join(self.environment == "build" ? self.build_dir : self.public, prefix, path) + real_path = File.join(self.public, prefix, path) http_path << "?" + File.mtime(real_path).strftime("%s") if File.readable?(real_path) http_path end diff --git a/lib/middleman/sass.rb b/lib/middleman/sass.rb index 2226ef8d..70a22a00 100644 --- a/lib/middleman/sass.rb +++ b/lib/middleman/sass.rb @@ -83,6 +83,7 @@ class Middleman::Base if self.cache_buster? config.asset_cache_buster do |path, real_path| + # real_path = real_path.gsub(self.build_dir, self.public) if File.readable?(real_path) File.mtime(real_path).strftime("%s") else