audit: don't try to HTTP check non-HTTP content.
This commit is contained in:
parent
b984be675d
commit
1284f29561
@ -175,6 +175,8 @@ class FormulaAuditor
|
|||||||
end
|
end
|
||||||
|
|
||||||
def self.check_http_content(url, user_agents: [:default])
|
def self.check_http_content(url, user_agents: [:default])
|
||||||
|
return unless url.start_with? "http"
|
||||||
|
|
||||||
details = nil
|
details = nil
|
||||||
user_agent = nil
|
user_agent = nil
|
||||||
user_agents.each do |ua|
|
user_agents.each do |ua|
|
||||||
|
|||||||
@ -419,9 +419,8 @@ class FormulaAuditorTests < Homebrew::TestCase
|
|||||||
EOS
|
EOS
|
||||||
|
|
||||||
fa.audit_homepage
|
fa.audit_homepage
|
||||||
assert_equal ["The homepage should start with http or https " \
|
assert_equal ["The homepage should start with http or https (URL is #{fa.formula.homepage})."],
|
||||||
"(URL is #{fa.formula.homepage}).", "The homepage #{fa.formula.homepage} is not reachable " \
|
fa.problems
|
||||||
"(HTTP status code 000)"], fa.problems
|
|
||||||
|
|
||||||
formula_homepages = {
|
formula_homepages = {
|
||||||
"bar" => "http://www.freedesktop.org/wiki/bar",
|
"bar" => "http://www.freedesktop.org/wiki/bar",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user