module Sprockets::Resolve
def resolve_relative_path(paths, path, dirname, accept)
e.g. "application/javascript" or "text/css, */*"
mime types that we are looking for. Can be nil.
accept - String. A Quality value incoded set of
dirname - String. Base path where we start looking for the given file.
e.g. "./jquery" or "../foo.js"
path - String. A relative filename with or without extension
paths - Array of Strings.
Internal: Finds a relative file in a set of given paths
def resolve_relative_path(paths, path, dirname, accept) filename = File.expand_path(path, dirname) load_path, _ = PathUtils.paths_split(paths, dirname) if load_path && logical_path = PathUtils.split_subpath(load_path, filename) resolve_logical_path([load_path], logical_path, accept) else return nil, nil, nil, Set.new end end