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.42.0 templates/nanoc/lib/gzip_filter.rb
origen-0.41.2 templates/nanoc/lib/gzip_filter.rb
origen-0.41.1 templates/nanoc/lib/gzip_filter.rb
origen-0.41.0 templates/nanoc/lib/gzip_filter.rb
origen-0.40.2 templates/nanoc/lib/gzip_filter.rb
origen-0.40.1 templates/nanoc/lib/gzip_filter.rb
origen-0.40.0 templates/nanoc/lib/gzip_filter.rb
origen-0.38.0 templates/nanoc/lib/gzip_filter.rb
origen-0.37.0 templates/nanoc/lib/gzip_filter.rb
origen-0.36.1 templates/nanoc/lib/gzip_filter.rb
origen-0.36.0 templates/nanoc/lib/gzip_filter.rb
origen-0.35.1 templates/nanoc/lib/gzip_filter.rb
origen-0.35.0 templates/nanoc/lib/gzip_filter.rb
origen-0.34.3 templates/nanoc/lib/gzip_filter.rb
origen-0.34.2 templates/nanoc/lib/gzip_filter.rb
origen-0.34.1 templates/nanoc/lib/gzip_filter.rb
origen-0.34.0 templates/nanoc/lib/gzip_filter.rb
origen-0.33.3 templates/nanoc/lib/gzip_filter.rb
origen-0.33.2 templates/nanoc/lib/gzip_filter.rb
origen-0.33.1 templates/nanoc/lib/gzip_filter.rb