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.60.17 templates/nanoc/lib/gzip_filter.rb
origen-0.60.16 templates/nanoc/lib/gzip_filter.rb
origen-0.60.14 templates/nanoc/lib/gzip_filter.rb
origen-0.60.13 templates/nanoc/lib/gzip_filter.rb
origen-0.60.12 templates/nanoc/lib/gzip_filter.rb
origen-0.60.11 templates/nanoc/lib/gzip_filter.rb
origen-0.60.10 templates/nanoc/lib/gzip_filter.rb
origen-0.60.9 templates/nanoc/lib/gzip_filter.rb
origen-0.60.8 templates/nanoc/lib/gzip_filter.rb
origen-0.60.7 templates/nanoc/lib/gzip_filter.rb
origen-0.60.6 templates/nanoc/lib/gzip_filter.rb
origen-0.60.5 templates/nanoc/lib/gzip_filter.rb
origen-0.60.4 templates/nanoc/lib/gzip_filter.rb
origen-0.60.3 templates/nanoc/lib/gzip_filter.rb
origen-0.60.2 templates/nanoc/lib/gzip_filter.rb
origen-0.60.1 templates/nanoc/lib/gzip_filter.rb
origen-0.60.0 templates/nanoc/lib/gzip_filter.rb
origen-0.59.8 templates/nanoc/lib/gzip_filter.rb
origen-0.59.7 templates/nanoc/lib/gzip_filter.rb
origen-0.59.6 templates/nanoc/lib/gzip_filter.rb