Munge build path so that path_match works against it in gzip extension

This commit is contained in:
Ben Hollis 2014-06-28 21:00:59 -07:00
parent d7fd48ef7d
commit 838e25085a

View file

@ -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