From 41a810b2e0bff2ab970ccbfae7f2c6f322b604f0 Mon Sep 17 00:00:00 2001 From: Ruoyu Zhong Date: Wed, 6 Sep 2023 00:03:02 +0800 Subject: [PATCH 1/2] resource_auditor: fix `Utils::Curl` usage Needed after #15940. --- Library/Homebrew/resource_auditor.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/resource_auditor.rb b/Library/Homebrew/resource_auditor.rb index 9dc663b7e3..670887bded 100644 --- a/Library/Homebrew/resource_auditor.rb +++ b/Library/Homebrew/resource_auditor.rb @@ -6,6 +6,8 @@ module Homebrew # # @api private class ResourceAuditor + include Utils::Curl + attr_reader :name, :version, :checksum, :url, :mirrors, :using, :specs, :owner, :spec_name, :problems def initialize(resource, spec_name, options = {}) @@ -123,7 +125,7 @@ module Homebrew raise HomebrewCurlDownloadStrategyError, url if strategy <= HomebrewCurlDownloadStrategy && !Formula["curl"].any_version_installed? - if (http_content_problem = Utils::Curl.curl_check_http_content( + if (http_content_problem = curl_check_http_content( url, "source URL", specs: specs, From 05ffff09ed698ffe8eba19ed116e8fbd4bec19d0 Mon Sep 17 00:00:00 2001 From: Ruoyu Zhong Date: Wed, 6 Sep 2023 00:12:57 +0800 Subject: [PATCH 2/2] cask/audit: fix `Utils::Curl` usage Needed after #15940. --- Library/Homebrew/cask/audit.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/cask/audit.rb b/Library/Homebrew/cask/audit.rb index 8a0ce7687a..007031716c 100644 --- a/Library/Homebrew/cask/audit.rb +++ b/Library/Homebrew/cask/audit.rb @@ -15,6 +15,7 @@ module Cask # # @api private class Audit + include ::Utils::Curl extend Predicable attr_reader :cask, :download @@ -734,7 +735,7 @@ module Cask # options: T.untyped).void # } def validate_url_for_https_availability(url_to_check, url_type, cask_token, tap, location: nil, **options) - problem = ::Utils::Curl.curl_check_http_content(url_to_check.to_s, url_type, **options) + problem = curl_check_http_content(url_to_check.to_s, url_type, **options) exception = tap&.audit_exception(:secure_connection_audit_skiplist, cask_token, url_to_check.to_s) if problem