No release in over 3 years
Low commit activity in last 3 years
Deflate Processor for Paperclip
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 0.8
< 13, >= 10.0
< 4, >= 3.0
~> 0.12

Runtime

< 6.0, >= 3.4
 Project Readme

paperclip-deflater

Gem Version Dependency Status Build Status Coverage Status Code Climate

Deflate files in Paperclip before upload.

Installation

Add the paperclip-deflater gem to your Gemfile.

gem "paperclip-deflater"

And run bundle install.

Setup

class Something < ActiveRecord::Base
  has_attached_file :js,
    styles: {
      gzip: {
        processors: [:gzip],
        format: 'js.gz',
        s3_headers: { content_type: 'application/javascript', content_encoding: 'gzip' },
      }
    },
    path: "test/:id.:extension"
end

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Copyright

Copyright (c) 2014 Daisuke Taniwaki. See LICENSE for details.