From 330e18bb171ebbe778e0909aa419940607c3da54 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Tue, 1 Jul 2014 21:57:30 -0500 Subject: [PATCH] Use predicate methods instead of inspecting the tags array --- Library/Homebrew/cmd/audit.rb | 4 ++-- Library/Homebrew/cxxstdlib.rb | 2 +- Library/Homebrew/requirements/python_dependency.rb | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb index 67d9faec12..ad4132726f 100644 --- a/Library/Homebrew/cmd/audit.rb +++ b/Library/Homebrew/cmd/audit.rb @@ -148,9 +148,9 @@ class FormulaAuditor dep.options.reject do |opt| next true if dep_f.build.has_option?(opt.name) dep_f.requirements.detect do |r| - if r.tags.include? :recommended + if r.recommended? opt.name == "with-#{r.name}" - elsif r.tags.include? :optional + elsif r.optional? opt.name == "without-#{r.name}" end end diff --git a/Library/Homebrew/cxxstdlib.rb b/Library/Homebrew/cxxstdlib.rb index 1ae50c6742..7525f6ab96 100644 --- a/Library/Homebrew/cxxstdlib.rb +++ b/Library/Homebrew/cxxstdlib.rb @@ -38,7 +38,7 @@ class CxxStdlib # Software is unlikely to link against anything from its # buildtime deps, so it doesn't matter at all if they link # against different C++ stdlibs - next if dep.tags.include? :build + next if dep.build? dep_stdlib = Tab.for_formula(dep.to_formula).cxxstdlib if !compatible_with? dep_stdlib diff --git a/Library/Homebrew/requirements/python_dependency.rb b/Library/Homebrew/requirements/python_dependency.rb index e5e75abf7a..d5294c1e34 100644 --- a/Library/Homebrew/requirements/python_dependency.rb +++ b/Library/Homebrew/requirements/python_dependency.rb @@ -14,7 +14,7 @@ class PythonDependency < Requirement end def pour_bottle? - tags.include?(:build) || system_python? + build? || system_python? end def modify_build_environment