audit: catch new style gist URLs

This commit is contained in:
Jack Nagel 2014-03-19 18:21:14 -05:00
parent 9bbe38aa59
commit dc8218fdb5

View File

@ -304,7 +304,8 @@ class FormulaAuditor
def audit_patch(patch) def audit_patch(patch)
case patch.url case patch.url
when %r[raw\.github\.com], %r[gist\.github\.com/raw], %r[gist\.github\.com/.+/raw] when %r[raw\.github\.com], %r[gist\.github\.com/raw], %r[gist\.github\.com/.+/raw],
%r[gist\.githubusercontent\.com/.+/raw]
unless patch.url =~ /[a-fA-F0-9]{40}/ unless patch.url =~ /[a-fA-F0-9]{40}/
problem "GitHub/Gist patches should specify a revision:\n#{patch.url}" problem "GitHub/Gist patches should specify a revision:\n#{patch.url}"
end end