module Sprockets::URIUtils

def parse_asset_uri(uri)

Returns String path and Hash of symbolized parameters.

uri - String asset URI

# => "/tmp/js/application.coffee", {type: "application/javascript"}
parse("file:///tmp/js/application.coffee?type=application/javascript")

Examples

Internal: Parse Asset URI.
def parse_asset_uri(uri)
  scheme, _, path, query = split_file_uri(uri)
  unless scheme == 'file'
    raise URI::InvalidURIError, "expected file:// scheme: #{uri}"
  end
  return path, parse_uri_query_params(query)
end