Giter Club home page Giter Club logo

paperclip-deflater's Introduction

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.

paperclip-deflater's People

Contributors

dtaniwaki avatar

Stargazers

 avatar Johnwook Choi avatar ku KUMAGAI avatar Wellington Torrejais da Silva avatar ali avatar Töre Serter avatar Satoshi Namai avatar Daniel Rikowski avatar Ricardo Pontes avatar Flávio M. Oota avatar James Huynh avatar Chris Lusted avatar Mika Cohen avatar Walter Lee Davis avatar Jose Luis Salas avatar murajun1978 avatar  avatar

Watchers

James Cloos avatar murajun1978 avatar  avatar Daniel Rikowski avatar  avatar

paperclip-deflater's Issues

Ruby 2.5 support?

Gemspec on release 0.1.4 establishes that ruby 2.5 would be supported, but this is restricted in 0.1.5.

Is Ruby 2.5 supported after all?

Gzip file not being created when json file contains an empty array

I'm building a set of files and storing them in S3. I'm using this gem to store and serve a gzip'd version of it but for some reason, if the file has an empty array, the gzip does not get created.
The original is still there.

This seems to be happening since updated to lates version of paperclip, but does not make much sense that they have anything to do with it directly.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.