Merge pull request #15964 from ZhongRuoyu/utils-curl-fix
Fix more `Utils::Curl` usage
This commit is contained in:
commit
e93d56008d
@ -15,6 +15,7 @@ module Cask
|
|||||||
#
|
#
|
||||||
# @api private
|
# @api private
|
||||||
class Audit
|
class Audit
|
||||||
|
include ::Utils::Curl
|
||||||
extend Predicable
|
extend Predicable
|
||||||
|
|
||||||
attr_reader :cask, :download
|
attr_reader :cask, :download
|
||||||
@ -734,7 +735,7 @@ module Cask
|
|||||||
# options: T.untyped).void
|
# options: T.untyped).void
|
||||||
# }
|
# }
|
||||||
def validate_url_for_https_availability(url_to_check, url_type, cask_token, tap, location: nil, **options)
|
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)
|
exception = tap&.audit_exception(:secure_connection_audit_skiplist, cask_token, url_to_check.to_s)
|
||||||
|
|
||||||
if problem
|
if problem
|
||||||
|
|||||||
@ -6,6 +6,8 @@ module Homebrew
|
|||||||
#
|
#
|
||||||
# @api private
|
# @api private
|
||||||
class ResourceAuditor
|
class ResourceAuditor
|
||||||
|
include Utils::Curl
|
||||||
|
|
||||||
attr_reader :name, :version, :checksum, :url, :mirrors, :using, :specs, :owner, :spec_name, :problems
|
attr_reader :name, :version, :checksum, :url, :mirrors, :using, :specs, :owner, :spec_name, :problems
|
||||||
|
|
||||||
def initialize(resource, spec_name, options = {})
|
def initialize(resource, spec_name, options = {})
|
||||||
@ -123,7 +125,7 @@ module Homebrew
|
|||||||
raise HomebrewCurlDownloadStrategyError, url if
|
raise HomebrewCurlDownloadStrategyError, url if
|
||||||
strategy <= HomebrewCurlDownloadStrategy && !Formula["curl"].any_version_installed?
|
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,
|
url,
|
||||||
"source URL",
|
"source URL",
|
||||||
specs: specs,
|
specs: specs,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user