class Sprockets::Base

def each_entry(root, &block)

def each_entry(root, &block)
  return to_enum(__method__, root) unless block_given?
  root = Pathname.new(root) unless root.is_a?(Pathname)
  paths = []
  entries(root).sort.each do |filename|
    path = root.join(filename)
    paths << path
    if stat(path).directory?
      each_entry(path) do |subpath|
        paths << subpath
      end
    end
  end
  paths.sort_by(&:to_s).each(&block)
  nil
end