aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Contributions/cmds
diff options
context:
space:
mode:
authorMax Howell2012-08-21 11:39:45 -0400
committerMax Howell2012-08-21 12:09:05 -0400
commit9274f7cda1e2261e581979887ca15ba41fef6bd9 (patch)
treee5f477ee0b69111b496987e9c19d9419b6693305 /Library/Contributions/cmds
parentc5266654ff1ff31ff9a53ce2098c7423e0449c19 (diff)
downloadbrew-9274f7cda1e2261e581979887ca15ba41fef6bd9.tar.bz2
Formula.Enumerable
Deprecated Formula.all, replaced usage with more appropriate enumerable options. Just check out how much nicer `brew audit` runs now.
Diffstat (limited to 'Library/Contributions/cmds')
-rwxr-xr-xLibrary/Contributions/cmds/brew-leaves.rb2
-rwxr-xr-xLibrary/Contributions/cmds/brew-server4
2 files changed, 3 insertions, 3 deletions
diff --git a/Library/Contributions/cmds/brew-leaves.rb b/Library/Contributions/cmds/brew-leaves.rb
index d2cc2a3ae..068fb21df 100755
--- a/Library/Contributions/cmds/brew-leaves.rb
+++ b/Library/Contributions/cmds/brew-leaves.rb
@@ -6,7 +6,7 @@ require 'formula'
def get_used_by
used_by = {}
- Formula.all.each do |f|
+ Formula.each do |f|
next if f.deps == nil
f.deps.each do |dep|
diff --git a/Library/Contributions/cmds/brew-server b/Library/Contributions/cmds/brew-server
index fe81ea64c..435a4abfa 100755
--- a/Library/Contributions/cmds/brew-server
+++ b/Library/Contributions/cmds/brew-server
@@ -151,7 +151,7 @@ get '/formula/:name' do
end
end
- used_by = Formula.all.select{|ff| ff.deps.include?(klass.name)}.map{|f| f.name}.flatten.uniq.sort
+ used_by = Formula.select{|ff| ff.deps.include?(klass.name)}.map{|f| f.name}.flatten.uniq.sort
unless used_by.empty?
s << <<-HTML
<dt>Used by</td>
@@ -174,7 +174,7 @@ end
def installed_formulas
- Formula.all.select{|formula| formula.installed?}
+ Formula.select{|formula| formula.installed?}
end
get '/installed' do