module Sprockets::Resolve
def resolve_under_paths(paths, logical_name, accepts)
def resolve_under_paths(paths, logical_name, accepts) all_deps = Set.new return nil, nil, all_deps if accepts.empty? logical_basename = File.basename(logical_name) paths.each do |load_path| candidates, deps = path_matches(load_path, logical_name, logical_basename) all_deps.merge(deps) candidate = find_best_q_match(accepts, candidates) do |c, matcher| match_mime_type?(c[1] || "application/octet-stream", matcher) end return candidate + [all_deps] if candidate end return nil, nil, all_deps end