module Sprockets::URIUtils
def split_file_uri(uri)
uri - String uri
Internal: Parse file: URI into component parts.
def split_file_uri(uri) scheme, _, host, _, _, path, _, query, _ = URI.split(uri) path = URI::Generic::DEFAULT_PARSER.unescape(path) path.force_encoding(Encoding::UTF_8) # Hack for parsing Windows "file:///C:/Users/IEUser" paths path.gsub!(/^\/([a-zA-Z]:)/, '\1') [scheme, host, path, query] end