Sha256: 993e27fb885ba0ff85618f6dc35abd7beab5475b8d1e58c74c4b4e4362272cfa

Contents?: true

Size: 324 Bytes

Versions: 205

Compression:

Stored size: 324 Bytes

Contents

require "zlib"

class GzipFilter < Nanoc::Filter
  identifier :gzip

  type text: :binary

  def run(content, params = {})
    Zlib::GzipWriter.open(output_filename, Zlib::BEST_COMPRESSION) do |gz|
      gz.orig_name = "index.html"
      gz.mtime = File.mtime(item[:filename]).to_i
      gz.write content
    end
  end

end

Version data entries

205 entries across 205 versions & 1 rubygems

Version Path
origen-0.33.0 templates/nanoc/lib/gzip_filter.rb
origen-0.32.1 templates/nanoc/lib/gzip_filter.rb
origen-0.32.0 templates/nanoc/lib/gzip_filter.rb
origen-0.31.0 templates/nanoc/lib/gzip_filter.rb
origen-0.30.0 templates/nanoc/lib/gzip_filter.rb
origen-0.29.0 templates/nanoc/lib/gzip_filter.rb
origen-0.28.2 templates/nanoc/lib/gzip_filter.rb
origen-0.28.1 templates/nanoc/lib/gzip_filter.rb
origen-0.28.0 templates/nanoc/lib/gzip_filter.rb
origen-0.27.0 templates/nanoc/lib/gzip_filter.rb
origen-0.26.0 templates/nanoc/lib/gzip_filter.rb
origen-0.25.1 templates/nanoc/lib/gzip_filter.rb
origen-0.25.0 templates/nanoc/lib/gzip_filter.rb
origen-0.24.0 templates/nanoc/lib/gzip_filter.rb
origen-0.23.0 templates/nanoc/lib/gzip_filter.rb
origen-0.22.0 templates/nanoc/lib/gzip_filter.rb
origen-0.21.0 templates/nanoc/lib/gzip_filter.rb
origen-0.20.3 templates/nanoc/lib/gzip_filter.rb
origen-0.20.2 templates/nanoc/lib/gzip_filter.rb
origen-0.20.1 templates/nanoc/lib/gzip_filter.rb