From 2d864d70e0d48a4a0f0ea6affbe52d423f90eceb Mon Sep 17 00:00:00 2001 From: hyuraku <32809703+hyuraku@users.noreply.github.com> Date: Thu, 26 Jan 2023 22:21:45 +0900 Subject: [PATCH 01/33] apply extend/os to migrate_gcc_dependents_if_needed --- Library/Homebrew/cmd/update-report.rb | 3 +-- Library/Homebrew/extend/os/mac/update-report.rb | 12 ++++++++++++ Library/Homebrew/extend/os/update-report.rb | 4 ++++ 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 Library/Homebrew/extend/os/mac/update-report.rb create mode 100644 Library/Homebrew/extend/os/update-report.rb diff --git a/Library/Homebrew/cmd/update-report.rb b/Library/Homebrew/cmd/update-report.rb index 71ecb09d92..8855588e6b 100644 --- a/Library/Homebrew/cmd/update-report.rb +++ b/Library/Homebrew/cmd/update-report.rb @@ -9,6 +9,7 @@ require "description_cache_store" require "cli/parser" require "settings" require "linuxbrew-core-migration" +require "extend/os/update-report" module Homebrew extend T::Sig @@ -293,8 +294,6 @@ module Homebrew end def migrate_gcc_dependents_if_needed - # TODO: Refactor and move to extend/os - return if OS.mac? # rubocop:disable Homebrew/MoveToExtendOS return if Settings.read("gcc-rpaths.fixed") == "true" Formula.installed.each do |formula| diff --git a/Library/Homebrew/extend/os/mac/update-report.rb b/Library/Homebrew/extend/os/mac/update-report.rb new file mode 100644 index 0000000000..a7e8ce393d --- /dev/null +++ b/Library/Homebrew/extend/os/mac/update-report.rb @@ -0,0 +1,12 @@ +# typed: false +# frozen_string_literal: true + +module Homebrew + extend T::Sig + + module_function + + def migrate_gcc_dependents_if_needed + # do nothing + end +end diff --git a/Library/Homebrew/extend/os/update-report.rb b/Library/Homebrew/extend/os/update-report.rb new file mode 100644 index 0000000000..36f8a1eb01 --- /dev/null +++ b/Library/Homebrew/extend/os/update-report.rb @@ -0,0 +1,4 @@ +# typed: strict +# frozen_string_literal: true + +require "extend/os/mac/update-report" if OS.mac? From fd18c7b0ac04dfbbdd005facf806b0bc4a438c75 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Thu, 26 Jan 2023 17:36:40 +0000 Subject: [PATCH 02/33] Tweak cask-source API handling - Use raw.githubusercontent.com to download cask source rather than formulae.brew.sh. This allows us to remove these files - output the tap's current `HEAD` for both formulae and cask JSON - use this `HEAD` for the cask-source API to get the exact file on raw.githubusercontent.com rather than just whatever is newest (which is what the previous API did) - set the `Tap` correctly when creating a `Cask` from the API - if the `formula.json` file exists: print its modified time include `brew config` - memoize `tap.git_head` as we'll be calling it a lot in the same process with the same value --- Library/Homebrew/api.rb | 24 +++++++++++++++++------- Library/Homebrew/api/cask-source.rb | 6 +++--- Library/Homebrew/cask/cask.rb | 1 + Library/Homebrew/cask/cask_loader.rb | 6 ++++-- Library/Homebrew/formula.rb | 1 + Library/Homebrew/system_config.rb | 8 ++++++-- Library/Homebrew/tap.rb | 2 +- 7 files changed, 33 insertions(+), 15 deletions(-) diff --git a/Library/Homebrew/api.rb b/Library/Homebrew/api.rb index a6dadf6fa6..fefdd421fe 100644 --- a/Library/Homebrew/api.rb +++ b/Library/Homebrew/api.rb @@ -23,23 +23,20 @@ module Homebrew HOMEBREW_CACHE_API = (HOMEBREW_CACHE/"api").freeze MAX_RETRIES = 3 - sig { params(endpoint: String, json: T::Boolean).returns(T.any(String, Hash)) } - def fetch(endpoint, json: true) + sig { params(endpoint: String).returns(Hash) } + def fetch(endpoint) return cache[endpoint] if cache.present? && cache.key?(endpoint) api_url = "#{API_DOMAIN}/#{endpoint}" output = Utils::Curl.curl_output("--fail", api_url, max_time: 5) raise ArgumentError, "No file found at #{Tty.underline}#{api_url}#{Tty.reset}" unless output.success? - cache[endpoint] = if json - JSON.parse(output.stdout) - else - output.stdout - end + cache[endpoint] = JSON.parse(output.stdout) rescue JSON::ParserError raise ArgumentError, "Invalid JSON file: #{Tty.underline}#{api_url}#{Tty.reset}" end + sig { params(endpoint: String, target: Pathname).returns(Hash) } def fetch_json_api_file(endpoint, target:) retry_count = 0 @@ -58,5 +55,18 @@ module Homebrew retry end end + + sig { params(token: String, git_head: T.nilable(String)).returns(String) } + def fetch_source(token, git_head: nil) + git_head ||= "master" + endpoint = "#{git_head}/Casks/#{token}.rb" + return cache[endpoint] if cache.present? && cache.key?(endpoint) + + raw_url = "https://raw.githubusercontent.com/Homebrew/homebrew-cask/#{endpoint}" + output = Utils::Curl.curl_output("--fail", raw_url, max_time: 5) + raise ArgumentError, "No file found at #{Tty.underline}#{raw_url}#{Tty.reset}" unless output.success? + + cache[endpoint] = output.stdout + end end end diff --git a/Library/Homebrew/api/cask-source.rb b/Library/Homebrew/api/cask-source.rb index 0c1cd67a21..e0c6296c3f 100644 --- a/Library/Homebrew/api/cask-source.rb +++ b/Library/Homebrew/api/cask-source.rb @@ -10,10 +10,10 @@ module Homebrew class << self extend T::Sig - sig { params(token: String).returns(Hash) } - def fetch(token) + sig { params(token: String, git_head: T.nilable(String)).returns(Hash) } + def fetch(token, git_head: nil) token = token.sub(%r{^homebrew/cask/}, "") - Homebrew::API.fetch "cask-source/#{token}.rb", json: false + Homebrew::API.fetch_source token, git_head: git_head end sig { params(token: String).returns(T::Boolean) } diff --git a/Library/Homebrew/cask/cask.rb b/Library/Homebrew/cask/cask.rb index 2e00a20a70..9e75ac77a2 100644 --- a/Library/Homebrew/cask/cask.rb +++ b/Library/Homebrew/cask/cask.rb @@ -246,6 +246,7 @@ module Cask "conflicts_with" => conflicts_with, "container" => container&.pairs, "auto_updates" => auto_updates, + "tap_git_head" => tap&.git_head, } end diff --git a/Library/Homebrew/cask/cask_loader.rb b/Library/Homebrew/cask/cask_loader.rb index 6e66b043ee..ad60176eb7 100644 --- a/Library/Homebrew/cask/cask_loader.rb +++ b/Library/Homebrew/cask/cask_loader.rb @@ -214,7 +214,7 @@ module Cask # Use the cask-source API if there are any `*flight` blocks if json_cask[:artifacts].any? { |artifact| FLIGHT_STANZAS.include?(artifact.keys.first) } - cask_source = Homebrew::API::CaskSource.fetch(token) + cask_source = Homebrew::API::CaskSource.fetch(token, git_head: json_cask[:tap_git_head]) return FromContentLoader.new(cask_source).load(config: config) end @@ -222,7 +222,9 @@ module Cask json_cask[:artifacts] = json_cask[:artifacts].map(&method(:from_h_hash_gsubs)) json_cask[:caveats] = from_h_string_gsubs(json_cask[:caveats]) - Cask.new(token, source: cask_source, config: config) do + tap = Tap.fetch(json_cask[:tap]) if json_cask[:tap].to_s.include?("/") + + Cask.new(token, tap: tap, source: cask_source, config: config) do version json_cask[:version] if json_cask[:sha256] == "no_check" diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index bb8a0e6bfd..aaf6edb60f 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -2126,6 +2126,7 @@ class Formula "disabled" => disabled?, "disable_date" => disable_date, "disable_reason" => disable_reason, + "tap_git_head" => tap&.git_head, } if stable diff --git a/Library/Homebrew/system_config.rb b/Library/Homebrew/system_config.rb index a019aa4de0..9f1d969ca5 100644 --- a/Library/Homebrew/system_config.rb +++ b/Library/Homebrew/system_config.rb @@ -141,11 +141,15 @@ module SystemConfig def core_tap_config(f = $stdout) if CoreTap.instance.installed? - f.puts "Core tap ORIGIN: #{core_tap_origin}" + f.puts "Core tap origin: #{core_tap_origin}" f.puts "Core tap HEAD: #{core_tap_head}" f.puts "Core tap last commit: #{core_tap_last_commit}" f.puts "Core tap branch: #{core_tap_branch}" - else + end + + if (formula_json = Homebrew::API::HOMEBREW_CACHE_API/"formula.json") && formula_json.exist? + f.puts "Core tap JSON: #{formula_json.mtime.to_s(:short)}" + elsif !CoreTap.instance.installed? f.puts "Core tap: N/A" end end diff --git a/Library/Homebrew/tap.rb b/Library/Homebrew/tap.rb index a6aed47cbd..5c3433cbd8 100644 --- a/Library/Homebrew/tap.rb +++ b/Library/Homebrew/tap.rb @@ -178,7 +178,7 @@ class Tap def git_head raise TapUnavailableError, name unless installed? - path.git_head + @git_head ||= path.git_head end # Time since last git commit for this {Tap}. From ab69719957ce8fa175b0b0426bda8ebceb592bda Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 27 Jan 2023 18:04:08 +0000 Subject: [PATCH 03/33] build(deps): bump webrick from 1.7.0 to 1.8.1 in /Library/Homebrew Bumps [webrick](https://github.com/ruby/webrick) from 1.7.0 to 1.8.1. - [Release notes](https://github.com/ruby/webrick/releases) - [Commits](https://github.com/ruby/webrick/compare/v1.7.0...v1.8.1) --- updated-dependencies: - dependency-name: webrick dependency-type: indirect update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Library/Homebrew/Gemfile.lock | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/Gemfile.lock b/Library/Homebrew/Gemfile.lock index e307d39754..f2ac5f9d4b 100644 --- a/Library/Homebrew/Gemfile.lock +++ b/Library/Homebrew/Gemfile.lock @@ -209,10 +209,9 @@ GEM parser (>= 3.1.0) uri_template (0.7.0) warning (1.3.0) - webrick (1.7.0) + webrick (1.8.1) webrobots (0.1.2) - yard (0.9.28) - webrick (~> 1.7.0) + yard (0.9.26) yard-sorbet (0.6.1) sorbet-runtime (>= 0.5) yard (>= 0.9) From f9facbf2b688fca4581a050bf523baa7393811ed Mon Sep 17 00:00:00 2001 From: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com> Date: Fri, 27 Jan 2023 18:08:11 +0000 Subject: [PATCH 04/33] brew vendor-gems: commit updates. --- .../Homebrew/vendor/bundle/bundler/setup.rb | 4 +- .../lib/webrick.rb | 0 .../lib/webrick/accesslog.rb | 2 +- .../lib/webrick/cgi.rb | 2 +- .../lib/webrick/compat.rb | 2 +- .../lib/webrick/config.rb | 2 +- .../lib/webrick/cookie.rb | 4 +- .../lib/webrick/htmlutils.rb | 2 +- .../lib/webrick/httpauth.rb | 2 +- .../lib/webrick/httpauth/authenticator.rb | 2 +- .../lib/webrick/httpauth/basicauth.rb | 2 +- .../lib/webrick/httpauth/digestauth.rb | 2 +- .../lib/webrick/httpauth/htdigest.rb | 2 +- .../lib/webrick/httpauth/htgroup.rb | 2 +- .../lib/webrick/httpauth/htpasswd.rb | 2 +- .../lib/webrick/httpauth/userdb.rb | 2 +- .../lib/webrick/httpproxy.rb | 2 +- .../lib/webrick/httprequest.rb | 14 ++++-- .../lib/webrick/httpresponse.rb | 50 ++++++++++++++----- .../lib/webrick/https.rb | 2 +- .../lib/webrick/httpserver.rb | 4 +- .../lib/webrick/httpservlet.rb | 2 +- .../lib/webrick/httpservlet/abstract.rb | 2 +- .../lib/webrick/httpservlet/cgi_runner.rb | 4 +- .../lib/webrick/httpservlet/cgihandler.rb | 2 +- .../lib/webrick/httpservlet/erbhandler.rb | 2 +- .../lib/webrick/httpservlet/filehandler.rb | 10 ++-- .../lib/webrick/httpservlet/prochandler.rb | 3 +- .../lib/webrick/httpstatus.rb | 2 +- .../lib/webrick/httputils.rb | 19 +++++-- .../lib/webrick/httpversion.rb | 2 +- .../lib/webrick/log.rb | 14 +++--- .../lib/webrick/server.rb | 4 +- .../lib/webrick/ssl.rb | 30 ++++++----- .../lib/webrick/utils.rb | 4 +- .../lib/webrick/version.rb | 4 +- 36 files changed, 127 insertions(+), 83 deletions(-) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{webrick-1.7.0 => webrick-1.8.1}/lib/webrick.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{webrick-1.7.0 => webrick-1.8.1}/lib/webrick/accesslog.rb (99%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{webrick-1.7.0 => webrick-1.8.1}/lib/webrick/cgi.rb (99%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{webrick-1.7.0 => webrick-1.8.1}/lib/webrick/compat.rb (96%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{webrick-1.7.0 => webrick-1.8.1}/lib/webrick/config.rb (99%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{webrick-1.7.0 => webrick-1.8.1}/lib/webrick/cookie.rb (98%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{webrick-1.7.0 => webrick-1.8.1}/lib/webrick/htmlutils.rb (95%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{webrick-1.7.0 => webrick-1.8.1}/lib/webrick/httpauth.rb (99%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{webrick-1.7.0 => webrick-1.8.1}/lib/webrick/httpauth/authenticator.rb (99%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{webrick-1.7.0 => webrick-1.8.1}/lib/webrick/httpauth/basicauth.rb (99%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{webrick-1.7.0 => webrick-1.8.1}/lib/webrick/httpauth/digestauth.rb (99%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{webrick-1.7.0 => webrick-1.8.1}/lib/webrick/httpauth/htdigest.rb (99%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{webrick-1.7.0 => webrick-1.8.1}/lib/webrick/httpauth/htgroup.rb (98%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{webrick-1.7.0 => webrick-1.8.1}/lib/webrick/httpauth/htpasswd.rb (99%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{webrick-1.7.0 => webrick-1.8.1}/lib/webrick/httpauth/userdb.rb (97%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{webrick-1.7.0 => webrick-1.8.1}/lib/webrick/httpproxy.rb (99%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{webrick-1.7.0 => webrick-1.8.1}/lib/webrick/httprequest.rb (98%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{webrick-1.7.0 => webrick-1.8.1}/lib/webrick/httpresponse.rb (92%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{webrick-1.7.0 => webrick-1.8.1}/lib/webrick/https.rb (99%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{webrick-1.7.0 => webrick-1.8.1}/lib/webrick/httpserver.rb (99%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{webrick-1.7.0 => webrick-1.8.1}/lib/webrick/httpservlet.rb (95%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{webrick-1.7.0 => webrick-1.8.1}/lib/webrick/httpservlet/abstract.rb (99%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{webrick-1.7.0 => webrick-1.8.1}/lib/webrick/httpservlet/cgi_runner.rb (95%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{webrick-1.7.0 => webrick-1.8.1}/lib/webrick/httpservlet/cgihandler.rb (99%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{webrick-1.7.0 => webrick-1.8.1}/lib/webrick/httpservlet/erbhandler.rb (98%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{webrick-1.7.0 => webrick-1.8.1}/lib/webrick/httpservlet/filehandler.rb (98%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{webrick-1.7.0 => webrick-1.8.1}/lib/webrick/httpservlet/prochandler.rb (94%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{webrick-1.7.0 => webrick-1.8.1}/lib/webrick/httpstatus.rb (99%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{webrick-1.7.0 => webrick-1.8.1}/lib/webrick/httputils.rb (96%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{webrick-1.7.0 => webrick-1.8.1}/lib/webrick/httpversion.rb (98%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{webrick-1.7.0 => webrick-1.8.1}/lib/webrick/log.rb (90%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{webrick-1.7.0 => webrick-1.8.1}/lib/webrick/server.rb (98%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{webrick-1.7.0 => webrick-1.8.1}/lib/webrick/ssl.rb (90%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{webrick-1.7.0 => webrick-1.8.1}/lib/webrick/utils.rb (99%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{webrick-1.7.0 => webrick-1.8.1}/lib/webrick/version.rb (86%) diff --git a/Library/Homebrew/vendor/bundle/bundler/setup.rb b/Library/Homebrew/vendor/bundle/bundler/setup.rb index 01fa40ae12..c57b569f89 100644 --- a/Library/Homebrew/vendor/bundle/bundler/setup.rb +++ b/Library/Homebrew/vendor/bundle/bundler/setup.rb @@ -69,7 +69,7 @@ $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/racc-1.6.2/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/nokogiri-1.13.10-x86_64-darwin/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubyntlm-0.6.3/lib") -$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/webrick-1.7.0/lib") +$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/webrick-1.8.1/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/webrobots-0.1.2/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/mechanize-2.8.5/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/method_source-1.0.0/lib") @@ -119,7 +119,7 @@ $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/sorbet-static-and-runtime-0.5.10461/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/thor-1.2.1/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/spoom-1.1.11/lib") -$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/yard-0.9.28/lib") +$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/yard-0.9.26/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/yard-sorbet-0.6.1/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/tapioca-0.7.3/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/warning-1.3.0/lib") diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/accesslog.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/accesslog.rb similarity index 99% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/accesslog.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/accesslog.rb index e4849637f3..fccfd65334 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/accesslog.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/accesslog.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true #-- # accesslog.rb -- Access log handling utilities # diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/cgi.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/cgi.rb similarity index 99% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/cgi.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/cgi.rb index bb0ae2fc84..f22480b86b 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/cgi.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/cgi.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true # # cgi.rb -- Yet another CGI library # diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/compat.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/compat.rb similarity index 96% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/compat.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/compat.rb index c497a1933c..842da1ebbc 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/compat.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/compat.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true # # compat.rb -- cross platform compatibility # diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/config.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/config.rb similarity index 99% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/config.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/config.rb index 9f2ab44f49..d67375c816 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/config.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/config.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true # # config.rb -- Default configurations. # diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/cookie.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/cookie.rb similarity index 98% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/cookie.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/cookie.rb index 5fd3bfb228..7b187822a2 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/cookie.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/cookie.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true # # cookie.rb -- Cookie class # @@ -92,7 +92,7 @@ module WEBrick # The cookie string suitable for use in an HTTP header def to_s - ret = "" + ret = +"" ret << @name << "=" << @value ret << "; " << "Version=" << @version.to_s if @version > 0 ret << "; " << "Domain=" << @domain if @domain diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/htmlutils.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/htmlutils.rb similarity index 95% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/htmlutils.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/htmlutils.rb index ed9f4ac0d3..7ff0bde27f 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/htmlutils.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/htmlutils.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true #-- # htmlutils.rb -- HTMLUtils Module # diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httpauth.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httpauth.rb similarity index 99% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httpauth.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httpauth.rb index f8bf09a6f1..4f5321c882 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httpauth.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httpauth.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true # # httpauth.rb -- HTTP access authentication # diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httpauth/authenticator.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httpauth/authenticator.rb similarity index 99% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httpauth/authenticator.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httpauth/authenticator.rb index 8f0eaa3aca..a6ee28de1a 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httpauth/authenticator.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httpauth/authenticator.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true #-- # httpauth/authenticator.rb -- Authenticator mix-in module. # diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httpauth/basicauth.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httpauth/basicauth.rb similarity index 99% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httpauth/basicauth.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httpauth/basicauth.rb index 7d0a9cfc8f..cc8137aff7 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httpauth/basicauth.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httpauth/basicauth.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true # # httpauth/basicauth.rb -- HTTP basic access authentication # diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httpauth/digestauth.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httpauth/digestauth.rb similarity index 99% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httpauth/digestauth.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httpauth/digestauth.rb index 3cf12899d2..25ce8ba080 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httpauth/digestauth.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httpauth/digestauth.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true # # httpauth/digestauth.rb -- HTTP digest access authentication # diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httpauth/htdigest.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httpauth/htdigest.rb similarity index 99% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httpauth/htdigest.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httpauth/htdigest.rb index 93b18e2c75..c7e853b775 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httpauth/htdigest.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httpauth/htdigest.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true # # httpauth/htdigest.rb -- Apache compatible htdigest file # diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httpauth/htgroup.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httpauth/htgroup.rb similarity index 98% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httpauth/htgroup.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httpauth/htgroup.rb index e06c441b18..108c9d0ba6 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httpauth/htgroup.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httpauth/htgroup.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true # # httpauth/htgroup.rb -- Apache compatible htgroup file # diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httpauth/htpasswd.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httpauth/htpasswd.rb similarity index 99% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httpauth/htpasswd.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httpauth/htpasswd.rb index abca30532e..9a48e57d16 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httpauth/htpasswd.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httpauth/htpasswd.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true # # httpauth/htpasswd -- Apache compatible htpasswd file # diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httpauth/userdb.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httpauth/userdb.rb similarity index 97% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httpauth/userdb.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httpauth/userdb.rb index 7a17715cdf..0d0f72b1f0 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httpauth/userdb.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httpauth/userdb.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true #-- # httpauth/userdb.rb -- UserDB mix-in module. # diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httpproxy.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httpproxy.rb similarity index 99% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httpproxy.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httpproxy.rb index 7607c3df88..196682ec2d 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httpproxy.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httpproxy.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true # # httpproxy.rb -- HTTPProxy Class # diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httprequest.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httprequest.rb similarity index 98% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httprequest.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httprequest.rb index d34eac7ecf..680ac65af2 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httprequest.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httprequest.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true # # httprequest.rb -- HTTPRequest Class # @@ -171,7 +171,7 @@ module WEBrick @accept_charset = [] @accept_encoding = [] @accept_language = [] - @body = "" + @body = +"" @addr = @peeraddr = nil @attributes = {} @@ -491,8 +491,7 @@ module WEBrick if @forwarded_host host, port = @forwarded_host, @forwarded_port elsif self["host"] - pattern = /\A(#{URI::REGEXP::PATTERN::HOST})(?::(\d+))?\z/n - host, port = *self['host'].scan(pattern)[0] + host, port = parse_host_request_line(self["host"]) elsif @addr.size > 0 host, port = @addr[2], @addr[1] else @@ -504,6 +503,11 @@ module WEBrick return URI::parse(uri.to_s) end + def parse_host_request_line(host) + pattern = /\A(#{URI::REGEXP::PATTERN::HOST})(?::(\d+))?\z/no + host.scan(pattern)[0] + end + def read_body(socket, block) return unless socket if tc = self['transfer-encoding'] @@ -522,7 +526,7 @@ module WEBrick if @remaining_size > 0 && @socket.eof? raise HTTPStatus::BadRequest, "invalid body size." end - elsif BODY_CONTAINABLE_METHODS.member?(@request_method) && !@socket.eof + elsif BODY_CONTAINABLE_METHODS.member?(@request_method) raise HTTPStatus::LengthRequired end return @body diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httpresponse.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httpresponse.rb similarity index 92% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httpresponse.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httpresponse.rb index ba4494ab74..dde0261da0 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httpresponse.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httpresponse.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true # # httpresponse.rb -- HTTPResponse Class # @@ -105,6 +105,11 @@ module WEBrick attr_reader :sent_size + ## + # Set the response body proc as an streaming/upgrade response. + + attr_accessor :upgrade + ## # Creates a new HTTP response object. WEBrick::Config::HTTP is the # default configuration. @@ -117,7 +122,7 @@ module WEBrick @status = HTTPStatus::RC_OK @reason_phrase = nil @http_version = HTTPVersion::convert(@config[:HTTPVersion]) - @body = '' + @body = +"" @keep_alive = true @cookies = [] @request_method = nil @@ -217,6 +222,16 @@ module WEBrick @keep_alive end + ## + # Sets the response to be a streaming/upgrade response. + # This will disable keep-alive and chunked transfer encoding. + + def upgrade!(protocol) + @upgrade = protocol + @keep_alive = false + @chunked = false + end + ## # Sends the response on +socket+ @@ -242,6 +257,14 @@ module WEBrick @header['server'] ||= @config[:ServerSoftware] @header['date'] ||= Time.now.httpdate + if @upgrade + @header['connection'] = 'upgrade' + @header['upgrade'] = @upgrade + @keep_alive = false + + return + end + # HTTP/0.9 features if @request_http_version < "1.0" @http_version = HTTPVersion.new("0.9") @@ -268,11 +291,10 @@ module WEBrick elsif %r{^multipart/byteranges} =~ @header['content-type'] @header.delete('content-length') elsif @header['content-length'].nil? - if @body.respond_to? :readpartial - elsif @body.respond_to? :call - make_body_tempfile + if @body.respond_to?(:bytesize) + @header['content-length'] = @body.bytesize.to_s else - @header['content-length'] = (@body ? @body.bytesize : 0).to_s + @header['connection'] = 'close' end end @@ -332,7 +354,7 @@ module WEBrick def send_header(socket) # :nodoc: if @http_version.major > 0 - data = status_line() + data = status_line().dup @header.each{|key, value| tmp = key.gsub(/\bwww|^te$|\b\w/){ $&.upcase } data << "#{tmp}: #{check_header(value)}" << CRLF @@ -419,7 +441,7 @@ module WEBrick # :stopdoc: def error_body(backtrace, ex, host, port) - @body = '' + @body = +"" @body << <<-_end_of_html_ @@ -453,11 +475,11 @@ module WEBrick if @request_method == "HEAD" # do nothing elsif chunked? - buf = '' + buf = +'' begin @body.readpartial(@buffer_size, buf) size = buf.bytesize - data = "#{size.to_s(16)}#{CRLF}#{buf}#{CRLF}" + data = +"#{size.to_s(16)}#{CRLF}#{buf}#{CRLF}" socket.write(data) data.clear @sent_size += size @@ -517,14 +539,16 @@ module WEBrick @body.call(ChunkedWrapper.new(socket, self)) socket.write("0#{CRLF}#{CRLF}") else - size = @header['content-length'].to_i if @bodytempfile @bodytempfile.rewind IO.copy_stream(@bodytempfile, socket) else @body.call(socket) end - @sent_size = size + + if content_length = @header['content-length'] + @sent_size = content_length.to_i + end end end @@ -539,7 +563,7 @@ module WEBrick socket = @socket @resp.instance_eval { size = buf.bytesize - data = "#{size.to_s(16)}#{CRLF}#{buf}#{CRLF}" + data = +"#{size.to_s(16)}#{CRLF}#{buf}#{CRLF}" socket.write(data) data.clear @sent_size += size diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/https.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/https.rb similarity index 99% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/https.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/https.rb index b0a49bc40b..7f00b3068d 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/https.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/https.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true # # https.rb -- SSL/TLS enhancement for HTTPServer # diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httpserver.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httpserver.rb similarity index 99% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httpserver.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httpserver.rb index e85d059319..0d261bf00c 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httpserver.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httpserver.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true # # httpserver.rb -- HTTPServer Class # @@ -285,7 +285,7 @@ module WEBrick end def normalize(dir) - ret = dir ? dir.dup : "" + ret = dir ? dir.dup : +"" ret.sub!(%r|/+\z|, "") ret end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httpservlet.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httpservlet.rb similarity index 95% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httpservlet.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httpservlet.rb index da49a1405b..4cb1822cd3 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httpservlet.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httpservlet.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true # # httpservlet.rb -- HTTPServlet Utility File # diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httpservlet/abstract.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httpservlet/abstract.rb similarity index 99% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httpservlet/abstract.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httpservlet/abstract.rb index bccb091861..6fae4de919 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httpservlet/abstract.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httpservlet/abstract.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true # # httpservlet.rb -- HTTPServlet Module # diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httpservlet/cgi_runner.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httpservlet/cgi_runner.rb similarity index 95% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httpservlet/cgi_runner.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httpservlet/cgi_runner.rb index 0398c16749..b0948ae39b 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httpservlet/cgi_runner.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httpservlet/cgi_runner.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true # # cgi_runner.rb -- CGI launcher. # @@ -10,7 +10,7 @@ # $IPR: cgi_runner.rb,v 1.9 2002/09/25 11:33:15 gotoyuzo Exp $ def sysread(io, size) - buf = "" + buf = +"" while size > 0 tmp = io.sysread(size) buf << tmp diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httpservlet/cgihandler.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httpservlet/cgihandler.rb similarity index 99% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httpservlet/cgihandler.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httpservlet/cgihandler.rb index 4457770b7a..450aa3806a 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httpservlet/cgihandler.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httpservlet/cgihandler.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true # # cgihandler.rb -- CGIHandler Class # diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httpservlet/erbhandler.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httpservlet/erbhandler.rb similarity index 98% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httpservlet/erbhandler.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httpservlet/erbhandler.rb index cd09e5f216..3b232f7f5b 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httpservlet/erbhandler.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httpservlet/erbhandler.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true # # erbhandler.rb -- ERBHandler Class # diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httpservlet/filehandler.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httpservlet/filehandler.rb similarity index 98% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httpservlet/filehandler.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httpservlet/filehandler.rb index 010df0e918..7ab88bca13 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httpservlet/filehandler.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httpservlet/filehandler.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true # # filehandler.rb -- FileHandler Module # @@ -481,9 +481,9 @@ module WEBrick elsif !namewidth or (namewidth = namewidth.to_i) < 2 namewidth = 25 end - query = query.inject('') {|s, (k, v)| s << '&' << HTMLUtils::escape("#{k}=#{v}")} + query = query.inject('') {|s, (k, v)| s << '&' << HTMLUtils::escape("#{k}=#{v}")}.dup - type = "text/html" + type = +"text/html" case enc = Encoding.find('filesystem') when Encoding::US_ASCII, Encoding::ASCII_8BIT else @@ -492,7 +492,7 @@ module WEBrick res['content-type'] = type title = "Index of #{HTMLUtils::escape(req.path)}" - res.body = <<-_end_of_html_ + res.body = +<<-_end_of_html_ @@ -528,7 +528,7 @@ module WEBrick else dname = name end - s = "#{HTMLUtils::escape(dname)}" + s = +"#{HTMLUtils::escape(dname)}" s << "" << (time ? time.strftime("%Y/%m/%d %H:%M") : "") << "" s << "" << (size >= 0 ? size.to_s : "-") << "\n" res.body << s diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httpservlet/prochandler.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httpservlet/prochandler.rb similarity index 94% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httpservlet/prochandler.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httpservlet/prochandler.rb index 599ffc4340..92e4f80d06 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httpservlet/prochandler.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httpservlet/prochandler.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true # # prochandler.rb -- ProcHandler Class # @@ -40,6 +40,7 @@ module WEBrick end alias do_POST do_GET + alias do_PUT do_GET # :startdoc: end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httpstatus.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httpstatus.rb similarity index 99% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httpstatus.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httpstatus.rb index c811f21964..c21c1d4679 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httpstatus.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httpstatus.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true #-- # httpstatus.rb -- HTTPStatus Class # diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httputils.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httputils.rb similarity index 96% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httputils.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httputils.rb index f1b9ddf9f0..48aa1371b2 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httputils.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httputils.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true # # httputils.rb -- HTTPUtils Module # @@ -48,6 +48,7 @@ module WEBrick "ai" => "application/postscript", "asc" => "text/plain", "avi" => "video/x-msvideo", + "avif" => "image/avif", "bin" => "application/octet-stream", "bmp" => "image/bmp", "class" => "application/octet-stream", @@ -65,6 +66,7 @@ module WEBrick "gif" => "image/gif", "htm" => "text/html", "html" => "text/html", + "ico" => "image/x-icon", "jpe" => "image/jpeg", "jpeg" => "image/jpeg", "jpg" => "image/jpeg", @@ -74,9 +76,11 @@ module WEBrick "lzh" => "application/octet-stream", "mjs" => "application/javascript", "mov" => "video/quicktime", + "mp4" => "video/mp4", "mpe" => "video/mpeg", "mpeg" => "video/mpeg", "mpg" => "video/mpeg", + "otf" => "font/otf", "pbm" => "image/x-portable-bitmap", "pdf" => "application/pdf", "pgm" => "image/x-portable-graymap", @@ -95,8 +99,15 @@ module WEBrick "svg" => "image/svg+xml", "tif" => "image/tiff", "tiff" => "image/tiff", + "ttc" => "font/collection", + "ttf" => "font/ttf", "txt" => "text/plain", "wasm" => "application/wasm", + "webm" => "video/webm", + "webmanifest" => "application/manifest+json", + "webp" => "image/webp", + "woff" => "font/woff", + "woff2" => "font/woff2", "xbm" => "image/x-xbitmap", "xhtml" => "text/html", "xls" => "application/vnd.ms-excel", @@ -112,7 +123,7 @@ module WEBrick def load_mime_types(file) # note: +file+ may be a "| command" for now; some people may # rely on this, but currently we do not use this method by default. - open(file){ |io| + File.open(file){ |io| hash = Hash.new io.each{ |line| next if /^#/ =~ line @@ -231,7 +242,7 @@ module WEBrick # Quotes and escapes quotes in +str+ def quote(str) - '"' << str.gsub(/[\\\"]/o, "\\\1") << '"' + +'"' << str.gsub(/[\\\"]/o, "\\\1") << '"' end module_function :quote @@ -495,7 +506,7 @@ module WEBrick # Escapes path +str+ def escape_path(str) - result = "" + result = +"" str.scan(%r{/([^/]*)}).each{|i| result << "/" << _escape(i[0], UNESCAPED_PCHAR) } diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httpversion.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httpversion.rb similarity index 98% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httpversion.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httpversion.rb index 8a251944a2..6349590334 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/httpversion.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/httpversion.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true #-- # HTTPVersion.rb -- presentation of HTTP version # diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/log.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/log.rb similarity index 90% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/log.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/log.rb index 2c1fdfe602..4de4bee1c8 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/log.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/log.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true #-- # log.rb -- Log Class # @@ -86,15 +86,15 @@ module WEBrick end # Shortcut for logging a FATAL message - def fatal(msg) log(FATAL, "FATAL " << format(msg)); end + def fatal(msg) log(FATAL, "FATAL " + format(msg)); end # Shortcut for logging an ERROR message - def error(msg) log(ERROR, "ERROR " << format(msg)); end + def error(msg) log(ERROR, "ERROR " + format(msg)); end # Shortcut for logging a WARN message - def warn(msg) log(WARN, "WARN " << format(msg)); end + def warn(msg) log(WARN, "WARN " + format(msg)); end # Shortcut for logging an INFO message - def info(msg) log(INFO, "INFO " << format(msg)); end + def info(msg) log(INFO, "INFO " + format(msg)); end # Shortcut for logging a DEBUG message - def debug(msg) log(DEBUG, "DEBUG " << format(msg)); end + def debug(msg) log(DEBUG, "DEBUG " + format(msg)); end # Will the logger output FATAL messages? def fatal?; @level >= FATAL; end @@ -118,7 +118,7 @@ module WEBrick # * Otherwise it will return +arg+.inspect. def format(arg) if arg.is_a?(Exception) - "#{arg.class}: #{AccessLog.escape(arg.message)}\n\t" << + +"#{arg.class}: #{AccessLog.escape(arg.message)}\n\t" << arg.backtrace.join("\n\t") << "\n" elsif arg.respond_to?(:to_str) AccessLog.escape(arg.to_str) diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/server.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/server.rb similarity index 98% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/server.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/server.rb index fd6b7a61b5..f085d5d2b0 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/server.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/server.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true # # server.rb -- GenericServer Class # @@ -102,7 +102,7 @@ module WEBrick @listeners = [] @shutdown_pipe = nil unless @config[:DoNotListen] - raise ArgumentError, "Port must an integer" unless @config[:Port].to_s == @config[:Port].to_i.to_s + raise ArgumentError, "Port must be an integer" unless @config[:Port].to_s == @config[:Port].to_i.to_s @config[:Port] = @config[:Port].to_i if @config[:Listen] diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/ssl.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/ssl.rb similarity index 90% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/ssl.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/ssl.rb index e448095a12..6937f93bf0 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/ssl.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/ssl.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true # # ssl.rb -- SSL/TLS enhancement for GenericServer # @@ -95,18 +95,22 @@ module WEBrick # the issuer +cn+ and a +comment+ to be stored in the certificate. def create_self_signed_cert(bits, cn, comment) - rsa = OpenSSL::PKey::RSA.new(bits){|p, n| - case p - when 0; $stderr.putc "." # BN_generate_prime - when 1; $stderr.putc "+" # BN_generate_prime - when 2; $stderr.putc "*" # searching good prime, - # n = #of try, - # but also data from BN_generate_prime - when 3; $stderr.putc "\n" # found good prime, n==0 - p, n==1 - q, - # but also data from BN_generate_prime - else; $stderr.putc "*" # BN_generate_prime - end - } + rsa = if $VERBOSE + OpenSSL::PKey::RSA.new(bits){|p, n| + case p + when 0; $stderr.putc "." # BN_generate_prime + when 1; $stderr.putc "+" # BN_generate_prime + when 2; $stderr.putc "*" # searching good prime, + # n = #of try, + # but also data from BN_generate_prime + when 3; $stderr.putc "\n" # found good prime, n==0 - p, n==1 - q, + # but also data from BN_generate_prime + else; $stderr.putc "*" # BN_generate_prime + end + } + else + OpenSSL::PKey::RSA.new(bits) + end cert = OpenSSL::X509::Certificate.new cert.version = 2 cert.serial = 1 diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/utils.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/utils.rb similarity index 99% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/utils.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/utils.rb index a96d6f03fd..e4902d0bd9 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/utils.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/utils.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true # # utils.rb -- Miscellaneous utilities # @@ -78,7 +78,7 @@ module WEBrick # Generates a random string of length +len+ def random_string(len) rand_max = RAND_CHARS.bytesize - ret = "" + ret = +"" len.times{ ret << RAND_CHARS[rand(rand_max)] } ret end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/version.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/version.rb similarity index 86% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/version.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/version.rb index b62988bdbb..ceeefc33f9 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.7.0/lib/webrick/version.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/webrick-1.8.1/lib/webrick/version.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true #-- # version.rb -- version and release date # @@ -14,5 +14,5 @@ module WEBrick ## # The WEBrick version - VERSION = "1.7.0" + VERSION = "1.8.1" end From ebe8a70954fdd988e4e6b56260078d1b39088264 Mon Sep 17 00:00:00 2001 From: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com> Date: Fri, 27 Jan 2023 18:14:26 +0000 Subject: [PATCH 05/33] Update RBI files for webrick. Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gems.yml) workflow. --- .../{webrick@1.7.0.rbi => webrick@1.8.1.rbi} | 15 ++++++++++++++- .../gems/{yard@0.9.28.rbi => yard@0.9.26.rbi} | 16 +++++----------- 2 files changed, 19 insertions(+), 12 deletions(-) rename Library/Homebrew/sorbet/rbi/gems/{webrick@1.7.0.rbi => webrick@1.8.1.rbi} (97%) rename Library/Homebrew/sorbet/rbi/gems/{yard@0.9.28.rbi => yard@0.9.26.rbi} (99%) diff --git a/Library/Homebrew/sorbet/rbi/gems/webrick@1.7.0.rbi b/Library/Homebrew/sorbet/rbi/gems/webrick@1.8.1.rbi similarity index 97% rename from Library/Homebrew/sorbet/rbi/gems/webrick@1.7.0.rbi rename to Library/Homebrew/sorbet/rbi/gems/webrick@1.8.1.rbi index 63755aa3aa..8bff972a30 100644 --- a/Library/Homebrew/sorbet/rbi/gems/webrick@1.7.0.rbi +++ b/Library/Homebrew/sorbet/rbi/gems/webrick@1.8.1.rbi @@ -265,6 +265,7 @@ class WEBrick::HTTPRequest private def _read_data(io, method, *arg); end + def parse_host_request_line(host); end def parse_query; end def parse_uri(str, scheme = T.unsafe(nil)); end def read_body(socket, block); end @@ -284,7 +285,6 @@ class WEBrick::HTTPResponse def [](field); end def []=(field, value); end - def _rack_setup_header; end def body; end def body=(_arg0); end def chunked=(val); end @@ -319,9 +319,13 @@ class WEBrick::HTTPResponse def sent_size; end def set_error(ex, backtrace = T.unsafe(nil)); end def set_redirect(status, url); end + def setup_header; end def status; end def status=(status); end def status_line; end + def upgrade; end + def upgrade!(protocol); end + def upgrade=(_arg0); end private @@ -450,6 +454,15 @@ class WEBrick::HTTPServlet::FileHandler < ::WEBrick::HTTPServlet::AbstractServle end end +class WEBrick::HTTPServlet::ProcHandler < ::WEBrick::HTTPServlet::AbstractServlet + def initialize(proc); end + + def do_GET(request, response); end + def do_POST(request, response); end + def do_PUT(request, response); end + def get_instance(server, *options); end +end + module WEBrick::HTTPStatus private diff --git a/Library/Homebrew/sorbet/rbi/gems/yard@0.9.28.rbi b/Library/Homebrew/sorbet/rbi/gems/yard@0.9.26.rbi similarity index 99% rename from Library/Homebrew/sorbet/rbi/gems/yard@0.9.28.rbi rename to Library/Homebrew/sorbet/rbi/gems/yard@0.9.26.rbi index 0a9df757b5..6bb3345a04 100644 --- a/Library/Homebrew/sorbet/rbi/gems/yard@0.9.28.rbi +++ b/Library/Homebrew/sorbet/rbi/gems/yard@0.9.26.rbi @@ -149,13 +149,16 @@ class Rack::Request def xhr?; end class << self + def forwarded_priority; end + def forwarded_priority=(_arg0); end def ip_filter; end def ip_filter=(_arg0); end + def x_forwarded_proto_priority; end + def x_forwarded_proto_priority=(_arg0); end end end Rack::Request::ALLOWED_SCHEMES = T.let(T.unsafe(nil), Array) -Rack::Request::SCHEME_WHITELIST = T.let(T.unsafe(nil), Array) class String include ::Comparable @@ -202,8 +205,6 @@ module YARD def ruby18?; end def ruby19?; end def ruby2?; end - def ruby31?; end - def ruby3?; end def windows?; end end end @@ -1419,12 +1420,7 @@ class YARD::Handlers::Ruby::MixinHandler < ::YARD::Handlers::Ruby::Base def recipient(mixin); end end -class YARD::Handlers::Ruby::ModuleFunctionHandler < ::YARD::Handlers::Ruby::Base - include ::YARD::Handlers::Ruby::DecoratorHandlerMethods - - def make_module_function(instance_method, namespace); end -end - +class YARD::Handlers::Ruby::ModuleFunctionHandler < ::YARD::Handlers::Ruby::Base; end class YARD::Handlers::Ruby::ModuleHandler < ::YARD::Handlers::Ruby::Base; end class YARD::Handlers::Ruby::PrivateClassMethodHandler < ::YARD::Handlers::Ruby::Base @@ -2409,7 +2405,6 @@ class YARD::Parser::Ruby::ModuleNode < ::YARD::Parser::Ruby::KeywordNode end class YARD::Parser::Ruby::ParameterNode < ::YARD::Parser::Ruby::AstNode - def args_forward; end def block_param; end def double_splat_param; end def named_params; end @@ -3335,7 +3330,6 @@ class YARD::Tags::Directive protected - def inside_directive?; end def parser; end end From 8881ea74b5ea9c9eb43ce45a815d209578f26258 Mon Sep 17 00:00:00 2001 From: Issy Long Date: Fri, 27 Jan 2023 20:00:34 +0000 Subject: [PATCH 06/33] cli/parser: Don't treat args with `--cask` as formulae - For the command `brew install --cask racket`, a user was reporting the behaviour where despite `--cask` in the command, they were getting output about the `racket` formula having been renamed: ``` $ brew install --cask racket Warning: Use minimal-racket instead of deprecated racket ==> Downloading https://mirror.racket-lang.org/installers/8.7/racket-8.7-x86_64-macosx-cs. ==> Installing Cask racket [...] racket was successfully installed! ``` - The "instead of deprecated ..." messaging comes from the `TapLoader` class `formula_name_path` method, so _something_ must be assuming that everything is initially a formula before _later_ learning from further args parsing that there's a `--cask` qualifier to scope to only casks. - There are always `@formula_options` and args parsing is recursive, going through each option, so we check that the original `argv` items include a `--cask` and skip calling the `formulae` method if that's the case. - After this change, the "formula renames" words no longer show up. ``` $ brew install --cask racket ==> Downloading https://mirror.racket-lang.org/installers/8.7/racket-8.7-aarch64-macosx-cs.dmg ==> Installing Cask racket [...] racket was successfully installed! ``` --- Library/Homebrew/cli/parser.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/cli/parser.rb b/Library/Homebrew/cli/parser.rb index 1a85f404df..4c0b66d948 100644 --- a/Library/Homebrew/cli/parser.rb +++ b/Library/Homebrew/cli/parser.rb @@ -298,9 +298,10 @@ module Homebrew def parse(argv = ARGV.freeze, ignore_invalid_options: false) raise "Arguments were already parsed!" if @args_parsed - # If we accept formula options, parse once allowing invalid options - # so we can get the remaining list containing formula names. - if @formula_options + # If we accept formula options, but the command isn't scoped only + # to casks, parse once allowing invalid options so we can get the + # remaining list containing formula names. + if @formula_options && argv.exclude?("--cask") remaining, non_options = parse_remaining(argv, ignore_invalid_options: true) argv = [*remaining, "--", *non_options] From 1dbeee826d21c2e5f0316da16e8b48dcb335ff61 Mon Sep 17 00:00:00 2001 From: Douglas Eichelberger Date: Fri, 27 Jan 2023 22:52:44 -0800 Subject: [PATCH 07/33] replace undent with squiggly heredoc --- .../cask/homepage_url_trailing_slash_spec.rb | 8 ++-- .../cask/on_system_conditionals_spec.rb | 44 +++++++++--------- .../rubocops/cask/stanza_grouping_spec.rb | 44 +++++++++--------- .../test/rubocops/cask/stanza_order_spec.rb | 46 +++++++++---------- .../cask/url_legacy_comma_separators_spec.rb | 12 ++--- .../test/rubocops/cask/variables_spec.rb | 34 +++++++------- 6 files changed, 94 insertions(+), 94 deletions(-) diff --git a/Library/Homebrew/test/rubocops/cask/homepage_url_trailing_slash_spec.rb b/Library/Homebrew/test/rubocops/cask/homepage_url_trailing_slash_spec.rb index 3469dc78bb..9877b9f3e3 100644 --- a/Library/Homebrew/test/rubocops/cask/homepage_url_trailing_slash_spec.rb +++ b/Library/Homebrew/test/rubocops/cask/homepage_url_trailing_slash_spec.rb @@ -11,7 +11,7 @@ describe RuboCop::Cop::Cask::HomepageUrlTrailingSlash do context "when the homepage URL ends with a slash" do let(:source) do - <<-CASK.undent + <<~CASK cask 'foo' do homepage 'https://foo.brew.sh/' end @@ -23,7 +23,7 @@ describe RuboCop::Cop::Cask::HomepageUrlTrailingSlash do context "when the homepage URL does not end with a slash but has a path" do let(:source) do - <<-CASK.undent + <<~CASK cask 'foo' do homepage 'https://foo.brew.sh/path' end @@ -35,14 +35,14 @@ describe RuboCop::Cop::Cask::HomepageUrlTrailingSlash do context "when the homepage URL does not end with a slash and has no path" do let(:source) do - <<-CASK.undent + <<~CASK cask 'foo' do homepage 'https://foo.brew.sh' end CASK end let(:correct_source) do - <<-CASK.undent + <<~CASK cask 'foo' do homepage 'https://foo.brew.sh/' end diff --git a/Library/Homebrew/test/rubocops/cask/on_system_conditionals_spec.rb b/Library/Homebrew/test/rubocops/cask/on_system_conditionals_spec.rb index 2864a83a6d..968f5b01a0 100644 --- a/Library/Homebrew/test/rubocops/cask/on_system_conditionals_spec.rb +++ b/Library/Homebrew/test/rubocops/cask/on_system_conditionals_spec.rb @@ -12,7 +12,7 @@ describe RuboCop::Cop::Cask::OnSystemConditionals do context "when auditing `postflight` stanzas" do context "when there are no on_system blocks" do let(:source) do - <<-CASK.undent + <<~CASK cask 'foo' do postflight do foobar @@ -26,7 +26,7 @@ describe RuboCop::Cop::Cask::OnSystemConditionals do context "when there is an `on_intel` block" do let(:source) do - <<-CASK.undent + <<~CASK cask 'foo' do postflight do on_intel do @@ -37,7 +37,7 @@ describe RuboCop::Cop::Cask::OnSystemConditionals do CASK end let(:correct_source) do - <<-CASK.undent + <<~CASK cask 'foo' do postflight do if Hardware::CPU.intel? @@ -64,7 +64,7 @@ describe RuboCop::Cop::Cask::OnSystemConditionals do context "when there is an `on_monterey` block" do let(:source) do - <<-CASK.undent + <<~CASK cask 'foo' do postflight do on_monterey do @@ -75,7 +75,7 @@ describe RuboCop::Cop::Cask::OnSystemConditionals do CASK end let(:correct_source) do - <<-CASK.undent + <<~CASK cask 'foo' do postflight do if MacOS.version == :monterey @@ -102,7 +102,7 @@ describe RuboCop::Cop::Cask::OnSystemConditionals do context "when there is an `on_monterey :or_older` block" do let(:source) do - <<-CASK.undent + <<~CASK cask 'foo' do postflight do on_monterey :or_older do @@ -113,7 +113,7 @@ describe RuboCop::Cop::Cask::OnSystemConditionals do CASK end let(:correct_source) do - <<-CASK.undent + <<~CASK cask 'foo' do postflight do if MacOS.version <= :monterey @@ -143,7 +143,7 @@ describe RuboCop::Cop::Cask::OnSystemConditionals do context "when auditing `sha256` stanzas inside on_arch blocks" do context "when there are no on_arch blocks" do let(:source) do - <<-CASK.undent + <<~CASK cask 'foo' do sha256 "67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94" end @@ -155,7 +155,7 @@ describe RuboCop::Cop::Cask::OnSystemConditionals do context "when the proper `sha256` stanza is used" do let(:source) do - <<-CASK.undent + <<~CASK cask 'foo' do sha256 arm: "67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94", intel: "8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b" @@ -168,7 +168,7 @@ describe RuboCop::Cop::Cask::OnSystemConditionals do context "when the `sha256` stanza needs to be removed from the on_arch blocks" do let(:source) do - <<-CASK.undent + <<~CASK cask 'foo' do on_intel do sha256 "67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94" @@ -180,7 +180,7 @@ describe RuboCop::Cop::Cask::OnSystemConditionals do CASK end let(:correct_source) do - <<-CASK.undent + <<~CASK cask 'foo' do #{" "} sha256 arm: "8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b", intel: "67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94" @@ -188,7 +188,7 @@ describe RuboCop::Cop::Cask::OnSystemConditionals do CASK end let(:offense_source) do - <<-CASK.undent + <<~CASK on_arm do sha256 "8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b" end @@ -213,7 +213,7 @@ describe RuboCop::Cop::Cask::OnSystemConditionals do context "when there is only one on_arch block" do let(:source) do - <<-CASK.undent + <<~CASK cask 'foo' do on_intel do sha256 "67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94" @@ -227,7 +227,7 @@ describe RuboCop::Cop::Cask::OnSystemConditionals do context "when there is also a `version` stanza inside the on_arch blocks" do let(:source) do - <<-CASK.undent + <<~CASK cask 'foo' do on_intel do version "1.0.0" @@ -246,7 +246,7 @@ describe RuboCop::Cop::Cask::OnSystemConditionals do context "when there is also a `version` stanza inside only a single on_arch block" do let(:source) do - <<-CASK.undent + <<~CASK cask 'foo' do on_intel do version "2.0.0" @@ -266,7 +266,7 @@ describe RuboCop::Cop::Cask::OnSystemConditionals do context "when auditing loose `Hardware::CPU` method calls" do context "when there is a `Hardware::CPU.arm?` reference" do let(:source) do - <<-CASK.undent + <<~CASK cask 'foo' do if Hardware::CPU.arm? && other_condition sha256 "67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94" @@ -291,7 +291,7 @@ describe RuboCop::Cop::Cask::OnSystemConditionals do context "when there is a `Hardware::CPU.intel?` reference" do let(:source) do - <<-CASK.undent + <<~CASK cask 'foo' do if Hardware::CPU.intel? && other_condition sha256 "67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94" @@ -316,7 +316,7 @@ describe RuboCop::Cop::Cask::OnSystemConditionals do context "when there is a `Hardware::CPU.arch` reference" do let(:source) do - <<-CASK.undent + <<~CASK cask 'foo' do version "1.2.3" sha256 "67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94" @@ -342,7 +342,7 @@ describe RuboCop::Cop::Cask::OnSystemConditionals do context "when auditing loose `MacOS.version` method calls" do context "when there is a `MacOS.version ==` reference" do let(:source) do - <<-CASK.undent + <<~CASK cask 'foo' do if MacOS.version == :catalina version "1.0.0" @@ -367,7 +367,7 @@ describe RuboCop::Cop::Cask::OnSystemConditionals do context "when there is a `MacOS.version <=` reference" do let(:source) do - <<-CASK.undent + <<~CASK cask 'foo' do if MacOS.version <= :catalina version "1.0.0" @@ -392,7 +392,7 @@ describe RuboCop::Cop::Cask::OnSystemConditionals do context "when there is a `MacOS.version >=` reference" do let(:source) do - <<-CASK.undent + <<~CASK cask 'foo' do if MacOS.version >= :catalina version "1.0.0" @@ -417,7 +417,7 @@ describe RuboCop::Cop::Cask::OnSystemConditionals do context "when there is a `MacOS.version` reference" do let(:source) do - <<-CASK.undent + <<~CASK cask 'foo' do version "1.2.3" sha256 "67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94" diff --git a/Library/Homebrew/test/rubocops/cask/stanza_grouping_spec.rb b/Library/Homebrew/test/rubocops/cask/stanza_grouping_spec.rb index 4d806bdef7..5f9bb403aa 100644 --- a/Library/Homebrew/test/rubocops/cask/stanza_grouping_spec.rb +++ b/Library/Homebrew/test/rubocops/cask/stanza_grouping_spec.rb @@ -18,7 +18,7 @@ describe RuboCop::Cop::Cask::StanzaGrouping do context "when there is only one stanza" do let(:source) do - <<-CASK.undent + <<~CASK cask 'foo' do version :latest end @@ -30,7 +30,7 @@ describe RuboCop::Cop::Cask::StanzaGrouping do context "when no stanzas are incorrectly grouped" do let(:source) do - <<-CASK.undent + <<~CASK cask 'foo' do version :latest sha256 :no_check @@ -43,7 +43,7 @@ describe RuboCop::Cop::Cask::StanzaGrouping do context "when no stanzas or variable assignments are incorrectly grouped" do let(:source) do - <<-CASK.undent + <<~CASK cask 'foo' do arch arm: "arm64", intel: "x86_64" folder = on_arch_conditional arm: "darwin-arm64", intel: "darwin" @@ -59,7 +59,7 @@ describe RuboCop::Cop::Cask::StanzaGrouping do context "when one stanza is incorrectly grouped" do let(:source) do - <<-CASK.undent + <<~CASK cask 'foo' do version :latest @@ -68,7 +68,7 @@ describe RuboCop::Cop::Cask::StanzaGrouping do CASK end let(:correct_source) do - <<-CASK.undent + <<~CASK cask 'foo' do version :latest sha256 :no_check @@ -92,7 +92,7 @@ describe RuboCop::Cop::Cask::StanzaGrouping do context "when the arch stanza is incorrectly grouped" do let(:source) do - <<-CASK.undent + <<~CASK cask 'foo' do arch arm: "arm64", intel: "x86_64" version :latest @@ -101,7 +101,7 @@ describe RuboCop::Cop::Cask::StanzaGrouping do CASK end let(:correct_source) do - <<-CASK.undent + <<~CASK cask 'foo' do arch arm: "arm64", intel: "x86_64" @@ -127,7 +127,7 @@ describe RuboCop::Cop::Cask::StanzaGrouping do context "when one variable assignment is incorrectly grouped" do let(:source) do - <<-CASK.undent + <<~CASK cask 'foo' do arch arm: "arm64", intel: "x86_64" folder = on_arch_conditional arm: "darwin-arm64", intel: "darwin" @@ -137,7 +137,7 @@ describe RuboCop::Cop::Cask::StanzaGrouping do CASK end let(:correct_source) do - <<-CASK.undent + <<~CASK cask 'foo' do arch arm: "arm64", intel: "x86_64" folder = on_arch_conditional arm: "darwin-arm64", intel: "darwin" @@ -164,7 +164,7 @@ describe RuboCop::Cop::Cask::StanzaGrouping do context "when many stanzas are incorrectly grouped" do let(:source) do - <<-CASK.undent + <<~CASK cask 'foo' do version :latest sha256 :no_check @@ -181,7 +181,7 @@ describe RuboCop::Cop::Cask::StanzaGrouping do CASK end let(:correct_source) do - <<-CASK.undent + <<~CASK cask 'foo' do version :latest sha256 :no_check @@ -232,7 +232,7 @@ describe RuboCop::Cop::Cask::StanzaGrouping do context "when many stanzas and variable assignments are incorrectly grouped" do let(:source) do - <<-CASK.undent + <<~CASK cask 'foo' do arch arm: "arm64", intel: "x86_64" folder = on_arch_conditional arm: "darwin-arm64", intel: "darwin" @@ -253,7 +253,7 @@ describe RuboCop::Cop::Cask::StanzaGrouping do CASK end let(:correct_source) do - <<-CASK.undent + <<~CASK cask 'foo' do arch arm: "arm64", intel: "x86_64" folder = on_arch_conditional arm: "darwin-arm64", intel: "darwin" @@ -320,7 +320,7 @@ describe RuboCop::Cop::Cask::StanzaGrouping do context "when caveats stanza is incorrectly grouped" do let(:source) do - format(<<-CASK.undent, caveats: caveats.strip) + format(<<~CASK, caveats: caveats.strip) cask 'foo' do version :latest sha256 :no_check @@ -332,7 +332,7 @@ describe RuboCop::Cop::Cask::StanzaGrouping do CASK end let(:correct_source) do - format(<<-CASK.undent, caveats: caveats.strip) + format(<<~CASK, caveats: caveats.strip) cask 'foo' do version :latest sha256 :no_check @@ -384,7 +384,7 @@ describe RuboCop::Cop::Cask::StanzaGrouping do context "when the postflight stanza is incorrectly grouped" do let(:source) do - <<-CASK.undent + <<~CASK cask 'foo' do version :latest sha256 :no_check @@ -398,7 +398,7 @@ describe RuboCop::Cop::Cask::StanzaGrouping do CASK end let(:correct_source) do - <<-CASK.undent + <<~CASK cask 'foo' do version :latest sha256 :no_check @@ -420,7 +420,7 @@ describe RuboCop::Cop::Cask::StanzaGrouping do context "when a stanza has a comment" do let(:source) do - <<-CASK.undent + <<~CASK cask 'foo' do version :latest sha256 :no_check @@ -437,7 +437,7 @@ describe RuboCop::Cop::Cask::StanzaGrouping do CASK end let(:correct_source) do - <<-CASK.undent + <<~CASK cask 'foo' do version :latest sha256 :no_check @@ -462,7 +462,7 @@ describe RuboCop::Cop::Cask::StanzaGrouping do context "when a stanza has a comment and there is a variable assignment" do let(:source) do - <<-CASK.undent + <<~CASK cask 'foo' do arch arm: "arm64", intel: "x86_64" folder = on_arch_conditional arm: "darwin-arm64", intel: "darwin" @@ -481,7 +481,7 @@ describe RuboCop::Cop::Cask::StanzaGrouping do CASK end let(:correct_source) do - <<-CASK.undent + <<~CASK cask 'foo' do arch arm: "arm64", intel: "x86_64" folder = on_arch_conditional arm: "darwin-arm64", intel: "darwin" @@ -509,7 +509,7 @@ describe RuboCop::Cop::Cask::StanzaGrouping do # TODO: detect incorrectly grouped stanzas in nested expressions context "when stanzas are nested in a conditional expression" do let(:source) do - <<-CASK.undent + <<~CASK cask 'foo' do if true version :latest diff --git a/Library/Homebrew/test/rubocops/cask/stanza_order_spec.rb b/Library/Homebrew/test/rubocops/cask/stanza_order_spec.rb index 8e512193a6..621ed194c9 100644 --- a/Library/Homebrew/test/rubocops/cask/stanza_order_spec.rb +++ b/Library/Homebrew/test/rubocops/cask/stanza_order_spec.rb @@ -11,7 +11,7 @@ describe RuboCop::Cop::Cask::StanzaOrder do context "when there is only one stanza" do let(:source) do - <<-CASK.undent + <<~CASK cask 'foo' do version :latest end @@ -23,7 +23,7 @@ describe RuboCop::Cop::Cask::StanzaOrder do context "when no stanzas are out of order" do let(:source) do - <<-CASK.undent + <<~CASK cask 'foo' do arch arm: "arm", intel: "x86_64" folder = on_arch_conditional arm: "darwin-arm64", intel: "darwin" @@ -39,7 +39,7 @@ describe RuboCop::Cop::Cask::StanzaOrder do context "when one pair of stanzas is out of order" do let(:source) do - <<-CASK.undent + <<~CASK cask 'foo' do sha256 :no_check version :latest @@ -47,7 +47,7 @@ describe RuboCop::Cop::Cask::StanzaOrder do CASK end let(:correct_source) do - <<-CASK.undent + <<~CASK cask 'foo' do version :latest sha256 :no_check @@ -77,7 +77,7 @@ describe RuboCop::Cop::Cask::StanzaOrder do context "when the arch stanza is out of order" do let(:source) do - <<-CASK.undent + <<~CASK cask 'foo' do version :latest sha256 :no_check @@ -86,7 +86,7 @@ describe RuboCop::Cop::Cask::StanzaOrder do CASK end let(:correct_source) do - <<-CASK.undent + <<~CASK cask 'foo' do arch arm: "arm", intel: "x86_64" version :latest @@ -123,7 +123,7 @@ describe RuboCop::Cop::Cask::StanzaOrder do context "when an arch variable assignment is out of order" do let(:source) do - <<-CASK.undent + <<~CASK cask 'foo' do arch arm: "arm", intel: "x86_64" sha256 :no_check @@ -133,7 +133,7 @@ describe RuboCop::Cop::Cask::StanzaOrder do CASK end let(:correct_source) do - <<-CASK.undent + <<~CASK cask 'foo' do arch arm: "arm", intel: "x86_64" folder = on_arch_conditional arm: "darwin-arm64", intel: "darwin" @@ -165,7 +165,7 @@ describe RuboCop::Cop::Cask::StanzaOrder do context "when an arch variable assignment is above the arch stanza" do let(:source) do - <<-CASK.undent + <<~CASK cask 'foo' do folder = on_arch_conditional arm: "darwin-arm64", intel: "darwin" arch arm: "arm", intel: "x86_64" @@ -175,7 +175,7 @@ describe RuboCop::Cop::Cask::StanzaOrder do CASK end let(:correct_source) do - <<-CASK.undent + <<~CASK cask 'foo' do arch arm: "arm", intel: "x86_64" folder = on_arch_conditional arm: "darwin-arm64", intel: "darwin" @@ -207,7 +207,7 @@ describe RuboCop::Cop::Cask::StanzaOrder do context "when many stanzas are out of order" do let(:source) do - <<-CASK.undent + <<~CASK cask 'foo' do url 'https://foo.brew.sh/foo.zip' uninstall :quit => 'com.example.foo', @@ -219,7 +219,7 @@ describe RuboCop::Cop::Cask::StanzaOrder do CASK end let(:correct_source) do - <<-CASK.undent + <<~CASK cask 'foo' do version :latest sha256 :no_check @@ -266,7 +266,7 @@ describe RuboCop::Cop::Cask::StanzaOrder do context "when a stanza appears multiple times" do let(:source) do - <<-CASK.undent + <<~CASK cask 'foo' do name 'Foo' url 'https://foo.brew.sh/foo.zip' @@ -279,7 +279,7 @@ describe RuboCop::Cop::Cask::StanzaOrder do CASK end let(:correct_source) do - <<-CASK.undent + <<~CASK cask 'foo' do version :latest sha256 :no_check @@ -299,7 +299,7 @@ describe RuboCop::Cop::Cask::StanzaOrder do context "when a stanza has a comment" do let(:source) do - <<-CASK.undent + <<~CASK cask 'foo' do version :latest # comment with an empty line between @@ -313,7 +313,7 @@ describe RuboCop::Cop::Cask::StanzaOrder do CASK end let(:correct_source) do - <<-CASK.undent + <<~CASK cask 'foo' do version :latest sha256 :no_check # comment on same line @@ -332,7 +332,7 @@ describe RuboCop::Cop::Cask::StanzaOrder do context "when a variable assignment is out of order with a comment" do let(:source) do - <<-CASK.undent + <<~CASK cask 'foo' do version :latest sha256 :no_check @@ -347,7 +347,7 @@ describe RuboCop::Cop::Cask::StanzaOrder do CASK end let(:correct_source) do - <<-CASK.undent + <<~CASK cask 'foo' do folder = on_arch_conditional arm: "darwin-arm64", intel: "darwin" # comment on same line version :latest @@ -367,7 +367,7 @@ describe RuboCop::Cop::Cask::StanzaOrder do context "when the caveats stanza is out of order" do let(:source) do - format(<<-CASK.undent, caveats: caveats.strip) + format(<<~CASK, caveats: caveats.strip) cask 'foo' do name 'Foo' url 'https://foo.brew.sh/foo.zip' @@ -379,7 +379,7 @@ describe RuboCop::Cop::Cask::StanzaOrder do CASK end let(:correct_source) do - format(<<-CASK.undent, caveats: caveats.strip) + format(<<~CASK, caveats: caveats.strip) cask 'foo' do version :latest sha256 :no_check @@ -428,7 +428,7 @@ describe RuboCop::Cop::Cask::StanzaOrder do context "when the postflight stanza is out of order" do let(:source) do - <<-CASK.undent + <<~CASK cask 'foo' do name 'Foo' url 'https://foo.brew.sh/foo.zip' @@ -442,7 +442,7 @@ describe RuboCop::Cop::Cask::StanzaOrder do CASK end let(:correct_source) do - <<-CASK.undent + <<~CASK cask 'foo' do version :latest sha256 :no_check @@ -462,7 +462,7 @@ describe RuboCop::Cop::Cask::StanzaOrder do # TODO: detect out-of-order stanzas in nested expressions context "when stanzas are nested in a conditional expression" do let(:source) do - <<-CASK.undent + <<~CASK cask 'foo' do if true sha256 :no_check diff --git a/Library/Homebrew/test/rubocops/cask/url_legacy_comma_separators_spec.rb b/Library/Homebrew/test/rubocops/cask/url_legacy_comma_separators_spec.rb index cd2ecee8e4..92e2054f3c 100644 --- a/Library/Homebrew/test/rubocops/cask/url_legacy_comma_separators_spec.rb +++ b/Library/Homebrew/test/rubocops/cask/url_legacy_comma_separators_spec.rb @@ -11,7 +11,7 @@ describe RuboCop::Cop::Cask::UrlLegacyCommaSeparators do context "when url version interpolation does not include version.before_comma or version.after_comma" do let(:source) do - <<-CASK.undent + <<~CASK cask 'foo' do version '1.1' url 'https://foo.brew.sh/foo-\#{version}.dmg' @@ -24,7 +24,7 @@ describe RuboCop::Cop::Cask::UrlLegacyCommaSeparators do context "when the url uses csv" do let(:source) do - <<-CASK.undent + <<~CASK cask 'foo' do version '1.1,111' url 'https://foo.brew.sh/foo-\#{version.csv.first}.dmg' @@ -37,7 +37,7 @@ describe RuboCop::Cop::Cask::UrlLegacyCommaSeparators do context "when the url uses version.before_comma" do let(:source) do - <<-CASK.undent + <<~CASK cask 'foo' do version '1.1,111' url 'https://foo.brew.sh/foo-\#{version.before_comma}.dmg' @@ -45,7 +45,7 @@ describe RuboCop::Cop::Cask::UrlLegacyCommaSeparators do CASK end let(:correct_source) do - <<-CASK.undent + <<~CASK cask 'foo' do version '1.1,111' url 'https://foo.brew.sh/foo-\#{version.csv.first}.dmg' @@ -70,7 +70,7 @@ describe RuboCop::Cop::Cask::UrlLegacyCommaSeparators do context "when the url uses version.after_comma" do let(:source) do - <<-CASK.undent + <<~CASK cask 'foo' do version '1.1,111' url 'https://foo.brew.sh/foo-\#{version.after_comma}.dmg' @@ -78,7 +78,7 @@ describe RuboCop::Cop::Cask::UrlLegacyCommaSeparators do CASK end let(:correct_source) do - <<-CASK.undent + <<~CASK cask 'foo' do version '1.1,111' url 'https://foo.brew.sh/foo-\#{version.csv.second}.dmg' diff --git a/Library/Homebrew/test/rubocops/cask/variables_spec.rb b/Library/Homebrew/test/rubocops/cask/variables_spec.rb index 96f44ef162..9959ee36e7 100644 --- a/Library/Homebrew/test/rubocops/cask/variables_spec.rb +++ b/Library/Homebrew/test/rubocops/cask/variables_spec.rb @@ -11,7 +11,7 @@ describe RuboCop::Cop::Cask::Variables do context "when there are no variables" do let(:source) do - <<-CASK.undent + <<~CASK cask "foo" do version :latest end @@ -23,7 +23,7 @@ describe RuboCop::Cop::Cask::Variables do context "when there is an arch stanza" do let(:source) do - <<-CASK.undent + <<~CASK cask "foo" do arch arm: "darwin-arm64", intel: "darwin" end @@ -35,7 +35,7 @@ describe RuboCop::Cop::Cask::Variables do context "when there is a non-arch variable that uses the arch conditional" do let(:source) do - <<-CASK.undent + <<~CASK cask "foo" do folder = on_arch_conditional arm: "darwin-arm64", intel: "darwin" end @@ -47,14 +47,14 @@ describe RuboCop::Cop::Cask::Variables do context "when there is an arch variable" do let(:source) do - <<-CASK.undent + <<~CASK cask 'foo' do arch = Hardware::CPU.intel? ? "darwin" : "darwin-arm64" end CASK end let(:correct_source) do - <<-CASK.undent + <<~CASK cask 'foo' do arch arm: "darwin-arm64", intel: "darwin" end @@ -78,14 +78,14 @@ describe RuboCop::Cop::Cask::Variables do context "when there is an arch variable that doesn't use strings" do let(:source) do - <<-CASK.undent + <<~CASK cask 'foo' do arch = Hardware::CPU.intel? ? :darwin : :darwin_arm64 end CASK end let(:correct_source) do - <<-CASK.undent + <<~CASK cask 'foo' do arch arm: :darwin_arm64, intel: :darwin end @@ -109,14 +109,14 @@ describe RuboCop::Cop::Cask::Variables do context "when there is an arch with an empty string" do let(:source) do - <<-CASK.undent + <<~CASK cask 'foo' do arch = Hardware::CPU.intel? ? "" : "arm64" end CASK end let(:correct_source) do - <<-CASK.undent + <<~CASK cask 'foo' do arch arm: "arm64" end @@ -140,14 +140,14 @@ describe RuboCop::Cop::Cask::Variables do context "when there is a non-arch variable" do let(:source) do - <<-CASK.undent + <<~CASK cask 'foo' do folder = Hardware::CPU.intel? ? "darwin" : "darwin-arm64" end CASK end let(:correct_source) do - <<-CASK.undent + <<~CASK cask 'foo' do folder = on_arch_conditional arm: "darwin-arm64", intel: "darwin" end @@ -171,14 +171,14 @@ describe RuboCop::Cop::Cask::Variables do context "when there is a non-arch variable with an empty string" do let(:source) do - <<-CASK.undent + <<~CASK cask 'foo' do folder = Hardware::CPU.intel? ? "amd64" : "" end CASK end let(:correct_source) do - <<-CASK.undent + <<~CASK cask 'foo' do folder = on_arch_conditional intel: "amd64" end @@ -202,7 +202,7 @@ describe RuboCop::Cop::Cask::Variables do context "when there is an arch and a non-arch variable" do let(:source) do - <<-CASK.undent + <<~CASK cask 'foo' do arch = Hardware::CPU.arm? ? "darwin-arm64" : "darwin" folder = Hardware::CPU.arm? ? "darwin-arm64" : "darwin" @@ -210,7 +210,7 @@ describe RuboCop::Cop::Cask::Variables do CASK end let(:correct_source) do - <<-CASK.undent + <<~CASK cask 'foo' do arch arm: "darwin-arm64", intel: "darwin" folder = on_arch_conditional arm: "darwin-arm64", intel: "darwin" @@ -242,7 +242,7 @@ describe RuboCop::Cop::Cask::Variables do context "when there are two non-arch variables" do let(:source) do - <<-CASK.undent + <<~CASK cask 'foo' do folder = Hardware::CPU.arm? ? "darwin-arm64" : "darwin" platform = Hardware::CPU.intel? ? "darwin": "darwin-arm64" @@ -250,7 +250,7 @@ describe RuboCop::Cop::Cask::Variables do CASK end let(:correct_source) do - <<-CASK.undent + <<~CASK cask 'foo' do folder = on_arch_conditional arm: "darwin-arm64", intel: "darwin" platform = on_arch_conditional arm: "darwin-arm64", intel: "darwin" From dc78e91edd2a361c3ebfa3179426995bff9568de Mon Sep 17 00:00:00 2001 From: Douglas Eichelberger Date: Fri, 27 Jan 2023 22:54:14 -0800 Subject: [PATCH 08/33] missed a few --- Library/Homebrew/test/rubocops/cask/stanza_grouping_spec.rb | 6 +++--- Library/Homebrew/test/rubocops/cask/stanza_order_spec.rb | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Library/Homebrew/test/rubocops/cask/stanza_grouping_spec.rb b/Library/Homebrew/test/rubocops/cask/stanza_grouping_spec.rb index 5f9bb403aa..605c99b1e5 100644 --- a/Library/Homebrew/test/rubocops/cask/stanza_grouping_spec.rb +++ b/Library/Homebrew/test/rubocops/cask/stanza_grouping_spec.rb @@ -355,8 +355,8 @@ describe RuboCop::Cop::Cask::StanzaGrouping do context "when caveats is a heredoc" do let(:caveats) do - <<-CAVEATS.undent - caveats <<-EOS.undent + <<~CAVEATS + caveats <<~EOS This is a multiline caveat. Let's hope it doesn't cause any problems! @@ -369,7 +369,7 @@ describe RuboCop::Cop::Cask::StanzaGrouping do context "when caveats is a block" do let(:caveats) do - <<-CAVEATS.undent + <<~CAVEATS caveats do puts 'This is a multiline caveat.' diff --git a/Library/Homebrew/test/rubocops/cask/stanza_order_spec.rb b/Library/Homebrew/test/rubocops/cask/stanza_order_spec.rb index 621ed194c9..9d515c275d 100644 --- a/Library/Homebrew/test/rubocops/cask/stanza_order_spec.rb +++ b/Library/Homebrew/test/rubocops/cask/stanza_order_spec.rb @@ -399,8 +399,8 @@ describe RuboCop::Cop::Cask::StanzaOrder do context "when caveats is a heredoc" do let(:caveats) do - <<-CAVEATS.undent - caveats <<-EOS.undent + <<~CAVEATS + caveats <<~EOS This is a multiline caveat. Let's hope it doesn't cause any problems! @@ -413,7 +413,7 @@ describe RuboCop::Cop::Cask::StanzaOrder do context "when caveats is a block" do let(:caveats) do - <<-CAVEATS.undent + <<~CAVEATS caveats do puts 'This is a multiline caveat.' From 220becda96e72dd2a7f6720657c5aabac1716d5a Mon Sep 17 00:00:00 2001 From: Douglas Eichelberger Date: Fri, 27 Jan 2023 22:55:38 -0800 Subject: [PATCH 09/33] =?UTF-8?q?remove=20undent=20=F0=9F=90=B5-patch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Library/Homebrew/rubocops/cask/extend/string.rb | 12 ------------ Library/Homebrew/rubocops/rubocop-cask.rb | 1 - 2 files changed, 13 deletions(-) delete mode 100644 Library/Homebrew/rubocops/cask/extend/string.rb diff --git a/Library/Homebrew/rubocops/cask/extend/string.rb b/Library/Homebrew/rubocops/cask/extend/string.rb deleted file mode 100644 index 3f71c87c2f..0000000000 --- a/Library/Homebrew/rubocops/cask/extend/string.rb +++ /dev/null @@ -1,12 +0,0 @@ -# typed: strict -# frozen_string_literal: true - -# Utility method extensions for String. -class String - extend T::Sig - - sig { returns(String) } - def undent - gsub(/^.{#{(slice(/^ +/) || '').length}}/, "") - end -end diff --git a/Library/Homebrew/rubocops/rubocop-cask.rb b/Library/Homebrew/rubocops/rubocop-cask.rb index b17c9c4494..ed7b7fe749 100644 --- a/Library/Homebrew/rubocops/rubocop-cask.rb +++ b/Library/Homebrew/rubocops/rubocop-cask.rb @@ -8,7 +8,6 @@ require_relative "cask/constants/stanza" require_relative "cask/ast/stanza" require_relative "cask/ast/cask_header" require_relative "cask/ast/cask_block" -require_relative "cask/extend/string" require_relative "cask/extend/node" require_relative "cask/mixin/cask_help" require_relative "cask/mixin/on_homepage_stanza" From 0f79b242033ceeb1aed734d228844dec6540638b Mon Sep 17 00:00:00 2001 From: Rylan Polster Date: Sat, 28 Jan 2023 01:05:54 -0600 Subject: [PATCH 10/33] Add `languages` to cask API --- Library/Homebrew/cask/cask.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/Library/Homebrew/cask/cask.rb b/Library/Homebrew/cask/cask.rb index 2e00a20a70..fa99aa836f 100644 --- a/Library/Homebrew/cask/cask.rb +++ b/Library/Homebrew/cask/cask.rb @@ -246,6 +246,7 @@ module Cask "conflicts_with" => conflicts_with, "container" => container&.pairs, "auto_updates" => auto_updates, + "languages" => languages, } end From 32a0877cad27ec49cf08b26c1bc53349cf4d63f6 Mon Sep 17 00:00:00 2001 From: Rylan Polster Date: Sat, 28 Jan 2023 02:15:00 -0600 Subject: [PATCH 11/33] Remove `CaskSource` API --- Library/Homebrew/api.rb | 8 ++++---- Library/Homebrew/api/cask-source.rb | 29 ---------------------------- Library/Homebrew/api/cask.rb | 11 ++++++++--- Library/Homebrew/cask/cask_loader.rb | 6 +++--- 4 files changed, 15 insertions(+), 39 deletions(-) delete mode 100644 Library/Homebrew/api/cask-source.rb diff --git a/Library/Homebrew/api.rb b/Library/Homebrew/api.rb index fefdd421fe..b365bdd1f0 100644 --- a/Library/Homebrew/api.rb +++ b/Library/Homebrew/api.rb @@ -3,7 +3,6 @@ require "api/analytics" require "api/cask" -require "api/cask-source" require "api/formula" require "api/versions" require "extend/cachable" @@ -57,12 +56,13 @@ module Homebrew end sig { params(token: String, git_head: T.nilable(String)).returns(String) } - def fetch_source(token, git_head: nil) + def fetch_file_source(filepath, repo:, git_head: nil) git_head ||= "master" - endpoint = "#{git_head}/Casks/#{token}.rb" + endpoint = "#{git_head}/#{filepath}" return cache[endpoint] if cache.present? && cache.key?(endpoint) - raw_url = "https://raw.githubusercontent.com/Homebrew/homebrew-cask/#{endpoint}" + raw_url = "https://raw.githubusercontent.com/#{repo}/#{endpoint}" + puts "Fetching #{raw_url}..." output = Utils::Curl.curl_output("--fail", raw_url, max_time: 5) raise ArgumentError, "No file found at #{Tty.underline}#{raw_url}#{Tty.reset}" unless output.success? diff --git a/Library/Homebrew/api/cask-source.rb b/Library/Homebrew/api/cask-source.rb deleted file mode 100644 index e0c6296c3f..0000000000 --- a/Library/Homebrew/api/cask-source.rb +++ /dev/null @@ -1,29 +0,0 @@ -# typed: false -# frozen_string_literal: true - -module Homebrew - module API - # Helper functions for using the cask source API. - # - # @api private - module CaskSource - class << self - extend T::Sig - - sig { params(token: String, git_head: T.nilable(String)).returns(Hash) } - def fetch(token, git_head: nil) - token = token.sub(%r{^homebrew/cask/}, "") - Homebrew::API.fetch_source token, git_head: git_head - end - - sig { params(token: String).returns(T::Boolean) } - def available?(token) - fetch token - true - rescue ArgumentError - false - end - end - end - end -end diff --git a/Library/Homebrew/api/cask.rb b/Library/Homebrew/api/cask.rb index f0ed248cdf..4f7c4b8e36 100644 --- a/Library/Homebrew/api/cask.rb +++ b/Library/Homebrew/api/cask.rb @@ -10,9 +10,14 @@ module Homebrew class << self extend T::Sig - sig { params(name: String).returns(Hash) } - def fetch(name) - Homebrew::API.fetch "cask/#{name}.json" + sig { params(token: String).returns(Hash) } + def fetch(token) + Homebrew::API.fetch "cask/#{token}.json" + end + + sig { params(token: String, git_head: T.nilable(String)).returns(String) } + def fetch_source(token, git_head: nil) + Homebrew::API.fetch_file_source "Casks/#{token}.rb", repo: "Homebrew/homebrew-cask", git_head: git_head end sig { returns(Hash) } diff --git a/Library/Homebrew/cask/cask_loader.rb b/Library/Homebrew/cask/cask_loader.rb index ad60176eb7..79f494a3bc 100644 --- a/Library/Homebrew/cask/cask_loader.rb +++ b/Library/Homebrew/cask/cask_loader.rb @@ -212,9 +212,9 @@ module Cask json_cask.deep_symbolize_keys! - # Use the cask-source API if there are any `*flight` blocks + # Download and use the cask source file if there are any `*flight` blocks if json_cask[:artifacts].any? { |artifact| FLIGHT_STANZAS.include?(artifact.keys.first) } - cask_source = Homebrew::API::CaskSource.fetch(token, git_head: json_cask[:tap_git_head]) + cask_source = Homebrew::API::Cask.fetch_source(token, git_head: json_cask[:tap_git_head]) return FromContentLoader.new(cask_source).load(config: config) end @@ -372,7 +372,7 @@ module Cask return loader_class.new(ref) end - if Homebrew::EnvConfig.install_from_api? && !need_path && Homebrew::API::CaskSource.available?(ref) + if Homebrew::EnvConfig.install_from_api? && !need_path && Homebrew::API::Cask.all_casks.key?(ref) return FromAPILoader.new(ref) end From 014b603b1f7c4731e1de0ebd27355f186438e285 Mon Sep 17 00:00:00 2001 From: Rylan Polster Date: Sat, 28 Jan 2023 02:15:05 -0600 Subject: [PATCH 12/33] Fix tests --- Library/Homebrew/test/api/cask_spec.rb | 10 ++++++++++ Library/Homebrew/test/api_spec.rb | 21 +++++++++++++++------ 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/Library/Homebrew/test/api/cask_spec.rb b/Library/Homebrew/test/api/cask_spec.rb index 35c561b8f9..b5dd7ec1f2 100644 --- a/Library/Homebrew/test/api/cask_spec.rb +++ b/Library/Homebrew/test/api/cask_spec.rb @@ -41,4 +41,14 @@ describe Homebrew::API::Cask do expect(casks_output).to eq casks_hash end end + + describe "::fetch_source" do + it "fetches the source of a cask (defaulting to master when no `git_head` is passed)" do + curl_output = OpenStruct.new(stdout: "foo", success?: true) + expect(Utils::Curl).to receive(:curl_output) + .with("--fail", "https://raw.githubusercontent.com/Homebrew/homebrew-cask/master/Casks/foo.rb", max_time: 5) + .and_return(curl_output) + described_class.fetch_source("foo", git_head: nil) + end + end end diff --git a/Library/Homebrew/test/api_spec.rb b/Library/Homebrew/test/api_spec.rb index ff695bfe77..6d639e5c0f 100644 --- a/Library/Homebrew/test/api_spec.rb +++ b/Library/Homebrew/test/api_spec.rb @@ -21,12 +21,6 @@ describe Homebrew::API do end describe "::fetch" do - it "fetches a text file" do - mock_curl_output stdout: text - fetched_text = described_class.fetch("foo.txt", json: false) - expect(fetched_text).to eq text - end - it "fetches a JSON file" do mock_curl_output stdout: json fetched_json = described_class.fetch("foo.json") @@ -70,4 +64,19 @@ describe Homebrew::API do }.to raise_error(SystemExit) end end + + describe "::fetch_file_source" do + it "fetches a file" do + mock_curl_output stdout: json + fetched_json = described_class.fetch_file_source("foo.json", repo: "Homebrew/homebrew-core", git_head: "master") + expect(fetched_json).to eq json + end + + it "raises an error if the file does not exist" do + mock_curl_output success: false + expect { + described_class.fetch_file_source("bar.txt", repo: "Homebrew/homebrew-core", git_head: "master") + }.to raise_error(ArgumentError, /No file found/) + end + end end From 2c78840f57af7773f7b3ba324ecc58781bc0a64f Mon Sep 17 00:00:00 2001 From: Rylan Polster Date: Sat, 28 Jan 2023 02:16:09 -0600 Subject: [PATCH 13/33] Fix typecheck issue --- Library/Homebrew/api.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/api.rb b/Library/Homebrew/api.rb index b365bdd1f0..49bb507b1d 100644 --- a/Library/Homebrew/api.rb +++ b/Library/Homebrew/api.rb @@ -55,7 +55,7 @@ module Homebrew end end - sig { params(token: String, git_head: T.nilable(String)).returns(String) } + sig { params(filepath: String, repo: String, git_head: T.nilable(String)).returns(String) } def fetch_file_source(filepath, repo:, git_head: nil) git_head ||= "master" endpoint = "#{git_head}/#{filepath}" From f38ac3943f2f381fb8f7a969c3531d8980757753 Mon Sep 17 00:00:00 2001 From: Rylan Polster Date: Sat, 28 Jan 2023 02:39:23 -0600 Subject: [PATCH 14/33] Fix tests --- Library/Homebrew/test/cask/cmd/list_spec.rb | 62 +++++++++++++++++++-- 1 file changed, 56 insertions(+), 6 deletions(-) diff --git a/Library/Homebrew/test/cask/cmd/list_spec.rb b/Library/Homebrew/test/cask/cmd/list_spec.rb index dc3c4a6609..8d397e19f4 100644 --- a/Library/Homebrew/test/cask/cmd/list_spec.rb +++ b/Library/Homebrew/test/cask/cmd/list_spec.rb @@ -84,7 +84,10 @@ describe Cask::Cmd::List, :cask do end describe "lists json" do - let(:casks) { ["local-caffeine", "local-transmission", "multiple-versions", "third-party/tap/third-party-cask"] } + let(:casks) { + ["local-caffeine", "local-transmission", "multiple-versions", "with-languages", + "third-party/tap/third-party-cask"] + } let(:expected_output) { <<~EOS [ @@ -124,7 +127,10 @@ describe Cask::Cmd::List, :cask do }, "conflicts_with": null, "container": null, - "auto_updates": null + "auto_updates": null, + "languages": [ + + ] }, { "token": "local-transmission", @@ -155,7 +161,10 @@ describe Cask::Cmd::List, :cask do }, "conflicts_with": null, "container": null, - "auto_updates": null + "auto_updates": null, + "languages": [ + + ] }, { "token": "multiple-versions", @@ -189,7 +198,10 @@ describe Cask::Cmd::List, :cask do }, "conflicts_with": null, "container": null, - "auto_updates": null + "auto_updates": null, + "languages": [ + + ] }, { "token": "third-party-cask", @@ -220,7 +232,45 @@ describe Cask::Cmd::List, :cask do }, "conflicts_with": null, "container": null, - "auto_updates": null + "auto_updates": null, + "languages": [ + + ] + }, + { + "token": "with-languages", + "full_token": "with-languages", + "tap": "homebrew/cask", + "name": [ + + ], + "desc": null, + "homepage": "https://brew.sh/", + "url": "file://#{TEST_FIXTURE_DIR}/cask/caffeine.zip", + "appcast": null, + "version": "1.2.3", + "versions": { + }, + "installed": "1.2.3", + "outdated": false, + "sha256": "xyz789", + "artifacts": [ + { + "app": [ + "Caffeine.app" + ] + } + ], + "caveats": null, + "depends_on": { + }, + "conflicts_with": null, + "container": null, + "auto_updates": null, + "languages": [ + "zh", + "en-US" + ] } ] EOS @@ -257,7 +307,7 @@ describe Cask::Cmd::List, :cask do it "of given Casks" do expect { described_class.run("--json", "local-caffeine", "local-transmission", "multiple-versions", - "third-party/tap/third-party-cask") + "third-party/tap/third-party-cask", "with-languages") }.to output(expected_output).to_stdout end end From 653930bed82858f14d49182aa7feedfccfbc4f09 Mon Sep 17 00:00:00 2001 From: hyuraku <32809703+hyuraku@users.noreply.github.com> Date: Sat, 28 Jan 2023 21:38:40 +0900 Subject: [PATCH 15/33] mv files to os/*/cmd/ --- Library/Homebrew/cmd/update-report.rb | 24 +------------ .../extend/os/linux/cmd/update-report.rb | 34 +++++++++++++++++++ .../extend/os/mac/{ => cmd}/update-report.rb | 0 Library/Homebrew/extend/os/update-report.rb | 6 +++- 4 files changed, 40 insertions(+), 24 deletions(-) create mode 100644 Library/Homebrew/extend/os/linux/cmd/update-report.rb rename Library/Homebrew/extend/os/mac/{ => cmd}/update-report.rb (100%) diff --git a/Library/Homebrew/cmd/update-report.rb b/Library/Homebrew/cmd/update-report.rb index 8855588e6b..1a0cd6ee4e 100644 --- a/Library/Homebrew/cmd/update-report.rb +++ b/Library/Homebrew/cmd/update-report.rb @@ -294,29 +294,7 @@ module Homebrew end def migrate_gcc_dependents_if_needed - return if Settings.read("gcc-rpaths.fixed") == "true" - - Formula.installed.each do |formula| - next unless formula.tap&.core_tap? - - recursive_runtime_dependencies = Dependency.expand( - formula, - cache_key: "update-report", - ) do |_, dependency| - Dependency.prune if dependency.build? || dependency.test? - end - next unless recursive_runtime_dependencies.map(&:name).include? "gcc" - - keg = formula.installed_kegs.last - tab = Tab.for_keg(keg) - # Force reinstallation upon `brew upgrade` to fix the bottle RPATH. - tab.source["versions"]["version_scheme"] = -1 - tab.write - rescue TapFormulaUnavailableError - nil - end - - Settings.write "gcc-rpaths.fixed", true + # do nothing end end diff --git a/Library/Homebrew/extend/os/linux/cmd/update-report.rb b/Library/Homebrew/extend/os/linux/cmd/update-report.rb new file mode 100644 index 0000000000..7471633287 --- /dev/null +++ b/Library/Homebrew/extend/os/linux/cmd/update-report.rb @@ -0,0 +1,34 @@ +# typed: false +# frozen_string_literal: true + +module Homebrew + extend T::Sig + + module_function + + def migrate_gcc_dependents_if_needed + return if Settings.read("gcc-rpaths.fixed") == "true" + + Formula.installed.each do |formula| + next unless formula.tap&.core_tap? + + recursive_runtime_dependencies = Dependency.expand( + formula, + cache_key: "update-report", + ) do |_, dependency| + Dependency.prune if dependency.build? || dependency.test? + end + next unless recursive_runtime_dependencies.map(&:name).include? "gcc" + + keg = formula.installed_kegs.last + tab = Tab.for_keg(keg) + # Force reinstallation upon `brew upgrade` to fix the bottle RPATH. + tab.source["versions"]["version_scheme"] = -1 + tab.write + rescue TapFormulaUnavailableError + nil + end + + Settings.write "gcc-rpaths.fixed", true + end +end diff --git a/Library/Homebrew/extend/os/mac/update-report.rb b/Library/Homebrew/extend/os/mac/cmd/update-report.rb similarity index 100% rename from Library/Homebrew/extend/os/mac/update-report.rb rename to Library/Homebrew/extend/os/mac/cmd/update-report.rb diff --git a/Library/Homebrew/extend/os/update-report.rb b/Library/Homebrew/extend/os/update-report.rb index 36f8a1eb01..ba0c9803bc 100644 --- a/Library/Homebrew/extend/os/update-report.rb +++ b/Library/Homebrew/extend/os/update-report.rb @@ -1,4 +1,8 @@ # typed: strict # frozen_string_literal: true -require "extend/os/mac/update-report" if OS.mac? +if OS.mac? + require "extend/os/mac/cmd/update-report" +elsif OS.linux? + require "extend/os/linux/cmd/update-report" +end From 1ce6a38730eea13a885e0e7704951004ae214ec4 Mon Sep 17 00:00:00 2001 From: Issy Long Date: Sat, 28 Jan 2023 12:54:48 +0000 Subject: [PATCH 16/33] cli/parser: Casks can be specified with `--cask` or `--casks` --- Library/Homebrew/cli/parser.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/cli/parser.rb b/Library/Homebrew/cli/parser.rb index 4c0b66d948..c0f82d7e9e 100644 --- a/Library/Homebrew/cli/parser.rb +++ b/Library/Homebrew/cli/parser.rb @@ -301,7 +301,7 @@ module Homebrew # If we accept formula options, but the command isn't scoped only # to casks, parse once allowing invalid options so we can get the # remaining list containing formula names. - if @formula_options && argv.exclude?("--cask") + if @formula_options && !only_casks?(argv) remaining, non_options = parse_remaining(argv, ignore_invalid_options: true) argv = [*remaining, "--", *non_options] @@ -640,6 +640,10 @@ module Homebrew end end.compact.uniq(&:name) end + + def only_casks?(argv) + argv.include?("--casks") || argv.include?("--cask") + end end class OptionConstraintError < UsageError From e98e668a34ab11757d847b8395662fd31c2b1c1c Mon Sep 17 00:00:00 2001 From: Douglas Eichelberger Date: Sat, 28 Jan 2023 08:20:36 -0800 Subject: [PATCH 17/33] remove redundant string extension --- Library/Homebrew/extend/string.rb | 4 ---- Library/Homebrew/global.rb | 2 -- Library/Homebrew/rubocops/conflicts.rb | 1 - Library/Homebrew/rubocops/extend/formula.rb | 1 - Library/Homebrew/rubocops/formula_desc.rb | 1 - Library/Homebrew/rubocops/patches.rb | 1 - 6 files changed, 10 deletions(-) delete mode 100644 Library/Homebrew/extend/string.rb diff --git a/Library/Homebrew/extend/string.rb b/Library/Homebrew/extend/string.rb deleted file mode 100644 index 21105e71f4..0000000000 --- a/Library/Homebrew/extend/string.rb +++ /dev/null @@ -1,4 +0,0 @@ -# typed: strict -# frozen_string_literal: true - -require "active_support/core_ext/object/blank" diff --git a/Library/Homebrew/global.rb b/Library/Homebrew/global.rb index ce6a84ee56..6291f4b17b 100644 --- a/Library/Homebrew/global.rb +++ b/Library/Homebrew/global.rb @@ -129,8 +129,6 @@ end.compact.freeze require "set" -require "extend/string" - require "system_command" require "exceptions" require "utils" diff --git a/Library/Homebrew/rubocops/conflicts.rb b/Library/Homebrew/rubocops/conflicts.rb index 757c6b5e95..411ba92e5c 100644 --- a/Library/Homebrew/rubocops/conflicts.rb +++ b/Library/Homebrew/rubocops/conflicts.rb @@ -2,7 +2,6 @@ # frozen_string_literal: true require "rubocops/extend/formula" -require "extend/string" module RuboCop module Cop diff --git a/Library/Homebrew/rubocops/extend/formula.rb b/Library/Homebrew/rubocops/extend/formula.rb index 89c513997f..a92d8a7780 100644 --- a/Library/Homebrew/rubocops/extend/formula.rb +++ b/Library/Homebrew/rubocops/extend/formula.rb @@ -1,7 +1,6 @@ # typed: false # frozen_string_literal: true -require "extend/string" require "rubocops/shared/helper_functions" module RuboCop diff --git a/Library/Homebrew/rubocops/formula_desc.rb b/Library/Homebrew/rubocops/formula_desc.rb index 771951f962..0093e752e1 100644 --- a/Library/Homebrew/rubocops/formula_desc.rb +++ b/Library/Homebrew/rubocops/formula_desc.rb @@ -3,7 +3,6 @@ require "rubocops/extend/formula" require "rubocops/shared/desc_helper" -require "extend/string" module RuboCop module Cop diff --git a/Library/Homebrew/rubocops/patches.rb b/Library/Homebrew/rubocops/patches.rb index 34518d1092..e16c370686 100644 --- a/Library/Homebrew/rubocops/patches.rb +++ b/Library/Homebrew/rubocops/patches.rb @@ -2,7 +2,6 @@ # frozen_string_literal: true require "rubocops/extend/formula" -require "extend/string" module RuboCop module Cop From c7755131270962e562a2ec2e9da7672edc10a204 Mon Sep 17 00:00:00 2001 From: Dawid Dziurla Date: Sat, 28 Jan 2023 22:09:17 +0100 Subject: [PATCH 18/33] docs: mention Linux on site description --- docs/_config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_config.yml b/docs/_config.yml index 22ff4b567a..5bbfa4eb37 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -1,5 +1,5 @@ title: Homebrew Documentation -description: Documentation for the missing package manager for macOS. +description: Documentation for the missing package manager for macOS (or Linux). remote_theme: Homebrew/brew.sh From a544d6fe6ad8406cc75318074f667757c13e6dc7 Mon Sep 17 00:00:00 2001 From: Patrick Linnane Date: Sat, 28 Jan 2023 19:29:18 -0800 Subject: [PATCH 19/33] docs: Remove Lion reference --- Library/Homebrew/env_config.rb | 3 +-- docs/Manpage.md | 2 -- manpages/brew.1 | 3 --- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/Library/Homebrew/env_config.rb b/Library/Homebrew/env_config.rb index 9b614b16e9..36cae77865 100644 --- a/Library/Homebrew/env_config.rb +++ b/Library/Homebrew/env_config.rb @@ -285,8 +285,7 @@ module Homebrew boolean: true, }, HOMEBREW_NO_EMOJI: { - description: "If set, do not print `HOMEBREW_INSTALL_BADGE` on a successful build." \ - "\n\n *Note:* Will only try to print emoji on OS X Lion or newer.", + description: "If set, do not print `HOMEBREW_INSTALL_BADGE` on a successful build.", boolean: true, }, HOMEBREW_NO_ENV_HINTS: { diff --git a/docs/Manpage.md b/docs/Manpage.md index dc9f84971e..b83b6d7423 100644 --- a/docs/Manpage.md +++ b/docs/Manpage.md @@ -2192,8 +2192,6 @@ example, run `export HOMEBREW_NO_INSECURE_REDIRECT=1` rather than just - `HOMEBREW_NO_EMOJI`
If set, do not print `HOMEBREW_INSTALL_BADGE` on a successful build. - *Note:* Will only try to print emoji on OS X Lion or newer. - - `HOMEBREW_NO_ENV_HINTS`
If set, do not print any hints about changing Homebrew's behaviour with environment variables. diff --git a/manpages/brew.1 b/manpages/brew.1 index ec06b94a4b..2956d11f3b 100644 --- a/manpages/brew.1 +++ b/manpages/brew.1 @@ -3220,9 +3220,6 @@ If set, disable all use of legacy compatibility code\. .br If set, do not print \fBHOMEBREW_INSTALL_BADGE\fR on a successful build\. . -.IP -\fINote:\fR Will only try to print emoji on OS X Lion or newer\. -. .TP \fBHOMEBREW_NO_ENV_HINTS\fR . From d457b635817f3dcc0f1298842fb3d32010fcee77 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Jan 2023 18:01:07 +0000 Subject: [PATCH 20/33] build(deps): bump tzinfo from 2.0.5 to 2.0.6 in /Library/Homebrew Bumps [tzinfo](https://github.com/tzinfo/tzinfo) from 2.0.5 to 2.0.6. - [Release notes](https://github.com/tzinfo/tzinfo/releases) - [Changelog](https://github.com/tzinfo/tzinfo/blob/master/CHANGES.md) - [Commits](https://github.com/tzinfo/tzinfo/compare/v2.0.5...v2.0.6) --- updated-dependencies: - dependency-name: tzinfo dependency-type: indirect update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Library/Homebrew/Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/Gemfile.lock b/Library/Homebrew/Gemfile.lock index e307d39754..c8af1a56f5 100644 --- a/Library/Homebrew/Gemfile.lock +++ b/Library/Homebrew/Gemfile.lock @@ -198,7 +198,7 @@ GEM thor (>= 1.2.0) yard-sorbet thor (1.2.1) - tzinfo (2.0.5) + tzinfo (2.0.6) concurrent-ruby (~> 1.0) unf (0.1.4) unf_ext From 268f3fc8ed2afa59170683d6aeeda5469b9f267e Mon Sep 17 00:00:00 2001 From: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com> Date: Mon, 30 Jan 2023 18:05:21 +0000 Subject: [PATCH 21/33] brew vendor-gems: commit updates. --- .../Homebrew/vendor/bundle/bundler/setup.rb | 2 +- .../tzinfo-2.0.5/lib/tzinfo/untaint_ext.rb | 18 --------- .../lib/tzinfo.rb | 8 +--- .../lib/tzinfo/annual_rules.rb | 0 .../lib/tzinfo/country.rb | 0 .../lib/tzinfo/country_timezone.rb | 0 .../lib/tzinfo/data_source.rb | 0 .../lib/tzinfo/data_sources.rb | 0 .../constant_offset_data_timezone_info.rb | 0 .../lib/tzinfo/data_sources/country_info.rb | 0 .../tzinfo/data_sources/data_timezone_info.rb | 0 .../data_sources/linked_timezone_info.rb | 0 .../data_sources/posix_time_zone_parser.rb | 8 +--- .../tzinfo/data_sources/ruby_data_source.rb | 6 +-- .../lib/tzinfo/data_sources/timezone_info.rb | 0 .../transitions_data_timezone_info.rb | 0 .../data_sources/zoneinfo_data_source.rb | 6 +-- .../tzinfo/data_sources/zoneinfo_reader.rb | 6 +-- .../lib/tzinfo/data_timezone.rb | 0 .../lib/tzinfo/datetime_with_offset.rb | 0 .../lib/tzinfo/format1.rb | 0 .../lib/tzinfo/format1/country_definer.rb | 0 .../format1/country_index_definition.rb | 0 .../lib/tzinfo/format1/timezone_definer.rb | 0 .../lib/tzinfo/format1/timezone_definition.rb | 0 .../format1/timezone_index_definition.rb | 0 .../lib/tzinfo/format2.rb | 0 .../lib/tzinfo/format2/country_definer.rb | 0 .../tzinfo/format2/country_index_definer.rb | 0 .../format2/country_index_definition.rb | 0 .../lib/tzinfo/format2/timezone_definer.rb | 0 .../lib/tzinfo/format2/timezone_definition.rb | 0 .../tzinfo/format2/timezone_index_definer.rb | 0 .../format2/timezone_index_definition.rb | 0 .../lib/tzinfo/info_timezone.rb | 0 .../lib/tzinfo/linked_timezone.rb | 0 .../lib/tzinfo/offset_timezone_period.rb | 0 .../lib/tzinfo/ruby_core_support.rb | 38 +++++++++++++++++++ .../lib/tzinfo/string_deduper.rb | 0 .../lib/tzinfo/time_with_offset.rb | 0 .../lib/tzinfo/timestamp.rb | 0 .../lib/tzinfo/timestamp_with_offset.rb | 0 .../lib/tzinfo/timezone.rb | 0 .../lib/tzinfo/timezone_offset.rb | 0 .../lib/tzinfo/timezone_period.rb | 0 .../lib/tzinfo/timezone_proxy.rb | 0 .../lib/tzinfo/timezone_transition.rb | 0 .../lib/tzinfo/transition_rule.rb | 0 .../lib/tzinfo/transitions_timezone_period.rb | 0 .../lib/tzinfo/version.rb | 2 +- .../lib/tzinfo/with_offset.rb | 0 51 files changed, 47 insertions(+), 47 deletions(-) delete mode 100644 Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/untaint_ext.rb rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{tzinfo-2.0.5 => tzinfo-2.0.6}/lib/tzinfo.rb (89%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{tzinfo-2.0.5 => tzinfo-2.0.6}/lib/tzinfo/annual_rules.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{tzinfo-2.0.5 => tzinfo-2.0.6}/lib/tzinfo/country.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{tzinfo-2.0.5 => tzinfo-2.0.6}/lib/tzinfo/country_timezone.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{tzinfo-2.0.5 => tzinfo-2.0.6}/lib/tzinfo/data_source.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{tzinfo-2.0.5 => tzinfo-2.0.6}/lib/tzinfo/data_sources.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{tzinfo-2.0.5 => tzinfo-2.0.6}/lib/tzinfo/data_sources/constant_offset_data_timezone_info.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{tzinfo-2.0.5 => tzinfo-2.0.6}/lib/tzinfo/data_sources/country_info.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{tzinfo-2.0.5 => tzinfo-2.0.6}/lib/tzinfo/data_sources/data_timezone_info.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{tzinfo-2.0.5 => tzinfo-2.0.6}/lib/tzinfo/data_sources/linked_timezone_info.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{tzinfo-2.0.5 => tzinfo-2.0.6}/lib/tzinfo/data_sources/posix_time_zone_parser.rb (94%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{tzinfo-2.0.5 => tzinfo-2.0.6}/lib/tzinfo/data_sources/ruby_data_source.rb (94%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{tzinfo-2.0.5 => tzinfo-2.0.6}/lib/tzinfo/data_sources/timezone_info.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{tzinfo-2.0.5 => tzinfo-2.0.6}/lib/tzinfo/data_sources/transitions_data_timezone_info.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{tzinfo-2.0.5 => tzinfo-2.0.6}/lib/tzinfo/data_sources/zoneinfo_data_source.rb (98%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{tzinfo-2.0.5 => tzinfo-2.0.6}/lib/tzinfo/data_sources/zoneinfo_reader.rb (98%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{tzinfo-2.0.5 => tzinfo-2.0.6}/lib/tzinfo/data_timezone.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{tzinfo-2.0.5 => tzinfo-2.0.6}/lib/tzinfo/datetime_with_offset.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{tzinfo-2.0.5 => tzinfo-2.0.6}/lib/tzinfo/format1.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{tzinfo-2.0.5 => tzinfo-2.0.6}/lib/tzinfo/format1/country_definer.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{tzinfo-2.0.5 => tzinfo-2.0.6}/lib/tzinfo/format1/country_index_definition.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{tzinfo-2.0.5 => tzinfo-2.0.6}/lib/tzinfo/format1/timezone_definer.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{tzinfo-2.0.5 => tzinfo-2.0.6}/lib/tzinfo/format1/timezone_definition.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{tzinfo-2.0.5 => tzinfo-2.0.6}/lib/tzinfo/format1/timezone_index_definition.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{tzinfo-2.0.5 => tzinfo-2.0.6}/lib/tzinfo/format2.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{tzinfo-2.0.5 => tzinfo-2.0.6}/lib/tzinfo/format2/country_definer.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{tzinfo-2.0.5 => tzinfo-2.0.6}/lib/tzinfo/format2/country_index_definer.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{tzinfo-2.0.5 => tzinfo-2.0.6}/lib/tzinfo/format2/country_index_definition.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{tzinfo-2.0.5 => tzinfo-2.0.6}/lib/tzinfo/format2/timezone_definer.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{tzinfo-2.0.5 => tzinfo-2.0.6}/lib/tzinfo/format2/timezone_definition.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{tzinfo-2.0.5 => tzinfo-2.0.6}/lib/tzinfo/format2/timezone_index_definer.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{tzinfo-2.0.5 => tzinfo-2.0.6}/lib/tzinfo/format2/timezone_index_definition.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{tzinfo-2.0.5 => tzinfo-2.0.6}/lib/tzinfo/info_timezone.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{tzinfo-2.0.5 => tzinfo-2.0.6}/lib/tzinfo/linked_timezone.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{tzinfo-2.0.5 => tzinfo-2.0.6}/lib/tzinfo/offset_timezone_period.rb (100%) create mode 100644 Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/ruby_core_support.rb rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{tzinfo-2.0.5 => tzinfo-2.0.6}/lib/tzinfo/string_deduper.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{tzinfo-2.0.5 => tzinfo-2.0.6}/lib/tzinfo/time_with_offset.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{tzinfo-2.0.5 => tzinfo-2.0.6}/lib/tzinfo/timestamp.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{tzinfo-2.0.5 => tzinfo-2.0.6}/lib/tzinfo/timestamp_with_offset.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{tzinfo-2.0.5 => tzinfo-2.0.6}/lib/tzinfo/timezone.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{tzinfo-2.0.5 => tzinfo-2.0.6}/lib/tzinfo/timezone_offset.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{tzinfo-2.0.5 => tzinfo-2.0.6}/lib/tzinfo/timezone_period.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{tzinfo-2.0.5 => tzinfo-2.0.6}/lib/tzinfo/timezone_proxy.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{tzinfo-2.0.5 => tzinfo-2.0.6}/lib/tzinfo/timezone_transition.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{tzinfo-2.0.5 => tzinfo-2.0.6}/lib/tzinfo/transition_rule.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{tzinfo-2.0.5 => tzinfo-2.0.6}/lib/tzinfo/transitions_timezone_period.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{tzinfo-2.0.5 => tzinfo-2.0.6}/lib/tzinfo/version.rb (83%) rename Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/{tzinfo-2.0.5 => tzinfo-2.0.6}/lib/tzinfo/with_offset.rb (100%) diff --git a/Library/Homebrew/vendor/bundle/bundler/setup.rb b/Library/Homebrew/vendor/bundle/bundler/setup.rb index 01fa40ae12..f124816604 100644 --- a/Library/Homebrew/vendor/bundle/bundler/setup.rb +++ b/Library/Homebrew/vendor/bundle/bundler/setup.rb @@ -26,7 +26,7 @@ end $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/concurrent-ruby-1.2.0/lib/concurrent-ruby") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/i18n-1.12.0/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/minitest-5.17.0/lib") -$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/tzinfo-2.0.5/lib") +$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/tzinfo-2.0.6/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/zeitwerk-2.6.6/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/activesupport-6.1.7.2/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/public_suffix-5.0.1/lib") diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/untaint_ext.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/untaint_ext.rb deleted file mode 100644 index 4e8d0c078a..0000000000 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/untaint_ext.rb +++ /dev/null @@ -1,18 +0,0 @@ -# encoding: UTF-8 -# frozen_string_literal: true - -module TZInfo - # Object#untaint is deprecated in Ruby >= 2.7 and will be removed in 3.2. - # UntaintExt adds a refinement to make Object#untaint a no-op and avoid the - # warning. - # - # @private - module UntaintExt # :nodoc: - refine Object do - def untaint - self - end - end - end - private_constant :UntaintExt -end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo.rb similarity index 89% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo.rb index b1b5344925..dc8e085601 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo.rb @@ -17,12 +17,8 @@ module TZInfo end end -# Object#untaint is a deprecated no-op in Ruby >= 2.7 and will be removed in -# 3.2. Add a refinement to either silence the warning, or supply the method if -# needed. -if !Object.new.respond_to?(:untaint) || RUBY_VERSION =~ /\A(\d+)\.(\d+)(?:\.|\z)/ && ($1 == '2' && $2.to_i >= 7 || $1.to_i >= 3) - require_relative 'tzinfo/untaint_ext' -end + +require_relative 'tzinfo/ruby_core_support' require_relative 'tzinfo/version' diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/annual_rules.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/annual_rules.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/annual_rules.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/annual_rules.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/country.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/country.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/country.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/country.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/country_timezone.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/country_timezone.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/country_timezone.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/country_timezone.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/data_source.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/data_source.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/data_source.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/data_source.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/data_sources.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/data_sources.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/data_sources.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/data_sources.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/data_sources/constant_offset_data_timezone_info.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/data_sources/constant_offset_data_timezone_info.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/data_sources/constant_offset_data_timezone_info.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/data_sources/constant_offset_data_timezone_info.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/data_sources/country_info.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/data_sources/country_info.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/data_sources/country_info.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/data_sources/country_info.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/data_sources/data_timezone_info.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/data_sources/data_timezone_info.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/data_sources/data_timezone_info.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/data_sources/data_timezone_info.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/data_sources/linked_timezone_info.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/data_sources/linked_timezone_info.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/data_sources/linked_timezone_info.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/data_sources/linked_timezone_info.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/data_sources/posix_time_zone_parser.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/data_sources/posix_time_zone_parser.rb similarity index 94% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/data_sources/posix_time_zone_parser.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/data_sources/posix_time_zone_parser.rb index b3d2b2e361..5583b43e4f 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/data_sources/posix_time_zone_parser.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/data_sources/posix_time_zone_parser.rb @@ -4,10 +4,6 @@ require 'strscan' module TZInfo - # Use send as a workaround for erroneous 'wrong number of arguments' errors - # with JRuby 9.0.5.0 when calling methods with Java implementations. See #114. - send(:using, UntaintExt) if TZInfo.const_defined?(:UntaintExt) - module DataSources # An {InvalidPosixTimeZone} exception is raised if an invalid POSIX-style # time zone string is encountered. @@ -43,12 +39,12 @@ module TZInfo s = StringScanner.new(tz_string) check_scan(s, /([^-+,\d<][^-+,\d]*) | <([^>]+)>/x) - std_abbrev = @string_deduper.dedupe((s[1] || s[2]).untaint) + std_abbrev = @string_deduper.dedupe(RubyCoreSupport.untaint(s[1] || s[2])) check_scan(s, /([-+]?\d+)(?::(\d+)(?::(\d+))?)?/) std_offset = get_offset_from_hms(s[1], s[2], s[3]) if s.scan(/([^-+,\d<][^-+,\d]*) | <([^>]+)>/x) - dst_abbrev = @string_deduper.dedupe((s[1] || s[2]).untaint) + dst_abbrev = @string_deduper.dedupe(RubyCoreSupport.untaint(s[1] || s[2])) if s.scan(/([-+]?\d+)(?::(\d+)(?::(\d+))?)?/) dst_offset = get_offset_from_hms(s[1], s[2], s[3]) diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/data_sources/ruby_data_source.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/data_sources/ruby_data_source.rb similarity index 94% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/data_sources/ruby_data_source.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/data_sources/ruby_data_source.rb index 9c12322567..41c384a4c5 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/data_sources/ruby_data_source.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/data_sources/ruby_data_source.rb @@ -2,10 +2,6 @@ # frozen_string_literal: true module TZInfo - # Use send as a workaround for erroneous 'wrong number of arguments' errors - # with JRuby 9.0.5.0 when calling methods with Java implementations. See #114. - send(:using, UntaintExt) if TZInfo.const_defined?(:UntaintExt) - module DataSources # A {TZInfoDataNotFound} exception is raised if the tzinfo-data gem could # not be found (i.e. `require 'tzinfo/data'` failed) when selecting the Ruby @@ -52,7 +48,7 @@ module TZInfo data_file = File.join('', 'tzinfo', 'data.rb') path = $".reverse_each.detect {|p| p.end_with?(data_file) } if path - @base_path = File.join(File.dirname(path), 'data').untaint + @base_path = RubyCoreSupport.untaint(File.join(File.dirname(path), 'data')) else @base_path = 'tzinfo/data' end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/data_sources/timezone_info.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/data_sources/timezone_info.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/data_sources/timezone_info.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/data_sources/timezone_info.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/data_sources/transitions_data_timezone_info.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/data_sources/transitions_data_timezone_info.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/data_sources/transitions_data_timezone_info.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/data_sources/transitions_data_timezone_info.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/data_sources/zoneinfo_data_source.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/data_sources/zoneinfo_data_source.rb similarity index 98% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/data_sources/zoneinfo_data_source.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/data_sources/zoneinfo_data_source.rb index cf77576f4c..4b7de32c98 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/data_sources/zoneinfo_data_source.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/data_sources/zoneinfo_data_source.rb @@ -2,10 +2,6 @@ # frozen_string_literal: true module TZInfo - # Use send as a workaround for erroneous 'wrong number of arguments' errors - # with JRuby 9.0.5.0 when calling methods with Java implementations. See #114. - send(:using, UntaintExt) if TZInfo.const_defined?(:UntaintExt) - module DataSources # An {InvalidZoneinfoDirectory} exception is raised if {ZoneinfoDataSource} # is initialized with a specific zoneinfo path that is not a valid zoneinfo @@ -444,7 +440,7 @@ module TZInfo end unless entry =~ /\./ || exclude.include?(entry) - entry.untaint + RubyCoreSupport.untaint(entry) path = dir + [entry] full_path = File.join(@zoneinfo_dir, *path) diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/data_sources/zoneinfo_reader.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/data_sources/zoneinfo_reader.rb similarity index 98% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/data_sources/zoneinfo_reader.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/data_sources/zoneinfo_reader.rb index ac82585c13..7f5988758c 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/data_sources/zoneinfo_reader.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/data_sources/zoneinfo_reader.rb @@ -2,10 +2,6 @@ # frozen_string_literal: true module TZInfo - # Use send as a workaround for erroneous 'wrong number of arguments' errors - # with JRuby 9.0.5.0 when calling methods with Java implementations. See #114. - send(:using, UntaintExt) if TZInfo.const_defined?(:UntaintExt) - module DataSources # An {InvalidZoneinfoFile} exception is raised if an attempt is made to load # an invalid zoneinfo file. @@ -448,7 +444,7 @@ module TZInfo abbrev_end = abbrev.index("\0", abbrev_start) raise InvalidZoneinfoFile, "Missing abbreviation null terminator in file '#{file.path}'." unless abbrev_end - abbr = @string_deduper.dedupe(abbrev[abbrev_start...abbrev_end].force_encoding(Encoding::UTF_8).untaint) + abbr = @string_deduper.dedupe(RubyCoreSupport.untaint(abbrev[abbrev_start...abbrev_end].force_encoding(Encoding::UTF_8))) TimezoneOffset.new(base_utc_offset, std_offset, abbr) end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/data_timezone.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/data_timezone.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/data_timezone.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/data_timezone.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/datetime_with_offset.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/datetime_with_offset.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/datetime_with_offset.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/datetime_with_offset.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/format1.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/format1.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/format1.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/format1.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/format1/country_definer.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/format1/country_definer.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/format1/country_definer.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/format1/country_definer.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/format1/country_index_definition.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/format1/country_index_definition.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/format1/country_index_definition.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/format1/country_index_definition.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/format1/timezone_definer.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/format1/timezone_definer.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/format1/timezone_definer.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/format1/timezone_definer.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/format1/timezone_definition.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/format1/timezone_definition.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/format1/timezone_definition.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/format1/timezone_definition.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/format1/timezone_index_definition.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/format1/timezone_index_definition.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/format1/timezone_index_definition.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/format1/timezone_index_definition.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/format2.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/format2.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/format2.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/format2.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/format2/country_definer.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/format2/country_definer.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/format2/country_definer.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/format2/country_definer.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/format2/country_index_definer.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/format2/country_index_definer.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/format2/country_index_definer.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/format2/country_index_definer.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/format2/country_index_definition.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/format2/country_index_definition.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/format2/country_index_definition.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/format2/country_index_definition.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/format2/timezone_definer.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/format2/timezone_definer.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/format2/timezone_definer.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/format2/timezone_definer.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/format2/timezone_definition.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/format2/timezone_definition.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/format2/timezone_definition.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/format2/timezone_definition.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/format2/timezone_index_definer.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/format2/timezone_index_definer.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/format2/timezone_index_definer.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/format2/timezone_index_definer.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/format2/timezone_index_definition.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/format2/timezone_index_definition.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/format2/timezone_index_definition.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/format2/timezone_index_definition.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/info_timezone.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/info_timezone.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/info_timezone.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/info_timezone.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/linked_timezone.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/linked_timezone.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/linked_timezone.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/linked_timezone.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/offset_timezone_period.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/offset_timezone_period.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/offset_timezone_period.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/offset_timezone_period.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/ruby_core_support.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/ruby_core_support.rb new file mode 100644 index 0000000000..9e43e3c91e --- /dev/null +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/ruby_core_support.rb @@ -0,0 +1,38 @@ +module TZInfo + + # Methods to support different versions of Ruby. + # + # @private + module RubyCoreSupport #:nodoc: + class << self + # Object#untaint is deprecated and becomes a no-op in Ruby >= 2.7. It has + # been removed from Ruby 3.2. + if !Object.new.respond_to?(:untaint) || RUBY_VERSION =~ /\A(\d+)\.(\d+)(?:\.|\z)/ && ($1 == '2' && $2.to_i >= 7 || $1.to_i >= 3) + # :nocov_functional_untaint: + + # Returns the supplied `Object` + # + # @param o [Object] the `Object` to untaint. + # @return [Object] `o`. + def untaint(o) + o + end + + # :nocov_functional_untaint: + else + # :nocov_no_functional_untaint: + + # Untaints and returns the supplied `Object`. + # + # @param o [Object] the `Object` to untaint. + # @return [Object] `o`. + def untaint(o) + o.untaint + end + + # :nocov_no_functional_untaint: + end + end + end + private_constant :RubyCoreSupport +end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/string_deduper.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/string_deduper.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/string_deduper.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/string_deduper.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/time_with_offset.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/time_with_offset.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/time_with_offset.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/time_with_offset.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/timestamp.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/timestamp.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/timestamp.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/timestamp.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/timestamp_with_offset.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/timestamp_with_offset.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/timestamp_with_offset.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/timestamp_with_offset.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/timezone.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/timezone.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/timezone.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/timezone.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/timezone_offset.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/timezone_offset.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/timezone_offset.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/timezone_offset.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/timezone_period.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/timezone_period.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/timezone_period.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/timezone_period.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/timezone_proxy.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/timezone_proxy.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/timezone_proxy.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/timezone_proxy.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/timezone_transition.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/timezone_transition.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/timezone_transition.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/timezone_transition.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/transition_rule.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/transition_rule.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/transition_rule.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/transition_rule.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/transitions_timezone_period.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/transitions_timezone_period.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/transitions_timezone_period.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/transitions_timezone_period.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/version.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/version.rb similarity index 83% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/version.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/version.rb index 1b1599423f..35eba04623 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/version.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/version.rb @@ -3,5 +3,5 @@ module TZInfo # The TZInfo version number. - VERSION = '2.0.5' + VERSION = '2.0.6' end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/with_offset.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/with_offset.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.5/lib/tzinfo/with_offset.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/tzinfo-2.0.6/lib/tzinfo/with_offset.rb From a63c289d88dc8caaa521570325669a0cffd10f5e Mon Sep 17 00:00:00 2001 From: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com> Date: Mon, 30 Jan 2023 18:12:20 +0000 Subject: [PATCH 22/33] Update RBI files for tzinfo. Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gems.yml) workflow. --- .../sorbet/rbi/gems/{tzinfo@2.0.5.rbi => tzinfo@2.0.6.rbi} | 6 ++++++ 1 file changed, 6 insertions(+) rename Library/Homebrew/sorbet/rbi/gems/{tzinfo@2.0.5.rbi => tzinfo@2.0.6.rbi} (99%) diff --git a/Library/Homebrew/sorbet/rbi/gems/tzinfo@2.0.5.rbi b/Library/Homebrew/sorbet/rbi/gems/tzinfo@2.0.6.rbi similarity index 99% rename from Library/Homebrew/sorbet/rbi/gems/tzinfo@2.0.5.rbi rename to Library/Homebrew/sorbet/rbi/gems/tzinfo@2.0.6.rbi index 144492478e..aef693d945 100644 --- a/Library/Homebrew/sorbet/rbi/gems/tzinfo@2.0.5.rbi +++ b/Library/Homebrew/sorbet/rbi/gems/tzinfo@2.0.6.rbi @@ -579,6 +579,12 @@ end class TZInfo::PeriodNotFound < ::StandardError; end +module TZInfo::RubyCoreSupport + class << self + def untaint(o); end + end +end + class TZInfo::StringDeduper def initialize; end From 93fd448c6cb79d45316b18ac90fbec29685c7789 Mon Sep 17 00:00:00 2001 From: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> Date: Wed, 1 Feb 2023 10:48:45 +0800 Subject: [PATCH 23/33] version: fix bad regexps in version parsers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The character class `[.-v]` is interpreted as all the characters between `.` and `v`, which is clearly not what is intended here. Here's an example of what this fixes. Before: ❯ brew ruby -e 'puts Version.detect("https://github.com/llvm/llvm-project/releases/download/llvmorg-16.0.0-rc1/llvm-project-16.0.0rc1.src.tar.xz")' 6.0.0rc1 After: ❯ brew ruby -e 'puts Version.detect("https://github.com/llvm/llvm-project/releases/download/llvmorg-16.0.0-rc1/llvm-project-16.0.0rc1.src.tar.xz")' 16.0.0rc1 The problem here is that `1` is a match for `/[.-v]/`. ❯ brew ruby -e 'puts /[.-v]/.match("1")' 1 --- Library/Homebrew/version.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/version.rb b/Library/Homebrew/version.rb index d94b51f84a..e665bd6d0b 100644 --- a/Library/Homebrew/version.rb +++ b/Library/Homebrew/version.rb @@ -467,7 +467,7 @@ class Version # e.g. https://github.com/dlang/dmd/archive/v2.074.0-beta1.tar.gz # e.g. https://github.com/dlang/dmd/archive/v2.074.0-rc1.tar.gz # e.g. https://github.com/premake/premake-core/releases/download/v5.0.0-alpha10/premake-5.0.0-alpha10-src.zip - StemParser.new(/[.-vV]?(#{NUMERIC_WITH_DOTS}#{PRERELEASE_SUFFIX})/), + StemParser.new(/[-.vV]?(#{NUMERIC_WITH_DOTS}#{PRERELEASE_SUFFIX})/), # e.g. foobar4.5.1 StemParser.new(/(#{NUMERIC_WITH_OPTIONAL_DOTS})$/), @@ -505,7 +505,7 @@ class Version StemParser.new(/\.v(\d+[a-z]?)/), # e.g. https://secure.php.net/get/php-7.1.10.tar.bz2/from/this/mirror - UrlParser.new(/[.-vV]?(#{NUMERIC_WITH_DOTS}#{PRERELEASE_SUFFIX}?)/), + UrlParser.new(/[-.vV]?(#{NUMERIC_WITH_DOTS}#{PRERELEASE_SUFFIX}?)/), ].freeze private_constant :VERSION_PARSERS From e1700178bd6a58aec56f1e534269c03f7497a4c6 Mon Sep 17 00:00:00 2001 From: Dawid Dziurla Date: Wed, 1 Feb 2023 13:51:18 +0100 Subject: [PATCH 24/33] brew.sh: add missing dev-cmd aliases --- Library/Homebrew/brew.sh | 4 ++++ Library/Homebrew/commands.rb | 2 ++ 2 files changed, 6 insertions(+) diff --git a/Library/Homebrew/brew.sh b/Library/Homebrew/brew.sh index 537c9c6dc4..4e9188be37 100644 --- a/Library/Homebrew/brew.sh +++ b/Library/Homebrew/brew.sh @@ -689,6 +689,8 @@ done HOMEBREW_ARG_COUNT="$#" HOMEBREW_COMMAND="$1" shift +# If you are going to change anything in below case statement, +# be sure to also update HOMEBREW_INTERNAL_COMMAND_ALIASES hash in commands.rb case "${HOMEBREW_COMMAND}" in ls) HOMEBREW_COMMAND="list" ;; homepage) HOMEBREW_COMMAND="home" ;; @@ -705,6 +707,8 @@ case "${HOMEBREW_COMMAND}" in environment) HOMEBREW_COMMAND="--env" ;; --config) HOMEBREW_COMMAND="config" ;; -v) HOMEBREW_COMMAND="--version" ;; + lc) HOMEBREW_COMMAND="livecheck" ;; + tc) HOMEBREW_COMMAND="typecheck" ;; esac # Set HOMEBREW_DEV_CMD_RUN for users who have run a development command. diff --git a/Library/Homebrew/commands.rb b/Library/Homebrew/commands.rb index 383c5cb768..188ac295e2 100644 --- a/Library/Homebrew/commands.rb +++ b/Library/Homebrew/commands.rb @@ -11,6 +11,8 @@ module Commands HOMEBREW_CMD_PATH = (HOMEBREW_LIBRARY_PATH/"cmd").freeze HOMEBREW_DEV_CMD_PATH = (HOMEBREW_LIBRARY_PATH/"dev-cmd").freeze + # If you are going to change anything in below hash, + # be sure to also update appropriate case statement in brew.sh HOMEBREW_INTERNAL_COMMAND_ALIASES = { "ls" => "list", "homepage" => "home", From 6945cd7da48ebb114a9de3cffbd2b8f2293a4093 Mon Sep 17 00:00:00 2001 From: hyuraku <32809703+hyuraku@users.noreply.github.com> Date: Thu, 2 Feb 2023 18:50:09 +0900 Subject: [PATCH 25/33] - remove mac/cmd/update-report - repair if condition - repair require filename --- Library/Homebrew/cmd/update-report.rb | 2 +- Library/Homebrew/extend/os/mac/cmd/update-report.rb | 12 ------------ Library/Homebrew/extend/os/update-report.rb | 4 +--- 3 files changed, 2 insertions(+), 16 deletions(-) delete mode 100644 Library/Homebrew/extend/os/mac/cmd/update-report.rb diff --git a/Library/Homebrew/cmd/update-report.rb b/Library/Homebrew/cmd/update-report.rb index 1a0cd6ee4e..474db0052d 100644 --- a/Library/Homebrew/cmd/update-report.rb +++ b/Library/Homebrew/cmd/update-report.rb @@ -9,7 +9,7 @@ require "description_cache_store" require "cli/parser" require "settings" require "linuxbrew-core-migration" -require "extend/os/update-report" +require "extend/os/cmd/update-report" module Homebrew extend T::Sig diff --git a/Library/Homebrew/extend/os/mac/cmd/update-report.rb b/Library/Homebrew/extend/os/mac/cmd/update-report.rb deleted file mode 100644 index a7e8ce393d..0000000000 --- a/Library/Homebrew/extend/os/mac/cmd/update-report.rb +++ /dev/null @@ -1,12 +0,0 @@ -# typed: false -# frozen_string_literal: true - -module Homebrew - extend T::Sig - - module_function - - def migrate_gcc_dependents_if_needed - # do nothing - end -end diff --git a/Library/Homebrew/extend/os/update-report.rb b/Library/Homebrew/extend/os/update-report.rb index ba0c9803bc..d7bc3784df 100644 --- a/Library/Homebrew/extend/os/update-report.rb +++ b/Library/Homebrew/extend/os/update-report.rb @@ -1,8 +1,6 @@ # typed: strict # frozen_string_literal: true -if OS.mac? - require "extend/os/mac/cmd/update-report" -elsif OS.linux? +if OS.linux? require "extend/os/linux/cmd/update-report" end From 4caee38388cd14dd818ce1982981cd0a64ec86be Mon Sep 17 00:00:00 2001 From: hyuraku <32809703+hyuraku@users.noreply.github.com> Date: Thu, 2 Feb 2023 19:00:13 +0900 Subject: [PATCH 26/33] mv extend/os update-report --- Library/Homebrew/extend/os/{ => cmd}/update-report.rb | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Library/Homebrew/extend/os/{ => cmd}/update-report.rb (100%) diff --git a/Library/Homebrew/extend/os/update-report.rb b/Library/Homebrew/extend/os/cmd/update-report.rb similarity index 100% rename from Library/Homebrew/extend/os/update-report.rb rename to Library/Homebrew/extend/os/cmd/update-report.rb From a57b9e7bdfea68239e94f8dbef07c5a1e4a3a7f1 Mon Sep 17 00:00:00 2001 From: hyuraku <32809703+hyuraku@users.noreply.github.com> Date: Thu, 2 Feb 2023 19:03:05 +0900 Subject: [PATCH 27/33] repair if style --- Library/Homebrew/extend/os/cmd/update-report.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Library/Homebrew/extend/os/cmd/update-report.rb b/Library/Homebrew/extend/os/cmd/update-report.rb index d7bc3784df..59a67f04ce 100644 --- a/Library/Homebrew/extend/os/cmd/update-report.rb +++ b/Library/Homebrew/extend/os/cmd/update-report.rb @@ -1,6 +1,4 @@ # typed: strict # frozen_string_literal: true -if OS.linux? - require "extend/os/linux/cmd/update-report" -end +require "extend/os/linux/cmd/update-report" if OS.linux? From 1c1c1623e24eab2c51b004db1a21561f080c9c9d Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Thu, 2 Feb 2023 12:19:44 +0000 Subject: [PATCH 28/33] test/cask/cmd/list: add tap_git_head. --- Library/Homebrew/test/cask/cmd/list_spec.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Library/Homebrew/test/cask/cmd/list_spec.rb b/Library/Homebrew/test/cask/cmd/list_spec.rb index 8d397e19f4..3c1518cafc 100644 --- a/Library/Homebrew/test/cask/cmd/list_spec.rb +++ b/Library/Homebrew/test/cask/cmd/list_spec.rb @@ -128,6 +128,7 @@ describe Cask::Cmd::List, :cask do "conflicts_with": null, "container": null, "auto_updates": null, + "tap_git_head": null, "languages": [ ] @@ -162,6 +163,7 @@ describe Cask::Cmd::List, :cask do "conflicts_with": null, "container": null, "auto_updates": null, + "tap_git_head": null, "languages": [ ] @@ -199,6 +201,7 @@ describe Cask::Cmd::List, :cask do "conflicts_with": null, "container": null, "auto_updates": null, + "tap_git_head": null, "languages": [ ] @@ -233,6 +236,7 @@ describe Cask::Cmd::List, :cask do "conflicts_with": null, "container": null, "auto_updates": null, + "tap_git_head": null, "languages": [ ] @@ -267,6 +271,7 @@ describe Cask::Cmd::List, :cask do "conflicts_with": null, "container": null, "auto_updates": null, + "tap_git_head": null, "languages": [ "zh", "en-US" From 46fc4f9f1bb18995a007b9a18be41b9bc4f2c285 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Thu, 2 Feb 2023 14:49:33 +0000 Subject: [PATCH 29/33] Don't allow HOMEBREW_INSTALL_FROM_API when building from source When either being in a non-default prefix or being on an unsupported macOS version we expect most things to be built from source. In that environment, do not allow HOMEBREW_INSTALL_FROM_API to be set. Fixes #14475 --- Library/Homebrew/.rubocop.yml | 2 +- Library/Homebrew/brew.rb | 2 +- Library/Homebrew/brew.sh | 10 +++++++++- Library/Homebrew/env_config.rb | 7 ++++++- Library/Homebrew/exceptions.rb | 2 +- Library/Homebrew/os.rb | 5 +++++ docs/Installation.md | 2 ++ docs/Manpage.md | 2 +- manpages/brew.1 | 2 +- 9 files changed, 27 insertions(+), 7 deletions(-) diff --git a/Library/Homebrew/.rubocop.yml b/Library/Homebrew/.rubocop.yml index 93171a34df..3e5a81360f 100644 --- a/Library/Homebrew/.rubocop.yml +++ b/Library/Homebrew/.rubocop.yml @@ -41,7 +41,7 @@ Metrics/PerceivedComplexity: Metrics/MethodLength: Max: 232 Metrics/ModuleLength: - Max: 463 + Max: 466 Exclude: # TODO: extract more of the bottling logic - "dev-cmd/bottle.rb" diff --git a/Library/Homebrew/brew.rb b/Library/Homebrew/brew.rb index a279381289..20f54ac932 100644 --- a/Library/Homebrew/brew.rb +++ b/Library/Homebrew/brew.rb @@ -199,7 +199,7 @@ rescue MethodDeprecatedError => e exit 1 rescue Exception => e # rubocop:disable Lint/RescueException onoe e - if internal_cmd && defined?(OS::ISSUES_URL) + if internal_cmd && !OS.unsupported_configuration? if Homebrew::EnvConfig.no_auto_update? $stderr.puts "#{Tty.bold}Do not report this issue until you've run `brew update` and tried again.#{Tty.reset}" else diff --git a/Library/Homebrew/brew.sh b/Library/Homebrew/brew.sh index 4e9188be37..a290600c56 100644 --- a/Library/Homebrew/brew.sh +++ b/Library/Homebrew/brew.sh @@ -771,13 +771,21 @@ To turn developer mode off, run $(bold "brew developer off") fi # Test HOMEBREW_INSTALL_FROM_API on HOMEBREW_DEV_CMD_RUN and HOMEBREW_DEVELOPER -# folks who haven't run a HOMEBREW_DEVELOPER_COMMAND. +# folks who haven't run a HOMEBREW_DEVELOPER_COMMAND if they are in a default +# prefix and on a supported macOS version. if [[ -z "${HOMEBREW_NO_INSTALL_FROM_API}" && -z "${HOMEBREW_INSTALL_FROM_API}" && -z "${HOMEBREW_DEVELOPER_COMMAND}" ]] && + [[ -z "${HOMEBREW_MACOS_VERSION_NUMERIC}" || + "${HOMEBREW_MACOS_VERSION_NUMERIC}" -ge "110000" ]] && + [[ "${HOMEBREW_PREFIX}" == "/usr/local" || + "${HOMEBREW_PREFIX}" == "/opt/homebrew" || + "${HOMEBREW_PREFIX}" == "/home/linuxbrew/.linuxbrew" ]] && [[ -n "${HOMEBREW_DEV_CMD_RUN}" || -n "${HOMEBREW_DEVELOPER}" ]] then export HOMEBREW_INSTALL_FROM_API=1 +else + unset HOMEBREW_INSTALL_FROM_API fi if [[ -f "${HOMEBREW_LIBRARY}/Homebrew/cmd/${HOMEBREW_COMMAND}.sh" ]] diff --git a/Library/Homebrew/env_config.rb b/Library/Homebrew/env_config.rb index 36cae77865..0324f6facf 100644 --- a/Library/Homebrew/env_config.rb +++ b/Library/Homebrew/env_config.rb @@ -226,7 +226,9 @@ module Homebrew }, HOMEBREW_INSTALL_FROM_API: { description: "If set, install formulae and casks in homebrew/core and homebrew/cask taps using Homebrew's " \ - "API instead of needing (large, slow) local checkouts of these repositories.", + "API instead of needing (large, slow) local checkouts of these repositories. Note, this will " \ + "only take effect in supported configurations (i.e. using the default Homebrew prefix and, " \ + "if on macOS, on a supported version).", boolean: true, }, HOMEBREW_LIVECHECK_WATCHLIST: { @@ -484,6 +486,9 @@ module Homebrew sig { returns(T::Boolean) } def install_from_api? + return false if OS.unsupported_configuration? + return false unless Homebrew.default_prefix? + ENV["HOMEBREW_NO_INSTALL_FROM_API"].blank? && ENV["HOMEBREW_INSTALL_FROM_API"].present? end end diff --git a/Library/Homebrew/exceptions.rb b/Library/Homebrew/exceptions.rb index 4641684b08..c8690e3f1d 100644 --- a/Library/Homebrew/exceptions.rb +++ b/Library/Homebrew/exceptions.rb @@ -524,7 +524,7 @@ class BuildError < RuntimeError end end - if formula.tap && defined?(OS::ISSUES_URL) + if formula.tap && !OS.unsupported_configuration? if formula.tap.official? puts Formatter.error(Formatter.url(OS::ISSUES_URL), label: "READ THIS") elsif (issues_url = formula.tap.issues_url) diff --git a/Library/Homebrew/os.rb b/Library/Homebrew/os.rb index 13ee649519..c0e7fbbec0 100644 --- a/Library/Homebrew/os.rb +++ b/Library/Homebrew/os.rb @@ -69,4 +69,9 @@ module OS ISSUES_URL = "https://docs.brew.sh/Troubleshooting" PATH_OPEN = "xdg-open" end + + sig { returns(T::Boolean) } + def self.unsupported_configuration? + !defined?(OS::ISSUES_URL) + end end diff --git a/docs/Installation.md b/docs/Installation.md index b4dc435a68..bb905abc5d 100644 --- a/docs/Installation.md +++ b/docs/Installation.md @@ -36,6 +36,8 @@ export HOMEBREW_INSTALL_FROM_API=1 This will make Homebrew install formulae and casks from the `homebrew/core` and `homebrew/cask` taps using Homebrew’s API instead of local checkouts of these repositories. +Note, this will take effect in supported configurations (i.e. using the default Homebrew prefix and, if on macOS, on a supported version). + ## Unattended installation If you want a non-interactive run of the Homebrew installer that doesn't prompt for passwords (e.g. in automation scripts), prepend [`NONINTERACTIVE=1`](https://github.com/Homebrew/install/#install-homebrew-on-macos-or-linux) to the installation command. diff --git a/docs/Manpage.md b/docs/Manpage.md index b83b6d7423..479aeefeae 100644 --- a/docs/Manpage.md +++ b/docs/Manpage.md @@ -2149,7 +2149,7 @@ example, run `export HOMEBREW_NO_INSECURE_REDIRECT=1` rather than just *Default:* The "Beer Mug" emoji. - `HOMEBREW_INSTALL_FROM_API` -
If set, install formulae and casks in homebrew/core and homebrew/cask taps using Homebrew's API instead of needing (large, slow) local checkouts of these repositories. +
If set, install formulae and casks in homebrew/core and homebrew/cask taps using Homebrew's API instead of needing (large, slow) local checkouts of these repositories. Note, this will only take effect in supported configurations (i.e. using the default Homebrew prefix and, if on macOS, on a supported version). - `HOMEBREW_LIVECHECK_WATCHLIST`
Consult this file for the list of formulae to check by default when no formula argument is passed to `brew livecheck`. diff --git a/manpages/brew.1 b/manpages/brew.1 index 2956d11f3b..2cd136a037 100644 --- a/manpages/brew.1 +++ b/manpages/brew.1 @@ -3140,7 +3140,7 @@ Print this text before the installation summary of each successful build\. \fBHOMEBREW_INSTALL_FROM_API\fR . .br -If set, install formulae and casks in homebrew/core and homebrew/cask taps using Homebrew\'s API instead of needing (large, slow) local checkouts of these repositories\. +If set, install formulae and casks in homebrew/core and homebrew/cask taps using Homebrew\'s API instead of needing (large, slow) local checkouts of these repositories\. Note, this will only take effect in supported configurations (i\.e\. using the default Homebrew prefix and, if on macOS, on a supported version)\. . .TP \fBHOMEBREW_LIVECHECK_WATCHLIST\fR From 41ad2eba1583239919620d334391eb383caedc72 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Thu, 2 Feb 2023 17:09:25 +0000 Subject: [PATCH 30/33] update-maintainers/manpages: not all PLC are maintainers. So list all maintainers separately. --- Library/Homebrew/dev-cmd/update-maintainers.rb | 11 +++++------ Library/Homebrew/manpages.rb | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Library/Homebrew/dev-cmd/update-maintainers.rb b/Library/Homebrew/dev-cmd/update-maintainers.rb index c5751e85a6..2b76426e55 100644 --- a/Library/Homebrew/dev-cmd/update-maintainers.rb +++ b/Library/Homebrew/dev-cmd/update-maintainers.rb @@ -28,11 +28,10 @@ module Homebrew public_members = GitHub.public_member_usernames("Homebrew") members = { - plc: GitHub.members_by_team("Homebrew", "plc"), - tsc: GitHub.members_by_team("Homebrew", "tsc"), + plc: GitHub.members_by_team("Homebrew", "plc"), + tsc: GitHub.members_by_team("Homebrew", "tsc"), + maintainers: GitHub.members_by_team("Homebrew", "maintainers"), } - members[:other] = GitHub.members_by_team("Homebrew", "maintainers") - .except(*members.values.map(&:keys).flatten.uniq) sentences = {} members.each do |group, hash| @@ -48,8 +47,8 @@ module Homebrew "\\1 is #{sentences[:plc]}.") content.gsub!(/(Homebrew's \[Technical Steering Committee.*) is .*\./, "\\1 is #{sentences[:tsc]}.") - content.gsub!(/(Homebrew's other current maintainers are).*\./, - "\\1 #{sentences[:other]}.") + content.gsub!(/(Homebrew's maintainers are).*\./, + "\\1 #{sentences[:maintainers]}.") File.write(readme, content) diff --git a/Library/Homebrew/manpages.rb b/Library/Homebrew/manpages.rb index 9dab44b850..e410587c56 100644 --- a/Library/Homebrew/manpages.rb +++ b/Library/Homebrew/manpages.rb @@ -48,7 +48,7 @@ module Homebrew readme.read[/(Homebrew's \[Technical Steering Committee.*\.)/, 1] .gsub(/\[([^\]]+)\]\([^)]+\)/, '\1') variables[:maintainers] = - readme.read[/(Homebrew's other current maintainers .*\.)/, 1] + readme.read[/(Homebrew's maintainers .*\.)/, 1] .gsub(/\[([^\]]+)\]\([^)]+\)/, '\1') variables[:alumni] = readme.read[/(Former maintainers .*\.)/, 1] From 705fe01cda2a076beb4ed1d807ba0e496016c416 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Thu, 2 Feb 2023 17:09:52 +0000 Subject: [PATCH 31/33] Update maintainers. --- README.md | 4 ++-- docs/Manpage.md | 4 ++-- manpages/brew.1 | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 5b9736c7e0..e633ddb6f3 100644 --- a/README.md +++ b/README.md @@ -45,9 +45,9 @@ Homebrew's [Project Leadership Committee](https://docs.brew.sh/Homebrew-Governan Homebrew's [Technical Steering Committee](https://docs.brew.sh/Homebrew-Governance#7-technical-steering-committee) is [Bo Anderson](https://github.com/Bo98), [FX Coudert](https://github.com/fxcoudert), [Michka Popoff](https://github.com/iMichka), [Mike McQuaid](https://github.com/MikeMcQuaid) and [Rylan Polster](https://github.com/Rylan12). -Homebrew's other current maintainers are [Alexander Bayandin](https://github.com/bayandin), [Bevan Kay](https://github.com/bevanjkay), [Branch Vincent](https://github.com/branchvincent), [Caleb Xu](https://github.com/alebcay), [Carlo Cabrera](https://github.com/carlocab), [Daniel Nachun](https://github.com/danielnachun), [Dawid Dziurla](https://github.com/dawidd6), [Dustin Rodrigues](https://github.com/dtrodrigues), [Eric Knibbe](https://github.com/EricFromCanada), [George Adams](https://github.com/gdams), [Markus Reiter](https://github.com/reitermarkus), [Maxim Belkin](https://github.com/maxim-belkin), [Miccal Matthews](https://github.com/miccal), [Michael Cho](https://github.com/cho-m), [Nanda H Krishna](https://github.com/nandahkrishna), [Patrick Linnane](https://github.com/p-linnane), [Randall](https://github.com/ran-dall), [Rui Chen](https://github.com/chenrui333), [Sam Ford](https://github.com/samford), [Shaun Jackman](https://github.com/sjackman), [Steve Peters](https://github.com/scpeters), [Thierry Moisan](https://github.com/Moisan) and [Vítor Galvão](https://github.com/vitorgalvao). +Homebrew's maintainers are [Alexander Bayandin](https://github.com/bayandin), [Bevan Kay](https://github.com/bevanjkay), [Bo Anderson](https://github.com/Bo98), [Branch Vincent](https://github.com/branchvincent), [Caleb Xu](https://github.com/alebcay), [Carlo Cabrera](https://github.com/carlocab), [Daniel Nachun](https://github.com/danielnachun), [Dawid Dziurla](https://github.com/dawidd6), [Dustin Rodrigues](https://github.com/dtrodrigues), [Eric Knibbe](https://github.com/EricFromCanada), [FX Coudert](https://github.com/fxcoudert), [George Adams](https://github.com/gdams), [Issy Long](https://github.com/issyl0), [Miccal Matthews](https://github.com/miccal), [Michael Cho](https://github.com/cho-m), [Michka Popoff](https://github.com/iMichka), [Mike McQuaid](https://github.com/MikeMcQuaid), [Nanda H Krishna](https://github.com/nandahkrishna), [Patrick Linnane](https://github.com/p-linnane), [Rui Chen](https://github.com/chenrui333), [Rylan Polster](https://github.com/Rylan12), [Sam Ford](https://github.com/samford), [Sean Molenaar](https://github.com/SMillerDev) and [Thierry Moisan](https://github.com/Moisan). -Former maintainers with significant contributions include [Claudia Pellegrino](https://github.com/claui), [Seeker](https://github.com/SeekingMeaning), [William Woodruff](https://github.com/woodruffw), [Jan Viljanen](https://github.com/javian), [JCount](https://github.com/jcount), [commitay](https://github.com/commitay), [Dominyk Tiller](https://github.com/DomT4), [Tim Smith](https://github.com/tdsmith), [Baptiste Fontaine](https://github.com/bfontaine), [Xu Cheng](https://github.com/xu-cheng), [Martin Afanasjew](https://github.com/UniqMartin), [Brett Koonce](https://github.com/asparagui), [Charlie Sharpsteen](https://github.com/Sharpie), [Jack Nagel](https://github.com/jacknagel), [Adam Vandenberg](https://github.com/adamv), [Andrew Janke](https://github.com/apjanke), [Alex Dunn](https://github.com/dunn), [neutric](https://github.com/neutric), [Tomasz Pajor](https://github.com/nijikon), [Uladzislau Shablinski](https://github.com/vladshablinsky), [Alyssa Ross](https://github.com/alyssais), [ilovezfs](https://github.com/ilovezfs), [Chongyu Zhu](https://github.com/lembacon) and Homebrew's creator: [Max Howell](https://github.com/mxcl). +Former maintainers with significant contributions include [Misty De Méo](https://github.com/mistydemeo), [Markus Reiter](https://github.com/reitermarkus), [Shaun Jackman](https://github.com/sjackman), [Vítor Galvão](https://github.com/vitorgalvao), [Claudia Pellegrino](https://github.com/claui), [Seeker](https://github.com/SeekingMeaning), [William Woodruff](https://github.com/woodruffw), [Jan Viljanen](https://github.com/javian), [JCount](https://github.com/jcount), [commitay](https://github.com/commitay), [Dominyk Tiller](https://github.com/DomT4), [Tim Smith](https://github.com/tdsmith), [Baptiste Fontaine](https://github.com/bfontaine), [Xu Cheng](https://github.com/xu-cheng), [Martin Afanasjew](https://github.com/UniqMartin), [Brett Koonce](https://github.com/asparagui), [Charlie Sharpsteen](https://github.com/Sharpie), [Jack Nagel](https://github.com/jacknagel), [Adam Vandenberg](https://github.com/adamv), [Andrew Janke](https://github.com/apjanke), [Alex Dunn](https://github.com/dunn), [neutric](https://github.com/neutric), [Tomasz Pajor](https://github.com/nijikon), [Uladzislau Shablinski](https://github.com/vladshablinsky), [Alyssa Ross](https://github.com/alyssais), [ilovezfs](https://github.com/ilovezfs), [Chongyu Zhu](https://github.com/lembacon) and Homebrew's creator: [Max Howell](https://github.com/mxcl). ## Community diff --git a/docs/Manpage.md b/docs/Manpage.md index 479aeefeae..fb1d15e43b 100644 --- a/docs/Manpage.md +++ b/docs/Manpage.md @@ -2308,9 +2308,9 @@ Homebrew's Project Leadership Committee is Issy Long, Jonathan Chang, Mike McQua Homebrew's Technical Steering Committee is Bo Anderson, FX Coudert, Michka Popoff, Mike McQuaid and Rylan Polster. -Homebrew's other current maintainers are Alexander Bayandin, Bevan Kay, Branch Vincent, Caleb Xu, Carlo Cabrera, Daniel Nachun, Dawid Dziurla, Dustin Rodrigues, Eric Knibbe, George Adams, Markus Reiter, Maxim Belkin, Miccal Matthews, Michael Cho, Nanda H Krishna, Patrick Linnane, Randall, Rui Chen, Sam Ford, Shaun Jackman, Steve Peters, Thierry Moisan and Vítor Galvão. +Homebrew's maintainers are Alexander Bayandin, Bevan Kay, Bo Anderson, Branch Vincent, Caleb Xu, Carlo Cabrera, Daniel Nachun, Dawid Dziurla, Dustin Rodrigues, Eric Knibbe, FX Coudert, George Adams, Issy Long, Miccal Matthews, Michael Cho, Michka Popoff, Mike McQuaid, Nanda H Krishna, Patrick Linnane, Rui Chen, Rylan Polster, Sam Ford, Sean Molenaar and Thierry Moisan. -Former maintainers with significant contributions include Claudia Pellegrino, Seeker, William Woodruff, Jan Viljanen, JCount, commitay, Dominyk Tiller, Tim Smith, Baptiste Fontaine, Xu Cheng, Martin Afanasjew, Brett Koonce, Charlie Sharpsteen, Jack Nagel, Adam Vandenberg, Andrew Janke, Alex Dunn, neutric, Tomasz Pajor, Uladzislau Shablinski, Alyssa Ross, ilovezfs, Chongyu Zhu and Homebrew's creator: Max Howell. +Former maintainers with significant contributions include Misty De Méo, Markus Reiter, Shaun Jackman, Vítor Galvão, Claudia Pellegrino, Seeker, William Woodruff, Jan Viljanen, JCount, commitay, Dominyk Tiller, Tim Smith, Baptiste Fontaine, Xu Cheng, Martin Afanasjew, Brett Koonce, Charlie Sharpsteen, Jack Nagel, Adam Vandenberg, Andrew Janke, Alex Dunn, neutric, Tomasz Pajor, Uladzislau Shablinski, Alyssa Ross, ilovezfs, Chongyu Zhu and Homebrew's creator: Max Howell. ## BUGS diff --git a/manpages/brew.1 b/manpages/brew.1 index 2cd136a037..c6fef33c1d 100644 --- a/manpages/brew.1 +++ b/manpages/brew.1 @@ -3435,10 +3435,10 @@ Homebrew\'s Project Leadership Committee is Issy Long, Jonathan Chang, Mike McQu Homebrew\'s Technical Steering Committee is Bo Anderson, FX Coudert, Michka Popoff, Mike McQuaid and Rylan Polster\. . .P -Homebrew\'s other current maintainers are Alexander Bayandin, Bevan Kay, Branch Vincent, Caleb Xu, Carlo Cabrera, Daniel Nachun, Dawid Dziurla, Dustin Rodrigues, Eric Knibbe, George Adams, Markus Reiter, Maxim Belkin, Miccal Matthews, Michael Cho, Nanda H Krishna, Patrick Linnane, Randall, Rui Chen, Sam Ford, Shaun Jackman, Steve Peters, Thierry Moisan and Vitor Galvao\. +Homebrew\'s maintainers are Alexander Bayandin, Bevan Kay, Bo Anderson, Branch Vincent, Caleb Xu, Carlo Cabrera, Daniel Nachun, Dawid Dziurla, Dustin Rodrigues, Eric Knibbe, FX Coudert, George Adams, Issy Long, Miccal Matthews, Michael Cho, Michka Popoff, Mike McQuaid, Nanda H Krishna, Patrick Linnane, Rui Chen, Rylan Polster, Sam Ford, Sean Molenaar and Thierry Moisan\. . .P -Former maintainers with significant contributions include Claudia Pellegrino, Seeker, William Woodruff, Jan Viljanen, JCount, commitay, Dominyk Tiller, Tim Smith, Baptiste Fontaine, Xu Cheng, Martin Afanasjew, Brett Koonce, Charlie Sharpsteen, Jack Nagel, Adam Vandenberg, Andrew Janke, Alex Dunn, neutric, Tomasz Pajor, Uladzislau Shablinski, Alyssa Ross, ilovezfs, Chongyu Zhu and Homebrew\'s creator: Max Howell\. +Former maintainers with significant contributions include Misty De Meo, Markus Reiter, Shaun Jackman, Vitor Galvao, Claudia Pellegrino, Seeker, William Woodruff, Jan Viljanen, JCount, commitay, Dominyk Tiller, Tim Smith, Baptiste Fontaine, Xu Cheng, Martin Afanasjew, Brett Koonce, Charlie Sharpsteen, Jack Nagel, Adam Vandenberg, Andrew Janke, Alex Dunn, neutric, Tomasz Pajor, Uladzislau Shablinski, Alyssa Ross, ilovezfs, Chongyu Zhu and Homebrew\'s creator: Max Howell\. . .SH "BUGS" See our issues on GitHub: From 0ed2ef92cc7a63d200b60956958882cfe0565e4c Mon Sep 17 00:00:00 2001 From: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com> Date: Fri, 3 Feb 2023 00:28:00 +0000 Subject: [PATCH 32/33] sorbet: Update RBI files. Autogenerated by the [sorbet](https://github.com/Homebrew/brew/blob/master/.github/workflows/sorbet.yml) workflow. --- Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi b/Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi index 9740395b18..1400c1d7a7 100644 --- a/Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi +++ b/Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi @@ -4390,10 +4390,6 @@ module Homebrew::API::Cask extend ::T::Private::Methods::SingletonMethodHooks end -module Homebrew::API::CaskSource - extend ::T::Private::Methods::SingletonMethodHooks -end - module Homebrew::API::Formula extend ::T::Private::Methods::SingletonMethodHooks end From 8060360333966c3f1755c1f68512d18dfb435416 Mon Sep 17 00:00:00 2001 From: apainintheneck Date: Thu, 2 Feb 2023 19:58:03 -0800 Subject: [PATCH 33/33] Fix supported version check HOMEBREW_PREFIX is a Pathname; HOMEBREW_DEFAULT_PREFIX and HOMEBREW_MACOS_ARM_DEFAULT_PREFIX are strings. --- Library/Homebrew/os.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/os.rb b/Library/Homebrew/os.rb index c0e7fbbec0..b1d38b0669 100644 --- a/Library/Homebrew/os.rb +++ b/Library/Homebrew/os.rb @@ -59,8 +59,8 @@ module OS if !OS::Mac.version.prerelease? && !OS::Mac.version.outdated_release? && ARGV.none? { |v| v.start_with?("--cc=") } && - (HOMEBREW_PREFIX == HOMEBREW_DEFAULT_PREFIX || - (HOMEBREW_PREFIX == HOMEBREW_MACOS_ARM_DEFAULT_PREFIX && Hardware::CPU.arm?)) + (HOMEBREW_PREFIX.to_s == HOMEBREW_DEFAULT_PREFIX || + (HOMEBREW_PREFIX.to_s == HOMEBREW_MACOS_ARM_DEFAULT_PREFIX && Hardware::CPU.arm?)) ISSUES_URL = "https://docs.brew.sh/Troubleshooting" end PATH_OPEN = "/usr/bin/open"