aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/dev-cmd
diff options
context:
space:
mode:
authorMike McQuaid2017-06-02 22:28:03 +0100
committerMike McQuaid2017-06-02 22:28:07 +0100
commitcbfc83309fd69105fb522e4dd3477f333c89268e (patch)
tree54e0fd320ccbcee3cdf152977dafc0eb3c721765 /Library/Homebrew/dev-cmd
parent0731a68cde75206682ed972beb47930afa3c434e (diff)
downloadbrew-cbfc83309fd69105fb522e4dd3477f333c89268e.tar.bz2
audit: check pypi URLs
#373 implemented as a strict check (thanks nijikon)
Diffstat (limited to 'Library/Homebrew/dev-cmd')
-rw-r--r--Library/Homebrew/dev-cmd/audit.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb
index bf7d2fc79..9d0fa784b 100644
--- a/Library/Homebrew/dev-cmd/audit.rb
+++ b/Library/Homebrew/dev-cmd/audit.rb
@@ -1496,6 +1496,14 @@ class ResourceAuditor
problem "#{u} should be `https://search.maven.org/remotecontent?filepath=#{$1}`"
end
+ # Check pypi urls
+ if @strict
+ urls.each do |p|
+ next unless p =~ %r{^https?://pypi.python.org/(.*)}
+ problem "#{p} should be `https://files.pythonhosted.org/#{$2}`"
+ end
+ end
+
return unless @online
urls.each do |url|
next if !@strict && mirrors.include?(url)