diff --git a/developer/bin/cask-pr-inspect-download b/developer/bin/cask-pr-inspect-download index f6da054999..5173e40ea0 100755 --- a/developer/bin/cask-pr-inspect-download +++ b/developer/bin/cask-pr-inspect-download @@ -35,7 +35,7 @@ end pr_api = pr_url.sub(%r{^https://github.com/([^/]+)/([^/]+)/pull/([^/]+).*}, 'https://api.github.com/repos/\1/\2/pulls/\3/files') -pr_json = JSON.parse(URI.open(pr_api).read) +pr_json = JSON.parse(URI(pr_api).read) abort "PR needs to have a single file" if pr_json.count != 1 @@ -46,7 +46,7 @@ tmp_cache_dir = Dir.mktmpdir tmp_download_dir = File.join(tmp_cache_dir, "downloads") ENV["HOMEBREW_CACHE"] = tmp_cache_dir -File.write(local_file, URI.open(file_raw_url).read) +File.write(local_file, URI(file_raw_url).read) system("brew", "cask", "fetch", local_file) downloaded_file = File.join(tmp_download_dir, Dir.children(tmp_download_dir).first)