From a0f48619341c2cf6f1980a019bcd4005cf066e21 Mon Sep 17 00:00:00 2001 From: Dominyk Tiller Date: Mon, 9 Oct 2017 16:46:01 +0100 Subject: audit: broaden refute_predicate nudge --- Library/Homebrew/dev-cmd/audit.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Library/Homebrew/dev-cmd') diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb index 200b2597f..4d9000fed 100644 --- a/Library/Homebrew/dev-cmd/audit.rb +++ b/Library/Homebrew/dev-cmd/audit.rb @@ -974,8 +974,8 @@ class FormulaAuditor problem "Use `assert_predicate , :exist?` instead of `#{Regexp.last_match(1)}`" end - if line =~ /assert !File\.exist\?/ - problem "Use `refute_predicate , :exist?` instead of `assert !File.exist?`" + if line =~ /(assert !File\.exist\?|assert !\(.*\)\.exist\?)/ + problem "Use `refute_predicate , :exist?` instead of `#{Regexp.last_match(1)}`" end return unless @strict -- cgit v1.2.3 From 811f5fd145d68393e056b6f6c584bf7a198b6986 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Tue, 10 Oct 2017 13:35:49 +0000 Subject: pull: fix bintray verification failing due to redirection --- Library/Homebrew/dev-cmd/pull.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Library/Homebrew/dev-cmd') diff --git a/Library/Homebrew/dev-cmd/pull.rb b/Library/Homebrew/dev-cmd/pull.rb index 8cb270303..aa3c9a9d7 100644 --- a/Library/Homebrew/dev-cmd/pull.rb +++ b/Library/Homebrew/dev-cmd/pull.rb @@ -560,7 +560,7 @@ module Homebrew req = Net::HTTP::Head.new bottle_info.url req.initialize_http_header "User-Agent" => HOMEBREW_USER_AGENT_RUBY res = http.request req - break if res.is_a?(Net::HTTPSuccess) + break if res.is_a?(Net::HTTPSuccess) || res.code == "302" unless res.is_a?(Net::HTTPClientError) raise "Failed to find published #{f} bottle at #{url} (#{res.code} #{res.message})!" -- cgit v1.2.3 From 0865ab0d1b25c9f6809c07fe6f4c02e71c2f0d27 Mon Sep 17 00:00:00 2001 From: Dominyk Tiller Date: Mon, 9 Oct 2017 16:48:01 +0100 Subject: audit: nudge to use predicate for 'executable?' as well --- Library/Homebrew/dev-cmd/audit.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Library/Homebrew/dev-cmd') diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb index 4d9000fed..a9d27afa9 100644 --- a/Library/Homebrew/dev-cmd/audit.rb +++ b/Library/Homebrew/dev-cmd/audit.rb @@ -978,6 +978,10 @@ class FormulaAuditor problem "Use `refute_predicate , :exist?` instead of `#{Regexp.last_match(1)}`" end + if line =~ /(assert File\.executable\?|assert \(.*\)\.executable\?)/ + problem "Use `assert_predicate , :executable?` instead of `#{Regexp.last_match(1)}`" + end + return unless @strict problem "`#{Regexp.last_match(1)}` in formulae is deprecated" if line =~ /(env :(std|userpaths))/ -- cgit v1.2.3