Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Enable to handle over in options the regexp determining which files t…

…o gzip.
  • Loading branch information...
commit 8e727ecea1dba086a95d94aa3b655f277af10b7a 1 parent 199dcae
@r-stu31 r-stu31 authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  actionpack/lib/sprockets/static_compiler.rb
View
3  actionpack/lib/sprockets/static_compiler.rb
@@ -11,6 +11,7 @@ def initialize(env, target, paths, options = {})
@digest = options.key?(:digest) ? options.delete(:digest) : true
@manifest = options.key?(:manifest) ? options.delete(:manifest) : true
@manifest_path = options.delete(:manifest_path) || target
+ @zip_files = options.delete(:zip_files) || /\.(css|js)$/
end
def compile
@@ -36,7 +37,7 @@ def write_asset(asset)
filename = File.join(target, path)
FileUtils.mkdir_p File.dirname(filename)
asset.write_to(filename)
- asset.write_to("#{filename}.gz") if filename.to_s =~ /\.(css|js)$/
+ asset.write_to("#{filename}.gz") if filename.to_s =~ @zip_files
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.