sprockets

https://github.com/rails/sprockets

Ruby

Rack-based asset packaging system

Sprockets::URITar#expand

Internal: Convert a "compressed" uri to an absolute path

If a uri is inside of the environment's root it will not
start with a slash for example:

  file://this/is/a/relative/path

If a uri is outside the root, it will start with a slash:

  file:///This/is/an/absolute/path

Returns String

Source | Google | Stack overflow

Edit

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

cd sprockets

open lib/sprockets/uri_tar.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Sprockets--URITar-expand-for-pr


# Commit to git

git add lib/sprockets/uri_tar.rbgit commit -m "better docs for Sprockets::URITar#expand"


# 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--URITar-expand-for-pr

hub pull-request


# Celebrate!