class Berkshelf::Uploader
def lookup_dependencies(cookbook, checked = {})
-
(Array
-)
def lookup_dependencies(cookbook, checked = {}) Berkshelf.log.debug " Looking up dependencies for #{cookbook}" dependencies = [] lockfile.graph.find(cookbook).dependencies.each do |name, _| next if checked[name] # break cyclic graphs checked[name] = true # this is your standard depth-first tree traversal with the deps first... dependencies += lookup_dependencies(name, checked) # ..then the node itself dependencies << name end dependencies end