module Sprockets::PathUtils
def path_parents(path, root = nil)
root - String path to stop at (default: system root)
path - String absolute filename or directory
Internal: Returns all parents for path
def path_parents(path, root = nil) root = "#{root}#{File::SEPARATOR}" if root parents = [] loop do parent = File.dirname(path) break if parent == path break if root && !path.start_with?(root) parents << path = parent end parents end