aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/dev-cmd
diff options
context:
space:
mode:
authorMike McQuaid2017-03-18 17:02:08 +0200
committerMike McQuaid2017-03-20 18:20:31 +0200
commit80e95b684e7485b5c5b7f7209dd95b0bdc9e3406 (patch)
tree421290914f160363cf4333477eee6b3efbdfc982 /Library/Homebrew/dev-cmd
parent623c95b3f8660d5c77936483ec9b9a4db16aff00 (diff)
downloadbrew-80e95b684e7485b5c5b7f7209dd95b0bdc9e3406.tar.bz2
blacklist: move to missing_formula class instead.
This will allow extending this class so it can be used by more than just blacklisting.
Diffstat (limited to 'Library/Homebrew/dev-cmd')
-rw-r--r--Library/Homebrew/dev-cmd/audit.rb4
-rw-r--r--Library/Homebrew/dev-cmd/create.rb6
2 files changed, 5 insertions, 5 deletions
diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb
index 677a52447..70104e0cb 100644
--- a/Library/Homebrew/dev-cmd/audit.rb
+++ b/Library/Homebrew/dev-cmd/audit.rb
@@ -38,7 +38,7 @@ require "official_taps"
require "cmd/search"
require "cmd/style"
require "date"
-require "blacklist"
+require "missing_formula"
require "digest"
module Homebrew
@@ -399,7 +399,7 @@ class FormulaAuditor
name = formula.name
full_name = formula.full_name
- if blacklisted?(name)
+ if Homebrew::MissingFormula.blacklisted_reason(name)
problem "'#{name}' is blacklisted."
end
diff --git a/Library/Homebrew/dev-cmd/create.rb b/Library/Homebrew/dev-cmd/create.rb
index 9c58dc71a..6855d6f37 100644
--- a/Library/Homebrew/dev-cmd/create.rb
+++ b/Library/Homebrew/dev-cmd/create.rb
@@ -19,7 +19,7 @@
#: the specified tap.
require "formula"
-require "blacklist"
+require "missing_formula"
require "digest"
require "erb"
@@ -73,8 +73,8 @@ module Homebrew
# Don't allow blacklisted formula, or names that shadow aliases,
# unless --force is specified.
unless ARGV.force?
- if msg = blacklisted?(fc.name)
- raise "#{fc.name} is blacklisted for creation.\n#{msg}\nIf you really want to create this formula use --force."
+ if reason = Homebrew::MissingFormula.blacklisted_reason(fc.name)
+ raise "#{fc.name} is blacklisted for creation.\n#{reason}\nIf you really want to create this formula use --force."
end
if Formula.aliases.include? fc.name