language stringclasses 1
value | owner stringlengths 2 15 | repo stringlengths 2 21 | sha stringlengths 45 45 | message stringlengths 7 36.3k | path stringlengths 1 199 | patch stringlengths 15 102k | is_multipart bool 2
classes |
|---|---|---|---|---|---|---|---|
Other | Homebrew | brew | 00909fc282a30eede83eddd77e8725951d40e33e.json | Update RBI files for rubocop-sorbet. | Library/Homebrew/sorbet/rbi/gems/rubocop-sorbet@0.6.8.rbi | @@ -20,7 +20,8 @@ class RuboCop::Cop::Sorbet::BindingConstantWithoutTypeAlias < ::RuboCop::Cop::Co
def autocorrect(node); end
def binding_unaliased_type?(param0 = T.unsafe(nil)); end
def dynamic_type_creation_with_block?(param0 = T.unsafe(nil)); end
- def generic_parameter_decl?(param0 = T.unsafe(nil)); end
+ def generic_parameter_decl_block_call?(param0 = T.unsafe(nil)); end
+ def generic_parameter_decl_call?(param0 = T.unsafe(nil)); end
def method_needing_aliasing_on_t?(param0); end
def not_dynamic_type_creation_with_block?(node); end
def not_generic_parameter_decl?(node); end
@@ -192,6 +193,14 @@ class RuboCop::Cop::Sorbet::KeywordArgumentOrdering < ::RuboCop::Cop::Sorbet::Si
def check_order_for_kwoptargs(parameters); end
end
+module RuboCop::Cop::Sorbet::MutableConstantSorbetAwareBehaviour
+ def on_assignment(value); end
+
+ class << self
+ def prepended(base); end
+ end
+end
+
class RuboCop::Cop::Sorbet::OneAncestorPerLine < ::RuboCop::Cop::Cop
def abstract?(param0); end
def autocorrect(node); end | true |
Other | Homebrew | brew | 00909fc282a30eede83eddd77e8725951d40e33e.json | Update RBI files for rubocop-sorbet. | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -5239,6 +5239,11 @@ class RuboCop::Cop::FormulaCop
def required_dependency_name?(param0, param1); end
end
+class RuboCop::Cop::Style::MutableConstant
+ include ::RuboCop::Cop::Sorbet::MutableConstantSorbetAwareBehaviour
+ def t_let(param0=T.unsafe(nil)); end
+end
+
module RuboCop::RSpec::ExpectOffense
def expect_correction(correction, loop: T.unsafe(nil), source: T.unsafe(nil)); end
| true |
Other | Homebrew | brew | 0d818645971a59527c4205408c9f2f49afb12a6e.json | Use file.dirname in most cleaner tests | Library/Homebrew/test/cleaner_spec.rb | @@ -96,7 +96,7 @@
it "removes '.la' files" do
file = f.lib/"foo.la"
- f.lib.mkpath
+ file.dirname.mkpath
touch file
cleaner.clean
@@ -107,7 +107,7 @@
it "removes 'perllocal' files" do
file = f.lib/"perl5/darwin-thread-multi-2level/perllocal.pod"
- (f.lib/"perl5/darwin-thread-multi-2level").mkpath
+ file.dirname.mkpath
touch file
cleaner.clean
@@ -118,7 +118,7 @@
it "removes '.packlist' files" do
file = f.lib/"perl5/darwin-thread-multi-2level/auto/test/.packlist"
- (f.lib/"perl5/darwin-thread-multi-2level/auto/test").mkpath
+ file.dirname.mkpath
touch file
cleaner.clean
@@ -129,7 +129,7 @@
it "removes 'charset.alias' files" do
file = f.lib/"charset.alias"
- f.lib.mkpath
+ file.dirname.mkpath
touch file
cleaner.clean | false |
Other | Homebrew | brew | fbb3ccbfd6d6ea896bf1ae7b5f20ea8c267511fe.json | Keep `info/#{f.name}/dir` files in cleaner
Still cleans `info/dir` and `info/<arch>/dir` files.
Fixes https://github.com/Homebrew/homebrew-core/issues/100190 | Library/Homebrew/cleaner.rb | @@ -31,7 +31,7 @@ def clean
# Get rid of any info 'dir' files, so they don't conflict at the link stage
Dir.glob(@f.info/"**/dir").each do |f|
info_dir_file = Pathname(f)
- observe_file_removal info_dir_file if info_dir_file.file? && !@f.skip_clean?(info_dir_file)
+ observe_file_removal info_dir_file if info_dir_file.file? && info_dir_file != Pathname("#{@f.info}/#{@f.name}/dir") && !@f.skip_clean?(info_dir_file)
end
rewrite_shebangs | true |
Other | Homebrew | brew | fbb3ccbfd6d6ea896bf1ae7b5f20ea8c267511fe.json | Keep `info/#{f.name}/dir` files in cleaner
Still cleans `info/dir` and `info/<arch>/dir` files.
Fixes https://github.com/Homebrew/homebrew-core/issues/100190 | Library/Homebrew/test/cleaner_spec.rb | @@ -136,6 +136,26 @@
expect(file).not_to exist
end
+
+ it "removes 'info/**/dir' files except for 'info/<name>/dir'" do
+ file = f.info/"dir"
+ arch_file = f.info/"i686-elf/dir"
+ name_file = f.info/"#{f.name}/dir"
+
+ f.info.mkpath
+ (f.info/"i686-elf").mkpath
+ (f.info/"#{f.name}").mkpath
+
+ touch file
+ touch arch_file
+ touch name_file
+
+ cleaner.clean
+
+ expect(file).not_to exist
+ expect(arch_file).not_to exist
+ expect(name_file).to exist
+ end
end
describe "::skip_clean" do | true |
Other | Homebrew | brew | 0cc880c038991cff3d51bd326495d34fb15689ba.json | Update RBI files for activesupport. | Library/Homebrew/sorbet/rbi/gems/activesupport@6.1.5.1.rbi | @@ -2784,6 +2784,7 @@ end
module ActiveSupport::VERSION; end
ActiveSupport::VERSION::MAJOR = T.let(T.unsafe(nil), Integer)
ActiveSupport::VERSION::MINOR = T.let(T.unsafe(nil), Integer)
+ActiveSupport::VERSION::PRE = T.let(T.unsafe(nil), String)
ActiveSupport::VERSION::STRING = T.let(T.unsafe(nil), String)
ActiveSupport::VERSION::TINY = T.let(T.unsafe(nil), Integer)
@@ -3086,20 +3087,26 @@ module ERB::Util
def html_escape_once(s); end
def json_escape(s); end
def unwrapped_html_escape(s); end
+ def xml_name_escape(name); end
class << self
def h(s); end
def html_escape(s); end
def html_escape_once(s); end
def json_escape(s); end
def unwrapped_html_escape(s); end
+ def xml_name_escape(name); end
end
end
ERB::Util::HTML_ESCAPE = T.let(T.unsafe(nil), Hash)
ERB::Util::HTML_ESCAPE_ONCE_REGEXP = T.let(T.unsafe(nil), Regexp)
ERB::Util::JSON_ESCAPE = T.let(T.unsafe(nil), Hash)
ERB::Util::JSON_ESCAPE_REGEXP = T.let(T.unsafe(nil), Regexp)
+ERB::Util::TAG_NAME_FOLLOWING_REGEXP = T.let(T.unsafe(nil), Regexp)
+ERB::Util::TAG_NAME_REPLACEMENT_CHAR = T.let(T.unsafe(nil), String)
+ERB::Util::TAG_NAME_START_REGEXP = T.let(T.unsafe(nil), Regexp)
+ERB::Util::TAG_NAME_START_REGEXP_SET = T.let(T.unsafe(nil), String)
module Enumerable
def as_json(options = T.unsafe(nil)); end | true |
Other | Homebrew | brew | 0cc880c038991cff3d51bd326495d34fb15689ba.json | Update RBI files for activesupport. | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -24,10 +24,6 @@ module ActiveSupport::ForkTracker::CoreExtPrivate
include ::ActiveSupport::ForkTracker::CoreExt
end
-module ActiveSupport::VERSION
- PRE = ::T.let(nil, ::T.untyped)
-end
-
class Addrinfo
def connect_internal(local_addrinfo, timeout=T.unsafe(nil)); end
end | true |
Other | Homebrew | brew | f15ac65cedcf9bea678316f23e1eeb9cf21fecab.json | workflows/docker: add OCI metadata | .github/workflows/docker.yml | @@ -29,7 +29,20 @@ jobs:
run: git fetch origin master
- name: Build Docker image
- run: docker build -t brew --build-arg=version=${{matrix.version}} .
+ run: |
+ brew_version="$(git describe --tags --dirty --abbrev=7)"
+ echo "Building for Homebrew ${brew_version}"
+ docker build -t brew \
+ --build-arg=version=${{matrix.version}} \
+ --label org.opencontainers.image.created="$(date --rfc-3339=seconds --utc)" \
+ --label org.opencontainers.image.url="https://brew.sh" \
+ --label org.opencontainers.image.documentation="https://docs.brew.sh" \
+ --label org.opencontainers.image.source="https://github.com/${GITHUB_REPOSITORY}" \
+ --label org.opencontainers.image.version="${brew_version}" \
+ --label org.opencontainers.image.revision="${GITHUB_SHA}" \
+ --label org.opencontainers.image.vendor="${GITHUB_REPOSITORY_OWNER}" \
+ --label org.opencontainers.image.licenses="BSD-2-Clause" \
+ .
- name: Run brew test-bot --only-setup
run: docker run --rm brew brew test-bot --only-setup | false |
Other | Homebrew | brew | b3da8dbd24f61fdc5f319bf1a4253e86682a0bff.json | test/os/mac/pkgconfig_spec: fix libffi detection on 12.3+ SDK | Library/Homebrew/test/os/mac/pkgconfig_spec.rb | @@ -68,7 +68,7 @@ def pc_version(library)
it "returns the correct version for libffi" do
version = File.foreach("#{sdk}/usr/include/ffi/ffi.h")
.lazy
- .grep(/^\s*libffi (\S+) - Copyright /) { Regexp.last_match(1) }
+ .grep(/^\s*libffi (\S+)\s+- Copyright /) { Regexp.last_match(1) }
.first
skip "Cannot detect system libffi version." if version == "PyOBJC" | false |
Other | Homebrew | brew | 27466b01da0aabb3681956c50141ddbfc4e45c6b.json | searchable: flatten array before matching
Fix #13203 which occurs when searching cask descriptions. | Library/Homebrew/searchable.rb | @@ -23,7 +23,7 @@ def simplify_string(string)
def search_regex(regex)
select do |*args|
args = yield(*args) if block_given?
- args = Array(args).compact
+ args = Array(args).flatten.compact
args.any? { |arg| arg.match?(regex) }
end
end | false |
Other | Homebrew | brew | 37c46e1acd4ca5f117c6af9a85f18b303359c141.json | Remove space before colon in `livecheck` output | Library/Homebrew/livecheck/livecheck.rb | @@ -441,7 +441,7 @@ def print_latest_version(info, verbose:, ambiguous_cask: false)
info[:version][:latest]
end
- puts "#{formula_or_cask_s} : #{current_s} ==> #{latest_s}"
+ puts "#{formula_or_cask_s}: #{current_s} ==> #{latest_s}"
end
sig { | true |
Other | Homebrew | brew | 37c46e1acd4ca5f117c6af9a85f18b303359c141.json | Remove space before colon in `livecheck` output | Library/Homebrew/livecheck/skip_conditions.rb | @@ -264,12 +264,12 @@ def print_skip_information(skip_hash)
if skip_hash[:messages].is_a?(Array) && skip_hash[:messages].count.positive?
# TODO: Handle multiple messages, only if needed in the future
if skip_hash[:status] == "skipped"
- puts "#{Tty.red}#{name}#{Tty.reset} : skipped - #{skip_hash[:messages][0]}"
+ puts "#{Tty.red}#{name}#{Tty.reset}: skipped - #{skip_hash[:messages][0]}"
else
- puts "#{Tty.red}#{name}#{Tty.reset} : #{skip_hash[:messages][0]}"
+ puts "#{Tty.red}#{name}#{Tty.reset}: #{skip_hash[:messages][0]}"
end
elsif skip_hash[:status].present?
- puts "#{Tty.red}#{name}#{Tty.reset} : #{skip_hash[:status]}"
+ puts "#{Tty.red}#{name}#{Tty.reset}: #{skip_hash[:status]}"
end
end
end | true |
Other | Homebrew | brew | 37c46e1acd4ca5f117c6af9a85f18b303359c141.json | Remove space before colon in `livecheck` output | Library/Homebrew/test/dev-cmd/livecheck_spec.rb | @@ -15,7 +15,7 @@
setup_test_formula("test", content)
expect { brew "livecheck", "test" }
- .to output(/test : /).to_stdout
+ .to output(/test: /).to_stdout
.and not_to_output.to_stderr
.and be_a_success
end | true |
Other | Homebrew | brew | 37c46e1acd4ca5f117c6af9a85f18b303359c141.json | Remove space before colon in `livecheck` output | Library/Homebrew/test/livecheck/skip_conditions_spec.rb | @@ -470,103 +470,103 @@
context "when a formula without a livecheckable is deprecated" do
it "prints skip information" do
expect { skip_conditions.print_skip_information(status_hashes[:formula][:deprecated]) }
- .to output("test_deprecated : deprecated\n").to_stdout
+ .to output("test_deprecated: deprecated\n").to_stdout
.and not_to_output.to_stderr
end
end
context "when a formula without a livecheckable is disabled" do
it "prints skip information" do
expect { skip_conditions.print_skip_information(status_hashes[:formula][:disabled]) }
- .to output("test_disabled : disabled\n").to_stdout
+ .to output("test_disabled: disabled\n").to_stdout
.and not_to_output.to_stderr
end
end
context "when a formula without a livecheckable is versioned" do
it "prints skip information" do
expect { skip_conditions.print_skip_information(status_hashes[:formula][:versioned]) }
- .to output("test@0.0.1 : versioned\n").to_stdout
+ .to output("test@0.0.1: versioned\n").to_stdout
.and not_to_output.to_stderr
end
end
context "when a formula is HEAD-only and not installed" do
it "prints skip information" do
expect { skip_conditions.print_skip_information(status_hashes[:formula][:head_only]) }
- .to output("test_head_only : HEAD only formula must be installed to be livecheckable\n").to_stdout
+ .to output("test_head_only: HEAD only formula must be installed to be livecheckable\n").to_stdout
.and not_to_output.to_stderr
end
end
context "when a formula has a GitHub Gist stable URL" do
it "prints skip information" do
expect { skip_conditions.print_skip_information(status_hashes[:formula][:gist]) }
- .to output("test_gist : skipped - Stable URL is a GitHub Gist\n").to_stdout
+ .to output("test_gist: skipped - Stable URL is a GitHub Gist\n").to_stdout
.and not_to_output.to_stderr
end
end
context "when a formula has a Google Code Archive stable URL" do
it "prints skip information" do
expect { skip_conditions.print_skip_information(status_hashes[:formula][:google_code_archive]) }
- .to output("test_google_code_archive : skipped - Stable URL is from Google Code Archive\n").to_stdout
+ .to output("test_google_code_archive: skipped - Stable URL is from Google Code Archive\n").to_stdout
.and not_to_output.to_stderr
end
end
context "when a formula has an Internet Archive stable URL" do
it "prints skip information" do
expect { skip_conditions.print_skip_information(status_hashes[:formula][:internet_archive]) }
- .to output("test_internet_archive : skipped - Stable URL is from Internet Archive\n").to_stdout
+ .to output("test_internet_archive: skipped - Stable URL is from Internet Archive\n").to_stdout
.and not_to_output.to_stderr
end
end
context "when a formula has a `livecheck` block containing `skip`" do
it "prints skip information" do
expect { skip_conditions.print_skip_information(status_hashes[:formula][:skip]) }
- .to output("test_skip : skipped\n").to_stdout
+ .to output("test_skip: skipped\n").to_stdout
.and not_to_output.to_stderr
expect { skip_conditions.print_skip_information(status_hashes[:formula][:skip_with_message]) }
- .to output("test_skip_with_message : skipped - Not maintained\n").to_stdout
+ .to output("test_skip_with_message: skipped - Not maintained\n").to_stdout
.and not_to_output.to_stderr
end
end
context "when the cask is discontinued without a livecheckable" do
it "prints skip information" do
expect { skip_conditions.print_skip_information(status_hashes[:cask][:discontinued]) }
- .to output("test_discontinued : discontinued\n").to_stdout
+ .to output("test_discontinued: discontinued\n").to_stdout
.and not_to_output.to_stderr
end
end
context "when the cask has `version :latest` without a livecheckable" do
it "prints skip information" do
expect { skip_conditions.print_skip_information(status_hashes[:cask][:latest]) }
- .to output("test_latest : latest\n").to_stdout
+ .to output("test_latest: latest\n").to_stdout
.and not_to_output.to_stderr
end
end
context "when the cask has an unversioned URL without a livecheckable" do
it "prints skip information" do
expect { skip_conditions.print_skip_information(status_hashes[:cask][:unversioned]) }
- .to output("test_unversioned : unversioned\n").to_stdout
+ .to output("test_unversioned: unversioned\n").to_stdout
.and not_to_output.to_stderr
end
end
context "when the cask has a `livecheck` block containing `skip`" do
it "prints skip information" do
expect { skip_conditions.print_skip_information(status_hashes[:cask][:skip]) }
- .to output("test_skip : skipped\n").to_stdout
+ .to output("test_skip: skipped\n").to_stdout
.and not_to_output.to_stderr
expect { skip_conditions.print_skip_information(status_hashes[:cask][:skip_with_message]) }
- .to output("test_skip_with_message : skipped - Not maintained\n").to_stdout
+ .to output("test_skip_with_message: skipped - Not maintained\n").to_stdout
.and not_to_output.to_stderr
end
end | true |
Other | Homebrew | brew | b7a43604331fb8a7c8ba2b42d1caccb1d3eb97f9.json | #parse_curl_output: increase default max_iterations
The `max_iterations` value in `#parse_curl_output` is only intended
to prevent its `while` loop from potentially turning into an endless
loop. This should only come into play in exceptional circumstances
but the current default value (5) is low enough that we're seeing it
under normal circumstances.
`#parse_curl_output` isn't intended to restrict the number of
redirections (this should be done using the `--max-redirs` option in
`curl) but it's effectively doing this in rare cases due to the low
`max_iterations` default. This is a problem because `curl` can
successfully return a response only to have `#parse_curl_output`
error in relation to `max_iterations`.
Originally the code in `#parse_curl_output` was used in the context
of livecheck, where it's not a huge issue if a check fails. However,
now the `#parse_curl_output` method is used in important parts of
brew like `#curl_download`. We've received a report of a download
failing with the "Too many redirects (max = 5)` error, effectively
preventing the user from installing a formula [from a third-party
tap].
Until we can come up with a more adaptive way of bounding this
`while` loop, I think we should simply raise the default to something
that's less likely to be encountered under normal circumstances
(e.g., 25). | Library/Homebrew/utils/curl.rb | @@ -400,7 +400,7 @@ def http_status_ok?(status)
# @return [Hash] A hash containing an array of response hashes and the body
# content, if found.
sig { params(output: String, max_iterations: Integer).returns(T::Hash[Symbol, T.untyped]) }
- def parse_curl_output(output, max_iterations: 5)
+ def parse_curl_output(output, max_iterations: 25)
responses = []
iterations = 0 | false |
Other | Homebrew | brew | d6202384d750909c67b3be79b4dc1b80722c829d.json | Curl: Remove guard from certain parsing logic
The `#curl_http_content_headers_and_checksum` method previously
parsed responses from `curl` output even if `status.success?` wasn't
`true`. A recent commit of mine moved the parsing logic behind this
guard but it's now leading to a "...is not reachable" error when a URL
involves a large download that takes longer than 25 seconds to finish
and hits the timeout.
This commit resolves the issue for the time being by moving related
logic back to its previous location, where it isn't guarded by
`status.success?`. | Library/Homebrew/utils/curl.rb | @@ -345,20 +345,20 @@ def curl_http_content_headers_and_checksum(
user_agent: user_agent
)
- if status.success?
- parsed_output = parse_curl_output(output)
- responses = parsed_output[:responses]
+ parsed_output = parse_curl_output(output)
+ responses = parsed_output[:responses]
- final_url = curl_response_last_location(responses)
- headers = if responses.last.present?
- status_code = responses.last[:status_code]
- responses.last[:headers]
- else
- {}
- end
- etag = headers["etag"][ETAG_VALUE_REGEX, 1] if headers["etag"].present?
- content_length = headers["content-length"]
+ final_url = curl_response_last_location(responses)
+ headers = if responses.last.present?
+ status_code = responses.last[:status_code]
+ responses.last[:headers]
+ else
+ {}
+ end
+ etag = headers["etag"][ETAG_VALUE_REGEX, 1] if headers["etag"].present?
+ content_length = headers["content-length"]
+ if status.success?
file_contents = File.read(file.path)
file_hash = Digest::SHA2.hexdigest(file_contents) if hash_needed
end | false |
Other | Homebrew | brew | a4590f394e71384bb7acd780bc51ff184d8f2e1e.json | search: drop Homebrew cask tap names from list
Results in searching a list of tokens from official Homebrew cask taps and fully-qualified tokens from other taps, matching the list when searching formulae. | Library/Homebrew/extend/os/mac/search.rb | @@ -29,7 +29,9 @@ def search_casks(string_or_regex)
end
end
- cask_tokens = Tap.flat_map(&:cask_tokens)
+ cask_tokens = Tap.flat_map(&:cask_tokens).map do |c|
+ c.sub(%r{^homebrew/cask.*/}, "")
+ end
results = cask_tokens.extend(Searchable)
.search(string_or_regex) | false |
Other | Homebrew | brew | 6797cd3dcb580e03d26e601d9ab2a949e1bdd55e.json | Dockerfile: leave gpg-agent installed | Dockerfile | @@ -5,7 +5,7 @@ ARG DEBIAN_FRONTEND=noninteractive
# hadolint ignore=DL3008
RUN apt-get update \
- && apt-get install -y --no-install-recommends software-properties-common gnupg-agent \
+ && apt-get install -y --no-install-recommends software-properties-common gpg-agent \
&& add-apt-repository -y ppa:git-core/ppa \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
@@ -27,7 +27,7 @@ RUN apt-get update \
sudo \
uuid-runtime \
tzdata \
- && apt remove --purge -y software-properties-common gnupg-agent \
+ && apt remove --purge -y software-properties-common \
&& apt autoremove --purge -y \
&& rm -rf /var/lib/apt/lists/* \
&& localedef -i en_US -f UTF-8 en_US.UTF-8 \ | false |
Other | Homebrew | brew | 7d1a97f015ade9b93217246a785908e9b3fd3690.json | Dockerfile: purge unneeded packages | Dockerfile | @@ -5,7 +5,7 @@ ARG DEBIAN_FRONTEND=noninteractive
# hadolint ignore=DL3008
RUN apt-get update \
- && apt-get install -y --no-install-recommends software-properties-common \
+ && apt-get install -y --no-install-recommends software-properties-common gnupg-agent \
&& add-apt-repository -y ppa:git-core/ppa \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
@@ -17,7 +17,6 @@ RUN apt-get update \
g++ \
gawk \
git \
- gpg-agent \
less \
libz-dev \
locales \
@@ -28,6 +27,8 @@ RUN apt-get update \
sudo \
uuid-runtime \
tzdata \
+ && apt remove --purge software-properties-common gnupg-agent \
+ && apt autoremove --purge \
&& rm -rf /var/lib/apt/lists/* \
&& localedef -i en_US -f UTF-8 en_US.UTF-8 \
&& useradd -m -s /bin/bash linuxbrew \ | false |
Other | Homebrew | brew | 7ffaaf8c9a9170e19d00bef9b78dda7ea42a02ea.json | Dockerfile: install gpg agent | Dockerfile | @@ -18,6 +18,7 @@ RUN apt-get update \
gawk \
git \
gnupg \
+ gnupg-agent \
less \
libz-dev \
locales \ | false |
Other | Homebrew | brew | 2722fbe30e20c53665357f7a71bbcf378990302e.json | #parse_curl_output: add max_iterations parameter
In cases where there may be more than five responses in `curl`
output to parse, we need to be able to control the `max_iterations`
of the `while` loop in `#parse_curl_output` to properly parse all
the responses.
For example, if we pass `--max-redirs 5` to `curl` and there are
exactly five redirections before the final response, the output would
contain a total of six responses and `#parse_curl_output` wouldn't
properly handle this (it would give a `Too many redirects` error).
`max_iterations` should be the maximum number of redirections + 1
(to account for any final response after the redirections), so we
need to be able to override this value when necessary. | Library/Homebrew/utils/curl.rb | @@ -393,13 +393,17 @@ def http_status_ok?(status)
# `:status_code`, `:status_text`, and `:headers`.
# @param output [String] The output text from `curl` containing HTTP
# responses, body content, or both.
+ # @param max_iterations [Integer] The maximum number of iterations for the
+ # `while` loop that parses HTTP response text. This should correspond to
+ # the maximum number of requests in the output. If `curl`'s `--max-redirs`
+ # option is used, `max_iterations` should be `max-redirs + 1`, to
+ # account for any final response after the redirections.
# @return [Hash] A hash containing an array of response hashes and the body
# content, if found.
- sig { params(output: String).returns(T::Hash[Symbol, T.untyped]) }
- def parse_curl_output(output)
+ sig { params(output: String, max_iterations: Integer).returns(T::Hash[Symbol, T.untyped]) }
+ def parse_curl_output(output, max_iterations: 5)
responses = []
- max_iterations = 5
iterations = 0
output = output.lstrip
while output.match?(%r{\AHTTP/[\d.]+ \d+}) && output.include?(HTTP_RESPONSE_BODY_SEPARATOR) | false |
Other | Homebrew | brew | 9171eb2e160d48bad19c168b730bde5969b5293c.json | Curl: Add methods to parse response | Library/Homebrew/test/utils/curl_spec.rb | @@ -4,6 +4,173 @@
require "utils/curl"
describe "Utils::Curl" do
+ let(:location_urls) {
+ %w[
+ https://example.com/example/
+ https://example.com/example1/
+ https://example.com/example2/
+ ]
+ }
+
+ let(:response_hash) {
+ response_hash = {}
+
+ response_hash[:ok] = {
+ status_code: "200",
+ status_text: "OK",
+ headers: {
+ "cache-control" => "max-age=604800",
+ "content-type" => "text/html; charset=UTF-8",
+ "date" => "Wed, 1 Jan 2020 01:23:45 GMT",
+ "expires" => "Wed, 31 Jan 2020 01:23:45 GMT",
+ "last-modified" => "Thu, 1 Jan 2019 01:23:45 GMT",
+ "content-length" => "123",
+ },
+ }
+
+ response_hash[:redirection] = {
+ status_code: "301",
+ status_text: "Moved Permanently",
+ headers: {
+ "cache-control" => "max-age=604800",
+ "content-type" => "text/html; charset=UTF-8",
+ "date" => "Wed, 1 Jan 2020 01:23:45 GMT",
+ "expires" => "Wed, 31 Jan 2020 01:23:45 GMT",
+ "last-modified" => "Thu, 1 Jan 2019 01:23:45 GMT",
+ "content-length" => "123",
+ "location" => location_urls[0],
+ },
+ }
+
+ response_hash[:redirection1] = {
+ status_code: "301",
+ status_text: "Moved Permanently",
+ headers: {
+ "cache-control" => "max-age=604800",
+ "content-type" => "text/html; charset=UTF-8",
+ "date" => "Wed, 1 Jan 2020 01:23:45 GMT",
+ "expires" => "Wed, 31 Jan 2020 01:23:45 GMT",
+ "last-modified" => "Thu, 1 Jan 2019 01:23:45 GMT",
+ "content-length" => "123",
+ "location" => location_urls[1],
+ },
+ }
+
+ response_hash[:redirection2] = {
+ status_code: "301",
+ status_text: "Moved Permanently",
+ headers: {
+ "cache-control" => "max-age=604800",
+ "content-type" => "text/html; charset=UTF-8",
+ "date" => "Wed, 1 Jan 2020 01:23:45 GMT",
+ "expires" => "Wed, 31 Jan 2020 01:23:45 GMT",
+ "last-modified" => "Thu, 1 Jan 2019 01:23:45 GMT",
+ "content-length" => "123",
+ "location" => location_urls[2],
+ },
+ }
+
+ response_hash[:redirection_no_scheme] = {
+ status_code: "301",
+ status_text: "Moved Permanently",
+ headers: {
+ "cache-control" => "max-age=604800",
+ "content-type" => "text/html; charset=UTF-8",
+ "date" => "Wed, 1 Jan 2020 01:23:45 GMT",
+ "expires" => "Wed, 31 Jan 2020 01:23:45 GMT",
+ "last-modified" => "Thu, 1 Jan 2019 01:23:45 GMT",
+ "content-length" => "123",
+ "location" => "//www.example.com/example/",
+ },
+ }
+
+ response_hash[:redirection_root_relative] = {
+ status_code: "301",
+ status_text: "Moved Permanently",
+ headers: {
+ "cache-control" => "max-age=604800",
+ "content-type" => "text/html; charset=UTF-8",
+ "date" => "Wed, 1 Jan 2020 01:23:45 GMT",
+ "expires" => "Wed, 31 Jan 2020 01:23:45 GMT",
+ "last-modified" => "Thu, 1 Jan 2019 01:23:45 GMT",
+ "content-length" => "123",
+ "location" => "/example/",
+ },
+ }
+
+ response_hash[:redirection_parent_relative] = {
+ status_code: "301",
+ status_text: "Moved Permanently",
+ headers: {
+ "cache-control" => "max-age=604800",
+ "content-type" => "text/html; charset=UTF-8",
+ "date" => "Wed, 1 Jan 2020 01:23:45 GMT",
+ "expires" => "Wed, 31 Jan 2020 01:23:45 GMT",
+ "last-modified" => "Thu, 1 Jan 2019 01:23:45 GMT",
+ "content-length" => "123",
+ "location" => "./example/",
+ },
+ }
+
+ response_hash
+ }
+
+ let(:response_text) {
+ response_text = {}
+
+ response_text[:ok] = <<~EOS
+ HTTP/1.1 #{response_hash[:ok][:status_code]} #{response_hash[:ok][:status_text]}\r
+ Cache-Control: #{response_hash[:ok][:headers]["cache-control"]}\r
+ Content-Type: #{response_hash[:ok][:headers]["content-type"]}\r
+ Date: #{response_hash[:ok][:headers]["date"]}\r
+ Expires: #{response_hash[:ok][:headers]["expires"]}\r
+ Last-Modified: #{response_hash[:ok][:headers]["last-modified"]}\r
+ Content-Length: #{response_hash[:ok][:headers]["content-length"]}\r
+ \r
+ EOS
+
+ response_text[:redirection] = response_text[:ok].sub(
+ "HTTP/1.1 #{response_hash[:ok][:status_code]} #{response_hash[:ok][:status_text]}\r",
+ "HTTP/1.1 #{response_hash[:redirection][:status_code]} #{response_hash[:redirection][:status_text]}\r\n" \
+ "Location: #{response_hash[:redirection][:headers]["location"]}\r",
+ )
+
+ response_text[:redirection_to_ok] = "#{response_text[:redirection]}#{response_text[:ok]}"
+
+ response_text[:redirections_to_ok] = <<~EOS
+ #{response_text[:redirection].sub(location_urls[0], location_urls[2])}
+ #{response_text[:redirection].sub(location_urls[0], location_urls[1])}
+ #{response_text[:redirection]}
+ #{response_text[:ok]}
+ EOS
+
+ response_text
+ }
+
+ let(:body) {
+ body = {}
+
+ body[:default] = <<~EOS
+ <!DOCTYPE html>
+ <html>
+ <head>
+ <meta charset="utf-8">
+ <title>Example</title>
+ </head>
+ <body>
+ <h1>Example</h1>
+ <p>Hello, world!</p>
+ </body>
+ </html>
+ EOS
+
+ body[:with_carriage_returns] = body[:default].sub("<html>\n", "<html>\r\n\r\n")
+
+ body[:with_http_status_line] = body[:default].sub("<html>", "HTTP/1.1 200\r\n<html>")
+
+ body
+ }
+
describe "curl_args" do
let(:args) { ["foo"] }
let(:user_agent_string) { "Lorem ipsum dolor sit amet" }
@@ -101,4 +268,117 @@
expect(curl_args(*args, show_output: true).join(" ")).not_to include("--fail")
end
end
+
+ describe "#parse_curl_output" do
+ it "returns a correct hash when curl output contains response(s) and body" do
+ expect(parse_curl_output("#{response_text[:ok]}#{body[:default]}"))
+ .to eq({ responses: [response_hash[:ok]], body: body[:default] })
+ expect(parse_curl_output("#{response_text[:ok]}#{body[:with_carriage_returns]}"))
+ .to eq({ responses: [response_hash[:ok]], body: body[:with_carriage_returns] })
+ expect(parse_curl_output("#{response_text[:ok]}#{body[:with_http_status_line]}"))
+ .to eq({ responses: [response_hash[:ok]], body: body[:with_http_status_line] })
+ expect(parse_curl_output("#{response_text[:redirection_to_ok]}#{body[:default]}"))
+ .to eq({ responses: [response_hash[:redirection], response_hash[:ok]], body: body[:default] })
+ expect(parse_curl_output("#{response_text[:redirections_to_ok]}#{body[:default]}"))
+ .to eq({
+ responses: [
+ response_hash[:redirection2],
+ response_hash[:redirection1],
+ response_hash[:redirection],
+ response_hash[:ok],
+ ],
+ body: body[:default],
+ })
+ end
+
+ it "returns a correct hash when curl output contains HTTP response text and no body" do
+ expect(parse_curl_output(response_text[:ok])).to eq({ responses: [response_hash[:ok]], body: "" })
+ end
+
+ it "returns a correct hash when curl output contains body and no HTTP response text" do
+ expect(parse_curl_output(body[:default])).to eq({ responses: [], body: body[:default] })
+ expect(parse_curl_output(body[:with_carriage_returns]))
+ .to eq({ responses: [], body: body[:with_carriage_returns] })
+ expect(parse_curl_output(body[:with_http_status_line]))
+ .to eq({ responses: [], body: body[:with_http_status_line] })
+ end
+
+ it "returns correct hash when curl output is blank" do
+ expect(parse_curl_output("")).to eq({ responses: [], body: "" })
+ end
+ end
+
+ describe "#parse_curl_response" do
+ it "returns a correct hash when given HTTP response text" do
+ expect(parse_curl_response(response_text[:ok])).to eq(response_hash[:ok])
+ expect(parse_curl_response(response_text[:redirection])).to eq(response_hash[:redirection])
+ end
+
+ it "returns an empty hash when given an empty string" do
+ expect(parse_curl_response("")).to eq({})
+ end
+ end
+
+ describe "#curl_response_last_location" do
+ it "returns the last location header when given an array of HTTP response hashes" do
+ expect(curl_response_last_location([
+ response_hash[:redirection],
+ response_hash[:ok],
+ ])).to eq(response_hash[:redirection][:headers]["location"])
+
+ expect(curl_response_last_location([
+ response_hash[:redirection2],
+ response_hash[:redirection1],
+ response_hash[:redirection],
+ response_hash[:ok],
+ ])).to eq(response_hash[:redirection][:headers]["location"])
+ end
+
+ it "returns the location as given, by default or when absolutize is false" do
+ expect(curl_response_last_location([
+ response_hash[:redirection_no_scheme],
+ response_hash[:ok],
+ ])).to eq(response_hash[:redirection_no_scheme][:headers]["location"])
+
+ expect(curl_response_last_location([
+ response_hash[:redirection_root_relative],
+ response_hash[:ok],
+ ])).to eq(response_hash[:redirection_root_relative][:headers]["location"])
+
+ expect(curl_response_last_location([
+ response_hash[:redirection_parent_relative],
+ response_hash[:ok],
+ ])).to eq(response_hash[:redirection_parent_relative][:headers]["location"])
+ end
+
+ it "returns an absolute URL when absolutize is true and a base URL is provided" do
+ expect(
+ curl_response_last_location(
+ [response_hash[:redirection_no_scheme], response_hash[:ok]],
+ absolutize: true,
+ base_url: "https://brew.sh/test",
+ ),
+ ).to eq("https:#{response_hash[:redirection_no_scheme][:headers]["location"]}")
+
+ expect(
+ curl_response_last_location(
+ [response_hash[:redirection_root_relative], response_hash[:ok]],
+ absolutize: true,
+ base_url: "https://brew.sh/test",
+ ),
+ ).to eq("https://brew.sh#{response_hash[:redirection_root_relative][:headers]["location"]}")
+
+ expect(
+ curl_response_last_location(
+ [response_hash[:redirection_parent_relative], response_hash[:ok]],
+ absolutize: true,
+ base_url: "https://brew.sh/test1/test2",
+ ),
+ ).to eq(response_hash[:redirection_parent_relative][:headers]["location"].sub(/^\./, "https://brew.sh/test1"))
+ end
+
+ it "returns nil when the response hash doesn't contain a location header" do
+ expect(curl_response_last_location([response_hash[:ok]])).to be_nil
+ end
+ end
end | true |
Other | Homebrew | brew | 9171eb2e160d48bad19c168b730bde5969b5293c.json | Curl: Add methods to parse response | Library/Homebrew/utils/curl.rb | @@ -14,6 +14,17 @@ module Curl
using TimeRemaining
+ # HTTP responses and body content are typically separated by a double
+ # `CRLF` (whereas HTTP header lines are separated by a single `CRLF`).
+ # In rare cases, this can also be a double newline (`\n\n`).
+ HTTP_RESPONSE_BODY_SEPARATOR = "\r\n\r\n"
+
+ # This regex is used to isolate the parts of an HTTP status line, namely
+ # the status code and any following descriptive text (e.g., `Not Found`).
+ HTTP_STATUS_LINE_REGEX = %r{^HTTP/.* (?<code>\d+)(?: (?<text>[^\r\n]+))?}.freeze
+
+ private_constant :HTTP_RESPONSE_BODY_SEPARATOR, :HTTP_STATUS_LINE_REGEX
+
module_function
def curl_executable(use_homebrew_curl: false)
@@ -367,6 +378,95 @@ def curl_supports_tls13?
def http_status_ok?(status)
(100..299).cover?(status.to_i)
end
+
+ # Separates the output text from `curl` into an array of HTTP responses and
+ # the final response body (i.e. content). Response hashes contain the
+ # `:status_code`, `:status_text`, and `:headers`.
+ # @param output [String] The output text from `curl` containing HTTP
+ # responses, body content, or both.
+ # @return [Hash] A hash containing an array of response hashes and the body
+ # content, if found.
+ sig { params(output: String).returns(T::Hash[Symbol, T.untyped]) }
+ def parse_curl_output(output)
+ responses = []
+
+ max_iterations = 5
+ iterations = 0
+ output = output.lstrip
+ while output.match?(%r{\AHTTP/[\d.]+ \d+}) && output.include?(HTTP_RESPONSE_BODY_SEPARATOR)
+ iterations += 1
+ raise "Too many redirects (max = #{max_iterations})" if iterations > max_iterations
+
+ response_text, _, output = output.partition(HTTP_RESPONSE_BODY_SEPARATOR)
+ output = output.lstrip
+ next if response_text.blank?
+
+ response_text.chomp!
+ response = parse_curl_response(response_text)
+ responses << response if response.present?
+ end
+
+ { responses: responses, body: output }
+ end
+
+ # Returns the URL from the last location header found in cURL responses,
+ # if any.
+ # @param responses [Array<Hash>] An array of hashes containing response
+ # status information and headers from `#parse_curl_response`.
+ # @param absolutize [true, false] Whether to make the location URL absolute.
+ # @param base_url [String, nil] The URL to use as a base for making the
+ # `location` URL absolute.
+ # @return [String, nil] The URL from the last-occurring `location` header
+ # in the responses or `nil` (if no `location` headers found).
+ sig {
+ params(
+ responses: T::Array[T::Hash[Symbol, T.untyped]],
+ absolutize: T::Boolean,
+ base_url: T.nilable(String),
+ ).returns(T.nilable(String))
+ }
+ def curl_response_last_location(responses, absolutize: false, base_url: nil)
+ responses.reverse_each do |response|
+ next if response[:headers].blank?
+
+ location = response[:headers]["location"]
+ next if location.blank?
+
+ absolute_url = URI.join(base_url, location).to_s if absolutize && base_url.present?
+ return absolute_url || location
+ end
+
+ nil
+ end
+
+ private
+
+ # Parses HTTP response text from `curl` output into a hash containing the
+ # information from the status line (status code and, optionally,
+ # descriptive text) and headers.
+ # @param response_text [String] The text of a `curl` response, consisting
+ # of a status line followed by header lines.
+ # @return [Hash] A hash containing the response status information and
+ # headers (as a hash with header names as keys).
+ sig { params(response_text: String).returns(T::Hash[Symbol, T.untyped]) }
+ def parse_curl_response(response_text)
+ response = {}
+ return response unless response_text.match?(HTTP_STATUS_LINE_REGEX)
+
+ # Parse the status line and remove it
+ match = response_text.match(HTTP_STATUS_LINE_REGEX)
+ response[:status_code] = match["code"] if match["code"].present?
+ response[:status_text] = match["text"] if match["text"].present?
+ response_text = response_text.sub(%r{^HTTP/.* (\d+).*$\s*}, "")
+
+ # Create a hash from the header lines
+ response[:headers] =
+ response_text.split("\r\n")
+ .to_h { |header| header.split(/:\s*/, 2) }
+ .transform_keys(&:downcase)
+
+ response
+ end
end
end
| true |
Other | Homebrew | brew | 4ffc69764ad3614f3a36bf1168e7df536ee25931.json | Update RBI files for rubocop-rspec. | Library/Homebrew/sorbet/rbi/gems/rubocop-rspec@2.10.0.rbi | @@ -6,39 +6,6 @@
module RuboCop; end
module RuboCop::Cop; end
-module RuboCop::Cop::Layout; end
-
-class RuboCop::Cop::Layout::ExtraSpacing < ::RuboCop::Cop::Base
- include ::RuboCop::Cop::PrecedingFollowingAlignment
- include ::RuboCop::Cop::RangeHelp
- extend ::RuboCop::Cop::AutoCorrector
-
- def on_new_investigation; end
-
- private
-
- def align_column(asgn_token); end
- def align_equal_sign(corrector, token, align_to); end
- def align_equal_signs(range, corrector); end
- def aligned_locations(locs); end
- def aligned_tok?(token); end
- def all_relevant_assignment_lines(line_number); end
- def allow_for_trailing_comments?; end
- def check_assignment(token); end
- def check_other(token1, token2, ast); end
- def check_tokens(ast, token1, token2); end
- def extra_space_range(token1, token2); end
- def force_equal_sign_alignment?; end
- def ignored_range?(ast, start_pos); end
- def ignored_ranges(ast); end
-
- class << self
- def autocorrect_incompatible_with; end
- end
-end
-
-RuboCop::Cop::Layout::ExtraSpacing::MSG_UNALIGNED_ASGN = T.let(T.unsafe(nil), String)
-RuboCop::Cop::Layout::ExtraSpacing::MSG_UNNECESSARY = T.let(T.unsafe(nil), String)
module RuboCop::Cop::RSpec; end
class RuboCop::Cop::RSpec::AlignLeftLetBrace < ::RuboCop::Cop::RSpec::Base
@@ -133,13 +100,21 @@ RuboCop::Cop::RSpec::BeEql::MSG = T.let(T.unsafe(nil), String)
RuboCop::Cop::RSpec::BeEql::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::RSpec::BeNil < ::RuboCop::Cop::RSpec::Base
+ include ::RuboCop::Cop::ConfigurableEnforcedStyle
extend ::RuboCop::Cop::AutoCorrector
+ def be_nil_matcher?(param0 = T.unsafe(nil)); end
def nil_value_expectation?(param0 = T.unsafe(nil)); end
def on_send(node); end
+
+ private
+
+ def check_be_nil_style(node); end
+ def check_be_style(node); end
end
-RuboCop::Cop::RSpec::BeNil::MSG = T.let(T.unsafe(nil), String)
+RuboCop::Cop::RSpec::BeNil::BE_MSG = T.let(T.unsafe(nil), String)
+RuboCop::Cop::RSpec::BeNil::BE_NIL_MSG = T.let(T.unsafe(nil), String)
RuboCop::Cop::RSpec::BeNil::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::RSpec::BeforeAfterAll < ::RuboCop::Cop::RSpec::Base
@@ -165,6 +140,10 @@ class RuboCop::Cop::RSpec::Capybara::CurrentPathExpectation < ::RuboCop::Cop::RS
def autocorrect(corrector, node); end
def convert_regexp_str_to_literal(corrector, matcher_node, regexp_str); end
def rewrite_expectation(corrector, node, to_symbol, matcher_node); end
+
+ class << self
+ def autocorrect_incompatible_with; end
+ end
end
RuboCop::Cop::RSpec::Capybara::CurrentPathExpectation::MSG = T.let(T.unsafe(nil), String)
@@ -332,7 +311,7 @@ class RuboCop::Cop::RSpec::EmptyExampleGroup < ::RuboCop::Cop::RSpec::Base
private
def conditionals_with_examples?(body); end
- def examples_in_branches?(if_node); end
+ def examples_in_branches?(condition_node); end
def offensive?(body); end
end
@@ -1576,6 +1555,23 @@ end
RuboCop::Cop::RSpec::VariableName::MSG = T.let(T.unsafe(nil), String)
+class RuboCop::Cop::RSpec::VerifiedDoubleReference < ::RuboCop::Cop::RSpec::Base
+ include ::RuboCop::Cop::ConfigurableEnforcedStyle
+ extend ::RuboCop::Cop::AutoCorrector
+
+ def on_send(node); end
+ def verified_double(param0 = T.unsafe(nil)); end
+
+ private
+
+ def correct_style(violation); end
+ def opposing_style?(class_reference); end
+end
+
+RuboCop::Cop::RSpec::VerifiedDoubleReference::MSG = T.let(T.unsafe(nil), String)
+RuboCop::Cop::RSpec::VerifiedDoubleReference::REFERENCE_TYPE_STYLES = T.let(T.unsafe(nil), Hash)
+RuboCop::Cop::RSpec::VerifiedDoubleReference::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set)
+
class RuboCop::Cop::RSpec::VerifiedDoubles < ::RuboCop::Cop::RSpec::Base
def on_send(node); end
def unverified_double(param0 = T.unsafe(nil)); end | false |
Other | Homebrew | brew | 6dd6758824e48ef041536bde43d32657aa11bdc7.json | workflows/codeql: Improve branch triggers and remove `fail-fast`
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com> | .github/workflows/codeql-analysis.yml | @@ -2,9 +2,11 @@ name: "CodeQL"
on:
push:
- branches: [ master ]
+ branches:
+ - master
pull_request:
- branches: [ master ]
+ branches:
+ - master
jobs:
analyze:
@@ -15,9 +17,6 @@ jobs:
contents: read
security-events: write
- strategy:
- fail-fast: false
-
steps:
- name: Checkout repository
uses: actions/checkout@v3 | false |
Other | Homebrew | brew | aa36b343cab9a998d6e5359df8921200ba37ba3f.json | rubocops/urls: Escape `.`s in hostnames in regexps | Library/Homebrew/rubocops/urls.rb | @@ -21,7 +21,7 @@ def audit_formula(_node, _class_node, _parent_class_node, body_node)
end
# GNU URLs; doesn't apply to mirrors
- gnu_pattern = %r{^(?:https?|ftp)://ftpmirror.gnu.org/(.*)}
+ gnu_pattern = %r{^(?:https?|ftp)://ftpmirror\.gnu\.org/(.*)}
audit_urls(urls, gnu_pattern) do |match, url|
problem "Please use \"https://ftp.gnu.org/gnu/#{match[1]}\" instead of #{url}."
end
@@ -267,13 +267,13 @@ def audit_formula(_node, _class_node, _parent_class_node, body_node)
urls += mirrors
# Check pypi URLs
- pypi_pattern = %r{^https?://pypi.python.org/}
+ pypi_pattern = %r{^https?://pypi\.python\.org/}
audit_urls(urls, pypi_pattern) do |_, url|
problem "use the `Source` url found on PyPI downloads page (`#{get_pypi_url(url)}`)"
end
# Require long files.pythonhosted.org URLs
- pythonhosted_pattern = %r{^https?://files.pythonhosted.org/packages/source/}
+ pythonhosted_pattern = %r{^https?://files\.pythonhosted\.org/packages/source/}
audit_urls(urls, pythonhosted_pattern) do |_, url|
problem "use the `Source` url found on PyPI downloads page (`#{get_pypi_url(url)}`)"
end | false |
Other | Homebrew | brew | ffe0c18b2a10b8bc6369b2095a556fcb1ad4135c.json | rubocops/homepage: Escape `.`s in hostnames in regexps | Library/Homebrew/rubocops/homepage.rb | @@ -70,12 +70,12 @@ def audit_formula(_node, _class_node, _parent_class_node, body_node)
when
# Check for http:// GitHub homepage URLs, https:// is preferred.
# Note: only check homepages that are repo pages, not *.github.com hosts
- %r{^http://github.com/},
+ %r{^http://github\.com/},
%r{^http://[^/]*\.github\.io/},
# Savannah has full SSL/TLS support but no auto-redirect.
# Doesn't apply to the download URLs, only the homepage.
- %r{^http://savannah.nongnu.org/},
+ %r{^http://savannah\.nongnu\.org/},
%r{^http://[^/]*\.sourceforge\.io/},
# There's an auto-redirect here, but this mistake is incredibly common too. | false |
Other | Homebrew | brew | 63742cd4804b0004fa537b760c96667885de54d2.json | dev-cmd/bump-formula-pr: Escape `.`s in hostnames in regexps
> This regular expression has an unescaped '.' before 'apache.org/dyn/closer', so it might match more hosts than expected. | Library/Homebrew/dev-cmd/bump-formula-pr.rb | @@ -383,13 +383,13 @@ def determine_formula_from_url(url)
def determine_mirror(url)
case url
- when %r{.*ftp.gnu.org/gnu.*}
+ when %r{.*ftp\.gnu\.org/gnu.*}
url.sub "ftp.gnu.org/gnu", "ftpmirror.gnu.org"
- when %r{.*download.savannah.gnu.org/*}
+ when %r{.*download\.savannah\.gnu\.org/*}
url.sub "download.savannah.gnu.org", "download-mirror.savannah.gnu.org"
- when %r{.*www.apache.org/dyn/closer.lua\?path=.*}
+ when %r{.*www\.apache\.org/dyn/closer\.lua\?path=.*}
url.sub "www.apache.org/dyn/closer.lua?path=", "archive.apache.org/dist/"
- when %r{.*mirrors.ocf.berkeley.edu/debian.*}
+ when %r{.*mirrors\.ocf\.berkeley\.edu/debian.*}
url.sub "mirrors.ocf.berkeley.edu/debian", "mirrorservice.org/sites/ftp.debian.org/debian"
end
end | false |
Other | Homebrew | brew | 266daffbd1bf5d323fe2f92dc53d8deadb6592c0.json | workflows: Add Code Scanning
- https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning
- I just joined the Code Scanning team at work and I figured I'd test out the actual product in the real world by seeing what things it points out for Homebrew, a reasonably large Ruby project.
- This adds a config file to exclude `Library/Homebrew/vendor` as we can't fix problems within gems. :-) | .github/codeql/codeql-config.yml | @@ -0,0 +1,2 @@
+paths-ignore:
+ - Library/Homebrew/vendor/ | true |
Other | Homebrew | brew | 266daffbd1bf5d323fe2f92dc53d8deadb6592c0.json | workflows: Add Code Scanning
- https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning
- I just joined the Code Scanning team at work and I figured I'd test out the actual product in the real world by seeing what things it points out for Homebrew, a reasonably large Ruby project.
- This adds a config file to exclude `Library/Homebrew/vendor` as we can't fix problems within gems. :-) | .github/workflows/codeql-analysis.yml | @@ -0,0 +1,36 @@
+name: "CodeQL"
+
+on:
+ push:
+ branches: [ master ]
+ pull_request:
+ branches: [ master ]
+ schedule:
+ - cron: '30 2 * * 0'
+
+jobs:
+ analyze:
+ name: Analyze
+ runs-on: ubuntu-latest
+ permissions:
+ actions: read
+ contents: read
+ security-events: write
+
+ strategy:
+ fail-fast: false
+ matrix:
+ language: [ 'ruby' ]
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v3
+
+ - name: Initialize CodeQL
+ uses: github/codeql-action/init@v2
+ with:
+ languages: ${{ matrix.language }}
+ config-file: ./.github/codeql/codeql-config.yml
+
+ - name: Perform CodeQL Analysis
+ uses: github/codeql-action/analyze@v2 | true |
Other | Homebrew | brew | 774537d3c2be6cc26dc583f0314871026a9b7bec.json | formula_installer: handle unexpected .brew presence/absence | Library/Homebrew/formula_cellar_checks.rb | @@ -285,13 +285,15 @@ def check_service_command(formula)
end
def check_cpuid_instruction(formula)
- return unless formula.prefix.directory?
- # TODO: add methods to `utils/ast` to allow checking for method use
- return unless (formula.prefix/".brew/#{formula.name}.rb").read.include? "ENV.runtime_cpu_detection"
# Checking for `cpuid` only makes sense on Intel:
# https://en.wikipedia.org/wiki/CPUID
return unless Hardware::CPU.intel?
+ dot_brew_formula = formula.prefix/".brew/#{formula.name}.rb"
+ return unless dot_brew_formula.exist?
+ # TODO: add methods to `utils/ast` to allow checking for method use
+ return unless dot_brew_formula.read.include? "ENV.runtime_cpu_detection"
+
# macOS `objdump` is a bit slow, so we prioritise llvm's `llvm-objdump` (~5.7x faster)
# or binutils' `objdump` (~1.8x faster) if they are installed.
objdump = Formula["llvm"].opt_bin/"llvm-objdump" if Formula["llvm"].any_version_installed? | true |
Other | Homebrew | brew | 774537d3c2be6cc26dc583f0314871026a9b7bec.json | formula_installer: handle unexpected .brew presence/absence | Library/Homebrew/formula_installer.rb | @@ -460,7 +460,7 @@ def install
end
s = formula_contents.gsub(/ bottle do.+?end\n\n?/m, "")
brew_prefix = formula.prefix/".brew"
- brew_prefix.mkdir
+ brew_prefix.mkpath
Pathname(brew_prefix/"#{formula.name}.rb").atomic_write(s)
keg = Keg.new(formula.prefix) | true |
Other | Homebrew | brew | 7c273dc5b5961b17f95675e418838dcd62cf1fb7.json | Update RBI files for public_suffix. | Library/Homebrew/sorbet/rbi/gems/public_suffix@4.0.7.rbi | @@ -1,9 +1,9 @@
+# typed: true
+
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `public_suffix` gem.
# Please instead update this file by running `bin/tapioca gem public_suffix`.
-# typed: true
-
module PublicSuffix
class << self
def decompose(name, rule); end | true |
Other | Homebrew | brew | 7c273dc5b5961b17f95675e418838dcd62cf1fb7.json | Update RBI files for public_suffix. | Library/Homebrew/sorbet/rbi/parlour.rbi | @@ -158,6 +158,9 @@ module Cask
sig { returns(T::Boolean) }
def verbose?; end
+ sig { returns(T::Boolean) }
+ def zap?; end
+
sig { returns(T::Boolean) }
def installed_as_dependency?; end
| true |
Other | Homebrew | brew | 85c387393cefc4627b02f1caa86d0d165193b762.json | Update RBI files for sorbet. | Library/Homebrew/sorbet/rbi/parlour.rbi | @@ -158,6 +158,9 @@ module Cask
sig { returns(T::Boolean) }
def verbose?; end
+ sig { returns(T::Boolean) }
+ def zap?; end
+
sig { returns(T::Boolean) }
def installed_as_dependency?; end
| false |
Other | Homebrew | brew | 17ee0eefb8107067fa3d1793a008dce6a8b352a8.json | utils/github: fix errors with check suites without workflow runs | Library/Homebrew/utils/github.rb | @@ -312,7 +312,7 @@ def get_workflow_run(user, repo, pr, workflow_id: "tests.yml", artifact_name: "b
commit_node = result["repository"]["pullRequest"]["commits"]["nodes"].first
check_suite = if commit_node.present?
commit_node["commit"]["checkSuites"]["nodes"].select do |suite|
- suite["workflowRun"]["workflow"]["databaseId"] == workflow_id_num
+ suite.dig("workflowRun", "workflow", "databaseId") == workflow_id_num
end
else
[] | false |
Other | Homebrew | brew | 3d5d12e8b9fad28d2923ade47ac970dfd7144843.json | service: add sockets and keepalive variants | Library/Homebrew/service.rb | @@ -18,6 +18,8 @@ class Service
PROCESS_TYPE_INTERACTIVE = :interactive
PROCESS_TYPE_ADAPTIVE = :adaptive
+ KEEP_ALIVE_KEYS = [:always, :successful_exit, :crashed, :path].freeze
+
# sig { params(formula: Formula).void }
def initialize(formula, &block)
@formula = formula
@@ -100,15 +102,41 @@ def error_log_path(path = nil)
end
end
- sig { params(value: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) }
+ sig {
+ params(value: T.nilable(T.any(T::Boolean, T::Hash[Symbol, T.untyped])))
+ .returns(T.nilable(T::Hash[Symbol, T.untyped]))
+ }
def keep_alive(value = nil)
case T.unsafe(value)
when nil
@keep_alive
when true, false
+ @keep_alive = { always: value }
+ when Hash
+ hash = T.cast(value, Hash)
+ unless (hash.keys - KEEP_ALIVE_KEYS).empty?
+ raise TypeError, "Service#keep_alive allows only #{KEEP_ALIVE_KEYS}"
+ end
+
@keep_alive = value
else
- raise TypeError, "Service#keep_alive expects a Boolean"
+ raise TypeError, "Service#keep_alive expects a Boolean or Hash"
+ end
+ end
+
+ sig { params(value: T.nilable(String)).returns(T.nilable(T::Hash[Symbol, String])) }
+ def sockets(value = nil)
+ case T.unsafe(value)
+ when nil
+ @sockets
+ when String
+ match = T.must(value).match(%r{([a-z]+)://([a-z0-9.]+):([0-9]+)}i)
+ raise TypeError, "Service#sockets a formatted socket definition as <type>://<host>:<port>" if match.blank?
+
+ type, host, port = match.captures
+ @sockets = { host: host, port: port, type: type }
+ else
+ raise TypeError, "Service#sockets expects a String"
end
end
@@ -117,7 +145,7 @@ def keep_alive(value = nil)
sig { returns(T::Boolean) }
def keep_alive?
instance_eval(&@service_block)
- @keep_alive == true
+ @keep_alive.present? && @keep_alive[:always] != false
end
sig { params(value: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) }
@@ -310,7 +338,6 @@ def to_plist
RunAtLoad: @run_type == RUN_TYPE_IMMEDIATE,
}
- base[:KeepAlive] = @keep_alive if @keep_alive == true
base[:LaunchOnlyOnce] = @launch_only_once if @launch_only_once == true
base[:LegacyTimers] = @macos_legacy_timers if @macos_legacy_timers == true
base[:TimeOut] = @restart_delay if @restart_delay.present?
@@ -323,6 +350,28 @@ def to_plist
base[:StandardErrorPath] = @error_log_path if @error_log_path.present?
base[:EnvironmentVariables] = @environment_variables unless @environment_variables.empty?
+ if keep_alive?
+ if (always = @keep_alive[:always].presence)
+ base[:KeepAlive] = always
+ elsif @keep_alive.key?(:successful_exit)
+ base[:KeepAlive] = { SuccessfulExit: @keep_alive[:successful_exit] }
+ elsif @keep_alive.key?(:crashed)
+ base[:KeepAlive] = { Crashed: @keep_alive[:crashed] }
+ elsif @keep_alive.key?(:path) && @keep_alive[:path].present?
+ base[:KeepAlive] = { PathState: @keep_alive[:path].to_s }
+ end
+ end
+
+ if @sockets.present?
+ base[:Sockets] = {}
+ base[:Sockets][:Listeners] = {
+ SockNodeName: @sockets[:host],
+ SockServiceName: @sockets[:port],
+ SockProtocol: @sockets[:type].upcase,
+ SockFamily: "IPv4v6",
+ }
+ end
+
if @cron.present? && @run_type == RUN_TYPE_CRON
base[:StartCalendarInterval] = @cron.reject { |_, value| value == "*" }
end
@@ -350,7 +399,8 @@ def to_systemd_unit
options = []
options << "Type=#{@launch_only_once == true ? "oneshot" : "simple"}"
options << "ExecStart=#{cmd}"
- options << "Restart=always" if @keep_alive == true
+
+ options << "Restart=always" if @keep_alive.present? && @keep_alive[:always].present?
options << "RestartSec=#{restart_delay}" if @restart_delay.present?
options << "WorkingDirectory=#{@working_dir}" if @working_dir.present?
options << "RootDirectory=#{@root_dir}" if @root_dir.present? | true |
Other | Homebrew | brew | 3d5d12e8b9fad28d2923ade47ac970dfd7144843.json | service: add sockets and keepalive variants | Library/Homebrew/test/service_spec.rb | @@ -45,6 +45,19 @@
end
end
+ describe "#keep_alive" do
+ it "throws for unexpected keys" do
+ f.class.service do
+ run opt_bin/"beanstalkd"
+ keep_alive test: "key"
+ end
+
+ expect {
+ f.service.manual_command
+ }.to raise_error TypeError, "Service#keep_alive allows only [:always, :successful_exit, :crashed, :path]"
+ end
+ end
+
describe "#run_type" do
it "throws for unexpected type" do
f.class.service do
@@ -58,6 +71,41 @@
end
end
+ describe "#sockets" do
+ it "throws for missing type" do
+ f.class.service do
+ run opt_bin/"beanstalkd"
+ sockets "127.0.0.1:80"
+ end
+
+ expect {
+ f.service.manual_command
+ }.to raise_error TypeError, "Service#sockets a formatted socket definition as <type>://<host>:<port>"
+ end
+
+ it "throws for missing host" do
+ f.class.service do
+ run opt_bin/"beanstalkd"
+ sockets "tcp://:80"
+ end
+
+ expect {
+ f.service.manual_command
+ }.to raise_error TypeError, "Service#sockets a formatted socket definition as <type>://<host>:<port>"
+ end
+
+ it "throws for missing port" do
+ f.class.service do
+ run opt_bin/"beanstalkd"
+ sockets "tcp://127.0.0.1"
+ end
+
+ expect {
+ f.service.manual_command
+ }.to raise_error TypeError, "Service#sockets a formatted socket definition as <type>://<host>:<port>"
+ end
+ end
+
describe "#manual_command" do
it "returns valid manual_command" do
f.class.service do
@@ -159,6 +207,47 @@
expect(plist).to eq(plist_expect)
end
+ it "returns valid plist with socket" do
+ f.class.service do
+ run [opt_bin/"beanstalkd", "test"]
+ sockets "tcp://127.0.0.1:80"
+ end
+
+ plist = f.service.to_plist
+ plist_expect = <<~EOS
+ <?xml version="1.0" encoding="UTF-8"?>
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+ <plist version="1.0">
+ <dict>
+ \t<key>Label</key>
+ \t<string>homebrew.mxcl.formula_name</string>
+ \t<key>ProgramArguments</key>
+ \t<array>
+ \t\t<string>#{HOMEBREW_PREFIX}/opt/formula_name/bin/beanstalkd</string>
+ \t\t<string>test</string>
+ \t</array>
+ \t<key>RunAtLoad</key>
+ \t<true/>
+ \t<key>Sockets</key>
+ \t<dict>
+ \t\t<key>Listeners</key>
+ \t\t<dict>
+ \t\t\t<key>SockFamily</key>
+ \t\t\t<string>IPv4v6</string>
+ \t\t\t<key>SockNodeName</key>
+ \t\t\t<string>127.0.0.1</string>
+ \t\t\t<key>SockProtocol</key>
+ \t\t\t<string>TCP</string>
+ \t\t\t<key>SockServiceName</key>
+ \t\t\t<string>80</string>
+ \t\t</dict>
+ \t</dict>
+ </dict>
+ </plist>
+ EOS
+ expect(plist).to eq(plist_expect)
+ end
+
it "returns valid partial plist" do
f.class.service do
run opt_bin/"beanstalkd"
@@ -247,6 +336,99 @@
EOS
expect(plist).to eq(plist_expect)
end
+
+ it "returns valid keepalive-exit plist" do
+ f.class.service do
+ run opt_bin/"beanstalkd"
+ keep_alive successful_exit: false
+ end
+
+ plist = f.service.to_plist
+ plist_expect = <<~EOS
+ <?xml version="1.0" encoding="UTF-8"?>
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+ <plist version="1.0">
+ <dict>
+ \t<key>KeepAlive</key>
+ \t<dict>
+ \t\t<key>SuccessfulExit</key>
+ \t\t<false/>
+ \t</dict>
+ \t<key>Label</key>
+ \t<string>homebrew.mxcl.formula_name</string>
+ \t<key>ProgramArguments</key>
+ \t<array>
+ \t\t<string>#{HOMEBREW_PREFIX}/opt/formula_name/bin/beanstalkd</string>
+ \t</array>
+ \t<key>RunAtLoad</key>
+ \t<true/>
+ </dict>
+ </plist>
+ EOS
+ expect(plist).to eq(plist_expect)
+ end
+
+ it "returns valid keepalive-crashed plist" do
+ f.class.service do
+ run opt_bin/"beanstalkd"
+ keep_alive crashed: true
+ end
+
+ plist = f.service.to_plist
+ plist_expect = <<~EOS
+ <?xml version="1.0" encoding="UTF-8"?>
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+ <plist version="1.0">
+ <dict>
+ \t<key>KeepAlive</key>
+ \t<dict>
+ \t\t<key>Crashed</key>
+ \t\t<true/>
+ \t</dict>
+ \t<key>Label</key>
+ \t<string>homebrew.mxcl.formula_name</string>
+ \t<key>ProgramArguments</key>
+ \t<array>
+ \t\t<string>#{HOMEBREW_PREFIX}/opt/formula_name/bin/beanstalkd</string>
+ \t</array>
+ \t<key>RunAtLoad</key>
+ \t<true/>
+ </dict>
+ </plist>
+ EOS
+ expect(plist).to eq(plist_expect)
+ end
+
+ it "returns valid keepalive-path plist" do
+ f.class.service do
+ run opt_bin/"beanstalkd"
+ keep_alive path: opt_pkgshare/"test-path"
+ end
+
+ plist = f.service.to_plist
+ plist_expect = <<~EOS
+ <?xml version="1.0" encoding="UTF-8"?>
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+ <plist version="1.0">
+ <dict>
+ \t<key>KeepAlive</key>
+ \t<dict>
+ \t\t<key>PathState</key>
+ \t\t<string>#{HOMEBREW_PREFIX}/opt/formula_name/share/formula_name/test-path</string>
+ \t</dict>
+ \t<key>Label</key>
+ \t<string>homebrew.mxcl.formula_name</string>
+ \t<key>ProgramArguments</key>
+ \t<array>
+ \t\t<string>#{HOMEBREW_PREFIX}/opt/formula_name/bin/beanstalkd</string>
+ \t</array>
+ \t<key>RunAtLoad</key>
+ \t<true/>
+ </dict>
+ </plist>
+ EOS
+ expect(plist).to eq(plist_expect)
+ end
end
describe "#to_systemd_unit" do
@@ -426,6 +608,15 @@
end
describe "#keep_alive?" do
+ it "returns true when keep_alive set to hash" do
+ f.class.service do
+ run [opt_bin/"beanstalkd", "test"]
+ keep_alive crashed: true
+ end
+
+ expect(f.service.keep_alive?).to be(true)
+ end
+
it "returns true when keep_alive set to true" do
f.class.service do
run [opt_bin/"beanstalkd", "test"] | true |
Other | Homebrew | brew | 3d5d12e8b9fad28d2923ade47ac970dfd7144843.json | service: add sockets and keepalive variants | docs/Formula-Cookbook.md | @@ -799,6 +799,7 @@ The only required field in a `service` block is the `run` field to indicate what
| `restart_delay` | - | yes | yes | The delay before restarting a process |
| `process_type` | - | yes | no-op | The type of process to manage, `:background`, `:standard`, `:interactive` or `:adaptive` |
| `macos_legacy_timers` | - | yes | no-op | Timers created by launchd jobs are coalesced unless this is set |
+| `sockets` | - | yes | no-op | A socket that is created as an accesspoint to the service |
For services that start and keep running alive you can use the default `run_type :` like so:
```ruby
@@ -836,6 +837,55 @@ This method will set the path to `#{HOMEBREW_PREFIX}/bin:#{HOMEBREW_PREFIX}/sbin
end
```
+#### KeepAlive options
+The standard options, keep alive regardless of any status or circomstances
+```rb
+ service do
+ run [opt_bin/"beanstalkd", "test"]
+ keep_alive true # or false
+ end
+```
+
+Same as above in hash form
+```rb
+ service do
+ run [opt_bin/"beanstalkd", "test"]
+ keep_alive { always: true }
+ end
+```
+
+Keep alive until the job exits with a non-zero return code
+```rb
+ service do
+ run [opt_bin/"beanstalkd", "test"]
+ keep_alive { succesful_exit: true }
+ end
+```
+
+Keep alive only if the job crashed
+```rb
+ service do
+ run [opt_bin/"beanstalkd", "test"]
+ keep_alive { crashed: true }
+ end
+```
+
+Keep alive as long as a file exists
+```rb
+ service do
+ run [opt_bin/"beanstalkd", "test"]
+ keep_alive { path: "/some/path" }
+ end
+```
+
+#### Socket format
+The sockets method accepts a formatted socket definition as `<type>://<host>:<port>`.
+- `type`: `udp` or `tcp`
+- `host`: The host to run the socket on. For example `0.0.0.0`
+- `port`: The port the socket should listen on.
+
+Please note that sockets will be accessible on IPv4 and IPv6 addresses by default.
+
### Using environment variables
Homebrew has multiple levels of environment variable filtering which affects variables available to formulae. | true |
Other | Homebrew | brew | 47699614fd4c5dce4d0c1216f09756c84c653f1b.json | repair the command option | Library/Homebrew/dev-cmd/edit.rb | @@ -64,7 +64,7 @@ def edit
else
<<~EOS
#{path} doesn't exist on disk. \
- Run #{Formatter.identifier("brew create --set-name #{path.basename} $URL")} \
+ Run #{Formatter.identifier("brew create --formula --set-name #{path.basename} $URL")} \
to create a new formula!
EOS
end | false |
Other | Homebrew | brew | a5c29fff2d30ac23eecb2bb7bb0d7d3c9193ac98.json | utils/github.rb: convert pr to integer
Follow up adter #13124
I made the choice to convert the pr variable to an integer
at the very end and adjust the tests.
It would be maybe more consistent to work with an integer
everywhere, but this needs a more careful analysis and we
are in a hurry to fix the homberew-core upload CI
Fixes:
2022-04-11T20:19:34.1395885Z [31mError:[0m : Variable $pr of type Int! was provided invalid value
2022-04-11T20:19:34.1398279Z /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/utils/github/api.rb:261:in `open_graphql'
2022-04-11T20:19:34.1399774Z /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/utils/github.rb:310:in `get_workflow_run'
2022-04-11T20:19:34.1403699Z /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/dev-cmd/pr-pull.rb:418:in `block (4 levels) in pr_pull'
2022-04-11T20:19:34.1405233Z /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/dev-cmd/pr-pull.rb:417:in `each'
2022-04-11T20:19:34.1406723Z /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/dev-cmd/pr-pull.rb:417:in `block (3 levels) in pr_pull'
2022-04-11T20:19:34.1408112Z /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.8/lib/ruby/2.6.0/fileutils.rb:128:in `chdir'
2022-04-11T20:19:34.1408986Z /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.8/lib/ruby/2.6.0/fileutils.rb:128:in `cd'
2022-04-11T20:19:34.1409813Z /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/dev-cmd/pr-pull.rb:400:in `block (2 levels) in pr_pull'
2022-04-11T20:19:34.1410671Z /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.8/lib/ruby/2.6.0/tmpdir.rb:93:in `mktmpdir'
2022-04-11T20:19:34.1411495Z /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/dev-cmd/pr-pull.rb:399:in `block in pr_pull'
2022-04-11T20:19:34.1412250Z /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/dev-cmd/pr-pull.rb:388:in `each'
2022-04-11T20:19:34.1413056Z /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/dev-cmd/pr-pull.rb:388:in `pr_pull' | Library/Homebrew/test/utils/github_spec.rb | @@ -69,22 +69,22 @@
it "fails to find a nonexistent workflow" do
expect {
described_class.get_artifact_url(
- described_class.get_workflow_run("Homebrew", "homebrew-core", 1),
+ described_class.get_workflow_run("Homebrew", "homebrew-core", "1"),
)
}.to raise_error(/No matching check suite found/)
end
it "fails to find artifacts that don't exist" do
expect {
described_class.get_artifact_url(
- described_class.get_workflow_run("Homebrew", "homebrew-core", 79751, artifact_name: "false_bottles"),
+ described_class.get_workflow_run("Homebrew", "homebrew-core", "79751", artifact_name: "false_bottles"),
)
}.to raise_error(/No artifact .+ was found/)
end
it "gets an artifact link" do
url = described_class.get_artifact_url(
- described_class.get_workflow_run("Homebrew", "homebrew-core", 79751, artifact_name: "bottles"),
+ described_class.get_workflow_run("Homebrew", "homebrew-core", "79751", artifact_name: "bottles"),
)
expect(url).to eq("https://api.github.com/repos/Homebrew/homebrew-core/actions/artifacts/70494047/zip")
end | true |
Other | Homebrew | brew | a5c29fff2d30ac23eecb2bb7bb0d7d3c9193ac98.json | utils/github.rb: convert pr to integer
Follow up adter #13124
I made the choice to convert the pr variable to an integer
at the very end and adjust the tests.
It would be maybe more consistent to work with an integer
everywhere, but this needs a more careful analysis and we
are in a hurry to fix the homberew-core upload CI
Fixes:
2022-04-11T20:19:34.1395885Z [31mError:[0m : Variable $pr of type Int! was provided invalid value
2022-04-11T20:19:34.1398279Z /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/utils/github/api.rb:261:in `open_graphql'
2022-04-11T20:19:34.1399774Z /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/utils/github.rb:310:in `get_workflow_run'
2022-04-11T20:19:34.1403699Z /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/dev-cmd/pr-pull.rb:418:in `block (4 levels) in pr_pull'
2022-04-11T20:19:34.1405233Z /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/dev-cmd/pr-pull.rb:417:in `each'
2022-04-11T20:19:34.1406723Z /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/dev-cmd/pr-pull.rb:417:in `block (3 levels) in pr_pull'
2022-04-11T20:19:34.1408112Z /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.8/lib/ruby/2.6.0/fileutils.rb:128:in `chdir'
2022-04-11T20:19:34.1408986Z /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.8/lib/ruby/2.6.0/fileutils.rb:128:in `cd'
2022-04-11T20:19:34.1409813Z /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/dev-cmd/pr-pull.rb:400:in `block (2 levels) in pr_pull'
2022-04-11T20:19:34.1410671Z /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.8/lib/ruby/2.6.0/tmpdir.rb:93:in `mktmpdir'
2022-04-11T20:19:34.1411495Z /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/dev-cmd/pr-pull.rb:399:in `block in pr_pull'
2022-04-11T20:19:34.1412250Z /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/dev-cmd/pr-pull.rb:388:in `each'
2022-04-11T20:19:34.1413056Z /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/dev-cmd/pr-pull.rb:388:in `pr_pull' | Library/Homebrew/utils/github.rb | @@ -305,7 +305,7 @@ def get_workflow_run(user, repo, pr, workflow_id: "tests.yml", artifact_name: "b
variables = {
user: user,
repo: repo,
- pr: pr,
+ pr: pr.to_i,
}
result = API.open_graphql(query, variables: variables, scopes: scopes)
| true |
Other | Homebrew | brew | 90d832eb7e17eeb7f077e8def1f8667dda91c04b.json | Update RBI files for regexp_parser. | Library/Homebrew/sorbet/rbi/gems/regexp_parser@2.3.0.rbi | @@ -799,57 +799,62 @@ end
module Regexp::Syntax
private
- def comparable_version(name); end
+ def comparable(name); end
def const_missing(const_name); end
def fallback_version_class(version); end
- def inherit_from_version(parent_version, new_version); end
+ def for(name); end
def new(name); end
def specified_versions; end
def supported?(name); end
def version_class(version); end
- def version_const_name(version_string); end
def warn_if_future_version(const_name); end
class << self
- def comparable_version(name); end
+ def comparable(name); end
def const_missing(const_name); end
def fallback_version_class(version); end
- def inherit_from_version(parent_version, new_version); end
+ def for(name); end
def new(name); end
def specified_versions; end
def supported?(name); end
def version_class(version); end
- def version_const_name(version_string); end
def warn_if_future_version(const_name); end
end
end
class Regexp::Syntax::Any < ::Regexp::Syntax::Base
- def initialize; end
-
- def implements!(_type, _token); end
- def implements?(_type, _token); end
+ class << self
+ def implements?(_type, _token); end
+ end
end
class Regexp::Syntax::Base
include ::Regexp::Syntax::Token
def initialize; end
- def check!(type, token); end
- def check?(type, token); end
- def excludes(type, tokens); end
- def features; end
- def implementations(type); end
- def implements(type, tokens); end
- def implements!(type, token); end
- def implements?(type, token); end
- def normalize(type, token); end
- def normalize_backref(type, token); end
- def normalize_group(type, token); end
+ def method_missing(name, *args); end
+
+ private
+
+ def respond_to_missing?(name, include_private = T.unsafe(nil)); end
class << self
- def inspect; end
+ def added_features; end
+ def check!(type, token); end
+ def check?(type, token); end
+ def excludes(type, tokens); end
+ def features; end
+ def features=(_arg0); end
+ def implementations(type); end
+ def implements(type, tokens); end
+ def implements!(type, token); end
+ def implements?(type, token); end
+ def inherited(subclass); end
+ def normalize(type, token); end
+ def normalize_backref(type, token); end
+ def normalize_group(type, token); end
+ def removed_features; end
end
end
@@ -957,6 +962,7 @@ Regexp::Syntax::Token::Quantifier::IntervalReluctant = T.let(T.unsafe(nil), Arra
Regexp::Syntax::Token::Quantifier::Possessive = T.let(T.unsafe(nil), Array)
Regexp::Syntax::Token::Quantifier::Reluctant = T.let(T.unsafe(nil), Array)
Regexp::Syntax::Token::Quantifier::Type = T.let(T.unsafe(nil), Symbol)
+Regexp::Syntax::Token::Quantifier::V1_8_6 = T.let(T.unsafe(nil), Array)
module Regexp::Syntax::Token::SubexpressionCall; end
Regexp::Syntax::Token::SubexpressionCall::All = T.let(T.unsafe(nil), Array)
Regexp::Syntax::Token::SubexpressionCall::Name = T.let(T.unsafe(nil), Array)
@@ -974,6 +980,7 @@ Regexp::Syntax::Token::UnicodeProperty::Age_V2_6_0 = T.let(T.unsafe(nil), Array)
Regexp::Syntax::Token::UnicodeProperty::Age_V2_6_2 = T.let(T.unsafe(nil), Array)
Regexp::Syntax::Token::UnicodeProperty::Age_V2_6_3 = T.let(T.unsafe(nil), Array)
Regexp::Syntax::Token::UnicodeProperty::Age_V3_1_0 = T.let(T.unsafe(nil), Array)
+Regexp::Syntax::Token::UnicodeProperty::Age_V3_2_0 = T.let(T.unsafe(nil), Array)
Regexp::Syntax::Token::UnicodeProperty::All = T.let(T.unsafe(nil), Array)
module Regexp::Syntax::Token::UnicodeProperty::Category; end
Regexp::Syntax::Token::UnicodeProperty::Category::All = T.let(T.unsafe(nil), Array)
@@ -1006,6 +1013,7 @@ Regexp::Syntax::Token::UnicodeProperty::Script_V2_5_0 = T.let(T.unsafe(nil), Arr
Regexp::Syntax::Token::UnicodeProperty::Script_V2_6_0 = T.let(T.unsafe(nil), Array)
Regexp::Syntax::Token::UnicodeProperty::Script_V2_6_2 = T.let(T.unsafe(nil), Array)
Regexp::Syntax::Token::UnicodeProperty::Script_V3_1_0 = T.let(T.unsafe(nil), Array)
+Regexp::Syntax::Token::UnicodeProperty::Script_V3_2_0 = T.let(T.unsafe(nil), Array)
Regexp::Syntax::Token::UnicodeProperty::Type = T.let(T.unsafe(nil), Symbol)
Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock = T.let(T.unsafe(nil), Array)
Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V1_9_0 = T.let(T.unsafe(nil), Array)
@@ -1017,6 +1025,7 @@ Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_5_0 = T.let(T.unsafe(nil
Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_6_0 = T.let(T.unsafe(nil), Array)
Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_6_2 = T.let(T.unsafe(nil), Array)
Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V3_1_0 = T.let(T.unsafe(nil), Array)
+Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V3_2_0 = T.let(T.unsafe(nil), Array)
Regexp::Syntax::Token::UnicodeProperty::V1_9_0 = T.let(T.unsafe(nil), Array)
Regexp::Syntax::Token::UnicodeProperty::V1_9_3 = T.let(T.unsafe(nil), Array)
Regexp::Syntax::Token::UnicodeProperty::V2_0_0 = T.let(T.unsafe(nil), Array)
@@ -1028,74 +1037,26 @@ Regexp::Syntax::Token::UnicodeProperty::V2_6_0 = T.let(T.unsafe(nil), Array)
Regexp::Syntax::Token::UnicodeProperty::V2_6_2 = T.let(T.unsafe(nil), Array)
Regexp::Syntax::Token::UnicodeProperty::V2_6_3 = T.let(T.unsafe(nil), Array)
Regexp::Syntax::Token::UnicodeProperty::V3_1_0 = T.let(T.unsafe(nil), Array)
+Regexp::Syntax::Token::UnicodeProperty::V3_2_0 = T.let(T.unsafe(nil), Array)
class Regexp::Syntax::UnknownSyntaxNameError < ::Regexp::Syntax::SyntaxError
def initialize(name); end
end
-class Regexp::Syntax::V1_8_6 < ::Regexp::Syntax::Base
- def initialize; end
-end
-
-class Regexp::Syntax::V1_9 < ::Regexp::Syntax::V1_9_3; end
-
-class Regexp::Syntax::V1_9_1 < ::Regexp::Syntax::V1_8_6
- def initialize; end
-end
-
-class Regexp::Syntax::V1_9_3 < ::Regexp::Syntax::V1_9_1
- def initialize; end
-end
-
-class Regexp::Syntax::V2_0_0 < ::Regexp::Syntax::V1_9
- def initialize; end
-end
-
-class Regexp::Syntax::V2_1 < ::Regexp::Syntax::V2_0_0; end
-class Regexp::Syntax::V2_2 < ::Regexp::Syntax::V2_2_0; end
-
-class Regexp::Syntax::V2_2_0 < ::Regexp::Syntax::V2_1
- def initialize; end
-end
-
-class Regexp::Syntax::V2_3 < ::Regexp::Syntax::V2_3_0; end
-
-class Regexp::Syntax::V2_3_0 < ::Regexp::Syntax::V2_2
- def initialize; end
-end
-
-class Regexp::Syntax::V2_4 < ::Regexp::Syntax::V2_4_1; end
-
-class Regexp::Syntax::V2_4_0 < ::Regexp::Syntax::V2_3
- def initialize; end
-end
-
-class Regexp::Syntax::V2_4_1 < ::Regexp::Syntax::V2_4_0
- def initialize; end
-end
-
-class Regexp::Syntax::V2_5 < ::Regexp::Syntax::V2_5_0; end
-
-class Regexp::Syntax::V2_5_0 < ::Regexp::Syntax::V2_4
- def initialize; end
-end
-
-class Regexp::Syntax::V2_6_0 < ::Regexp::Syntax::V2_5
- def initialize; end
-end
-
-class Regexp::Syntax::V2_6_2 < ::Regexp::Syntax::V2_6_0
- def initialize; end
-end
-
-class Regexp::Syntax::V2_6_3 < ::Regexp::Syntax::V2_6_2
- def initialize; end
-end
-
-class Regexp::Syntax::V3_1_0 < ::Regexp::Syntax::V2_6_3
- def initialize; end
-end
-
+class Regexp::Syntax::V1_8_6 < ::Regexp::Syntax::Base; end
+class Regexp::Syntax::V1_9_1 < ::Regexp::Syntax::V1_8_6; end
+class Regexp::Syntax::V1_9_3 < ::Regexp::Syntax::V1_9_1; end
+class Regexp::Syntax::V2_0_0 < ::Regexp::Syntax::V1_9_3; end
+class Regexp::Syntax::V2_2_0 < ::Regexp::Syntax::V2_0_0; end
+class Regexp::Syntax::V2_3_0 < ::Regexp::Syntax::V2_2_0; end
+class Regexp::Syntax::V2_4_0 < ::Regexp::Syntax::V2_3_0; end
+class Regexp::Syntax::V2_4_1 < ::Regexp::Syntax::V2_4_0; end
+class Regexp::Syntax::V2_5_0 < ::Regexp::Syntax::V2_4_1; end
+class Regexp::Syntax::V2_6_0 < ::Regexp::Syntax::V2_5_0; end
+class Regexp::Syntax::V2_6_2 < ::Regexp::Syntax::V2_6_0; end
+class Regexp::Syntax::V2_6_3 < ::Regexp::Syntax::V2_6_2; end
+class Regexp::Syntax::V3_1_0 < ::Regexp::Syntax::V2_6_3; end
+class Regexp::Syntax::V3_2_0 < ::Regexp::Syntax::V3_1_0; end
Regexp::Syntax::VERSION_CONST_REGEXP = T.let(T.unsafe(nil), Regexp)
Regexp::Syntax::VERSION_FORMAT = T.let(T.unsafe(nil), String)
Regexp::Syntax::VERSION_REGEXP = T.let(T.unsafe(nil), Regexp) | false |
Other | Homebrew | brew | e19bf06b4f577bda8a6dd9d49780629a91020967.json | Update RBI files for rubocop-ast. | Library/Homebrew/sorbet/rbi/gems/rubocop-ast@1.17.0.rbi | @@ -1449,10 +1449,12 @@ RuboCop::AST::NodePattern::Sets::SET_LOAD_RESTORE = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_MAP_COLLECT = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_MATCH_MATCH = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_MATCH__MATCH = T.let(T.unsafe(nil), Set)
+RuboCop::AST::NodePattern::Sets::SET_MESSAGES_DETAILS = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_NEW_ = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_NEW_COMPILE = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_NEW_OPEN = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_NIL_ = T.let(T.unsafe(nil), Set)
+RuboCop::AST::NodePattern::Sets::SET_NOTICE_ALERT = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_ONLY_EXCEPT = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_PIPELINE_PIPELINE_R_PIPELINE_RW_ETC = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_PRIVATE_PROTECTED = T.let(T.unsafe(nil), Set)
@@ -1470,6 +1472,7 @@ RuboCop::AST::NodePattern::Sets::SET_RECEIVE_RECEIVE_MESSAGES_RECEIVE_MESSAGE_CH
RuboCop::AST::NodePattern::Sets::SET_RECEIVE_RECEIVE_MESSAGE_CHAIN = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_REDUCE_INJECT = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_REFERER_REFERRER = T.let(T.unsafe(nil), Set)
+RuboCop::AST::NodePattern::Sets::SET_REJECT_DELETE_IF_REJECT = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_REJECT_REJECT = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_RENDER_REDIRECT_TO = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_REQUIRE_REQUIRE_RELATIVE = T.let(T.unsafe(nil), Set)
@@ -1494,6 +1497,7 @@ RuboCop::AST::NodePattern::Sets::SET_TO_ENUM_ENUM_FOR = T.let(T.unsafe(nil), Set
RuboCop::AST::NodePattern::Sets::SET_TO_H_TO_HASH = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_TO_I_TO_F_TO_C_TO_R = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_TRANSLATE_LOCALIZE = T.let(T.unsafe(nil), Set)
+RuboCop::AST::NodePattern::Sets::SET_TRANSLATE_T = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_TRUE_FALSE = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_TRY_TRY = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_TYPE_TEMPLATE_TYPE_MEMBER = T.let(T.unsafe(nil), Set) | true |
Other | Homebrew | brew | e19bf06b4f577bda8a6dd9d49780629a91020967.json | Update RBI files for rubocop-ast. | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -5041,11 +5041,7 @@ module RuboCop::AST::NodePattern::Sets
SET_BUILD_RECOMMENDED_TEST_OPTIONAL = ::T.let(nil, ::T.untyped)
SET_DEPENDS_ON_USES_FROM_MACOS = ::T.let(nil, ::T.untyped)
SET_INCLUDE_WITH_WITHOUT = ::T.let(nil, ::T.untyped)
- SET_MESSAGES_DETAILS = ::T.let(nil, ::T.untyped)
- SET_NOTICE_ALERT = ::T.let(nil, ::T.untyped)
- SET_REJECT_DELETE_IF_REJECT = ::T.let(nil, ::T.untyped)
SET_SYSTEM_SHELL_OUTPUT_PIPE_OUTPUT = ::T.let(nil, ::T.untyped)
- SET_TRANSLATE_T = ::T.let(nil, ::T.untyped)
SET_WITH_WITHOUT = ::T.let(nil, ::T.untyped)
end
| true |
Other | Homebrew | brew | a50db1378eeee12ce7c728e056fb731c9282175f.json | download_strategy: ignore query strings when parsing resolved URLs | Library/Homebrew/download_strategy.rb | @@ -327,7 +327,7 @@ def resolved_url_and_basename
@resolved_url_and_basename = [url, parse_basename(url)]
end
- def parse_basename(url)
+ def parse_basename(url, search_query: true)
uri_path = if url.match?(URI::DEFAULT_PARSER.make_regexp)
uri = URI(url)
@@ -339,7 +339,11 @@ def parse_basename(url)
end
end
- uri.query ? "#{uri.path}?#{uri.query}" : uri.path
+ if uri.query && search_query
+ "#{uri.path}?#{uri.query}"
+ else
+ uri.path
+ end
else
url
end
@@ -509,8 +513,8 @@ def resolve_url_basename_time_file_size(url, timeout: nil)
.map(&:to_i)
.last
- basename = filenames.last || parse_basename(redirect_url)
is_redirection = url != redirect_url
+ basename = filenames.last || parse_basename(redirect_url, search_query: !is_redirection)
@resolved_info_cache[url] = [redirect_url, basename, time, file_size, is_redirection]
end | false |
Other | Homebrew | brew | 4c75c82a79737a0f4bb9867ca11fcaf6a2bfa0ca.json | Fix "OpenCollective" references. | docs/Homebrew-Governance.md | @@ -48,7 +48,7 @@
## 4. Project Leadership Committee
-1. The financial administration of Homebrew, organisation of the AGM, enforcement of the code of conduct and removal of members are performed by the PLC. The PLC will represent Homebrew in all dealings with OpenCollective.
+1. The financial administration of Homebrew, organisation of the AGM, enforcement of the code of conduct and removal of members are performed by the PLC. The PLC will represent Homebrew in all dealings with Open Collective.
2. The PLC consists of five members including the Project Leader. Committee members are elected by Homebrew members in a [Meek Single Transferable Vote](https://en.wikipedia.org/wiki/Counting_single_transferable_votes#Meek) election using the Droop quota. Each PLC member will serve a term of two years or until the member's successor is elected. Any sudden vacancy in the PLC will be filled by the usual procedure for electing PLC members at the next general meeting, typically the next AGM.
| true |
Other | Homebrew | brew | 4c75c82a79737a0f4bb9867ca11fcaf6a2bfa0ca.json | Fix "OpenCollective" references. | docs/Homebrew-Leadership-Responsibilities.md | @@ -12,7 +12,7 @@
### PLC Shared Responsibilities
-- approving OpenCollective expenses that are expected or have already been agreed upon by the PLC (e.g. Homebrew cloud usage on a personal credit card) (only one approval needed)
+- approving Open Collective expenses that are expected or have already been agreed upon by the PLC (e.g. Homebrew cloud usage on a personal credit card) (only one approval needed)
- blocking abusive GitHub users
- performing GitHub admin operations on the Homebrew GitHub organisation
- performing Slack admin operations on the Homebrew Slack
@@ -53,7 +53,7 @@
### PL Shared Responsibilities
- approving new Homebrew maintainers (only one approval needed)
-- approving OpenCollective expenses that are expected or have already been agreed upon by the PLC (e.g. Homebrew cloud usage on a personal credit card) (only one approval needed)
+- approving Open Collective expenses that are expected or have already been agreed upon by the PLC (e.g. Homebrew cloud usage on a personal credit card) (only one approval needed)
- blocking abusive GitHub users
- performing GitHub admin operations on the Homebrew GitHub organisation
- performing Slack admin operations on the Homebrew Slack | true |
Other | Homebrew | brew | ae7b547ab61768ed3e95d4c12272e034ce06afac.json | docs/Homebrew-Governance: State the election types for PLC and PL
- A vote passed in 2021 on an amendment to use these election types (https://github.com/Homebrew/brew/pull/10637), but the changes to the governance document were only made in Homebrew/brew, not in Homebrew/homebrew-governance-private: https://github.com/Homebrew/brew/pull/13073/files#r844130115.
- When we copied over 2022's proposed changes ahead of the 2022 vote, the specific election voting methods were lost because these documents got out of sync.
- For the elections in 2022, we did use the voting methods as documented in the Homebrew/brew governance document (confirmed in https://github.com/Homebrew/brew/pull/13031 when I couldn't find the term on OpaVote), so let's reinstate them here to avoid confusion.
- Relates to https://github.com/Homebrew/homebrew-governance-private/pull/36. | docs/Homebrew-Governance.md | @@ -50,7 +50,7 @@
1. The financial administration of Homebrew, organisation of the AGM, enforcement of the code of conduct and removal of members are performed by the PLC. The PLC will represent Homebrew in all dealings with OpenCollective.
-2. The PLC consists of five members including the Project Leader. Committee members are elected by majority vote of Homebrew members. Each PLC member will serve a term of two years or until the member's successor is elected. Any sudden vacancy in the PLC will be filled by the usual procedure for electing PLC members at the next general meeting, typically the next AGM.
+2. The PLC consists of five members including the Project Leader. Committee members are elected by Homebrew members in a [Meek Single Transferable Vote](https://en.wikipedia.org/wiki/Counting_single_transferable_votes#Meek) election using the Droop quota. Each PLC member will serve a term of two years or until the member's successor is elected. Any sudden vacancy in the PLC will be filled by the usual procedure for electing PLC members at the next general meeting, typically the next AGM.
3. Three weeks prior to the AGM, the PLC will nominate at least one candidate for each upcoming vacant seat. Any member may also nominate any other member as a candidate for the PLC at this time.
@@ -80,7 +80,7 @@
1. The Project Leader will represent Homebrew publicly, manage all day-to-day technical decisions, and resolve disputes related to the operation of Homebrew between maintainers, members, other contributors, and users.
-2. The Project Leader will be elected annually by a majority vote of Homebrew members. The PLC will nominate at least one candidate for Project Leader. Any member may nominate a candidate, or self-nominate. Nominations must be announced to the membership three weeks before the AGM.
+2. The Project Leader will be elected annually by Homebrew members in a [Schulze Condorcet method](https://en.wikipedia.org/wiki/Schulze_method) (aka 'beatpath') election. The PLC will nominate at least one candidate for Project Leader. Any member may nominate a candidate, or self-nominate. Nominations must be announced to the membership three weeks before the AGM.
3. Any vacancy of the Project Leader will be filled by appointment of the PLC.
| false |
Other | Homebrew | brew | 4c19d6717614c1c17fa6c557c9ef41d7ff068c1e.json | extend/os/mac/keg.rb: move codesign_patched_binary here | Library/Homebrew/extend/os/mac/keg.rb | @@ -25,4 +25,41 @@ class Keg
def binary_executable_or_library_files
mach_o_files
end
+
+ def codesign_patched_binary(file)
+ return if MacOS.version < :big_sur
+ return unless Hardware::CPU.arm?
+
+ odebug "Codesigning #{file}"
+ # Use quiet_system to squash notifications about resigning binaries
+ # which already have valid signatures.
+ return if quiet_system("codesign", "--sign", "-", "--force",
+ "--preserve-metadata=entitlements,requirements,flags,runtime",
+ file)
+
+ # If the codesigning fails, it may be a bug in Apple's codesign utility
+ # A known workaround is to copy the file to another inode, then move it back
+ # erasing the previous file. Then sign again.
+ #
+ # TODO: remove this once the bug in Apple's codesign utility is fixed
+ Dir::Tmpname.create("workaround") do |tmppath|
+ FileUtils.cp file, tmppath
+ FileUtils.mv tmppath, file, force: true
+ end
+
+ # Try signing again
+ odebug "Codesigning (2nd try) #{file}"
+ result = system_command("codesign", args: [
+ "--sign", "-", "--force",
+ "--preserve-metadata=entitlements,requirements,flags,runtime",
+ file
+ ], print_stderr: false)
+ return if result.success?
+
+ # If it fails again, error out
+ onoe <<~EOS
+ Failed applying an ad-hoc signature to #{file}:
+ #{result.stderr}
+ EOS
+ end
end | false |
Other | Homebrew | brew | 3b089ee90195c9ce024b4b820c85d9368af34b86.json | keg.rb: add generic codesign_patched_binary method | Library/Homebrew/keg.rb | @@ -529,6 +529,8 @@ def binary_executable_or_library_files
elf_files
end
+ def codesign_patched_binary(file); end
+
private
def resolve_any_conflicts(dst, dry_run: false, verbose: false, overwrite: false) | false |
Other | Homebrew | brew | 7d0625a669e993ef25f7dac45ba712862fdc8dcd.json | Update RBI files for rubocop. | Library/Homebrew/sorbet/rbi/gems/rubocop@1.27.0.rbi | @@ -691,6 +691,7 @@ module RuboCop::Cop::AutocorrectLogic
def autocorrect?; end
def autocorrect_enabled?; end
def autocorrect_requested?; end
+ def autocorrect_with_disable_uncorrectable?; end
def correctable?; end
def disable_uncorrectable?; end
def safe_autocorrect?; end
@@ -1010,15 +1011,15 @@ end
RuboCop::Cop::CodeLength::MSG = T.let(T.unsafe(nil), String)
module RuboCop::Cop::CommentsHelp
- include ::RuboCop::Cop::VisibilityHelp
-
+ def contains_comments?(node); end
def source_range_with_comment(node); end
private
def begin_pos_with_comment(node); end
def buffer; end
def end_position_for(node); end
+ def find_end_line(node); end
def start_line_position(node); end
end
@@ -4536,6 +4537,8 @@ RuboCop::Cop::Lint::EmptyClass::CLASS_MSG = T.let(T.unsafe(nil), String)
RuboCop::Cop::Lint::EmptyClass::METACLASS_MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Lint::EmptyConditionalBody < ::RuboCop::Cop::Base
+ include ::RuboCop::Cop::CommentsHelp
+
def on_if(node); end
end
@@ -4574,6 +4577,7 @@ end
RuboCop::Cop::Lint::EmptyFile::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Lint::EmptyInPattern < ::RuboCop::Cop::Base
+ include ::RuboCop::Cop::CommentsHelp
extend ::RuboCop::Cop::TargetRubyVersion
def on_case_match(node); end
@@ -4591,6 +4595,8 @@ end
RuboCop::Cop::Lint::EmptyInterpolation::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Lint::EmptyWhen < ::RuboCop::Cop::Base
+ include ::RuboCop::Cop::CommentsHelp
+
def on_case(node); end
end
@@ -4822,6 +4828,7 @@ RuboCop::Cop::Lint::InterpolationCheck::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Lint::LambdaWithoutLiteralBlock < ::RuboCop::Cop::Base
extend ::RuboCop::Cop::AutoCorrector
+ def lambda_with_symbol_proc?(param0 = T.unsafe(nil)); end
def on_send(node); end
end
@@ -5381,6 +5388,15 @@ end
RuboCop::Cop::Lint::RedundantWithObject::MSG_EACH_WITH_OBJECT = T.let(T.unsafe(nil), String)
RuboCop::Cop::Lint::RedundantWithObject::MSG_WITH_OBJECT = T.let(T.unsafe(nil), String)
+class RuboCop::Cop::Lint::RefinementImportMethods < ::RuboCop::Cop::Base
+ extend ::RuboCop::Cop::TargetRubyVersion
+
+ def on_send(node); end
+end
+
+RuboCop::Cop::Lint::RefinementImportMethods::MSG = T.let(T.unsafe(nil), String)
+RuboCop::Cop::Lint::RefinementImportMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
+
class RuboCop::Cop::Lint::RegexpAsCondition < ::RuboCop::Cop::Base
extend ::RuboCop::Cop::AutoCorrector
@@ -5593,6 +5609,7 @@ RuboCop::Cop::Lint::ShadowedException::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Lint::ShadowingOuterLocalVariable < ::RuboCop::Cop::Base
def before_declaring_variable(variable, variable_table); end
def ractor_block?(param0 = T.unsafe(nil)); end
+ def same_conditions_node_different_branch?(variable, outer_local_variable); end
class << self
def joining_forces; end
@@ -7837,8 +7854,8 @@ RuboCop::Cop::Style::ClassMethods::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Style::ClassMethodsDefinitions < ::RuboCop::Cop::Base
include ::RuboCop::Cop::ConfigurableEnforcedStyle
- include ::RuboCop::Cop::VisibilityHelp
include ::RuboCop::Cop::CommentsHelp
+ include ::RuboCop::Cop::VisibilityHelp
include ::RuboCop::Cop::RangeHelp
extend ::RuboCop::Cop::AutoCorrector
@@ -8270,9 +8287,12 @@ class RuboCop::Cop::Style::DoubleNegation < ::RuboCop::Cop::Base
private
def allowed_in_returns?(node); end
+ def double_negative_condition_return_value?(node, last_child, conditional_node); end
def end_of_method_definition?(node); end
+ def find_conditional_node_from_ascendant(node); end
def find_def_node_from_ascendant(node); end
def find_last_child(node); end
+ def find_parent_not_enumerable(node); end
end
RuboCop::Cop::Style::DoubleNegation::MSG = T.let(T.unsafe(nil), String)
@@ -10400,6 +10420,7 @@ class RuboCop::Cop::Style::RaiseArgs < ::RuboCop::Cop::Base
def correction_compact_to_exploded(node); end
def correction_exploded_to_compact(node); end
def requires_parens?(parent); end
+ def use_new_method?(first_arg); end
end
RuboCop::Cop::Style::RaiseArgs::COMPACT_MSG = T.let(T.unsafe(nil), String)
@@ -10616,6 +10637,19 @@ end
RuboCop::Cop::Style::RedundantFreeze::MSG = T.let(T.unsafe(nil), String)
RuboCop::Cop::Style::RedundantFreeze::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
+class RuboCop::Cop::Style::RedundantInitialize < ::RuboCop::Cop::Base
+ def initialize_forwards?(param0 = T.unsafe(nil)); end
+ def on_def(node); end
+
+ private
+
+ def forwards?(node); end
+ def same_args?(super_node, args); end
+end
+
+RuboCop::Cop::Style::RedundantInitialize::MSG = T.let(T.unsafe(nil), String)
+RuboCop::Cop::Style::RedundantInitialize::MSG_EMPTY = T.let(T.unsafe(nil), String)
+
class RuboCop::Cop::Style::RedundantInterpolation < ::RuboCop::Cop::Base
include ::RuboCop::Cop::RangeHelp
include ::RuboCop::Cop::PercentLiteral
@@ -11014,7 +11048,7 @@ class RuboCop::Cop::Style::SafeNavigation < ::RuboCop::Cop::Base
def allowed_if_condition?(node); end
def autocorrect(corrector, node); end
def begin_range(node, method_call); end
- def chain_size(method_chain, method); end
+ def chain_length(method_chain, method); end
def comments(node); end
def end_range(node, method_call); end
def extract_common_parts(method_chain, checked_variable); end
@@ -11023,6 +11057,7 @@ class RuboCop::Cop::Style::SafeNavigation < ::RuboCop::Cop::Base
def extract_parts_from_if(node); end
def find_matching_receiver_invocation(method_chain, checked_variable); end
def handle_comments(corrector, node, method_call); end
+ def max_chain_length; end
def method_call(node); end
def method_called?(send_node); end
def negated?(send_node); end | false |
Other | Homebrew | brew | 0c0cdf81051217e2ac6721c92aaa5dad57f29de7.json | dev-cmd/audit: fix error with --installed | Library/Homebrew/dev-cmd/audit.rb | @@ -129,7 +129,7 @@ def audit
end
elsif args.installed?
no_named_args = true
- [Formula.installed, Cask::Cask.casks]
+ [Formula.installed, Cask::Caskroom.casks]
elsif args.no_named?
no_named_args = true
[Formula.all, Cask::Cask.all] | false |
Other | Homebrew | brew | f5696efc1620da3ee3906e6961d71181cb047f4b.json | set prefer_loading_from_api for fetch | Library/Homebrew/cmd/fetch.rb | @@ -66,7 +66,7 @@ def fetch
args = fetch_args.parse
bucket = if args.deps?
- args.named.to_formulae_and_casks.flat_map do |formula_or_cask|
+ args.named.to_formulae_and_casks(prefer_loading_from_api: true).flat_map do |formula_or_cask|
case formula_or_cask
when Formula
f = formula_or_cask
@@ -77,7 +77,7 @@ def fetch
end
end
else
- args.named.to_formulae_and_casks
+ args.named.to_formulae_and_casks(prefer_loading_from_api: true)
end.uniq
puts "Fetching: #{bucket * ", "}" if bucket.size > 1 | false |
Other | Homebrew | brew | 0ec9cf721c8e99d76c290ef6c2cc765171318142.json | pr-pull: fix trailing whitespace | Library/Homebrew/dev-cmd/pr-pull.rb | @@ -236,7 +236,7 @@ def autosquash!(original_commit, tap:, reason: "", verbose: false, resolve: fals
files_to_commits[file] ||= []
files_to_commits[file] << commit
tap_file = tap.path/file
- if (tap_file.dirname == tap.formula_dir || tap_file.dirname == tap.cask_dir) &&
+ if (tap_file.dirname == tap.formula_dir || tap_file.dirname == tap.cask_dir) &&
File.extname(file) == ".rb"
next
end | false |
Other | Homebrew | brew | 244a37ab7bad25e96f8064ac35fd3fa65492192f.json | Update RBI files for sorbet. | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -6506,14 +6506,6 @@ module Socket::Constants
TCP_NOPUSH = ::T.let(nil, ::T.untyped)
end
-class SortedSet
- def initialize(*args, &block); end
-end
-
-class SortedSet
- def self.setup(); end
-end
-
class Spoom::Cli::Bump
extend ::T::Sig
extend ::T::Private::Methods::MethodHooks | false |
Other | Homebrew | brew | f6b9ca88f47467bfe0f2fe44b63ea296a40e5b64.json | Update RBI files for tapioca. | Library/Homebrew/sorbet/rbi/gems/tapioca@0.7.1.rbi | @@ -577,6 +577,7 @@ module Tapioca::Dsl; end
class Tapioca::Dsl::Compiler
extend T::Generic
include ::Tapioca::Runtime::Reflection
+ include ::Tapioca::SignaturesHelper
include ::Tapioca::Dsl::Helpers::ParamHelper
extend ::Tapioca::Runtime::Reflection
@@ -648,6 +649,8 @@ Tapioca::Dsl::Compilers::NAMESPACES = T.let(T.unsafe(nil), Array)
module Tapioca::Dsl::Helpers; end
module Tapioca::Dsl::Helpers::ParamHelper
+ include ::Tapioca::SignaturesHelper
+
sig { params(name: ::String, type: ::String).returns(::RBI::TypedParam) }
def create_block_param(name, type:); end
@@ -713,6 +716,9 @@ class Tapioca::Dsl::Pipeline
private
+ sig { params(constants: T::Set[::Module]).returns(T::Set[::Module]) }
+ def filter_anonymous_and_reloaded_constants(constants); end
+
sig do
params(
requested_compilers: T::Array[T.class_of(Tapioca::Dsl::Compiler)],
@@ -911,7 +917,7 @@ end
class Tapioca::Gem::Listeners::SorbetSignatures < ::Tapioca::Gem::Listeners::Base
include ::Tapioca::Runtime::Reflection
- include ::Tapioca::RBIHelper
+ include ::Tapioca::SignaturesHelper
private
@@ -1007,7 +1013,7 @@ end
class Tapioca::Gem::Pipeline
include ::Tapioca::Runtime::Reflection
- include ::Tapioca::RBIHelper
+ include ::Tapioca::SignaturesHelper
sig { params(gem: ::Tapioca::Gemfile::GemSpec, include_doc: T::Boolean).void }
def initialize(gem, include_doc: T.unsafe(nil)); end
@@ -1247,11 +1253,6 @@ class Tapioca::RBIFormatter < ::RBI::Formatter
def write_header!(file, command, reason: T.unsafe(nil)); end
end
-module Tapioca::RBIHelper
- sig { params(sig_string: ::String).returns(::String) }
- def sanitize_signature_types(sig_string); end
-end
-
module Tapioca::Runtime; end
class Tapioca::Runtime::DynamicMixinCompiler
@@ -1529,6 +1530,11 @@ module Tapioca::ShimsHelper
def shims_have_duplicates?(nodes, shim_rbi_dir); end
end
+module Tapioca::SignaturesHelper
+ sig { params(sig_string: ::String).returns(::String) }
+ def sanitize_signature_types(sig_string); end
+end
+
module Tapioca::SorbetHelper
sig { params(sorbet_args: ::String).returns(::Tapioca::SorbetHelper::CmdResult) }
def sorbet(*sorbet_args); end | false |
Other | Homebrew | brew | 212a9efaf54ebd0414144059c54bbeead95b137e.json | rubocops/uses_from_macos: allow keg only berkeley-db | Library/Homebrew/rubocops/uses_from_macos.rb | @@ -11,6 +11,7 @@ class ProvidedByMacos < FormulaCop
PROVIDED_BY_MACOS_FORMULAE = %w[
apr
bc
+ berkeley-db
bison
bzip2
cups | false |
Other | Homebrew | brew | c4f7f41275d8a7b79d4f924b9fec729508033eb2.json | Update RBI files for parallel_tests. | Library/Homebrew/sorbet/rbi/gems/parallel_tests@3.8.1.rbi | @@ -1,9 +1,9 @@
+# typed: true
+
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `parallel_tests` gem.
# Please instead update this file by running `bin/tapioca gem parallel_tests`.
-# typed: true
-
module ParallelTests
class << self
def bundler_enabled?; end | false |
Other | Homebrew | brew | e486c8710ba32a428d1349b5bc46fdef96254aea.json | change the operator | Library/Homebrew/extend/os/mac/search.rb | @@ -37,7 +37,7 @@ def search_casks(string_or_regex)
.search(string_or_regex)
cask_names = Cask::Cask.all.map(&:full_name)
- results |= DidYouMean::SpellChecker.new(dictionary: cask_names)
+ results += DidYouMean::SpellChecker.new(dictionary: cask_names)
.correct(string_or_regex)
results.sort.map do |name| | false |
Other | Homebrew | brew | 9ce5f2960585c2f86e843431d5b0b7cfb0b70d16.json | Update RBI files for sorbet. | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -2445,10 +2445,6 @@ module Hardware
extend ::T::Private::Methods::SingletonMethodHooks
end
-class Hash
- def self.try_convert(arg); end
-end
-
module Homebrew
MAX_PORT = ::T.let(nil, ::T.untyped)
MIN_PORT = ::T.let(nil, ::T.untyped) | false |
Other | Homebrew | brew | 51a57760715fb84e58187563943092351e86c171.json | os/mac/xcode: fix latest Xcode on Big Sur | Library/Homebrew/os/mac/xcode.rb | @@ -23,7 +23,8 @@ module Xcode
def latest_version(macos: MacOS.version)
latest_stable = "13.3"
case macos
- when "12", "11" then latest_stable
+ when "12" then latest_stable
+ when "11" then "13.2.1"
when "10.15" then "12.4"
when "10.14" then "11.3.1"
when "10.13" then "10.1"
@@ -336,14 +337,15 @@ def update_instructions
sig { returns(String) }
def latest_clang_version
case MacOS.version
- when "12", "11" then "1316.0.21.2"
- when "10.15" then "1200.0.32.29"
- when "10.14" then "1100.0.33.17"
- when "10.13" then "1000.10.44.2"
- when "10.12" then "900.0.39.2"
- when "10.11" then "800.0.42.1"
- when "10.10" then "700.1.81"
- else "600.0.57"
+ when "12" then "1316.0.21.2"
+ when "11" then "1300.0.29.30"
+ when "10.15" then "1200.0.32.29"
+ when "10.14" then "1100.0.33.17"
+ when "10.13" then "1000.10.44.2"
+ when "10.12" then "900.0.39.2"
+ when "10.11" then "800.0.42.1"
+ when "10.10" then "700.1.81"
+ else "600.0.57"
end
end
| false |
Other | Homebrew | brew | a0d422fb6f18224d86cc023eb5f126d134e5c68b.json | Update RBI files for spoom. | Library/Homebrew/sorbet/rbi/gems/spoom@1.1.9.rbi | @@ -6,7 +6,7 @@
module Spoom
class << self
- sig { params(cmd: String, arg: String, path: String, capture_err: T::Boolean).returns([String, T::Boolean, Integer]) }
+ sig { params(cmd: ::String, arg: ::String, path: ::String, capture_err: T::Boolean).returns(::Spoom::ExecResult) }
def exec(cmd, *arg, path: T.unsafe(nil), capture_err: T.unsafe(nil)); end
end
end
@@ -17,7 +17,7 @@ class Spoom::Cli::Bump < ::Thor
include ::Spoom::Colorize
include ::Spoom::Cli::Helper
- sig { params(directory: String).void }
+ sig { params(directory: ::String).void }
def bump(directory = T.unsafe(nil)); end
def config_files(path: T.unsafe(nil)); end
@@ -53,31 +53,33 @@ Spoom::Cli::Coverage::DATA_DIR = T.let(T.unsafe(nil), String)
module Spoom::Cli::Helper
include ::Spoom::Colorize
- sig { params(string: String).returns(String) }
+ requires_ancestor { Thor }
+
+ sig { params(string: ::String).returns(::String) }
def blue(string); end
- sig { params(exit_code: Integer, block: T.nilable(T.proc.void)).void }
+ sig { params(exit_code: ::Integer, block: T.nilable(T.proc.void)).void }
def check_sorbet_segfault(exit_code, &block); end
sig { returns(T::Boolean) }
def color?; end
- sig { params(string: String, color: Spoom::Color).returns(String) }
+ sig { params(string: ::String, color: ::Spoom::Color).returns(::String) }
def colorize(string, *color); end
- sig { params(string: String).returns(String) }
+ sig { params(string: ::String).returns(::String) }
def cyan(string); end
- sig { returns(String) }
+ sig { returns(::String) }
def exec_path; end
- sig { params(string: String).returns(String) }
+ sig { params(string: ::String).returns(::String) }
def gray(string); end
- sig { params(string: String).returns(String) }
+ sig { params(string: ::String).returns(::String) }
def green(string); end
- sig { params(string: String).returns(String) }
+ sig { params(string: ::String).returns(::String) }
def highlight(string); end
sig { void }
@@ -86,22 +88,22 @@ module Spoom::Cli::Helper
sig { returns(T::Boolean) }
def in_sorbet_project?; end
- sig { params(string: String).returns(String) }
+ sig { params(string: ::String).returns(::String) }
def red(string); end
- sig { params(message: String).void }
+ sig { params(message: ::String).void }
def say(message); end
- sig { params(message: String, status: T.nilable(String), nl: T::Boolean).void }
+ sig { params(message: ::String, status: T.nilable(::String), nl: T::Boolean).void }
def say_error(message, status: T.unsafe(nil), nl: T.unsafe(nil)); end
- sig { returns(Spoom::Sorbet::Config) }
+ sig { returns(::Spoom::Sorbet::Config) }
def sorbet_config; end
- sig { returns(String) }
+ sig { returns(::String) }
def sorbet_config_file; end
- sig { params(string: String).returns(String) }
+ sig { params(string: ::String).returns(::String) }
def yellow(string); end
end
@@ -179,40 +181,52 @@ class Spoom::Color < ::T::Enum
LIGHT_WHITE = new
end
- sig { returns(String) }
+ sig { returns(::String) }
def ansi_code; end
end
module Spoom::Colorize
- sig { params(string: String, color: Spoom::Color).returns(String) }
+ sig { params(string: ::String, color: ::Spoom::Color).returns(::String) }
def set_color(string, *color); end
end
module Spoom::Coverage
class << self
- sig { params(snapshots: T::Array[Spoom::Coverage::Snapshot], palette: Spoom::Coverage::D3::ColorPalette, path: String).returns(Spoom::Coverage::Report) }
+ sig do
+ params(
+ snapshots: T::Array[::Spoom::Coverage::Snapshot],
+ palette: ::Spoom::Coverage::D3::ColorPalette,
+ path: ::String
+ ).returns(::Spoom::Coverage::Report)
+ end
def report(snapshots, palette:, path: T.unsafe(nil)); end
- sig { params(path: String).returns(Spoom::FileTree) }
+ sig { params(path: ::String).returns(::Spoom::FileTree) }
def sigils_tree(path: T.unsafe(nil)); end
- sig { params(path: String, rbi: T::Boolean, sorbet_bin: T.nilable(String)).returns(Spoom::Coverage::Snapshot) }
+ sig do
+ params(
+ path: ::String,
+ rbi: T::Boolean,
+ sorbet_bin: T.nilable(::String)
+ ).returns(::Spoom::Coverage::Snapshot)
+ end
def snapshot(path: T.unsafe(nil), rbi: T.unsafe(nil), sorbet_bin: T.unsafe(nil)); end
- sig { params(path: String).returns(Spoom::Sorbet::Config) }
+ sig { params(path: ::String).returns(::Spoom::Sorbet::Config) }
def sorbet_config(path: T.unsafe(nil)); end
end
end
module Spoom::Coverage::Cards; end
class Spoom::Coverage::Cards::Card < ::Spoom::Coverage::Template
- sig { params(template: String, title: T.nilable(String), body: T.nilable(String)).void }
+ sig { params(template: ::String, title: T.nilable(::String), body: T.nilable(::String)).void }
def initialize(template: T.unsafe(nil), title: T.unsafe(nil), body: T.unsafe(nil)); end
def body; end
- sig { returns(T.nilable(String)) }
+ sig { returns(T.nilable(::String)) }
def title; end
end
@@ -224,113 +238,113 @@ class Spoom::Coverage::Cards::Erb < ::Spoom::Coverage::Cards::Card
sig { void }
def initialize; end
- sig { abstract.returns(String) }
+ sig { abstract.returns(::String) }
def erb; end
- sig { override.returns(String) }
+ sig { override.returns(::String) }
def html; end
end
class Spoom::Coverage::Cards::Map < ::Spoom::Coverage::Cards::Card
- sig { params(sigils_tree: Spoom::FileTree, title: String).void }
+ sig { params(sigils_tree: ::Spoom::FileTree, title: ::String).void }
def initialize(sigils_tree:, title: T.unsafe(nil)); end
end
class Spoom::Coverage::Cards::Snapshot < ::Spoom::Coverage::Cards::Card
- sig { params(snapshot: Spoom::Coverage::Snapshot, title: String).void }
+ sig { params(snapshot: ::Spoom::Coverage::Snapshot, title: ::String).void }
def initialize(snapshot:, title: T.unsafe(nil)); end
- sig { returns(Spoom::Coverage::D3::Pie::Calls) }
+ sig { returns(::Spoom::Coverage::D3::Pie::Calls) }
def pie_calls; end
- sig { returns(Spoom::Coverage::D3::Pie::Sigils) }
+ sig { returns(::Spoom::Coverage::D3::Pie::Sigils) }
def pie_sigils; end
- sig { returns(Spoom::Coverage::D3::Pie::Sigs) }
+ sig { returns(::Spoom::Coverage::D3::Pie::Sigs) }
def pie_sigs; end
- sig { returns(Spoom::Coverage::Snapshot) }
+ sig { returns(::Spoom::Coverage::Snapshot) }
def snapshot; end
end
Spoom::Coverage::Cards::Snapshot::TEMPLATE = T.let(T.unsafe(nil), String)
class Spoom::Coverage::Cards::SorbetIntro < ::Spoom::Coverage::Cards::Erb
- sig { params(sorbet_intro_commit: T.nilable(String), sorbet_intro_date: T.nilable(Time)).void }
+ sig { params(sorbet_intro_commit: T.nilable(::String), sorbet_intro_date: T.nilable(::Time)).void }
def initialize(sorbet_intro_commit: T.unsafe(nil), sorbet_intro_date: T.unsafe(nil)); end
- sig { override.returns(String) }
+ sig { override.returns(::String) }
def erb; end
end
class Spoom::Coverage::Cards::Timeline < ::Spoom::Coverage::Cards::Card
- sig { params(title: String, timeline: Spoom::Coverage::D3::Timeline).void }
+ sig { params(title: ::String, timeline: ::Spoom::Coverage::D3::Timeline).void }
def initialize(title:, timeline:); end
end
class Spoom::Coverage::Cards::Timeline::Calls < ::Spoom::Coverage::Cards::Timeline
- sig { params(snapshots: T::Array[Spoom::Coverage::Snapshot], title: String).void }
+ sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void }
def initialize(snapshots:, title: T.unsafe(nil)); end
end
class Spoom::Coverage::Cards::Timeline::RBIs < ::Spoom::Coverage::Cards::Timeline
- sig { params(snapshots: T::Array[Spoom::Coverage::Snapshot], title: String).void }
+ sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void }
def initialize(snapshots:, title: T.unsafe(nil)); end
end
class Spoom::Coverage::Cards::Timeline::Runtimes < ::Spoom::Coverage::Cards::Timeline
- sig { params(snapshots: T::Array[Spoom::Coverage::Snapshot], title: String).void }
+ sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void }
def initialize(snapshots:, title: T.unsafe(nil)); end
end
class Spoom::Coverage::Cards::Timeline::Sigils < ::Spoom::Coverage::Cards::Timeline
- sig { params(snapshots: T::Array[Spoom::Coverage::Snapshot], title: String).void }
+ sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void }
def initialize(snapshots:, title: T.unsafe(nil)); end
end
class Spoom::Coverage::Cards::Timeline::Sigs < ::Spoom::Coverage::Cards::Timeline
- sig { params(snapshots: T::Array[Spoom::Coverage::Snapshot], title: String).void }
+ sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void }
def initialize(snapshots:, title: T.unsafe(nil)); end
end
class Spoom::Coverage::Cards::Timeline::Versions < ::Spoom::Coverage::Cards::Timeline
- sig { params(snapshots: T::Array[Spoom::Coverage::Snapshot], title: String).void }
+ sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void }
def initialize(snapshots:, title: T.unsafe(nil)); end
end
module Spoom::Coverage::D3
class << self
- sig { params(palette: Spoom::Coverage::D3::ColorPalette).returns(String) }
+ sig { params(palette: ::Spoom::Coverage::D3::ColorPalette).returns(::String) }
def header_script(palette); end
- sig { returns(String) }
+ sig { returns(::String) }
def header_style; end
end
end
class Spoom::Coverage::D3::Base
abstract!
- sig { params(id: String, data: T.untyped).void }
+ sig { params(id: ::String, data: T.untyped).void }
def initialize(id, data); end
- sig { returns(String) }
+ sig { returns(::String) }
def html; end
- sig { returns(String) }
+ sig { returns(::String) }
def id; end
- sig { abstract.returns(String) }
+ sig { abstract.returns(::String) }
def script; end
- sig { returns(String) }
+ sig { returns(::String) }
def tooltip; end
class << self
- sig { returns(String) }
+ sig { returns(::String) }
def header_script; end
- sig { returns(String) }
+ sig { returns(::String) }
def header_style; end
end
end
@@ -342,38 +356,38 @@ Spoom::Coverage::D3::COLOR_STRONG = T.let(T.unsafe(nil), String)
Spoom::Coverage::D3::COLOR_TRUE = T.let(T.unsafe(nil), String)
class Spoom::Coverage::D3::CircleMap < ::Spoom::Coverage::D3::Base
- sig { override.returns(String) }
+ sig { override.returns(::String) }
def script; end
class << self
- sig { returns(String) }
+ sig { returns(::String) }
def header_script; end
- sig { returns(String) }
+ sig { returns(::String) }
def header_style; end
end
end
class Spoom::Coverage::D3::CircleMap::Sigils < ::Spoom::Coverage::D3::CircleMap
- sig { params(id: String, sigils_tree: Spoom::FileTree).void }
+ sig { params(id: ::String, sigils_tree: ::Spoom::FileTree).void }
def initialize(id, sigils_tree); end
- sig { params(node: Spoom::FileTree::Node).returns(Float) }
+ sig { params(node: ::Spoom::FileTree::Node).returns(::Float) }
def tree_node_score(node); end
- sig { params(node: Spoom::FileTree::Node).returns(T.nilable(String)) }
+ sig { params(node: ::Spoom::FileTree::Node).returns(T.nilable(::String)) }
def tree_node_strictness(node); end
- sig { params(node: Spoom::FileTree::Node).returns(T::Hash[Symbol, T.untyped]) }
+ sig { params(node: ::Spoom::FileTree::Node).returns(T::Hash[::Symbol, T.untyped]) }
def tree_node_to_json(node); end
end
class Spoom::Coverage::D3::ColorPalette < ::T::Struct
- prop :false, String
- prop :ignore, String
- prop :strict, String
- prop :strong, String
- prop :true, String
+ prop :false, ::String
+ prop :ignore, ::String
+ prop :strict, ::String
+ prop :strong, ::String
+ prop :true, ::String
class << self
def inherited(s); end
@@ -383,136 +397,136 @@ end
class Spoom::Coverage::D3::Pie < ::Spoom::Coverage::D3::Base
abstract!
- sig { params(id: String, title: String, data: T.untyped).void }
+ sig { params(id: ::String, title: ::String, data: T.untyped).void }
def initialize(id, title, data); end
- sig { override.returns(String) }
+ sig { override.returns(::String) }
def script; end
class << self
- sig { returns(String) }
+ sig { returns(::String) }
def header_script; end
- sig { returns(String) }
+ sig { returns(::String) }
def header_style; end
end
end
class Spoom::Coverage::D3::Pie::Calls < ::Spoom::Coverage::D3::Pie
- sig { params(id: String, title: String, snapshot: Spoom::Coverage::Snapshot).void }
+ sig { params(id: ::String, title: ::String, snapshot: ::Spoom::Coverage::Snapshot).void }
def initialize(id, title, snapshot); end
- sig { override.returns(String) }
+ sig { override.returns(::String) }
def tooltip; end
end
class Spoom::Coverage::D3::Pie::Sigils < ::Spoom::Coverage::D3::Pie
- sig { params(id: String, title: String, snapshot: Spoom::Coverage::Snapshot).void }
+ sig { params(id: ::String, title: ::String, snapshot: ::Spoom::Coverage::Snapshot).void }
def initialize(id, title, snapshot); end
- sig { override.returns(String) }
+ sig { override.returns(::String) }
def tooltip; end
end
class Spoom::Coverage::D3::Pie::Sigs < ::Spoom::Coverage::D3::Pie
- sig { params(id: String, title: String, snapshot: Spoom::Coverage::Snapshot).void }
+ sig { params(id: ::String, title: ::String, snapshot: ::Spoom::Coverage::Snapshot).void }
def initialize(id, title, snapshot); end
- sig { override.returns(String) }
+ sig { override.returns(::String) }
def tooltip; end
end
class Spoom::Coverage::D3::Timeline < ::Spoom::Coverage::D3::Base
abstract!
- sig { params(id: String, data: T.untyped, keys: T::Array[String]).void }
+ sig { params(id: ::String, data: T.untyped, keys: T::Array[::String]).void }
def initialize(id, data, keys); end
- sig { params(y: String, color: String, curve: String).returns(String) }
+ sig { params(y: ::String, color: ::String, curve: ::String).returns(::String) }
def area(y:, color: T.unsafe(nil), curve: T.unsafe(nil)); end
- sig { params(y: String, color: String, curve: String).returns(String) }
+ sig { params(y: ::String, color: ::String, curve: ::String).returns(::String) }
def line(y:, color: T.unsafe(nil), curve: T.unsafe(nil)); end
- sig { abstract.returns(String) }
+ sig { abstract.returns(::String) }
def plot; end
- sig { params(y: String).returns(String) }
+ sig { params(y: ::String).returns(::String) }
def points(y:); end
- sig { override.returns(String) }
+ sig { override.returns(::String) }
def script; end
- sig { returns(String) }
+ sig { returns(::String) }
def x_scale; end
- sig { returns(String) }
+ sig { returns(::String) }
def x_ticks; end
- sig { params(min: String, max: String, ticks: String).returns(String) }
+ sig { params(min: ::String, max: ::String, ticks: ::String).returns(::String) }
def y_scale(min:, max:, ticks:); end
- sig { params(ticks: String, format: String, padding: Integer).returns(String) }
+ sig { params(ticks: ::String, format: ::String, padding: ::Integer).returns(::String) }
def y_ticks(ticks:, format:, padding:); end
class << self
- sig { returns(String) }
+ sig { returns(::String) }
def header_script; end
- sig { returns(String) }
+ sig { returns(::String) }
def header_style; end
end
end
class Spoom::Coverage::D3::Timeline::Calls < ::Spoom::Coverage::D3::Timeline::Stacked
- sig { params(id: String, snapshots: T::Array[Spoom::Coverage::Snapshot]).void }
+ sig { params(id: ::String, snapshots: T::Array[::Spoom::Coverage::Snapshot]).void }
def initialize(id, snapshots); end
- sig { override.returns(String) }
+ sig { override.returns(::String) }
def tooltip; end
end
class Spoom::Coverage::D3::Timeline::RBIs < ::Spoom::Coverage::D3::Timeline::Stacked
- sig { params(id: String, snapshots: T::Array[Spoom::Coverage::Snapshot]).void }
+ sig { params(id: ::String, snapshots: T::Array[::Spoom::Coverage::Snapshot]).void }
def initialize(id, snapshots); end
- sig { override.params(y: String, color: String, curve: String).returns(String) }
+ sig { override.params(y: ::String, color: ::String, curve: ::String).returns(::String) }
def line(y:, color: T.unsafe(nil), curve: T.unsafe(nil)); end
- sig { override.returns(String) }
+ sig { override.returns(::String) }
def plot; end
- sig { override.returns(String) }
+ sig { override.returns(::String) }
def script; end
- sig { override.returns(String) }
+ sig { override.returns(::String) }
def tooltip; end
end
class Spoom::Coverage::D3::Timeline::Runtimes < ::Spoom::Coverage::D3::Timeline
- sig { params(id: String, snapshots: T::Array[Spoom::Coverage::Snapshot]).void }
+ sig { params(id: ::String, snapshots: T::Array[::Spoom::Coverage::Snapshot]).void }
def initialize(id, snapshots); end
- sig { override.returns(String) }
+ sig { override.returns(::String) }
def plot; end
- sig { override.returns(String) }
+ sig { override.returns(::String) }
def tooltip; end
end
class Spoom::Coverage::D3::Timeline::Sigils < ::Spoom::Coverage::D3::Timeline::Stacked
- sig { params(id: String, snapshots: T::Array[Spoom::Coverage::Snapshot]).void }
+ sig { params(id: ::String, snapshots: T::Array[::Spoom::Coverage::Snapshot]).void }
def initialize(id, snapshots); end
- sig { override.returns(String) }
+ sig { override.returns(::String) }
def tooltip; end
end
class Spoom::Coverage::D3::Timeline::Sigs < ::Spoom::Coverage::D3::Timeline::Stacked
- sig { params(id: String, snapshots: T::Array[Spoom::Coverage::Snapshot]).void }
+ sig { params(id: ::String, snapshots: T::Array[::Spoom::Coverage::Snapshot]).void }
def initialize(id, snapshots); end
- sig { override.returns(String) }
+ sig { override.returns(::String) }
def tooltip; end
end
@@ -521,115 +535,124 @@ class Spoom::Coverage::D3::Timeline::Stacked < ::Spoom::Coverage::D3::Timeline
def initialize(*args, &blk); end
- sig { override.params(y: String, color: String, curve: String).returns(String) }
+ sig { override.params(y: ::String, color: ::String, curve: ::String).returns(::String) }
def line(y:, color: T.unsafe(nil), curve: T.unsafe(nil)); end
- sig { override.returns(String) }
+ sig { override.returns(::String) }
def plot; end
- sig { override.returns(String) }
+ sig { override.returns(::String) }
def script; end
end
class Spoom::Coverage::D3::Timeline::Versions < ::Spoom::Coverage::D3::Timeline
- sig { params(id: String, snapshots: T::Array[Spoom::Coverage::Snapshot]).void }
+ sig { params(id: ::String, snapshots: T::Array[::Spoom::Coverage::Snapshot]).void }
def initialize(id, snapshots); end
- sig { override.returns(String) }
+ sig { override.returns(::String) }
def plot; end
- sig { override.returns(String) }
+ sig { override.returns(::String) }
def tooltip; end
end
class Spoom::Coverage::Page < ::Spoom::Coverage::Template
abstract!
- sig { params(title: String, palette: Spoom::Coverage::D3::ColorPalette, template: String).void }
+ sig { params(title: ::String, palette: ::Spoom::Coverage::D3::ColorPalette, template: ::String).void }
def initialize(title:, palette:, template: T.unsafe(nil)); end
- sig { returns(String) }
+ sig { returns(::String) }
def body_html; end
- sig { abstract.returns(T::Array[Spoom::Coverage::Cards::Card]) }
+ sig { abstract.returns(T::Array[::Spoom::Coverage::Cards::Card]) }
def cards; end
- sig { returns(String) }
+ sig { returns(::String) }
def footer_html; end
- sig { returns(String) }
+ sig { returns(::String) }
def header_html; end
- sig { returns(String) }
+ sig { returns(::String) }
def header_script; end
- sig { returns(String) }
+ sig { returns(::String) }
def header_style; end
- sig { returns(Spoom::Coverage::D3::ColorPalette) }
+ sig { returns(::Spoom::Coverage::D3::ColorPalette) }
def palette; end
- sig { returns(String) }
+ sig { returns(::String) }
def title; end
end
Spoom::Coverage::Page::TEMPLATE = T.let(T.unsafe(nil), String)
class Spoom::Coverage::Report < ::Spoom::Coverage::Page
- sig { params(project_name: String, palette: Spoom::Coverage::D3::ColorPalette, snapshots: T::Array[Spoom::Coverage::Snapshot], sigils_tree: Spoom::FileTree, sorbet_intro_commit: T.nilable(String), sorbet_intro_date: T.nilable(Time)).void }
+ sig do
+ params(
+ project_name: ::String,
+ palette: ::Spoom::Coverage::D3::ColorPalette,
+ snapshots: T::Array[::Spoom::Coverage::Snapshot],
+ sigils_tree: ::Spoom::FileTree,
+ sorbet_intro_commit: T.nilable(::String),
+ sorbet_intro_date: T.nilable(::Time)
+ ).void
+ end
def initialize(project_name:, palette:, snapshots:, sigils_tree:, sorbet_intro_commit: T.unsafe(nil), sorbet_intro_date: T.unsafe(nil)); end
- sig { override.returns(T::Array[Spoom::Coverage::Cards::Card]) }
+ sig { override.returns(T::Array[::Spoom::Coverage::Cards::Card]) }
def cards; end
- sig { override.returns(String) }
+ sig { override.returns(::String) }
def header_html; end
- sig { returns(String) }
+ sig { returns(::String) }
def project_name; end
- sig { returns(Spoom::FileTree) }
+ sig { returns(::Spoom::FileTree) }
def sigils_tree; end
- sig { returns(T::Array[Spoom::Coverage::Snapshot]) }
+ sig { returns(T::Array[::Spoom::Coverage::Snapshot]) }
def snapshots; end
- sig { returns(T.nilable(String)) }
+ sig { returns(T.nilable(::String)) }
def sorbet_intro_commit; end
- sig { returns(T.nilable(Time)) }
+ sig { returns(T.nilable(::Time)) }
def sorbet_intro_date; end
end
class Spoom::Coverage::Snapshot < ::T::Struct
- prop :calls_typed, Integer, default: T.unsafe(nil)
- prop :calls_untyped, Integer, default: T.unsafe(nil)
- prop :classes, Integer, default: T.unsafe(nil)
- prop :commit_sha, T.nilable(String), default: T.unsafe(nil)
- prop :commit_timestamp, T.nilable(Integer), default: T.unsafe(nil)
- prop :duration, Integer, default: T.unsafe(nil)
- prop :files, Integer, default: T.unsafe(nil)
- prop :methods_with_sig, Integer, default: T.unsafe(nil)
- prop :methods_without_sig, Integer, default: T.unsafe(nil)
- prop :modules, Integer, default: T.unsafe(nil)
- prop :rbi_files, Integer, default: T.unsafe(nil)
- prop :sigils, T::Hash[String, Integer], default: T.unsafe(nil)
- prop :singleton_classes, Integer, default: T.unsafe(nil)
- prop :timestamp, Integer, default: T.unsafe(nil)
- prop :version_runtime, T.nilable(String), default: T.unsafe(nil)
- prop :version_static, T.nilable(String), default: T.unsafe(nil)
-
- sig { params(out: T.any(IO, StringIO), colors: T::Boolean, indent_level: Integer).void }
+ prop :calls_typed, ::Integer, default: T.unsafe(nil)
+ prop :calls_untyped, ::Integer, default: T.unsafe(nil)
+ prop :classes, ::Integer, default: T.unsafe(nil)
+ prop :commit_sha, T.nilable(::String), default: T.unsafe(nil)
+ prop :commit_timestamp, T.nilable(::Integer), default: T.unsafe(nil)
+ prop :duration, ::Integer, default: T.unsafe(nil)
+ prop :files, ::Integer, default: T.unsafe(nil)
+ prop :methods_with_sig, ::Integer, default: T.unsafe(nil)
+ prop :methods_without_sig, ::Integer, default: T.unsafe(nil)
+ prop :modules, ::Integer, default: T.unsafe(nil)
+ prop :rbi_files, ::Integer, default: T.unsafe(nil)
+ prop :sigils, T::Hash[::String, ::Integer], default: T.unsafe(nil)
+ prop :singleton_classes, ::Integer, default: T.unsafe(nil)
+ prop :timestamp, ::Integer, default: T.unsafe(nil)
+ prop :version_runtime, T.nilable(::String), default: T.unsafe(nil)
+ prop :version_static, T.nilable(::String), default: T.unsafe(nil)
+
+ sig { params(out: T.any(::IO, ::StringIO), colors: T::Boolean, indent_level: ::Integer).void }
def print(out: T.unsafe(nil), colors: T.unsafe(nil), indent_level: T.unsafe(nil)); end
- sig { params(arg: T.untyped).returns(String) }
+ sig { params(arg: T.untyped).returns(::String) }
def to_json(*arg); end
class << self
- sig { params(json: String).returns(Spoom::Coverage::Snapshot) }
+ sig { params(json: ::String).returns(::Spoom::Coverage::Snapshot) }
def from_json(json); end
- sig { params(obj: T::Hash[String, T.untyped]).returns(Spoom::Coverage::Snapshot) }
+ sig { params(obj: T::Hash[::String, T.untyped]).returns(::Spoom::Coverage::Snapshot) }
def from_obj(obj); end
def inherited(s); end
@@ -639,73 +662,96 @@ end
Spoom::Coverage::Snapshot::STRICTNESSES = T.let(T.unsafe(nil), Array)
class Spoom::Coverage::SnapshotPrinter < ::Spoom::Printer
- sig { params(snapshot: Spoom::Coverage::Snapshot).void }
+ sig { params(snapshot: ::Spoom::Coverage::Snapshot).void }
def print_snapshot(snapshot); end
private
- sig { params(value: T.nilable(Integer), total: T.nilable(Integer)).returns(String) }
+ sig { params(value: T.nilable(::Integer), total: T.nilable(::Integer)).returns(::String) }
def percent(value, total); end
- sig { params(hash: T::Hash[String, Integer], total: Integer).void }
+ sig { params(hash: T::Hash[::String, ::Integer], total: ::Integer).void }
def print_map(hash, total); end
end
class Spoom::Coverage::Template
abstract!
- sig { params(template: String).void }
+ sig { params(template: ::String).void }
def initialize(template:); end
- sig { returns(String) }
+ sig { returns(::String) }
def erb; end
- sig { returns(Binding) }
+ sig { returns(::Binding) }
def get_binding; end
- sig { returns(String) }
+ sig { returns(::String) }
def html; end
end
class Spoom::Error < ::StandardError; end
+class Spoom::ExecResult < ::T::Struct
+ const :err, ::String
+ const :exit_code, ::Integer
+ const :out, ::String
+ const :status, T::Boolean
+
+ class << self
+ def inherited(s); end
+ end
+end
+
class Spoom::FileTree
- sig { params(paths: T::Enumerable[String], strip_prefix: T.nilable(String)).void }
+ sig { params(paths: T::Enumerable[::String], strip_prefix: T.nilable(::String)).void }
def initialize(paths = T.unsafe(nil), strip_prefix: T.unsafe(nil)); end
- sig { params(path: String).returns(Spoom::FileTree::Node) }
+ sig { params(path: ::String).returns(::Spoom::FileTree::Node) }
def add_path(path); end
- sig { params(paths: T::Enumerable[String]).void }
+ sig { params(paths: T::Enumerable[::String]).void }
def add_paths(paths); end
- sig { returns(T::Array[Spoom::FileTree::Node]) }
+ sig { returns(T::Array[::Spoom::FileTree::Node]) }
def nodes; end
- sig { returns(T::Array[String]) }
+ sig { returns(T::Array[::String]) }
def paths; end
- sig { params(out: T.any(IO, StringIO), show_strictness: T::Boolean, colors: T::Boolean, indent_level: Integer).void }
+ sig do
+ params(
+ out: T.any(::IO, ::StringIO),
+ show_strictness: T::Boolean,
+ colors: T::Boolean,
+ indent_level: ::Integer
+ ).void
+ end
def print(out: T.unsafe(nil), show_strictness: T.unsafe(nil), colors: T.unsafe(nil), indent_level: T.unsafe(nil)); end
- sig { returns(T::Array[Spoom::FileTree::Node]) }
+ sig { returns(T::Array[::Spoom::FileTree::Node]) }
def roots; end
- sig { returns(T.nilable(String)) }
+ sig { returns(T.nilable(::String)) }
def strip_prefix; end
private
- sig { params(node: Spoom::FileTree::Node, collected_nodes: T::Array[Spoom::FileTree::Node]).returns(T::Array[Spoom::FileTree::Node]) }
+ sig do
+ params(
+ node: ::Spoom::FileTree::Node,
+ collected_nodes: T::Array[::Spoom::FileTree::Node]
+ ).returns(T::Array[::Spoom::FileTree::Node])
+ end
def collect_nodes(node, collected_nodes = T.unsafe(nil)); end
end
class Spoom::FileTree::Node < ::T::Struct
- const :children, T::Hash[String, Spoom::FileTree::Node], default: T.unsafe(nil)
- const :name, String
- const :parent, T.nilable(Spoom::FileTree::Node)
+ const :children, T::Hash[::String, ::Spoom::FileTree::Node], default: T.unsafe(nil)
+ const :name, ::String
+ const :parent, T.nilable(::Spoom::FileTree::Node)
- sig { returns(String) }
+ sig { returns(::String) }
def path; end
class << self
@@ -714,134 +760,185 @@ class Spoom::FileTree::Node < ::T::Struct
end
class Spoom::FileTree::TreePrinter < ::Spoom::Printer
- sig { params(tree: Spoom::FileTree, out: T.any(IO, StringIO), show_strictness: T::Boolean, colors: T::Boolean, indent_level: Integer).void }
+ sig do
+ params(
+ tree: ::Spoom::FileTree,
+ out: T.any(::IO, ::StringIO),
+ show_strictness: T::Boolean,
+ colors: T::Boolean,
+ indent_level: ::Integer
+ ).void
+ end
def initialize(tree:, out: T.unsafe(nil), show_strictness: T.unsafe(nil), colors: T.unsafe(nil), indent_level: T.unsafe(nil)); end
- sig { params(node: Spoom::FileTree::Node).void }
+ sig { params(node: ::Spoom::FileTree::Node).void }
def print_node(node); end
- sig { params(nodes: T::Array[Spoom::FileTree::Node]).void }
+ sig { params(nodes: T::Array[::Spoom::FileTree::Node]).void }
def print_nodes(nodes); end
sig { void }
def print_tree; end
- sig { returns(Spoom::FileTree) }
+ sig { returns(::Spoom::FileTree) }
def tree; end
private
- sig { params(node: Spoom::FileTree::Node).returns(T.nilable(String)) }
+ sig { params(node: ::Spoom::FileTree::Node).returns(T.nilable(::String)) }
def node_strictness(node); end
- sig { params(strictness: T.nilable(String)).returns(Spoom::Color) }
+ sig { params(strictness: T.nilable(::String)).returns(::Spoom::Color) }
def strictness_color(strictness); end
end
module Spoom::Git
class << self
- sig { params(arg: String, path: String).returns([String, String, T::Boolean]) }
+ sig { params(arg: ::String, path: ::String).returns(::Spoom::ExecResult) }
def checkout(*arg, path: T.unsafe(nil)); end
- sig { params(sha: String, path: String).returns(T.nilable(Time)) }
+ sig { params(sha: ::String, path: ::String).returns(T.nilable(::Time)) }
def commit_time(sha, path: T.unsafe(nil)); end
- sig { params(sha: String, path: String).returns(T.nilable(Integer)) }
+ sig { params(sha: ::String, path: ::String).returns(T.nilable(::Integer)) }
def commit_timestamp(sha, path: T.unsafe(nil)); end
- sig { params(path: String).returns(T.nilable(String)) }
+ sig { params(path: ::String).returns(T.nilable(::String)) }
def current_branch(path: T.unsafe(nil)); end
- sig { params(arg: String, path: String).returns([String, String, T::Boolean]) }
+ sig { params(arg: ::String, path: ::String).returns(::Spoom::ExecResult) }
def diff(*arg, path: T.unsafe(nil)); end
- sig { params(timestamp: String).returns(Time) }
+ sig { params(timestamp: ::String).returns(::Time) }
def epoch_to_time(timestamp); end
- sig { params(command: String, arg: String, path: String).returns([String, String, T::Boolean]) }
+ sig { params(command: ::String, arg: ::String, path: ::String).returns(::Spoom::ExecResult) }
def exec(command, *arg, path: T.unsafe(nil)); end
- sig { params(path: String).returns(T.nilable(String)) }
+ sig { params(path: ::String).returns(T.nilable(::String)) }
def last_commit(path: T.unsafe(nil)); end
- sig { params(arg: String, path: String).returns([String, String, T::Boolean]) }
+ sig { params(arg: ::String, path: ::String).returns(::Spoom::ExecResult) }
def log(*arg, path: T.unsafe(nil)); end
- sig { params(arg: String, path: String).returns([String, String, T::Boolean]) }
+ sig { params(arg: ::String, path: ::String).returns(::Spoom::ExecResult) }
def rev_parse(*arg, path: T.unsafe(nil)); end
- sig { params(arg: String, path: String).returns([String, String, T::Boolean]) }
+ sig { params(arg: ::String, path: ::String).returns(::Spoom::ExecResult) }
def show(*arg, path: T.unsafe(nil)); end
- sig { params(path: String).returns(T.nilable(String)) }
+ sig { params(path: ::String).returns(T.nilable(::String)) }
def sorbet_intro_commit(path: T.unsafe(nil)); end
- sig { params(path: String).returns(T.nilable(String)) }
+ sig { params(path: ::String).returns(T.nilable(::String)) }
def sorbet_removal_commit(path: T.unsafe(nil)); end
- sig { params(path: String).returns(T::Boolean) }
+ sig { params(path: ::String).returns(T::Boolean) }
def workdir_clean?(path: T.unsafe(nil)); end
end
end
module Spoom::LSP; end
class Spoom::LSP::Client
+ sig { params(sorbet_bin: ::String, sorbet_args: ::String, path: ::String).void }
def initialize(sorbet_bin, *sorbet_args, path: T.unsafe(nil)); end
+ sig { void }
def close; end
+
+ sig { params(uri: ::String, line: ::Integer, column: ::Integer).returns(T::Array[::Spoom::LSP::Location]) }
def definitions(uri, line, column); end
+
+ sig { params(uri: ::String).returns(T::Array[::Spoom::LSP::DocumentSymbol]) }
def document_symbols(uri); end
+
+ sig { params(uri: ::String, line: ::Integer, column: ::Integer).returns(T.nilable(::Spoom::LSP::Hover)) }
def hover(uri, line, column); end
+
+ sig { returns(::Integer) }
def next_id; end
+
+ sig { params(workspace_path: ::String).void }
def open(workspace_path); end
+
+ sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
def read; end
+
+ sig { returns(T.nilable(::String)) }
def read_raw; end
+
+ sig do
+ params(
+ uri: ::String,
+ line: ::Integer,
+ column: ::Integer,
+ include_decl: T::Boolean
+ ).returns(T::Array[::Spoom::LSP::Location])
+ end
def references(uri, line, column, include_decl = T.unsafe(nil)); end
+
+ sig { params(message: ::Spoom::LSP::Message).returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
def send(message); end
+
+ sig { params(json_string: ::String).void }
def send_raw(json_string); end
+
+ sig { params(uri: ::String, line: ::Integer, column: ::Integer).returns(T::Array[::Spoom::LSP::SignatureHelp]) }
def signatures(uri, line, column); end
+
+ sig { params(query: ::String).returns(T::Array[::Spoom::LSP::DocumentSymbol]) }
def symbols(query); end
+
+ sig { params(uri: ::String, line: ::Integer, column: ::Integer).returns(T::Array[::Spoom::LSP::Location]) }
def type_definitions(uri, line, column); end
end
class Spoom::LSP::Diagnostic < ::T::Struct
include ::Spoom::LSP::PrintableSymbol
- const :code, Integer
- const :informations, Object
- const :message, String
- const :range, Spoom::LSP::Range
+ const :code, ::Integer
+ const :informations, ::Object
+ const :message, ::String
+ const :range, ::Spoom::LSP::Range
- sig { override.params(printer: Spoom::LSP::SymbolPrinter).void }
+ sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void }
def accept_printer(printer); end
+ sig { returns(::String) }
def to_s; end
class << self
+ sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Diagnostic) }
def from_json(json); end
+
def inherited(s); end
end
end
class Spoom::LSP::DocumentSymbol < ::T::Struct
include ::Spoom::LSP::PrintableSymbol
- const :children, T::Array[Spoom::LSP::DocumentSymbol]
- const :detail, T.nilable(String)
- const :kind, Integer
- const :location, T.nilable(Spoom::LSP::Location)
- const :name, String
- const :range, T.nilable(Spoom::LSP::Range)
+ const :children, T::Array[::Spoom::LSP::DocumentSymbol]
+ const :detail, T.nilable(::String)
+ const :kind, ::Integer
+ const :location, T.nilable(::Spoom::LSP::Location)
+ const :name, ::String
+ const :range, T.nilable(::Spoom::LSP::Range)
- sig { override.params(printer: Spoom::LSP::SymbolPrinter).void }
+ sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void }
def accept_printer(printer); end
+ sig { returns(::String) }
def kind_string; end
+
+ sig { returns(::String) }
def to_s; end
class << self
+ sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::DocumentSymbol) }
def from_json(json); end
+
def inherited(s); end
end
end
@@ -852,164 +949,218 @@ class Spoom::LSP::Error::AlreadyOpen < ::Spoom::LSP::Error; end
class Spoom::LSP::Error::BadHeaders < ::Spoom::LSP::Error; end
class Spoom::LSP::Error::Diagnostics < ::Spoom::LSP::Error
+ sig { params(uri: ::String, diagnostics: T::Array[::Spoom::LSP::Diagnostic]).void }
def initialize(uri, diagnostics); end
+ sig { returns(T::Array[::Spoom::LSP::Diagnostic]) }
def diagnostics; end
+
+ sig { returns(::String) }
def uri; end
class << self
+ sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Error::Diagnostics) }
def from_json(json); end
end
end
class Spoom::LSP::Hover < ::T::Struct
include ::Spoom::LSP::PrintableSymbol
- const :contents, String
+ const :contents, ::String
const :range, T.nilable(T::Range[T.untyped])
- sig { override.params(printer: Spoom::LSP::SymbolPrinter).void }
+ sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void }
def accept_printer(printer); end
+ sig { returns(::String) }
def to_s; end
class << self
+ sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Hover) }
def from_json(json); end
+
def inherited(s); end
end
end
class Spoom::LSP::Location < ::T::Struct
include ::Spoom::LSP::PrintableSymbol
- const :range, Spoom::LSP::Range
- const :uri, String
+ const :range, ::Spoom::LSP::Range
+ const :uri, ::String
- sig { override.params(printer: Spoom::LSP::SymbolPrinter).void }
+ sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void }
def accept_printer(printer); end
+ sig { returns(::String) }
def to_s; end
class << self
+ sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Location) }
def from_json(json); end
+
def inherited(s); end
end
end
class Spoom::LSP::Message
+ sig { void }
def initialize; end
+ sig { returns(T::Hash[T.untyped, T.untyped]) }
def as_json; end
+
+ sig { returns(::String) }
def jsonrpc; end
+
+ sig { params(args: T.untyped).returns(::String) }
def to_json(*args); end
end
class Spoom::LSP::Notification < ::Spoom::LSP::Message
+ sig { params(method: ::String, params: T::Hash[T.untyped, T.untyped]).void }
def initialize(method, params); end
+ sig { returns(::String) }
def method; end
+
+ sig { returns(T::Hash[T.untyped, T.untyped]) }
def params; end
end
class Spoom::LSP::Position < ::T::Struct
include ::Spoom::LSP::PrintableSymbol
- const :char, Integer
- const :line, Integer
+ const :char, ::Integer
+ const :line, ::Integer
- sig { override.params(printer: Spoom::LSP::SymbolPrinter).void }
+ sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void }
def accept_printer(printer); end
+ sig { returns(::String) }
def to_s; end
class << self
+ sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Position) }
def from_json(json); end
+
def inherited(s); end
end
end
module Spoom::LSP::PrintableSymbol
interface!
- sig { abstract.params(printer: Spoom::LSP::SymbolPrinter).void }
+ sig { abstract.params(printer: ::Spoom::LSP::SymbolPrinter).void }
def accept_printer(printer); end
end
class Spoom::LSP::Range < ::T::Struct
include ::Spoom::LSP::PrintableSymbol
- const :end, Spoom::LSP::Position
- const :start, Spoom::LSP::Position
+ const :end, ::Spoom::LSP::Position
+ const :start, ::Spoom::LSP::Position
- sig { override.params(printer: Spoom::LSP::SymbolPrinter).void }
+ sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void }
def accept_printer(printer); end
+ sig { returns(::String) }
def to_s; end
class << self
+ sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Range) }
def from_json(json); end
+
def inherited(s); end
end
end
class Spoom::LSP::Request < ::Spoom::LSP::Message
+ sig { params(id: ::Integer, method: ::String, params: T::Hash[T.untyped, T.untyped]).void }
def initialize(id, method, params); end
+ sig { returns(::Integer) }
def id; end
+
+ sig { returns(::String) }
def method; end
+
+ sig { returns(T::Hash[T.untyped, T.untyped]) }
def params; end
end
class Spoom::LSP::ResponseError < ::Spoom::LSP::Error
+ sig { params(code: ::Integer, message: ::String, data: T::Hash[T.untyped, T.untyped]).void }
def initialize(code, message, data); end
+ sig { returns(::Integer) }
def code; end
+
+ sig { returns(T::Hash[T.untyped, T.untyped]) }
def data; end
+
+ sig { returns(::String) }
def message; end
class << self
+ sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::ResponseError) }
def from_json(json); end
end
end
class Spoom::LSP::SignatureHelp < ::T::Struct
include ::Spoom::LSP::PrintableSymbol
- const :doc, Object
- const :label, T.nilable(String)
+ const :doc, ::Object
+ const :label, T.nilable(::String)
const :params, T::Array[T.untyped]
- sig { override.params(printer: Spoom::LSP::SymbolPrinter).void }
+ sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void }
def accept_printer(printer); end
+ sig { returns(::String) }
def to_s; end
class << self
+ sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::SignatureHelp) }
def from_json(json); end
+
def inherited(s); end
end
end
class Spoom::LSP::SymbolPrinter < ::Spoom::Printer
- sig { params(out: T.any(IO, StringIO), colors: T::Boolean, indent_level: Integer, prefix: T.nilable(String)).void }
+ sig do
+ params(
+ out: T.any(::IO, ::StringIO),
+ colors: T::Boolean,
+ indent_level: ::Integer,
+ prefix: T.nilable(::String)
+ ).void
+ end
def initialize(out: T.unsafe(nil), colors: T.unsafe(nil), indent_level: T.unsafe(nil), prefix: T.unsafe(nil)); end
- sig { params(uri: String).returns(String) }
+ sig { params(uri: ::String).returns(::String) }
def clean_uri(uri); end
+ sig { returns(T.nilable(::String)) }
def prefix; end
+
def prefix=(_arg0); end
- sig { params(objects: T::Array[Spoom::LSP::PrintableSymbol]).void }
+ sig { params(objects: T::Array[::Spoom::LSP::PrintableSymbol]).void }
def print_list(objects); end
- sig { params(object: T.nilable(Spoom::LSP::PrintableSymbol)).void }
+ sig { params(object: T.nilable(::Spoom::LSP::PrintableSymbol)).void }
def print_object(object); end
- sig { params(objects: T::Array[Spoom::LSP::PrintableSymbol]).void }
+ sig { params(objects: T::Array[::Spoom::LSP::PrintableSymbol]).void }
def print_objects(objects); end
+ sig { returns(T::Set[::Integer]) }
def seen; end
+
def seen=(_arg0); end
end
@@ -1018,10 +1169,10 @@ class Spoom::Printer
abstract!
- sig { params(out: T.any(IO, StringIO), colors: T::Boolean, indent_level: Integer).void }
+ sig { params(out: T.any(::IO, ::StringIO), colors: T::Boolean, indent_level: ::Integer).void }
def initialize(out: T.unsafe(nil), colors: T.unsafe(nil), indent_level: T.unsafe(nil)); end
- sig { params(string: String, color: Spoom::Color).returns(String) }
+ sig { params(string: ::String, color: ::Spoom::Color).returns(::String) }
def colorize(string, *color); end
sig { void }
@@ -1030,18 +1181,18 @@ class Spoom::Printer
sig { void }
def indent; end
- sig { returns(T.any(IO, StringIO)) }
+ sig { returns(T.any(::IO, ::StringIO)) }
def out; end
def out=(_arg0); end
- sig { params(string: T.nilable(String)).void }
+ sig { params(string: T.nilable(::String)).void }
def print(string); end
- sig { params(string: T.nilable(String), color: Spoom::Color).void }
+ sig { params(string: T.nilable(::String), color: ::Spoom::Color).void }
def print_colored(string, *color); end
- sig { params(string: T.nilable(String)).void }
+ sig { params(string: T.nilable(::String)).void }
def printl(string); end
sig { void }
@@ -1055,22 +1206,50 @@ Spoom::SPOOM_PATH = T.let(T.unsafe(nil), String)
module Spoom::Sorbet
class << self
- sig { params(arg: String, path: String, capture_err: T::Boolean, sorbet_bin: T.nilable(String)).returns([String, T::Boolean, Integer]) }
+ sig do
+ params(
+ arg: ::String,
+ path: ::String,
+ capture_err: T::Boolean,
+ sorbet_bin: T.nilable(::String)
+ ).returns(::Spoom::ExecResult)
+ end
def srb(*arg, path: T.unsafe(nil), capture_err: T.unsafe(nil), sorbet_bin: T.unsafe(nil)); end
- sig { params(config: Spoom::Sorbet::Config, path: String).returns(T::Array[String]) }
+ sig { params(config: ::Spoom::Sorbet::Config, path: ::String).returns(T::Array[::String]) }
def srb_files(config, path: T.unsafe(nil)); end
- sig { params(arg: String, path: String, capture_err: T::Boolean, sorbet_bin: T.nilable(String)).returns(T.nilable(T::Hash[String, Integer])) }
+ sig do
+ params(
+ arg: ::String,
+ path: ::String,
+ capture_err: T::Boolean,
+ sorbet_bin: T.nilable(::String)
+ ).returns(T.nilable(T::Hash[::String, ::Integer]))
+ end
def srb_metrics(*arg, path: T.unsafe(nil), capture_err: T.unsafe(nil), sorbet_bin: T.unsafe(nil)); end
- sig { params(arg: String, path: String, capture_err: T::Boolean, sorbet_bin: T.nilable(String)).returns([String, T::Boolean, Integer]) }
+ sig do
+ params(
+ arg: ::String,
+ path: ::String,
+ capture_err: T::Boolean,
+ sorbet_bin: T.nilable(::String)
+ ).returns(::Spoom::ExecResult)
+ end
def srb_tc(*arg, path: T.unsafe(nil), capture_err: T.unsafe(nil), sorbet_bin: T.unsafe(nil)); end
- sig { params(arg: String, path: String, capture_err: T::Boolean, sorbet_bin: T.nilable(String)).returns(T.nilable(String)) }
+ sig do
+ params(
+ arg: ::String,
+ path: ::String,
+ capture_err: T::Boolean,
+ sorbet_bin: T.nilable(::String)
+ ).returns(T.nilable(::String))
+ end
def srb_version(*arg, path: T.unsafe(nil), capture_err: T.unsafe(nil), sorbet_bin: T.unsafe(nil)); end
- sig { params(gem: String, path: String).returns(T.nilable(String)) }
+ sig { params(gem: ::String, path: ::String).returns(T.nilable(::String)) }
def version_from_gemfile_lock(gem: T.unsafe(nil), path: T.unsafe(nil)); end
end
end
@@ -1084,7 +1263,7 @@ class Spoom::Sorbet::Config
def allowed_extensions; end
- sig { returns(Spoom::Sorbet::Config) }
+ sig { returns(::Spoom::Sorbet::Config) }
def copy; end
def ignore; end
@@ -1094,29 +1273,29 @@ class Spoom::Sorbet::Config
def no_stdlib=(_arg0); end
- sig { returns(String) }
+ sig { returns(::String) }
def options_string; end
- sig { returns(T::Array[String]) }
+ sig { returns(T::Array[::String]) }
def paths; end
class << self
- sig { params(sorbet_config_path: String).returns(Spoom::Sorbet::Config) }
+ sig { params(sorbet_config_path: ::String).returns(::Spoom::Sorbet::Config) }
def parse_file(sorbet_config_path); end
- sig { params(sorbet_config: String).returns(Spoom::Sorbet::Config) }
+ sig { params(sorbet_config: ::String).returns(::Spoom::Sorbet::Config) }
def parse_string(sorbet_config); end
private
- sig { params(line: String).returns(String) }
+ sig { params(line: ::String).returns(::String) }
def parse_option(line); end
end
end
module Spoom::Sorbet::Errors
class << self
- sig { params(errors: T::Array[Spoom::Sorbet::Errors::Error]).returns(T::Array[Spoom::Sorbet::Errors::Error]) }
+ sig { params(errors: T::Array[::Spoom::Sorbet::Errors::Error]).returns(T::Array[::Spoom::Sorbet::Errors::Error]) }
def sort_errors_by_code(errors); end
end
end
@@ -1126,55 +1305,63 @@ Spoom::Sorbet::Errors::DEFAULT_ERROR_URL_BASE = T.let(T.unsafe(nil), String)
class Spoom::Sorbet::Errors::Error
include ::Comparable
- sig { params(file: T.nilable(String), line: T.nilable(Integer), message: T.nilable(String), code: T.nilable(Integer), more: T::Array[String]).void }
+ sig do
+ params(
+ file: T.nilable(::String),
+ line: T.nilable(::Integer),
+ message: T.nilable(::String),
+ code: T.nilable(::Integer),
+ more: T::Array[::String]
+ ).void
+ end
def initialize(file, line, message, code, more = T.unsafe(nil)); end
- sig { params(other: T.untyped).returns(Integer) }
+ sig { params(other: T.untyped).returns(::Integer) }
def <=>(other); end
def code; end
- sig { returns(T.nilable(String)) }
+ sig { returns(T.nilable(::String)) }
def file; end
- sig { returns(T.nilable(Integer)) }
+ sig { returns(T.nilable(::Integer)) }
def line; end
def message; end
- sig { returns(T::Array[String]) }
+ sig { returns(T::Array[::String]) }
def more; end
- sig { returns(String) }
+ sig { returns(::String) }
def to_s; end
end
class Spoom::Sorbet::Errors::Parser
- sig { params(error_url_base: String).void }
+ sig { params(error_url_base: ::String).void }
def initialize(error_url_base: T.unsafe(nil)); end
- sig { params(output: String).returns(T::Array[Spoom::Sorbet::Errors::Error]) }
+ sig { params(output: ::String).returns(T::Array[::Spoom::Sorbet::Errors::Error]) }
def parse(output); end
private
- sig { params(line: String).void }
+ sig { params(line: ::String).void }
def append_error(line); end
sig { void }
def close_error; end
- sig { params(error_url_base: String).returns(Regexp) }
+ sig { params(error_url_base: ::String).returns(::Regexp) }
def error_line_match_regexp(error_url_base); end
- sig { params(line: String).returns(T.nilable(Spoom::Sorbet::Errors::Error)) }
+ sig { params(line: ::String).returns(T.nilable(::Spoom::Sorbet::Errors::Error)) }
def match_error_line(line); end
- sig { params(error: Spoom::Sorbet::Errors::Error).void }
+ sig { params(error: ::Spoom::Sorbet::Errors::Error).void }
def open_error(error); end
class << self
- sig { params(output: String, error_url_base: String).returns(T::Array[Spoom::Sorbet::Errors::Error]) }
+ sig { params(output: ::String, error_url_base: ::String).returns(T::Array[::Spoom::Sorbet::Errors::Error]) }
def parse_string(output, error_url_base: T.unsafe(nil)); end
end
end
@@ -1184,13 +1371,13 @@ Spoom::Sorbet::GEM_PATH = T.let(T.unsafe(nil), String)
module Spoom::Sorbet::MetricsParser
class << self
- sig { params(path: String, prefix: String).returns(T::Hash[String, Integer]) }
+ sig { params(path: ::String, prefix: ::String).returns(T::Hash[::String, ::Integer]) }
def parse_file(path, prefix = T.unsafe(nil)); end
- sig { params(obj: T::Hash[String, T.untyped], prefix: String).returns(T::Hash[String, Integer]) }
+ sig { params(obj: T::Hash[::String, T.untyped], prefix: ::String).returns(T::Hash[::String, ::Integer]) }
def parse_hash(obj, prefix = T.unsafe(nil)); end
- sig { params(string: String, prefix: String).returns(T::Hash[String, Integer]) }
+ sig { params(string: ::String, prefix: ::String).returns(T::Hash[::String, ::Integer]) }
def parse_string(string, prefix = T.unsafe(nil)); end
end
end
@@ -1200,28 +1387,34 @@ Spoom::Sorbet::SEGFAULT_CODE = T.let(T.unsafe(nil), Integer)
module Spoom::Sorbet::Sigils
class << self
- sig { params(path: T.any(Pathname, String), new_strictness: String).returns(T::Boolean) }
+ sig { params(path: T.any(::Pathname, ::String), new_strictness: ::String).returns(T::Boolean) }
def change_sigil_in_file(path, new_strictness); end
- sig { params(path_list: T::Array[String], new_strictness: String).returns(T::Array[String]) }
+ sig { params(path_list: T::Array[::String], new_strictness: ::String).returns(T::Array[::String]) }
def change_sigil_in_files(path_list, new_strictness); end
- sig { params(path: T.any(Pathname, String)).returns(T.nilable(String)) }
+ sig { params(path: T.any(::Pathname, ::String)).returns(T.nilable(::String)) }
def file_strictness(path); end
- sig { params(directory: T.any(Pathname, String), strictness: String, extension: String).returns(T::Array[String]) }
+ sig do
+ params(
+ directory: T.any(::Pathname, ::String),
+ strictness: ::String,
+ extension: ::String
+ ).returns(T::Array[::String])
+ end
def files_with_sigil_strictness(directory, strictness, extension: T.unsafe(nil)); end
- sig { params(strictness: String).returns(String) }
+ sig { params(strictness: ::String).returns(::String) }
def sigil_string(strictness); end
- sig { params(content: String).returns(T.nilable(String)) }
+ sig { params(content: ::String).returns(T.nilable(::String)) }
def strictness_in_content(content); end
- sig { params(content: String, new_strictness: String).returns(String) }
+ sig { params(content: ::String, new_strictness: ::String).returns(::String) }
def update_sigil(content, new_strictness); end
- sig { params(strictness: String).returns(T::Boolean) }
+ sig { params(strictness: ::String).returns(T::Boolean) }
def valid_strictness?(strictness); end
end
end
@@ -1236,16 +1429,16 @@ Spoom::Sorbet::Sigils::STRICTNESS_TRUE = T.let(T.unsafe(nil), String)
Spoom::Sorbet::Sigils::VALID_STRICTNESS = T.let(T.unsafe(nil), Array)
class Spoom::Timeline
- sig { params(from: Time, to: Time, path: String).void }
+ sig { params(from: ::Time, to: ::Time, path: ::String).void }
def initialize(from, to, path: T.unsafe(nil)); end
- sig { params(dates: T::Array[Time]).returns(T::Array[String]) }
+ sig { params(dates: T::Array[::Time]).returns(T::Array[::String]) }
def commits_for_dates(dates); end
- sig { returns(T::Array[Time]) }
+ sig { returns(T::Array[::Time]) }
def months; end
- sig { returns(T::Array[String]) }
+ sig { returns(T::Array[::String]) }
def ticks; end
end
| true |
Other | Homebrew | brew | a0d422fb6f18224d86cc023eb5f126d134e5c68b.json | Update RBI files for spoom. | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -6599,6 +6599,12 @@ module Spoom::Git
extend ::T::Private::Methods::SingletonMethodHooks
end
+class Spoom::LSP::Client
+ extend ::T::Sig
+ extend ::T::Private::Methods::MethodHooks
+ extend ::T::Private::Methods::SingletonMethodHooks
+end
+
class Spoom::LSP::Diagnostic
extend ::T::Sig
extend ::T::Private::Methods::MethodHooks
@@ -6611,6 +6617,12 @@ class Spoom::LSP::DocumentSymbol
extend ::T::Private::Methods::SingletonMethodHooks
end
+class Spoom::LSP::Error::Diagnostics
+ extend ::T::Sig
+ extend ::T::Private::Methods::MethodHooks
+ extend ::T::Private::Methods::SingletonMethodHooks
+end
+
class Spoom::LSP::Hover
extend ::T::Sig
extend ::T::Private::Methods::MethodHooks
@@ -6623,6 +6635,12 @@ class Spoom::LSP::Location
extend ::T::Private::Methods::SingletonMethodHooks
end
+class Spoom::LSP::Message
+ extend ::T::Sig
+ extend ::T::Private::Methods::MethodHooks
+ extend ::T::Private::Methods::SingletonMethodHooks
+end
+
class Spoom::LSP::Position
extend ::T::Sig
extend ::T::Private::Methods::MethodHooks
@@ -6644,6 +6662,12 @@ class Spoom::LSP::Range
extend ::T::Private::Methods::SingletonMethodHooks
end
+class Spoom::LSP::ResponseError
+ extend ::T::Sig
+ extend ::T::Private::Methods::MethodHooks
+ extend ::T::Private::Methods::SingletonMethodHooks
+end
+
class Spoom::LSP::SignatureHelp
extend ::T::Sig
extend ::T::Private::Methods::MethodHooks | true |
Other | Homebrew | brew | 0c03a7d583be7e67bc6f575d49a6d005e80428af.json | Update RBI files for rubocop. | Library/Homebrew/sorbet/rbi/gems/rubocop@1.26.1.rbi | @@ -4058,6 +4058,7 @@ module RuboCop::Cop::LineLengthHelp
def allow_uri?; end
def allowed_uri_position?(line, uri_range); end
def directive_on_source_line?(line_index); end
+ def extend_uri_end_position(line, end_position); end
def find_excessive_uri_range(line); end
def ignore_cop_directives?; end
def indentation_difference(line); end
@@ -11062,6 +11063,7 @@ class RuboCop::Cop::Style::SelectByRegexp < ::RuboCop::Cop::Base
def calls_lvar?(param0 = T.unsafe(nil), param1); end
def creates_hash?(param0 = T.unsafe(nil)); end
+ def env_const?(param0 = T.unsafe(nil)); end
def on_send(node); end
def regexp_match?(param0 = T.unsafe(nil)); end
@@ -11238,13 +11240,17 @@ class RuboCop::Cop::Style::SoleNestedConditional < ::RuboCop::Cop::Base
def arguments_range(node); end
def assigned_variables(condition); end
def autocorrect(corrector, node, if_branch); end
+ def autocorrect_outer_condition_basic(corrector, node, if_branch); end
+ def autocorrect_outer_condition_modify_form(corrector, node, if_branch); end
def correct_for_basic_condition_style(corrector, node, if_branch, and_operator); end
def correct_for_comment(corrector, node, if_branch); end
def correct_for_guard_condition_style(corrector, node, if_branch, and_operator); end
- def correct_from_unless_to_if(corrector, node); end
+ def correct_for_outer_condition_modify_form_style(corrector, node, if_branch); end
+ def correct_from_unless_to_if(corrector, node, is_modify_form: T.unsafe(nil)); end
def correct_outer_condition(corrector, condition); end
- def offending_branch?(branch); end
- def replacement_condition(and_operator, condition); end
+ def offending_branch?(node, branch); end
+ def outer_condition_modify_form?(node, if_branch); end
+ def replace_condition(condition); end
def requrie_parentheses?(condition); end
def use_variable_assignment_in_condition?(condition, if_branch); end
def wrap_condition?(node); end | false |
Other | Homebrew | brew | d0f5a1e1495a52771aec7c140afcf96c98259d8a.json | Update RBI files for concurrent-ruby. | Library/Homebrew/sorbet/rbi/gems/concurrent-ruby@1.1.10.rbi | @@ -1,9 +1,9 @@
+# typed: true
+
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `concurrent-ruby` gem.
# Please instead update this file by running `bin/tapioca gem concurrent-ruby`.
-# typed: true
-
module Concurrent
extend ::Concurrent::Utility::EngineDetector
extend ::Concurrent::Utility::NativeExtensionLoader
@@ -21,7 +21,7 @@ module Concurrent
def dataflow_with(executor, *inputs, &block); end
def dataflow_with!(executor, *inputs, &block); end
def leave_transaction; end
- def monotonic_time; end
+ def monotonic_time(unit = T.unsafe(nil)); end
class << self
def abort_transaction; end
@@ -42,7 +42,7 @@ module Concurrent
def global_logger=(value); end
def global_timer_set; end
def leave_transaction; end
- def monotonic_time; end
+ def monotonic_time(unit = T.unsafe(nil)); end
def new_fast_executor(opts = T.unsafe(nil)); end
def new_io_executor(opts = T.unsafe(nil)); end
def physical_processor_count; end
@@ -89,7 +89,7 @@ class Concurrent::AbstractExecutorService < ::Concurrent::Synchronization::Locka
private
- def handle_fallback(*args); end
+ def fallback_action(*args); end
def ns_auto_terminate?; end
def ns_execute(*args, &task); end
def ns_kill_execution; end
@@ -722,7 +722,6 @@ Concurrent::GLOBAL_FAST_EXECUTOR = T.let(T.unsafe(nil), Concurrent::Delay)
Concurrent::GLOBAL_IMMEDIATE_EXECUTOR = T.let(T.unsafe(nil), Concurrent::ImmediateExecutor)
Concurrent::GLOBAL_IO_EXECUTOR = T.let(T.unsafe(nil), Concurrent::Delay)
Concurrent::GLOBAL_LOGGER = T.let(T.unsafe(nil), Concurrent::AtomicReference)
-Concurrent::GLOBAL_MONOTONIC_CLOCK = T.let(T.unsafe(nil), T.untyped)
Concurrent::GLOBAL_TIMER_SET = T.let(T.unsafe(nil), Concurrent::Delay)
class Concurrent::Hash < ::Hash; end
Concurrent::HashImplementation = Hash
@@ -1784,14 +1783,14 @@ class Concurrent::RubyThreadPoolExecutor < ::Concurrent::RubyExecutorService
def max_length; end
def max_queue; end
def min_length; end
+ def prune_pool; end
def queue_length; end
- def ready_worker(worker); end
+ def ready_worker(worker, last_message); end
def remaining_capacity; end
def remove_busy_worker(worker); end
def scheduled_task_count; end
def synchronous; end
def worker_died(worker); end
- def worker_not_old_enough(worker); end
def worker_task_completed; end
private
@@ -1804,12 +1803,11 @@ class Concurrent::RubyThreadPoolExecutor < ::Concurrent::RubyExecutorService
def ns_kill_execution; end
def ns_limited_queue?; end
def ns_prune_pool; end
- def ns_ready_worker(worker, success = T.unsafe(nil)); end
+ def ns_ready_worker(worker, last_message, success = T.unsafe(nil)); end
def ns_remove_busy_worker(worker); end
def ns_reset_if_forked; end
def ns_shutdown_execution; end
def ns_worker_died(worker); end
- def ns_worker_not_old_enough(worker); end
end
Concurrent::RubyThreadPoolExecutor::DEFAULT_MAX_POOL_SIZE = T.let(T.unsafe(nil), Integer)
@@ -2216,11 +2214,9 @@ end
class Concurrent::TVar < ::Concurrent::Synchronization::Object
def initialize(value); end
- def unsafe_increment_version; end
def unsafe_lock; end
def unsafe_value; end
def unsafe_value=(value); end
- def unsafe_version; end
def value; end
def value=(value); end
@@ -2285,7 +2281,6 @@ class Concurrent::TimerTask < ::Concurrent::RubyExecutorService
def ns_kill_execution; end
def ns_shutdown_execution; end
def schedule_next_task(interval = T.unsafe(nil)); end
- def timeout_task(completion); end
class << self
def execute(opts = T.unsafe(nil), &task); end
@@ -2300,9 +2295,9 @@ class Concurrent::Transaction
def abort; end
def commit; end
+ def open(tvar); end
def read(tvar); end
def unlock; end
- def valid?; end
def write(tvar, value); end
class << self
@@ -2315,11 +2310,11 @@ Concurrent::Transaction::ABORTED = T.let(T.unsafe(nil), Object)
class Concurrent::Transaction::AbortError < ::StandardError; end
class Concurrent::Transaction::LeaveError < ::StandardError; end
-class Concurrent::Transaction::ReadLogEntry < ::Struct
- def tvar; end
- def tvar=(_); end
- def version; end
- def version=(_); end
+class Concurrent::Transaction::OpenEntry < ::Struct
+ def modified; end
+ def modified=(_); end
+ def value; end
+ def value=(_); end
class << self
def [](*_arg0); end | true |
Other | Homebrew | brew | d0f5a1e1495a52771aec7c140afcf96c98259d8a.json | Update RBI files for concurrent-ruby. | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -3488,7 +3488,13 @@ end
Net::HTTPFatalErrorCode = Net::HTTPClientError
-Net::HTTPInformationCode = Net::HTTPInformation
+class Net::HTTPInformation
+end
+
+Net::HTTPInformationCode::EXCEPTION_TYPE = Net::HTTPError
+
+class Net::HTTPInformation
+end
class Net::HTTPLoopDetected
HAS_BODY = ::T.let(nil, ::T.untyped)
@@ -3548,7 +3554,13 @@ Net::HTTPServerErrorCode = Net::HTTPServerError
Net::HTTPSession = Net::HTTP
-Net::HTTPSuccessCode = Net::HTTPSuccess
+class Net::HTTPSuccess
+end
+
+Net::HTTPSuccessCode::EXCEPTION_TYPE = Net::HTTPError
+
+class Net::HTTPSuccess
+end
class Net::HTTPURITooLong
HAS_BODY = ::T.let(nil, ::T.untyped) | true |
Other | Homebrew | brew | 5511a3d1d8d36e41ebe2a28b775ef0e22bc264a1.json | Update RBI files for parallel. | Library/Homebrew/sorbet/rbi/gems/parallel@1.22.0.rbi | @@ -1,9 +1,9 @@
+# typed: true
+
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `parallel` gem.
# Please instead update this file by running `bin/tapioca gem parallel`.
-# typed: true
-
module Parallel
extend ::Parallel::ProcessorCount
@@ -26,11 +26,14 @@ module Parallel
def call_with_index(item, index, options, &block); end
def create_workers(job_factory, options, &block); end
def extract_count_from_options(options); end
+ def instrument_finish(item, index, result, options); end
+ def instrument_start(item, index, options); end
def process_incoming_jobs(read, write, job_factory, options, &block); end
def replace_worker(job_factory, workers, index, options, blk); end
def with_instrumentation(item, index, options); end
def work_direct(job_factory, options, &block); end
def work_in_processes(job_factory, options, &blk); end
+ def work_in_ractors(job_factory, options); end
def work_in_threads(job_factory, options, &block); end
def worker(job_factory, options, &block); end
end | false |
Other | Homebrew | brew | bf9bae0bef404cb04ed2fccc09fc902037fea9d5.json | Update RBI files for rubocop-rails. | Library/Homebrew/sorbet/rbi/gems/rubocop-rails@2.14.2.rbi | @@ -1137,10 +1137,9 @@ class RuboCop::Cop::Rails::MigrationClassName < ::RuboCop::Cop::Base
private
- def basename_without_timestamp_and_suffix; end
+ def basename_without_timestamp_and_suffix(filepath); end
+ def camelize(word); end
def remove_gem_suffix(file_name); end
- def to_camelcase(word); end
- def to_snakecase(word); end
end
RuboCop::Cop::Rails::MigrationClassName::MSG = T.let(T.unsafe(nil), String)
@@ -1856,6 +1855,12 @@ RuboCop::Cop::Rails::TimeZoneAssignment::RESTRICT_ON_SEND = T.let(T.unsafe(nil),
class RuboCop::Cop::Rails::TransactionExitStatement < ::RuboCop::Cop::Base
def exit_statements(param0); end
def on_send(node); end
+
+ private
+
+ def in_rescue?(statement_node); end
+ def nested_block?(statement_node); end
+ def statement(statement_node); end
end
RuboCop::Cop::Rails::TransactionExitStatement::MSG = T.let(T.unsafe(nil), String) | false |
Other | Homebrew | brew | 543498859ecb322e588fd04dad566b084486b246.json | repair arch meaning | docs/Cask-Cookbook.md | @@ -502,7 +502,7 @@ The available symbols for hardware are:
| ---------- | -------------- |
| `:x86_64` | 64-bit Intel |
| `:intel` | 64-bit Intel |
-| `:arm64` | Apple M1 |
+| `:arm64` | Apple Silicon |
The following are all valid expressions:
| false |
Other | Homebrew | brew | ab8d3722723137889969d57028adacc7e2038ce5.json | add arm64 info to Cask-Cookbook.md | docs/Cask-Cookbook.md | @@ -502,17 +502,17 @@ The available symbols for hardware are:
| ---------- | -------------- |
| `:x86_64` | 64-bit Intel |
| `:intel` | 64-bit Intel |
+| `:arm64` | Apple M1 |
The following are all valid expressions:
```ruby
depends_on arch: :intel
depends_on arch: :x86_64 # same meaning as above
depends_on arch: [:x86_64] # same meaning as above
+depends_on arch: :arm64
```
-Since as of now all the macOS versions we support only run on 64-bit Intel, `depends_on arch:` is never necessary.
-
#### All depends_on Keys
| key | description |
@@ -750,7 +750,7 @@ strategy :header_match do |headers|
v = headers["content-disposition"][/MyApp-(\d+(?:\.\d+)*)\.zip/i, 1]
id = headers["location"][%r{/(\d+)/download$}i, 1]
next if v.blank? || id.blank?
-
+
"#{v},#{id}"
end
```
@@ -761,7 +761,7 @@ Similarly, the `:page_match` strategy can also be used for more complex versions
strategy :page_match do |page|
match = page.match(%r{href=.*?/(\d+)/MyApp-(\d+(?:\.\d+)*)\.zip}i)
next if match.blank?
-
+
"#{match[2]},#{match[1]}"
end
``` | false |
Other | Homebrew | brew | 07de9ab0eee51374e1835dd7f1d2d6ad1a6a5f16.json | Update RBI files for rubocop-rails. | Library/Homebrew/sorbet/rbi/gems/rubocop-rails@2.14.1.rbi | @@ -1130,13 +1130,15 @@ RuboCop::Cop::Rails::MatchRoute::MSG = T.let(T.unsafe(nil), String)
RuboCop::Cop::Rails::MatchRoute::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Rails::MigrationClassName < ::RuboCop::Cop::Base
+ include ::RuboCop::Cop::MigrationsHelper
extend ::RuboCop::Cop::AutoCorrector
def on_class(node); end
private
- def basename_without_timestamp; end
+ def basename_without_timestamp_and_suffix; end
+ def remove_gem_suffix(file_name); end
def to_camelcase(word); end
def to_snakecase(word); end
end | false |
Other | Homebrew | brew | 23f4c5a3a03ce9c6eed0b390793b22654e5032b3.json | Update RBI files for rubocop-rails. | Library/Homebrew/sorbet/rbi/gems/rubocop-rails@2.14.0.rbi | @@ -36,6 +36,10 @@ RuboCop::Cop::ActiveRecordMigrationsHelper::POSTGRES_SCHEMA_DEFINITIONS = T.let(
RuboCop::Cop::ActiveRecordMigrationsHelper::RAILS_ABSTRACT_SCHEMA_DEFINITIONS = T.let(T.unsafe(nil), Array)
RuboCop::Cop::ActiveRecordMigrationsHelper::RAILS_ABSTRACT_SCHEMA_DEFINITIONS_HELPERS = T.let(T.unsafe(nil), Array)
+module RuboCop::Cop::ClassSendNodeHelper
+ def class_send_nodes(class_node); end
+end
+
module RuboCop::Cop::EnforceSuperclass
def on_class(node); end
def on_send(node); end
@@ -119,6 +123,16 @@ end
module RuboCop::Cop::Rails; end
+class RuboCop::Cop::Rails::ActionControllerTestCase < ::RuboCop::Cop::Base
+ extend ::RuboCop::Cop::AutoCorrector
+ extend ::RuboCop::Cop::TargetRailsVersion
+
+ def action_controller_test_case?(param0 = T.unsafe(nil)); end
+ def on_class(node); end
+end
+
+RuboCop::Cop::Rails::ActionControllerTestCase::MSG = T.let(T.unsafe(nil), String)
+
class RuboCop::Cop::Rails::ActionFilter < ::RuboCop::Cop::Base
include ::RuboCop::Cop::ConfigurableEnforcedStyle
extend ::RuboCop::Cop::AutoCorrector
@@ -217,12 +231,13 @@ RuboCop::Cop::Rails::AddColumnIndex::MSG = T.let(T.unsafe(nil), String)
RuboCop::Cop::Rails::AddColumnIndex::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Rails::AfterCommitOverride < ::RuboCop::Cop::Base
+ include ::RuboCop::Cop::ClassSendNodeHelper
+
def on_class(class_node); end
private
def after_commit_callback?(node); end
- def class_send_nodes(class_node); end
def each_after_commit_callback(class_node); end
def named_callback?(node); end
end
@@ -364,10 +379,12 @@ class RuboCop::Cop::Rails::BulkChangeTable < ::RuboCop::Cop::Base
def call_to_combinable_alter_method?(child_node); end
def combinable_alter_methods; end
def combinable_transformations; end
+ def count_transformations(send_nodes); end
def database; end
def database_from_yaml; end
def database_yaml; end
def include_bulk_options?(node); end
+ def send_nodes_from_change_table_block(body); end
def support_bulk_alter?; end
end
@@ -521,6 +538,53 @@ end
RuboCop::Cop::Rails::DelegateAllowBlank::MSG = T.let(T.unsafe(nil), String)
RuboCop::Cop::Rails::DelegateAllowBlank::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
+class RuboCop::Cop::Rails::DeprecatedActiveModelErrorsMethods < ::RuboCop::Cop::Base
+ def any_manipulation?(param0 = T.unsafe(nil)); end
+ def messages_details_assignment?(param0 = T.unsafe(nil)); end
+ def messages_details_manipulation?(param0 = T.unsafe(nil)); end
+ def on_send(node); end
+ def receiver_matcher_inside_model(param0 = T.unsafe(nil)); end
+ def receiver_matcher_outside_model(param0 = T.unsafe(nil)); end
+ def root_assignment?(param0 = T.unsafe(nil)); end
+ def root_manipulation?(param0 = T.unsafe(nil)); end
+
+ private
+
+ def model_file?; end
+ def receiver_matcher(node); end
+end
+
+RuboCop::Cop::Rails::DeprecatedActiveModelErrorsMethods::MANIPULATIVE_METHODS = T.let(T.unsafe(nil), Set)
+RuboCop::Cop::Rails::DeprecatedActiveModelErrorsMethods::MSG = T.let(T.unsafe(nil), String)
+
+class RuboCop::Cop::Rails::DuplicateAssociation < ::RuboCop::Cop::Base
+ include ::RuboCop::Cop::RangeHelp
+ include ::RuboCop::Cop::ClassSendNodeHelper
+ extend ::RuboCop::Cop::AutoCorrector
+
+ def association(param0 = T.unsafe(nil)); end
+ def on_class(class_node); end
+
+ private
+
+ def offenses(class_node); end
+end
+
+RuboCop::Cop::Rails::DuplicateAssociation::MSG = T.let(T.unsafe(nil), String)
+
+class RuboCop::Cop::Rails::DuplicateScope < ::RuboCop::Cop::Base
+ include ::RuboCop::Cop::ClassSendNodeHelper
+
+ def on_class(class_node); end
+ def scope(param0 = T.unsafe(nil)); end
+
+ private
+
+ def offenses(class_node); end
+end
+
+RuboCop::Cop::Rails::DuplicateScope::MSG = T.let(T.unsafe(nil), String)
+
class RuboCop::Cop::Rails::DurationArithmetic < ::RuboCop::Cop::Base
extend ::RuboCop::Cop::AutoCorrector
@@ -877,6 +941,22 @@ end
RuboCop::Cop::Rails::HttpStatus::SymbolicStyleChecker::DEFAULT_MSG = T.let(T.unsafe(nil), String)
RuboCop::Cop::Rails::HttpStatus::SymbolicStyleChecker::MSG = T.let(T.unsafe(nil), String)
+class RuboCop::Cop::Rails::I18nLazyLookup < ::RuboCop::Cop::Base
+ include ::RuboCop::Cop::VisibilityHelp
+ extend ::RuboCop::Cop::AutoCorrector
+
+ def on_send(node); end
+ def translate_call?(param0 = T.unsafe(nil)); end
+
+ private
+
+ def controller_and_action(node); end
+ def controller_path(controller); end
+ def get_scoped_key(key_node, controller, action); end
+end
+
+RuboCop::Cop::Rails::I18nLazyLookup::MSG = T.let(T.unsafe(nil), String)
+
class RuboCop::Cop::Rails::I18nLocaleAssignment < ::RuboCop::Cop::Base
def i18n_locale_assignment?(param0 = T.unsafe(nil)); end
def on_send(node); end
@@ -885,6 +965,17 @@ end
RuboCop::Cop::Rails::I18nLocaleAssignment::MSG = T.let(T.unsafe(nil), String)
RuboCop::Cop::Rails::I18nLocaleAssignment::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
+class RuboCop::Cop::Rails::I18nLocaleTexts < ::RuboCop::Cop::Base
+ def flash_assignment?(param0 = T.unsafe(nil)); end
+ def mail_subject(param0); end
+ def on_send(node); end
+ def redirect_to_flash(param0); end
+ def validation_message(param0); end
+end
+
+RuboCop::Cop::Rails::I18nLocaleTexts::MSG = T.let(T.unsafe(nil), String)
+RuboCop::Cop::Rails::I18nLocaleTexts::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
+
class RuboCop::Cop::Rails::IgnoredSkipActionFilterOption < ::RuboCop::Cop::Base
def filter_options(param0 = T.unsafe(nil)); end
def on_send(node); end
@@ -1038,6 +1129,20 @@ RuboCop::Cop::Rails::MatchRoute::HTTP_METHODS = T.let(T.unsafe(nil), Array)
RuboCop::Cop::Rails::MatchRoute::MSG = T.let(T.unsafe(nil), String)
RuboCop::Cop::Rails::MatchRoute::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
+class RuboCop::Cop::Rails::MigrationClassName < ::RuboCop::Cop::Base
+ extend ::RuboCop::Cop::AutoCorrector
+
+ def on_class(node); end
+
+ private
+
+ def basename_without_timestamp; end
+ def to_camelcase(word); end
+ def to_snakecase(word); end
+end
+
+RuboCop::Cop::Rails::MigrationClassName::MSG = T.let(T.unsafe(nil), String)
+
class RuboCop::Cop::Rails::NegateInclude < ::RuboCop::Cop::Base
extend ::RuboCop::Cop::AutoCorrector
@@ -1131,11 +1236,12 @@ class RuboCop::Cop::Rails::Pluck < ::RuboCop::Cop::Base
extend ::RuboCop::Cop::TargetRailsVersion
def on_block(node); end
+ def on_numblock(node); end
def pluck_candidate?(param0 = T.unsafe(nil)); end
private
- def message(method, argument, element, value); end
+ def message(value, node); end
def offense_range(node); end
end
@@ -1692,6 +1798,15 @@ RuboCop::Cop::Rails::SquishedSQLHeredocs::MSG = T.let(T.unsafe(nil), String)
RuboCop::Cop::Rails::SquishedSQLHeredocs::SQL = T.let(T.unsafe(nil), String)
RuboCop::Cop::Rails::SquishedSQLHeredocs::SQUISH = T.let(T.unsafe(nil), String)
+class RuboCop::Cop::Rails::TableNameAssignment < ::RuboCop::Cop::Base
+ include ::RuboCop::Cop::ActiveRecordHelper
+
+ def base_class?(param0 = T.unsafe(nil)); end
+ def on_class(class_node); end
+end
+
+RuboCop::Cop::Rails::TableNameAssignment::MSG = T.let(T.unsafe(nil), String)
+
class RuboCop::Cop::Rails::TimeZone < ::RuboCop::Cop::Base
include ::RuboCop::Cop::ConfigurableEnforcedStyle
extend ::RuboCop::Cop::AutoCorrector
@@ -1736,6 +1851,14 @@ end
RuboCop::Cop::Rails::TimeZoneAssignment::MSG = T.let(T.unsafe(nil), String)
RuboCop::Cop::Rails::TimeZoneAssignment::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
+class RuboCop::Cop::Rails::TransactionExitStatement < ::RuboCop::Cop::Base
+ def exit_statements(param0); end
+ def on_send(node); end
+end
+
+RuboCop::Cop::Rails::TransactionExitStatement::MSG = T.let(T.unsafe(nil), String)
+RuboCop::Cop::Rails::TransactionExitStatement::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
+
class RuboCop::Cop::Rails::UniqBeforePluck < ::RuboCop::Cop::Base
include ::RuboCop::Cop::ConfigurableEnforcedStyle
include ::RuboCop::Cop::RangeHelp | true |
Other | Homebrew | brew | 23f4c5a3a03ce9c6eed0b390793b22654e5032b3.json | Update RBI files for rubocop-rails. | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -5027,7 +5027,11 @@ module RuboCop::AST::NodePattern::Sets
SET_BUILD_RECOMMENDED_TEST_OPTIONAL = ::T.let(nil, ::T.untyped)
SET_DEPENDS_ON_USES_FROM_MACOS = ::T.let(nil, ::T.untyped)
SET_INCLUDE_WITH_WITHOUT = ::T.let(nil, ::T.untyped)
+ SET_MESSAGES_DETAILS = ::T.let(nil, ::T.untyped)
+ SET_NOTICE_ALERT = ::T.let(nil, ::T.untyped)
+ SET_REJECT_DELETE_IF_REJECT = ::T.let(nil, ::T.untyped)
SET_SYSTEM_SHELL_OUTPUT_PIPE_OUTPUT = ::T.let(nil, ::T.untyped)
+ SET_TRANSLATE_T = ::T.let(nil, ::T.untyped)
SET_WITH_WITHOUT = ::T.let(nil, ::T.untyped)
end
| true |
Other | Homebrew | brew | 6f6e180cbe898b7701bbb110eb990f87510c316f.json | Update RBI files for rbi. | Library/Homebrew/sorbet/rbi/gems/rbi@0.0.14.rbi | @@ -662,6 +662,9 @@ class RBI::Loc
sig { returns(T.nilable(::String)) }
def file; end
+ sig { returns(T.nilable(::String)) }
+ def source; end
+
sig { returns(::String) }
def to_s; end
@@ -1903,6 +1906,9 @@ class RBI::TreeBuilder < ::RBI::ASTVisitor
end
def initialize(file:, comments: T.unsafe(nil), nodes_comments_assoc: T.unsafe(nil)); end
+ sig { returns(T.nilable(::AST::Node)) }
+ def last_node; end
+
sig { void }
def post_process; end
@@ -2002,6 +2008,17 @@ class RBI::TypeMember < ::RBI::NodeWithComments
def value; end
end
+class RBI::UnexpectedParserError < ::StandardError
+ sig { params(parent_exception: ::Exception, last_location: ::RBI::Loc).void }
+ def initialize(parent_exception, last_location); end
+
+ sig { returns(::RBI::Loc) }
+ def last_location; end
+
+ sig { params(io: T.any(::IO, ::StringIO)).void }
+ def print_debug(io: T.unsafe(nil)); end
+end
+
RBI::VERSION = T.let(T.unsafe(nil), String)
class RBI::Visibility < ::RBI::NodeWithComments | true |
Other | Homebrew | brew | 6f6e180cbe898b7701bbb110eb990f87510c316f.json | Update RBI files for rbi. | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -4204,6 +4204,12 @@ class RBI::Rewriters::RemoveKnownDefinitions::Operation
extend ::T::Private::Methods::SingletonMethodHooks
end
+class RBI::UnexpectedParserError
+ extend ::T::Sig
+ extend ::T::Private::Methods::MethodHooks
+ extend ::T::Private::Methods::SingletonMethodHooks
+end
+
class RBI::Visitor
extend ::T::Helpers
extend ::T::Sig | true |
Other | Homebrew | brew | 7a60256ed5b3f507623e8030c5769d2983a5a3ca.json | Update RBI files for unf_ext. | Library/Homebrew/sorbet/rbi/gems/unf_ext@0.0.8.1.rbi | @@ -1,8 +1,8 @@
+# typed: true
+
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `unf_ext` gem.
# Please instead update this file by running `bin/tapioca gem unf_ext`.
-# typed: true
-
# THIS IS AN EMPTY RBI FILE.
# see https://github.com/Shopify/tapioca/wiki/Manual-Gem-Requires | false |
Other | Homebrew | brew | d23de6c54ceab57f7254dd0853b461e28af9d43e.json | shims: enable cc arg refurbishment for ninja | Library/Homebrew/shims/linux/super/ninja | @@ -0,0 +1 @@
+../../super/ninja
\ No newline at end of file | true |
Other | Homebrew | brew | d23de6c54ceab57f7254dd0853b461e28af9d43e.json | shims: enable cc arg refurbishment for ninja | Library/Homebrew/shims/mac/super/ninja | @@ -0,0 +1 @@
+../../super/ninja
\ No newline at end of file | true |
Other | Homebrew | brew | d23de6c54ceab57f7254dd0853b461e28af9d43e.json | shims: enable cc arg refurbishment for ninja | Library/Homebrew/shims/super/ninja | @@ -0,0 +1,19 @@
+#!/bin/bash
+
+# HOMEBREW_LIBRARY is set by bin/brew
+# HOMEBREW_CCCFG and HOMEBREW_OPT are set by extend/ENV/super.rb
+# shellcheck disable=SC2154
+if [[ -z "${HOMEBREW_LIBRARY}" ]]
+then
+ echo "${0##*/}: This shim is internal and must be run via brew." >&2
+ exit 1
+fi
+
+source "${HOMEBREW_LIBRARY}/Homebrew/shims/utils.sh"
+
+# shellcheck disable=SC2154
+export HOMEBREW_CCCFG="O${HOMEBREW_CCCFG}"
+try_exec_non_system "ninja" "$@"
+
+echo "ninja: Shim failed to find ninja in PATH."
+exit 1 | true |
Other | Homebrew | brew | 35f426e3e23efe1385bc30cda9923367dbd77ac6.json | keg.rb: add generic codesign_patched_binary method | Library/Homebrew/keg.rb | @@ -529,6 +529,8 @@ def binary_executable_or_library_files
elf_files
end
+ def codesign_patched_binary(_binary_file); end
+
private
def resolve_any_conflicts(dst, dry_run: false, verbose: false, overwrite: false) | false |
Other | Homebrew | brew | e8a8fc1e18159634ad1dc112ff123e4e092aa473.json | Update RBI files for activesupport. | Library/Homebrew/sorbet/rbi/gems/activesupport@6.1.5.rbi | @@ -2784,7 +2784,6 @@ end
module ActiveSupport::VERSION; end
ActiveSupport::VERSION::MAJOR = T.let(T.unsafe(nil), Integer)
ActiveSupport::VERSION::MINOR = T.let(T.unsafe(nil), Integer)
-ActiveSupport::VERSION::PRE = T.let(T.unsafe(nil), String)
ActiveSupport::VERSION::STRING = T.let(T.unsafe(nil), String)
ActiveSupport::VERSION::TINY = T.let(T.unsafe(nil), Integer)
| true |
Other | Homebrew | brew | e8a8fc1e18159634ad1dc112ff123e4e092aa473.json | Update RBI files for activesupport. | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -24,6 +24,10 @@ module ActiveSupport::ForkTracker::CoreExtPrivate
include ::ActiveSupport::ForkTracker::CoreExt
end
+module ActiveSupport::VERSION
+ PRE = ::T.let(nil, ::T.untyped)
+end
+
class Addrinfo
def connect_internal(local_addrinfo, timeout=T.unsafe(nil)); end
end | true |
Other | Homebrew | brew | 2c4ad58d16d6c137e3d26ff494450f3064364d02.json | test/software_spec/bottle_spec.rb: add unit tests | Library/Homebrew/test/software_spec/bottle_spec.rb | @@ -41,6 +41,18 @@
end
end
+ describe "#compatible_locations?" do
+ it "checks if the bottle cellar is relocatable" do
+ expect(bottle_spec.compatible_locations?).to be false
+ end
+ end
+
+ describe "#tag_to_cellar" do
+ it "returns the cellar for a tag" do
+ expect(bottle_spec.tag_to_cellar).to eq Utils::Bottles.tag.default_cellar
+ end
+ end
+
%w[root_url rebuild].each do |method|
specify "##{method}" do
object = Object.new | false |
Other | Homebrew | brew | 17005b93abbc0e95c5bdf9bcee485f12f2a14778.json | software_spec.rb: add tag_to_cellar method | Library/Homebrew/software_spec.rb | @@ -504,14 +504,19 @@ def root_url(var = nil, specs = {})
end
end
- sig { params(tag: Utils::Bottles::Tag).returns(T::Boolean) }
- def compatible_locations?(tag: Utils::Bottles.tag)
+ sig { params(tag: Utils::Bottles::Tag).returns(T.any(Symbol, String)) }
+ def tag_to_cellar(tag = Utils::Bottles.tag)
spec = collector.specification_for(tag)
- cellar = if spec.present?
+ if spec.present?
spec.cellar
else
tag.default_cellar
end
+ end
+
+ sig { params(tag: Utils::Bottles::Tag).returns(T::Boolean) }
+ def compatible_locations?(tag: Utils::Bottles.tag)
+ cellar = tag_to_cellar(tag)
return true if [:any, :any_skip_relocation].include?(cellar)
| false |
Other | Homebrew | brew | 39923cdb7f037e719aa32da96088c5603a080595.json | linkage_checker: restrict `RPATH` test to `--strict`
This test is causing some rebuilds due to failed linkage upon upgrade.
That's a problem because rebuilds won't fix the problem that the `RPATH`
check identifies. | Library/Homebrew/linkage_checker.rb | @@ -70,14 +70,16 @@ def display_test_output(puts_output: true, strict: false)
display_items "Broken dependencies", @broken_deps, puts_output: puts_output
display_items "Unwanted system libraries", @unwanted_system_dylibs, puts_output: puts_output
display_items "Conflicting libraries", @version_conflict_deps, puts_output: puts_output
- display_items "Undeclared dependencies with linkage", @undeclared_deps, puts_output: puts_output if strict
+ return unless strict
+
+ display_items "Undeclared dependencies with linkage", @undeclared_deps, puts_output: puts_output
display_items "Files with missing rpath", @files_missing_rpaths, puts_output: puts_output
end
sig { params(strict: T::Boolean).returns(T::Boolean) }
def broken_library_linkage?(strict: false)
- issues = [@broken_deps, @unwanted_system_dylibs, @version_conflict_deps, @files_missing_rpaths]
- issues << @undeclared_deps if strict
+ issues = [@broken_deps, @unwanted_system_dylibs, @version_conflict_deps]
+ issues += [@undeclared_deps, @files_missing_rpaths] if strict
[issues, unexpected_broken_dylibs, unexpected_present_dylibs].flatten.any?(&:present?)
end
| false |
Other | Homebrew | brew | c9965657df0cc2ebcfd09b0215e56fa6515e7aea.json | Update RBI files for rubocop. | Library/Homebrew/sorbet/rbi/gems/rubocop@1.26.0.rbi | @@ -158,7 +158,7 @@ class RuboCop::CLI::Environment
def run(name); end
end
-class RuboCop::CLI::Finished < ::RuntimeError; end
+class RuboCop::CLI::Finished < ::StandardError; end
RuboCop::CLI::STATUS_ERROR = T.let(T.unsafe(nil), Integer)
RuboCop::CLI::STATUS_INTERRUPTED = T.let(T.unsafe(nil), Integer)
RuboCop::CLI::STATUS_OFFENSES = T.let(T.unsafe(nil), Integer)
@@ -720,6 +720,7 @@ class RuboCop::Cop::Badge
def with_department(department); end
class << self
+ def camel_case(name_part); end
def for(class_name); end
def parse(identifier); end
end
@@ -4795,12 +4796,11 @@ class RuboCop::Cop::Lint::InheritException < ::RuboCop::Cop::Base
private
- def illegal_class_name?(class_node); end
+ def exception_class?(class_node); end
def message(node); end
def preferred_base_class; end
end
-RuboCop::Cop::Lint::InheritException::ILLEGAL_CLASSES = T.let(T.unsafe(nil), Array)
RuboCop::Cop::Lint::InheritException::MSG = T.let(T.unsafe(nil), String)
RuboCop::Cop::Lint::InheritException::PREFERRED_BASE_CLASS = T.let(T.unsafe(nil), Hash)
RuboCop::Cop::Lint::InheritException::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
@@ -6015,6 +6015,7 @@ class RuboCop::Cop::Lint::UselessTimes < ::RuboCop::Cop::Base
private
+ def autocorrect(corrector, count, node, proc_name); end
def autocorrect_block(corrector, node); end
def autocorrect_block_pass(corrector, node, proc_name); end
def fix_indentation(source, range); end
@@ -9244,17 +9245,17 @@ class RuboCop::Cop::Style::LambdaCall < ::RuboCop::Cop::Base
include ::RuboCop::Cop::ConfigurableEnforcedStyle
extend ::RuboCop::Cop::AutoCorrector
- def autocorrect(corrector, node); end
def on_send(node); end
private
def explicit_style?; end
def implicit_style?; end
- def message(_node); end
def offense?(node); end
+ def prefer(node); end
end
+RuboCop::Cop::Style::LambdaCall::MSG = T.let(T.unsafe(nil), String)
RuboCop::Cop::Style::LambdaCall::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Style::LineEndConcatenation < ::RuboCop::Cop::Base
@@ -9784,6 +9785,23 @@ class RuboCop::Cop::Style::NegatedWhile < ::RuboCop::Cop::Base
def on_while(node); end
end
+class RuboCop::Cop::Style::NestedFileDirname < ::RuboCop::Cop::Base
+ include ::RuboCop::Cop::RangeHelp
+ extend ::RuboCop::Cop::AutoCorrector
+ extend ::RuboCop::Cop::TargetRubyVersion
+
+ def file_dirname?(param0 = T.unsafe(nil)); end
+ def on_send(node); end
+
+ private
+
+ def offense_range(node); end
+ def path_with_dir_level(node, level); end
+end
+
+RuboCop::Cop::Style::NestedFileDirname::MSG = T.let(T.unsafe(nil), String)
+RuboCop::Cop::Style::NestedFileDirname::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
+
class RuboCop::Cop::Style::NestedModifier < ::RuboCop::Cop::Base
include ::RuboCop::Cop::RangeHelp
extend ::RuboCop::Cop::AutoCorrector
@@ -11345,6 +11363,7 @@ class RuboCop::Cop::Style::StringConcatenation < ::RuboCop::Cop::Base
def corrected_ancestor?(node); end
def find_topmost_plus_node(node); end
def handle_quotes(parts); end
+ def heredoc?(node); end
def line_end_concatenation?(node); end
def offensive_for_mode?(receiver_node); end
def plus_node?(node); end
@@ -13318,7 +13337,7 @@ class RuboCop::Runner
def warm_cache(target_files); end
end
-class RuboCop::Runner::InfiniteCorrectionLoop < ::RuntimeError
+class RuboCop::Runner::InfiniteCorrectionLoop < ::StandardError
def initialize(path, offenses_by_iteration, loop_start: T.unsafe(nil)); end
def offenses; end | false |
Other | Homebrew | brew | f4b70185a5cdc0a738fff8a20a49bcfc5b92c9c7.json | Update RBI files for bootsnap. | Library/Homebrew/sorbet/rbi/gems/bootsnap@1.11.1.rbi | @@ -18,6 +18,7 @@ module Bootsnap
def log!; end
def logger; end
def logger=(logger); end
+ def rb_get_path(fname); end
def setup(cache_dir:, development_mode: T.unsafe(nil), load_path_cache: T.unsafe(nil), autoload_paths_cache: T.unsafe(nil), disable_trace: T.unsafe(nil), compile_cache_iseq: T.unsafe(nil), compile_cache_yaml: T.unsafe(nil), compile_cache_json: T.unsafe(nil)); end
end
end
@@ -52,7 +53,6 @@ module Bootsnap::LoadPathCache
class << self
def load_path_cache; end
def loaded_features_index; end
- def realpath_cache; end
def setup(cache_path:, development_mode:); end
def supported?; end
end
@@ -150,14 +150,15 @@ end
Bootsnap::LoadPathCache::LoadedFeaturesIndex::STRIP_EXTENSION = T.let(T.unsafe(nil), Regexp)
class Bootsnap::LoadPathCache::Path
- def initialize(path); end
+ def initialize(path, real: T.unsafe(nil)); end
def entries_and_dirs(store); end
def expanded_path; end
def non_directory?; end
def path; end
def relative?; end
def stable?; end
+ def to_realpath; end
def volatile?; end
private
@@ -184,18 +185,6 @@ Bootsnap::LoadPathCache::PathScanner::ALTERNATIVE_NATIVE_EXTENSIONS_PATTERN = T.
Bootsnap::LoadPathCache::PathScanner::BUNDLE_PATH = T.let(T.unsafe(nil), String)
Bootsnap::LoadPathCache::PathScanner::NORMALIZE_NATIVE_EXTENSIONS = T.let(T.unsafe(nil), TrueClass)
Bootsnap::LoadPathCache::PathScanner::REQUIRABLE_EXTENSIONS = T.let(T.unsafe(nil), Array)
-
-class Bootsnap::LoadPathCache::RealpathCache
- def initialize; end
-
- def call(*key); end
-
- private
-
- def find_file(name); end
- def realpath(caller_location, path); end
-end
-
Bootsnap::LoadPathCache::SLASH = T.let(T.unsafe(nil), String)
class Bootsnap::LoadPathCache::Store
@@ -212,6 +201,8 @@ class Bootsnap::LoadPathCache::Store
def default_data; end
def dump_data; end
def load_data; end
+ def mark_for_mutation!; end
+ def mkdir_p(path); end
end
Bootsnap::LoadPathCache::Store::CURRENT_VERSION = T.let(T.unsafe(nil), String) | false |
Other | Homebrew | brew | 7f1a208a22989ee2096cd8fb72248d160ff69602.json | Update RBI files for rubocop-performance. | Library/Homebrew/sorbet/rbi/gems/rubocop-performance@1.13.3.rbi | @@ -405,8 +405,8 @@ class RuboCop::Cop::Performance::MapCompact < ::RuboCop::Cop::Base
def compact_method_with_final_newline_range(compact_method_range); end
def invoke_method_after_map_compact_on_same_line?(compact_node, chained_method); end
- def map_method_and_compact_method_on_same_line?(compact_node); end
- def remove_compact_method(corrector, compact_node, chained_method); end
+ def map_method_and_compact_method_on_same_line?(map_node, compact_node); end
+ def remove_compact_method(corrector, map_node, compact_node, chained_method); end
end
RuboCop::Cop::Performance::MapCompact::MSG = T.let(T.unsafe(nil), String) | false |
Other | Homebrew | brew | 6642801b04b7522d6f89599660e448e49b1411f6.json | Show total disk space freed on cleanup. | Library/Homebrew/cleanup.rb | @@ -363,15 +363,13 @@ def cleanup_path(path)
return unless path.exist?
return unless @cleaned_up_paths.add?(path)
- disk_usage = path.disk_usage
+ @disk_cleanup_size += path.disk_usage
if dry_run?
puts "Would remove: #{path} (#{path.abv})"
- @disk_cleanup_size += disk_usage
else
puts "Removing: #{path}... (#{path.abv})"
yield
- @disk_cleanup_size += disk_usage - path.disk_usage
end
end
| false |
Other | Homebrew | brew | ff54a799336ff99ee1a747a5248f3d7d18a6657a.json | remove useless attr_writer | Library/Homebrew/formula_installer.rb | @@ -41,9 +41,6 @@ class FormulaInstaller
attr_predicate :force_bottle?, :ignore_deps?, :only_deps?, :interactive?, :git?, :force?, :overwrite?, :keep_tmp?
attr_predicate :verbose?, :debug?, :quiet?
- # TODO: Remove when removed from `test-bot`.
- attr_writer :build_bottle
-
def initialize(
formula,
link_keg: false, | false |
Other | Homebrew | brew | 4db0b9963c401296f7099118ac0a36fce8cf3114.json | test/spec_helper: prevent stdin trashing | Library/Homebrew/test/spec_helper.rb | @@ -214,12 +214,14 @@ def find_files
@__stdout = $stdout.clone
@__stderr = $stderr.clone
+ @__stdin = $stdin.clone
begin
if (example.metadata.keys & [:focus, :byebug]).empty? && !ENV.key?("HOMEBREW_VERBOSE_TESTS")
$stdout.reopen(File::NULL)
$stderr.reopen(File::NULL)
end
+ $stdin.reopen(File::NULL)
begin
timeout = example.metadata.fetch(:timeout, 60)
@@ -236,8 +238,10 @@ def find_files
$stdout.reopen(@__stdout)
$stderr.reopen(@__stderr)
+ $stdin.reopen(@__stdin)
@__stdout.close
@__stderr.close
+ @__stdin.close
Formulary.clear_cache
Tap.clear_cache | false |
Other | Homebrew | brew | a2f95125f0828e5c8801000ef459a6dc9e180ef1.json | test/os/mac/dependency_collector_spec: fix svn test on older macOS | Library/Homebrew/test/os/mac/dependency_collector_spec.rb | @@ -35,10 +35,6 @@
specify "Resource dependency from a Subversion URL" do
resource = Resource.new
resource.url("svn://brew.sh/foo/bar")
- if MacOS.version < :catalina
- expect(collector.add(resource)).to be_nil
- else
- expect(collector.add(resource)).not_to be_nil
- end
+ expect(collector.add(resource)).to eq(Dependency.new("subversion", [:build, :test]))
end
end | false |
Other | Homebrew | brew | 84632598a0d07782ce3f9f3a51914c174924d511.json | utils/github: Add a `branch_exists?` method
- I wrote this as part of
https://github.com/issyl0/homebrew-maintenance-utils/blob/main/cmd/find-invalid-head-branches.rb,
as I needed to check if a branch exists on a repo, and thought I'd properly add
it in case it's useful to others. | Library/Homebrew/utils/github.rb | @@ -80,6 +80,13 @@ def write_access?(repo, user = nil)
["admin", "write"].include?(permission(repo, user)["permission"])
end
+ def branch_exists?(user, repo, branch)
+ API.open_rest("#{API_URL}/repos/#{user}/#{repo}/branches/#{branch}")
+ true
+ rescue API::HTTPNotFoundError
+ false
+ end
+
def pull_requests(repo, **options)
url = "#{API_URL}/repos/#{repo}/pulls?#{URI.encode_www_form(options)}"
API.open_rest(url) | false |
Other | Homebrew | brew | 62e1f41f9bd5ab215f1451dbb81e93caa0f4d95a.json | Revert "keg_relocate.rb: create generic codesign_patched_binary"
This reverts commit 39fc3862538fa5226f4d17e94f1e1c74b7eadeb2. | Library/Homebrew/keg_relocate.rb | @@ -214,8 +214,6 @@ def each_unique_binary_file(&block)
end
end
- def codesign_patched_binary(_binary_file); end
-
def lib
path/"lib"
end | false |
Other | Homebrew | brew | 08be8e45acc79b1219e385a97e7f1a65d73a9602.json | Update RBI files for rbi. | Library/Homebrew/sorbet/rbi/gems/rbi@0.0.12.rbi | @@ -1,1685 +0,0 @@
-# typed: true
-
-# DO NOT EDIT MANUALLY
-# This is an autogenerated file for types exported from the `rbi` gem.
-# Please instead update this file by running `bin/tapioca gem rbi`.
-
-module RBI; end
-
-class RBI::ASTVisitor
- abstract!
-
- def initialize(*args, &blk); end
-
- sig { abstract.params(node: T.nilable(AST::Node)).void }
- def visit(node); end
-
- sig { params(nodes: T::Array[AST::Node]).void }
- def visit_all(nodes); end
-
- private
-
- sig { params(node: AST::Node).returns(String) }
- def parse_expr(node); end
-
- sig { params(node: AST::Node).returns(String) }
- def parse_name(node); end
-end
-
-class RBI::Arg < ::RBI::Node
- sig { params(value: String, loc: T.nilable(RBI::Loc)).void }
- def initialize(value, loc: T.unsafe(nil)); end
-
- sig { params(other: T.nilable(Object)).returns(T::Boolean) }
- def ==(other); end
-
- sig { override.params(v: RBI::Printer).void }
- def accept_printer(v); end
-
- sig { returns(String) }
- def to_s; end
-
- sig { returns(String) }
- def value; end
-end
-
-class RBI::Attr < ::RBI::NodeWithComments
- include ::RBI::Indexable
-
- abstract!
-
- sig { params(name: Symbol, names: T::Array[Symbol], visibility: RBI::Visibility, sigs: T::Array[RBI::Sig], loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment]).void }
- def initialize(name, names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil)); end
-
- sig { override.params(v: RBI::Printer).void }
- def accept_printer(v); end
-
- sig { override.params(other: RBI::Node).returns(T::Boolean) }
- def compatible_with?(other); end
-
- sig { abstract.returns(T::Array[String]) }
- def fully_qualified_names; end
-
- sig { override.returns(T::Array[String]) }
- def index_ids; end
-
- sig { override.params(other: RBI::Node).void }
- def merge_with(other); end
-
- sig { returns(T::Array[Symbol]) }
- def names; end
-
- def names=(_arg0); end
-
- sig { override.returns(T::Boolean) }
- def oneline?; end
-
- sig { returns(T::Array[RBI::Sig]) }
- def sigs; end
-
- sig { returns(RBI::Visibility) }
- def visibility; end
-
- def visibility=(_arg0); end
-end
-
-class RBI::AttrAccessor < ::RBI::Attr
- sig { params(name: Symbol, names: Symbol, visibility: RBI::Visibility, sigs: T::Array[RBI::Sig], loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::AttrAccessor).void)).void }
- def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
-
- sig { override.params(other: RBI::Node).returns(T::Boolean) }
- def compatible_with?(other); end
-
- sig { override.returns(T::Array[String]) }
- def fully_qualified_names; end
-
- sig { override.returns(String) }
- def to_s; end
-end
-
-class RBI::AttrReader < ::RBI::Attr
- sig { params(name: Symbol, names: Symbol, visibility: RBI::Visibility, sigs: T::Array[RBI::Sig], loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::AttrReader).void)).void }
- def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
-
- sig { override.params(other: RBI::Node).returns(T::Boolean) }
- def compatible_with?(other); end
-
- sig { override.returns(T::Array[String]) }
- def fully_qualified_names; end
-
- sig { override.returns(String) }
- def to_s; end
-end
-
-class RBI::AttrWriter < ::RBI::Attr
- sig { params(name: Symbol, names: Symbol, visibility: RBI::Visibility, sigs: T::Array[RBI::Sig], loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::AttrWriter).void)).void }
- def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
-
- sig { override.params(other: RBI::Node).returns(T::Boolean) }
- def compatible_with?(other); end
-
- sig { override.returns(T::Array[String]) }
- def fully_qualified_names; end
-
- sig { override.returns(String) }
- def to_s; end
-end
-
-class RBI::BlankLine < ::RBI::Comment
- sig { params(loc: T.nilable(RBI::Loc)).void }
- def initialize(loc: T.unsafe(nil)); end
-
- sig { override.params(v: RBI::Printer).void }
- def accept_printer(v); end
-end
-
-class RBI::BlockParam < ::RBI::Param
- sig { params(name: String, loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::BlockParam).void)).void }
- def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
-
- sig { params(other: T.nilable(Object)).returns(T::Boolean) }
- def ==(other); end
-
- sig { override.params(v: RBI::Printer).void }
- def accept_printer(v); end
-
- sig { override.params(v: RBI::Printer, last: T::Boolean).void }
- def print_comment_leading_space(v, last:); end
-
- sig { override.returns(String) }
- def to_s; end
-end
-
-class RBI::Class < ::RBI::Scope
- sig { params(name: String, superclass_name: T.nilable(String), loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::Class).void)).void }
- def initialize(name, superclass_name: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
-
- sig { override.params(other: RBI::Node).returns(T::Boolean) }
- def compatible_with?(other); end
-
- sig { override.returns(String) }
- def fully_qualified_name; end
-
- sig { returns(String) }
- def name; end
-
- def name=(_arg0); end
-
- sig { override.params(v: RBI::Printer).void }
- def print_header(v); end
-
- sig { returns(T.nilable(String)) }
- def superclass_name; end
-
- def superclass_name=(_arg0); end
-end
-
-class RBI::Comment < ::RBI::Node
- sig { params(text: String, loc: T.nilable(RBI::Loc)).void }
- def initialize(text, loc: T.unsafe(nil)); end
-
- sig { params(other: Object).returns(T::Boolean) }
- def ==(other); end
-
- sig { override.params(v: RBI::Printer).void }
- def accept_printer(v); end
-
- sig { returns(String) }
- def text; end
-
- def text=(_arg0); end
-end
-
-class RBI::ConflictTree < ::RBI::Tree
- sig { params(left_name: String, right_name: String).void }
- def initialize(left_name: T.unsafe(nil), right_name: T.unsafe(nil)); end
-
- sig { override.params(v: RBI::Printer).void }
- def accept_printer(v); end
-
- sig { returns(RBI::Tree) }
- def left; end
-
- def right; end
-end
-
-class RBI::Const < ::RBI::NodeWithComments
- include ::RBI::Indexable
-
- sig { params(name: String, value: String, loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::Const).void)).void }
- def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
-
- sig { override.params(v: RBI::Printer).void }
- def accept_printer(v); end
-
- sig { override.params(other: RBI::Node).returns(T::Boolean) }
- def compatible_with?(other); end
-
- sig { returns(String) }
- def fully_qualified_name; end
-
- sig { override.returns(T::Array[String]) }
- def index_ids; end
-
- sig { returns(String) }
- def name; end
-
- sig { override.returns(String) }
- def to_s; end
-
- def value; end
-end
-
-class RBI::ConstBuilder < ::RBI::ASTVisitor
- sig { void }
- def initialize; end
-
- sig { returns(T::Array[String]) }
- def names; end
-
- def names=(_arg0); end
-
- sig { override.params(node: T.nilable(AST::Node)).void }
- def visit(node); end
-
- class << self
- sig { params(node: T.nilable(AST::Node)).returns(T.nilable(String)) }
- def visit(node); end
- end
-end
-
-class RBI::Error < ::StandardError; end
-
-class RBI::Extend < ::RBI::Mixin
- include ::RBI::Indexable
-
- sig { params(name: String, names: String, loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::Extend).void)).void }
- def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
-
- sig { override.params(other: RBI::Node).returns(T::Boolean) }
- def compatible_with?(other); end
-
- sig { override.returns(T::Array[String]) }
- def index_ids; end
-
- sig { override.returns(String) }
- def to_s; end
-end
-
-class RBI::File
- sig { params(strictness: T.nilable(String), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(file: RBI::File).void)).void }
- def initialize(strictness: T.unsafe(nil), comments: T.unsafe(nil), &block); end
-
- sig { params(node: RBI::Node).void }
- def <<(node); end
-
- sig { params(v: RBI::Printer).void }
- def accept_printer(v); end
-
- sig { returns(T::Array[RBI::Comment]) }
- def comments; end
-
- def comments=(_arg0); end
-
- sig { returns(T::Boolean) }
- def empty?; end
-
- sig { params(out: T.any(IO, StringIO), indent: Integer, print_locs: T::Boolean, max_line_length: T.nilable(Integer)).void }
- def print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end
-
- sig { returns(RBI::Tree) }
- def root; end
-
- def root=(_arg0); end
-
- sig { void }
- def set_empty_body_content; end
-
- sig { params(command: String, reason: T.nilable(String), display_heading: T::Boolean).void }
- def set_file_header(command, reason: T.unsafe(nil), display_heading: T.unsafe(nil)); end
-
- sig { returns(T.nilable(String)) }
- def strictness; end
-
- def strictness=(_arg0); end
-
- sig { params(indent: Integer, print_locs: T::Boolean, max_line_length: T.nilable(Integer)).returns(String) }
- def string(indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end
-
- sig { void }
- def transform_rbi!; end
-
- sig { returns(String) }
- def transformed_string; end
-end
-
-class RBI::Formatter
- sig { params(add_sig_templates: T::Boolean, group_nodes: T::Boolean, max_line_length: T.nilable(Integer), nest_singleton_methods: T::Boolean, nest_non_public_methods: T::Boolean, sort_nodes: T::Boolean).void }
- def initialize(add_sig_templates: T.unsafe(nil), group_nodes: T.unsafe(nil), max_line_length: T.unsafe(nil), nest_singleton_methods: T.unsafe(nil), nest_non_public_methods: T.unsafe(nil), sort_nodes: T.unsafe(nil)); end
-
- sig { returns(T::Boolean) }
- def add_sig_templates; end
-
- def add_sig_templates=(_arg0); end
-
- sig { params(file: RBI::File).void }
- def format_file(file); end
-
- sig { params(tree: RBI::Tree).void }
- def format_tree(tree); end
-
- def group_nodes; end
- def group_nodes=(_arg0); end
-
- sig { returns(T.nilable(Integer)) }
- def max_line_length; end
-
- def max_line_length=(_arg0); end
- def nest_non_public_methods; end
- def nest_non_public_methods=(_arg0); end
- def nest_singleton_methods; end
- def nest_singleton_methods=(_arg0); end
-
- sig { params(file: RBI::File).returns(String) }
- def print_file(file); end
-
- sig { params(tree: RBI::Tree).returns(String) }
- def print_tree(tree); end
-
- def sort_nodes; end
- def sort_nodes=(_arg0); end
-end
-
-class RBI::Group < ::RBI::Tree
- sig { params(kind: RBI::Group::Kind).void }
- def initialize(kind); end
-
- sig { override.params(v: RBI::Printer).void }
- def accept_printer(v); end
-
- sig { returns(RBI::Group::Kind) }
- def kind; end
-end
-
-class RBI::Group::Kind < ::T::Enum
- enums do
- Mixins = new
- RequiredAncestors = new
- Helpers = new
- TypeMembers = new
- MixesInClassMethods = new
- Sends = new
- Attrs = new
- TStructFields = new
- TEnums = new
- Inits = new
- Methods = new
- SingletonClasses = new
- Consts = new
- end
-end
-
-class RBI::Helper < ::RBI::NodeWithComments
- include ::RBI::Indexable
-
- sig { params(name: String, loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::Helper).void)).void }
- def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
-
- sig { override.params(v: RBI::Printer).void }
- def accept_printer(v); end
-
- sig { override.params(other: RBI::Node).returns(T::Boolean) }
- def compatible_with?(other); end
-
- sig { override.returns(T::Array[String]) }
- def index_ids; end
-
- sig { returns(String) }
- def name; end
-
- sig { override.returns(String) }
- def to_s; end
-end
-
-class RBI::Include < ::RBI::Mixin
- include ::RBI::Indexable
-
- sig { params(name: String, names: String, loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::Include).void)).void }
- def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
-
- sig { override.params(other: RBI::Node).returns(T::Boolean) }
- def compatible_with?(other); end
-
- sig { override.returns(T::Array[String]) }
- def index_ids; end
-
- sig { override.returns(String) }
- def to_s; end
-end
-
-class RBI::Index < ::RBI::Visitor
- sig { void }
- def initialize; end
-
- sig { params(id: String).returns(T::Array[RBI::Node]) }
- def [](id); end
-
- sig { params(nodes: RBI::Node).void }
- def index(*nodes); end
-
- sig { returns(T::Array[String]) }
- def keys; end
-
- sig { override.params(node: T.nilable(RBI::Node)).void }
- def visit(node); end
-
- private
-
- sig { params(node: T.all(RBI::Indexable, RBI::Node)).void }
- def index_node(node); end
-
- class << self
- sig { params(node: RBI::Node).returns(RBI::Index) }
- def index(*node); end
- end
-end
-
-module RBI::Indexable
- interface!
-
- sig { abstract.returns(T::Array[String]) }
- def index_ids; end
-end
-
-class RBI::KwArg < ::RBI::Arg
- sig { params(keyword: String, value: String, loc: T.nilable(RBI::Loc)).void }
- def initialize(keyword, value, loc: T.unsafe(nil)); end
-
- sig { params(other: T.nilable(Object)).returns(T::Boolean) }
- def ==(other); end
-
- sig { override.params(v: RBI::Printer).void }
- def accept_printer(v); end
-
- sig { returns(String) }
- def keyword; end
-
- sig { returns(String) }
- def to_s; end
-end
-
-class RBI::KwOptParam < ::RBI::Param
- sig { params(name: String, value: String, loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::KwOptParam).void)).void }
- def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
-
- sig { params(other: T.nilable(Object)).returns(T::Boolean) }
- def ==(other); end
-
- sig { override.params(v: RBI::Printer).void }
- def accept_printer(v); end
-
- sig { override.params(v: RBI::Printer, last: T::Boolean).void }
- def print_comment_leading_space(v, last:); end
-
- sig { override.returns(String) }
- def to_s; end
-
- sig { returns(String) }
- def value; end
-end
-
-class RBI::KwParam < ::RBI::Param
- sig { params(name: String, loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::KwParam).void)).void }
- def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
-
- sig { params(other: T.nilable(Object)).returns(T::Boolean) }
- def ==(other); end
-
- sig { override.params(v: RBI::Printer).void }
- def accept_printer(v); end
-
- sig { override.params(v: RBI::Printer, last: T::Boolean).void }
- def print_comment_leading_space(v, last:); end
-
- sig { override.returns(String) }
- def to_s; end
-end
-
-class RBI::KwRestParam < ::RBI::Param
- sig { params(name: String, loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::KwRestParam).void)).void }
- def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
-
- sig { params(other: T.nilable(Object)).returns(T::Boolean) }
- def ==(other); end
-
- sig { override.params(v: RBI::Printer).void }
- def accept_printer(v); end
-
- sig { override.params(v: RBI::Printer, last: T::Boolean).void }
- def print_comment_leading_space(v, last:); end
-
- sig { override.returns(String) }
- def to_s; end
-end
-
-class RBI::Loc
- sig { params(file: T.nilable(String), begin_line: T.nilable(Integer), end_line: T.nilable(Integer), begin_column: T.nilable(Integer), end_column: T.nilable(Integer)).void }
- def initialize(file: T.unsafe(nil), begin_line: T.unsafe(nil), end_line: T.unsafe(nil), begin_column: T.unsafe(nil), end_column: T.unsafe(nil)); end
-
- def begin_column; end
-
- sig { returns(T.nilable(Integer)) }
- def begin_line; end
-
- def end_column; end
- def end_line; end
-
- sig { returns(T.nilable(String)) }
- def file; end
-
- sig { returns(String) }
- def to_s; end
-
- class << self
- sig { params(file: String, ast_loc: T.any(Parser::Source::Map, Parser::Source::Range)).returns(RBI::Loc) }
- def from_ast_loc(file, ast_loc); end
- end
-end
-
-class RBI::MergeTree < ::RBI::Tree
- sig { params(loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], conflicts: T::Array[RBI::Rewriters::Merge::Conflict], block: T.nilable(T.proc.params(node: RBI::Tree).void)).void }
- def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), conflicts: T.unsafe(nil), &block); end
-
- sig { returns(T::Array[RBI::Rewriters::Merge::Conflict]) }
- def conflicts; end
-end
-
-class RBI::Method < ::RBI::NodeWithComments
- include ::RBI::Indexable
-
- sig { params(name: String, params: T::Array[RBI::Param], is_singleton: T::Boolean, visibility: RBI::Visibility, sigs: T::Array[RBI::Sig], loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::Method).void)).void }
- def initialize(name, params: T.unsafe(nil), is_singleton: T.unsafe(nil), visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
-
- sig { params(param: RBI::Param).void }
- def <<(param); end
-
- sig { override.params(v: RBI::Printer).void }
- def accept_printer(v); end
-
- sig { override.params(other: RBI::Node).returns(T::Boolean) }
- def compatible_with?(other); end
-
- sig { returns(String) }
- def fully_qualified_name; end
-
- sig { override.returns(T::Array[String]) }
- def index_ids; end
-
- sig { returns(T::Boolean) }
- def inline_params?; end
-
- sig { returns(T::Boolean) }
- def is_singleton; end
-
- def is_singleton=(_arg0); end
-
- sig { override.params(other: RBI::Node).void }
- def merge_with(other); end
-
- sig { returns(String) }
- def name; end
-
- def name=(_arg0); end
-
- sig { override.returns(T::Boolean) }
- def oneline?; end
-
- sig { returns(T::Array[RBI::Param]) }
- def params; end
-
- sig { returns(T::Array[RBI::Sig]) }
- def sigs; end
-
- def sigs=(_arg0); end
-
- sig { override.returns(String) }
- def to_s; end
-
- sig { returns(RBI::Visibility) }
- def visibility; end
-
- def visibility=(_arg0); end
-end
-
-class RBI::MixesInClassMethods < ::RBI::Mixin
- include ::RBI::Indexable
-
- sig { params(name: String, names: String, loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::MixesInClassMethods).void)).void }
- def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
-
- sig { override.params(other: RBI::Node).returns(T::Boolean) }
- def compatible_with?(other); end
-
- sig { override.returns(T::Array[String]) }
- def index_ids; end
-
- sig { override.returns(String) }
- def to_s; end
-end
-
-class RBI::Mixin < ::RBI::NodeWithComments
- abstract!
-
- sig { params(name: String, names: T::Array[String], loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment]).void }
- def initialize(name, names, loc: T.unsafe(nil), comments: T.unsafe(nil)); end
-
- sig { override.params(v: RBI::Printer).void }
- def accept_printer(v); end
-
- sig { override.params(other: RBI::Node).returns(T::Boolean) }
- def compatible_with?(other); end
-
- sig { returns(T::Array[String]) }
- def names; end
-
- def names=(_arg0); end
-end
-
-class RBI::Module < ::RBI::Scope
- sig { params(name: String, loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::Module).void)).void }
- def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
-
- sig { override.params(other: RBI::Node).returns(T::Boolean) }
- def compatible_with?(other); end
-
- sig { override.returns(String) }
- def fully_qualified_name; end
-
- sig { returns(String) }
- def name; end
-
- def name=(_arg0); end
-
- sig { override.params(v: RBI::Printer).void }
- def print_header(v); end
-end
-
-class RBI::Node
- abstract!
-
- sig { params(loc: T.nilable(RBI::Loc)).void }
- def initialize(loc: T.unsafe(nil)); end
-
- sig { abstract.params(v: RBI::Printer).void }
- def accept_printer(v); end
-
- sig { params(_other: RBI::Node).returns(T::Boolean) }
- def compatible_with?(_other); end
-
- sig { void }
- def detach; end
-
- sig { returns(RBI::Group::Kind) }
- def group_kind; end
-
- sig { returns(T.nilable(RBI::Loc)) }
- def loc; end
-
- def loc=(_arg0); end
-
- sig { params(other: RBI::Node).void }
- def merge_with(other); end
-
- sig { returns(T::Boolean) }
- def oneline?; end
-
- sig { returns(T.nilable(RBI::ConflictTree)) }
- def parent_conflict_tree; end
-
- sig { returns(T.nilable(RBI::Scope)) }
- def parent_scope; end
-
- sig { returns(T.nilable(RBI::Tree)) }
- def parent_tree; end
-
- def parent_tree=(_arg0); end
-
- sig { params(out: T.any(IO, StringIO), indent: Integer, print_locs: T::Boolean, max_line_length: T.nilable(Integer)).void }
- def print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end
-
- sig { params(v: RBI::Printer).void }
- def print_blank_line_before(v); end
-
- sig { params(node: RBI::Node).void }
- def replace(node); end
-
- sig { params(indent: Integer, print_locs: T::Boolean, max_line_length: T.nilable(Integer)).returns(String) }
- def string(indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end
-end
-
-class RBI::NodeWithComments < ::RBI::Node
- abstract!
-
- sig { params(loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment]).void }
- def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil)); end
-
- sig { returns(T::Array[String]) }
- def annotations; end
-
- sig { returns(T::Array[RBI::Comment]) }
- def comments; end
-
- def comments=(_arg0); end
-
- sig { override.params(other: RBI::Node).void }
- def merge_with(other); end
-
- sig { override.returns(T::Boolean) }
- def oneline?; end
-end
-
-class RBI::OptParam < ::RBI::Param
- sig { params(name: String, value: String, loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::OptParam).void)).void }
- def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
-
- sig { params(other: T.nilable(Object)).returns(T::Boolean) }
- def ==(other); end
-
- sig { override.params(v: RBI::Printer).void }
- def accept_printer(v); end
-
- sig { override.params(v: RBI::Printer, last: T::Boolean).void }
- def print_comment_leading_space(v, last:); end
-
- sig { returns(String) }
- def value; end
-end
-
-class RBI::Param < ::RBI::NodeWithComments
- abstract!
-
- sig { params(name: String, loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment]).void }
- def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil)); end
-
- sig { override.params(v: RBI::Printer).void }
- def accept_printer(v); end
-
- sig { returns(T::Array[String]) }
- def comments_lines; end
-
- sig { returns(String) }
- def name; end
-
- sig { params(v: RBI::Printer, last: T::Boolean).void }
- def print_comment_leading_space(v, last:); end
-
- sig { override.returns(String) }
- def to_s; end
-end
-
-class RBI::ParseError < ::StandardError
- sig { params(message: String, location: RBI::Loc).void }
- def initialize(message, location); end
-
- sig { returns(RBI::Loc) }
- def location; end
-end
-
-class RBI::Parser
- sig { void }
- def initialize; end
-
- sig { params(path: String).returns(RBI::Tree) }
- def parse_file(path); end
-
- sig { params(string: String).returns(RBI::Tree) }
- def parse_string(string); end
-
- private
-
- sig { params(content: String, file: String).returns(RBI::Tree) }
- def parse(content, file:); end
-
- class << self
- sig { params(path: String).returns(RBI::Tree) }
- def parse_file(path); end
-
- sig { params(paths: T::Array[String]).returns(T::Array[RBI::Tree]) }
- def parse_files(paths); end
-
- sig { params(string: String).returns(RBI::Tree) }
- def parse_string(string); end
-
- sig { params(strings: T::Array[String]).returns(T::Array[RBI::Tree]) }
- def parse_strings(strings); end
- end
-end
-
-class RBI::Printer < ::RBI::Visitor
- sig { params(out: T.any(IO, StringIO), indent: Integer, print_locs: T::Boolean, max_line_length: T.nilable(Integer)).void }
- def initialize(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end
-
- sig { returns(Integer) }
- def current_indent; end
-
- sig { void }
- def dedent; end
-
- def in_visibility_group; end
- def in_visibility_group=(_arg0); end
-
- sig { void }
- def indent; end
-
- sig { returns(T.nilable(Integer)) }
- def max_line_length; end
-
- sig { returns(T.nilable(RBI::Node)) }
- def previous_node; end
-
- sig { params(string: String).void }
- def print(string); end
-
- sig { returns(T::Boolean) }
- def print_locs; end
-
- def print_locs=(_arg0); end
-
- sig { params(string: String).void }
- def printl(string); end
-
- sig { params(string: T.nilable(String)).void }
- def printn(string = T.unsafe(nil)); end
-
- sig { params(string: T.nilable(String)).void }
- def printt(string = T.unsafe(nil)); end
-
- sig { override.params(node: T.nilable(RBI::Node)).void }
- def visit(node); end
-
- sig { override.params(nodes: T::Array[RBI::Node]).void }
- def visit_all(nodes); end
-
- sig { params(file: RBI::File).void }
- def visit_file(file); end
-end
-
-class RBI::Private < ::RBI::Visibility
- sig { params(loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::Private).void)).void }
- def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
-end
-
-class RBI::Protected < ::RBI::Visibility
- sig { params(loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::Protected).void)).void }
- def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
-end
-
-class RBI::Public < ::RBI::Visibility
- sig { params(loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::Public).void)).void }
- def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
-end
-
-class RBI::ReqParam < ::RBI::Param
- sig { params(name: String, loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::ReqParam).void)).void }
- def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
-
- sig { params(other: T.nilable(Object)).returns(T::Boolean) }
- def ==(other); end
-end
-
-class RBI::RequiresAncestor < ::RBI::NodeWithComments
- include ::RBI::Indexable
-
- sig { params(name: String, loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment]).void }
- def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil)); end
-
- sig { override.params(v: RBI::Printer).void }
- def accept_printer(v); end
-
- sig { override.returns(T::Array[String]) }
- def index_ids; end
-
- sig { returns(String) }
- def name; end
-
- sig { override.returns(String) }
- def to_s; end
-end
-
-class RBI::RestParam < ::RBI::Param
- sig { params(name: String, loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::RestParam).void)).void }
- def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
-
- sig { params(other: T.nilable(Object)).returns(T::Boolean) }
- def ==(other); end
-
- sig { override.params(v: RBI::Printer).void }
- def accept_printer(v); end
-
- sig { override.params(v: RBI::Printer, last: T::Boolean).void }
- def print_comment_leading_space(v, last:); end
-
- sig { override.returns(String) }
- def to_s; end
-end
-
-module RBI::Rewriters; end
-
-class RBI::Rewriters::AddSigTemplates < ::RBI::Visitor
- sig { params(with_todo_comment: T::Boolean).void }
- def initialize(with_todo_comment: T.unsafe(nil)); end
-
- sig { override.params(node: T.nilable(RBI::Node)).void }
- def visit(node); end
-
- private
-
- sig { params(attr: RBI::Attr).void }
- def add_attr_sig(attr); end
-
- sig { params(method: RBI::Method).void }
- def add_method_sig(method); end
-
- sig { params(node: RBI::NodeWithComments).void }
- def add_todo_comment(node); end
-end
-
-class RBI::Rewriters::Annotate < ::RBI::Visitor
- sig { params(annotation: String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void }
- def initialize(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end
-
- sig { override.params(node: T.nilable(RBI::Node)).void }
- def visit(node); end
-
- private
-
- sig { params(node: RBI::NodeWithComments).void }
- def annotate_node(node); end
-
- sig { params(node: RBI::Node).returns(T::Boolean) }
- def root?(node); end
-end
-
-class RBI::Rewriters::Deannotate < ::RBI::Visitor
- sig { params(annotation: String).void }
- def initialize(annotation); end
-
- sig { override.params(node: T.nilable(RBI::Node)).void }
- def visit(node); end
-
- private
-
- sig { params(node: RBI::NodeWithComments).void }
- def deannotate_node(node); end
-end
-
-class RBI::Rewriters::GroupNodes < ::RBI::Visitor
- sig { override.params(node: T.nilable(RBI::Node)).void }
- def visit(node); end
-end
-
-class RBI::Rewriters::Merge
- sig { params(left_name: String, right_name: String, keep: RBI::Rewriters::Merge::Keep).void }
- def initialize(left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end
-
- sig { params(tree: RBI::Tree).void }
- def merge(tree); end
-
- sig { returns(RBI::MergeTree) }
- def tree; end
-
- class << self
- sig { params(left: RBI::Tree, right: RBI::Tree, left_name: String, right_name: String, keep: RBI::Rewriters::Merge::Keep).returns(RBI::MergeTree) }
- def merge_trees(left, right, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end
- end
-end
-
-class RBI::Rewriters::Merge::Conflict < ::T::Struct
- const :left, RBI::Node
- const :left_name, String
- const :right, RBI::Node
- const :right_name, String
-
- sig { returns(String) }
- def to_s; end
-
- class << self
- def inherited(s); end
- end
-end
-
-class RBI::Rewriters::Merge::ConflictTreeMerger < ::RBI::Visitor
- sig { override.params(node: T.nilable(RBI::Node)).void }
- def visit(node); end
-
- sig { override.params(nodes: T::Array[RBI::Node]).void }
- def visit_all(nodes); end
-
- private
-
- sig { params(left: RBI::Tree, right: RBI::Tree).void }
- def merge_conflict_trees(left, right); end
-end
-
-class RBI::Rewriters::Merge::Keep < ::T::Enum
- enums do
- NONE = new
- LEFT = new
- RIGHT = new
- end
-end
-
-class RBI::Rewriters::Merge::TreeMerger < ::RBI::Visitor
- sig { params(output: RBI::Tree, left_name: String, right_name: String, keep: RBI::Rewriters::Merge::Keep).void }
- def initialize(output, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end
-
- sig { returns(T::Array[RBI::Rewriters::Merge::Conflict]) }
- def conflicts; end
-
- sig { override.params(node: T.nilable(RBI::Node)).void }
- def visit(node); end
-
- private
-
- sig { returns(RBI::Tree) }
- def current_scope; end
-
- sig { params(left: RBI::Scope, right: RBI::Scope).void }
- def make_conflict_scope(left, right); end
-
- sig { params(left: RBI::Node, right: RBI::Node).void }
- def make_conflict_tree(left, right); end
-
- sig { params(node: RBI::Node).returns(T.nilable(RBI::Node)) }
- def previous_definition(node); end
-
- sig { params(left: RBI::Scope, right: RBI::Scope).returns(RBI::Scope) }
- def replace_scope_header(left, right); end
-end
-
-class RBI::Rewriters::NestNonPublicMethods < ::RBI::Visitor
- sig { override.params(node: T.nilable(RBI::Node)).void }
- def visit(node); end
-end
-
-class RBI::Rewriters::NestSingletonMethods < ::RBI::Visitor
- sig { override.params(node: T.nilable(RBI::Node)).void }
- def visit(node); end
-end
-
-class RBI::Rewriters::RemoveKnownDefinitions < ::RBI::Visitor
- sig { params(index: RBI::Index).void }
- def initialize(index); end
-
- sig { returns(T::Array[RBI::Rewriters::RemoveKnownDefinitions::Operation]) }
- def operations; end
-
- sig { override.params(node: T.nilable(RBI::Node)).void }
- def visit(node); end
-
- sig { params(nodes: T::Array[RBI::Node]).void }
- def visit_all(nodes); end
-
- private
-
- sig { params(node: RBI::Node, previous: RBI::Node).returns(T::Boolean) }
- def can_delete_node?(node, previous); end
-
- sig { params(node: RBI::Node, previous: RBI::Node).void }
- def delete_node(node, previous); end
-
- sig { params(node: RBI::Indexable).returns(T.nilable(RBI::Node)) }
- def previous_definition_for(node); end
-
- class << self
- sig { params(tree: RBI::Tree, index: RBI::Index).returns([RBI::Tree, T::Array[RBI::Rewriters::RemoveKnownDefinitions::Operation]]) }
- def remove(tree, index); end
- end
-end
-
-class RBI::Rewriters::RemoveKnownDefinitions::Operation < ::T::Struct
- const :deleted_node, RBI::Node
- const :duplicate_of, RBI::Node
-
- sig { returns(String) }
- def to_s; end
-
- class << self
- def inherited(s); end
- end
-end
-
-class RBI::Rewriters::SortNodes < ::RBI::Visitor
- sig { override.params(node: T.nilable(RBI::Node)).void }
- def visit(node); end
-
- private
-
- sig { params(kind: RBI::Group::Kind).returns(Integer) }
- def group_rank(kind); end
-
- sig { params(node: RBI::Node).returns(T.nilable(String)) }
- def node_name(node); end
-
- sig { params(node: RBI::Node).returns(Integer) }
- def node_rank(node); end
-
- sig { params(node: RBI::Node).void }
- def sort_node_names!(node); end
-end
-
-class RBI::Scope < ::RBI::Tree
- include ::RBI::Indexable
-
- abstract!
-
- def initialize(*args, &blk); end
-
- sig { override.params(v: RBI::Printer).void }
- def accept_printer(v); end
-
- sig { returns(T.self_type) }
- def dup_empty; end
-
- sig { abstract.returns(String) }
- def fully_qualified_name; end
-
- sig { override.returns(T::Array[String]) }
- def index_ids; end
-
- sig { params(v: RBI::Printer).void }
- def print_body(v); end
-
- sig { abstract.params(v: RBI::Printer).void }
- def print_header(v); end
-
- sig { override.returns(String) }
- def to_s; end
-end
-
-class RBI::ScopeConflict < ::RBI::Tree
- sig { params(left: RBI::Scope, right: RBI::Scope, left_name: String, right_name: String).void }
- def initialize(left:, right:, left_name: T.unsafe(nil), right_name: T.unsafe(nil)); end
-
- sig { override.params(v: RBI::Printer).void }
- def accept_printer(v); end
-
- sig { returns(RBI::Scope) }
- def left; end
-
- sig { override.returns(T::Boolean) }
- def oneline?; end
-
- def right; end
-end
-
-class RBI::Send < ::RBI::NodeWithComments
- include ::RBI::Indexable
-
- sig { params(method: String, args: T::Array[RBI::Arg], loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::Send).void)).void }
- def initialize(method, args = T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
-
- sig { params(arg: RBI::Arg).void }
- def <<(arg); end
-
- sig { params(other: T.nilable(Object)).returns(T::Boolean) }
- def ==(other); end
-
- sig { override.params(v: RBI::Printer).void }
- def accept_printer(v); end
-
- sig { returns(T::Array[RBI::Arg]) }
- def args; end
-
- sig { override.params(other: RBI::Node).returns(T::Boolean) }
- def compatible_with?(other); end
-
- sig { override.returns(T::Array[String]) }
- def index_ids; end
-
- sig { returns(String) }
- def method; end
-
- sig { returns(String) }
- def to_s; end
-end
-
-class RBI::Sig < ::RBI::Node
- sig { params(params: T::Array[RBI::SigParam], return_type: T.nilable(String), is_abstract: T::Boolean, is_override: T::Boolean, is_overridable: T::Boolean, is_final: T::Boolean, type_params: T::Array[String], checked: T.nilable(Symbol), loc: T.nilable(RBI::Loc), block: T.nilable(T.proc.params(node: RBI::Sig).void)).void }
- def initialize(params: T.unsafe(nil), return_type: T.unsafe(nil), is_abstract: T.unsafe(nil), is_override: T.unsafe(nil), is_overridable: T.unsafe(nil), is_final: T.unsafe(nil), type_params: T.unsafe(nil), checked: T.unsafe(nil), loc: T.unsafe(nil), &block); end
-
- sig { params(param: RBI::SigParam).void }
- def <<(param); end
-
- sig { params(other: Object).returns(T::Boolean) }
- def ==(other); end
-
- sig { override.params(v: RBI::Printer).void }
- def accept_printer(v); end
-
- sig { returns(T.nilable(Symbol)) }
- def checked; end
-
- def checked=(_arg0); end
-
- sig { returns(T::Boolean) }
- def inline_params?; end
-
- sig { returns(T::Boolean) }
- def is_abstract; end
-
- def is_abstract=(_arg0); end
- def is_final; end
- def is_final=(_arg0); end
- def is_overridable; end
- def is_overridable=(_arg0); end
- def is_override; end
- def is_override=(_arg0); end
-
- sig { override.returns(T::Boolean) }
- def oneline?; end
-
- sig { returns(T::Array[RBI::SigParam]) }
- def params; end
-
- sig { returns(T.nilable(String)) }
- def return_type; end
-
- def return_type=(_arg0); end
-
- sig { returns(T::Array[String]) }
- def type_params; end
-
- private
-
- sig { params(v: RBI::Printer).void }
- def print_as_block(v); end
-
- sig { params(v: RBI::Printer).void }
- def print_as_line(v); end
-
- sig { returns(T::Array[String]) }
- def sig_modifiers; end
-end
-
-class RBI::SigBuilder < ::RBI::ASTVisitor
- sig { void }
- def initialize; end
-
- sig { returns(RBI::Sig) }
- def current; end
-
- def current=(_arg0); end
-
- sig { override.params(node: T.nilable(AST::Node)).void }
- def visit(node); end
-
- sig { params(node: AST::Node).void }
- def visit_send(node); end
-
- class << self
- sig { params(node: AST::Node).returns(RBI::Sig) }
- def build(node); end
- end
-end
-
-class RBI::SigParam < ::RBI::NodeWithComments
- sig { params(name: String, type: String, loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::SigParam).void)).void }
- def initialize(name, type, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
-
- sig { params(other: Object).returns(T::Boolean) }
- def ==(other); end
-
- sig { override.params(v: RBI::Printer).void }
- def accept_printer(v); end
-
- sig { returns(T::Array[String]) }
- def comments_lines; end
-
- sig { returns(String) }
- def name; end
-
- sig { params(v: RBI::Printer, last: T::Boolean).void }
- def print_comment_leading_space(v, last:); end
-
- def type; end
-end
-
-class RBI::SingletonClass < ::RBI::Scope
- sig { params(loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::SingletonClass).void)).void }
- def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
-
- sig { override.returns(String) }
- def fully_qualified_name; end
-
- sig { override.params(v: RBI::Printer).void }
- def print_header(v); end
-end
-
-class RBI::Struct < ::RBI::Scope
- sig { params(name: String, members: T::Array[Symbol], keyword_init: T::Boolean, loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(struct: RBI::Struct).void)).void }
- def initialize(name, members: T.unsafe(nil), keyword_init: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
-
- sig { override.params(other: RBI::Node).returns(T::Boolean) }
- def compatible_with?(other); end
-
- sig { override.returns(String) }
- def fully_qualified_name; end
-
- sig { returns(T::Boolean) }
- def keyword_init; end
-
- def keyword_init=(_arg0); end
-
- sig { returns(T::Array[Symbol]) }
- def members; end
-
- def members=(_arg0); end
-
- sig { returns(String) }
- def name; end
-
- def name=(_arg0); end
-
- sig { override.params(v: RBI::Printer).void }
- def print_header(v); end
-end
-
-class RBI::TEnum < ::RBI::Class
- sig { params(name: String, loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(klass: RBI::TEnum).void)).void }
- def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
-end
-
-class RBI::TEnumBlock < ::RBI::NodeWithComments
- include ::RBI::Indexable
-
- sig { params(names: T::Array[String], loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::TEnumBlock).void)).void }
- def initialize(names = T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
-
- sig { params(name: String).void }
- def <<(name); end
-
- sig { override.params(v: RBI::Printer).void }
- def accept_printer(v); end
-
- sig { returns(T::Boolean) }
- def empty?; end
-
- sig { override.returns(T::Array[String]) }
- def index_ids; end
-
- sig { override.params(other: RBI::Node).void }
- def merge_with(other); end
-
- sig { returns(T::Array[String]) }
- def names; end
-
- sig { override.returns(String) }
- def to_s; end
-end
-
-class RBI::TStruct < ::RBI::Class
- sig { params(name: String, loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(klass: RBI::TStruct).void)).void }
- def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
-end
-
-class RBI::TStructConst < ::RBI::TStructField
- include ::RBI::Indexable
-
- sig { params(name: String, type: String, default: T.nilable(String), loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::TStructConst).void)).void }
- def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
-
- sig { override.params(other: RBI::Node).returns(T::Boolean) }
- def compatible_with?(other); end
-
- sig { override.returns(T::Array[String]) }
- def fully_qualified_names; end
-
- sig { override.returns(T::Array[String]) }
- def index_ids; end
-
- sig { override.returns(String) }
- def to_s; end
-end
-
-class RBI::TStructField < ::RBI::NodeWithComments
- abstract!
-
- sig { params(name: String, type: String, default: T.nilable(String), loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment]).void }
- def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil)); end
-
- sig { override.params(v: RBI::Printer).void }
- def accept_printer(v); end
-
- sig { override.params(other: RBI::Node).returns(T::Boolean) }
- def compatible_with?(other); end
-
- sig { returns(T.nilable(String)) }
- def default; end
-
- def default=(_arg0); end
-
- sig { abstract.returns(T::Array[String]) }
- def fully_qualified_names; end
-
- sig { returns(String) }
- def name; end
-
- def name=(_arg0); end
- def type; end
- def type=(_arg0); end
-end
-
-class RBI::TStructProp < ::RBI::TStructField
- include ::RBI::Indexable
-
- sig { params(name: String, type: String, default: T.nilable(String), loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::TStructProp).void)).void }
- def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
-
- sig { override.params(other: RBI::Node).returns(T::Boolean) }
- def compatible_with?(other); end
-
- sig { override.returns(T::Array[String]) }
- def fully_qualified_names; end
-
- sig { override.returns(T::Array[String]) }
- def index_ids; end
-
- sig { override.returns(String) }
- def to_s; end
-end
-
-class RBI::Tree < ::RBI::NodeWithComments
- sig { params(loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::Tree).void)).void }
- def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
-
- sig { params(node: RBI::Node).void }
- def <<(node); end
-
- sig { override.params(v: RBI::Printer).void }
- def accept_printer(v); end
-
- sig { params(with_todo_comment: T::Boolean).void }
- def add_sig_templates!(with_todo_comment: T.unsafe(nil)); end
-
- sig { params(annotation: String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void }
- def annotate!(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end
-
- sig { params(name: String, superclass_name: T.nilable(String), block: T.nilable(T.proc.params(scope: RBI::Scope).void)).returns(RBI::Scope) }
- def create_class(name, superclass_name: T.unsafe(nil), &block); end
-
- sig { params(name: String, value: String).void }
- def create_constant(name, value:); end
-
- sig { params(name: String).void }
- def create_extend(name); end
-
- sig { params(name: String).void }
- def create_include(name); end
-
- sig { params(name: String, parameters: T::Array[RBI::TypedParam], return_type: String, class_method: T::Boolean, visibility: RBI::Visibility).void }
- def create_method(name, parameters: T.unsafe(nil), return_type: T.unsafe(nil), class_method: T.unsafe(nil), visibility: T.unsafe(nil)); end
-
- sig { params(name: String).void }
- def create_mixes_in_class_methods(name); end
-
- sig { params(name: String, block: T.nilable(T.proc.params(scope: RBI::Scope).void)).returns(RBI::Scope) }
- def create_module(name, &block); end
-
- sig { params(constant: Module, block: T.nilable(T.proc.params(scope: RBI::Scope).void)).void }
- def create_path(constant, &block); end
-
- sig { params(name: String, value: String).void }
- def create_type_member(name, value: T.unsafe(nil)); end
-
- sig { params(annotation: String).void }
- def deannotate!(annotation); end
-
- sig { returns(T::Boolean) }
- def empty?; end
-
- sig { void }
- def group_nodes!; end
-
- sig { returns(RBI::Index) }
- def index; end
-
- sig { params(other: RBI::Tree, left_name: String, right_name: String, keep: RBI::Rewriters::Merge::Keep).returns(RBI::MergeTree) }
- def merge(other, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end
-
- sig { void }
- def nest_non_public_methods!; end
-
- sig { void }
- def nest_singleton_methods!; end
-
- sig { returns(T::Array[RBI::Node]) }
- def nodes; end
-
- sig { override.returns(T::Boolean) }
- def oneline?; end
-
- sig { void }
- def sort_nodes!; end
-
- private
-
- sig { params(node: RBI::Node).returns(RBI::Node) }
- def create_node(node); end
-
- sig { returns(T::Hash[String, RBI::Node]) }
- def nodes_cache; end
-
- sig { params(name: String).returns(T::Boolean) }
- def valid_method_name?(name); end
-end
-
-RBI::Tree::SPECIAL_METHOD_NAMES = T.let(T.unsafe(nil), Array)
-
-class RBI::TreeBuilder < ::RBI::ASTVisitor
- sig { params(file: String, comments: T::Array[Parser::Source::Comment], nodes_comments_assoc: T::Hash[Parser::Source::Map, T::Array[Parser::Source::Comment]]).void }
- def initialize(file:, comments: T.unsafe(nil), nodes_comments_assoc: T.unsafe(nil)); end
-
- sig { void }
- def post_process; end
-
- sig { returns(RBI::Tree) }
- def tree; end
-
- sig { override.params(node: T.nilable(Object)).void }
- def visit(node); end
-
- private
-
- sig { void }
- def assoc_dangling_comments; end
-
- sig { returns(RBI::Tree) }
- def current_scope; end
-
- sig { returns(T::Array[RBI::Sig]) }
- def current_sigs; end
-
- sig { params(node: AST::Node).returns(T::Array[RBI::Comment]) }
- def node_comments(node); end
-
- sig { params(node: AST::Node).returns(RBI::Loc) }
- def node_loc(node); end
-
- sig { params(node: AST::Node).returns(T.nilable(RBI::Node)) }
- def parse_block(node); end
-
- sig { params(node: AST::Node).returns(RBI::Node) }
- def parse_const_assign(node); end
-
- sig { params(node: AST::Node).returns(RBI::Method) }
- def parse_def(node); end
-
- sig { params(node: AST::Node).returns(RBI::TEnumBlock) }
- def parse_enum(node); end
-
- sig { params(node: AST::Node).returns(RBI::Param) }
- def parse_param(node); end
-
- sig { params(node: AST::Node).returns(RBI::RequiresAncestor) }
- def parse_requires_ancestor(node); end
-
- sig { params(node: AST::Node).returns(RBI::Scope) }
- def parse_scope(node); end
-
- sig { params(node: AST::Node).returns(T.nilable(RBI::Node)) }
- def parse_send(node); end
-
- sig { params(node: AST::Node).returns(T::Array[RBI::Arg]) }
- def parse_send_args(node); end
-
- sig { params(node: AST::Node).returns(RBI::Sig) }
- def parse_sig(node); end
-
- sig { params(node: AST::Node).returns(RBI::Struct) }
- def parse_struct(node); end
-
- sig { params(node: AST::Node).returns([String, String, T.nilable(String)]) }
- def parse_tstruct_prop(node); end
-
- sig { void }
- def separate_header_comments; end
-
- sig { void }
- def set_root_tree_loc; end
-
- sig { params(node: AST::Node).returns(T::Boolean) }
- def struct_definition?(node); end
-end
-
-class RBI::TypeMember < ::RBI::NodeWithComments
- sig { params(name: String, value: String, loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment], block: T.nilable(T.proc.params(node: RBI::TypeMember).void)).void }
- def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
-
- sig { override.params(v: RBI::Printer).void }
- def accept_printer(v); end
-
- sig { returns(String) }
- def fully_qualified_name; end
-
- sig { returns(String) }
- def name; end
-
- sig { override.returns(String) }
- def to_s; end
-
- def value; end
-end
-
-RBI::VERSION = T.let(T.unsafe(nil), String)
-
-class RBI::Visibility < ::RBI::NodeWithComments
- abstract!
-
- sig { params(visibility: Symbol, loc: T.nilable(RBI::Loc), comments: T::Array[RBI::Comment]).void }
- def initialize(visibility, loc: T.unsafe(nil), comments: T.unsafe(nil)); end
-
- sig { params(other: RBI::Visibility).returns(T::Boolean) }
- def ==(other); end
-
- sig { override.params(v: RBI::Printer).void }
- def accept_printer(v); end
-
- sig { returns(T::Boolean) }
- def private?; end
-
- sig { returns(T::Boolean) }
- def protected?; end
-
- sig { returns(T::Boolean) }
- def public?; end
-
- sig { returns(Symbol) }
- def visibility; end
-end
-
-class RBI::VisibilityGroup < ::RBI::Tree
- sig { params(visibility: RBI::Visibility).void }
- def initialize(visibility); end
-
- sig { override.params(v: RBI::Printer).void }
- def accept_printer(v); end
-
- sig { override.returns(T::Boolean) }
- def oneline?; end
-
- sig { returns(RBI::Visibility) }
- def visibility; end
-end
-
-class RBI::Visitor
- abstract!
-
- def initialize(*args, &blk); end
-
- sig { abstract.params(node: T.nilable(RBI::Node)).void }
- def visit(node); end
-
- sig { params(nodes: T::Array[RBI::Node]).void }
- def visit_all(nodes); end
-end | true |
Other | Homebrew | brew | 08be8e45acc79b1219e385a97e7f1a65d73a9602.json | Update RBI files for rbi. | Library/Homebrew/sorbet/rbi/gems/rbi@0.0.13.rbi | @@ -0,0 +1,2056 @@
+# typed: true
+
+# DO NOT EDIT MANUALLY
+# This is an autogenerated file for types exported from the `rbi` gem.
+# Please instead update this file by running `bin/tapioca gem rbi`.
+
+module RBI; end
+
+class RBI::ASTVisitor
+ abstract!
+
+ def initialize(*args, &blk); end
+
+ sig { abstract.params(node: T.nilable(::AST::Node)).void }
+ def visit(node); end
+
+ sig { params(nodes: T::Array[::AST::Node]).void }
+ def visit_all(nodes); end
+
+ private
+
+ sig { params(node: ::AST::Node).returns(::String) }
+ def parse_expr(node); end
+
+ sig { params(node: ::AST::Node).returns(::String) }
+ def parse_name(node); end
+end
+
+class RBI::Arg < ::RBI::Node
+ sig { params(value: ::String, loc: T.nilable(::RBI::Loc)).void }
+ def initialize(value, loc: T.unsafe(nil)); end
+
+ sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
+ def ==(other); end
+
+ sig { override.params(v: ::RBI::Printer).void }
+ def accept_printer(v); end
+
+ sig { returns(::String) }
+ def to_s; end
+
+ sig { returns(::String) }
+ def value; end
+end
+
+class RBI::Attr < ::RBI::NodeWithComments
+ include ::RBI::Indexable
+
+ abstract!
+
+ sig do
+ params(
+ name: ::Symbol,
+ names: T::Array[::Symbol],
+ visibility: ::RBI::Visibility,
+ sigs: T::Array[::RBI::Sig],
+ loc: T.nilable(::RBI::Loc),
+ comments: T::Array[::RBI::Comment]
+ ).void
+ end
+ def initialize(name, names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil)); end
+
+ sig { override.params(v: ::RBI::Printer).void }
+ def accept_printer(v); end
+
+ sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
+ def compatible_with?(other); end
+
+ sig { abstract.returns(T::Array[::String]) }
+ def fully_qualified_names; end
+
+ sig { override.returns(T::Array[::String]) }
+ def index_ids; end
+
+ sig { override.params(other: ::RBI::Node).void }
+ def merge_with(other); end
+
+ sig { returns(T::Array[::Symbol]) }
+ def names; end
+
+ def names=(_arg0); end
+
+ sig { override.returns(T::Boolean) }
+ def oneline?; end
+
+ sig { returns(T::Array[::RBI::Sig]) }
+ def sigs; end
+
+ sig { returns(::RBI::Visibility) }
+ def visibility; end
+
+ def visibility=(_arg0); end
+end
+
+class RBI::AttrAccessor < ::RBI::Attr
+ sig do
+ params(
+ name: ::Symbol,
+ names: ::Symbol,
+ visibility: ::RBI::Visibility,
+ sigs: T::Array[::RBI::Sig],
+ loc: T.nilable(::RBI::Loc),
+ comments: T::Array[::RBI::Comment],
+ block: T.nilable(T.proc.params(node: ::RBI::AttrAccessor).void)
+ ).void
+ end
+ def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
+
+ sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
+ def compatible_with?(other); end
+
+ sig { override.returns(T::Array[::String]) }
+ def fully_qualified_names; end
+
+ sig { override.returns(::String) }
+ def to_s; end
+end
+
+class RBI::AttrReader < ::RBI::Attr
+ sig do
+ params(
+ name: ::Symbol,
+ names: ::Symbol,
+ visibility: ::RBI::Visibility,
+ sigs: T::Array[::RBI::Sig],
+ loc: T.nilable(::RBI::Loc),
+ comments: T::Array[::RBI::Comment],
+ block: T.nilable(T.proc.params(node: ::RBI::AttrReader).void)
+ ).void
+ end
+ def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
+
+ sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
+ def compatible_with?(other); end
+
+ sig { override.returns(T::Array[::String]) }
+ def fully_qualified_names; end
+
+ sig { override.returns(::String) }
+ def to_s; end
+end
+
+class RBI::AttrWriter < ::RBI::Attr
+ sig do
+ params(
+ name: ::Symbol,
+ names: ::Symbol,
+ visibility: ::RBI::Visibility,
+ sigs: T::Array[::RBI::Sig],
+ loc: T.nilable(::RBI::Loc),
+ comments: T::Array[::RBI::Comment],
+ block: T.nilable(T.proc.params(node: ::RBI::AttrWriter).void)
+ ).void
+ end
+ def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
+
+ sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
+ def compatible_with?(other); end
+
+ sig { override.returns(T::Array[::String]) }
+ def fully_qualified_names; end
+
+ sig { override.returns(::String) }
+ def to_s; end
+end
+
+class RBI::BlankLine < ::RBI::Comment
+ sig { params(loc: T.nilable(::RBI::Loc)).void }
+ def initialize(loc: T.unsafe(nil)); end
+
+ sig { override.params(v: ::RBI::Printer).void }
+ def accept_printer(v); end
+end
+
+class RBI::BlockParam < ::RBI::Param
+ sig do
+ params(
+ name: ::String,
+ loc: T.nilable(::RBI::Loc),
+ comments: T::Array[::RBI::Comment],
+ block: T.nilable(T.proc.params(node: ::RBI::BlockParam).void)
+ ).void
+ end
+ def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
+
+ sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
+ def ==(other); end
+
+ sig { override.params(v: ::RBI::Printer).void }
+ def accept_printer(v); end
+
+ sig { override.params(v: ::RBI::Printer, last: T::Boolean).void }
+ def print_comment_leading_space(v, last:); end
+
+ sig { override.returns(::String) }
+ def to_s; end
+end
+
+class RBI::Class < ::RBI::Scope
+ sig do
+ params(
+ name: ::String,
+ superclass_name: T.nilable(::String),
+ loc: T.nilable(::RBI::Loc),
+ comments: T::Array[::RBI::Comment],
+ block: T.nilable(T.proc.params(node: ::RBI::Class).void)
+ ).void
+ end
+ def initialize(name, superclass_name: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
+
+ sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
+ def compatible_with?(other); end
+
+ sig { override.returns(::String) }
+ def fully_qualified_name; end
+
+ sig { returns(::String) }
+ def name; end
+
+ def name=(_arg0); end
+
+ sig { override.params(v: ::RBI::Printer).void }
+ def print_header(v); end
+
+ sig { returns(T.nilable(::String)) }
+ def superclass_name; end
+
+ def superclass_name=(_arg0); end
+end
+
+class RBI::Comment < ::RBI::Node
+ sig { params(text: ::String, loc: T.nilable(::RBI::Loc)).void }
+ def initialize(text, loc: T.unsafe(nil)); end
+
+ sig { params(other: ::Object).returns(T::Boolean) }
+ def ==(other); end
+
+ sig { override.params(v: ::RBI::Printer).void }
+ def accept_printer(v); end
+
+ sig { returns(::String) }
+ def text; end
+
+ def text=(_arg0); end
+end
+
+class RBI::ConflictTree < ::RBI::Tree
+ sig { params(left_name: ::String, right_name: ::String).void }
+ def initialize(left_name: T.unsafe(nil), right_name: T.unsafe(nil)); end
+
+ sig { override.params(v: ::RBI::Printer).void }
+ def accept_printer(v); end
+
+ sig { returns(::RBI::Tree) }
+ def left; end
+
+ def right; end
+end
+
+class RBI::Const < ::RBI::NodeWithComments
+ include ::RBI::Indexable
+
+ sig do
+ params(
+ name: ::String,
+ value: ::String,
+ loc: T.nilable(::RBI::Loc),
+ comments: T::Array[::RBI::Comment],
+ block: T.nilable(T.proc.params(node: ::RBI::Const).void)
+ ).void
+ end
+ def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
+
+ sig { override.params(v: ::RBI::Printer).void }
+ def accept_printer(v); end
+
+ sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
+ def compatible_with?(other); end
+
+ sig { returns(::String) }
+ def fully_qualified_name; end
+
+ sig { override.returns(T::Array[::String]) }
+ def index_ids; end
+
+ sig { returns(::String) }
+ def name; end
+
+ sig { override.returns(::String) }
+ def to_s; end
+
+ def value; end
+end
+
+class RBI::ConstBuilder < ::RBI::ASTVisitor
+ sig { void }
+ def initialize; end
+
+ sig { returns(T::Array[::String]) }
+ def names; end
+
+ def names=(_arg0); end
+
+ sig { override.params(node: T.nilable(::AST::Node)).void }
+ def visit(node); end
+
+ class << self
+ sig { params(node: T.nilable(::AST::Node)).returns(T.nilable(::String)) }
+ def visit(node); end
+ end
+end
+
+class RBI::Error < ::StandardError; end
+
+class RBI::Extend < ::RBI::Mixin
+ include ::RBI::Indexable
+
+ sig do
+ params(
+ name: ::String,
+ names: ::String,
+ loc: T.nilable(::RBI::Loc),
+ comments: T::Array[::RBI::Comment],
+ block: T.nilable(T.proc.params(node: ::RBI::Extend).void)
+ ).void
+ end
+ def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
+
+ sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
+ def compatible_with?(other); end
+
+ sig { override.returns(T::Array[::String]) }
+ def index_ids; end
+
+ sig { override.returns(::String) }
+ def to_s; end
+end
+
+class RBI::File
+ sig do
+ params(
+ strictness: T.nilable(::String),
+ comments: T::Array[::RBI::Comment],
+ block: T.nilable(T.proc.params(file: ::RBI::File).void)
+ ).void
+ end
+ def initialize(strictness: T.unsafe(nil), comments: T.unsafe(nil), &block); end
+
+ sig { params(node: ::RBI::Node).void }
+ def <<(node); end
+
+ sig { params(v: ::RBI::Printer).void }
+ def accept_printer(v); end
+
+ sig { returns(T::Array[::RBI::Comment]) }
+ def comments; end
+
+ def comments=(_arg0); end
+
+ sig { returns(T::Boolean) }
+ def empty?; end
+
+ sig do
+ params(
+ out: T.any(::IO, ::StringIO),
+ indent: ::Integer,
+ print_locs: T::Boolean,
+ max_line_length: T.nilable(::Integer)
+ ).void
+ end
+ def print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end
+
+ sig { returns(::RBI::Tree) }
+ def root; end
+
+ def root=(_arg0); end
+
+ sig { returns(T.nilable(::String)) }
+ def strictness; end
+
+ def strictness=(_arg0); end
+
+ sig { params(indent: ::Integer, print_locs: T::Boolean, max_line_length: T.nilable(::Integer)).returns(::String) }
+ def string(indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end
+end
+
+class RBI::Formatter
+ sig do
+ params(
+ add_sig_templates: T::Boolean,
+ group_nodes: T::Boolean,
+ max_line_length: T.nilable(::Integer),
+ nest_singleton_methods: T::Boolean,
+ nest_non_public_methods: T::Boolean,
+ sort_nodes: T::Boolean
+ ).void
+ end
+ def initialize(add_sig_templates: T.unsafe(nil), group_nodes: T.unsafe(nil), max_line_length: T.unsafe(nil), nest_singleton_methods: T.unsafe(nil), nest_non_public_methods: T.unsafe(nil), sort_nodes: T.unsafe(nil)); end
+
+ sig { returns(T::Boolean) }
+ def add_sig_templates; end
+
+ def add_sig_templates=(_arg0); end
+
+ sig { params(file: ::RBI::File).void }
+ def format_file(file); end
+
+ sig { params(tree: ::RBI::Tree).void }
+ def format_tree(tree); end
+
+ def group_nodes; end
+ def group_nodes=(_arg0); end
+
+ sig { returns(T.nilable(::Integer)) }
+ def max_line_length; end
+
+ def max_line_length=(_arg0); end
+ def nest_non_public_methods; end
+ def nest_non_public_methods=(_arg0); end
+ def nest_singleton_methods; end
+ def nest_singleton_methods=(_arg0); end
+
+ sig { params(file: ::RBI::File).returns(::String) }
+ def print_file(file); end
+
+ sig { params(tree: ::RBI::Tree).returns(::String) }
+ def print_tree(tree); end
+
+ def sort_nodes; end
+ def sort_nodes=(_arg0); end
+end
+
+class RBI::Group < ::RBI::Tree
+ sig { params(kind: ::RBI::Group::Kind).void }
+ def initialize(kind); end
+
+ sig { override.params(v: ::RBI::Printer).void }
+ def accept_printer(v); end
+
+ sig { returns(::RBI::Group::Kind) }
+ def kind; end
+end
+
+class RBI::Group::Kind < ::T::Enum
+ enums do
+ Mixins = new
+ RequiredAncestors = new
+ Helpers = new
+ TypeMembers = new
+ MixesInClassMethods = new
+ Sends = new
+ Attrs = new
+ TStructFields = new
+ TEnums = new
+ Inits = new
+ Methods = new
+ SingletonClasses = new
+ Consts = new
+ end
+end
+
+class RBI::Helper < ::RBI::NodeWithComments
+ include ::RBI::Indexable
+
+ sig do
+ params(
+ name: ::String,
+ loc: T.nilable(::RBI::Loc),
+ comments: T::Array[::RBI::Comment],
+ block: T.nilable(T.proc.params(node: ::RBI::Helper).void)
+ ).void
+ end
+ def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
+
+ sig { override.params(v: ::RBI::Printer).void }
+ def accept_printer(v); end
+
+ sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
+ def compatible_with?(other); end
+
+ sig { override.returns(T::Array[::String]) }
+ def index_ids; end
+
+ sig { returns(::String) }
+ def name; end
+
+ sig { override.returns(::String) }
+ def to_s; end
+end
+
+class RBI::Include < ::RBI::Mixin
+ include ::RBI::Indexable
+
+ sig do
+ params(
+ name: ::String,
+ names: ::String,
+ loc: T.nilable(::RBI::Loc),
+ comments: T::Array[::RBI::Comment],
+ block: T.nilable(T.proc.params(node: ::RBI::Include).void)
+ ).void
+ end
+ def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
+
+ sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
+ def compatible_with?(other); end
+
+ sig { override.returns(T::Array[::String]) }
+ def index_ids; end
+
+ sig { override.returns(::String) }
+ def to_s; end
+end
+
+class RBI::Index < ::RBI::Visitor
+ sig { void }
+ def initialize; end
+
+ sig { params(id: ::String).returns(T::Array[::RBI::Node]) }
+ def [](id); end
+
+ sig { params(nodes: ::RBI::Node).void }
+ def index(*nodes); end
+
+ sig { returns(T::Array[::String]) }
+ def keys; end
+
+ sig { override.params(node: T.nilable(::RBI::Node)).void }
+ def visit(node); end
+
+ private
+
+ sig { params(node: T.all(::RBI::Indexable, ::RBI::Node)).void }
+ def index_node(node); end
+
+ class << self
+ sig { params(node: ::RBI::Node).returns(::RBI::Index) }
+ def index(*node); end
+ end
+end
+
+module RBI::Indexable
+ interface!
+
+ sig { abstract.returns(T::Array[::String]) }
+ def index_ids; end
+end
+
+class RBI::KwArg < ::RBI::Arg
+ sig { params(keyword: ::String, value: ::String, loc: T.nilable(::RBI::Loc)).void }
+ def initialize(keyword, value, loc: T.unsafe(nil)); end
+
+ sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
+ def ==(other); end
+
+ sig { override.params(v: ::RBI::Printer).void }
+ def accept_printer(v); end
+
+ sig { returns(::String) }
+ def keyword; end
+
+ sig { returns(::String) }
+ def to_s; end
+end
+
+class RBI::KwOptParam < ::RBI::Param
+ sig do
+ params(
+ name: ::String,
+ value: ::String,
+ loc: T.nilable(::RBI::Loc),
+ comments: T::Array[::RBI::Comment],
+ block: T.nilable(T.proc.params(node: ::RBI::KwOptParam).void)
+ ).void
+ end
+ def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
+
+ sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
+ def ==(other); end
+
+ sig { override.params(v: ::RBI::Printer).void }
+ def accept_printer(v); end
+
+ sig { override.params(v: ::RBI::Printer, last: T::Boolean).void }
+ def print_comment_leading_space(v, last:); end
+
+ sig { override.returns(::String) }
+ def to_s; end
+
+ sig { returns(::String) }
+ def value; end
+end
+
+class RBI::KwParam < ::RBI::Param
+ sig do
+ params(
+ name: ::String,
+ loc: T.nilable(::RBI::Loc),
+ comments: T::Array[::RBI::Comment],
+ block: T.nilable(T.proc.params(node: ::RBI::KwParam).void)
+ ).void
+ end
+ def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
+
+ sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
+ def ==(other); end
+
+ sig { override.params(v: ::RBI::Printer).void }
+ def accept_printer(v); end
+
+ sig { override.params(v: ::RBI::Printer, last: T::Boolean).void }
+ def print_comment_leading_space(v, last:); end
+
+ sig { override.returns(::String) }
+ def to_s; end
+end
+
+class RBI::KwRestParam < ::RBI::Param
+ sig do
+ params(
+ name: ::String,
+ loc: T.nilable(::RBI::Loc),
+ comments: T::Array[::RBI::Comment],
+ block: T.nilable(T.proc.params(node: ::RBI::KwRestParam).void)
+ ).void
+ end
+ def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
+
+ sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
+ def ==(other); end
+
+ sig { override.params(v: ::RBI::Printer).void }
+ def accept_printer(v); end
+
+ sig { override.params(v: ::RBI::Printer, last: T::Boolean).void }
+ def print_comment_leading_space(v, last:); end
+
+ sig { override.returns(::String) }
+ def to_s; end
+end
+
+class RBI::Loc
+ sig do
+ params(
+ file: T.nilable(::String),
+ begin_line: T.nilable(::Integer),
+ end_line: T.nilable(::Integer),
+ begin_column: T.nilable(::Integer),
+ end_column: T.nilable(::Integer)
+ ).void
+ end
+ def initialize(file: T.unsafe(nil), begin_line: T.unsafe(nil), end_line: T.unsafe(nil), begin_column: T.unsafe(nil), end_column: T.unsafe(nil)); end
+
+ def begin_column; end
+
+ sig { returns(T.nilable(::Integer)) }
+ def begin_line; end
+
+ def end_column; end
+ def end_line; end
+
+ sig { returns(T.nilable(::String)) }
+ def file; end
+
+ sig { returns(::String) }
+ def to_s; end
+
+ class << self
+ sig { params(file: ::String, ast_loc: T.any(::Parser::Source::Map, ::Parser::Source::Range)).returns(::RBI::Loc) }
+ def from_ast_loc(file, ast_loc); end
+ end
+end
+
+class RBI::MergeTree < ::RBI::Tree
+ sig do
+ params(
+ loc: T.nilable(::RBI::Loc),
+ comments: T::Array[::RBI::Comment],
+ conflicts: T::Array[::RBI::Rewriters::Merge::Conflict],
+ block: T.nilable(T.proc.params(node: ::RBI::Tree).void)
+ ).void
+ end
+ def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), conflicts: T.unsafe(nil), &block); end
+
+ sig { returns(T::Array[::RBI::Rewriters::Merge::Conflict]) }
+ def conflicts; end
+end
+
+class RBI::Method < ::RBI::NodeWithComments
+ include ::RBI::Indexable
+
+ sig do
+ params(
+ name: ::String,
+ params: T::Array[::RBI::Param],
+ is_singleton: T::Boolean,
+ visibility: ::RBI::Visibility,
+ sigs: T::Array[::RBI::Sig],
+ loc: T.nilable(::RBI::Loc),
+ comments: T::Array[::RBI::Comment],
+ block: T.nilable(T.proc.params(node: ::RBI::Method).void)
+ ).void
+ end
+ def initialize(name, params: T.unsafe(nil), is_singleton: T.unsafe(nil), visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
+
+ sig { params(param: ::RBI::Param).void }
+ def <<(param); end
+
+ sig { override.params(v: ::RBI::Printer).void }
+ def accept_printer(v); end
+
+ sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
+ def compatible_with?(other); end
+
+ sig { returns(::String) }
+ def fully_qualified_name; end
+
+ sig { override.returns(T::Array[::String]) }
+ def index_ids; end
+
+ sig { returns(T::Boolean) }
+ def inline_params?; end
+
+ sig { returns(T::Boolean) }
+ def is_singleton; end
+
+ def is_singleton=(_arg0); end
+
+ sig { override.params(other: ::RBI::Node).void }
+ def merge_with(other); end
+
+ sig { returns(::String) }
+ def name; end
+
+ def name=(_arg0); end
+
+ sig { override.returns(T::Boolean) }
+ def oneline?; end
+
+ sig { returns(T::Array[::RBI::Param]) }
+ def params; end
+
+ sig { returns(T::Array[::RBI::Sig]) }
+ def sigs; end
+
+ def sigs=(_arg0); end
+
+ sig { override.returns(::String) }
+ def to_s; end
+
+ sig { returns(::RBI::Visibility) }
+ def visibility; end
+
+ def visibility=(_arg0); end
+end
+
+class RBI::MixesInClassMethods < ::RBI::Mixin
+ include ::RBI::Indexable
+
+ sig do
+ params(
+ name: ::String,
+ names: ::String,
+ loc: T.nilable(::RBI::Loc),
+ comments: T::Array[::RBI::Comment],
+ block: T.nilable(T.proc.params(node: ::RBI::MixesInClassMethods).void)
+ ).void
+ end
+ def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
+
+ sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
+ def compatible_with?(other); end
+
+ sig { override.returns(T::Array[::String]) }
+ def index_ids; end
+
+ sig { override.returns(::String) }
+ def to_s; end
+end
+
+class RBI::Mixin < ::RBI::NodeWithComments
+ abstract!
+
+ sig do
+ params(
+ name: ::String,
+ names: T::Array[::String],
+ loc: T.nilable(::RBI::Loc),
+ comments: T::Array[::RBI::Comment]
+ ).void
+ end
+ def initialize(name, names, loc: T.unsafe(nil), comments: T.unsafe(nil)); end
+
+ sig { override.params(v: ::RBI::Printer).void }
+ def accept_printer(v); end
+
+ sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
+ def compatible_with?(other); end
+
+ sig { returns(T::Array[::String]) }
+ def names; end
+
+ def names=(_arg0); end
+end
+
+class RBI::Module < ::RBI::Scope
+ sig do
+ params(
+ name: ::String,
+ loc: T.nilable(::RBI::Loc),
+ comments: T::Array[::RBI::Comment],
+ block: T.nilable(T.proc.params(node: ::RBI::Module).void)
+ ).void
+ end
+ def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
+
+ sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
+ def compatible_with?(other); end
+
+ sig { override.returns(::String) }
+ def fully_qualified_name; end
+
+ sig { returns(::String) }
+ def name; end
+
+ def name=(_arg0); end
+
+ sig { override.params(v: ::RBI::Printer).void }
+ def print_header(v); end
+end
+
+class RBI::Node
+ abstract!
+
+ sig { params(loc: T.nilable(::RBI::Loc)).void }
+ def initialize(loc: T.unsafe(nil)); end
+
+ sig { abstract.params(v: ::RBI::Printer).void }
+ def accept_printer(v); end
+
+ sig { params(_other: ::RBI::Node).returns(T::Boolean) }
+ def compatible_with?(_other); end
+
+ sig { void }
+ def detach; end
+
+ sig { returns(::RBI::Group::Kind) }
+ def group_kind; end
+
+ sig { returns(T.nilable(::RBI::Loc)) }
+ def loc; end
+
+ def loc=(_arg0); end
+
+ sig { params(other: ::RBI::Node).void }
+ def merge_with(other); end
+
+ sig { returns(T::Boolean) }
+ def oneline?; end
+
+ sig { returns(T.nilable(::RBI::ConflictTree)) }
+ def parent_conflict_tree; end
+
+ sig { returns(T.nilable(::RBI::Scope)) }
+ def parent_scope; end
+
+ sig { returns(T.nilable(::RBI::Tree)) }
+ def parent_tree; end
+
+ def parent_tree=(_arg0); end
+
+ sig do
+ params(
+ out: T.any(::IO, ::StringIO),
+ indent: ::Integer,
+ print_locs: T::Boolean,
+ max_line_length: T.nilable(::Integer)
+ ).void
+ end
+ def print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end
+
+ sig { params(v: ::RBI::Printer).void }
+ def print_blank_line_before(v); end
+
+ sig { params(node: ::RBI::Node).void }
+ def replace(node); end
+
+ sig { params(indent: ::Integer, print_locs: T::Boolean, max_line_length: T.nilable(::Integer)).returns(::String) }
+ def string(indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end
+end
+
+class RBI::NodeWithComments < ::RBI::Node
+ abstract!
+
+ sig { params(loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void }
+ def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil)); end
+
+ sig { returns(T::Array[::String]) }
+ def annotations; end
+
+ sig { returns(T::Array[::RBI::Comment]) }
+ def comments; end
+
+ def comments=(_arg0); end
+
+ sig { override.params(other: ::RBI::Node).void }
+ def merge_with(other); end
+
+ sig { override.returns(T::Boolean) }
+ def oneline?; end
+end
+
+class RBI::OptParam < ::RBI::Param
+ sig do
+ params(
+ name: ::String,
+ value: ::String,
+ loc: T.nilable(::RBI::Loc),
+ comments: T::Array[::RBI::Comment],
+ block: T.nilable(T.proc.params(node: ::RBI::OptParam).void)
+ ).void
+ end
+ def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
+
+ sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
+ def ==(other); end
+
+ sig { override.params(v: ::RBI::Printer).void }
+ def accept_printer(v); end
+
+ sig { override.params(v: ::RBI::Printer, last: T::Boolean).void }
+ def print_comment_leading_space(v, last:); end
+
+ sig { returns(::String) }
+ def value; end
+end
+
+class RBI::Param < ::RBI::NodeWithComments
+ abstract!
+
+ sig { params(name: ::String, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void }
+ def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil)); end
+
+ sig { override.params(v: ::RBI::Printer).void }
+ def accept_printer(v); end
+
+ sig { returns(T::Array[::String]) }
+ def comments_lines; end
+
+ sig { returns(::String) }
+ def name; end
+
+ sig { params(v: ::RBI::Printer, last: T::Boolean).void }
+ def print_comment_leading_space(v, last:); end
+
+ sig { override.returns(::String) }
+ def to_s; end
+end
+
+class RBI::ParseError < ::StandardError
+ sig { params(message: ::String, location: ::RBI::Loc).void }
+ def initialize(message, location); end
+
+ sig { returns(::RBI::Loc) }
+ def location; end
+end
+
+class RBI::Parser
+ sig { void }
+ def initialize; end
+
+ sig { params(path: ::String).returns(::RBI::Tree) }
+ def parse_file(path); end
+
+ sig { params(string: ::String).returns(::RBI::Tree) }
+ def parse_string(string); end
+
+ private
+
+ sig { params(content: ::String, file: ::String).returns(::RBI::Tree) }
+ def parse(content, file:); end
+
+ class << self
+ sig { params(path: ::String).returns(::RBI::Tree) }
+ def parse_file(path); end
+
+ sig { params(paths: T::Array[::String]).returns(T::Array[::RBI::Tree]) }
+ def parse_files(paths); end
+
+ sig { params(string: ::String).returns(::RBI::Tree) }
+ def parse_string(string); end
+
+ sig { params(strings: T::Array[::String]).returns(T::Array[::RBI::Tree]) }
+ def parse_strings(strings); end
+ end
+end
+
+class RBI::Printer < ::RBI::Visitor
+ sig do
+ params(
+ out: T.any(::IO, ::StringIO),
+ indent: ::Integer,
+ print_locs: T::Boolean,
+ max_line_length: T.nilable(::Integer)
+ ).void
+ end
+ def initialize(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end
+
+ sig { returns(::Integer) }
+ def current_indent; end
+
+ sig { void }
+ def dedent; end
+
+ def in_visibility_group; end
+ def in_visibility_group=(_arg0); end
+
+ sig { void }
+ def indent; end
+
+ sig { returns(T.nilable(::Integer)) }
+ def max_line_length; end
+
+ sig { returns(T.nilable(::RBI::Node)) }
+ def previous_node; end
+
+ sig { params(string: ::String).void }
+ def print(string); end
+
+ sig { returns(T::Boolean) }
+ def print_locs; end
+
+ def print_locs=(_arg0); end
+
+ sig { params(string: ::String).void }
+ def printl(string); end
+
+ sig { params(string: T.nilable(::String)).void }
+ def printn(string = T.unsafe(nil)); end
+
+ sig { params(string: T.nilable(::String)).void }
+ def printt(string = T.unsafe(nil)); end
+
+ sig { override.params(node: T.nilable(::RBI::Node)).void }
+ def visit(node); end
+
+ sig { override.params(nodes: T::Array[::RBI::Node]).void }
+ def visit_all(nodes); end
+
+ sig { params(file: ::RBI::File).void }
+ def visit_file(file); end
+end
+
+class RBI::Private < ::RBI::Visibility
+ sig do
+ params(
+ loc: T.nilable(::RBI::Loc),
+ comments: T::Array[::RBI::Comment],
+ block: T.nilable(T.proc.params(node: ::RBI::Private).void)
+ ).void
+ end
+ def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
+end
+
+class RBI::Protected < ::RBI::Visibility
+ sig do
+ params(
+ loc: T.nilable(::RBI::Loc),
+ comments: T::Array[::RBI::Comment],
+ block: T.nilable(T.proc.params(node: ::RBI::Protected).void)
+ ).void
+ end
+ def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
+end
+
+class RBI::Public < ::RBI::Visibility
+ sig do
+ params(
+ loc: T.nilable(::RBI::Loc),
+ comments: T::Array[::RBI::Comment],
+ block: T.nilable(T.proc.params(node: ::RBI::Public).void)
+ ).void
+ end
+ def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
+end
+
+class RBI::ReqParam < ::RBI::Param
+ sig do
+ params(
+ name: ::String,
+ loc: T.nilable(::RBI::Loc),
+ comments: T::Array[::RBI::Comment],
+ block: T.nilable(T.proc.params(node: ::RBI::ReqParam).void)
+ ).void
+ end
+ def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
+
+ sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
+ def ==(other); end
+end
+
+class RBI::RequiresAncestor < ::RBI::NodeWithComments
+ include ::RBI::Indexable
+
+ sig { params(name: ::String, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void }
+ def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil)); end
+
+ sig { override.params(v: ::RBI::Printer).void }
+ def accept_printer(v); end
+
+ sig { override.returns(T::Array[::String]) }
+ def index_ids; end
+
+ sig { returns(::String) }
+ def name; end
+
+ sig { override.returns(::String) }
+ def to_s; end
+end
+
+class RBI::RestParam < ::RBI::Param
+ sig do
+ params(
+ name: ::String,
+ loc: T.nilable(::RBI::Loc),
+ comments: T::Array[::RBI::Comment],
+ block: T.nilable(T.proc.params(node: ::RBI::RestParam).void)
+ ).void
+ end
+ def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
+
+ sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
+ def ==(other); end
+
+ sig { override.params(v: ::RBI::Printer).void }
+ def accept_printer(v); end
+
+ sig { override.params(v: ::RBI::Printer, last: T::Boolean).void }
+ def print_comment_leading_space(v, last:); end
+
+ sig { override.returns(::String) }
+ def to_s; end
+end
+
+module RBI::Rewriters; end
+
+class RBI::Rewriters::AddSigTemplates < ::RBI::Visitor
+ sig { params(with_todo_comment: T::Boolean).void }
+ def initialize(with_todo_comment: T.unsafe(nil)); end
+
+ sig { override.params(node: T.nilable(::RBI::Node)).void }
+ def visit(node); end
+
+ private
+
+ sig { params(attr: ::RBI::Attr).void }
+ def add_attr_sig(attr); end
+
+ sig { params(method: ::RBI::Method).void }
+ def add_method_sig(method); end
+
+ sig { params(node: ::RBI::NodeWithComments).void }
+ def add_todo_comment(node); end
+end
+
+class RBI::Rewriters::Annotate < ::RBI::Visitor
+ sig { params(annotation: ::String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void }
+ def initialize(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end
+
+ sig { override.params(node: T.nilable(::RBI::Node)).void }
+ def visit(node); end
+
+ private
+
+ sig { params(node: ::RBI::NodeWithComments).void }
+ def annotate_node(node); end
+
+ sig { params(node: ::RBI::Node).returns(T::Boolean) }
+ def root?(node); end
+end
+
+class RBI::Rewriters::Deannotate < ::RBI::Visitor
+ sig { params(annotation: ::String).void }
+ def initialize(annotation); end
+
+ sig { override.params(node: T.nilable(::RBI::Node)).void }
+ def visit(node); end
+
+ private
+
+ sig { params(node: ::RBI::NodeWithComments).void }
+ def deannotate_node(node); end
+end
+
+class RBI::Rewriters::GroupNodes < ::RBI::Visitor
+ sig { override.params(node: T.nilable(::RBI::Node)).void }
+ def visit(node); end
+end
+
+class RBI::Rewriters::Merge
+ sig { params(left_name: ::String, right_name: ::String, keep: ::RBI::Rewriters::Merge::Keep).void }
+ def initialize(left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end
+
+ sig { params(tree: ::RBI::Tree).void }
+ def merge(tree); end
+
+ sig { returns(::RBI::MergeTree) }
+ def tree; end
+
+ class << self
+ sig do
+ params(
+ left: ::RBI::Tree,
+ right: ::RBI::Tree,
+ left_name: ::String,
+ right_name: ::String,
+ keep: ::RBI::Rewriters::Merge::Keep
+ ).returns(::RBI::MergeTree)
+ end
+ def merge_trees(left, right, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end
+ end
+end
+
+class RBI::Rewriters::Merge::Conflict < ::T::Struct
+ const :left, ::RBI::Node
+ const :left_name, ::String
+ const :right, ::RBI::Node
+ const :right_name, ::String
+
+ sig { returns(::String) }
+ def to_s; end
+
+ class << self
+ def inherited(s); end
+ end
+end
+
+class RBI::Rewriters::Merge::ConflictTreeMerger < ::RBI::Visitor
+ sig { override.params(node: T.nilable(::RBI::Node)).void }
+ def visit(node); end
+
+ sig { override.params(nodes: T::Array[::RBI::Node]).void }
+ def visit_all(nodes); end
+
+ private
+
+ sig { params(left: ::RBI::Tree, right: ::RBI::Tree).void }
+ def merge_conflict_trees(left, right); end
+end
+
+class RBI::Rewriters::Merge::Keep < ::T::Enum
+ enums do
+ NONE = new
+ LEFT = new
+ RIGHT = new
+ end
+end
+
+class RBI::Rewriters::Merge::TreeMerger < ::RBI::Visitor
+ sig do
+ params(
+ output: ::RBI::Tree,
+ left_name: ::String,
+ right_name: ::String,
+ keep: ::RBI::Rewriters::Merge::Keep
+ ).void
+ end
+ def initialize(output, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end
+
+ sig { returns(T::Array[::RBI::Rewriters::Merge::Conflict]) }
+ def conflicts; end
+
+ sig { override.params(node: T.nilable(::RBI::Node)).void }
+ def visit(node); end
+
+ private
+
+ sig { returns(::RBI::Tree) }
+ def current_scope; end
+
+ sig { params(left: ::RBI::Scope, right: ::RBI::Scope).void }
+ def make_conflict_scope(left, right); end
+
+ sig { params(left: ::RBI::Node, right: ::RBI::Node).void }
+ def make_conflict_tree(left, right); end
+
+ sig { params(node: ::RBI::Node).returns(T.nilable(::RBI::Node)) }
+ def previous_definition(node); end
+
+ sig { params(left: ::RBI::Scope, right: ::RBI::Scope).returns(::RBI::Scope) }
+ def replace_scope_header(left, right); end
+end
+
+class RBI::Rewriters::NestNonPublicMethods < ::RBI::Visitor
+ sig { override.params(node: T.nilable(::RBI::Node)).void }
+ def visit(node); end
+end
+
+class RBI::Rewriters::NestSingletonMethods < ::RBI::Visitor
+ sig { override.params(node: T.nilable(::RBI::Node)).void }
+ def visit(node); end
+end
+
+class RBI::Rewriters::RemoveKnownDefinitions < ::RBI::Visitor
+ sig { params(index: ::RBI::Index).void }
+ def initialize(index); end
+
+ sig { returns(T::Array[::RBI::Rewriters::RemoveKnownDefinitions::Operation]) }
+ def operations; end
+
+ sig { override.params(node: T.nilable(::RBI::Node)).void }
+ def visit(node); end
+
+ sig { params(nodes: T::Array[::RBI::Node]).void }
+ def visit_all(nodes); end
+
+ private
+
+ sig { params(node: ::RBI::Node, previous: ::RBI::Node).returns(T::Boolean) }
+ def can_delete_node?(node, previous); end
+
+ sig { params(node: ::RBI::Node, previous: ::RBI::Node).void }
+ def delete_node(node, previous); end
+
+ sig { params(node: ::RBI::Indexable).returns(T.nilable(::RBI::Node)) }
+ def previous_definition_for(node); end
+
+ class << self
+ sig do
+ params(
+ tree: ::RBI::Tree,
+ index: ::RBI::Index
+ ).returns([::RBI::Tree, T::Array[::RBI::Rewriters::RemoveKnownDefinitions::Operation]])
+ end
+ def remove(tree, index); end
+ end
+end
+
+class RBI::Rewriters::RemoveKnownDefinitions::Operation < ::T::Struct
+ const :deleted_node, ::RBI::Node
+ const :duplicate_of, ::RBI::Node
+
+ sig { returns(::String) }
+ def to_s; end
+
+ class << self
+ def inherited(s); end
+ end
+end
+
+class RBI::Rewriters::SortNodes < ::RBI::Visitor
+ sig { override.params(node: T.nilable(::RBI::Node)).void }
+ def visit(node); end
+
+ private
+
+ sig { params(kind: ::RBI::Group::Kind).returns(::Integer) }
+ def group_rank(kind); end
+
+ sig { params(node: ::RBI::Node).returns(T.nilable(::String)) }
+ def node_name(node); end
+
+ sig { params(node: ::RBI::Node).returns(::Integer) }
+ def node_rank(node); end
+
+ sig { params(node: ::RBI::Node).void }
+ def sort_node_names!(node); end
+end
+
+class RBI::Scope < ::RBI::Tree
+ include ::RBI::Indexable
+
+ abstract!
+
+ def initialize(*args, &blk); end
+
+ sig { override.params(v: ::RBI::Printer).void }
+ def accept_printer(v); end
+
+ sig { returns(T.self_type) }
+ def dup_empty; end
+
+ sig { abstract.returns(::String) }
+ def fully_qualified_name; end
+
+ sig { override.returns(T::Array[::String]) }
+ def index_ids; end
+
+ sig { params(v: ::RBI::Printer).void }
+ def print_body(v); end
+
+ sig { abstract.params(v: ::RBI::Printer).void }
+ def print_header(v); end
+
+ sig { override.returns(::String) }
+ def to_s; end
+end
+
+class RBI::ScopeConflict < ::RBI::Tree
+ sig { params(left: ::RBI::Scope, right: ::RBI::Scope, left_name: ::String, right_name: ::String).void }
+ def initialize(left:, right:, left_name: T.unsafe(nil), right_name: T.unsafe(nil)); end
+
+ sig { override.params(v: ::RBI::Printer).void }
+ def accept_printer(v); end
+
+ sig { returns(::RBI::Scope) }
+ def left; end
+
+ sig { override.returns(T::Boolean) }
+ def oneline?; end
+
+ def right; end
+end
+
+class RBI::Send < ::RBI::NodeWithComments
+ include ::RBI::Indexable
+
+ sig do
+ params(
+ method: ::String,
+ args: T::Array[::RBI::Arg],
+ loc: T.nilable(::RBI::Loc),
+ comments: T::Array[::RBI::Comment],
+ block: T.nilable(T.proc.params(node: ::RBI::Send).void)
+ ).void
+ end
+ def initialize(method, args = T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
+
+ sig { params(arg: ::RBI::Arg).void }
+ def <<(arg); end
+
+ sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
+ def ==(other); end
+
+ sig { override.params(v: ::RBI::Printer).void }
+ def accept_printer(v); end
+
+ sig { returns(T::Array[::RBI::Arg]) }
+ def args; end
+
+ sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
+ def compatible_with?(other); end
+
+ sig { override.returns(T::Array[::String]) }
+ def index_ids; end
+
+ sig { returns(::String) }
+ def method; end
+
+ sig { returns(::String) }
+ def to_s; end
+end
+
+class RBI::Sig < ::RBI::Node
+ sig do
+ params(
+ params: T::Array[::RBI::SigParam],
+ return_type: T.nilable(::String),
+ is_abstract: T::Boolean,
+ is_override: T::Boolean,
+ is_overridable: T::Boolean,
+ is_final: T::Boolean,
+ type_params: T::Array[::String],
+ checked: T.nilable(::Symbol),
+ loc: T.nilable(::RBI::Loc),
+ block: T.nilable(T.proc.params(node: ::RBI::Sig).void)
+ ).void
+ end
+ def initialize(params: T.unsafe(nil), return_type: T.unsafe(nil), is_abstract: T.unsafe(nil), is_override: T.unsafe(nil), is_overridable: T.unsafe(nil), is_final: T.unsafe(nil), type_params: T.unsafe(nil), checked: T.unsafe(nil), loc: T.unsafe(nil), &block); end
+
+ sig { params(param: ::RBI::SigParam).void }
+ def <<(param); end
+
+ sig { params(other: ::Object).returns(T::Boolean) }
+ def ==(other); end
+
+ sig { override.params(v: ::RBI::Printer).void }
+ def accept_printer(v); end
+
+ sig { returns(T.nilable(::Symbol)) }
+ def checked; end
+
+ def checked=(_arg0); end
+
+ sig { returns(T::Boolean) }
+ def inline_params?; end
+
+ sig { returns(T::Boolean) }
+ def is_abstract; end
+
+ def is_abstract=(_arg0); end
+ def is_final; end
+ def is_final=(_arg0); end
+ def is_overridable; end
+ def is_overridable=(_arg0); end
+ def is_override; end
+ def is_override=(_arg0); end
+
+ sig { override.returns(T::Boolean) }
+ def oneline?; end
+
+ sig { returns(T::Array[::RBI::SigParam]) }
+ def params; end
+
+ sig { returns(T.nilable(::String)) }
+ def return_type; end
+
+ def return_type=(_arg0); end
+
+ sig { returns(T::Array[::String]) }
+ def type_params; end
+
+ private
+
+ sig { params(v: ::RBI::Printer).void }
+ def print_as_block(v); end
+
+ sig { params(v: ::RBI::Printer).void }
+ def print_as_line(v); end
+
+ sig { returns(T::Array[::String]) }
+ def sig_modifiers; end
+end
+
+class RBI::SigBuilder < ::RBI::ASTVisitor
+ sig { void }
+ def initialize; end
+
+ sig { returns(::RBI::Sig) }
+ def current; end
+
+ def current=(_arg0); end
+
+ sig { override.params(node: T.nilable(::AST::Node)).void }
+ def visit(node); end
+
+ sig { params(node: ::AST::Node).void }
+ def visit_send(node); end
+
+ class << self
+ sig { params(node: ::AST::Node).returns(::RBI::Sig) }
+ def build(node); end
+ end
+end
+
+class RBI::SigParam < ::RBI::NodeWithComments
+ sig do
+ params(
+ name: ::String,
+ type: ::String,
+ loc: T.nilable(::RBI::Loc),
+ comments: T::Array[::RBI::Comment],
+ block: T.nilable(T.proc.params(node: ::RBI::SigParam).void)
+ ).void
+ end
+ def initialize(name, type, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
+
+ sig { params(other: ::Object).returns(T::Boolean) }
+ def ==(other); end
+
+ sig { override.params(v: ::RBI::Printer).void }
+ def accept_printer(v); end
+
+ sig { returns(T::Array[::String]) }
+ def comments_lines; end
+
+ sig { returns(::String) }
+ def name; end
+
+ sig { params(v: ::RBI::Printer, last: T::Boolean).void }
+ def print_comment_leading_space(v, last:); end
+
+ def type; end
+end
+
+class RBI::SingletonClass < ::RBI::Scope
+ sig do
+ params(
+ loc: T.nilable(::RBI::Loc),
+ comments: T::Array[::RBI::Comment],
+ block: T.nilable(T.proc.params(node: ::RBI::SingletonClass).void)
+ ).void
+ end
+ def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
+
+ sig { override.returns(::String) }
+ def fully_qualified_name; end
+
+ sig { override.params(v: ::RBI::Printer).void }
+ def print_header(v); end
+end
+
+class RBI::Struct < ::RBI::Scope
+ sig do
+ params(
+ name: ::String,
+ members: T::Array[::Symbol],
+ keyword_init: T::Boolean,
+ loc: T.nilable(::RBI::Loc),
+ comments: T::Array[::RBI::Comment],
+ block: T.nilable(T.proc.params(struct: ::RBI::Struct).void)
+ ).void
+ end
+ def initialize(name, members: T.unsafe(nil), keyword_init: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
+
+ sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
+ def compatible_with?(other); end
+
+ sig { override.returns(::String) }
+ def fully_qualified_name; end
+
+ sig { returns(T::Boolean) }
+ def keyword_init; end
+
+ def keyword_init=(_arg0); end
+
+ sig { returns(T::Array[::Symbol]) }
+ def members; end
+
+ def members=(_arg0); end
+
+ sig { returns(::String) }
+ def name; end
+
+ def name=(_arg0); end
+
+ sig { override.params(v: ::RBI::Printer).void }
+ def print_header(v); end
+end
+
+class RBI::TEnum < ::RBI::Class
+ sig do
+ params(
+ name: ::String,
+ loc: T.nilable(::RBI::Loc),
+ comments: T::Array[::RBI::Comment],
+ block: T.nilable(T.proc.params(klass: ::RBI::TEnum).void)
+ ).void
+ end
+ def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
+end
+
+class RBI::TEnumBlock < ::RBI::NodeWithComments
+ include ::RBI::Indexable
+
+ sig do
+ params(
+ names: T::Array[::String],
+ loc: T.nilable(::RBI::Loc),
+ comments: T::Array[::RBI::Comment],
+ block: T.nilable(T.proc.params(node: ::RBI::TEnumBlock).void)
+ ).void
+ end
+ def initialize(names = T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
+
+ sig { params(name: ::String).void }
+ def <<(name); end
+
+ sig { override.params(v: ::RBI::Printer).void }
+ def accept_printer(v); end
+
+ sig { returns(T::Boolean) }
+ def empty?; end
+
+ sig { override.returns(T::Array[::String]) }
+ def index_ids; end
+
+ sig { override.params(other: ::RBI::Node).void }
+ def merge_with(other); end
+
+ sig { returns(T::Array[::String]) }
+ def names; end
+
+ sig { override.returns(::String) }
+ def to_s; end
+end
+
+class RBI::TStruct < ::RBI::Class
+ sig do
+ params(
+ name: ::String,
+ loc: T.nilable(::RBI::Loc),
+ comments: T::Array[::RBI::Comment],
+ block: T.nilable(T.proc.params(klass: ::RBI::TStruct).void)
+ ).void
+ end
+ def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
+end
+
+class RBI::TStructConst < ::RBI::TStructField
+ include ::RBI::Indexable
+
+ sig do
+ params(
+ name: ::String,
+ type: ::String,
+ default: T.nilable(::String),
+ loc: T.nilable(::RBI::Loc),
+ comments: T::Array[::RBI::Comment],
+ block: T.nilable(T.proc.params(node: ::RBI::TStructConst).void)
+ ).void
+ end
+ def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
+
+ sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
+ def compatible_with?(other); end
+
+ sig { override.returns(T::Array[::String]) }
+ def fully_qualified_names; end
+
+ sig { override.returns(T::Array[::String]) }
+ def index_ids; end
+
+ sig { override.returns(::String) }
+ def to_s; end
+end
+
+class RBI::TStructField < ::RBI::NodeWithComments
+ abstract!
+
+ sig do
+ params(
+ name: ::String,
+ type: ::String,
+ default: T.nilable(::String),
+ loc: T.nilable(::RBI::Loc),
+ comments: T::Array[::RBI::Comment]
+ ).void
+ end
+ def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil)); end
+
+ sig { override.params(v: ::RBI::Printer).void }
+ def accept_printer(v); end
+
+ sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
+ def compatible_with?(other); end
+
+ sig { returns(T.nilable(::String)) }
+ def default; end
+
+ def default=(_arg0); end
+
+ sig { abstract.returns(T::Array[::String]) }
+ def fully_qualified_names; end
+
+ sig { returns(::String) }
+ def name; end
+
+ def name=(_arg0); end
+ def type; end
+ def type=(_arg0); end
+end
+
+class RBI::TStructProp < ::RBI::TStructField
+ include ::RBI::Indexable
+
+ sig do
+ params(
+ name: ::String,
+ type: ::String,
+ default: T.nilable(::String),
+ loc: T.nilable(::RBI::Loc),
+ comments: T::Array[::RBI::Comment],
+ block: T.nilable(T.proc.params(node: ::RBI::TStructProp).void)
+ ).void
+ end
+ def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
+
+ sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
+ def compatible_with?(other); end
+
+ sig { override.returns(T::Array[::String]) }
+ def fully_qualified_names; end
+
+ sig { override.returns(T::Array[::String]) }
+ def index_ids; end
+
+ sig { override.returns(::String) }
+ def to_s; end
+end
+
+class RBI::Tree < ::RBI::NodeWithComments
+ sig do
+ params(
+ loc: T.nilable(::RBI::Loc),
+ comments: T::Array[::RBI::Comment],
+ block: T.nilable(T.proc.params(node: ::RBI::Tree).void)
+ ).void
+ end
+ def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
+
+ sig { params(node: ::RBI::Node).void }
+ def <<(node); end
+
+ sig { override.params(v: ::RBI::Printer).void }
+ def accept_printer(v); end
+
+ sig { params(with_todo_comment: T::Boolean).void }
+ def add_sig_templates!(with_todo_comment: T.unsafe(nil)); end
+
+ sig { params(annotation: ::String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void }
+ def annotate!(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end
+
+ sig do
+ params(
+ name: ::String,
+ superclass_name: T.nilable(::String),
+ block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)
+ ).returns(::RBI::Scope)
+ end
+ def create_class(name, superclass_name: T.unsafe(nil), &block); end
+
+ sig { params(name: ::String, value: ::String).void }
+ def create_constant(name, value:); end
+
+ sig { params(name: ::String).void }
+ def create_extend(name); end
+
+ sig { params(name: ::String).void }
+ def create_include(name); end
+
+ sig do
+ params(
+ name: ::String,
+ parameters: T::Array[::RBI::TypedParam],
+ return_type: ::String,
+ class_method: T::Boolean,
+ visibility: ::RBI::Visibility
+ ).void
+ end
+ def create_method(name, parameters: T.unsafe(nil), return_type: T.unsafe(nil), class_method: T.unsafe(nil), visibility: T.unsafe(nil)); end
+
+ sig { params(name: ::String).void }
+ def create_mixes_in_class_methods(name); end
+
+ sig { params(name: ::String, block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)).returns(::RBI::Scope) }
+ def create_module(name, &block); end
+
+ sig { params(constant: ::Module, block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)).void }
+ def create_path(constant, &block); end
+
+ sig { params(name: ::String, value: ::String).void }
+ def create_type_member(name, value: T.unsafe(nil)); end
+
+ sig { params(annotation: ::String).void }
+ def deannotate!(annotation); end
+
+ sig { returns(T::Boolean) }
+ def empty?; end
+
+ sig { void }
+ def group_nodes!; end
+
+ sig { returns(::RBI::Index) }
+ def index; end
+
+ sig do
+ params(
+ other: ::RBI::Tree,
+ left_name: ::String,
+ right_name: ::String,
+ keep: ::RBI::Rewriters::Merge::Keep
+ ).returns(::RBI::MergeTree)
+ end
+ def merge(other, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end
+
+ sig { void }
+ def nest_non_public_methods!; end
+
+ sig { void }
+ def nest_singleton_methods!; end
+
+ sig { returns(T::Array[::RBI::Node]) }
+ def nodes; end
+
+ sig { override.returns(T::Boolean) }
+ def oneline?; end
+
+ sig { void }
+ def sort_nodes!; end
+
+ private
+
+ sig { params(node: ::RBI::Node).returns(::RBI::Node) }
+ def create_node(node); end
+
+ sig { returns(T::Hash[::String, ::RBI::Node]) }
+ def nodes_cache; end
+
+ sig { params(name: ::String).returns(T::Boolean) }
+ def valid_method_name?(name); end
+end
+
+RBI::Tree::SPECIAL_METHOD_NAMES = T.let(T.unsafe(nil), Array)
+
+class RBI::TreeBuilder < ::RBI::ASTVisitor
+ sig do
+ params(
+ file: ::String,
+ comments: T::Array[::Parser::Source::Comment],
+ nodes_comments_assoc: T::Hash[::Parser::Source::Map, T::Array[::Parser::Source::Comment]]
+ ).void
+ end
+ def initialize(file:, comments: T.unsafe(nil), nodes_comments_assoc: T.unsafe(nil)); end
+
+ sig { void }
+ def post_process; end
+
+ sig { returns(::RBI::Tree) }
+ def tree; end
+
+ sig { override.params(node: T.nilable(::Object)).void }
+ def visit(node); end
+
+ private
+
+ sig { void }
+ def assoc_dangling_comments; end
+
+ sig { returns(::RBI::Tree) }
+ def current_scope; end
+
+ sig { returns(T::Array[::RBI::Sig]) }
+ def current_sigs; end
+
+ sig { params(node: ::AST::Node).returns(T::Array[::RBI::Comment]) }
+ def node_comments(node); end
+
+ sig { params(node: ::AST::Node).returns(::RBI::Loc) }
+ def node_loc(node); end
+
+ sig { params(node: ::AST::Node).returns(T.nilable(::RBI::Node)) }
+ def parse_block(node); end
+
+ sig { params(node: ::AST::Node).returns(::RBI::Node) }
+ def parse_const_assign(node); end
+
+ sig { params(node: ::AST::Node).returns(::RBI::Method) }
+ def parse_def(node); end
+
+ sig { params(node: ::AST::Node).returns(::RBI::TEnumBlock) }
+ def parse_enum(node); end
+
+ sig { params(node: ::AST::Node).returns(::RBI::Param) }
+ def parse_param(node); end
+
+ sig { params(node: ::AST::Node).returns(::RBI::RequiresAncestor) }
+ def parse_requires_ancestor(node); end
+
+ sig { params(node: ::AST::Node).returns(::RBI::Scope) }
+ def parse_scope(node); end
+
+ sig { params(node: ::AST::Node).returns(T.nilable(::RBI::Node)) }
+ def parse_send(node); end
+
+ sig { params(node: ::AST::Node).returns(T::Array[::RBI::Arg]) }
+ def parse_send_args(node); end
+
+ sig { params(node: ::AST::Node).returns(::RBI::Sig) }
+ def parse_sig(node); end
+
+ sig { params(node: ::AST::Node).returns(::RBI::Struct) }
+ def parse_struct(node); end
+
+ sig { params(node: ::AST::Node).returns([::String, ::String, T.nilable(::String)]) }
+ def parse_tstruct_prop(node); end
+
+ sig { void }
+ def separate_header_comments; end
+
+ sig { void }
+ def set_root_tree_loc; end
+
+ sig { params(node: ::AST::Node).returns(T::Boolean) }
+ def struct_definition?(node); end
+end
+
+class RBI::TypeMember < ::RBI::NodeWithComments
+ sig do
+ params(
+ name: ::String,
+ value: ::String,
+ loc: T.nilable(::RBI::Loc),
+ comments: T::Array[::RBI::Comment],
+ block: T.nilable(T.proc.params(node: ::RBI::TypeMember).void)
+ ).void
+ end
+ def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
+
+ sig { override.params(v: ::RBI::Printer).void }
+ def accept_printer(v); end
+
+ sig { returns(::String) }
+ def fully_qualified_name; end
+
+ sig { returns(::String) }
+ def name; end
+
+ sig { override.returns(::String) }
+ def to_s; end
+
+ def value; end
+end
+
+RBI::VERSION = T.let(T.unsafe(nil), String)
+
+class RBI::Visibility < ::RBI::NodeWithComments
+ abstract!
+
+ sig { params(visibility: ::Symbol, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void }
+ def initialize(visibility, loc: T.unsafe(nil), comments: T.unsafe(nil)); end
+
+ sig { params(other: ::RBI::Visibility).returns(T::Boolean) }
+ def ==(other); end
+
+ sig { override.params(v: ::RBI::Printer).void }
+ def accept_printer(v); end
+
+ sig { returns(T::Boolean) }
+ def private?; end
+
+ sig { returns(T::Boolean) }
+ def protected?; end
+
+ sig { returns(T::Boolean) }
+ def public?; end
+
+ sig { returns(::Symbol) }
+ def visibility; end
+end
+
+class RBI::VisibilityGroup < ::RBI::Tree
+ sig { params(visibility: ::RBI::Visibility).void }
+ def initialize(visibility); end
+
+ sig { override.params(v: ::RBI::Printer).void }
+ def accept_printer(v); end
+
+ sig { override.returns(T::Boolean) }
+ def oneline?; end
+
+ sig { returns(::RBI::Visibility) }
+ def visibility; end
+end
+
+class RBI::Visitor
+ abstract!
+
+ def initialize(*args, &blk); end
+
+ sig { abstract.params(node: T.nilable(::RBI::Node)).void }
+ def visit(node); end
+
+ sig { params(nodes: T::Array[::RBI::Node]).void }
+ def visit_all(nodes); end
+end | true |
Other | Homebrew | brew | 39fc3862538fa5226f4d17e94f1e1c74b7eadeb2.json | keg_relocate.rb: create generic codesign_patched_binary | Library/Homebrew/keg_relocate.rb | @@ -214,6 +214,8 @@ def each_unique_binary_file(&block)
end
end
+ def codesign_patched_binary(_binary_file); end
+
def lib
path/"lib"
end | false |
Other | Homebrew | brew | cec469c3d956fc7cc056765c249b975ae0f8d2c3.json | rubocop: Remove an allowlist entry for `blacklist` usage
- The usage in the `xmlsectool` formula went away in
https://github.com/Homebrew/homebrew-core/commit/76618ad7fca31ed7c5a7c1f8a4c688662bbacc64.
- If I revert the changes in that commit and run
`brew style --only="Naming/InclusiveLanguage" xmlsectool`, RuboCop reports an
offense and suggests an alternative term. | Library/.rubocop.yml | @@ -95,9 +95,6 @@ Naming/InclusiveLanguage:
- "ssdb_slave" # Used in formula `ssdb`
- "var_slave" # Used in formula `ssdb`
- "patches/13_fix_scope_for_show_slave_status_data.patch" # Used in formula `mytop`
- blacklist:
- AllowedRegex:
- - "--listBlacklist" # Used in formula `xmlsectool`
Naming/MethodName:
IgnoredPatterns: | false |
Other | Homebrew | brew | ac9af0dbbc3b466dbef58ffd3a7ee14b1cec87db.json | github_packages: fix OOM with large bottles | Library/Homebrew/github_packages.rb | @@ -3,6 +3,7 @@
require "utils/curl"
require "json"
+require "zlib"
# GitHub Packages client.
#
@@ -21,6 +22,9 @@ class GitHubPackages
URL_REGEX = %r{(?:#{Regexp.escape(URL_PREFIX)}|#{Regexp.escape(DOCKER_PREFIX)})([\w-]+)/([\w-]+)}.freeze
+ GZIP_BUFFER_SIZE = 64 * 1024
+ private_constant :GZIP_BUFFER_SIZE
+
# Translate Homebrew tab.arch to OCI platform.architecture
TAB_ARCH_TO_PLATFORM_ARCHITECTURE = {
"arm64" => "arm64",
@@ -338,11 +342,14 @@ def upload_bottle(user, token, skopeo, formula_full_name, bottle_hash, keep_old:
"os.version" => os_version,
}.reject { |_, v| v.blank? }
- tar_sha256 = Digest::SHA256.hexdigest(
- Utils.safe_popen_read("gunzip", "--stdout", "--decompress", local_file),
- )
+ tar_sha256 = Digest::SHA256.new
+ Zlib::GzipReader.open(local_file) do |gz|
+ while (data = gz.read(GZIP_BUFFER_SIZE))
+ tar_sha256 << data
+ end
+ end
- config_json_sha256, config_json_size = write_image_config(platform_hash, tar_sha256, blobs)
+ config_json_sha256, config_json_size = write_image_config(platform_hash, tar_sha256.hexdigest, blobs)
formulae_dir = tag_hash["formulae_brew_sh_path"]
documentation = "https://formulae.brew.sh/#{formulae_dir}/#{formula_name}" if formula_core_tap | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.