zakird / wkhtmltopdf_binary_gem

Ruby gem containing easily installable access to wkhtmltopdf application
https://rubygems.org/gems/wkhtmltopdf-binary
Apache License 2.0
184 stars 346 forks source link

Add removal of the gzipped binaries in the gem native extension build step #92

Closed tioteath closed 3 years ago

tioteath commented 4 years ago

In this PR:

Added code which removes gzipped binaries from the bin directory during gem native extension build step. This allows to reduce a footprint of the installed gem from almost 280MB to about 47MB.

I have tested it on Ubuntu Bionic 18.04, Ubuntu Focal 20.04 and Debian Buster 10.

fixes #55

kreintjes commented 3 years ago

@tioteath I get two warnings when running bundle:

/Users/kevin/.rbenv/versions/2.6.6/lib/ruby/2.6.0/rubygems/ext/builder.rb:183: warning: conflicting chdir during another chdir block
/Users/kevin/.rbenv/versions/2.6.6/lib/ruby/2.6.0/rubygems/ext/builder.rb:191: warning: conflicting chdir during another chdir block

Otherwise it works great, also on Heroku. Thanks! It appears it is not even necessary to set WKHTMLTOPDF_GEM_MINIMIZE, because my slug size on Heroku reduced greatly even without this env var.

Does anyone know why this PR isn't getting merged?