playframework/playframework — pull request #2740 by jroper (2014-04-30 00:46:04+00:00)
Title: Added a reverse route context

This is made available whenever a PathBindable is implicitly required, so that PathBindables can look at the context and get information about the route they are binding.

The context contains all the fixed parameters for the route, this allows an asset path bindable, that wants to put a hash of the asset in the path, to lookup the value of the "path" parameter to find that the assets live at "/public", for example.

As a method of testing/validating this, I created a new Assets.Asset class, a new Assets.versioned route, and I modified the integrationtest project to use it. I didn't actually implement the fingerprinting of the asset URL, that depends on other things, but it's a start.