module Sprockets::PathUtils
def find_upwards(basename, path, root = nil)
root - String path to stop at (default: system root)
path - String path to start search: "app/assets/javascripts/app.js"
basename - String filename: ".sprocketsrc"
Internal: Find target basename checking upwards from path.
def find_upwards(basename, path, root = nil) path_parents(path, root).each do |dir| filename = File.join(dir, basename) return filename if file?(filename) end nil end