From 4002abb1469f19b182f2e2af5d27b55f3700fef1 Mon Sep 17 00:00:00 2001 From: Jack Nagel <jacknagel@gmail.com> Date: Thu, 27 Feb 2014 12:56:59 -0600 Subject: [PATCH] deps: use Dependency objects in recursive_deps_tree --- Library/Homebrew/cmd/deps.rb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Library/Homebrew/cmd/deps.rb b/Library/Homebrew/cmd/deps.rb index bc402dd84c..bd73b20e37 100644 --- a/Library/Homebrew/cmd/deps.rb +++ b/Library/Homebrew/cmd/deps.rb @@ -56,13 +56,12 @@ module Homebrew extend self end def recursive_deps_tree f, level - f.requirements.each do |requirement| - next unless requirement.default_formula? - puts "| "*(level-1)+"|- :"+requirement.class.default_formula.to_s + f.requirements.select(&:default_formula?).each do |req| + puts "| "*(level-1) + "|- :#{req.to_dependency.name}" end f.deps.default.each do |dep| - puts "| "*(level-1)+"|- "+dep.to_s - recursive_deps_tree(Formula.factory(dep.to_s), level+1) + puts "| "*(level-1) + "|- #{dep.name}" + recursive_deps_tree(Formulary.factory(dep.name), level+1) end end end -- GitLab