sprockets

https://github.com/rails/sprockets

Ruby

Rack-based asset packaging system

Sprockets::UnloadedAsset#dependency_history_key

Public: Dependency History key

Used to retrieve an array of "histories" each of which contains a set of stored dependencies
for a given asset path and filename digest.

A dependency can refer to either an asset e.g. index.js
may rely on jquery.js (so jquery.js is a dependency), or other factors that may affect
compilation, such as the VERSION of Sprockets (i.e. the environment) and what "processors"
are used.

For example a history array with one Set of dependencies may look like:

[["environment-version", "environment-paths", "processors:type=text/css&file_type=text/css",
  "file-digest:///Full/path/app/assets/stylesheets/application.css",
  "processors:type=text/css&file_type=text/css&pipeline=self",
  "file-digest:///Full/path/app/assets/stylesheets"]]

This method of asset lookup is used to ensure that none of the dependencies have been modified
since last lookup. If one of them has, the key will be different and a new entry must be stored.

URI dependencies are later converted to "compressed" paths

Returns a String.

Source | Google | Stack overflow

Edit

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

cd sprockets

open lib/sprockets/unloaded_asset.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Sprockets--UnloadedAsset-dependency_history_key-for-pr


# Commit to git

git add lib/sprockets/unloaded_asset.rbgit commit -m "better docs for Sprockets::UnloadedAsset#dependency_history_key"


# 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--UnloadedAsset-dependency_history_key-for-pr

hub pull-request


# Celebrate!