sprockets

https://github.com/rails/sprockets

Ruby

Rack-based asset packaging system

Sprockets::Server#call

`call` implements the Rack 1.x specification which accepts an
`env` Hash and returns a three item tuple with the status code,
headers, and body.

Mapping your environment at a url prefix will serve all assets
in the path.

    map "/assets" do
      run Sprockets::Environment.new
    end

A request for `"/assets/foo/bar.js"` will search your
environment for `"foo/bar.js"`.

Source | Google | Stack overflow

Edit

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

cd sprockets

open lib/sprockets/server.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Sprockets--Server-call-for-pr


# Commit to git

git add lib/sprockets/server.rbgit commit -m "better docs for Sprockets::Server#call"


# 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--Server-call-for-pr

hub pull-request


# Celebrate!