I will try to get the ball to roll, but I will need to do much more to test or give a better answer, so I will mark this answer with the wiki community. . others may reply below and / or edit this post.
I needed to create asset pipelining for Sinatra and, generally speaking, in the latest versions of Sprockets (which are used to convey assets in Rails), the Sprockets::Asset
class has methods for getting the path and the logical path .
I believe that Rails uses the asset_path helper to create a public return URL from the Sprockets class. This, in turn, uses the AssetPaths#compute_public_path
instance method. A good first step would be to modify these parts of the code to add the source_url
parameter based on the parsing of source.pathname
. It is assumed that the source is an instance of Sprockets::Asset
in one form or another.
source share