aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2013-04-06 22:10:33 -0500
committerJack Nagel2013-04-06 22:10:33 -0500
commit7f55a6089e4761646579b6fb3fc7c6a5720a70b4 (patch)
tree2302d5d4aaf568b5b0e473e44b51a9f6ddc7a13e /Library
parentd4a8813e86bed47036dd6792424448021a8ff272 (diff)
downloadbrew-7f55a6089e4761646579b6fb3fc7c6a5720a70b4.tar.bz2
audit: clean up URL audits
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/audit.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb
index 1504b4fe0..8523102a8 100644
--- a/Library/Homebrew/cmd/audit.rb
+++ b/Library/Homebrew/cmd/audit.rb
@@ -94,6 +94,7 @@ class FormulaAuditor
@f = f
@problems = []
@text = f.text.without_patch
+ @specs = %w{stable devel head}.map { |s| f.send(s) }.compact
# We need to do this in case the formula defines a patch that uses DATA.
f.class.redefine_const :DATA, ""
@@ -196,7 +197,7 @@ class FormulaAuditor
problem "GitHub pages should use the github.io domain (url is #{f.homepage})"
end
- urls = [(f.stable.url rescue nil), (f.devel.url rescue nil), (f.head.url rescue nil)].compact
+ urls = @specs.map(&:url)
# Check GNU urls; doesn't apply to mirrors
urls.grep(%r[^(?:https?|ftp)://(?!alpha).+/gnu/]).each do |u|
@@ -204,7 +205,7 @@ class FormulaAuditor
end
# the rest of the checks apply to mirrors as well
- urls.concat([(f.stable.mirrors rescue nil), (f.devel.mirrors rescue nil)].flatten.compact)
+ urls.concat(@specs.map(&:mirrors).flatten)
# Check SourceForge urls
urls.each do |p|