Merge pull request #309 from bhollis/gzip

Rename gzip_assets to just gzip since it does HTML too
This commit is contained in:
Thomas Reynolds 2012-03-13 08:52:47 -07:00
commit 40a5c619a4
3 changed files with 6 additions and 6 deletions

View file

@ -1 +1 @@
activate :gzip_assets activate :gzip

View file

@ -45,8 +45,8 @@ module Middleman
# MinifyJavascript uses the YUI compressor to shrink JS files # MinifyJavascript uses the YUI compressor to shrink JS files
autoload :MinifyJavascript, "middleman-more/extensions/minify_javascript" autoload :MinifyJavascript, "middleman-more/extensions/minify_javascript"
# GZIP assets during build # GZIP assets and pages during build
autoload :GzipAssets, "middleman-more/extensions/gzip_assets" autoload :Gzip, "middleman-more/extensions/gzip"
end end
# Setup renderers # Setup renderers

View file

@ -4,8 +4,8 @@ require 'find'
module Middleman::Extensions module Middleman::Extensions
# This extension Gzips assets when building. # This extension Gzips assets and pages when building.
# Gzipped assets can be served directly by Apache or # Gzipped assets and pages can be served directly by Apache or
# Nginx with the proper configuration, and pre-zipping means that we # Nginx with the proper configuration, and pre-zipping means that we
# can use a more agressive compression level at no CPU cost per request. # can use a more agressive compression level at no CPU cost per request.
# #
@ -15,7 +15,7 @@ module Middleman::Extensions
# Pass the :exts options to customize which file extensions get zipped (defaults # Pass the :exts options to customize which file extensions get zipped (defaults
# to .html, .htm, .js and .css. # to .html, .htm, .js and .css.
# #
module GzipAssets module Gzip
class << self class << self
def registered(app, options={}) def registered(app, options={})
exts = options[:exts] || %w(.js .css .html .htm) exts = options[:exts] || %w(.js .css .html .htm)