From 838e25085abd07de3f1b04df1c3b6536facebfa9 Mon Sep 17 00:00:00 2001 From: Ben Hollis Date: Sat, 28 Jun 2014 21:00:59 -0700 Subject: [PATCH] Munge build path so that path_match works against it in gzip extension --- middleman-core/lib/middleman-core/extensions/gzip.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/middleman-core/lib/middleman-core/extensions/gzip.rb b/middleman-core/lib/middleman-core/extensions/gzip.rb index 915b40b3..bb009ece 100644 --- a/middleman-core/lib/middleman-core/extensions/gzip.rb +++ b/middleman-core/lib/middleman-core/extensions/gzip.rb @@ -105,6 +105,7 @@ class Middleman::Extensions::Gzip < ::Middleman::Extension # @param [Pathname] path A destination path # @return [Boolean] def should_gzip?(path) + path = path.sub app.config[:build_dir] + '/', '' options.exts.include?(path.extname) && options.ignore.none? { |ignore| Middleman::Util.path_match(ignore, path.to_s) } end end