sprockets
https://github.com/rails/sprockets
Ruby
Rack-based asset packaging system
Sprockets::URITar#compress
Internal: Converts full uri to a "compressed" uri If a uri is inside of an environment's root it will be shortened to be a relative path. If a uri is outside of the environment's root the original uri will be returned. Returns String
Edit
git clone [email protected]:rails/sprockets.git
cd sprockets
open lib/sprockets/uri_tar.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Sprockets--URITar-compress-for-pr
# Commit to gitgit add lib/sprockets/uri_tar.rbgit commit -m "better docs for Sprockets::URITar#compress"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Sprockets--URITar-compress-for-pr
hub pull-request
# Celebrate!