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 | be41b12e4c0dd0adb013b831dcfe56be58203b5a.json | sandbox: restore old WINCH trap | Library/Homebrew/sandbox.rb | @@ -97,29 +97,29 @@ def exec(*args)
seatbelt.close
@start = Time.now
- $stdin.raw! if $stdin.tty?
- stdin_thread = T.let(nil, T.nilable(Thread))
-
begin
command = [SANDBOX_EXEC, "-f", seatbelt.path, *args]
# Start sandbox in a pseudoterminal to prevent access of the parent terminal.
T.unsafe(PTY).spawn(*command) do |r, w, pid|
- if $stdout.tty?
- w.winsize = $stdout.winsize
- trap(:WINCH) { w.winsize = $stdout.winsize }
- end
+ old_winch = trap(:WINCH) { w.winsize = $stdout.winsize if $stdout.tty? }
+ w.winsize = $stdout.winsize if $stdout.tty?
+
+ $stdin.raw! if $stdin.tty?
stdin_thread = Thread.new { IO.copy_stream($stdin, w) }
+
r.each_char { |c| print(c) }
+
Process.wait(pid)
+ ensure
+ stdin_thread&.kill
+ $stdin.cooked! if $stdin.tty?
+ trap(:WINCH, old_winch)
end
raise ErrorDuringExecution.new(command, status: $CHILD_STATUS) unless $CHILD_STATUS.success?
rescue
@failed = true
raise
ensure
- stdin_thread&.kill
- $stdin.cooked! if $stdin.tty?
-
seatbelt.unlink
sleep 0.1 # wait for a bit to let syslog catch up the latest events.
syslog_args = [ | false |
Other | Homebrew | brew | 79cb9e051bf4788a4ffb0e59523d342212715cbb.json | bump-cask-pr: use similar logic to `brew fetch` | Library/Homebrew/dev-cmd/bump-cask-pr.rb | @@ -2,6 +2,7 @@
# frozen_string_literal: true
require "cask"
+require "cask/download"
require "cli/parser"
require "utils/tar"
@@ -128,24 +129,23 @@ def bump_cask_pr
silent: true)
tmp_cask = Cask::CaskLoader.load(tmp_contents)
- tmp_config = cask.config
- tmp_url = tmp_cask.url.to_s
+ tmp_config = tmp_cask.config
if old_hash != :no_check
- new_hash = fetch_resource(cask, new_version, tmp_url) if new_hash.nil?
+ new_hash = fetch_cask(tmp_contents)[1] if new_hash.nil?
if tmp_contents.include?("Hardware::CPU.intel?")
other_intel = !Hardware::CPU.intel?
other_contents = tmp_contents.gsub("Hardware::CPU.intel?", other_intel.to_s)
- replacement_pairs << fetch_cask(other_contents, new_version)
+ replacement_pairs << fetch_cask(other_contents)
end
end
cask.languages.each do |language|
next if language == cask.language
lang_config = tmp_config.merge(Cask::Config.new(explicit: { languages: [language] }))
- replacement_pairs << fetch_cask(tmp_contents, new_version, config: lang_config)
+ replacement_pairs << fetch_cask(tmp_contents, config: lang_config)
end
end
end
@@ -184,23 +184,16 @@ def bump_cask_pr
GitHub.create_bump_pr(pr_info, args: args)
end
- def fetch_resource(cask, version, url, **specs)
- resource = Resource.new
- resource.url(url, specs)
- resource.owner = Resource.new(cask.token)
- resource.version = version
-
- resource_path = resource.fetch
- Utils::Tar.validate_file(resource_path)
- resource_path.sha256
- end
-
- def fetch_cask(contents, version, config: nil)
+ def fetch_cask(contents, config: nil)
cask = Cask::CaskLoader.load(contents)
cask.config = config if config.present?
- url = cask.url.to_s
old_hash = cask.sha256.to_s
- new_hash = fetch_resource(cask, version, url)
+
+ cask_download = Cask::Download.new(cask, quarantine: true)
+ download = cask_download.fetch(verify_download_integrity: false)
+ Utils::Tar.validate_file(download)
+ new_hash = download.sha256
+
[old_hash, new_hash]
end
| false |
Other | Homebrew | brew | 0f900edfa2a78d93142a2e060aa6c897cb2684d1.json | sandbox: start sandbox in a pseudoterminal | Library/Homebrew/sandbox.rb | @@ -2,6 +2,8 @@
# frozen_string_literal: true
require "erb"
+require "io/console"
+require "pty"
require "tempfile"
# Helper class for running a sub-process inside of a sandboxed environment.
@@ -95,12 +97,26 @@ def exec(*args)
seatbelt.close
@start = Time.now
+ $stdin.raw!
+ stdin_thread = T.let(nil, T.nilable(Thread))
+
begin
- T.unsafe(self).safe_system SANDBOX_EXEC, "-f", seatbelt.path, *args
+ command = [SANDBOX_EXEC, "-f", seatbelt.path, *args]
+ T.unsafe(PTY).spawn(*command) do |r, w, pid|
+ w.winsize = $stdout.winsize
+ trap(:WINCH) { w.winsize = $stdout.winsize }
+ stdin_thread = Thread.new { IO.copy_stream($stdin, w) }
+ r.each_char { |c| print(c) }
+ Process.wait(pid)
+ end
+ raise ErrorDuringExecution.new(command, status: $CHILD_STATUS) unless $CHILD_STATUS.success?
rescue
@failed = true
raise
ensure
+ stdin_thread&.kill
+ $stdin.cooked!
+
seatbelt.unlink
sleep 0.1 # wait for a bit to let syslog catch up the latest events.
syslog_args = [ | false |
Other | Homebrew | brew | 0fed05a7522797f256086d0b042fc0702cec6a4e.json | Apply suggestions from code review
Co-authored-by: Rylan Polster <rslpolster@gmail.com> | docs/Homebrew-brew-Maintainer-Guide.md | @@ -99,13 +99,13 @@ reports are available to Homebrew maintainers on [buildpulse.io](https://buildpu
summaries are published to [`#buildpulse-health`](https://machomebrew.slack.com/archives/C0268BSJBJ8) in Slack.
BuildPulse can be used as a guide to identify which flaky tests are causing the most disruption to the CI suite. To make
-the biggest improvements to the reliability of the build, we can focus on the most disruptive flaky tests first (i.e.,
+the biggest improvements to the reliability of the build, we can focus on the most disruptive flaky tests first (i.e.
the tests causing the most intermittent failures).
To help find the root cause for a particular flaky test, buildpulse.io provides links to the most recent CI job and
commit where the test failed and then passed with no change to the underlying code. You may want to check out the code
at that commit to attempt to reproduce the failure locally. You can also see the list of recent failures on
-buildpulse.io to determine if the test always fails the same way.
+[buildpulse.io](https://buildpulse.io) to determine if the test always fails the same way.
## Manpages and shell completions
| false |
Other | Homebrew | brew | 48e69ea3474edde6b7a1d6cb6a16ec4f2e3ee748.json | README: add @buildpulse link and logo. | README.md | @@ -90,6 +90,10 @@ Secure password storage and syncing is provided by [1Password for Teams](https:/
[](https://1password.com)
+Flaky test detection and tracking is provided by [BuildPulse](https://buildpulse.io/).
+
+[](https://buildpulse.io)
+
Homebrew is a member of the [Software Freedom Conservancy](https://sfconservancy.org).
[](https://sfconservancy.org) | false |
Other | Homebrew | brew | 70318c451a8f0f691eadefd82861b702e1c1c1c8.json | Update RBI files for sorbet. | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -110,7 +110,7 @@ class ActiveSupport::Cache::Entry
def expires_at=(value); end
- def initialize(value, compress: T.unsafe(nil), compress_threshold: T.unsafe(nil), version: T.unsafe(nil), expires_in: T.unsafe(nil), **_); end
+ def initialize(value, compress: T.unsafe(nil), compress_threshold: T.unsafe(nil), version: T.unsafe(nil), expires_in: T.unsafe(nil), **arg); end
def mismatched?(version); end
@@ -440,7 +440,7 @@ class ActiveSupport::Callbacks::Filters::Environment
end
class ActiveSupport::Callbacks::Filters::Environment
- def self.[](*_); end
+ def self.[](*arg); end
def self.members(); end
end
@@ -1285,7 +1285,7 @@ class ActiveSupport::ExecutionWrapper::CompleteHook
end
class ActiveSupport::ExecutionWrapper::CompleteHook
- def self.[](*_); end
+ def self.[](*arg); end
def self.members(); end
end
@@ -1299,7 +1299,7 @@ class ActiveSupport::ExecutionWrapper::RunHook
end
class ActiveSupport::ExecutionWrapper::RunHook
- def self.[](*_); end
+ def self.[](*arg); end
def self.members(); end
end
@@ -1363,7 +1363,7 @@ module ActiveSupport::ForkTracker
end
module ActiveSupport::ForkTracker::CoreExt
- def fork(*_); end
+ def fork(*arg); end
end
module ActiveSupport::ForkTracker::CoreExt
@@ -1697,15 +1697,15 @@ class ActiveSupport::Notifications::Fanout::Subscribers::AllMessages
def initialize(delegate); end
- def matches?(_); end
+ def matches?(arg); end
def publish(name, *args); end
def start(name, id, payload); end
def subscribed_to?(name); end
- def unsubscribe!(*_); end
+ def unsubscribe!(*arg); end
end
class ActiveSupport::Notifications::Fanout::Subscribers::AllMessages
@@ -1972,7 +1972,7 @@ class ActiveSupport::OrderedOptions
def []=(key, value); end
- def _get(_); end
+ def _get(arg); end
def method_missing(name, *args); end
end
@@ -2075,7 +2075,7 @@ end
class ActiveSupport::SafeBuffer
def %(args); end
- def *(*_); end
+ def *(*arg); end
def +(other); end
@@ -2472,11 +2472,11 @@ class ActiveSupport::TimeWithZone
def advance(options); end
- def after?(_); end
+ def after?(arg); end
def ago(other); end
- def before?(_); end
+ def before?(arg); end
def between?(min, max); end
@@ -2878,7 +2878,7 @@ end
class Array
def self.parse(string); end
- def self.try_convert(_); end
+ def self.try_convert(arg); end
def self.wrap(object); end
end
@@ -3346,7 +3346,7 @@ class Bundler::Fetcher::CompactIndex::ClientFetcher
end
class Bundler::Fetcher::CompactIndex::ClientFetcher
- def self.[](*_); end
+ def self.[](*arg); end
def self.members(); end
end
@@ -3613,7 +3613,7 @@ module Bundler::Plugin::API::Source
def dependency_names=(dependency_names); end
- def double_check_for(*_); end
+ def double_check_for(*arg); end
def eql?(other); end
@@ -3872,7 +3872,7 @@ class Bundler::VersionRanges::NEq
end
class Bundler::VersionRanges::NEq
- def self.[](*_); end
+ def self.[](*arg); end
def self.members(); end
end
@@ -3907,13 +3907,13 @@ class Bundler::VersionRanges::ReqR::Endpoint
end
class Bundler::VersionRanges::ReqR::Endpoint
- def self.[](*_); end
+ def self.[](*arg); end
def self.members(); end
end
class Bundler::VersionRanges::ReqR
- def self.[](*_); end
+ def self.[](*arg); end
def self.members(); end
end
@@ -4025,7 +4025,7 @@ class Byebug::Breakpoint
def id(); end
- def initialize(_, _1, _2); end
+ def initialize(arg, arg1, arg2); end
def pos(); end
@@ -4238,17 +4238,17 @@ class Byebug::Context
def frame=(pos); end
- def frame_binding(*_); end
+ def frame_binding(*arg); end
- def frame_class(*_); end
+ def frame_class(*arg); end
- def frame_file(*_); end
+ def frame_file(*arg); end
- def frame_line(*_); end
+ def frame_line(*arg); end
- def frame_method(*_); end
+ def frame_method(*arg); end
- def frame_self(*_); end
+ def frame_self(*arg); end
def full_location(); end
@@ -4264,11 +4264,11 @@ class Byebug::Context
def stack_size(); end
- def step_into(*_); end
+ def step_into(*arg); end
- def step_out(*_); end
+ def step_out(*arg); end
- def step_over(*_); end
+ def step_over(*arg); end
def stop_reason(); end
@@ -5929,7 +5929,7 @@ class CodeRay::Duo
end
class CodeRay::Duo
- def self.[](*_); end
+ def self.[](*arg); end
end
module CodeRay::Encoders
@@ -6210,11 +6210,11 @@ class CodeRay::Tokens
def split_into_parts(*sizes); end
- def text_token(*_); end
+ def text_token(*arg); end
def to_s(); end
- def tokens(*_); end
+ def tokens(*arg); end
end
class CodeRay::Tokens
@@ -6623,7 +6623,7 @@ module Commander
end
class CompilerSelector::Compiler
- def self.[](*_); end
+ def self.[](*arg); end
def self.members(); end
end
@@ -6874,7 +6874,7 @@ class Date
def compare_with_coercion(other); end
- def compare_without_coercion(_); end
+ def compare_without_coercion(arg); end
def default_inspect(); end
@@ -6890,13 +6890,13 @@ class Date
def minus_with_duration(other); end
- def minus_without_duration(_); end
+ def minus_without_duration(arg); end
def noon(); end
def plus_with_duration(other); end
- def plus_without_duration(_); end
+ def plus_without_duration(arg); end
def since(seconds); end
@@ -7065,7 +7065,7 @@ module DateAndTime::Compatibility
end
class Debrew::Menu::Entry
- def self.[](*_); end
+ def self.[](*arg); end
def self.members(); end
end
@@ -7178,7 +7178,7 @@ end
class DidYouMean::NullChecker
def corrections(); end
- def initialize(*_); end
+ def initialize(*arg); end
end
class DidYouMean::PlainFormatter
@@ -7259,7 +7259,7 @@ class Dir
end
class Dir
- def self.exists?(_); end
+ def self.exists?(arg); end
end
module DiskUsageExtension
@@ -7471,15 +7471,15 @@ class EmbeddedPatch
end
class Encoding
- def _dump(*_); end
+ def _dump(*arg); end
end
class Encoding::Converter
- def initialize(*_); end
+ def initialize(*arg); end
end
class Encoding
- def self._load(_); end
+ def self._load(arg); end
end
module Enumerable
@@ -7508,7 +7508,7 @@ module Enumerable
end
class Enumerator
- def +(_); end
+ def +(arg); end
def each_with_index(); end
end
@@ -7522,7 +7522,7 @@ class Enumerator::ArithmeticSequence
def exclude_end?(); end
- def last(*_); end
+ def last(*arg); end
def step(); end
end
@@ -7537,9 +7537,9 @@ class Enumerator::Chain
end
class Enumerator::Generator
- def each(*_, &blk); end
+ def each(*arg, &blk); end
- def initialize(*_); end
+ def initialize(*arg); end
end
class Errno::EAUTH
@@ -7707,7 +7707,7 @@ end
class Etc::Group
extend ::Enumerable
- def self.[](*_); end
+ def self.[](*arg); end
def self.each(&blk); end
@@ -7746,7 +7746,7 @@ end
class Etc::Passwd
extend ::Enumerable
- def self.[](*_); end
+ def self.[](*arg); end
def self.each(&blk); end
@@ -7808,7 +7808,7 @@ class FalseClass
end
class Fiber
- def transfer(*_); end
+ def transfer(*arg); end
end
class Fiber
@@ -7818,7 +7818,7 @@ end
class File
def self.atomic_write(file_name, temp_dir=T.unsafe(nil)); end
- def self.exists?(_); end
+ def self.exists?(arg); end
def self.probe_stat_in(dir); end
end
@@ -7878,7 +7878,7 @@ module FormulaCellarChecks
end
class FormulaConflict
- def self.[](*_); end
+ def self.[](*arg); end
def self.members(); end
end
@@ -7910,7 +7910,7 @@ module Forwardable
end
module GC
- def garbage_collect(*_); end
+ def garbage_collect(*arg); end
end
module GC
@@ -8603,7 +8603,7 @@ class Hash
end
class Hash
- def self.try_convert(_); end
+ def self.try_convert(arg); end
end
class HighLine
@@ -9151,7 +9151,7 @@ class HighLine::Question
def case(); end
- def case=(_); end
+ def case=(arg); end
def change_case(answer_string); end
@@ -9219,7 +9219,7 @@ class HighLine::Question
def in(); end
- def in=(_); end
+ def in=(arg); end
def in_range?(); end
@@ -9988,7 +9988,7 @@ class Homebrew::Livecheck::Strategy::Sparkle::Item
end
class Homebrew::Livecheck::Strategy::Sparkle::Item
- def self.[](*_); end
+ def self.[](*arg); end
def self.members(); end
end
@@ -10979,13 +10979,13 @@ module Hpricot
def self.build(ele=T.unsafe(nil), assigns=T.unsafe(nil), &blk); end
- def self.css(_, _1, _2); end
+ def self.css(arg, arg1, arg2); end
def self.make(input=T.unsafe(nil), opts=T.unsafe(nil), &blk); end
def self.parse(input=T.unsafe(nil), opts=T.unsafe(nil), &blk); end
- def self.scan(*_); end
+ def self.scan(*arg); end
def self.uxs(str); end
end
@@ -11025,9 +11025,9 @@ class IO
def echo?(); end
- def getch(*_); end
+ def getch(*arg); end
- def getpass(*_); end
+ def getpass(*arg); end
def goto(); end
@@ -11037,7 +11037,7 @@ class IO
def noecho(); end
- def nonblock(*_); end
+ def nonblock(*arg); end
def nonblock=(nonblock); end
@@ -11047,29 +11047,29 @@ class IO
def oflush(); end
- def pathconf(_); end
+ def pathconf(arg); end
def pressed?(); end
- def raw(*_); end
+ def raw(*arg); end
- def raw!(*_); end
+ def raw!(*arg); end
def ready?(); end
- def wait(*_); end
+ def wait(*arg); end
- def wait_readable(*_); end
+ def wait_readable(*arg); end
- def wait_writable(*_); end
+ def wait_writable(*arg); end
def winsize(); end
def winsize=(winsize); end
end
class IO
- def self.console(*_); end
+ def self.console(*arg); end
end
class IPAddr
@@ -11086,7 +11086,7 @@ module IRB
end
class IRB::Context
- def __exit__(*_); end
+ def __exit__(*arg); end
def __inspect__(); end
@@ -11111,7 +11111,7 @@ class IRB::DefaultEncodings
end
class IRB::DefaultEncodings
- def self.[](*_); end
+ def self.[](*arg); end
def self.members(); end
end
@@ -11326,11 +11326,11 @@ class Integer
end
class JSON::Ext::Generator::State
- def self.from_state(_); end
+ def self.from_state(arg); end
end
class JSON::Ext::Parser
- def initialize(*_); end
+ def initialize(*arg); end
end
JSON::Parser = JSON::Ext::Parser
@@ -11396,7 +11396,7 @@ module Kernel
def self.gem(dep, *reqs); end
- def self.load(*_); end
+ def self.load(*arg); end
def self.require(path); end
end
@@ -12777,9 +12777,9 @@ module MessagePack
end
class MessagePack::Packer
- def write_bin(_); end
+ def write_bin(arg); end
- def write_bin_header(_); end
+ def write_bin_header(arg); end
end
module MessagePack::Time
@@ -12813,7 +12813,7 @@ class MessagePack::Timestamp
end
class MessagePack::Unpacker
- def feed_reference(_); end
+ def feed_reference(arg); end
def freeze?(); end
end
@@ -13114,7 +13114,7 @@ class Minitest::Expectation
end
class Minitest::Expectation
- def self.[](*_); end
+ def self.[](*arg); end
def self.members(); end
end
@@ -13210,7 +13210,7 @@ class Minitest::Mock
def __call(name, data); end
- def __respond_to?(*_); end
+ def __respond_to?(*arg); end
def class(*args, &b); end
@@ -14109,9 +14109,9 @@ class NilClass
include ::MessagePack::CoreExt
def to_d(); end
- def try(_method_name=T.unsafe(nil), *_); end
+ def try(_method_name=T.unsafe(nil), *arg); end
- def try!(_method_name=T.unsafe(nil), *_); end
+ def try!(_method_name=T.unsafe(nil), *arg); end
end
class NoSeedProgressFormatter
@@ -14346,7 +14346,7 @@ class OpenSSL::BN
def -@(); end
- def /(_); end
+ def /(arg); end
def negative?(); end
end
@@ -14361,11 +14361,11 @@ class OpenSSL::KDF::KDFError
end
module OpenSSL::KDF
- def self.hkdf(*_); end
+ def self.hkdf(*arg); end
- def self.pbkdf2_hmac(*_); end
+ def self.pbkdf2_hmac(*arg); end
- def self.scrypt(*_); end
+ def self.scrypt(*arg); end
end
class OpenSSL::OCSP::Request
@@ -14379,7 +14379,7 @@ class OpenSSL::PKey::EC
end
class OpenSSL::PKey::EC::Point
- def to_octet_string(_); end
+ def to_octet_string(arg); end
end
module OpenSSL::SSL
@@ -15565,11 +15565,11 @@ end
class Pathname
include ::ELFShim
include ::MachOShim
- def fnmatch?(*_); end
+ def fnmatch?(*arg); end
- def glob(*_); end
+ def glob(*arg); end
- def make_symlink(_); end
+ def make_symlink(arg); end
end
class Pathname
@@ -15592,9 +15592,9 @@ end
class Proc
include ::MethodSource::SourceLocation::ProcExtensions
include ::MethodSource::MethodExtensions
- def <<(_); end
+ def <<(arg); end
- def >>(_); end
+ def >>(arg); end
def clone(); end
end
@@ -16686,7 +16686,7 @@ class Pry::Command::ShowInfo
def header_options(); end
- def initialize(*_); end
+ def initialize(*arg); end
def method_header(code_object, line_num); end
@@ -16789,7 +16789,7 @@ class Pry::Command::Whereami
def code?(); end
- def initialize(*_); end
+ def initialize(*arg); end
def location(); end
end
@@ -18199,7 +18199,7 @@ class Pry::Pager::PageTracker
end
class Pry::Pager::SimplePager
- def initialize(*_); end
+ def initialize(*arg); end
end
class Pry::Pager::SimplePager
@@ -18212,7 +18212,7 @@ class Pry::Pager::StopPaging
end
class Pry::Pager::SystemPager
- def initialize(*_); end
+ def initialize(*arg); end
end
class Pry::Pager::SystemPager
@@ -18887,9 +18887,9 @@ class RDiscount
def text(); end
- def to_html(*_); end
+ def to_html(*arg); end
- def toc_content(*_); end
+ def toc_content(*arg); end
VERSION = ::T.let(nil, ::T.untyped)
end
@@ -18993,7 +18993,7 @@ class RSpec::Core::Bisect::ExampleSetDescriptor
end
class RSpec::Core::Bisect::ExampleSetDescriptor
- def self.[](*_); end
+ def self.[](*arg); end
def self.members(); end
end
@@ -20199,7 +20199,7 @@ class RSpec::Core::Formatters::DeprecationFormatter::GeneratedDeprecationMessage
end
class RSpec::Core::Formatters::DeprecationFormatter::GeneratedDeprecationMessage
- def self.[](*_); end
+ def self.[](*arg); end
def self.members(); end
end
@@ -20241,7 +20241,7 @@ class RSpec::Core::Formatters::DeprecationFormatter::SpecifiedDeprecationMessage
end
class RSpec::Core::Formatters::DeprecationFormatter::SpecifiedDeprecationMessage
- def self.[](*_); end
+ def self.[](*arg); end
def self.members(); end
end
@@ -20308,7 +20308,7 @@ module RSpec::Core::Formatters::ExceptionPresenter::Factory::EmptyBacktraceForma
end
module RSpec::Core::Formatters::ExceptionPresenter::Factory::EmptyBacktraceFormatter
- def self.format_backtrace(*_); end
+ def self.format_backtrace(*arg); end
end
class RSpec::Core::Formatters::ExceptionPresenter::Factory
@@ -20921,7 +20921,7 @@ class RSpec::Core::Hooks::Hook
end
class RSpec::Core::Hooks::Hook
- def self.[](*_); end
+ def self.[](*arg); end
def self.members(); end
end
@@ -21006,7 +21006,7 @@ class RSpec::Core::Invocations::PrintHelp
end
class RSpec::Core::Invocations::PrintHelp
- def self.[](*_); end
+ def self.[](*arg); end
def self.members(); end
end
@@ -21031,7 +21031,7 @@ class RSpec::Core::LegacyExampleGroupHash
end
module RSpec::Core::MemoizedHelpers
- def initialize(*_); end
+ def initialize(*arg); end
def is_expected(); end
@@ -21258,7 +21258,7 @@ class RSpec::Core::Notifications::DeprecationNotification
end
class RSpec::Core::Notifications::DeprecationNotification
- def self.[](*_); end
+ def self.[](*arg); end
def self.from_hash(data); end
@@ -21272,7 +21272,7 @@ class RSpec::Core::Notifications::ExampleNotification
end
class RSpec::Core::Notifications::ExampleNotification
- def self.[](*_); end
+ def self.[](*arg); end
def self.for(example); end
@@ -21332,7 +21332,7 @@ class RSpec::Core::Notifications::GroupNotification
end
class RSpec::Core::Notifications::GroupNotification
- def self.[](*_); end
+ def self.[](*arg); end
def self.members(); end
end
@@ -21344,7 +21344,7 @@ class RSpec::Core::Notifications::MessageNotification
end
class RSpec::Core::Notifications::MessageNotification
- def self.[](*_); end
+ def self.[](*arg); end
def self.members(); end
end
@@ -21408,7 +21408,7 @@ class RSpec::Core::Notifications::SeedNotification
end
class RSpec::Core::Notifications::SeedNotification
- def self.[](*_); end
+ def self.[](*arg); end
def self.members(); end
end
@@ -21431,7 +21431,7 @@ class RSpec::Core::Notifications::StartNotification
end
class RSpec::Core::Notifications::StartNotification
- def self.[](*_); end
+ def self.[](*arg); end
def self.members(); end
end
@@ -21482,7 +21482,7 @@ class RSpec::Core::Notifications::SummaryNotification
end
class RSpec::Core::Notifications::SummaryNotification
- def self.[](*_); end
+ def self.[](*arg); end
def self.members(); end
end
@@ -22029,7 +22029,7 @@ class RSpec::Core::SharedContext::Recording
end
class RSpec::Core::SharedContext::Recording
- def self.[](*_); end
+ def self.[](*arg); end
def self.members(); end
end
@@ -22301,7 +22301,7 @@ class RSpec::Expectations::BlockSnippetExtractor::BlockLocator
end
class RSpec::Expectations::BlockSnippetExtractor::BlockLocator
- def self.[](*_); end
+ def self.[](*arg); end
def self.members(); end
end
@@ -22325,7 +22325,7 @@ class RSpec::Expectations::BlockSnippetExtractor::BlockTokenExtractor
end
class RSpec::Expectations::BlockSnippetExtractor::BlockTokenExtractor
- def self.[](*_); end
+ def self.[](*arg); end
def self.members(); end
end
@@ -22823,7 +22823,7 @@ class RSpec::Matchers::AliasedMatcher
def initialize(base_matcher, description_block); end
- def method_missing(*_); end
+ def method_missing(*arg); end
end
class RSpec::Matchers::AliasedMatcher
@@ -23145,7 +23145,7 @@ class RSpec::Matchers::BuiltIn::Compound::Or
end
class RSpec::Matchers::BuiltIn::Compound::SequentialEvaluator
- def initialize(actual, *_); end
+ def initialize(actual, *arg); end
def matcher_matches?(matcher); end
end
@@ -23207,7 +23207,7 @@ class RSpec::Matchers::BuiltIn::ContainExactly::PairingsMaximizer::Solution
end
class RSpec::Matchers::BuiltIn::ContainExactly::PairingsMaximizer::Solution
- def self.[](*_); end
+ def self.[](*arg); end
def self.members(); end
end
@@ -25230,7 +25230,7 @@ class RSpec::Mocks::Proxy::SpecificMessage
end
class RSpec::Mocks::Proxy::SpecificMessage
- def self.[](*_); end
+ def self.[](*arg); end
def self.members(); end
end
@@ -25893,7 +25893,7 @@ class RSpec::Support::ObjectFormatter::BaseInspector
end
class RSpec::Support::ObjectFormatter::BaseInspector
- def self.[](*_); end
+ def self.[](*arg); end
def self.can_inspect?(_object); end
@@ -25938,7 +25938,7 @@ class RSpec::Support::ObjectFormatter::InspectableItem
end
class RSpec::Support::ObjectFormatter::InspectableItem
- def self.[](*_); end
+ def self.[](*arg); end
def self.members(); end
end
@@ -26444,7 +26444,7 @@ class Rack::Auth::Digest::Request
def nonce(); end
- def respond_to?(sym, *_); end
+ def respond_to?(sym, *arg); end
end
class Rack::Auth::Digest::Request
@@ -27048,7 +27048,7 @@ class Rack::MockResponse
end
class Rack::MockResponse
- def self.[](*_); end
+ def self.[](*arg); end
end
module Rack::Multipart
@@ -27173,7 +27173,7 @@ class Rack::Multipart::Parser::MultipartInfo
end
class Rack::Multipart::Parser::MultipartInfo
- def self.[](*_); end
+ def self.[](*arg); end
def self.members(); end
end
@@ -27754,9 +27754,9 @@ class Rack::Session::Abstract::Persisted
end
class Rack::Session::Abstract::PersistedSecure
- def extract_session_id(*_); end
+ def extract_session_id(*arg); end
- def generate_sid(*_); end
+ def generate_sid(*arg); end
end
class Rack::Session::Abstract::PersistedSecure::SecureSessionHash
@@ -28005,11 +28005,11 @@ module Rack
end
class Random
- def self.bytes(_); end
+ def self.bytes(arg); end
end
class Range
- def %(_); end
+ def %(arg); end
def entries(); end
@@ -28114,7 +28114,7 @@ class Resource
end
class Resource::Partial
- def self.[](*_); end
+ def self.[](*arg); end
def self.members(); end
end
@@ -29652,13 +29652,13 @@ end
module RubyVM::MJIT
def self.enabled?(); end
- def self.pause(*_); end
+ def self.pause(*arg); end
def self.resume(); end
end
class RubyVM
- def self.resolve_feature_path(_); end
+ def self.resolve_feature_path(arg); end
end
class Sandbox
@@ -31000,13 +31000,13 @@ end
class StringScanner
def bol?(); end
- def initialize(*_); end
+ def initialize(*arg); end
Id = ::T.let(nil, ::T.untyped)
Version = ::T.let(nil, ::T.untyped)
end
class Struct
- def filter(*_); end
+ def filter(*arg); end
end
module Superenv
@@ -31132,7 +31132,7 @@ class Time
def compare_with_coercion(other); end
- def compare_without_coercion(_); end
+ def compare_without_coercion(arg); end
def end_of_day(); end
@@ -31142,7 +31142,7 @@ class Time
def eql_with_coercion(other); end
- def eql_without_coercion(_); end
+ def eql_without_coercion(arg); end
def in(seconds); end
@@ -31158,7 +31158,7 @@ class Time
def minus_without_coercion(other); end
- def minus_without_duration(_); end
+ def minus_without_duration(arg); end
def next_day(days=T.unsafe(nil)); end
@@ -31170,7 +31170,7 @@ class Time
def plus_with_duration(other); end
- def plus_without_duration(_); end
+ def plus_without_duration(arg); end
def prev_day(days=T.unsafe(nil)); end
@@ -31197,7 +31197,7 @@ class Time
def self.at_with_coercion(*args); end
- def self.at_without_coercion(*_); end
+ def self.at_without_coercion(*arg); end
def self.current(); end
@@ -31223,7 +31223,7 @@ class Time
end
class TracePoint
- def __enable(_, _1); end
+ def __enable(arg, arg1); end
def eval_script(); end
@@ -31857,17 +31857,17 @@ module Zeitwerk
end
class Zlib::Deflate
- def initialize(*_); end
+ def initialize(*arg); end
end
class Zlib::GzipReader
- def initialize(*_); end
+ def initialize(*arg); end
end
class Zlib::GzipWriter
- def initialize(*_); end
+ def initialize(*arg); end
end
class Zlib::Inflate
- def initialize(*_); end
+ def initialize(*arg); end
end | false |
Other | Homebrew | brew | bbfa52fcaa582a182a967651c934e6e5e97f6a22.json | formula_auditor: use brewed curl for homepage check when needed
If the download url is using brewed curl, use that too for the homepage check.
Ideally one would introduce the "using: :homebrew_curl" stanza for the homepage
line in the DSL, but it is easier to implicitely use the same logic
for homepages and url's and define the "using:" only once. | Library/Homebrew/formula_auditor.rb | @@ -412,11 +412,21 @@ def audit_homepage
return unless DevelopmentTools.curl_handles_most_https_certificates?
+ use_homebrew_curl = false
+ %w[Stable HEAD].each do |name|
+ spec_name = name.downcase.to_sym
+ next unless (spec = formula.send(spec_name))
+
+ use_homebrew_curl = spec.using == :homebrew_curl
+ break if use_homebrew_curl
+ end
+
if (http_content_problem = curl_check_http_content(homepage,
"homepage URL",
- user_agents: [:browser, :default],
- check_content: true,
- strict: @strict))
+ user_agents: [:browser, :default],
+ check_content: true,
+ strict: @strict,
+ use_homebrew_curl: use_homebrew_curl))
problem http_content_problem
end
end | false |
Other | Homebrew | brew | 05fa1f0cb85e2fd93a1eaec9662ca674fae91617.json | tap_auditor: use short names when checking exception lists | Library/Homebrew/tap_auditor.rb | @@ -15,12 +15,15 @@ class TapAuditor
def initialize(tap, strict:)
@name = tap.name
@path = tap.path
- @formula_names = tap.formula_names
@cask_tokens = tap.cask_tokens
@tap_audit_exceptions = tap.audit_exceptions
@tap_style_exceptions = tap.style_exceptions
@tap_pypi_formula_mappings = tap.pypi_formula_mappings
@problems = []
+
+ @formula_names = tap.formula_names.map do |formula_name|
+ formula_name.split("/").last
+ end
end
sig { void } | false |
Other | Homebrew | brew | e65c9d02abb5a0566f416e665c5f1503a7d9dc5e.json | PageMatch: Expand #find_versions tests | Library/Homebrew/livecheck/strategy/page_match.rb | @@ -44,20 +44,21 @@ def self.match?(url)
# With either approach, an array of unique matches is returned.
#
# @param content [String] the page content to check
- # @param regex [Regexp] a regex used for matching versions in the
+ # @param regex [Regexp, nil] a regex used for matching versions in the
# content
# @return [Array]
sig {
params(
content: String,
- regex: Regexp,
+ regex: T.nilable(Regexp),
block: T.nilable(
- T.proc.params(arg0: String, arg1: Regexp).returns(T.any(String, T::Array[String], NilClass)),
+ T.proc.params(arg0: String, arg1: T.nilable(Regexp)).returns(T.any(String, T::Array[String], NilClass)),
),
).returns(T::Array[String])
}
def self.versions_from_content(content, regex, &block)
return Strategy.handle_block_return(block.call(content, regex)) if block
+ return [] if regex.blank?
content.scan(regex).map do |match|
case match
@@ -73,22 +74,22 @@ def self.versions_from_content(content, regex, &block)
# regex for matching.
#
# @param url [String] the URL of the content to check
- # @param regex [Regexp] a regex used for matching versions
+ # @param regex [Regexp, nil] a regex used for matching versions
# @param provided_content [String, nil] page content to use in place of
# fetching via Strategy#page_content
# @return [Hash]
sig {
params(
url: String,
- regex: Regexp,
+ regex: T.nilable(Regexp),
provided_content: T.nilable(String),
_unused: T.nilable(T::Hash[Symbol, T.untyped]),
block: T.nilable(
- T.proc.params(arg0: String, arg1: Regexp).returns(T.any(String, T::Array[String], NilClass)),
+ T.proc.params(arg0: String, arg1: T.nilable(Regexp)).returns(T.any(String, T::Array[String], NilClass)),
),
).returns(T::Hash[Symbol, T.untyped])
}
- def self.find_versions(url:, regex:, provided_content: nil, **_unused, &block)
+ def self.find_versions(url:, regex: nil, provided_content: nil, **_unused, &block)
match_data = { matches: {}, regex: regex, url: url }
return match_data if url.blank? || (regex.blank? && block.blank?)
| true |
Other | Homebrew | brew | e65c9d02abb5a0566f416e665c5f1503a7d9dc5e.json | PageMatch: Expand #find_versions tests | Library/Homebrew/test/livecheck/strategy/page_match_spec.rb | @@ -108,6 +108,23 @@
it "finds versions in provided_content" do
expect(page_match.find_versions(url: http_url, regex: regex, provided_content: content))
.to eq(find_versions_cached_return_hash)
+
+ # NOTE: Ideally, a regex should always be provided to `#find_versions`
+ # for `PageMatch` but there are currently some `livecheck` blocks in
+ # casks where `#regex` isn't used and the regex only exists within a
+ # `strategy` block. This isn't ideal but, for the moment, we allow a
+ # `strategy` block to act as a substitution for a regex and we need to
+ # test this scenario to ensure it works.
+ #
+ # Under normal circumstances, a regex should be established in a
+ # `livecheck` block using `#regex` and passed into the `strategy` block
+ # using `do |page, regex|`. Hopefully over time we can address related
+ # issues and get to a point where regexes are always established using
+ # `#regex`.
+ expect(page_match.find_versions(url: http_url, provided_content: content) do |page|
+ page.scan(%r{href=.*?/homebrew[._-]v?(\d+(?:\.\d+)+)/?["' >]}i).map(&:first)
+ end)
+ .to eq(find_versions_cached_return_hash.merge({ regex: nil }))
end
end
end | true |
Other | Homebrew | brew | 035efa8ed6b9dc28a2ab9346c60f2131adec9a8c.json | Update RBI files for rubocop. | Library/Homebrew/sorbet/rbi/gems/rubocop@1.19.1.rbi | @@ -3501,7 +3501,7 @@ class RuboCop::Cop::Layout::RescueEnsureAlignment < ::RuboCop::Cop::Base
def access_modifier?(node); end
def access_modifier_node(node); end
- def aligned_with_leading_dot?(do_keyword_line, dot, rescue_keyword_column); end
+ def aligned_with_leading_dot?(do_keyword_line, send_node_loc, rescue_keyword_column); end
def aligned_with_line_break_method?(ancestor_node, node); end
def alignment_location(alignment_node); end
def alignment_node(node); end
@@ -8254,6 +8254,7 @@ class RuboCop::Cop::Style::DoubleNegation < ::RuboCop::Cop::Base
def allowed_in_returns?(node); end
def end_of_method_definition?(node); end
def find_def_node_from_ascendant(node); end
+ def find_last_child(node); end
end
RuboCop::Cop::Style::DoubleNegation::MSG = T.let(T.unsafe(nil), String)
@@ -8419,13 +8420,13 @@ class RuboCop::Cop::Style::Encoding < ::RuboCop::Cop::Base
private
- def encoding_line_number(processed_source); end
- def encoding_omitable?(line); end
- def offense(processed_source, line_number); end
+ def comments; end
+ def offense?(comment); end
+ def register_offense(line_number, comment); end
end
RuboCop::Cop::Style::Encoding::ENCODING_PATTERN = T.let(T.unsafe(nil), Regexp)
-RuboCop::Cop::Style::Encoding::MSG_UNNECESSARY = T.let(T.unsafe(nil), String)
+RuboCop::Cop::Style::Encoding::MSG = T.let(T.unsafe(nil), String)
RuboCop::Cop::Style::Encoding::SHEBANG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Style::EndBlock < ::RuboCop::Cop::Base
@@ -8735,6 +8736,7 @@ end
RuboCop::Cop::Style::GuardClause::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Style::HashAsLastArrayItem < ::RuboCop::Cop::Base
+ include ::RuboCop::Cop::RangeHelp
include ::RuboCop::Cop::ConfigurableEnforcedStyle
extend ::RuboCop::Cop::AutoCorrector
@@ -8748,6 +8750,7 @@ class RuboCop::Cop::Style::HashAsLastArrayItem < ::RuboCop::Cop::Base
def containing_array(hash_node); end
def explicit_array?(array); end
def last_array_item?(array, node); end
+ def remove_last_element_trailing_comma(corrector, node); end
end
class RuboCop::Cop::Style::HashConversion < ::RuboCop::Cop::Base
@@ -10314,11 +10317,15 @@ class RuboCop::Cop::Style::RedundantBegin < ::RuboCop::Cop::Base
private
def any_ancestor_assignment_node?(node); end
+ def begin_block_has_multiline_statements?(node); end
+ def condition_range(node); end
def contain_rescue_or_ensure?(node); end
+ def correct_modifier_form_after_multiline_begin_block(corrector, node); end
def empty_begin?(node); end
def register_offense(node); end
def replace_begin_with_statement(corrector, offense_range, node); end
def restore_removed_comments(corrector, offense_range, node, first_child); end
+ def use_modifier_form_after_multiline_begin_block?(node); end
def valid_begin_assignment?(node); end
def valid_context_using_only_begin?(node); end
end
@@ -10680,16 +10687,15 @@ class RuboCop::Cop::Style::RedundantSelfAssignmentBranch < ::RuboCop::Cop::Base
extend ::RuboCop::Cop::AutoCorrector
def bad_method?(param0 = T.unsafe(nil)); end
- def on_cvasgn(node); end
- def on_gvasgn(node); end
- def on_ivasgn(node); end
def on_lvasgn(node); end
private
- def autocorrect_if_condition(corrector, if_node, if_node_loc, keyword); end
+ def inconvertible_to_modifier?(if_branch, else_branch); end
+ def multiple_statements?(branch); end
def register_offense(if_node, offense_branch, opposite_branch, keyword); end
def self_assign?(variable, branch); end
+ def use_if_and_else_branch?(expression); end
end
RuboCop::Cop::Style::RedundantSelfAssignmentBranch::MSG = T.let(T.unsafe(nil), String)
@@ -11054,6 +11060,10 @@ class RuboCop::Cop::Style::SoleNestedConditional < ::RuboCop::Cop::Base
def requrie_parentheses?(condition); end
def use_variable_assignment_in_condition?(condition, if_branch); end
def wrap_condition?(node); end
+
+ class << self
+ def autocorrect_incompatible_with; end
+ end
end
RuboCop::Cop::Style::SoleNestedConditional::MSG = T.let(T.unsafe(nil), String)
@@ -11299,7 +11309,7 @@ class RuboCop::Cop::Style::SymbolArray < ::RuboCop::Cop::Base
private
- def correct_bracketed(corrector, node); end
+ def build_bracketed_array(node); end
def symbol_without_quote?(string); end
def symbols_contain_spaces?(node); end
def to_symbol_literal(string); end
@@ -11672,8 +11682,8 @@ class RuboCop::Cop::Style::WordArray < ::RuboCop::Cop::Base
private
+ def build_bracketed_array(node); end
def complex_content?(strings, complex_regex: T.unsafe(nil)); end
- def correct_bracketed(corrector, node); end
def invalid_percent_array_contents?(node); end
def word_regex; end
@@ -12826,6 +12836,7 @@ class RuboCop::MagicComment
def frozen_string_literal_specified?; end
def shareable_constant_value; end
def shareable_constant_value_specified?; end
+ def valid?; end
def valid_literal_value?; end
def valid_shareable_constant_value?; end
@@ -12840,27 +12851,31 @@ class RuboCop::MagicComment
end
class RuboCop::MagicComment::EditorComment < ::RuboCop::MagicComment
+ def encoding; end
+ def without(type); end
+
private
def match(keyword); end
def tokens; end
end
class RuboCop::MagicComment::EmacsComment < ::RuboCop::MagicComment::EditorComment
- def encoding; end
-
private
def extract_frozen_string_literal; end
def extract_shareable_constant_value; end
end
-RuboCop::MagicComment::EmacsComment::FORMAT = T.let(T.unsafe(nil), Regexp)
+RuboCop::MagicComment::EmacsComment::FORMAT = T.let(T.unsafe(nil), String)
RuboCop::MagicComment::EmacsComment::OPERATOR = T.let(T.unsafe(nil), String)
+RuboCop::MagicComment::EmacsComment::REGEXP = T.let(T.unsafe(nil), Regexp)
RuboCop::MagicComment::EmacsComment::SEPARATOR = T.let(T.unsafe(nil), String)
+RuboCop::MagicComment::KEYWORDS = T.let(T.unsafe(nil), Hash)
class RuboCop::MagicComment::SimpleComment < ::RuboCop::MagicComment
def encoding; end
+ def without(type); end
private
@@ -12876,8 +12891,10 @@ class RuboCop::MagicComment::VimComment < ::RuboCop::MagicComment::EditorComment
def shareable_constant_value; end
end
-RuboCop::MagicComment::VimComment::FORMAT = T.let(T.unsafe(nil), Regexp)
+RuboCop::MagicComment::VimComment::FORMAT = T.let(T.unsafe(nil), String)
+RuboCop::MagicComment::VimComment::KEYWORDS = T.let(T.unsafe(nil), Hash)
RuboCop::MagicComment::VimComment::OPERATOR = T.let(T.unsafe(nil), String)
+RuboCop::MagicComment::VimComment::REGEXP = T.let(T.unsafe(nil), Regexp)
RuboCop::MagicComment::VimComment::SEPARATOR = T.let(T.unsafe(nil), String)
module RuboCop::NameSimilarity | false |
Other | Homebrew | brew | b4adf2a42e48e6e92de45b9536373998bf8426c0.json | PageMatch#find_versions: Fix return conditions | Library/Homebrew/livecheck/strategy/page_match.rb | @@ -90,7 +90,7 @@ def self.versions_from_content(content, regex, &block)
}
def self.find_versions(url:, regex:, provided_content: nil, **_unused, &block)
match_data = { matches: {}, regex: regex, url: url }
- return match_data if url.blank? || regex.blank?
+ return match_data if url.blank? || (regex.blank? && block.blank?)
content = if provided_content.is_a?(String)
match_data[:cached] = true | false |
Other | Homebrew | brew | 9757b7bf89f00106b1ea2007625b9f7f37097fd2.json | Update RBI files for rubocop-performance. | Library/Homebrew/sorbet/rbi/gems/rubocop-performance@1.11.5.rbi | @@ -464,6 +464,7 @@ class RuboCop::Cop::Performance::RedundantEqualityComparisonBlock < ::RuboCop::C
def offense_range(node); end
def one_block_argument?(block_arguments); end
def same_block_argument_and_is_a_argument?(block_body, block_argument); end
+ def use_block_argument_in_method_argument_of_operand?(block_argument, operand); end
def use_equality_comparison_block?(block_body); end
end
| false |
Other | Homebrew | brew | fa635db8a1bd7494c355416421d52f87cdd0491c.json | Simplify re-definition of `targets` | Library/Homebrew/formula.rb | @@ -1588,10 +1588,8 @@ def time
# universal binaries in a {Formula}'s {Keg}.
sig { params(targets: T.nilable(T.any(Pathname, String))).void }
def deuniversalize_machos(*targets)
- if targets.blank?
- targets = any_installed_keg.mach_o_files.select do |file|
- file.arch == :universal && file.archs.include?(Hardware::CPU.arch)
- end
+ targets ||= any_installed_keg.mach_o_files.select do |file|
+ file.arch == :universal && file.archs.include?(Hardware::CPU.arch)
end
targets.each { |t| extract_macho_slice_from(Pathname.new(t), Hardware::CPU.arch) } | false |
Other | Homebrew | brew | 99635bf3aeeb40cdc6764cf17bdf872d642ce8e9.json | Remove need for homebrew/cask to be tapped | Library/Homebrew/cask/cask.rb | @@ -6,6 +6,7 @@
require "cask/dsl"
require "cask/metadata"
require "searchable"
+require "api"
module Cask
# An instance of a cask.
@@ -130,14 +131,21 @@ def outdated_versions(greedy: false, greedy_latest: false, greedy_auto_updates:
return []
end
+ latest_version = if ENV["HOMEBREW_JSON_CORE"].present? &&
+ (latest_cask_version = Homebrew::API::Versions.latest_cask_version(token))
+ DSL::Version.new latest_cask_version.to_s
+ else
+ version
+ end
+
installed = versions
current = installed.last
# not outdated unless there is a different version on tap
- return [] if current == version
+ return [] if current == latest_version
# collect all installed versions that are different than tap version and return them
- installed.reject { |v| v == version }
+ installed.reject { |v| v == latest_version }
end
def outdated_info(greedy, verbose, json, greedy_latest, greedy_auto_updates) | true |
Other | Homebrew | brew | 99635bf3aeeb40cdc6764cf17bdf872d642ce8e9.json | Remove need for homebrew/cask to be tapped | Library/Homebrew/cli/named_args.rb | @@ -45,18 +45,18 @@ def to_formulae
# the formula and prints a warning unless `only` is specified.
sig {
params(
- only: T.nilable(Symbol),
- ignore_unavailable: T.nilable(T::Boolean),
- method: T.nilable(Symbol),
- uniq: T::Boolean,
- prefer_loading_from_json: T::Boolean,
+ only: T.nilable(Symbol),
+ ignore_unavailable: T.nilable(T::Boolean),
+ method: T.nilable(Symbol),
+ uniq: T::Boolean,
+ prefer_loading_from_api: T::Boolean,
).returns(T::Array[T.any(Formula, Keg, Cask::Cask)])
}
def to_formulae_and_casks(only: parent&.only_formula_or_cask, ignore_unavailable: nil, method: nil, uniq: true,
- prefer_loading_from_json: false)
+ prefer_loading_from_api: false)
@to_formulae_and_casks ||= {}
@to_formulae_and_casks[only] ||= downcased_unique_named.flat_map do |name|
- load_formula_or_cask(name, only: only, method: method, prefer_loading_from_json: prefer_loading_from_json)
+ load_formula_or_cask(name, only: only, method: method, prefer_loading_from_api: prefer_loading_from_api)
rescue FormulaUnreadableError, FormulaClassUnavailableError,
TapFormulaUnreadableError, TapFormulaClassUnavailableError,
Cask::CaskUnreadableError
@@ -90,11 +90,11 @@ def to_formulae_and_casks_and_unavailable(only: parent&.only_formula_or_cask, me
end.uniq.freeze
end
- def load_formula_or_cask(name, only: nil, method: nil, prefer_loading_from_json: false)
+ def load_formula_or_cask(name, only: nil, method: nil, prefer_loading_from_api: false)
unreadable_error = nil
if only != :cask
- if prefer_loading_from_json && ENV["HOMEBREW_JSON_CORE"].present? &&
+ if prefer_loading_from_api && ENV["HOMEBREW_JSON_CORE"].present? &&
Homebrew::API::Bottle.available?(name)
Homebrew::API::Bottle.fetch_bottles(name)
end
@@ -133,9 +133,14 @@ def load_formula_or_cask(name, only: nil, method: nil, prefer_loading_from_json:
end
if only != :formula
+ if prefer_loading_from_api && ENV["HOMEBREW_JSON_CORE"].present? &&
+ Homebrew::API::CaskSource.available?(name)
+ contents = Homebrew::API::CaskSource.fetch(name)
+ end
+
begin
config = Cask::Config.from_args(@parent) if @cask_options
- cask = Cask::CaskLoader.load(name, config: config)
+ cask = Cask::CaskLoader.load(contents || name, config: config)
if unreadable_error.present?
onoe <<~EOS | true |
Other | Homebrew | brew | 99635bf3aeeb40cdc6764cf17bdf872d642ce8e9.json | Remove need for homebrew/cask to be tapped | Library/Homebrew/cmd/install.rb | @@ -155,7 +155,7 @@ def install
end
begin
- formulae, casks = args.named.to_formulae_and_casks(prefer_loading_from_json: true)
+ formulae, casks = args.named.to_formulae_and_casks(prefer_loading_from_api: true)
.partition { |formula_or_cask| formula_or_cask.is_a?(Formula) }
rescue FormulaOrCaskUnavailableError, Cask::CaskUnavailableError => e
retry if Tap.install_default_cask_tap_if_necessary(force: args.cask?) | true |
Other | Homebrew | brew | 99635bf3aeeb40cdc6764cf17bdf872d642ce8e9.json | Remove need for homebrew/cask to be tapped | Library/Homebrew/cmd/reinstall.rb | @@ -85,6 +85,9 @@ def reinstall_args
def reinstall
args = reinstall_args.parse
+ # We need to use the bottle API instead of just using the formula file
+ # from an installed keg because it will not contain bottle information.
+ # As a consequence, `brew reinstall` will also upgrade outdated formulae
if ENV["HOMEBREW_JSON_CORE"].present?
args.named.each do |name|
formula = Formulary.factory(name) | true |
Other | Homebrew | brew | 99635bf3aeeb40cdc6764cf17bdf872d642ce8e9.json | Remove need for homebrew/cask to be tapped | Library/Homebrew/cmd/update.sh | @@ -648,7 +648,8 @@ EOS
# HOMEBREW_UPDATE_PREINSTALL wasn't modified in subshell.
# shellcheck disable=SC2031
if [[ -n "${HOMEBREW_JSON_CORE}" ]] && [[ -n "${HOMEBREW_UPDATE_PREINSTALL}" ]] &&
- [[ "${DIR}" = "${HOMEBREW_LIBRARY}/Taps/homebrew/homebrew-core" ]]
+ [[ "${DIR}" = "${HOMEBREW_LIBRARY}/Taps/homebrew/homebrew-core" ||
+ "${DIR}" = "${HOMEBREW_LIBRARY}/Taps/homebrew/homebrew-cask" ]]
then
continue
fi | true |
Other | Homebrew | brew | 99635bf3aeeb40cdc6764cf17bdf872d642ce8e9.json | Remove need for homebrew/cask to be tapped | Library/Homebrew/cmd/upgrade.rb | @@ -225,6 +225,15 @@ def upgrade_outdated_formulae(formulae, args:)
def upgrade_outdated_casks(casks, args:)
return false if args.formula?
+ if ENV["HOMEBREW_JSON_CORE"].present?
+ casks = casks.map do |cask|
+ next cask if cask.tap.present? && cask.tap != "homebrew/cask"
+ next cask unless Homebrew::API::CaskSource.available?(cask.token)
+
+ Cask::CaskLoader.load Homebrew::API::CaskSource.fetch(cask.token)
+ end
+ end
+
Cask::Cmd::Upgrade.upgrade_casks(
*casks,
force: args.force?, | true |
Other | Homebrew | brew | 99635bf3aeeb40cdc6764cf17bdf872d642ce8e9.json | Remove need for homebrew/cask to be tapped | Library/Homebrew/extend/os/mac/tap.rb | @@ -4,7 +4,7 @@
class Tap
def self.install_default_cask_tap_if_necessary(force: false)
return false if default_cask_tap.installed?
-
+ return false if ENV["HOMEBREW_JSON_CORE"].present?
return false if !force && Tap.untapped_official_taps.include?(default_cask_tap.name)
default_cask_tap.install | true |
Other | Homebrew | brew | df086d618e28cee45011c1609c9884c278f53126.json | bump-formula-pr: use default remote if forcing Homebrew on Linux | Library/Homebrew/dev-cmd/bump-formula-pr.rb | @@ -87,7 +87,9 @@ def bump_formula_pr_args
def use_correct_linux_tap(formula, args:)
default_origin_branch = formula.tap.path.git_origin_branch
- return formula.tap.remote_repo, "origin", default_origin_branch, "-" if !OS.linux? || !formula.tap.core_tap?
+ if !OS.linux? || !formula.tap.core_tap? || Homebrew::EnvConfig.force_homebrew_on_linux?
+ return formula.tap.remote_repo, "origin", default_origin_branch, "-"
+ end
tap_remote_repo = formula.tap.full_name.gsub("linuxbrew", "homebrew")
homebrew_core_url = "https://github.com/#{tap_remote_repo}" | false |
Other | Homebrew | brew | d30773f81ee9e3c9485965b6585cce67284eccea.json | Update RBI files for rubocop-ast. | Library/Homebrew/sorbet/rbi/gems/rubocop-ast@1.10.0.rbi | @@ -278,6 +278,10 @@ class RuboCop::AST::AliasNode < ::RuboCop::AST::Node
def old_identifier; end
end
+class RuboCop::AST::AndAsgnNode < ::RuboCop::AST::OpAsgnNode
+ def operator; end
+end
+
class RuboCop::AST::AndNode < ::RuboCop::AST::Node
include ::RuboCop::AST::BinaryOperatorNode
include ::RuboCop::AST::PredicateOperatorNode
@@ -309,6 +313,11 @@ end
RuboCop::AST::ArrayNode::PERCENT_LITERAL_TYPES = T.let(T.unsafe(nil), Hash)
+class RuboCop::AST::AsgnNode < ::RuboCop::AST::Node
+ def expression; end
+ def name; end
+end
+
module RuboCop::AST::BasicLiteralNode
def value; end
end
@@ -383,6 +392,12 @@ class RuboCop::AST::CaseNode < ::RuboCop::AST::Node
def when_branches; end
end
+class RuboCop::AST::CasgnNode < ::RuboCop::AST::Node
+ def expression; end
+ def name; end
+ def namespace; end
+end
+
class RuboCop::AST::ClassNode < ::RuboCop::AST::Node
def body; end
def identifier; end
@@ -1771,6 +1786,17 @@ end
RuboCop::AST::NumericNode::SIGN_REGEX = T.let(T.unsafe(nil), Regexp)
+class RuboCop::AST::OpAsgnNode < ::RuboCop::AST::Node
+ def assignment_node; end
+ def expression; end
+ def name; end
+ def operator; end
+end
+
+class RuboCop::AST::OrAsgnNode < ::RuboCop::AST::OpAsgnNode
+ def operator; end
+end
+
class RuboCop::AST::OrNode < ::RuboCop::AST::Node
include ::RuboCop::AST::BinaryOperatorNode
include ::RuboCop::AST::PredicateOperatorNode | false |
Other | Homebrew | brew | 9589416fd42a09d3944328b9448b6c6f908104f8.json | Update RBI files for rubocop. | Library/Homebrew/sorbet/rbi/gems/rubocop@1.19.0.rbi | @@ -264,6 +264,7 @@ class RuboCop::CLI
def apply_default_formatter; end
def execute_runners; end
def handle_exiting_options; end
+ def parallel_by_default!; end
def run_command(name); end
def set_options_to_config_loader; end
def suggest_extensions; end
@@ -379,6 +380,8 @@ class RuboCop::CLI::Command::Version < ::RuboCop::CLI::Command::Base
def run; end
end
+RuboCop::CLI::DEFAULT_PARALLEL_OPTIONS = T.let(T.unsafe(nil), Array)
+
class RuboCop::CLI::Environment
def initialize(options, config_store, paths); end
@@ -601,7 +604,9 @@ class RuboCop::ConfigLoaderResolver
def inherited_file(path, inherit_from, file); end
def merge_hashes?(base_hash, derived_hash, key); end
def remote_file?(uri); end
- def should_union?(base_hash, key, inherit_mode); end
+ def should_merge?(mode, key); end
+ def should_override?(mode, key); end
+ def should_union?(derived_hash, base_hash, root_mode, key); end
def transform(config, &block); end
def warn_on_duplicate_setting(base_hash, derived_hash, key, **opts); end
end
@@ -929,14 +934,14 @@ class RuboCop::Cop::Badge
end
class RuboCop::Cop::Base
- extend ::RuboCop::ExcludeLimit
+ include ::RuboCop::AST::Sexp
include ::RuboCop::PathUtil
include ::RuboCop::Cop::Util
include ::RuboCop::Cop::IgnoredNode
include ::RuboCop::Cop::AutocorrectLogic
extend ::RuboCop::AST::Sexp
extend ::RuboCop::AST::NodePattern::Macros
- include ::RuboCop::AST::Sexp
+ extend ::RuboCop::ExcludeLimit
def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end
@@ -1951,6 +1956,7 @@ module RuboCop::Cop::Heredoc
def delimiter_string(node); end
def heredoc_type(node); end
+ def indent_level(str); end
end
RuboCop::Cop::Heredoc::OPENING_DELIMITER = T.let(T.unsafe(nil), Regexp)
@@ -2406,6 +2412,8 @@ RuboCop::Cop::Layout::EmptyComment::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Layout::EmptyLineAfterGuardClause < ::RuboCop::Cop::Base
include ::RuboCop::Cop::RangeHelp
extend ::RuboCop::Cop::AutoCorrector
+ extend ::RuboCop::PathUtil
+ extend ::RuboCop::Cop::Util
def on_if(node); end
@@ -2418,6 +2426,7 @@ class RuboCop::Cop::Layout::EmptyLineAfterGuardClause < ::RuboCop::Cop::Base
def heredoc_line(node, heredoc_node); end
def last_heredoc_argument(node); end
def last_heredoc_argument_node(node); end
+ def multiple_statements_on_line?(node); end
def next_line_empty?(line); end
def next_line_empty_or_enable_directive_comment?(line); end
def next_line_enable_directive_comment?(line); end
@@ -3023,7 +3032,6 @@ class RuboCop::Cop::Layout::HeredocIndentation < ::RuboCop::Cop::Base
def heredoc_body(node); end
def heredoc_end(node); end
def heredoc_indent_type(node); end
- def indent_level(str); end
def indentation_width; end
def indented_body(node); end
def indented_end(node); end
@@ -3195,8 +3203,8 @@ class RuboCop::Cop::Layout::LineEndStringConcatenationIndentation < ::RuboCop::C
private
def add_offense_and_correction(node, message); end
- def always_aligned?(dstr_node); end
def always_indented?(dstr_node); end
+ def base_column(child); end
def check_aligned(children, start_index); end
def check_indented(children); end
def strings_concatenated_with_backslash?(dstr_node); end
@@ -3493,6 +3501,8 @@ class RuboCop::Cop::Layout::RescueEnsureAlignment < ::RuboCop::Cop::Base
def access_modifier?(node); end
def access_modifier_node(node); end
+ def aligned_with_leading_dot?(do_keyword_line, dot, rescue_keyword_column); end
+ def aligned_with_line_break_method?(ancestor_node, node); end
def alignment_location(alignment_node); end
def alignment_node(node); end
def alignment_source(node, starting_loc); end
@@ -3510,7 +3520,6 @@ RuboCop::Cop::Layout::RescueEnsureAlignment::ALTERNATIVE_ACCESS_MODIFIERS = T.le
RuboCop::Cop::Layout::RescueEnsureAlignment::ANCESTOR_TYPES = T.let(T.unsafe(nil), Array)
RuboCop::Cop::Layout::RescueEnsureAlignment::ANCESTOR_TYPES_WITH_ACCESS_MODIFIERS = T.let(T.unsafe(nil), Array)
RuboCop::Cop::Layout::RescueEnsureAlignment::MSG = T.let(T.unsafe(nil), String)
-RuboCop::Cop::Layout::RescueEnsureAlignment::RUBY_2_5_ANCESTOR_TYPES = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Layout::SingleLineBlockChain < ::RuboCop::Cop::Base
include ::RuboCop::Cop::RangeHelp
@@ -3973,7 +3982,7 @@ class RuboCop::Cop::Layout::SpaceInsideParens < ::RuboCop::Cop::Base
def each_extraneous_space_in_empty_parens(token1, token2); end
def each_missing_space(token1, token2); end
def parens?(token1, token2); end
- def process_with_space_style(processed_source); end
+ def process_with_space_style(tokens); end
def same_line?(token1, token2); end
end
@@ -4069,8 +4078,10 @@ end
class RuboCop::Cop::Layout::TrailingWhitespace < ::RuboCop::Cop::Base
include ::RuboCop::Cop::RangeHelp
+ include ::RuboCop::Cop::Heredoc
extend ::RuboCop::Cop::AutoCorrector
+ def on_heredoc(_node); end
def on_new_investigation; end
private
@@ -4079,8 +4090,11 @@ class RuboCop::Cop::Layout::TrailingWhitespace < ::RuboCop::Cop::Base
def find_heredoc(line_number); end
def offense_range(lineno, line); end
def process_line(line, lineno); end
+ def process_line_in_heredoc(corrector, range, heredoc); end
def skip_heredoc?; end
def static?(heredoc); end
+ def whitespace_is_indentation?(range, level); end
+ def whitespace_only?(range); end
end
RuboCop::Cop::Layout::TrailingWhitespace::MSG = T.let(T.unsafe(nil), String)
@@ -4192,6 +4206,22 @@ end
RuboCop::Cop::Lint::AmbiguousOperator::AMBIGUITIES = T.let(T.unsafe(nil), Hash)
RuboCop::Cop::Lint::AmbiguousOperator::MSG_FORMAT = T.let(T.unsafe(nil), String)
+class RuboCop::Cop::Lint::AmbiguousRange < ::RuboCop::Cop::Base
+ extend ::RuboCop::Cop::AutoCorrector
+
+ def on_erange(node); end
+ def on_irange(node); end
+
+ private
+
+ def acceptable?(node); end
+ def acceptable_call?(node); end
+ def each_boundary(range); end
+ def require_parentheses_for_method_chain?; end
+end
+
+RuboCop::Cop::Lint::AmbiguousRange::MSG = T.let(T.unsafe(nil), String)
+
class RuboCop::Cop::Lint::AmbiguousRegexpLiteral < ::RuboCop::Cop::Base
extend ::RuboCop::Cop::AutoCorrector
@@ -4201,6 +4231,7 @@ class RuboCop::Cop::Lint::AmbiguousRegexpLiteral < ::RuboCop::Cop::Base
def find_offense_node(node, regexp_receiver); end
def find_offense_node_by(diagnostic); end
+ def first_argument_is_regexp?(node); end
def method_chain_to_regexp_receiver?(node, regexp_receiver); end
end
@@ -6620,6 +6651,7 @@ class RuboCop::Cop::Naming::InclusiveLanguage < ::RuboCop::Cop::Base
def create_multiple_word_message_for_file(words); end
def create_single_word_message_for_file(word); end
def ensure_regex_string(regex); end
+ def extract_regexp(term, term_definition); end
def find_flagged_term(word); end
def format_suggestions(suggestions); end
def investigate_filepath; end
@@ -6921,8 +6953,8 @@ module RuboCop::Cop::PercentArray
def check_bracketed_array(node, literal_prefix); end
def check_percent_array(node); end
def comments_in_array?(node); end
+ def invalid_percent_array_contents?(_node); end
def invalid_percent_array_context?(node); end
- def message(_node); end
end
module RuboCop::Cop::PercentLiteral
@@ -7088,6 +7120,29 @@ class RuboCop::Cop::Registry
end
end
+module RuboCop::Cop::RequireLibrary
+ extend ::RuboCop::AST::NodePattern::Macros
+
+ def ensure_required(corrector, node, library_name); end
+ def on_send(node); end
+ def remove_subsequent_requires(corrector, node, library_name); end
+ def require_any_library?(param0 = T.unsafe(nil)); end
+ def require_library_name?(param0 = T.unsafe(nil), param1); end
+
+ private
+
+ def on_new_investigation; end
+end
+
+class RuboCop::Cop::RequireLibraryCorrector
+ extend ::RuboCop::Cop::RangeHelp
+
+ class << self
+ def correct(corrector, node, library_name); end
+ def require_statement(library_name); end
+ end
+end
+
module RuboCop::Cop::RescueNode
def on_new_investigation; end
@@ -7941,6 +7996,7 @@ class RuboCop::Cop::Style::ConditionalAssignment < ::RuboCop::Cop::Base
def candidate_condition?(param0 = T.unsafe(nil)); end
def on_and_asgn(node); end
def on_case(node); end
+ def on_case_match(node); end
def on_casgn(node); end
def on_cvasgn(node); end
def on_gvasgn(node); end
@@ -8488,6 +8544,10 @@ class RuboCop::Cop::Style::ExplicitBlockArgument < ::RuboCop::Cop::Base
def add_block_argument(node, corrector); end
def block_body_range(block_node, send_node); end
+ def call_like?(node); end
+ def correct_call_node(node, corrector); end
+ def empty_arguments?(node); end
+ def insert_argument(node, corrector); end
def yielding_arguments?(block_args, yield_args); end
end
@@ -8800,7 +8860,6 @@ RuboCop::Cop::Style::HashSyntax::MSG_NO_MIXED_KEYS = T.let(T.unsafe(nil), String
class RuboCop::Cop::Style::HashTransformKeys < ::RuboCop::Cop::Base
include ::RuboCop::Cop::HashTransformMethod
- extend ::RuboCop::Cop::TargetRubyVersion
extend ::RuboCop::Cop::AutoCorrector
def on_bad_each_with_object(param0 = T.unsafe(nil)); end
@@ -8841,7 +8900,7 @@ class RuboCop::Cop::Style::IdenticalConditionalBranches < ::RuboCop::Cop::Base
def check_branches(node, branches); end
def check_expressions(node, expressions, insert_position); end
- def duplicated_expressions?(expressions); end
+ def duplicated_expressions?(node, expressions); end
def expand_elses(branch); end
def head(node); end
def message(node); end
@@ -9278,6 +9337,7 @@ class RuboCop::Cop::Style::MethodDefParentheses < ::RuboCop::Cop::Base
def arguments_without_parentheses?(node); end
def correct_arguments(arg_node, corrector); end
def correct_definition(def_node, corrector); end
+ def forced_parentheses?(node); end
def missing_parentheses(node); end
def require_parentheses?(args); end
def unwanted_parentheses(args); end
@@ -9307,6 +9367,7 @@ class RuboCop::Cop::Style::MissingElse < ::RuboCop::Cop::Base
include ::RuboCop::Cop::ConfigurableEnforcedStyle
def on_case(node); end
+ def on_case_match(node); end
def on_normal_if_unless(node); end
private
@@ -10614,6 +10675,25 @@ RuboCop::Cop::Style::RedundantSelfAssignment::ASSIGNMENT_TYPE_TO_RECEIVER_TYPE =
RuboCop::Cop::Style::RedundantSelfAssignment::METHODS_RETURNING_SELF = T.let(T.unsafe(nil), Set)
RuboCop::Cop::Style::RedundantSelfAssignment::MSG = T.let(T.unsafe(nil), String)
+class RuboCop::Cop::Style::RedundantSelfAssignmentBranch < ::RuboCop::Cop::Base
+ include ::RuboCop::Cop::RangeHelp
+ extend ::RuboCop::Cop::AutoCorrector
+
+ def bad_method?(param0 = T.unsafe(nil)); end
+ def on_cvasgn(node); end
+ def on_gvasgn(node); end
+ def on_ivasgn(node); end
+ def on_lvasgn(node); end
+
+ private
+
+ def autocorrect_if_condition(corrector, if_node, if_node_loc, keyword); end
+ def register_offense(if_node, offense_branch, opposite_branch, keyword); end
+ def self_assign?(variable, branch); end
+end
+
+RuboCop::Cop::Style::RedundantSelfAssignmentBranch::MSG = T.let(T.unsafe(nil), String)
+
class RuboCop::Cop::Style::RedundantSort < ::RuboCop::Cop::Base
include ::RuboCop::Cop::RangeHelp
extend ::RuboCop::Cop::AutoCorrector
@@ -10840,9 +10920,15 @@ class RuboCop::Cop::Style::Semicolon < ::RuboCop::Cop::Base
private
def check_for_line_terminator_or_opener; end
- def convention_on(line, column, autocorrect); end
def each_semicolon; end
+ def expressions_per_line(exprs); end
+ def find_semicolon_positions(line); end
+ def register_semicolon(line, column, after_expression); end
def tokens_for_lines; end
+
+ class << self
+ def autocorrect_incompatible_with; end
+ end
end
RuboCop::Cop::Style::Semicolon::MSG = T.let(T.unsafe(nil), String)
@@ -10974,6 +11060,8 @@ RuboCop::Cop::Style::SoleNestedConditional::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Style::SpecialGlobalVars < ::RuboCop::Cop::Base
include ::RuboCop::Cop::ConfigurableEnforcedStyle
+ include ::RuboCop::Cop::RangeHelp
+ include ::RuboCop::Cop::RequireLibrary
extend ::RuboCop::Cop::AutoCorrector
def autocorrect(corrector, node, global_var); end
@@ -10982,15 +11070,18 @@ class RuboCop::Cop::Style::SpecialGlobalVars < ::RuboCop::Cop::Base
private
+ def add_require_english?; end
def english_name_replacement(preferred_name, node); end
def format_english_message(global_var); end
def format_list(items); end
def format_message(english, regular, global); end
def preferred_names(global); end
def replacement(node, global_var); end
+ def should_require_english?(global_var); end
end
RuboCop::Cop::Style::SpecialGlobalVars::ENGLISH_VARS = T.let(T.unsafe(nil), Hash)
+RuboCop::Cop::Style::SpecialGlobalVars::LIBRARY_NAME = T.let(T.unsafe(nil), String)
RuboCop::Cop::Style::SpecialGlobalVars::MSG_BOTH = T.let(T.unsafe(nil), String)
RuboCop::Cop::Style::SpecialGlobalVars::MSG_ENGLISH = T.let(T.unsafe(nil), String)
RuboCop::Cop::Style::SpecialGlobalVars::MSG_REGULAR = T.let(T.unsafe(nil), String)
@@ -11581,8 +11672,9 @@ class RuboCop::Cop::Style::WordArray < ::RuboCop::Cop::Base
private
- def complex_content?(strings); end
+ def complex_content?(strings, complex_regex: T.unsafe(nil)); end
def correct_bracketed(corrector, node); end
+ def invalid_percent_array_contents?(node); end
def word_regex; end
class << self | false |
Other | Homebrew | brew | d75320069f37d757030c8e55d219fadd2107f8ba.json | resource_auditor: add audit for HEAD default branch | Library/Homebrew/resource_auditor.rb | @@ -124,6 +124,21 @@ def audit_urls
end
end
+ def audit_head_branch
+ return if !@online || !@strict || spec_name != :head || !Utils::Git.remote_exists?(url)
+
+ branch = Utils.popen_read("git", "ls-remote", "--symref", url, "HEAD")
+ .match(%r{ref: refs/heads/(.*?)\s+HEAD})[1]
+
+ return if branch == "master" && specs[:branch].blank? || branch == specs[:branch]
+
+ if branch == "master"
+ problem "Remove `branch: \"#{specs[:branch]}\"`"
+ else
+ problem "Use `branch: \"#{branch}\"` to specify the correct default branch"
+ end
+ end
+
def problem(text)
@problems << text
end | false |
Other | Homebrew | brew | c59d5db6313f1478f51e0c8dd71b376566c67c75.json | Remove unnecessary require statements | Library/Homebrew/livecheck/strategy/extract_plist.rb | @@ -3,7 +3,6 @@
require "bundle_version"
require "unversioned_cask_checker"
-require_relative "page_match"
module Homebrew
module Livecheck | true |
Other | Homebrew | brew | c59d5db6313f1478f51e0c8dd71b376566c67c75.json | Remove unnecessary require statements | Library/Homebrew/livecheck/strategy/header_match.rb | @@ -1,8 +1,6 @@
# typed: true
# frozen_string_literal: true
-require_relative "page_match"
-
module Homebrew
module Livecheck
module Strategy | true |
Other | Homebrew | brew | c936a9420eed710d955346cbfb76140a24d1b551.json | Improve documentation comments | Library/Homebrew/livecheck/strategy.rb | @@ -14,7 +14,7 @@ module Strategy
module_function
- # Strategy priorities informally range from 1 to 10, where 10 is the
+ # {Strategy} priorities informally range from 1 to 10, where 10 is the
# highest priority. 5 is the default priority because it's roughly in
# the middle of this range. Strategies with a priority of 0 (or lower)
# are ignored.
@@ -32,10 +32,10 @@ module Strategy
# The `curl` process will sometimes hang indefinitely (despite setting
# the `--max-time` argument) and it needs to be quit for livecheck to
# continue. This value is used to set the `timeout` argument on
- # `Utils::Curl` method calls in `Strategy`.
+ # `Utils::Curl` method calls in {Strategy}.
CURL_PROCESS_TIMEOUT = CURL_MAX_TIME + 5
- # Baseline `curl` arguments used in `Strategy` methods.
+ # Baseline `curl` arguments used in {Strategy} methods.
DEFAULT_CURL_ARGS = [
# Follow redirections to handle mirrors, relocations, etc.
"--location",
@@ -60,7 +60,7 @@ module Strategy
"--include",
] + DEFAULT_CURL_ARGS).freeze
- # Baseline `curl` options used in `Strategy` methods.
+ # Baseline `curl` options used in {Strategy} methods.
DEFAULT_CURL_OPTIONS = {
print_stdout: false,
print_stderr: false,
@@ -81,7 +81,7 @@ module Strategy
# Creates and/or returns a `@strategies` `Hash`, which maps a snake
# case strategy name symbol (e.g. `:page_match`) to the associated
- # {Strategy}.
+ # strategy.
#
# At present, this should only be called after tap strategies have been
# loaded, otherwise livecheck won't be able to use them.
@@ -102,12 +102,12 @@ def strategies
end
private_class_method :strategies
- # Returns the {Strategy} that corresponds to the provided `Symbol` (or
- # `nil` if there is no matching {Strategy}).
+ # Returns the strategy that corresponds to the provided `Symbol` (or
+ # `nil` if there is no matching strategy).
#
- # @param symbol [Symbol] the strategy name in snake case as a `Symbol`
- # (e.g. `:page_match`)
- # @return [Strategy, nil]
+ # @param symbol [Symbol, nil] the strategy name in snake case as a
+ # `Symbol` (e.g. `:page_match`)
+ # @return [Class, nil]
sig { params(symbol: T.nilable(Symbol)).returns(T.nilable(T.untyped)) }
def from_symbol(symbol)
strategies[symbol] if symbol.present?
@@ -116,10 +116,14 @@ def from_symbol(symbol)
# Returns an array of strategies that apply to the provided URL.
#
# @param url [String] the URL to check for matching strategies
- # @param livecheck_strategy [Symbol] a {Strategy} symbol from the
+ # @param livecheck_strategy [Symbol] a strategy symbol from the
+ # `livecheck` block
+ # @param url_provided [Boolean] whether a url is provided in the
# `livecheck` block
# @param regex_provided [Boolean] whether a regex is provided in the
# `livecheck` block
+ # @param block_provided [Boolean] whether a `strategy` block is provided
+ # in the `livecheck` block
# @return [Array]
sig {
params(
@@ -154,6 +158,12 @@ def from_url(url, livecheck_strategy: nil, url_provided: false, regex_provided:
end
end
+ # Collects HTTP response headers, starting with the provided URL.
+ # Redirections will be followed and all the response headers are
+ # collected into an array of hashes.
+ #
+ # @param url [String] the URL to fetch
+ # @return [Array]
sig { params(url: String).returns(T::Array[T::Hash[String, String]]) }
def self.page_headers(url)
headers = [] | true |
Other | Homebrew | brew | c936a9420eed710d955346cbfb76140a24d1b551.json | Improve documentation comments | Library/Homebrew/livecheck/strategy/electron_builder.rb | @@ -7,15 +7,17 @@ module Strategy
# The {ElectronBuilder} strategy fetches content at a URL and parses
# it as an electron-builder appcast in YAML format.
#
+ # This strategy is not applied automatically and it's necessary to use
+ # `strategy :electron_builder` in a `livecheck` block to apply it.
+ #
# @api private
class ElectronBuilder
extend T::Sig
NICE_NAME = "electron-builder"
# A priority of zero causes livecheck to skip the strategy. We do this
- # for {ElectronBuilder} so we can selectively apply the strategy using
- # `strategy :electron_builder` in a `livecheck` block.
+ # for {ElectronBuilder} so we can selectively apply it when appropriate.
PRIORITY = 0
# The `Regexp` used to determine if the strategy applies to the URL.
@@ -54,10 +56,10 @@ def self.versions_from_content(content, &block)
version.present? ? [version] : []
end
- # Checks the content at the URL for new versions.
+ # Checks the YAML content at the URL for new versions.
#
# @param url [String] the URL of the content to check
- # @param regex [Regexp] a regex used for matching versions in content
+ # @param regex [Regexp, nil] a regex used for matching versions
# @return [Hash]
sig {
params( | true |
Other | Homebrew | brew | c936a9420eed710d955346cbfb76140a24d1b551.json | Improve documentation comments | Library/Homebrew/livecheck/strategy/extract_plist.rb | @@ -8,26 +8,31 @@
module Homebrew
module Livecheck
module Strategy
- # The {ExtractPlist} strategy downloads the file at a URL and
- # extracts versions from contained `.plist` files.
+ # The {ExtractPlist} strategy downloads the file at a URL and extracts
+ # versions from contained `.plist` files using {UnversionedCaskChecker}.
+ #
+ # In practice, this strategy operates by downloading very large files,
+ # so it's both slow and data-intensive. As such, the {ExtractPlist}
+ # strategy should only be used as an absolute last resort.
+ #
+ # This strategy is not applied automatically and it's necessary to use
+ # `strategy :extract_plist` in a `livecheck` block to apply it.
#
# @api private
class ExtractPlist
extend T::Sig
- # A priority of zero causes livecheck to skip the strategy. We only
- # apply {ExtractPlist} using `strategy :extract_plist` in a `livecheck` block,
- # as we can't automatically determine when this can be successfully
- # applied to a URL without fetching the content.
+ # A priority of zero causes livecheck to skip the strategy. We do this
+ # for {ExtractPlist} so we can selectively apply it when appropriate.
PRIORITY = 0
# The `Regexp` used to determine if the strategy applies to the URL.
URL_MATCH_REGEX = %r{^https?://}i.freeze
# Whether the strategy can be applied to the provided URL.
- # The strategy will technically match any HTTP URL but is
- # only usable with a `livecheck` block containing a regex
- # or block.
+ #
+ # @param url [String] the URL to match against
+ # @return [Boolean]
sig { params(url: String).returns(T::Boolean) }
def self.match?(url)
URL_MATCH_REGEX.match?(url) | true |
Other | Homebrew | brew | c936a9420eed710d955346cbfb76140a24d1b551.json | Improve documentation comments | Library/Homebrew/livecheck/strategy/git.rb | @@ -118,7 +118,7 @@ def self.versions_from_tags(tags, regex = nil, &block)
# strings and parses the remaining text as a {Version}.
#
# @param url [String] the URL of the Git repository to check
- # @param regex [Regexp] the regex to use for matching versions
+ # @param regex [Regexp, nil] a regex used for matching versions
# @return [Hash]
sig {
params( | true |
Other | Homebrew | brew | c936a9420eed710d955346cbfb76140a24d1b551.json | Improve documentation comments | Library/Homebrew/livecheck/strategy/header_match.rb | @@ -9,16 +9,17 @@ module Strategy
# The {HeaderMatch} strategy follows all URL redirections and scans
# the resulting headers for matching text using the provided regex.
#
+ # This strategy is not applied automatically and it's necessary to use
+ # `strategy :header_match` in a `livecheck` block to apply it.
+ #
# @api private
class HeaderMatch
extend T::Sig
NICE_NAME = "Header match"
- # A priority of zero causes livecheck to skip the strategy. We only
- # apply {HeaderMatch} using `strategy :header_match` in a `livecheck`
- # block, as we can't automatically determine when this can be
- # successfully applied to a URL.
+ # A priority of zero causes livecheck to skip the strategy. We do this
+ # for {HeaderMatch} so we can selectively apply it when appropriate.
PRIORITY = 0
# The `Regexp` used to determine if the strategy applies to the URL.
@@ -28,9 +29,9 @@ class HeaderMatch
DEFAULT_HEADERS_TO_CHECK = ["content-disposition", "location"].freeze
# Whether the strategy can be applied to the provided URL.
- # The strategy will technically match any HTTP URL but is
- # only usable with a `livecheck` block containing a regex
- # or block.
+ #
+ # @param url [String] the URL to match against
+ # @return [Boolean]
sig { params(url: String).returns(T::Boolean) }
def self.match?(url)
URL_MATCH_REGEX.match?(url)
@@ -39,7 +40,7 @@ def self.match?(url)
# Identify versions from HTTP headers.
#
# @param headers [Hash] a hash of HTTP headers to check for versions
- # @param regex [Regexp, nil] a regex to use to identify versions
+ # @param regex [Regexp, nil] a regex for matching versions
# @return [Array]
sig {
params(
@@ -71,6 +72,10 @@ def self.versions_from_headers(headers, regex = nil, &block)
# Checks the final URL for new versions after following all redirections,
# using the provided regex for matching.
+ #
+ # @param url [String] the URL to fetch
+ # @param regex [Regexp, nil] a regex used for matching versions
+ # @return [Hash]
sig {
params(
url: String, | true |
Other | Homebrew | brew | c936a9420eed710d955346cbfb76140a24d1b551.json | Improve documentation comments | Library/Homebrew/livecheck/strategy/page_match.rb | @@ -11,9 +11,8 @@ module Strategy
# strategies apply to a given URL. Though {PageMatch} will technically
# match any HTTP URL, the strategy also requires a regex to function.
#
- # The {find_versions} method is also used within other
- # strategies, to handle the process of identifying version text in
- # content.
+ # The {find_versions} method is also used within other strategies,
+ # to handle the process of identifying version text in content.
#
# @api public
class PageMatch
@@ -22,16 +21,19 @@ class PageMatch
NICE_NAME = "Page match"
# A priority of zero causes livecheck to skip the strategy. We do this
- # for PageMatch so we can selectively apply the strategy only when a
- # regex is provided in a `livecheck` block.
+ # for {PageMatch} so we can selectively apply it only when a regex is
+ # provided in a `livecheck` block.
PRIORITY = 0
# The `Regexp` used to determine if the strategy applies to the URL.
URL_MATCH_REGEX = %r{^https?://}i.freeze
# Whether the strategy can be applied to the provided URL.
- # PageMatch will technically match any HTTP URL but is only
+ # {PageMatch} will technically match any HTTP URL but is only
# usable with a `livecheck` block containing a regex.
+ #
+ # @param url [String] the URL to match against
+ # @return [Boolean]
sig { params(url: String).returns(T::Boolean) }
def self.match?(url)
URL_MATCH_REGEX.match?(url)
@@ -71,8 +73,8 @@ def self.versions_from_content(content, regex, &block)
# regex for matching.
#
# @param url [String] the URL of the content to check
- # @param regex [Regexp] a regex used for matching versions in content
- # @param provided_content [String] page content to use in place of
+ # @param regex [Regexp] a regex used for matching versions
+ # @param provided_content [String, nil] page content to use in place of
# fetching via Strategy#page_content
# @return [Hash]
sig { | true |
Other | Homebrew | brew | c936a9420eed710d955346cbfb76140a24d1b551.json | Improve documentation comments | Library/Homebrew/livecheck/strategy/sparkle.rb | @@ -9,23 +9,24 @@ module Strategy
# The {Sparkle} strategy fetches content at a URL and parses
# it as a Sparkle appcast in XML format.
#
+ # This strategy is not applied automatically and it's necessary to use
+ # `strategy :sparkle` in a `livecheck` block to apply it.
+ #
# @api private
class Sparkle
extend T::Sig
- # A priority of zero causes livecheck to skip the strategy. We only
- # apply {Sparkle} using `strategy :sparkle` in a `livecheck` block,
- # as we can't automatically determine when this can be successfully
- # applied to a URL without fetching the content.
+ # A priority of zero causes livecheck to skip the strategy. We do this
+ # for {Sparkle} so we can selectively apply it when appropriate.
PRIORITY = 0
# The `Regexp` used to determine if the strategy applies to the URL.
URL_MATCH_REGEX = %r{^https?://}i.freeze
# Whether the strategy can be applied to the provided URL.
- # The strategy will technically match any HTTP URL but is
- # only usable with a `livecheck` block containing a regex
- # or block.
+ #
+ # @param url [String] the URL to match against
+ # @return [Boolean]
sig { params(url: String).returns(T::Boolean) }
def self.match?(url)
URL_MATCH_REGEX.match?(url)
@@ -54,6 +55,10 @@ def self.match?(url)
delegate short_version: :bundle_version
end
+ # Identify version information from a Sparkle appcast.
+ #
+ # @param content [String] the text of the Sparkle appcast
+ # @return [Item, nil]
sig { params(content: String).returns(T.nilable(Item)) }
def self.item_from_content(content)
require "rexml/document" | true |
Other | Homebrew | brew | f2bd39ccefd89a76c20c32b00fc6f3455885b6e0.json | Add additional method signatures to strategies | Library/Homebrew/livecheck/strategy.rb | @@ -86,6 +86,7 @@ module Strategy
# At present, this should only be called after tap strategies have been
# loaded, otherwise livecheck won't be able to use them.
# @return [Hash]
+ sig { returns(T::Hash[Symbol, T.untyped]) }
def strategies
return @strategies if defined? @strategies
@@ -107,8 +108,9 @@ def strategies
# @param symbol [Symbol] the strategy name in snake case as a `Symbol`
# (e.g. `:page_match`)
# @return [Strategy, nil]
+ sig { params(symbol: T.nilable(Symbol)).returns(T.nilable(T.untyped)) }
def from_symbol(symbol)
- strategies[symbol]
+ strategies[symbol] if symbol.present?
end
# Returns an array of strategies that apply to the provided URL.
@@ -119,7 +121,16 @@ def from_symbol(symbol)
# @param regex_provided [Boolean] whether a regex is provided in the
# `livecheck` block
# @return [Array]
- def from_url(url, livecheck_strategy: nil, url_provided: nil, regex_provided: nil, block_provided: nil)
+ sig {
+ params(
+ url: String,
+ livecheck_strategy: T.nilable(Symbol),
+ url_provided: T::Boolean,
+ regex_provided: T::Boolean,
+ block_provided: T::Boolean,
+ ).returns(T::Array[T.untyped])
+ }
+ def from_url(url, livecheck_strategy: nil, url_provided: false, regex_provided: false, block_provided: false)
usable_strategies = strategies.values.select do |strategy|
if strategy == PageMatch
# Only treat the `PageMatch` strategy as usable if a regex is
@@ -143,6 +154,7 @@ def from_url(url, livecheck_strategy: nil, url_provided: nil, regex_provided: ni
end
end
+ sig { params(url: String).returns(T::Array[T::Hash[String, String]]) }
def self.page_headers(url)
headers = []
| true |
Other | Homebrew | brew | f2bd39ccefd89a76c20c32b00fc6f3455885b6e0.json | Add additional method signatures to strategies | Library/Homebrew/livecheck/strategy/apache.rb | @@ -37,6 +37,7 @@ class Apache
#
# @param url [String] the URL to match against
# @return [Boolean]
+ sig { params(url: String).returns(T::Boolean) }
def self.match?(url)
URL_MATCH_REGEX.match?(url)
end | true |
Other | Homebrew | brew | f2bd39ccefd89a76c20c32b00fc6f3455885b6e0.json | Add additional method signatures to strategies | Library/Homebrew/livecheck/strategy/bitbucket.rb | @@ -44,6 +44,7 @@ class Bitbucket
#
# @param url [String] the URL to match against
# @return [Boolean]
+ sig { params(url: String).returns(T::Boolean) }
def self.match?(url)
URL_MATCH_REGEX.match?(url)
end | true |
Other | Homebrew | brew | f2bd39ccefd89a76c20c32b00fc6f3455885b6e0.json | Add additional method signatures to strategies | Library/Homebrew/livecheck/strategy/cpan.rb | @@ -35,6 +35,7 @@ class Cpan
#
# @param url [String] the URL to match against
# @return [Boolean]
+ sig { params(url: String).returns(T::Boolean) }
def self.match?(url)
URL_MATCH_REGEX.match?(url)
end | true |
Other | Homebrew | brew | f2bd39ccefd89a76c20c32b00fc6f3455885b6e0.json | Add additional method signatures to strategies | Library/Homebrew/livecheck/strategy/git.rb | @@ -50,6 +50,7 @@ def self.match?(url)
# @param url [String] the URL of the Git repository to check
# @param regex [Regexp] the regex to use for filtering tags
# @return [Hash]
+ sig { params(url: String, regex: T.nilable(Regexp)).returns(T::Hash[Symbol, T.untyped]) }
def self.tag_info(url, regex = nil)
# Open3#capture3 is used here because we need to capture stderr
# output and handle it in an appropriate manner. Alternatives like | true |
Other | Homebrew | brew | f2bd39ccefd89a76c20c32b00fc6f3455885b6e0.json | Add additional method signatures to strategies | Library/Homebrew/livecheck/strategy/github_latest.rb | @@ -52,6 +52,7 @@ class GithubLatest
#
# @param url [String] the URL to match against
# @return [Boolean]
+ sig { params(url: String).returns(T::Boolean) }
def self.match?(url)
URL_MATCH_REGEX.match?(url)
end | true |
Other | Homebrew | brew | f2bd39ccefd89a76c20c32b00fc6f3455885b6e0.json | Add additional method signatures to strategies | Library/Homebrew/livecheck/strategy/gnome.rb | @@ -40,6 +40,7 @@ class Gnome
#
# @param url [String] the URL to match against
# @return [Boolean]
+ sig { params(url: String).returns(T::Boolean) }
def self.match?(url)
URL_MATCH_REGEX.match?(url)
end | true |
Other | Homebrew | brew | f2bd39ccefd89a76c20c32b00fc6f3455885b6e0.json | Add additional method signatures to strategies | Library/Homebrew/livecheck/strategy/gnu.rb | @@ -44,6 +44,7 @@ class Gnu
#
# @param url [String] the URL to match against
# @return [Boolean]
+ sig { params(url: String).returns(T::Boolean) }
def self.match?(url)
URL_MATCH_REGEX.match?(url) && url.exclude?("savannah.")
end | true |
Other | Homebrew | brew | f2bd39ccefd89a76c20c32b00fc6f3455885b6e0.json | Add additional method signatures to strategies | Library/Homebrew/livecheck/strategy/hackage.rb | @@ -37,6 +37,7 @@ class Hackage
#
# @param url [String] the URL to match against
# @return [Boolean]
+ sig { params(url: String).returns(T::Boolean) }
def self.match?(url)
URL_MATCH_REGEX.match?(url)
end | true |
Other | Homebrew | brew | f2bd39ccefd89a76c20c32b00fc6f3455885b6e0.json | Add additional method signatures to strategies | Library/Homebrew/livecheck/strategy/launchpad.rb | @@ -35,6 +35,7 @@ class Launchpad
#
# @param url [String] the URL to match against
# @return [Boolean]
+ sig { params(url: String).returns(T::Boolean) }
def self.match?(url)
URL_MATCH_REGEX.match?(url)
end | true |
Other | Homebrew | brew | f2bd39ccefd89a76c20c32b00fc6f3455885b6e0.json | Add additional method signatures to strategies | Library/Homebrew/livecheck/strategy/npm.rb | @@ -31,6 +31,7 @@ class Npm
#
# @param url [String] the URL to match against
# @return [Boolean]
+ sig { params(url: String).returns(T::Boolean) }
def self.match?(url)
URL_MATCH_REGEX.match?(url)
end | true |
Other | Homebrew | brew | f2bd39ccefd89a76c20c32b00fc6f3455885b6e0.json | Add additional method signatures to strategies | Library/Homebrew/livecheck/strategy/pypi.rb | @@ -41,6 +41,7 @@ class Pypi
#
# @param url [String] the URL to match against
# @return [Boolean]
+ sig { params(url: String).returns(T::Boolean) }
def self.match?(url)
URL_MATCH_REGEX.match?(url)
end | true |
Other | Homebrew | brew | f2bd39ccefd89a76c20c32b00fc6f3455885b6e0.json | Add additional method signatures to strategies | Library/Homebrew/livecheck/strategy/sourceforge.rb | @@ -47,6 +47,7 @@ class Sourceforge
#
# @param url [String] the URL to match against
# @return [Boolean]
+ sig { params(url: String).returns(T::Boolean) }
def self.match?(url)
URL_MATCH_REGEX.match?(url)
end | true |
Other | Homebrew | brew | f2bd39ccefd89a76c20c32b00fc6f3455885b6e0.json | Add additional method signatures to strategies | Library/Homebrew/livecheck/strategy/xorg.rb | @@ -64,6 +64,7 @@ class Xorg
#
# @param url [String] the URL to match against
# @return [Boolean]
+ sig { params(url: String).returns(T::Boolean) }
def self.match?(url)
URL_MATCH_REGEX.match?(url)
end | true |
Other | Homebrew | brew | 7e07010f06a594f72cbf12a5cae889eaa15c4373.json | Improve standardization of strategy tests | Library/Homebrew/test/livecheck/strategy/apache_spec.rb | @@ -10,11 +10,11 @@
let(:non_apache_url) { "https://brew.sh/test" }
describe "::match?" do
- it "returns true if the argument provided is an Apache URL" do
+ it "returns true for an Apache URL" do
expect(apache.match?(apache_url)).to be true
end
- it "returns false if the argument provided is not an Apache URL" do
+ it "returns false for a non-Apache URL" do
expect(apache.match?(non_apache_url)).to be false
end
end | true |
Other | Homebrew | brew | 7e07010f06a594f72cbf12a5cae889eaa15c4373.json | Improve standardization of strategy tests | Library/Homebrew/test/livecheck/strategy/bitbucket_spec.rb | @@ -10,11 +10,11 @@
let(:non_bitbucket_url) { "https://brew.sh/test" }
describe "::match?" do
- it "returns true if the argument provided is a Bitbucket URL" do
+ it "returns true for a Bitbucket URL" do
expect(bitbucket.match?(bitbucket_url)).to be true
end
- it "returns false if the argument provided is not a Bitbucket URL" do
+ it "returns false for a non-Bitbucket URL" do
expect(bitbucket.match?(non_bitbucket_url)).to be false
end
end | true |
Other | Homebrew | brew | 7e07010f06a594f72cbf12a5cae889eaa15c4373.json | Improve standardization of strategy tests | Library/Homebrew/test/livecheck/strategy/cpan_spec.rb | @@ -11,12 +11,12 @@
let(:non_cpan_url) { "https://brew.sh/test" }
describe "::match?" do
- it "returns true if the argument provided is a CPAN URL" do
+ it "returns true for a CPAN URL" do
expect(cpan.match?(cpan_url_no_subdirectory)).to be true
expect(cpan.match?(cpan_url_with_subdirectory)).to be true
end
- it "returns false if the argument provided is not a CPAN URL" do
+ it "returns false for a non-CPAN URL" do
expect(cpan.match?(non_cpan_url)).to be false
end
end | true |
Other | Homebrew | brew | 7e07010f06a594f72cbf12a5cae889eaa15c4373.json | Improve standardization of strategy tests | Library/Homebrew/test/livecheck/strategy/electron_builder_spec.rb | @@ -6,8 +6,8 @@
describe Homebrew::Livecheck::Strategy::ElectronBuilder do
subject(:electron_builder) { described_class }
- let(:valid_url) { "https://www.example.com/example/latest-mac.yml" }
- let(:invalid_url) { "https://brew.sh/test" }
+ let(:yaml_url) { "https://www.example.com/example/latest-mac.yml" }
+ let(:non_yaml_url) { "https://brew.sh/test" }
let(:electron_builder_yaml) {
<<~EOS
@@ -29,12 +29,12 @@
let(:versions) { ["1.2.3"] }
describe "::match?" do
- it "returns true for any URL pointing to a YAML file" do
- expect(electron_builder.match?(valid_url)).to be true
+ it "returns true for a YAML file URL" do
+ expect(electron_builder.match?(yaml_url)).to be true
end
- it "returns false for a URL not pointing to a YAML file" do
- expect(electron_builder.match?(invalid_url)).to be false
+ it "returns false for non-YAML URL" do
+ expect(electron_builder.match?(non_yaml_url)).to be false
end
end
| true |
Other | Homebrew | brew | 7e07010f06a594f72cbf12a5cae889eaa15c4373.json | Improve standardization of strategy tests | Library/Homebrew/test/livecheck/strategy/git_spec.rb | @@ -39,11 +39,11 @@
end
describe "::match?" do
- it "returns true if the argument provided is a Git repository" do
+ it "returns true for a Git repository URL" do
expect(git.match?(git_url)).to be true
end
- it "returns false if the argument provided is not a Git repository" do
+ it "returns false for a non-Git URL" do
expect(git.match?(non_git_url)).to be false
end
end | true |
Other | Homebrew | brew | 7e07010f06a594f72cbf12a5cae889eaa15c4373.json | Improve standardization of strategy tests | Library/Homebrew/test/livecheck/strategy/github_latest_spec.rb | @@ -14,19 +14,19 @@
let(:non_github_url) { "https://brew.sh/test" }
describe "::match?" do
- it "returns true if the argument provided is a GitHub release artifact URL" do
+ it "returns true for a GitHub release artifact URL" do
expect(github_latest.match?(github_release_artifact_url)).to be true
end
- it "returns true if the argument provided is a GitHub tag archive URL" do
+ it "returns true for a GitHub tag archive URL" do
expect(github_latest.match?(github_tag_archive_url)).to be true
end
- it "returns true if the argument provided is a GitHub repository upload URL" do
+ it "returns true for a GitHub repository upload URL" do
expect(github_latest.match?(github_repository_upload_url)).to be true
end
- it "returns false if the argument provided is not a GitHub URL" do
+ it "returns false for a non-GitHub URL" do
expect(github_latest.match?(non_github_url)).to be false
end
end | true |
Other | Homebrew | brew | 7e07010f06a594f72cbf12a5cae889eaa15c4373.json | Improve standardization of strategy tests | Library/Homebrew/test/livecheck/strategy/gnome_spec.rb | @@ -10,11 +10,11 @@
let(:non_gnome_url) { "https://brew.sh/test" }
describe "::match?" do
- it "returns true if the argument provided is a GNOME URL" do
+ it "returns true for a GNOME URL" do
expect(gnome.match?(gnome_url)).to be true
end
- it "returns false if the argument provided is not a GNOME URL" do
+ it "returns false for a non-GNOME URL" do
expect(gnome.match?(non_gnome_url)).to be false
end
end | true |
Other | Homebrew | brew | 7e07010f06a594f72cbf12a5cae889eaa15c4373.json | Improve standardization of strategy tests | Library/Homebrew/test/livecheck/strategy/gnu_spec.rb | @@ -11,15 +11,15 @@
let(:non_gnu_url) { "https://brew.sh/test" }
describe "::match?" do
- it "returns true if the argument provided is a non-Savannah GNU URL" do
+ it "returns true for a [non-Savannah] GNU URL" do
expect(gnu.match?(gnu_url)).to be true
end
- it "returns false if the argument provided is a Savannah GNU URL" do
+ it "returns false for a Savannah GNU URL" do
expect(gnu.match?(savannah_gnu_url)).to be false
end
- it "returns false if the argument provided is not a GNU URL" do
+ it "returns false for a non-GNU URL (not nongnu.org)" do
expect(gnu.match?(non_gnu_url)).to be false
end
end | true |
Other | Homebrew | brew | 7e07010f06a594f72cbf12a5cae889eaa15c4373.json | Improve standardization of strategy tests | Library/Homebrew/test/livecheck/strategy/hackage_spec.rb | @@ -11,12 +11,12 @@
let(:non_hackage_url) { "https://brew.sh/test" }
describe "::match?" do
- it "returns true if the argument provided is a Hackage URL" do
+ it "returns true for a Hackage URL" do
expect(hackage.match?(hackage_url)).to be true
expect(hackage.match?(hackage_downloads_url)).to be true
end
- it "returns false if the argument provided is not a Hackage URL" do
+ it "returns false for a non-Hackage URL" do
expect(hackage.match?(non_hackage_url)).to be false
end
end | true |
Other | Homebrew | brew | 7e07010f06a594f72cbf12a5cae889eaa15c4373.json | Improve standardization of strategy tests | Library/Homebrew/test/livecheck/strategy/header_match_spec.rb | @@ -6,7 +6,8 @@
describe Homebrew::Livecheck::Strategy::HeaderMatch do
subject(:header_match) { described_class }
- let(:url) { "https://www.example.com/" }
+ let(:http_url) { "https://brew.sh/blog/" }
+ let(:non_http_url) { "ftp://brew.sh/" }
let(:versions) {
versions = {
@@ -47,8 +48,12 @@
}
describe "::match?" do
- it "returns true for any URL" do
- expect(header_match.match?(url)).to be true
+ it "returns true for an HTTP URL" do
+ expect(header_match.match?(http_url)).to be true
+ end
+
+ it "returns false for a non-HTTP URL" do
+ expect(header_match.match?(non_http_url)).to be false
end
end
| true |
Other | Homebrew | brew | 7e07010f06a594f72cbf12a5cae889eaa15c4373.json | Improve standardization of strategy tests | Library/Homebrew/test/livecheck/strategy/launchpad_spec.rb | @@ -10,11 +10,11 @@
let(:non_launchpad_url) { "https://brew.sh/test" }
describe "::match?" do
- it "returns true if the argument provided is a Launchpad URL" do
+ it "returns true for a Launchpad URL" do
expect(launchpad.match?(launchpad_url)).to be true
end
- it "returns false if the argument provided is not a Launchpad URL" do
+ it "returns false for a non-Launchpad URL" do
expect(launchpad.match?(non_launchpad_url)).to be false
end
end | true |
Other | Homebrew | brew | 7e07010f06a594f72cbf12a5cae889eaa15c4373.json | Improve standardization of strategy tests | Library/Homebrew/test/livecheck/strategy/npm_spec.rb | @@ -11,12 +11,12 @@
let(:non_npm_url) { "https://brew.sh/test" }
describe "::match?" do
- it "returns true if the argument provided is an npm URL" do
+ it "returns true for an npm URL" do
expect(npm.match?(npm_url)).to be true
expect(npm.match?(npm_scoped_url)).to be true
end
- it "returns false if the argument provided is not an npm URL" do
+ it "returns false for a non-npm URL" do
expect(npm.match?(non_npm_url)).to be false
end
end | true |
Other | Homebrew | brew | 7e07010f06a594f72cbf12a5cae889eaa15c4373.json | Improve standardization of strategy tests | Library/Homebrew/test/livecheck/strategy/page_match_spec.rb | @@ -6,7 +6,9 @@
describe Homebrew::Livecheck::Strategy::PageMatch do
subject(:page_match) { described_class }
- let(:url) { "https://brew.sh/blog/" }
+ let(:http_url) { "https://brew.sh/blog/" }
+ let(:non_http_url) { "ftp://brew.sh/" }
+
let(:regex) { %r{href=.*?/homebrew[._-]v?(\d+(?:\.\d+)+)/?["' >]}i }
let(:content) {
@@ -50,7 +52,7 @@
"1.9.0" => Version.new("1.9.0"),
},
regex: regex,
- url: url,
+ url: http_url,
}
}
@@ -61,8 +63,12 @@
}
describe "::match?" do
- it "returns true for any URL" do
- expect(page_match.match?(url)).to be true
+ it "returns true for an HTTP URL" do
+ expect(page_match.match?(http_url)).to be true
+ end
+
+ it "returns false for a non-HTTP URL" do
+ expect(page_match.match?(non_http_url)).to be false
end
end
@@ -100,7 +106,7 @@
describe "::find_versions?" do
it "finds versions in provided_content" do
- expect(page_match.find_versions(url, regex, provided_content: content))
+ expect(page_match.find_versions(http_url, regex, provided_content: content))
.to eq(find_versions_cached_return_hash)
end
end | true |
Other | Homebrew | brew | 7e07010f06a594f72cbf12a5cae889eaa15c4373.json | Improve standardization of strategy tests | Library/Homebrew/test/livecheck/strategy/pypi_spec.rb | @@ -10,11 +10,11 @@
let(:non_pypi_url) { "https://brew.sh/test" }
describe "::match?" do
- it "returns true if the argument provided is a PyPI URL" do
+ it "returns true for a PyPI URL" do
expect(pypi.match?(pypi_url)).to be true
end
- it "returns false if the argument provided is not a PyPI URL" do
+ it "returns false for a non-PyPI URL" do
expect(pypi.match?(non_pypi_url)).to be false
end
end | true |
Other | Homebrew | brew | 7e07010f06a594f72cbf12a5cae889eaa15c4373.json | Improve standardization of strategy tests | Library/Homebrew/test/livecheck/strategy/sourceforge_spec.rb | @@ -10,11 +10,11 @@
let(:non_sourceforge_url) { "https://brew.sh/test" }
describe "::match?" do
- it "returns true if the argument provided is a SourceForge URL" do
+ it "returns true for a SourceForge URL" do
expect(sourceforge.match?(sourceforge_url)).to be true
end
- it "returns false if the argument provided is not a SourceForge URL" do
+ it "returns false for a non-SourceForge URL" do
expect(sourceforge.match?(non_sourceforge_url)).to be false
end
end | true |
Other | Homebrew | brew | 7e07010f06a594f72cbf12a5cae889eaa15c4373.json | Improve standardization of strategy tests | Library/Homebrew/test/livecheck/strategy/sparkle_spec.rb | @@ -7,7 +7,8 @@
describe Homebrew::Livecheck::Strategy::Sparkle do
subject(:sparkle) { described_class }
- let(:url) { "https://www.example.com/example/appcast.xml" }
+ let(:appcast_url) { "https://www.example.com/example/appcast.xml" }
+ let(:non_http_url) { "ftp://brew.sh/" }
let(:appcast_data) {
{
@@ -25,7 +26,7 @@
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle">
<channel>
<title>Example Changelog</title>
- <link>#{url}</link>
+ <link>#{appcast_url}</link>
<description>Most recent changes with links to updates.</description>
<language>en</language>
<item>
@@ -52,8 +53,12 @@
let(:versions) { [item.bundle_version.nice_version] }
describe "::match?" do
- it "returns true for any URL" do
- expect(sparkle.match?(url)).to be true
+ it "returns true for an HTTP URL" do
+ expect(sparkle.match?(appcast_url)).to be true
+ end
+
+ it "returns false for a non-HTTP URL" do
+ expect(sparkle.match?(non_http_url)).to be false
end
end
| true |
Other | Homebrew | brew | 7e07010f06a594f72cbf12a5cae889eaa15c4373.json | Improve standardization of strategy tests | Library/Homebrew/test/livecheck/strategy/xorg_spec.rb | @@ -10,11 +10,11 @@
let(:non_xorg_url) { "https://brew.sh/test" }
describe "::match?" do
- it "returns true if the argument provided is an X.Org URL" do
+ it "returns true for an X.Org URL" do
expect(xorg.match?(xorg_url)).to be true
end
- it "returns false if the argument provided is not an X.Org URL" do
+ it "returns false for a non-X.Org URL" do
expect(xorg.match?(non_xorg_url)).to be false
end
end | true |
Other | Homebrew | brew | 9686ebe3550fda62e867ebd7b51ffdd8bb5e7822.json | os/mac/diagnostic: prevent some double diagostic failures | Library/Homebrew/extend/os/mac/diagnostic.rb | @@ -433,9 +433,13 @@ def check_if_supported_sdk_available
locator = MacOS.sdk_locator
source = if locator.source == :clt
+ return if MacOS::CLT.below_minimum_version? # Handled by other diagnostics.
+
update_instructions = MacOS::CLT.update_instructions
"Command Line Tools (CLT)"
else
+ return if MacOS::Xcode.below_minimum_version? # Handled by other diagnostics.
+
update_instructions = MacOS::Xcode.update_instructions
"Xcode"
end | true |
Other | Homebrew | brew | 9686ebe3550fda62e867ebd7b51ffdd8bb5e7822.json | os/mac/diagnostic: prevent some double diagostic failures | Library/Homebrew/test/os/mac/diagnostic_spec.rb | @@ -47,6 +47,8 @@
before do
allow(DevelopmentTools).to receive(:installed?).and_return(true)
allow(OS::Mac).to receive(:version).and_return(macos_version)
+ allow(OS::Mac::CLT).to receive(:below_minimum_version?).and_return(false)
+ allow(OS::Mac::Xcode).to receive(:below_minimum_version?).and_return(false)
end
it "doesn't trigger when SDK root is not needed" do | true |
Other | Homebrew | brew | dae1d8978031138b855bdf087c10bc437c33d06c.json | os/mac/sdk: use MacOSX11.sdk symlink | Library/Homebrew/os/mac/pkgconfig/11/expat.pc | @@ -1,4 +1,4 @@
-homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
+homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk
prefix=${homebrew_sdkroot}/usr
exec_prefix=/usr
libdir=${exec_prefix}/lib | true |
Other | Homebrew | brew | dae1d8978031138b855bdf087c10bc437c33d06c.json | os/mac/sdk: use MacOSX11.sdk symlink | Library/Homebrew/os/mac/pkgconfig/11/libcurl.pc | @@ -23,7 +23,7 @@
# This should most probably benefit from getting a "Requires:" field added
# dynamically by configure.
#
-homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
+homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk
prefix=${homebrew_sdkroot}/usr
exec_prefix=/usr
libdir=${exec_prefix}/lib | true |
Other | Homebrew | brew | dae1d8978031138b855bdf087c10bc437c33d06c.json | os/mac/sdk: use MacOSX11.sdk symlink | Library/Homebrew/os/mac/pkgconfig/11/libedit.pc | @@ -1,4 +1,4 @@
-homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
+homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk
prefix=${homebrew_sdkroot}/usr
exec_prefix=/usr
libdir=${exec_prefix}/lib | true |
Other | Homebrew | brew | dae1d8978031138b855bdf087c10bc437c33d06c.json | os/mac/sdk: use MacOSX11.sdk symlink | Library/Homebrew/os/mac/pkgconfig/11/libexslt.pc | @@ -1,4 +1,4 @@
-homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
+homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk
prefix=${homebrew_sdkroot}/usr
exec_prefix=/usr
libdir=${exec_prefix}/lib | true |
Other | Homebrew | brew | dae1d8978031138b855bdf087c10bc437c33d06c.json | os/mac/sdk: use MacOSX11.sdk symlink | Library/Homebrew/os/mac/pkgconfig/11/libffi.pc | @@ -1,4 +1,4 @@
-homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
+homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk
prefix=${homebrew_sdkroot}/usr
exec_prefix=/usr
libdir=${exec_prefix}/lib | true |
Other | Homebrew | brew | dae1d8978031138b855bdf087c10bc437c33d06c.json | os/mac/sdk: use MacOSX11.sdk symlink | Library/Homebrew/os/mac/pkgconfig/11/libxml-2.0.pc | @@ -1,4 +1,4 @@
-homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
+homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk
prefix=${homebrew_sdkroot}/usr
exec_prefix=/usr
libdir=${exec_prefix}/lib | true |
Other | Homebrew | brew | dae1d8978031138b855bdf087c10bc437c33d06c.json | os/mac/sdk: use MacOSX11.sdk symlink | Library/Homebrew/os/mac/pkgconfig/11/libxslt.pc | @@ -1,4 +1,4 @@
-homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
+homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk
prefix=${homebrew_sdkroot}/usr
exec_prefix=/usr
libdir=${exec_prefix}/lib | true |
Other | Homebrew | brew | dae1d8978031138b855bdf087c10bc437c33d06c.json | os/mac/sdk: use MacOSX11.sdk symlink | Library/Homebrew/os/mac/pkgconfig/11/ncurses.pc | @@ -1,4 +1,4 @@
-homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
+homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk
prefix=${homebrew_sdkroot}/usr
exec_prefix=/usr
libdir=${exec_prefix}/lib | true |
Other | Homebrew | brew | dae1d8978031138b855bdf087c10bc437c33d06c.json | os/mac/sdk: use MacOSX11.sdk symlink | Library/Homebrew/os/mac/pkgconfig/11/ncursesw.pc | @@ -1,4 +1,4 @@
-homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
+homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk
prefix=${homebrew_sdkroot}/usr
exec_prefix=/usr
libdir=${exec_prefix}/lib | true |
Other | Homebrew | brew | dae1d8978031138b855bdf087c10bc437c33d06c.json | os/mac/sdk: use MacOSX11.sdk symlink | Library/Homebrew/os/mac/pkgconfig/11/sqlite3.pc | @@ -1,4 +1,4 @@
-homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
+homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk
prefix=${homebrew_sdkroot}/usr
exec_prefix=/usr
libdir=${exec_prefix}/lib | true |
Other | Homebrew | brew | dae1d8978031138b855bdf087c10bc437c33d06c.json | os/mac/sdk: use MacOSX11.sdk symlink | Library/Homebrew/os/mac/pkgconfig/11/uuid.pc | @@ -1,4 +1,4 @@
-homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
+homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk
prefix=${homebrew_sdkroot}/usr
exec_prefix=/usr
libdir=${exec_prefix}/lib | true |
Other | Homebrew | brew | dae1d8978031138b855bdf087c10bc437c33d06c.json | os/mac/sdk: use MacOSX11.sdk symlink | Library/Homebrew/os/mac/pkgconfig/11/zlib.pc | @@ -1,4 +1,4 @@
-homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
+homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk
prefix=${homebrew_sdkroot}/usr
exec_prefix=/usr
libdir=${exec_prefix}/lib | true |
Other | Homebrew | brew | dae1d8978031138b855bdf087c10bc437c33d06c.json | os/mac/sdk: use MacOSX11.sdk symlink | Library/Homebrew/os/mac/sdk.rb | @@ -9,7 +9,8 @@ module Mac
#
# @api private
class SDK
- VERSIONED_SDK_REGEX = /MacOSX(\d+\.\d+)\.sdk$/.freeze
+ # 11.x SDKs are explicitly excluded - we want the MacOSX11.sdk symlink instead.
+ VERSIONED_SDK_REGEX = /MacOSX(10\.\d+|\d+)\.sdk$/.freeze
attr_reader :version, :path, :source
@@ -41,24 +42,23 @@ def all_sdks
# Bail out if there is no SDK prefix at all
return @all_sdks unless File.directory? sdk_prefix
- # Use unversioned SDK path on Big Sur to avoid issues such as:
- # https://github.com/Homebrew/homebrew-core/issues/67075
- unversioned_sdk_path = Pathname.new("#{sdk_prefix}/MacOSX.sdk")
- version = read_sdk_version(unversioned_sdk_path)
- if version && version >= :big_sur
- unversioned_sdk_version = version
- @all_sdks << SDK.new(unversioned_sdk_version, unversioned_sdk_path, source)
- end
-
Dir["#{sdk_prefix}/MacOSX*.sdk"].each do |sdk_path|
next unless sdk_path.match?(SDK::VERSIONED_SDK_REGEX)
version = read_sdk_version(Pathname.new(sdk_path))
- next if version.nil? || version == unversioned_sdk_version
+ next if version.nil?
@all_sdks << SDK.new(version, sdk_path, source)
end
+ # Fall back onto unversioned SDK if we've not found a suitable SDK
+ if @all_sdks.empty?
+ sdk_path = Pathname.new("#{sdk_prefix}/MacOSX.sdk")
+ if (version = read_sdk_version(sdk_path))
+ @all_sdks << SDK.new(version, sdk_path, source)
+ end
+ end
+
@all_sdks
end
| true |
Other | Homebrew | brew | e854fd4e25532b639fb581a329ed5a6bb6b93579.json | Update RBI files for sorbet. | Library/Homebrew/sorbet/rbi/gems/spoom@1.1.2.rbi | @@ -1,6 +1,6 @@
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `spoom` gem.
-# Please instead update this file by running `tapioca sync`.
+# Please instead update this file by running `bin/tapioca sync`.
# typed: true
@@ -11,29 +11,29 @@ module Spoom
end
end
-module Spoom::Cli
-end
+module Spoom::Cli; end
class Spoom::Cli::Bump < ::Thor
- include(::Spoom::Cli::Helper)
+ include ::Spoom::Cli::Helper
sig { params(directory: String).void }
def bump(directory = T.unsafe(nil)); end
+
def config_files(path: T.unsafe(nil)); end
def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end
def print_changes(files, command:, from: T.unsafe(nil), to: T.unsafe(nil), dry: T.unsafe(nil), path: T.unsafe(nil)); end
def undo_changes(files, from_strictness); end
end
class Spoom::Cli::Config < ::Thor
- include(::Spoom::Cli::Helper)
+ include ::Spoom::Cli::Helper
def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end
def show; end
end
class Spoom::Cli::Coverage < ::Thor
- include(::Spoom::Cli::Helper)
+ include ::Spoom::Cli::Helper
def bundle_install(path, sha); end
def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end
@@ -48,44 +48,58 @@ end
Spoom::Cli::Coverage::DATA_DIR = T.let(T.unsafe(nil), String)
module Spoom::Cli::Helper
- include(::Thor::Shell)
+ include ::Thor::Shell
sig { params(string: String).returns(String) }
def blue(string); end
+
sig { returns(T::Boolean) }
def color?; end
+
sig { params(string: String, color: Symbol).returns(String) }
def colorize(string, color); end
+
sig { returns(String) }
def exec_path; end
+
sig { params(string: String).returns(String) }
def gray(string); end
+
sig { params(string: String).returns(String) }
def green(string); end
+
sig { params(string: String).returns(String) }
def highlight(string); end
+
sig { void }
def in_sorbet_project!; end
+
sig { returns(T::Boolean) }
def in_sorbet_project?; end
+
sig { params(string: String).returns(String) }
def red(string); end
+
sig { params(message: String).void }
def say(message); end
+
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) }
def sorbet_config; end
+
sig { returns(String) }
def sorbet_config_file; end
+
sig { params(string: String).returns(String) }
def yellow(string); end
end
Spoom::Cli::Helper::HIGHLIGHT_COLOR = T.let(T.unsafe(nil), Symbol)
class Spoom::Cli::LSP < ::Thor
- include(::Spoom::Cli::Helper)
+ include ::Spoom::Cli::Helper
def defs(file, line, col); end
def find(query); end
@@ -104,7 +118,7 @@ class Spoom::Cli::LSP < ::Thor
end
class Spoom::Cli::Main < ::Thor
- include(::Spoom::Cli::Helper)
+ include ::Spoom::Cli::Helper
def __print_version; end
def bump(*args); end
@@ -120,7 +134,7 @@ class Spoom::Cli::Main < ::Thor
end
class Spoom::Cli::Run < ::Thor
- include(::Spoom::Cli::Helper)
+ include ::Spoom::Cli::Helper
def colorize_message(message); end
def format_error(error, format); end
@@ -129,34 +143,34 @@ class Spoom::Cli::Run < ::Thor
end
Spoom::Cli::Run::DEFAULT_FORMAT = T.let(T.unsafe(nil), String)
-
Spoom::Cli::Run::SORT_CODE = T.let(T.unsafe(nil), String)
-
Spoom::Cli::Run::SORT_ENUM = T.let(T.unsafe(nil), Array)
-
Spoom::Cli::Run::SORT_LOC = T.let(T.unsafe(nil), String)
module Spoom::Coverage
class << self
sig { params(snapshots: T::Array[Spoom::Coverage::Snapshot], palette: Spoom::Coverage::D3::ColorPalette, path: String).returns(Spoom::Coverage::Report) }
def report(snapshots, palette:, path: T.unsafe(nil)); end
+
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) }
def snapshot(path: T.unsafe(nil), rbi: T.unsafe(nil), sorbet_bin: T.unsafe(nil)); end
+
sig { params(path: String).returns(Spoom::Sorbet::Config) }
def sorbet_config(path: T.unsafe(nil)); end
end
end
-module Spoom::Coverage::Cards
-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 }
def initialize(template: T.unsafe(nil), title: T.unsafe(nil), body: T.unsafe(nil)); end
def body; end
+
sig { returns(T.nilable(String)) }
def title; end
end
@@ -171,6 +185,7 @@ class Spoom::Coverage::Cards::Erb < ::Spoom::Coverage::Cards::Card
sig { abstract.returns(String) }
def erb; end
+
sig { override.returns(String) }
def html; end
end
@@ -186,10 +201,13 @@ class Spoom::Coverage::Cards::Snapshot < ::Spoom::Coverage::Cards::Card
sig { returns(Spoom::Coverage::D3::Pie::Calls) }
def pie_calls; end
+
sig { returns(Spoom::Coverage::D3::Pie::Sigils) }
def pie_sigils; end
+
sig { returns(Spoom::Coverage::D3::Pie::Sigs) }
def pie_sigs; end
+
sig { returns(Spoom::Coverage::Snapshot) }
def snapshot; end
end
@@ -214,6 +232,11 @@ class Spoom::Coverage::Cards::Timeline::Calls < ::Spoom::Coverage::Cards::Timeli
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 }
+ 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 }
def initialize(snapshots:, title: T.unsafe(nil)); end
@@ -238,6 +261,7 @@ module Spoom::Coverage::D3
class << self
sig { params(palette: Spoom::Coverage::D3::ColorPalette).returns(String) }
def header_script(palette); end
+
sig { returns(String) }
def header_style; end
end
@@ -251,29 +275,29 @@ class Spoom::Coverage::D3::Base
sig { returns(String) }
def html; end
+
sig { returns(String) }
def id; end
+
sig { abstract.returns(String) }
def script; end
+
sig { returns(String) }
def tooltip; end
class << self
sig { returns(String) }
def header_script; end
+
sig { returns(String) }
def header_style; end
end
end
Spoom::Coverage::D3::COLOR_FALSE = T.let(T.unsafe(nil), String)
-
Spoom::Coverage::D3::COLOR_IGNORE = T.let(T.unsafe(nil), String)
-
Spoom::Coverage::D3::COLOR_STRICT = T.let(T.unsafe(nil), String)
-
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
@@ -283,6 +307,7 @@ class Spoom::Coverage::D3::CircleMap < ::Spoom::Coverage::D3::Base
class << self
sig { returns(String) }
def header_script; end
+
sig { returns(String) }
def header_style; end
end
@@ -294,18 +319,20 @@ class Spoom::Coverage::D3::CircleMap::Sigils < ::Spoom::Coverage::D3::CircleMap
sig { params(node: Spoom::FileTree::Node).returns(Float) }
def tree_node_score(node); end
+
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]) }
def tree_node_to_json(node); end
end
class Spoom::Coverage::D3::ColorPalette < ::T::Struct
- prop :ignore, String
prop :false, String
- prop :true, String
+ prop :ignore, String
prop :strict, String
prop :strong, String
+ prop :true, String
class << self
def inherited(s); end
@@ -324,6 +351,7 @@ class Spoom::Coverage::D3::Pie < ::Spoom::Coverage::D3::Base
class << self
sig { returns(String) }
def header_script; end
+
sig { returns(String) }
def header_style; end
end
@@ -361,26 +389,35 @@ class Spoom::Coverage::D3::Timeline < ::Spoom::Coverage::D3::Base
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) }
def line(y:, color: T.unsafe(nil), curve: T.unsafe(nil)); end
+
sig { abstract.returns(String) }
def plot; end
+
sig { params(y: String).returns(String) }
def points(y:); end
+
sig { override.returns(String) }
def script; end
+
sig { returns(String) }
def x_scale; end
+
sig { returns(String) }
def x_ticks; end
+
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) }
def y_ticks(ticks:, format:, padding:); end
class << self
sig { returns(String) }
def header_script; end
+
sig { returns(String) }
def header_style; end
end
@@ -394,12 +431,30 @@ class Spoom::Coverage::D3::Timeline::Calls < ::Spoom::Coverage::D3::Timeline::St
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 }
+ def initialize(id, snapshots); end
+
+ 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) }
+ def plot; end
+
+ sig { override.returns(String) }
+ def script; end
+
+ 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 }
def initialize(id, snapshots); end
sig { override.returns(String) }
def plot; end
+
sig { override.returns(String) }
def tooltip; end
end
@@ -427,8 +482,10 @@ class Spoom::Coverage::D3::Timeline::Stacked < ::Spoom::Coverage::D3::Timeline
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) }
def plot; end
+
sig { override.returns(String) }
def script; end
end
@@ -439,6 +496,7 @@ class Spoom::Coverage::D3::Timeline::Versions < ::Spoom::Coverage::D3::Timeline
sig { override.returns(String) }
def plot; end
+
sig { override.returns(String) }
def tooltip; end
end
@@ -451,18 +509,25 @@ class Spoom::Coverage::Page < ::Spoom::Coverage::Template
sig { returns(String) }
def body_html; end
+
sig { abstract.returns(T::Array[Spoom::Coverage::Cards::Card]) }
def cards; end
+
sig { returns(String) }
def footer_html; end
+
sig { returns(String) }
def header_html; end
+
sig { returns(String) }
def header_script; end
+
sig { returns(String) }
def header_style; end
+
sig { returns(Spoom::Coverage::D3::ColorPalette) }
def palette; end
+
sig { returns(String) }
def title; end
end
@@ -475,47 +540,57 @@ class Spoom::Coverage::Report < ::Spoom::Coverage::Page
sig { override.returns(T::Array[Spoom::Coverage::Cards::Card]) }
def cards; end
+
sig { override.returns(String) }
def header_html; end
+
sig { returns(String) }
def project_name; end
+
sig { returns(Spoom::FileTree) }
def sigils_tree; end
+
sig { returns(T::Array[Spoom::Coverage::Snapshot]) }
def snapshots; end
+
sig { returns(T.nilable(String)) }
def sorbet_intro_commit; end
+
sig { returns(T.nilable(Time)) }
def sorbet_intro_date; end
end
class Spoom::Coverage::Snapshot < ::T::Struct
- prop :timestamp, Integer, default: T.unsafe(nil)
- prop :version_static, T.nilable(String), default: T.unsafe(nil)
- prop :version_runtime, T.nilable(String), default: T.unsafe(nil)
- prop :duration, Integer, default: T.unsafe(nil)
+ 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 :modules, Integer, default: T.unsafe(nil)
- prop :classes, Integer, default: T.unsafe(nil)
- prop :singleton_classes, Integer, default: T.unsafe(nil)
- prop :methods_without_sig, Integer, default: T.unsafe(nil)
prop :methods_with_sig, Integer, default: T.unsafe(nil)
- prop :calls_untyped, Integer, default: T.unsafe(nil)
- prop :calls_typed, 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) }
def to_json(*arg); end
class << self
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) }
def from_obj(obj); end
+
def inherited(s); end
end
end
@@ -530,6 +605,7 @@ class Spoom::Coverage::SnapshotPrinter < ::Spoom::Printer
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 }
def print_map(hash, total); end
end
@@ -542,31 +618,38 @@ class Spoom::Coverage::Template
sig { returns(String) }
def erb; end
+
sig { returns(Binding) }
def get_binding; end
+
sig { returns(String) }
def html; end
end
-class Spoom::Error < ::StandardError
-end
+class Spoom::Error < ::StandardError; end
class Spoom::FileTree
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) }
def add_path(path); end
+
sig { params(paths: T::Enumerable[String]).void }
def add_paths(paths); end
+
sig { returns(T::Array[Spoom::FileTree::Node]) }
def nodes; end
+
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 }
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]) }
def roots; end
+
sig { returns(T.nilable(String)) }
def strip_prefix; end
@@ -577,9 +660,9 @@ class Spoom::FileTree
end
class Spoom::FileTree::Node < ::T::Struct
- const :parent, T.nilable(Spoom::FileTree::Node)
- const :name, String
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) }
def path; end
@@ -595,17 +678,21 @@ class Spoom::FileTree::TreePrinter < ::Spoom::Printer
sig { params(node: Spoom::FileTree::Node).void }
def print_node(node); end
+
sig { params(nodes: T::Array[Spoom::FileTree::Node]).void }
def print_nodes(nodes); end
+
sig { void }
def print_tree; end
+
sig { returns(Spoom::FileTree) }
def tree; end
private
sig { params(node: Spoom::FileTree::Node).returns(T.nilable(String)) }
def node_strictness(node); end
+
sig { params(strictness: T.nilable(String)).returns(Symbol) }
def strictness_color(strictness); end
end
@@ -614,33 +701,49 @@ module Spoom::Git
class << self
sig { params(arg: String, path: String).returns([String, String, T::Boolean]) }
def checkout(*arg, path: T.unsafe(nil)); end
+
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)) }
def commit_timestamp(sha, path: T.unsafe(nil)); end
+
+ 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]) }
def diff(*arg, path: T.unsafe(nil)); end
+
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]) }
def exec(command, *arg, path: T.unsafe(nil)); end
+
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]) }
def log(*arg, path: T.unsafe(nil)); end
+
sig { params(arg: String, path: String).returns([String, String, T::Boolean]) }
def rev_parse(*arg, path: T.unsafe(nil)); end
+
sig { params(arg: String, path: String).returns([String, String, T::Boolean]) }
def show(*arg, path: T.unsafe(nil)); end
+
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)) }
+ def sorbet_removal_commit(path: T.unsafe(nil)); end
+
sig { params(path: String).returns(T::Boolean) }
def workdir_clean?(path: T.unsafe(nil)); end
end
end
-module Spoom::LSP
-end
+module Spoom::LSP; end
class Spoom::LSP::Client
def initialize(sorbet_bin, *sorbet_args, path: T.unsafe(nil)); end
@@ -662,15 +765,16 @@ class Spoom::LSP::Client
end
class Spoom::LSP::Diagnostic < ::T::Struct
- include(::Spoom::LSP::PrintableSymbol)
+ include ::Spoom::LSP::PrintableSymbol
- const :range, Spoom::LSP::Range
const :code, Integer
- const :message, String
const :informations, Object
+ const :message, String
+ const :range, Spoom::LSP::Range
sig { override.params(printer: Spoom::LSP::SymbolPrinter).void }
def accept_printer(printer); end
+
def to_s; end
class << self
@@ -680,17 +784,18 @@ class Spoom::LSP::Diagnostic < ::T::Struct
end
class Spoom::LSP::DocumentSymbol < ::T::Struct
- include(::Spoom::LSP::PrintableSymbol)
+ include ::Spoom::LSP::PrintableSymbol
- const :name, String
+ 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]
sig { override.params(printer: Spoom::LSP::SymbolPrinter).void }
def accept_printer(printer); end
+
def kind_string; end
def to_s; end
@@ -701,15 +806,9 @@ class Spoom::LSP::DocumentSymbol < ::T::Struct
end
Spoom::LSP::DocumentSymbol::SYMBOL_KINDS = T.let(T.unsafe(nil), Hash)
-
-class Spoom::LSP::Error < ::StandardError
-end
-
-class Spoom::LSP::Error::AlreadyOpen < ::Spoom::LSP::Error
-end
-
-class Spoom::LSP::Error::BadHeaders < ::Spoom::LSP::Error
-end
+class Spoom::LSP::Error < ::StandardError; end
+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
def initialize(uri, diagnostics); end
@@ -723,13 +822,14 @@ class Spoom::LSP::Error::Diagnostics < ::Spoom::LSP::Error
end
class Spoom::LSP::Hover < ::T::Struct
- include(::Spoom::LSP::PrintableSymbol)
+ include ::Spoom::LSP::PrintableSymbol
const :contents, String
const :range, T.nilable(T::Range[T.untyped])
sig { override.params(printer: Spoom::LSP::SymbolPrinter).void }
def accept_printer(printer); end
+
def to_s; end
class << self
@@ -739,13 +839,14 @@ class Spoom::LSP::Hover < ::T::Struct
end
class Spoom::LSP::Location < ::T::Struct
- include(::Spoom::LSP::PrintableSymbol)
+ include ::Spoom::LSP::PrintableSymbol
- const :uri, String
const :range, Spoom::LSP::Range
+ const :uri, String
sig { override.params(printer: Spoom::LSP::SymbolPrinter).void }
def accept_printer(printer); end
+
def to_s; end
class << self
@@ -770,13 +871,14 @@ class Spoom::LSP::Notification < ::Spoom::LSP::Message
end
class Spoom::LSP::Position < ::T::Struct
- include(::Spoom::LSP::PrintableSymbol)
+ include ::Spoom::LSP::PrintableSymbol
- const :line, Integer
const :char, Integer
+ const :line, Integer
sig { override.params(printer: Spoom::LSP::SymbolPrinter).void }
def accept_printer(printer); end
+
def to_s; end
class << self
@@ -793,13 +895,14 @@ module Spoom::LSP::PrintableSymbol
end
class Spoom::LSP::Range < ::T::Struct
- include(::Spoom::LSP::PrintableSymbol)
+ include ::Spoom::LSP::PrintableSymbol
- const :start, Spoom::LSP::Position
const :end, Spoom::LSP::Position
+ const :start, Spoom::LSP::Position
sig { override.params(printer: Spoom::LSP::SymbolPrinter).void }
def accept_printer(printer); end
+
def to_s; end
class << self
@@ -829,14 +932,15 @@ class Spoom::LSP::ResponseError < ::Spoom::LSP::Error
end
class Spoom::LSP::SignatureHelp < ::T::Struct
- include(::Spoom::LSP::PrintableSymbol)
+ include ::Spoom::LSP::PrintableSymbol
- 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 }
def accept_printer(printer); end
+
def to_s; end
class << self
@@ -851,14 +955,19 @@ class Spoom::LSP::SymbolPrinter < ::Spoom::Printer
sig { params(uri: String).returns(String) }
def clean_uri(uri); end
+
def prefix; end
def prefix=(_arg0); end
+
sig { params(objects: T::Array[Spoom::LSP::PrintableSymbol]).void }
def print_list(objects); end
+
sig { params(object: T.nilable(Spoom::LSP::PrintableSymbol)).void }
def print_object(object); end
+
sig { params(objects: T::Array[Spoom::LSP::PrintableSymbol]).void }
def print_objects(objects); end
+
def seen; end
def seen=(_arg0); end
end
@@ -871,21 +980,30 @@ class Spoom::Printer
sig { params(string: String, color: Symbol).returns(String) }
def colorize(string, color); end
+
sig { void }
def dedent; end
+
sig { void }
def indent; end
+
sig { returns(T.any(IO, StringIO)) }
def out; end
+
def out=(_arg0); end
+
sig { params(string: T.nilable(String)).void }
def print(string); end
+
sig { params(string: T.nilable(String), color: Symbol, colors: Symbol).void }
def print_colored(string, color, *colors); end
+
sig { params(string: T.nilable(String)).void }
def printl(string); end
+
sig { void }
def printn; end
+
sig { void }
def printt; end
end
@@ -896,39 +1014,53 @@ module Spoom::Sorbet
class << self
sig { params(arg: String, path: String, capture_err: T::Boolean, sorbet_bin: T.nilable(String)).returns([String, T::Boolean]) }
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]) }
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])) }
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]) }
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)) }
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)) }
def version_from_gemfile_lock(gem: T.unsafe(nil), path: T.unsafe(nil)); end
end
end
Spoom::Sorbet::BIN_PATH = T.let(T.unsafe(nil), String)
-
Spoom::Sorbet::CONFIG_PATH = T.let(T.unsafe(nil), String)
class Spoom::Sorbet::Config
sig { void }
def initialize; end
def allowed_extensions; end
+
sig { returns(Spoom::Sorbet::Config) }
def copy; end
+
def ignore; end
+
+ sig { returns(T::Boolean) }
+ def no_stdlib; end
+
+ def no_stdlib=(_arg0); end
+
sig { returns(String) }
def options_string; end
+
sig { returns(T::Array[String]) }
def paths; end
class << self
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) }
def parse_string(sorbet_config); end
@@ -947,21 +1079,27 @@ module Spoom::Sorbet::Errors
end
class Spoom::Sorbet::Errors::Error
- include(::Comparable)
+ 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 }
def initialize(file, line, message, code, more = T.unsafe(nil)); end
sig { params(other: T.untyped).returns(Integer) }
def <=>(other); end
+
def code; end
+
sig { returns(T.nilable(String)) }
def file; end
+
sig { returns(T.nilable(Integer)) }
def line; end
+
def message; end
+
sig { returns(T::Array[String]) }
def more; end
+
sig { returns(String) }
def to_s; end
end
@@ -977,10 +1115,13 @@ class Spoom::Sorbet::Errors::Parser
sig { params(line: String).void }
def append_error(line); end
+
sig { void }
def close_error; end
+
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 }
def open_error(error); end
@@ -991,17 +1132,17 @@ class Spoom::Sorbet::Errors::Parser
end
Spoom::Sorbet::Errors::Parser::ERROR_LINE_MATCH_REGEX = T.let(T.unsafe(nil), Regexp)
-
Spoom::Sorbet::Errors::Parser::HEADER = T.let(T.unsafe(nil), Array)
-
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]) }
def parse_file(path, prefix = T.unsafe(nil)); end
+
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]) }
def parse_string(string, prefix = T.unsafe(nil)); end
end
@@ -1013,37 +1154,37 @@ module Spoom::Sorbet::Sigils
class << self
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]) }
def change_sigil_in_files(path_list, new_strictness); end
+
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]) }
def files_with_sigil_strictness(directory, strictness, extension: T.unsafe(nil)); end
+
sig { params(strictness: String).returns(String) }
def sigil_string(strictness); end
+
sig { params(content: String).returns(T.nilable(String)) }
def strictness_in_content(content); end
+
sig { params(content: String, new_strictness: String).returns(String) }
def update_sigil(content, new_strictness); end
+
sig { params(strictness: String).returns(T::Boolean) }
def valid_strictness?(strictness); end
end
end
Spoom::Sorbet::Sigils::SIGIL_REGEXP = T.let(T.unsafe(nil), Regexp)
-
Spoom::Sorbet::Sigils::STRICTNESS_FALSE = T.let(T.unsafe(nil), String)
-
Spoom::Sorbet::Sigils::STRICTNESS_IGNORE = T.let(T.unsafe(nil), String)
-
Spoom::Sorbet::Sigils::STRICTNESS_INTERNAL = T.let(T.unsafe(nil), String)
-
Spoom::Sorbet::Sigils::STRICTNESS_STRICT = T.let(T.unsafe(nil), String)
-
Spoom::Sorbet::Sigils::STRICTNESS_STRONG = T.let(T.unsafe(nil), String)
-
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
@@ -1052,8 +1193,10 @@ class Spoom::Timeline
sig { params(dates: T::Array[Time]).returns(T::Array[String]) }
def commits_for_dates(dates); end
+
sig { returns(T::Array[Time]) }
def months; end
+
sig { returns(T::Array[String]) }
def ticks; end
end | true |
Other | Homebrew | brew | e854fd4e25532b639fb581a329ed5a6bb6b93579.json | Update RBI files for sorbet. | Library/Homebrew/sorbet/rbi/gems/tapioca@0.4.24.rbi | @@ -1615,7 +1615,7 @@ class Tapioca::RBI::Rewriters::SortNodes < ::Tapioca::RBI::Visitor
private
sig { params(kind: Tapioca::RBI::Group::Kind).returns(Integer) }
- def kind_rank(kind); end
+ def group_rank(kind); end
sig { params(node: Tapioca::RBI::Node).returns(T.nilable(String)) }
def node_name(node); end | true |
Other | Homebrew | brew | e854fd4e25532b639fb581a329ed5a6bb6b93579.json | Update RBI files for sorbet. | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -30665,6 +30665,7 @@ end
module Spoom::Cli::Helper
extend ::T::Sig
+ extend ::T::Helpers
extend ::T::Private::Methods::MethodHooks
extend ::T::Private::Methods::SingletonMethodHooks
end | true |
Other | Homebrew | brew | d4b88b1b55eb9505fac9f2aaab10b59d25f5bab2.json | brew.rb: remove gem setup for stackprof | Library/Homebrew/brew.rb | @@ -2,8 +2,6 @@
# frozen_string_literal: true
if ENV["HOMEBREW_STACKPROF"]
- require_relative "utils/gems"
- Homebrew.setup_gem_environment!
require "stackprof"
StackProf.start(mode: :wall, raw: true)
end | false |
Other | Homebrew | brew | 4c344d8c096717d0439d9efe0e2fe75373c85dd2.json | sorbet: Update RBI files.
Autogenerated by the [sorbet](https://github.com/Homebrew/brew/blob/master/.github/workflows/sorbet.yml) workflow. | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -8242,27 +8242,22 @@ module Homebrew
end
module Homebrew::API::Analytics
- extend ::T::Private::Methods::MethodHooks
extend ::T::Private::Methods::SingletonMethodHooks
end
module Homebrew::API::Bottle
- extend ::T::Private::Methods::MethodHooks
extend ::T::Private::Methods::SingletonMethodHooks
end
module Homebrew::API::Cask
- extend ::T::Private::Methods::MethodHooks
extend ::T::Private::Methods::SingletonMethodHooks
end
module Homebrew::API::Formula
- extend ::T::Private::Methods::MethodHooks
extend ::T::Private::Methods::SingletonMethodHooks
end
module Homebrew::API::Versions
- extend ::T::Private::Methods::MethodHooks
extend ::T::Private::Methods::SingletonMethodHooks
end
| false |
Other | Homebrew | brew | 489f5ed9d1271795885cf3a954199a6f9bf326e8.json | api: fix generic api path functions | Library/Homebrew/api/analytics.rb | @@ -7,19 +7,19 @@ module API
#
# @api private
module Analytics
- extend T::Sig
+ class << self
+ extend T::Sig
- module_function
+ sig { returns(String) }
+ def analytics_api_path
+ "analytics"
+ end
+ alias generic_analytics_api_path analytics_api_path
- sig { returns(String) }
- def analytics_api_path
- "analytics"
- end
- alias generic_analytics_api_path analytics_api_path
-
- sig { params(category: String, days: T.any(Integer, String)).returns(Hash) }
- def fetch(category, days)
- Homebrew::API.fetch "#{analytics_api_path}/#{category}/#{days}d.json"
+ sig { params(category: String, days: T.any(Integer, String)).returns(Hash) }
+ def fetch(category, days)
+ Homebrew::API.fetch "#{analytics_api_path}/#{category}/#{days}d.json"
+ end
end
end
end | true |
Other | Homebrew | brew | 489f5ed9d1271795885cf3a954199a6f9bf326e8.json | api: fix generic api path functions | Library/Homebrew/api/bottle.rb | @@ -9,84 +9,84 @@ module API
#
# @api private
module Bottle
- extend T::Sig
+ class << self
+ extend T::Sig
- module_function
-
- sig { returns(String) }
- def bottle_api_path
- "bottle"
- end
- alias generic_bottle_api_path bottle_api_path
-
- GITHUB_PACKAGES_SHA256_REGEX = %r{#{GitHubPackages::URL_REGEX}.*/blobs/sha256:(?<sha256>\h{64})$}.freeze
-
- sig { params(name: String).returns(Hash) }
- def fetch(name)
- Homebrew::API.fetch "#{bottle_api_path}/#{name}.json"
- end
+ sig { returns(String) }
+ def bottle_api_path
+ "bottle"
+ end
+ alias generic_bottle_api_path bottle_api_path
- sig { params(name: String).returns(T::Boolean) }
- def available?(name)
- fetch name
- true
- rescue ArgumentError
- false
- end
+ GITHUB_PACKAGES_SHA256_REGEX = %r{#{GitHubPackages::URL_REGEX}.*/blobs/sha256:(?<sha256>\h{64})$}.freeze
- sig { params(name: String).void }
- def fetch_bottles(name)
- hash = fetch(name)
- bottle_tag = Utils::Bottles.tag.to_s
+ sig { params(name: String).returns(Hash) }
+ def fetch(name)
+ Homebrew::API.fetch "#{bottle_api_path}/#{name}.json"
+ end
- if !hash["bottles"].key?(bottle_tag) && !hash["bottles"].key?("all")
- odie "No bottle available for #{name} on the current OS"
+ sig { params(name: String).returns(T::Boolean) }
+ def available?(name)
+ fetch name
+ true
+ rescue ArgumentError
+ false
end
- download_bottle(hash, bottle_tag)
+ sig { params(name: String).void }
+ def fetch_bottles(name)
+ hash = fetch(name)
+ bottle_tag = Utils::Bottles.tag.to_s
- hash["dependencies"].each do |dep_hash|
- existing_formula = begin
- Formulary.factory dep_hash["name"]
- rescue FormulaUnavailableError
- # The formula might not exist if it's not installed and homebrew/core isn't tapped
- nil
+ if !hash["bottles"].key?(bottle_tag) && !hash["bottles"].key?("all")
+ odie "No bottle available for #{name} on the current OS"
end
- next if existing_formula.present? && existing_formula.latest_version_installed?
+ download_bottle(hash, bottle_tag)
- download_bottle(dep_hash, bottle_tag)
+ hash["dependencies"].each do |dep_hash|
+ existing_formula = begin
+ Formulary.factory dep_hash["name"]
+ rescue FormulaUnavailableError
+ # The formula might not exist if it's not installed and homebrew/core isn't tapped
+ nil
+ end
+
+ next if existing_formula.present? && existing_formula.latest_version_installed?
+
+ download_bottle(dep_hash, bottle_tag)
+ end
end
- end
- sig { params(url: String).returns(T.nilable(String)) }
- def checksum_from_url(url)
- match = url.match GITHUB_PACKAGES_SHA256_REGEX
- return if match.blank?
+ sig { params(url: String).returns(T.nilable(String)) }
+ def checksum_from_url(url)
+ match = url.match GITHUB_PACKAGES_SHA256_REGEX
+ return if match.blank?
- match[:sha256]
- end
+ match[:sha256]
+ end
- sig { params(hash: Hash, tag: Symbol).void }
- def download_bottle(hash, tag)
- bottle = hash["bottles"][tag]
- bottle ||= hash["bottles"]["all"]
- return if bottle.blank?
+ sig { params(hash: Hash, tag: Symbol).void }
+ def download_bottle(hash, tag)
+ bottle = hash["bottles"][tag]
+ bottle ||= hash["bottles"]["all"]
+ return if bottle.blank?
- sha256 = bottle["sha256"] || checksum_from_url(bottle["url"])
- bottle_filename = ::Bottle::Filename.new(hash["name"], hash["pkg_version"], tag, hash["rebuild"])
+ sha256 = bottle["sha256"] || checksum_from_url(bottle["url"])
+ bottle_filename = ::Bottle::Filename.new(hash["name"], hash["pkg_version"], tag, hash["rebuild"])
- resource = Resource.new hash["name"]
- resource.url bottle["url"]
- resource.sha256 sha256
- resource.version hash["pkg_version"]
- resource.downloader.resolved_basename = bottle_filename
+ resource = Resource.new hash["name"]
+ resource.url bottle["url"]
+ resource.sha256 sha256
+ resource.version hash["pkg_version"]
+ resource.downloader.resolved_basename = bottle_filename
- resource.fetch
+ resource.fetch
- # Map the name of this formula to the local bottle path to allow the
- # formula to be loaded by passing just the name to `Formulary::factory`.
- Formulary.map_formula_name_to_local_bottle_path hash["name"], resource.downloader.cached_location
+ # Map the name of this formula to the local bottle path to allow the
+ # formula to be loaded by passing just the name to `Formulary::factory`.
+ Formulary.map_formula_name_to_local_bottle_path hash["name"], resource.downloader.cached_location
+ end
end
end
end | true |
Other | Homebrew | brew | 489f5ed9d1271795885cf3a954199a6f9bf326e8.json | api: fix generic api path functions | Library/Homebrew/api/cask.rb | @@ -7,13 +7,13 @@ module API
#
# @api private
module Cask
- extend T::Sig
+ class << self
+ extend T::Sig
- module_function
-
- sig { params(name: String).returns(Hash) }
- def fetch(name)
- Homebrew::API.fetch "cask/#{name}.json"
+ sig { params(name: String).returns(Hash) }
+ def fetch(name)
+ Homebrew::API.fetch "cask/#{name}.json"
+ end
end
end
end | true |
Other | Homebrew | brew | 489f5ed9d1271795885cf3a954199a6f9bf326e8.json | api: fix generic api path functions | Library/Homebrew/api/formula.rb | @@ -7,19 +7,19 @@ module API
#
# @api private
module Formula
- extend T::Sig
+ class << self
+ extend T::Sig
- module_function
+ sig { returns(String) }
+ def formula_api_path
+ "formula"
+ end
+ alias generic_formula_api_path formula_api_path
- sig { returns(String) }
- def formula_api_path
- "formula"
- end
- alias generic_formula_api_path formula_api_path
-
- sig { params(name: String).returns(Hash) }
- def fetch(name)
- Homebrew::API.fetch "#{formula_api_path}/#{name}.json"
+ sig { params(name: String).returns(Hash) }
+ def fetch(name)
+ Homebrew::API.fetch "#{formula_api_path}/#{name}.json"
+ end
end
end
end | true |
Other | Homebrew | brew | 489f5ed9d1271795885cf3a954199a6f9bf326e8.json | api: fix generic api path functions | Library/Homebrew/api/versions.rb | @@ -7,45 +7,45 @@ module API
#
# @api private
module Versions
- extend T::Sig
+ class << self
+ extend T::Sig
- module_function
-
- def formulae
- # The result is cached by Homebrew::API.fetch
- Homebrew::API.fetch "versions-formulae.json"
- end
-
- def linux
- # The result is cached by Homebrew::API.fetch
- Homebrew::API.fetch "versions-linux.json"
- end
+ def formulae
+ # The result is cached by Homebrew::API.fetch
+ Homebrew::API.fetch "versions-formulae.json"
+ end
- def casks
- # The result is cached by Homebrew::API.fetch
- Homebrew::API.fetch "versions-casks.json"
- end
+ def linux
+ # The result is cached by Homebrew::API.fetch
+ Homebrew::API.fetch "versions-linux.json"
+ end
- sig { params(name: String).returns(T.nilable(PkgVersion)) }
- def latest_formula_version(name)
- versions = if OS.mac? || Homebrew::EnvConfig.force_homebrew_on_linux?
- formulae
- else
- linux
+ def casks
+ # The result is cached by Homebrew::API.fetch
+ Homebrew::API.fetch "versions-casks.json"
end
- return unless versions.key? name
+ sig { params(name: String).returns(T.nilable(PkgVersion)) }
+ def latest_formula_version(name)
+ versions = if OS.mac? || Homebrew::EnvConfig.force_homebrew_on_linux?
+ formulae
+ else
+ linux
+ end
- version = Version.new(versions[name]["version"])
- revision = versions[name]["revision"]
- PkgVersion.new(version, revision)
- end
+ return unless versions.key? name
- sig { params(token: String).returns(T.nilable(Version)) }
- def latest_cask_version(token)
- return unless casks.key? token
+ version = Version.new(versions[name]["version"])
+ revision = versions[name]["revision"]
+ PkgVersion.new(version, revision)
+ end
- Version.new(casks[token]["version"])
+ sig { params(token: String).returns(T.nilable(Version)) }
+ def latest_cask_version(token)
+ return unless casks.key? token
+
+ Version.new(casks[token]["version"])
+ end
end
end
end | true |
Other | Homebrew | brew | f1be07c6b8f4fea66680e1239377cb8fef06157e.json | Update RBI files for rubocop-ast. | Library/Homebrew/sorbet/rbi/gems/rubocop-ast@1.9.0.rbi | @@ -1869,6 +1869,7 @@ class RuboCop::AST::ProcessedSource
def preceding_line(token); end
def raw_source; end
def ruby_version; end
+ def sorted_tokens; end
def start_with?(string); end
def tokens; end
def tokens_within(range_or_node); end
@@ -1882,7 +1883,6 @@ class RuboCop::AST::ProcessedSource
def last_token_index(range_or_node); end
def parse(source, ruby_version); end
def parser_class(ruby_version); end
- def sorted_tokens; end
def source_range(range_or_node); end
def tokenize(parser); end
| true |
Other | Homebrew | brew | f1be07c6b8f4fea66680e1239377cb8fef06157e.json | Update RBI files for rubocop-ast. | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -3221,11 +3221,6 @@ module Bootsnap
def self.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)); end
end
-module BottleAPI
- extend ::T::Private::Methods::MethodHooks
- extend ::T::Private::Methods::SingletonMethodHooks
-end
-
class BottleSpecification
extend ::T::Private::Methods::MethodHooks
extend ::T::Private::Methods::SingletonMethodHooks
@@ -8246,6 +8241,36 @@ module Homebrew
MIN_PORT = ::T.let(nil, ::T.untyped)
end
+module Homebrew::API::Analytics
+ extend ::T::Private::Methods::MethodHooks
+ extend ::T::Private::Methods::SingletonMethodHooks
+end
+
+module Homebrew::API::Bottle
+ extend ::T::Private::Methods::MethodHooks
+ extend ::T::Private::Methods::SingletonMethodHooks
+end
+
+module Homebrew::API::Cask
+ extend ::T::Private::Methods::MethodHooks
+ extend ::T::Private::Methods::SingletonMethodHooks
+end
+
+module Homebrew::API::Formula
+ extend ::T::Private::Methods::MethodHooks
+ extend ::T::Private::Methods::SingletonMethodHooks
+end
+
+module Homebrew::API::Versions
+ extend ::T::Private::Methods::MethodHooks
+ extend ::T::Private::Methods::SingletonMethodHooks
+end
+
+module Homebrew::API
+ extend ::T::Private::Methods::MethodHooks
+ extend ::T::Private::Methods::SingletonMethodHooks
+end
+
module Homebrew::Assertions
include ::Minitest::Assertions
def assert_include(*args); end | true |
Other | Homebrew | brew | eab0f88c3cf9dfc2396f35281022d14592d7b8dc.json | Remove `json` argument and extend `Cachable` | Library/Homebrew/api.rb | @@ -6,6 +6,7 @@
require "api/cask"
require "api/formula"
require "api/versions"
+require "extend/cachable"
module Homebrew
# Helper functions for using Homebrew's formulae.brew.sh API.
@@ -14,24 +15,21 @@ module Homebrew
module API
extend T::Sig
+ extend Cachable
+
module_function
API_DOMAIN = "https://formulae.brew.sh/api"
- sig { params(endpoint: String, json: T::Boolean).returns(T.any(String, Hash)) }
- def fetch(endpoint, json: false)
- return @cache[endpoint] if @cache.present? && @cache.key?(endpoint)
+ sig { params(endpoint: String).returns(T.any(String, Hash)) }
+ def fetch(endpoint)
+ return cache[endpoint] if cache.present? && cache.key?(endpoint)
api_url = "#{API_DOMAIN}/#{endpoint}"
output = Utils::Curl.curl_output("--fail", "--max-time", "5", api_url)
raise ArgumentError, "No file found at #{Tty.underline}#{api_url}#{Tty.reset}" unless output.success?
- @cache ||= {}
- @cache[endpoint] = if json
- JSON.parse(output.stdout)
- else
- output.stdout
- end
+ cache[endpoint] = JSON.parse(output.stdout)
rescue JSON::ParserError
raise ArgumentError, "Invalid JSON file: #{Tty.underline}#{api_url}#{Tty.reset}"
end | true |
Other | Homebrew | brew | eab0f88c3cf9dfc2396f35281022d14592d7b8dc.json | Remove `json` argument and extend `Cachable` | Library/Homebrew/api/analytics.rb | @@ -19,7 +19,7 @@ def analytics_api_path
sig { params(category: String, days: T.any(Integer, String)).returns(Hash) }
def fetch(category, days)
- Homebrew::API.fetch "#{analytics_api_path}/#{category}/#{days}d.json", json: true
+ Homebrew::API.fetch "#{analytics_api_path}/#{category}/#{days}d.json"
end
end
end | true |
Other | Homebrew | brew | eab0f88c3cf9dfc2396f35281022d14592d7b8dc.json | Remove `json` argument and extend `Cachable` | Library/Homebrew/api/bottle.rb | @@ -23,7 +23,7 @@ def bottle_api_path
sig { params(name: String).returns(Hash) }
def fetch(name)
- Homebrew::API.fetch "#{bottle_api_path}/#{name}.json", json: true
+ Homebrew::API.fetch "#{bottle_api_path}/#{name}.json"
end
sig { params(name: String).returns(T::Boolean) } | true |
Other | Homebrew | brew | eab0f88c3cf9dfc2396f35281022d14592d7b8dc.json | Remove `json` argument and extend `Cachable` | Library/Homebrew/api/cask.rb | @@ -13,7 +13,7 @@ module Cask
sig { params(name: String).returns(Hash) }
def fetch(name)
- Homebrew::API.fetch "cask/#{name}.json", json: true
+ Homebrew::API.fetch "cask/#{name}.json"
end
end
end | true |
Other | Homebrew | brew | eab0f88c3cf9dfc2396f35281022d14592d7b8dc.json | Remove `json` argument and extend `Cachable` | Library/Homebrew/api/formula.rb | @@ -19,7 +19,7 @@ def formula_api_path
sig { params(name: String).returns(Hash) }
def fetch(name)
- Homebrew::API.fetch "#{formula_api_path}/#{name}.json", json: true
+ Homebrew::API.fetch "#{formula_api_path}/#{name}.json"
end
end
end | true |
Other | Homebrew | brew | eab0f88c3cf9dfc2396f35281022d14592d7b8dc.json | Remove `json` argument and extend `Cachable` | Library/Homebrew/api/versions.rb | @@ -13,17 +13,17 @@ module Versions
def formulae
# The result is cached by Homebrew::API.fetch
- Homebrew::API.fetch "versions-formulae.json", json: true
+ Homebrew::API.fetch "versions-formulae.json"
end
def linux
# The result is cached by Homebrew::API.fetch
- Homebrew::API.fetch "versions-linux.json", json: true
+ Homebrew::API.fetch "versions-linux.json"
end
def casks
# The result is cached by Homebrew::API.fetch
- Homebrew::API.fetch "versions-casks.json", json: true
+ Homebrew::API.fetch "versions-casks.json"
end
sig { params(name: String).returns(T.nilable(PkgVersion)) } | true |
Other | Homebrew | brew | ff15e091ecc5bd88bd44d7c16e6a58cdd112cb0d.json | Add RBI file for Formula delegate methods | Library/Homebrew/formula.rbi | @@ -0,0 +1,54 @@
+# typed: strict
+
+# This file provides definitions for Forwardable#delegate, which is currently not supported by Sorbet.
+
+class Formula
+ def bottle_unneeded?; end
+ def bottle_disabled?; end
+ def bottle_disable_reason; end
+ def bottle_defined?; end
+ def bottle_tag?; end
+ def bottled?; end
+ def bottle_specification; end
+ def downloader; end
+
+ def desc; end
+ def license; end
+ def homepage; end
+ def livecheck; end
+ def livecheckable?; end
+ def service?; end
+ def version; end
+
+ def resource; end
+ def deps; end
+ def uses_from_macos_elements; end
+ def requirements; end
+ def cached_download; end
+ def clear_cache; end
+ def options; end
+ def deprecated_options; end
+ def deprecated_flags; end
+ def option_defined?; end
+ def compiler_failures; end
+
+ def plist_manual; end
+ def plist_startup; end
+ def pour_bottle_check_unsatisfied_reason; end
+ def keg_only_reason; end
+ def deprecated?; end
+ def deprecation_date; end
+ def deprecation_reason; end
+ def disabled?; end
+ def disable_date; end
+ def disable_reason; end
+
+ def pinnable?; end
+ def pinned?; end
+ def pinned_version; end
+ def pin; end
+ def unpin; end
+
+ def env; end
+ def conflicts; end
+end | false |
Other | Homebrew | brew | dc2b55f383d09cb0365811460b6a0191ef064eee.json | Update RBI files for sorbet. | Library/Homebrew/sorbet/rbi/todo.rbi | @@ -3,8 +3,6 @@
# typed: strong
module ::StackProf; end
-module ::YARD::Docstring; end
-module ::YARD::DocstringParser; end
module DependencyCollector::Compat; end
module GitHubPackages::JSONSchemer; end
module OS::Mac::Version::NULL; end | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.