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"`.Edit
git clone [email protected]:rails/sprockets.git
cd sprockets
open lib/sprockets/server.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Sprockets--Server-call-for-pr
# Commit to gitgit add lib/sprockets/server.rbgit commit -m "better docs for Sprockets::Server#call"
# Open pull requestgem 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!