sprockets

https://github.com/rails/sprockets

Ruby

Rack-based asset packaging system

Sprockets::Utils::Gzip#compress

Private: Generates a gzipped file based off of reference asset.

Compresses the target asset's contents and puts it into a file with
the same name plus a `.gz` extension in the same folder as the original.
Does not modify the target asset.

Returns nothing.

Source | Google | Stack overflow

Edit

git clone [email protected]:rails/sprockets.git

cd sprockets

open lib/sprockets/utils/gzip.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Sprockets--Utils--Gzip-compress-for-pr


# Commit to git

git add lib/sprockets/utils/gzip.rbgit commit -m "better docs for Sprockets::Utils::Gzip#compress"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Sprockets--Utils--Gzip-compress-for-pr

hub pull-request


# Celebrate!