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
56e6710064bcbe8edc1caa97ed0bfb6ac8450e99.json
Upgrade outdated formulae with `brew install`
Library/Homebrew/cmd/install.rb
@@ -396,6 +396,20 @@ def install_formula(f, args:) f.print_tap_action build_options = f.build + if f.outdated? && !f.head? + formulae = [f] + f.old_installed_formulae + version_upgrade = "#{f.linked_version} -> #{f.pkg_version}" + + oh1 <<~EOS + #{f.name} #{f.linked_version} is installed and out of date + Upgrading #{Formatter.identifier(f.name)} #{version_upgrade} + EOS + outdated_kegs = formulae.map(&:linked_keg) + .select(&:directory?) + .map { |k| Keg.new(k.resolved_path) } + linked_kegs = outdated_kegs.select(&:linked?) + end + fi = FormulaInstaller.new( f, **{ @@ -419,6 +433,9 @@ def install_formula(f, args:) ) fi.prelude fi.fetch + + outdated_kegs.each(&:unlink) if outdated_kegs.present? + fi.install fi.finish rescue FormulaInstallationAlreadyAttemptedError @@ -427,5 +444,12 @@ def install_formula(f, args:) nil rescue CannotInstallFormulaError => e ofail e.message + ensure + begin + # Re-link kegs if upgrade fails + linked_kegs.each(&:link) unless formula.latest_version_installed? + rescue + nil + end end end
true
Other
Homebrew
brew
56e6710064bcbe8edc1caa97ed0bfb6ac8450e99.json
Upgrade outdated formulae with `brew install`
Library/Homebrew/formula_installer.rb
@@ -351,12 +351,7 @@ def install message = <<~EOS #{formula.name} #{formula.linked_version} is already installed EOS - if formula.outdated? && !formula.head? - message += <<~EOS - To upgrade to #{formula.pkg_version}, run: - brew upgrade #{formula.full_name} - EOS - elsif only_deps? + if only_deps? message = nil else # some other version is already installed *and* linked
true
Other
Homebrew
brew
e3cf41e3ab6178f94e340fa9c6b5b5790e32a09b.json
Add missing negations
Library/Homebrew/install.rb
@@ -118,7 +118,7 @@ def install_formula?( end prefix_installed = f.prefix.exist? && !f.prefix.children.empty? - if f.keg_only? && f.any_version_installed? && f.optlinked? && force + if f.keg_only? && f.any_version_installed? && f.optlinked? && !force # keg-only install is only possible when no other version is # linked to opt, because installing without any warnings can break # dependencies. Therefore before performing other checks we need to be @@ -132,7 +132,7 @@ def install_formula?( EOS elsif only_dependencies return true - elsif quiet + elsif !quiet opoo <<~EOS #{f.full_name} #{f.pkg_version} is already installed and up-to-date. To reinstall #{f.pkg_version}, run: @@ -196,7 +196,7 @@ def install_formula?( "#{msg}." end opoo msg if msg - elsif f.migration_needed? && force + elsif f.migration_needed? && !force # Check if the formula we try to install is the same as installed # but not migrated one. If --force is passed then install anyway. opoo <<~EOS
false
Other
Homebrew
brew
4fd938c2861565a720eaca56c516c49d9d865fe9.json
Update RBI files for rubocop.
Library/Homebrew/sorbet/rbi/gems/rubocop@1.16.1.rbi
@@ -10044,6 +10044,7 @@ class RuboCop::Cop::Style::QuotedSymbols < ::RuboCop::Cop::Base def alternative_style; end def autocorrect(corrector, node); end def correct_quotes(str); end + def hash_colon_key?(node); end def quoted?(sym_node); end def style; end def wrong_quotes?(node); end @@ -10452,15 +10453,19 @@ class RuboCop::Cop::Style::RedundantSelf < ::RuboCop::Cop::Base def on_blockarg(node); end def on_def(node); end def on_defs(node); end + def on_if(node); end def on_lvasgn(node); end def on_masgn(node); end def on_op_asgn(node); end def on_or_asgn(node); end def on_send(node); end + def on_until(node); end + def on_while(node); end private def add_lhs_to_local_variables_scopes(rhs, lhs); end + def add_masgn_lhs_variables(rhs, lhs); end def add_scope(node, local_variables = T.unsafe(nil)); end def allow_self(node); end def allowed_send_node?(node); end
false
Other
Homebrew
brew
c2eab8f2144ebf41f3d2b7cee099d3980faf5d25.json
Update RBI files for rubocop-rspec.
Library/Homebrew/sorbet/rbi/gems/rubocop-rspec@2.4.0.rbi
@@ -4,19 +4,14 @@ # typed: true -module RuboCop -end - -module RuboCop::Cop -end - -module RuboCop::Cop::Layout -end +module RuboCop; end +module RuboCop::Cop; end +module RuboCop::Cop::Layout; end class RuboCop::Cop::Layout::ExtraSpacing < ::RuboCop::Cop::Base - include(::RuboCop::Cop::PrecedingFollowingAlignment) - include(::RuboCop::Cop::RangeHelp) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::PrecedingFollowingAlignment + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector def on_new_investigation; end @@ -43,14 +38,11 @@ class RuboCop::Cop::Layout::ExtraSpacing < ::RuboCop::Cop::Base end RuboCop::Cop::Layout::ExtraSpacing::MSG_UNALIGNED_ASGN = T.let(T.unsafe(nil), String) - RuboCop::Cop::Layout::ExtraSpacing::MSG_UNNECESSARY = T.let(T.unsafe(nil), String) - -module RuboCop::Cop::RSpec -end +module RuboCop::Cop::RSpec; end class RuboCop::Cop::RSpec::AlignLeftLetBrace < ::RuboCop::Cop::RSpec::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def on_new_investigation; end @@ -66,7 +58,7 @@ end RuboCop::Cop::RSpec::AlignLeftLetBrace::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::AlignRightLetBrace < ::RuboCop::Cop::RSpec::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def on_new_investigation; end @@ -86,7 +78,6 @@ class RuboCop::Cop::RSpec::AnyInstance < ::RuboCop::Cop::RSpec::Base end RuboCop::Cop::RSpec::AnyInstance::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::AnyInstance::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::RSpec::AroundBlock < ::RuboCop::Cop::RSpec::Base @@ -101,12 +92,11 @@ class RuboCop::Cop::RSpec::AroundBlock < ::RuboCop::Cop::RSpec::Base end RuboCop::Cop::RSpec::AroundBlock::MSG_NO_ARG = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::AroundBlock::MSG_UNUSED_ARG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::Base < ::RuboCop::Cop::Base - include(::RuboCop::RSpec::Language) - extend(::RuboCop::RSpec::Language::NodePattern) + include ::RuboCop::RSpec::Language + extend ::RuboCop::RSpec::Language::NodePattern def on_new_investigation; end @@ -123,14 +113,13 @@ end RuboCop::Cop::RSpec::Be::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::BeEql < ::RuboCop::Cop::RSpec::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def eql_type_with_identity(param0 = T.unsafe(nil)); end def on_send(node); end end RuboCop::Cop::RSpec::BeEql::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::BeEql::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::RSpec::BeforeAfterAll < ::RuboCop::Cop::RSpec::Base @@ -139,14 +128,11 @@ class RuboCop::Cop::RSpec::BeforeAfterAll < ::RuboCop::Cop::RSpec::Base end RuboCop::Cop::RSpec::BeforeAfterAll::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::BeforeAfterAll::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -module RuboCop::Cop::RSpec::Capybara -end +module RuboCop::Cop::RSpec::Capybara; end class RuboCop::Cop::RSpec::Capybara::CurrentPathExpectation < ::RuboCop::Cop::RSpec::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def as_is_matcher(param0 = T.unsafe(nil)); end def expectation_set_on_current_path(param0 = T.unsafe(nil)); end @@ -162,11 +148,10 @@ class RuboCop::Cop::RSpec::Capybara::CurrentPathExpectation < ::RuboCop::Cop::RS end RuboCop::Cop::RSpec::Capybara::CurrentPathExpectation::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::Capybara::CurrentPathExpectation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::RSpec::Capybara::FeatureMethods < ::RuboCop::Cop::RSpec::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def capybara_speak(param0 = T.unsafe(nil)); end def feature_method(param0 = T.unsafe(nil)); end @@ -184,7 +169,6 @@ class RuboCop::Cop::RSpec::Capybara::FeatureMethods < ::RuboCop::Cop::RSpec::Bas end RuboCop::Cop::RSpec::Capybara::FeatureMethods::MAP = T.let(T.unsafe(nil), Hash) - RuboCop::Cop::RSpec::Capybara::FeatureMethods::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::Capybara::VisibilityMatcher < ::RuboCop::Cop::RSpec::Base @@ -198,15 +182,12 @@ class RuboCop::Cop::RSpec::Capybara::VisibilityMatcher < ::RuboCop::Cop::RSpec:: end RuboCop::Cop::RSpec::Capybara::VisibilityMatcher::CAPYBARA_MATCHER_METHODS = T.let(T.unsafe(nil), Array) - RuboCop::Cop::RSpec::Capybara::VisibilityMatcher::MSG_FALSE = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::Capybara::VisibilityMatcher::MSG_TRUE = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::Capybara::VisibilityMatcher::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) module RuboCop::Cop::RSpec::CommentsHelp - include(::RuboCop::Cop::RSpec::FinalEndLocation) + include ::RuboCop::Cop::RSpec::FinalEndLocation def begin_pos_with_comment(node); end def buffer; end @@ -216,7 +197,7 @@ module RuboCop::Cop::RSpec::CommentsHelp end class RuboCop::Cop::RSpec::ContextMethod < ::RuboCop::Cop::RSpec::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def context_method(param0 = T.unsafe(nil)); end def on_block(node); end @@ -243,7 +224,7 @@ end RuboCop::Cop::RSpec::ContextWording::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::DescribeClass < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::RSpec::TopLevelGroup) + include ::RuboCop::Cop::RSpec::TopLevelGroup def example_group_with_ignored_metadata?(param0 = T.unsafe(nil)); end def not_a_const_described(param0 = T.unsafe(nil)); end @@ -260,7 +241,7 @@ end RuboCop::Cop::RSpec::DescribeClass::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::DescribeMethod < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::RSpec::TopLevelGroup) + include ::RuboCop::Cop::RSpec::TopLevelGroup def on_top_level_group(node); end def second_argument(param0 = T.unsafe(nil)); end @@ -274,12 +255,11 @@ class RuboCop::Cop::RSpec::DescribeSymbol < ::RuboCop::Cop::RSpec::Base end RuboCop::Cop::RSpec::DescribeSymbol::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::DescribeSymbol::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::RSpec::DescribedClass < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::ConfigurableEnforcedStyle) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector def common_instance_exec_closure?(param0 = T.unsafe(nil)); end def contains_described_class?(param0); end @@ -305,7 +285,6 @@ class RuboCop::Cop::RSpec::DescribedClass < ::RuboCop::Cop::RSpec::Base end RuboCop::Cop::RSpec::DescribedClass::DESCRIBED_CLASS = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::DescribedClass::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::DescribedClassModuleWrapping < ::RuboCop::Cop::RSpec::Base @@ -316,8 +295,8 @@ end RuboCop::Cop::RSpec::DescribedClassModuleWrapping::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::Dialect < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::MethodPreference) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::MethodPreference + extend ::RuboCop::Cop::AutoCorrector def on_send(node); end def rspec_method?(param0 = T.unsafe(nil)); end @@ -343,8 +322,8 @@ end RuboCop::Cop::RSpec::EmptyExampleGroup::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::EmptyHook < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::RangeHelp) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector def empty_hook?(param0 = T.unsafe(nil)); end def on_block(node); end @@ -353,10 +332,10 @@ end RuboCop::Cop::RSpec::EmptyHook::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::EmptyLineAfterExample < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::RSpec::FinalEndLocation) - include(::RuboCop::Cop::RangeHelp) - include(::RuboCop::Cop::RSpec::EmptyLineSeparation) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::RSpec::FinalEndLocation + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::RSpec::EmptyLineSeparation + extend ::RuboCop::Cop::AutoCorrector def allow_consecutive_one_liners?; end def allowed_one_liner?(node); end @@ -369,43 +348,43 @@ end RuboCop::Cop::RSpec::EmptyLineAfterExample::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::EmptyLineAfterExampleGroup < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::RSpec::FinalEndLocation) - include(::RuboCop::Cop::RangeHelp) - include(::RuboCop::Cop::RSpec::EmptyLineSeparation) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::RSpec::FinalEndLocation + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::RSpec::EmptyLineSeparation + extend ::RuboCop::Cop::AutoCorrector def on_block(node); end end RuboCop::Cop::RSpec::EmptyLineAfterExampleGroup::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::EmptyLineAfterFinalLet < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::RSpec::FinalEndLocation) - include(::RuboCop::Cop::RangeHelp) - include(::RuboCop::Cop::RSpec::EmptyLineSeparation) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::RSpec::FinalEndLocation + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::RSpec::EmptyLineSeparation + extend ::RuboCop::Cop::AutoCorrector def on_block(node); end end RuboCop::Cop::RSpec::EmptyLineAfterFinalLet::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::EmptyLineAfterHook < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::RSpec::FinalEndLocation) - include(::RuboCop::Cop::RangeHelp) - include(::RuboCop::Cop::RSpec::EmptyLineSeparation) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::RSpec::FinalEndLocation + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::RSpec::EmptyLineSeparation + extend ::RuboCop::Cop::AutoCorrector def on_block(node); end end RuboCop::Cop::RSpec::EmptyLineAfterHook::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::EmptyLineAfterSubject < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::RSpec::FinalEndLocation) - include(::RuboCop::Cop::RangeHelp) - include(::RuboCop::Cop::RSpec::EmptyLineSeparation) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::RSpec::FinalEndLocation + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::RSpec::EmptyLineSeparation + extend ::RuboCop::Cop::AutoCorrector def on_block(node); end @@ -417,8 +396,8 @@ end RuboCop::Cop::RSpec::EmptyLineAfterSubject::MSG = T.let(T.unsafe(nil), String) module RuboCop::Cop::RSpec::EmptyLineSeparation - include(::RuboCop::Cop::RSpec::FinalEndLocation) - include(::RuboCop::Cop::RangeHelp) + include ::RuboCop::Cop::RSpec::FinalEndLocation + include ::RuboCop::Cop::RangeHelp def last_child?(node); end def missing_separating_line(node); end @@ -427,7 +406,7 @@ module RuboCop::Cop::RSpec::EmptyLineSeparation end class RuboCop::Cop::RSpec::ExampleLength < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::CodeLength) + include ::RuboCop::Cop::CodeLength def on_block(node); end @@ -439,7 +418,7 @@ end RuboCop::Cop::RSpec::ExampleLength::LABEL = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::ExampleWithoutDescription < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::ConfigurableEnforcedStyle) + include ::RuboCop::Cop::ConfigurableEnforcedStyle def example_description(param0 = T.unsafe(nil)); end def on_block(node); end @@ -451,11 +430,10 @@ class RuboCop::Cop::RSpec::ExampleWithoutDescription < ::RuboCop::Cop::RSpec::Ba end RuboCop::Cop::RSpec::ExampleWithoutDescription::MSG_ADD_DESCRIPTION = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::ExampleWithoutDescription::MSG_DEFAULT_ARGUMENT = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::ExampleWording < ::RuboCop::Cop::RSpec::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def it_description(param0 = T.unsafe(nil)); end def on_block(node); end @@ -471,15 +449,12 @@ class RuboCop::Cop::RSpec::ExampleWording < ::RuboCop::Cop::RSpec::Base end RuboCop::Cop::RSpec::ExampleWording::IT_PREFIX = T.let(T.unsafe(nil), Regexp) - RuboCop::Cop::RSpec::ExampleWording::MSG_IT = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::ExampleWording::MSG_SHOULD = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::ExampleWording::SHOULD_PREFIX = T.let(T.unsafe(nil), Regexp) class RuboCop::Cop::RSpec::ExpectActual < ::RuboCop::Cop::RSpec::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def expect_literal(param0 = T.unsafe(nil)); end def on_send(node); end @@ -493,16 +468,13 @@ class RuboCop::Cop::RSpec::ExpectActual < ::RuboCop::Cop::RSpec::Base end RuboCop::Cop::RSpec::ExpectActual::COMPLEX_LITERALS = T.let(T.unsafe(nil), Array) - RuboCop::Cop::RSpec::ExpectActual::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::ExpectActual::SIMPLE_LITERALS = T.let(T.unsafe(nil), Array) - RuboCop::Cop::RSpec::ExpectActual::SUPPORTED_MATCHERS = T.let(T.unsafe(nil), Array) class RuboCop::Cop::RSpec::ExpectChange < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::ConfigurableEnforcedStyle) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector def expect_change_with_arguments(param0 = T.unsafe(nil)); end def expect_change_with_block(param0 = T.unsafe(nil)); end @@ -511,9 +483,7 @@ class RuboCop::Cop::RSpec::ExpectChange < ::RuboCop::Cop::RSpec::Base end RuboCop::Cop::RSpec::ExpectChange::MSG_BLOCK = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::ExpectChange::MSG_CALL = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::ExpectChange::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::RSpec::ExpectInHook < ::RuboCop::Cop::RSpec::Base @@ -538,8 +508,8 @@ end RuboCop::Cop::RSpec::ExpectOutput::MSG = T.let(T.unsafe(nil), String) module RuboCop::Cop::RSpec::ExplicitHelper - include(::RuboCop::RSpec::Language) - extend(::RuboCop::AST::NodePattern::Macros) + include ::RuboCop::RSpec::Language + extend ::RuboCop::AST::NodePattern::Macros def predicate_matcher?(param0 = T.unsafe(nil)); end def predicate_matcher_block?(param0 = T.unsafe(nil)); end @@ -557,14 +527,11 @@ module RuboCop::Cop::RSpec::ExplicitHelper end RuboCop::Cop::RSpec::ExplicitHelper::BUILT_IN_MATCHERS = T.let(T.unsafe(nil), Array) - RuboCop::Cop::RSpec::ExplicitHelper::MSG_EXPLICIT = T.let(T.unsafe(nil), String) - -module RuboCop::Cop::RSpec::FactoryBot -end +module RuboCop::Cop::RSpec::FactoryBot; end class RuboCop::Cop::RSpec::FactoryBot::AttributeDefinedStatically < ::RuboCop::Cop::RSpec::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def association?(param0 = T.unsafe(nil)); end def factory_attributes(param0 = T.unsafe(nil)); end @@ -588,8 +555,8 @@ end RuboCop::Cop::RSpec::FactoryBot::AttributeDefinedStatically::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::FactoryBot::CreateList < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::ConfigurableEnforcedStyle) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector def factory_call(param0 = T.unsafe(nil)); end def factory_list_call(param0 = T.unsafe(nil)); end @@ -603,7 +570,6 @@ class RuboCop::Cop::RSpec::FactoryBot::CreateList < ::RuboCop::Cop::RSpec::Base end module RuboCop::Cop::RSpec::FactoryBot::CreateList::Corrector - private def build_options_string(options); end @@ -612,7 +578,7 @@ module RuboCop::Cop::RSpec::FactoryBot::CreateList::Corrector end class RuboCop::Cop::RSpec::FactoryBot::CreateList::CreateListCorrector - include(::RuboCop::Cop::RSpec::FactoryBot::CreateList::Corrector) + include ::RuboCop::Cop::RSpec::FactoryBot::CreateList::Corrector def initialize(node); end @@ -630,13 +596,11 @@ class RuboCop::Cop::RSpec::FactoryBot::CreateList::CreateListCorrector end RuboCop::Cop::RSpec::FactoryBot::CreateList::MSG_CREATE_LIST = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::FactoryBot::CreateList::MSG_N_TIMES = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::FactoryBot::CreateList::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::RSpec::FactoryBot::CreateList::TimesCorrector - include(::RuboCop::Cop::RSpec::FactoryBot::CreateList::Corrector) + include ::RuboCop::Cop::RSpec::FactoryBot::CreateList::Corrector def initialize(node); end @@ -649,7 +613,7 @@ class RuboCop::Cop::RSpec::FactoryBot::CreateList::TimesCorrector end class RuboCop::Cop::RSpec::FactoryBot::FactoryClassName < ::RuboCop::Cop::RSpec::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def class_name(param0 = T.unsafe(nil)); end def on_send(node); end @@ -660,28 +624,26 @@ class RuboCop::Cop::RSpec::FactoryBot::FactoryClassName < ::RuboCop::Cop::RSpec: end RuboCop::Cop::RSpec::FactoryBot::FactoryClassName::ALLOWED_CONSTANTS = T.let(T.unsafe(nil), Array) - RuboCop::Cop::RSpec::FactoryBot::FactoryClassName::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::FactoryBot::FactoryClassName::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::RSpec::FilePath < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::RSpec::TopLevelGroup) + include ::RuboCop::Cop::RSpec::TopLevelGroup - def const_described(param0 = T.unsafe(nil)); end + def example_group(param0 = T.unsafe(nil)); end def on_top_level_example_group(node); end def routing_metadata?(param0); end private def camel_to_snake_case(string); end def custom_transform; end - def ensure_correct_file_path(send_node, described_class, arguments); end + def ensure_correct_file_path(send_node, example_group, arguments); end def expected_path(constant); end def filename_ends_with?(pattern); end def ignore_methods?; end def name_pattern(method_name); end - def pattern_for(described_class, method_name); end + def pattern_for(example_group, method_name); end def pattern_for_spec_suffix_only?; end def relevant_rubocop_rspec_file?(_file); end def routing_spec?(args); end @@ -695,8 +657,8 @@ module RuboCop::Cop::RSpec::FinalEndLocation end class RuboCop::Cop::RSpec::Focus < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::RangeHelp) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector def focusable_selector?(param0 = T.unsafe(nil)); end def focused_block?(param0 = T.unsafe(nil)); end @@ -713,8 +675,8 @@ end RuboCop::Cop::RSpec::Focus::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::HookArgument < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::ConfigurableEnforcedStyle) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector def on_block(node); end def scoped_hook(param0 = T.unsafe(nil)); end @@ -730,11 +692,10 @@ class RuboCop::Cop::RSpec::HookArgument < ::RuboCop::Cop::RSpec::Base end RuboCop::Cop::RSpec::HookArgument::EXPLICIT_MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::HookArgument::IMPLICIT_MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::HooksBeforeExamples < ::RuboCop::Cop::RSpec::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def example_or_group?(param0 = T.unsafe(nil)); end def on_block(node); end @@ -749,6 +710,14 @@ end RuboCop::Cop::RSpec::HooksBeforeExamples::MSG = T.let(T.unsafe(nil), String) +class RuboCop::Cop::RSpec::IdenticalEqualityAssertion < ::RuboCop::Cop::RSpec::Base + def equality_check?(param0 = T.unsafe(nil)); end + def on_send(node); end +end + +RuboCop::Cop::RSpec::IdenticalEqualityAssertion::MSG = T.let(T.unsafe(nil), String) +RuboCop::Cop::RSpec::IdenticalEqualityAssertion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + class RuboCop::Cop::RSpec::ImplicitBlockExpectation < ::RuboCop::Cop::RSpec::Base def implicit_expect(param0 = T.unsafe(nil)); end def lambda?(param0 = T.unsafe(nil)); end @@ -763,12 +732,11 @@ class RuboCop::Cop::RSpec::ImplicitBlockExpectation < ::RuboCop::Cop::RSpec::Bas end RuboCop::Cop::RSpec::ImplicitBlockExpectation::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::ImplicitBlockExpectation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::RSpec::ImplicitExpect < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::ConfigurableEnforcedStyle) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector def implicit_expect(param0 = T.unsafe(nil)); end def on_send(node); end @@ -782,12 +750,11 @@ class RuboCop::Cop::RSpec::ImplicitExpect < ::RuboCop::Cop::RSpec::Base end RuboCop::Cop::RSpec::ImplicitExpect::ENFORCED_REPLACEMENTS = T.let(T.unsafe(nil), Hash) - RuboCop::Cop::RSpec::ImplicitExpect::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::ImplicitSubject < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::ConfigurableEnforcedStyle) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector def implicit_subject?(param0 = T.unsafe(nil)); end def on_send(node); end @@ -800,12 +767,11 @@ class RuboCop::Cop::RSpec::ImplicitSubject < ::RuboCop::Cop::RSpec::Base end RuboCop::Cop::RSpec::ImplicitSubject::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::ImplicitSubject::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) module RuboCop::Cop::RSpec::InflectedHelper - include(::RuboCop::RSpec::Language) - extend(::RuboCop::AST::NodePattern::Macros) + include ::RuboCop::RSpec::Language + extend ::RuboCop::AST::NodePattern::Macros def be_bool?(param0 = T.unsafe(nil)); end def be_boolthy?(param0 = T.unsafe(nil)); end @@ -826,7 +792,7 @@ end RuboCop::Cop::RSpec::InflectedHelper::MSG_INFLECTED = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::InstanceSpy < ::RuboCop::Cop::RSpec::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def have_received_usage(param0); end def null_double(param0); end @@ -840,7 +806,7 @@ end RuboCop::Cop::RSpec::InstanceSpy::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::InstanceVariable < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::RSpec::TopLevelGroup) + include ::RuboCop::Cop::RSpec::TopLevelGroup def custom_matcher?(param0 = T.unsafe(nil)); end def dynamic_class?(param0 = T.unsafe(nil)); end @@ -857,8 +823,8 @@ end RuboCop::Cop::RSpec::InstanceVariable::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::ItBehavesLike < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::ConfigurableEnforcedStyle) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector def example_inclusion_offense(param0 = T.unsafe(nil), param1); end def on_send(node); end @@ -869,7 +835,6 @@ class RuboCop::Cop::RSpec::ItBehavesLike < ::RuboCop::Cop::RSpec::Base end RuboCop::Cop::RSpec::ItBehavesLike::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::ItBehavesLike::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::RSpec::IteratedExpectation < ::RuboCop::Cop::RSpec::Base @@ -886,7 +851,7 @@ end RuboCop::Cop::RSpec::IteratedExpectation::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::LeadingSubject < ::RuboCop::Cop::RSpec::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def check_previous_nodes(node); end def on_block(node); end @@ -913,13 +878,11 @@ class RuboCop::Cop::RSpec::LeakyConstantDeclaration < ::RuboCop::Cop::RSpec::Bas end RuboCop::Cop::RSpec::LeakyConstantDeclaration::MSG_CLASS = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::LeakyConstantDeclaration::MSG_CONST = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::LeakyConstantDeclaration::MSG_MODULE = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::LetBeforeExamples < ::RuboCop::Cop::RSpec::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def example_or_group?(param0 = T.unsafe(nil)); end def on_block(node); end @@ -953,11 +916,10 @@ class RuboCop::Cop::RSpec::MessageChain < ::RuboCop::Cop::RSpec::Base end RuboCop::Cop::RSpec::MessageChain::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::MessageChain::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::RSpec::MessageExpectation < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::ConfigurableEnforcedStyle) + include ::RuboCop::Cop::ConfigurableEnforcedStyle def message_expectation(param0 = T.unsafe(nil)); end def on_send(node); end @@ -969,13 +931,11 @@ class RuboCop::Cop::RSpec::MessageExpectation < ::RuboCop::Cop::RSpec::Base end RuboCop::Cop::RSpec::MessageExpectation::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::MessageExpectation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - RuboCop::Cop::RSpec::MessageExpectation::SUPPORTED_STYLES = T.let(T.unsafe(nil), Array) class RuboCop::Cop::RSpec::MessageSpies < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::ConfigurableEnforcedStyle) + include ::RuboCop::Cop::ConfigurableEnforcedStyle def message_expectation(param0 = T.unsafe(nil)); end def on_send(node); end @@ -989,9 +949,7 @@ class RuboCop::Cop::RSpec::MessageSpies < ::RuboCop::Cop::RSpec::Base end RuboCop::Cop::RSpec::MessageSpies::MSG_HAVE_RECEIVED = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::MessageSpies::MSG_RECEIVE = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::MessageSpies::SUPPORTED_STYLES = T.let(T.unsafe(nil), Array) class RuboCop::Cop::RSpec::MissingExampleGroupArgument < ::RuboCop::Cop::RSpec::Base @@ -1001,15 +959,15 @@ end RuboCop::Cop::RSpec::MissingExampleGroupArgument::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::MultipleDescribes < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::RSpec::TopLevelGroup) + include ::RuboCop::Cop::RSpec::TopLevelGroup def on_top_level_group(node); end end RuboCop::Cop::RSpec::MultipleDescribes::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::MultipleExpectations < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::ConfigurableMax) + include ::RuboCop::Cop::ConfigurableMax def aggregate_failures?(param0 = T.unsafe(nil), param1); end def aggregate_failures_block?(param0 = T.unsafe(nil)); end @@ -1026,14 +984,12 @@ class RuboCop::Cop::RSpec::MultipleExpectations < ::RuboCop::Cop::RSpec::Base end RuboCop::Cop::RSpec::MultipleExpectations::ANYTHING = T.let(T.unsafe(nil), Proc) - RuboCop::Cop::RSpec::MultipleExpectations::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::MultipleExpectations::TRUE = T.let(T.unsafe(nil), Proc) class RuboCop::Cop::RSpec::MultipleMemoizedHelpers < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::ConfigurableMax) - include(::RuboCop::Cop::RSpec::Variable) + include ::RuboCop::Cop::ConfigurableMax + include ::RuboCop::Cop::RSpec::Variable def on_block(node); end def on_new_investigation; end @@ -1051,8 +1007,8 @@ end RuboCop::Cop::RSpec::MultipleMemoizedHelpers::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::MultipleSubjects < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::RangeHelp) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector def on_block(node); end @@ -1077,8 +1033,8 @@ end RuboCop::Cop::RSpec::NamedSubject::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::NestedGroups < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::ConfigurableMax) - include(::RuboCop::Cop::RSpec::TopLevelGroup) + include ::RuboCop::Cop::ConfigurableMax + include ::RuboCop::Cop::RSpec::TopLevelGroup def on_top_level_group(node); end @@ -1091,14 +1047,12 @@ class RuboCop::Cop::RSpec::NestedGroups < ::RuboCop::Cop::RSpec::Base end RuboCop::Cop::RSpec::NestedGroups::DEPRECATED_MAX_KEY = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::NestedGroups::DEPRECATION_WARNING = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::NestedGroups::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::NotToNot < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::ConfigurableEnforcedStyle) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector def not_to_not_offense(param0 = T.unsafe(nil), param1); end def on_send(node); end @@ -1109,7 +1063,6 @@ class RuboCop::Cop::RSpec::NotToNot < ::RuboCop::Cop::RSpec::Base end RuboCop::Cop::RSpec::NotToNot::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::NotToNot::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::RSpec::OverwritingSetup < ::RuboCop::Cop::RSpec::Base @@ -1140,10 +1093,10 @@ end RuboCop::Cop::RSpec::Pending::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::PredicateMatcher < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::ConfigurableEnforcedStyle) - include(::RuboCop::Cop::RSpec::InflectedHelper) - include(::RuboCop::Cop::RSpec::ExplicitHelper) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RSpec::InflectedHelper + include ::RuboCop::Cop::RSpec::ExplicitHelper + extend ::RuboCop::Cop::AutoCorrector def on_block(node); end def on_send(node); end @@ -1154,12 +1107,20 @@ class RuboCop::Cop::RSpec::PredicateMatcher < ::RuboCop::Cop::RSpec::Base def block_loc(send_node); end end -module RuboCop::Cop::RSpec::Rails +module RuboCop::Cop::RSpec::Rails; end + +class RuboCop::Cop::RSpec::Rails::AvoidSetupHook < ::RuboCop::Cop::RSpec::Base + extend ::RuboCop::Cop::AutoCorrector + + def on_block(node); end + def setup_call(param0 = T.unsafe(nil)); end end +RuboCop::Cop::RSpec::Rails::AvoidSetupHook::MSG = T.let(T.unsafe(nil), String) + class RuboCop::Cop::RSpec::Rails::HttpStatus < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::ConfigurableEnforcedStyle) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector def http_status(param0 = T.unsafe(nil)); end def on_send(node); end @@ -1185,9 +1146,7 @@ class RuboCop::Cop::RSpec::Rails::HttpStatus::NumericStyleChecker end RuboCop::Cop::RSpec::Rails::HttpStatus::NumericStyleChecker::ALLOWED_STATUSES = T.let(T.unsafe(nil), Array) - RuboCop::Cop::RSpec::Rails::HttpStatus::NumericStyleChecker::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::Rails::HttpStatus::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::RSpec::Rails::HttpStatus::SymbolicStyleChecker @@ -1208,7 +1167,7 @@ end RuboCop::Cop::RSpec::Rails::HttpStatus::SymbolicStyleChecker::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::ReceiveCounts < ::RuboCop::Cop::RSpec::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def on_send(node); end def receive_counts(param0 = T.unsafe(nil)); end @@ -1223,11 +1182,10 @@ class RuboCop::Cop::RSpec::ReceiveCounts < ::RuboCop::Cop::RSpec::Base end RuboCop::Cop::RSpec::ReceiveCounts::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::ReceiveCounts::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::RSpec::ReceiveNever < ::RuboCop::Cop::RSpec::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def method_on_stub?(param0); end def on_send(node); end @@ -1238,7 +1196,6 @@ class RuboCop::Cop::RSpec::ReceiveNever < ::RuboCop::Cop::RSpec::Base end RuboCop::Cop::RSpec::ReceiveNever::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::ReceiveNever::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::RSpec::RepeatedDescription < ::RuboCop::Cop::RSpec::Base @@ -1315,8 +1272,8 @@ end RuboCop::Cop::RSpec::RepeatedIncludeExample::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::ReturnFromStub < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::ConfigurableEnforcedStyle) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector def and_return_value(param0); end def contains_stub?(param0); end @@ -1361,15 +1318,12 @@ class RuboCop::Cop::RSpec::ReturnFromStub::BlockBodyCorrector end RuboCop::Cop::RSpec::ReturnFromStub::BlockBodyCorrector::NULL_BLOCK_BODY = T.let(T.unsafe(nil), T.untyped) - RuboCop::Cop::RSpec::ReturnFromStub::MSG_AND_RETURN = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::ReturnFromStub::MSG_BLOCK = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::ReturnFromStub::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::RSpec::ScatteredLet < ::RuboCop::Cop::RSpec::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def on_block(node); end @@ -1390,7 +1344,7 @@ end RuboCop::Cop::RSpec::ScatteredSetup::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::SharedContext < ::RuboCop::Cop::RSpec::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def context?(param0); end def examples?(param0); end @@ -1405,11 +1359,10 @@ class RuboCop::Cop::RSpec::SharedContext < ::RuboCop::Cop::RSpec::Base end RuboCop::Cop::RSpec::SharedContext::MSG_CONTEXT = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::SharedContext::MSG_EXAMPLES = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::SharedExamples < ::RuboCop::Cop::RSpec::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def on_send(node); end def shared_examples(param0 = T.unsafe(nil)); end @@ -1431,7 +1384,7 @@ end RuboCop::Cop::RSpec::SharedExamples::Checker::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::SingleArgumentMessageChain < ::RuboCop::Cop::RSpec::Base - extend(::RuboCop::Cop::AutoCorrector) + extend ::RuboCop::Cop::AutoCorrector def message_chain(param0 = T.unsafe(nil)); end def on_send(node); end @@ -1449,7 +1402,6 @@ class RuboCop::Cop::RSpec::SingleArgumentMessageChain < ::RuboCop::Cop::RSpec::B end RuboCop::Cop::RSpec::SingleArgumentMessageChain::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::SingleArgumentMessageChain::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::RSpec::StubbedMock < ::RuboCop::Cop::RSpec::Base @@ -1472,7 +1424,7 @@ end RuboCop::Cop::RSpec::StubbedMock::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::SubjectStub < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::RSpec::TopLevelGroup) + include ::RuboCop::Cop::RSpec::TopLevelGroup def message_expectation?(param0 = T.unsafe(nil), param1); end def message_expectation_matcher?(param0); end @@ -1488,7 +1440,7 @@ end RuboCop::Cop::RSpec::SubjectStub::MSG = T.let(T.unsafe(nil), String) module RuboCop::Cop::RSpec::TopLevelGroup - extend(::RuboCop::AST::NodePattern::Macros) + extend ::RuboCop::AST::NodePattern::Macros def on_new_investigation; end def top_level_groups; end @@ -1510,22 +1462,20 @@ class RuboCop::Cop::RSpec::UnspecifiedException < ::RuboCop::Cop::RSpec::Base end RuboCop::Cop::RSpec::UnspecifiedException::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::UnspecifiedException::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) module RuboCop::Cop::RSpec::Variable - extend(::RuboCop::AST::NodePattern::Macros) + extend ::RuboCop::AST::NodePattern::Macros def variable_definition?(param0 = T.unsafe(nil)); end end RuboCop::Cop::RSpec::Variable::Helpers = RuboCop::RSpec::Language::Helpers - RuboCop::Cop::RSpec::Variable::Subjects = RuboCop::RSpec::Language::Subjects class RuboCop::Cop::RSpec::VariableDefinition < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::ConfigurableEnforcedStyle) - include(::RuboCop::Cop::RSpec::Variable) + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RSpec::Variable def on_send(node); end @@ -1539,11 +1489,11 @@ end RuboCop::Cop::RSpec::VariableDefinition::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::RSpec::VariableName < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::ConfigurableEnforcedStyle) - include(::RuboCop::Cop::ConfigurableFormatting) - include(::RuboCop::Cop::ConfigurableNaming) - include(::RuboCop::Cop::IgnoredPattern) - include(::RuboCop::Cop::RSpec::Variable) + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::ConfigurableFormatting + include ::RuboCop::Cop::ConfigurableNaming + include ::RuboCop::Cop::IgnoredPattern + include ::RuboCop::Cop::RSpec::Variable def on_send(node); end @@ -1564,7 +1514,6 @@ class RuboCop::Cop::RSpec::VerifiedDoubles < ::RuboCop::Cop::RSpec::Base end RuboCop::Cop::RSpec::VerifiedDoubles::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::VerifiedDoubles::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::RSpec::VoidExpect < ::RuboCop::Cop::RSpec::Base @@ -1580,12 +1529,11 @@ class RuboCop::Cop::RSpec::VoidExpect < ::RuboCop::Cop::RSpec::Base end RuboCop::Cop::RSpec::VoidExpect::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::RSpec::VoidExpect::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::RSpec::Yield < ::RuboCop::Cop::RSpec::Base - include(::RuboCop::Cop::RangeHelp) - extend(::RuboCop::Cop::AutoCorrector) + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector def block_arg(param0 = T.unsafe(nil)); end def block_call?(param0 = T.unsafe(nil), param1); end @@ -1602,16 +1550,12 @@ class RuboCop::Cop::RSpec::Yield < ::RuboCop::Cop::RSpec::Base end RuboCop::Cop::RSpec::Yield::MSG = T.let(T.unsafe(nil), String) - RuboCop::NodePattern = RuboCop::AST::NodePattern - RuboCop::ProcessedSource = RuboCop::AST::ProcessedSource - -module RuboCop::RSpec -end +module RuboCop::RSpec; end class RuboCop::RSpec::AlignLetBrace - include(::RuboCop::RSpec::Language) + include ::RuboCop::RSpec::Language def initialize(root, token); end @@ -1630,9 +1574,9 @@ class RuboCop::RSpec::AlignLetBrace end class RuboCop::RSpec::Concept - include(::RuboCop::RSpec::Language) - extend(::RuboCop::AST::NodePattern::Macros) - extend(::RuboCop::RSpec::Language::NodePattern) + include ::RuboCop::RSpec::Language + extend ::RuboCop::AST::NodePattern::Macros + extend ::RuboCop::RSpec::Language::NodePattern def initialize(node); end @@ -1646,13 +1590,12 @@ class RuboCop::RSpec::Concept def node; end end -module RuboCop::RSpec::Corrector -end +module RuboCop::RSpec::Corrector; end class RuboCop::RSpec::Corrector::MoveNode - include(::RuboCop::Cop::RangeHelp) - include(::RuboCop::Cop::RSpec::FinalEndLocation) - include(::RuboCop::Cop::RSpec::CommentsHelp) + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::RSpec::FinalEndLocation + include ::RuboCop::Cop::RSpec::CommentsHelp def initialize(node, corrector, processed_source); end @@ -1699,6 +1642,11 @@ module RuboCop::RSpec::FactoryBot end end +RuboCop::RSpec::FactoryBot::ATTRIBUTE_DEFINING_METHODS = T.let(T.unsafe(nil), Array) +RuboCop::RSpec::FactoryBot::DEFINITION_PROXY_METHODS = T.let(T.unsafe(nil), Array) +RuboCop::RSpec::FactoryBot::RESERVED_METHODS = T.let(T.unsafe(nil), Array) +RuboCop::RSpec::FactoryBot::UNPROXIED_METHODS = T.let(T.unsafe(nil), Array) + class RuboCop::RSpec::Hook < ::RuboCop::RSpec::Concept def example?; end def extract_metadata(param0 = T.unsafe(nil)); end @@ -1723,8 +1671,8 @@ module RuboCop::RSpec::Inject end module RuboCop::RSpec::Language - extend(::RuboCop::AST::NodePattern::Macros) - extend(::RuboCop::RSpec::Language::NodePattern) + extend ::RuboCop::AST::NodePattern::Macros + extend ::RuboCop::RSpec::Language::NodePattern def example?(param0 = T.unsafe(nil)); end def example_group?(param0 = T.unsafe(nil)); end @@ -1743,6 +1691,37 @@ module RuboCop::RSpec::Language end end +module RuboCop::RSpec::Language::ALL + class << self + def all(element); end + end +end + +module RuboCop::RSpec::Language::ExampleGroups + class << self + def all(element); end + def focused(element); end + def regular(element); end + def skipped(element); end + end +end + +module RuboCop::RSpec::Language::Examples + class << self + def all(element); end + def focused(element); end + def pending(element); end + def regular(element); end + def skipped(element); end + end +end + +module RuboCop::RSpec::Language::Expectations + class << self + def all(element); end + end +end + module RuboCop::RSpec::Language::Helpers class << self def all(element); end @@ -1755,11 +1734,39 @@ module RuboCop::RSpec::Language::HookScopes end end +module RuboCop::RSpec::Language::Hooks + class << self + def all(element); end + end +end + +module RuboCop::RSpec::Language::Includes + class << self + def all(element); end + def context(element); end + def examples(element); end + end +end + module RuboCop::RSpec::Language::NodePattern def block_pattern(string); end def send_pattern(string); end end +module RuboCop::RSpec::Language::Runners + class << self + def all(element); end + end +end + +module RuboCop::RSpec::Language::SharedGroups + class << self + def all(element); end + def context(element); end + def examples(element); end + end +end + module RuboCop::RSpec::Language::Subjects class << self def all(element); end @@ -1770,9 +1777,7 @@ module RuboCop::RSpec::Node def recursive_literal_or_const?; end end -module RuboCop::RSpec::Version -end - +module RuboCop::RSpec::Version; end RuboCop::RSpec::Version::STRING = T.let(T.unsafe(nil), String) class RuboCop::RSpec::Wording @@ -1793,4 +1798,8 @@ class RuboCop::RSpec::Wording def uppercase?(word); end end +RuboCop::RSpec::Wording::ES_SUFFIX_PATTERN = T.let(T.unsafe(nil), Regexp) +RuboCop::RSpec::Wording::IES_SUFFIX_PATTERN = T.let(T.unsafe(nil), Regexp) +RuboCop::RSpec::Wording::SHOULDNT_BE_PREFIX = T.let(T.unsafe(nil), Regexp) +RuboCop::RSpec::Wording::SHOULDNT_PREFIX = T.let(T.unsafe(nil), Regexp) RuboCop::Token = RuboCop::AST::Token
true
Other
Homebrew
brew
c2eab8f2144ebf41f3d2b7cee099d3980faf5d25.json
Update RBI files for rubocop-rspec.
Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi
@@ -26803,6 +26803,7 @@ end module RuboCop::AST::NodePattern::Sets SET_BUILD_RECOMMENDED_TEST_OPTIONAL = ::T.let(nil, ::T.untyped) SET_DEPENDS_ON_USES_FROM_MACOS = ::T.let(nil, ::T.untyped) + SET_EQL_EQ_BE = ::T.let(nil, ::T.untyped) SET_INCLUDE_WITH_WITHOUT = ::T.let(nil, ::T.untyped) SET_SYSTEM_SHELL_OUTPUT_PIPE_OUTPUT = ::T.let(nil, ::T.untyped) SET_WITH_WITHOUT = ::T.let(nil, ::T.untyped)
true
Other
Homebrew
brew
06a48f24cde4647a726e0b190aafd318bb165454.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
@@ -12662,6 +12662,7 @@ class Object DEPRECATED_OFFICIAL_TAPS = ::T.let(nil, ::T.untyped) ENV = ::T.let(nil, ::T.untyped) FORMULA_COMPONENT_PRECEDENCE_LIST = ::T.let(nil, ::T.untyped) + HIDDEN_DESC_PLACEHOLDER = ::T.let(nil, ::T.untyped) HOMEBREW_BOTTLES_EXTNAME_REGEX = ::T.let(nil, ::T.untyped) HOMEBREW_BOTTLE_DEFAULT_DOMAIN = ::T.let(nil, ::T.untyped) HOMEBREW_BREW_DEFAULT_GIT_REMOTE = ::T.let(nil, ::T.untyped)
false
Other
Homebrew
brew
155feba8e057e8dc66661ad6fe8021a30a5c4e93.json
cask/installer: Add Cask caveats to the end-of-operation summary - Both formulae and casks can have caveats, but only formulae caveats were shown at the end of a bulk install/upgrade/reinstall operation via `Homebrew.messages.record_caveats`. This fixes that to show Cask caveats too, for consistency (scrolling up all of the multi-formulae-and-casks output to see caveats is time-consuming and users might miss them). - In doing this I had to change how `Messages#record_caveats` works since the cask name is just a string, not an object.
Library/Homebrew/cask/installer.rb
@@ -56,6 +56,8 @@ def self.caveats(cask) caveats = cask.caveats return if caveats.empty? + Homebrew.messages.record_caveats(cask.token, caveats) + <<~EOS #{ohai_title "Caveats"} #{caveats}
true
Other
Homebrew
brew
155feba8e057e8dc66661ad6fe8021a30a5c4e93.json
cask/installer: Add Cask caveats to the end-of-operation summary - Both formulae and casks can have caveats, but only formulae caveats were shown at the end of a bulk install/upgrade/reinstall operation via `Homebrew.messages.record_caveats`. This fixes that to show Cask caveats too, for consistency (scrolling up all of the multi-formulae-and-casks output to see caveats is time-consuming and users might miss them). - In doing this I had to change how `Messages#record_caveats` works since the cask name is just a string, not an object.
Library/Homebrew/formula_installer.rb
@@ -769,7 +769,7 @@ def caveats @show_summary_heading = true ohai "Caveats", caveats.to_s - Homebrew.messages.record_caveats(formula, caveats) + Homebrew.messages.record_caveats(formula.name, caveats) end sig { void }
true
Other
Homebrew
brew
155feba8e057e8dc66661ad6fe8021a30a5c4e93.json
cask/installer: Add Cask caveats to the end-of-operation summary - Both formulae and casks can have caveats, but only formulae caveats were shown at the end of a bulk install/upgrade/reinstall operation via `Homebrew.messages.record_caveats`. This fixes that to show Cask caveats too, for consistency (scrolling up all of the multi-formulae-and-casks output to see caveats is time-consuming and users might miss them). - In doing this I had to change how `Messages#record_caveats` works since the cask name is just a string, not an object.
Library/Homebrew/messages.rb
@@ -15,8 +15,8 @@ def initialize @install_times = [] end - def record_caveats(f, caveats) - @caveats.push(formula: f.name, caveats: caveats) + def record_caveats(package, caveats) + @caveats.push(package: package, caveats: caveats) end def formula_installed(f, elapsed_time) @@ -36,7 +36,7 @@ def display_caveats(force: false) oh1 "Caveats" @caveats.each do |c| - ohai c[:formula], c[:caveats] + ohai c[:package], c[:caveats] end end
true
Other
Homebrew
brew
45f23d4c16223695dfa1685697f8f610d6dcbece.json
docs: improve terminology guide from code review Co-Authored-By: Mike McQuaid <mike@mikemcquaid.com>
Library/Homebrew/manpages/brew.1.md.erb
@@ -30,21 +30,25 @@ Linux distribution to your home directory without requiring `sudo`. ## TERMINOLOGY -**Formula**: The package definition +**formula**: Homebrew package definition built from upstream sources -**Cask**: An extension of Homebrew to install macOS native apps +**cask**: Homebrew package definition that installs macOS native applications -**Keg**: The installation prefix of a **Formula** +**keg**: installation destination directory of a given **formula** version e.g. `/usr/local/Cellar/foo/0.1` -**Keg-only**: A **Formula** is **Keg-only** if it is not linked into the Homebrew prefix +**rack**: directory containing one or more versioned kegs e.g. `/usr/local/Cellar/foo` -**Cellar**: All **Kegs** are installed here +**keg-only**: a **formula** is **keg-only** if it is not symlinked into Homebrew's prefix (e.g. `/usr/local`) -**Caskroom**: All **Casks** are installed here +**cellar**: directory containing one or more named **racks** e.g. `/usr/local/Cellar` -**Tap**: A Git repository of **Formulae** and/or commands +**Caskroom**: directory containing one or more named **casks** e.g. `/usr/local/Caskroom` -**Bottle**: Pre-built **Keg** used instead of building from source +**external command**: `brew` subcommand defined outside of the Homebrew/brew GitHub repository + +**tap**: directory (and usually Git repository) of **formulae**, **casks** and/or **external commands** + +**bottle**: pre-built **keg** poured into the **cellar**/**rack** instead of building from upstream sources ## ESSENTIAL COMMANDS
true
Other
Homebrew
brew
45f23d4c16223695dfa1685697f8f610d6dcbece.json
docs: improve terminology guide from code review Co-Authored-By: Mike McQuaid <mike@mikemcquaid.com>
docs/Manpage.md
@@ -14,21 +14,25 @@ Linux distribution to your home directory without requiring `sudo`. ## TERMINOLOGY -**Formula**: The package definition +**formula**: Homebrew package definition built from upstream sources -**Cask**: An extension of Homebrew to install macOS native apps +**cask**: Homebrew package definition that installs macOS native applications -**Keg**: The installation prefix of a **Formula** +**keg**: installation destination directory of a given **formula** version e.g. `/usr/local/Cellar/foo/0.1` -**Keg-only**: A **Formula** is **Keg-only** if it is not linked into the Homebrew prefix +**rack**: directory containing one or more versioned kegs e.g. `/usr/local/Cellar/foo` -**Cellar**: All **Kegs** are installed here +**keg-only**: a **formula** is **keg-only** if it is not symlinked into Homebrew's prefix (e.g. `/usr/local`) -**Caskroom**: All **Casks** are installed here +**cellar**: directory containing one or more named **racks** e.g. `/usr/local/Cellar` -**Tap**: A Git repository of **Formulae** and/or commands +**Caskroom**: directory containing one or more named **casks** e.g. `/usr/local/Caskroom` -**Bottle**: Pre-built **Keg** used instead of building from source +**external command**: `brew` subcommand defined outside of the Homebrew/brew GitHub repository + +**tap**: directory (and usually Git repository) of **formulae**, **casks** and/or **external commands** + +**bottle**: pre-built **keg** poured into the **cellar**/**rack** instead of building from upstream sources ## ESSENTIAL COMMANDS
true
Other
Homebrew
brew
45f23d4c16223695dfa1685697f8f610d6dcbece.json
docs: improve terminology guide from code review Co-Authored-By: Mike McQuaid <mike@mikemcquaid.com>
manpages/brew.1
@@ -16,36 +16,44 @@ Homebrew is the easiest and most flexible way to install the UNIX tools Apple didn\'t include with macOS\. It can also install software not packaged for your Linux distribution to your home directory without requiring \fBsudo\fR\. . .SH "TERMINOLOGY" -\fBFormula\fR - The package definition +\fBformula\fR + Homebrew package definition built from upstream sources . .P -\fBCask\fR - An extension of Homebrew to install macOS native apps +\fBcask\fR + Homebrew package definition that installs macOS native applications . .P -\fBKeg\fR - The installation prefix of a \fBFormula\fR +\fBkeg\fR + installation destination directory of a given \fBformula\fR version e\.g\. \fB/usr/local/Cellar/foo/0\.1\fR . .P -\fBKeg\-only\fR - A \fBFormula\fR is \fBKeg\-only\fR if it is not linked into the Homebrew prefix +\fBrack\fR + directory containing one or more versioned kegs e\.g\. \fB/usr/local/Cellar/foo\fR . .P -\fBCellar\fR - All \fBKegs\fR are installed here +\fBkeg\-only\fR + a \fBformula\fR is \fBkeg\-only\fR if it is not symlinked into Homebrew\'s prefix (e\.g\. \fB/usr/local\fR) +. +.P +\fBcellar\fR + directory containing one or more named \fBracks\fR e\.g\. \fB/usr/local/Cellar\fR . .P \fBCaskroom\fR - All \fBCasks\fR are installed here + directory containing one or more named \fBcasks\fR e\.g\. \fB/usr/local/Caskroom\fR +. +.P +\fBexternal command\fR + \fBbrew\fR subcommand defined outside of the Homebrew/brew GitHub repository . .P -\fBTap\fR - A Git repository of \fBFormulae\fR and/or commands +\fBtap\fR + directory (and usually Git repository) of \fBformulae\fR, \fBcasks\fR and/or \fBexternal commands\fR . .P -\fBBottle\fR - Pre\-built \fBKeg\fR used instead of building from source +\fBbottle\fR + pre\-built \fBkeg\fR poured into the \fBcellar\fR/\fBrack\fR instead of building from upstream sources . .SH "ESSENTIAL COMMANDS" For the full command list, see the \fICOMMANDS\fR section\.
true
Other
Homebrew
brew
3a746723c351a582c2711b67c412e3905527776e.json
Add missing comma
Library/Homebrew/os/mac/version.rb
@@ -14,7 +14,7 @@ class Version < ::Version extend T::Sig SYMBOLS = { - monterey: "12" + monterey: "12", big_sur: "11", catalina: "10.15", mojave: "10.14",
false
Other
Homebrew
brew
d7d9a256a13727fee0f802a2f3e22062a6d68774.json
Add macOS 12
Library/Homebrew/os/mac/version.rb
@@ -14,6 +14,7 @@ class Version < ::Version extend T::Sig SYMBOLS = { + monterey: "12" big_sur: "11", catalina: "10.15", mojave: "10.14",
false
Other
Homebrew
brew
2c22a258a08c3e6366fc7e6092ae2a01be0f3641.json
docs: Separate terminology from cookbook and manpages
Library/Homebrew/dev-cmd/generate-man-completions.rb
@@ -67,7 +67,6 @@ def build_man_page(quiet:) generate_cmd_manpages(Commands.official_external_commands_paths(quiet: quiet)) variables[:global_cask_options] = global_cask_options_manpage variables[:global_options] = global_options_manpage - variables[:terminology] = terminology_manpage variables[:environment_variables] = env_vars_manpage readme = HOMEBREW_REPOSITORY/"README.md" @@ -230,22 +229,6 @@ def global_options_manpage lines.join("\n") end - sig { returns(String) } - def terminology_manpage - formula_cookbook_text = (HOMEBREW_REPOSITORY/"docs/Formula-Cookbook.md").read.split("\n") - - start_term = "## Homebrew terminology" - start_index = formula_cookbook_text.index(start_term) + 4 # Skip ahead to the table contents - end_index = formula_cookbook_text.index "## An introduction" - formula_cookbook_text[start_index...end_index].map do |item| - next "" unless item.include? "|" - - term, definition, example = item.split("|").map(&:strip)[1..] - definition.gsub!(/\[(.*)\]\(.*\)/, '\1') - "#{term}: #{definition} (e.g. #{example})" - end.join("\n\n") - end - sig { returns(String) } def env_vars_manpage lines = Homebrew::EnvConfig::ENVS.flat_map do |env, hash|
true
Other
Homebrew
brew
2c22a258a08c3e6366fc7e6092ae2a01be0f3641.json
docs: Separate terminology from cookbook and manpages
Library/Homebrew/manpages/brew.1.md.erb
@@ -28,6 +28,24 @@ Homebrew is the easiest and most flexible way to install the UNIX tools Apple didn't include with macOS. It can also install software not packaged for your Linux distribution to your home directory without requiring `sudo`. +## TERMINOLOGY + +**Formula**: The package definition + +**Cask**: An extension of Homebrew to install macOS native apps + +**Keg**: The installation prefix of a **Formula** + +**Keg-only**: A **Formula** is **Keg-only** if it is not linked into the Homebrew prefix + +**Cellar**: All **Kegs** are installed here + +**Caskroom**: All **Casks** are installed here + +**Tap**: A Git repository of **Formulae** and/or commands + +**Bottle**: Pre-built **Keg** used instead of building from source + ## ESSENTIAL COMMANDS For the full command list, see the [COMMANDS](#commands) section. @@ -137,10 +155,6 @@ And for an authenticated HTTP proxy: export http_proxy=http://$USER:$PASSWORD@$HOST:$PORT -## TERMINOLOGY - -<%= terminology %> - ## SEE ALSO Homebrew Documentation: <https://docs.brew.sh>
true
Other
Homebrew
brew
2c22a258a08c3e6366fc7e6092ae2a01be0f3641.json
docs: Separate terminology from cookbook and manpages
docs/Formula-Cookbook.md
@@ -8,7 +8,8 @@ A *formula* is a package definition written in Ruby. It can be created with `bre |----------------|------------------------------------------------------------|-----------------------------------------------------------------| | **Formula** | The package definition | `/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/foo.rb` | | **Keg** | The installation prefix of a **Formula** | `/usr/local/Cellar/foo/0.1` | -| **opt prefix** | A symlink to the active version of a **Keg** | `/usr/local/opt/foo` | +| **Keg-only** | A **Formula** is **Keg-only** if it is not linked into the Homebrew prefix | The [`openjdk` formula](https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/openjdk.rb) | +| **opt prefix** | A symlink to the active version of a **Keg** | `/usr/local/opt/foo ` | | **Cellar** | All **Kegs** are installed here | `/usr/local/Cellar` | | **Tap** | A Git repository of **Formulae** and/or commands | `/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core` | | **Bottle** | Pre-built **Keg** used instead of building from source | `qt-4.8.4.catalina.bottle.tar.gz` |
true
Other
Homebrew
brew
2c22a258a08c3e6366fc7e6092ae2a01be0f3641.json
docs: Separate terminology from cookbook and manpages
docs/Manpage.md
@@ -12,6 +12,24 @@ Homebrew is the easiest and most flexible way to install the UNIX tools Apple didn't include with macOS. It can also install software not packaged for your Linux distribution to your home directory without requiring `sudo`. +## TERMINOLOGY + +**Formula**: The package definition + +**Cask**: An extension of Homebrew to install macOS native apps + +**Keg**: The installation prefix of a **Formula** + +**Keg-only**: A **Formula** is **Keg-only** if it is not linked into the Homebrew prefix + +**Cellar**: All **Kegs** are installed here + +**Caskroom**: All **Casks** are installed here + +**Tap**: A Git repository of **Formulae** and/or commands + +**Bottle**: Pre-built **Keg** used instead of building from source + ## ESSENTIAL COMMANDS For the full command list, see the [COMMANDS](#commands) section. @@ -2052,24 +2070,6 @@ And for an authenticated HTTP proxy: export http_proxy=http://$USER:$PASSWORD@$HOST:$PORT -## TERMINOLOGY - -**Formula**: The package definition (e.g. `/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/foo.rb`) - -**Keg**: The installation prefix of a **Formula** (e.g. `/usr/local/Cellar/foo/0.1`) - -**opt prefix**: A symlink to the active version of a **Keg** (e.g. `/usr/local/opt/foo`) - -**Cellar**: All **Kegs** are installed here (e.g. `/usr/local/Cellar`) - -**Tap**: A Git repository of **Formulae** and/or commands (e.g. `/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core`) - -**Bottle**: Pre-built **Keg** used instead of building from source (e.g. `qt-4.8.4.catalina.bottle.tar.gz`) - -**Cask**: An extension of Homebrew to install macOS native apps (e.g. `/Applications/MacDown.app/Contents/SharedSupport/bin/macdown`) - -**Brew Bundle**: An extension of Homebrew to describe dependencies (e.g. `brew 'myservice', restart_service: true`) - ## SEE ALSO Homebrew Documentation: <https://docs.brew.sh> @@ -2107,6 +2107,7 @@ See our issues on GitHub: [SYNOPSIS]: #SYNOPSIS "SYNOPSIS" [DESCRIPTION]: #DESCRIPTION "DESCRIPTION" +[TERMINOLOGY]: #TERMINOLOGY "TERMINOLOGY" [ESSENTIAL COMMANDS]: #ESSENTIAL-COMMANDS "ESSENTIAL COMMANDS" [COMMANDS]: #COMMANDS "COMMANDS" [DEVELOPER COMMANDS]: #DEVELOPER-COMMANDS "DEVELOPER COMMANDS" @@ -2118,7 +2119,6 @@ See our issues on GitHub: [SPECIFYING CASKS]: #SPECIFYING-CASKS "SPECIFYING CASKS" [ENVIRONMENT]: #ENVIRONMENT "ENVIRONMENT" [USING HOMEBREW BEHIND A PROXY]: #USING-HOMEBREW-BEHIND-A-PROXY "USING HOMEBREW BEHIND A PROXY" -[TERMINOLOGY]: #TERMINOLOGY "TERMINOLOGY" [SEE ALSO]: #SEE-ALSO "SEE ALSO" [AUTHORS]: #AUTHORS "AUTHORS" [BUGS]: #BUGS "BUGS"
true
Other
Homebrew
brew
2c22a258a08c3e6366fc7e6092ae2a01be0f3641.json
docs: Separate terminology from cookbook and manpages
manpages/brew.1
@@ -15,6 +15,38 @@ .SH "DESCRIPTION" Homebrew is the easiest and most flexible way to install the UNIX tools Apple didn\'t include with macOS\. It can also install software not packaged for your Linux distribution to your home directory without requiring \fBsudo\fR\. . +.SH "TERMINOLOGY" +\fBFormula\fR + The package definition +. +.P +\fBCask\fR + An extension of Homebrew to install macOS native apps +. +.P +\fBKeg\fR + The installation prefix of a \fBFormula\fR +. +.P +\fBKeg\-only\fR + A \fBFormula\fR is \fBKeg\-only\fR if it is not linked into the Homebrew prefix +. +.P +\fBCellar\fR + All \fBKegs\fR are installed here +. +.P +\fBCaskroom\fR + All \fBCasks\fR are installed here +. +.P +\fBTap\fR + A Git repository of \fBFormulae\fR and/or commands +. +.P +\fBBottle\fR + Pre\-built \fBKeg\fR used instead of building from source +. .SH "ESSENTIAL COMMANDS" For the full command list, see the \fICOMMANDS\fR section\. . @@ -2988,38 +3020,6 @@ export http_proxy=http://$USER:$PASSWORD@$HOST:$PORT . .IP "" 0 . -.SH "TERMINOLOGY" -\fBFormula\fR - The package definition (e\.g\. \fB/usr/local/Homebrew/Library/Taps/homebrew/homebrew\-core/Formula/foo\.rb\fR) -. -.P -\fBKeg\fR - The installation prefix of a \fBFormula\fR (e\.g\. \fB/usr/local/Cellar/foo/0\.1\fR) -. -.P -\fBopt prefix\fR - A symlink to the active version of a \fBKeg\fR (e\.g\. \fB/usr/local/opt/foo\fR) -. -.P -\fBCellar\fR - All \fBKegs\fR are installed here (e\.g\. \fB/usr/local/Cellar\fR) -. -.P -\fBTap\fR - A Git repository of \fBFormulae\fR and/or commands (e\.g\. \fB/usr/local/Homebrew/Library/Taps/homebrew/homebrew\-core\fR) -. -.P -\fBBottle\fR - Pre\-built \fBKeg\fR used instead of building from source (e\.g\. \fBqt\-4\.8\.4\.catalina\.bottle\.tar\.gz\fR) -. -.P -\fBCask\fR - An extension of Homebrew to install macOS native apps (e\.g\. \fB/Applications/MacDown\.app/Contents/SharedSupport/bin/macdown\fR) -. -.P -\fBBrew Bundle\fR: An extension of Homebrew to describe dependencies (e\.g\. \fBbrew \'myservice\', restart_service - true\fR) -. .SH "SEE ALSO" Homebrew Documentation: \fIhttps://docs\.brew\.sh\fR .
true
Other
Homebrew
brew
c4d69dd2e903f7faa810da59cf4b307bd8cdd116.json
Revert "fix(vendor-gems): redirect bundler stdout to stderr"
Library/Homebrew/dev-cmd/vendor-gems.rb
@@ -40,7 +40,7 @@ def vendor_gems end ohai "bundle install --standalone" - safe_system_redirect_stdout_to_stderr "bundle", "install", "--standalone" + safe_system "bundle", "install", "--standalone" ohai "bundle pristine" safe_system "bundle", "pristine"
true
Other
Homebrew
brew
c4d69dd2e903f7faa810da59cf4b307bd8cdd116.json
Revert "fix(vendor-gems): redirect bundler stdout to stderr"
Library/Homebrew/utils.rb
@@ -332,19 +332,6 @@ def quiet_system(cmd, *args) end end - # Redirects stdout to stderr, throws exception on command failure. - def safe_system_redirect_stdout_to_stderr(cmd, *args) - return if Homebrew._system(cmd, *args) do - # Redirect stdout stream to stderr stream. This is useful to prevent - # subprocesses from writing to stdout and interfering with the intended - # output, e.g. when running a brew command with `--json` for programs - # automating brew commands. - $stdout.reopen($stderr) - end - - raise ErrorDuringExecution.new([cmd, *args], status: $CHILD_STATUS) - end - def which(cmd, path = ENV["PATH"]) PATH.new(path).each do |p| begin
true
Other
Homebrew
brew
c4d69dd2e903f7faa810da59cf4b307bd8cdd116.json
Revert "fix(vendor-gems): redirect bundler stdout to stderr"
Library/Homebrew/utils/gems.rb
@@ -144,9 +144,7 @@ def install_bundler_gems!(only_warn_on_failure: false, setup_path: true) # for some reason sometimes the exit code lies so check the output too. if bundle_check_failed || bundle_check_output.include?("Install missing gems") - begin - safe_system_redirect_stdout_to_stderr bundle, "install" - rescue ErrorDuringExecution + unless system bundle, "install" message = <<~EOS failed to run `#{bundle} install`! EOS
true
Other
Homebrew
brew
e7ef5f949daf3a9f1d1ead0e70baa8062a637400.json
Update RBI files for concurrent-ruby.
Library/Homebrew/sorbet/rbi/gems/concurrent-ruby@1.1.9.rbi
@@ -1,16 +1,15 @@ # DO NOT EDIT MANUALLY # This is an autogenerated file for types exported from the `concurrent-ruby` gem. -# Please instead update this file by running `tapioca sync`. +# Please instead update this file by running `bin/tapioca sync`. # typed: true module Concurrent - extend(::Concurrent::Utility::EngineDetector) - extend(::Concurrent::Utility::NativeExtensionLoader) - extend(::Logger::Severity) - extend(::Concurrent::Concern::Logging) - extend(::Concurrent::Concern::Deprecation) - + extend ::Concurrent::Utility::EngineDetector + extend ::Concurrent::Utility::NativeExtensionLoader + extend ::Logger::Severity + extend ::Concurrent::Concern::Logging + extend ::Concurrent::Concern::Deprecation private @@ -66,11 +65,13 @@ class Concurrent::AbstractExchanger < ::Concurrent::Synchronization::Object def do_exchange(value, timeout); end end +Concurrent::AbstractExchanger::CANCEL = T.let(T.unsafe(nil), Object) + class Concurrent::AbstractExecutorService < ::Concurrent::Synchronization::LockableObject - include(::Logger::Severity) - include(::Concurrent::Concern::Logging) - include(::Concurrent::ExecutorService) - include(::Concurrent::Concern::Deprecation) + include ::Logger::Severity + include ::Concurrent::Concern::Logging + include ::Concurrent::ExecutorService + include ::Concurrent::Concern::Deprecation def initialize(opts = T.unsafe(nil), &block); end @@ -111,7 +112,7 @@ class Concurrent::AbstractThreadLocalVar end class Concurrent::Agent < ::Concurrent::Synchronization::LockableObject - include(::Concurrent::Concern::Observable) + include ::Concurrent::Concern::Observable def initialize(initial, opts = T.unsafe(nil)); end @@ -155,18 +156,44 @@ class Concurrent::Agent < ::Concurrent::Synchronization::LockableObject end end +Concurrent::Agent::AWAIT_ACTION = T.let(T.unsafe(nil), Proc) +Concurrent::Agent::AWAIT_FLAG = T.let(T.unsafe(nil), Object) +Concurrent::Agent::DEFAULT_ERROR_HANDLER = T.let(T.unsafe(nil), Proc) +Concurrent::Agent::DEFAULT_VALIDATOR = T.let(T.unsafe(nil), Proc) +Concurrent::Agent::ERROR_MODES = T.let(T.unsafe(nil), Array) + class Concurrent::Agent::Error < ::StandardError def initialize(message = T.unsafe(nil)); end end +class Concurrent::Agent::Job < ::Struct + def action; end + def action=(_); end + def args; end + def args=(_); end + def caller; end + def caller=(_); end + def executor; end + def executor=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def members; end + def new(*_arg0); end + end +end + class Concurrent::Agent::ValidationError < ::Concurrent::Agent::Error def initialize(message = T.unsafe(nil)); end end -class Concurrent::Array < ::Array -end +class Concurrent::Array < ::Array; end +Concurrent::ArrayImplementation = Array module Concurrent::Async + mixes_in_class_methods ::Concurrent::Async::ClassMethods + def async; end def await; end def call; end @@ -179,8 +206,34 @@ module Concurrent::Async end end +class Concurrent::Async::AsyncDelegator < ::Concurrent::Synchronization::LockableObject + def initialize(delegate); end + + def method_missing(method, *args, &block); end + def perform; end + def reset_if_forked; end + + private + + def respond_to_missing?(method, include_private = T.unsafe(nil)); end +end + +class Concurrent::Async::AwaitDelegator + def initialize(delegate); end + + def method_missing(method, *args, &block); end + + private + + def respond_to_missing?(method, include_private = T.unsafe(nil)); end +end + +module Concurrent::Async::ClassMethods + def new(*args, &block); end +end + class Concurrent::Atom < ::Concurrent::Synchronization::Object - include(::Concurrent::Concern::Observable) + include ::Concurrent::Concern::Observable def initialize(value, opts = T.unsafe(nil)); end @@ -209,6 +262,8 @@ class Concurrent::AtomicBoolean < ::Concurrent::MutexAtomicBoolean def to_s; end end +Concurrent::AtomicBooleanImplementation = Concurrent::MutexAtomicBoolean + module Concurrent::AtomicDirectUpdate def try_update; end def try_update!; end @@ -220,6 +275,8 @@ class Concurrent::AtomicFixnum < ::Concurrent::MutexAtomicFixnum def to_s; end end +Concurrent::AtomicFixnumImplementation = Concurrent::MutexAtomicFixnum + class Concurrent::AtomicMarkableReference < ::Concurrent::Synchronization::Object def initialize(value = T.unsafe(nil), mark = T.unsafe(nil)); end @@ -258,21 +315,89 @@ class Concurrent::AtomicReference < ::Concurrent::MutexAtomicReference def to_s; end end -class Concurrent::CachedThreadPool < ::Concurrent::ThreadPoolExecutor - def initialize(opts = T.unsafe(nil)); end +Concurrent::AtomicReferenceImplementation = Concurrent::MutexAtomicReference +class Concurrent::CRubySet < ::Set + def initialize(*args, &block); end + + def &(*args); end + def +(*args); end + def -(*args); end + def <(*args); end + def <<(*args); end + def <=(*args); end + def ==(*args); end + def ===(*args); end + def >(*args); end + def >=(*args); end + def ^(*args); end + def add(*args); end + def add?(*args); end + def classify(*args); end + def clear(*args); end + def collect!(*args); end + def compare_by_identity(*args); end + def compare_by_identity?(*args); end + def delete(*args); end + def delete?(*args); end + def delete_if(*args); end + def difference(*args); end + def disjoint?(*args); end + def divide(*args); end + def each(*args); end + def empty?(*args); end + def eql?(*args); end + def filter!(*args); end + def flatten(*args); end + def flatten!(*args); end + def flatten_merge(*args); end + def freeze(*args); end + def hash(*args); end + def include?(*args); end + def inspect(*args); end + def intersect?(*args); end + def intersection(*args); end + def keep_if(*args); end + def length(*args); end + def map!(*args); end + def member?(*args); end + def merge(*args); end + def pretty_print(*args); end + def pretty_print_cycle(*args); end + def proper_subset?(*args); end + def proper_superset?(*args); end + def reject!(*args); end + def replace(*args); end + def reset(*args); end + def select!(*args); end + def size(*args); end + def subset?(*args); end + def subtract(*args); end + def superset?(*args); end + def taint(*args); end + def to_a(*args); end + def to_s(*args); end + def to_set(*args); end + def union(*args); end + def untaint(*args); end + def |(*args); end private - def ns_initialize(opts); end + def initialize_copy(other); end end -class Concurrent::CancelledOperationError < ::Concurrent::Error -end +class Concurrent::CachedThreadPool < ::Concurrent::ThreadPoolExecutor + def initialize(opts = T.unsafe(nil)); end + + private -module Concurrent::Collection + def ns_initialize(opts); end end +class Concurrent::CancelledOperationError < ::Concurrent::Error; end +module Concurrent::Collection; end + class Concurrent::Collection::CopyOnNotifyObserverSet < ::Concurrent::Synchronization::LockableObject def initialize; end @@ -373,6 +498,8 @@ class Concurrent::Collection::NonConcurrentPriorityQueue < ::Concurrent::Collect def size; end end +Concurrent::Collection::NonConcurrentPriorityQueueImplementation = Concurrent::Collection::RubyNonConcurrentPriorityQueue + class Concurrent::Collection::RubyNonConcurrentPriorityQueue def initialize(opts = T.unsafe(nil)); end @@ -403,15 +530,14 @@ class Concurrent::Collection::RubyNonConcurrentPriorityQueue end end -module Concurrent::Concern -end +module Concurrent::Concern; end module Concurrent::Concern::Deprecation - include(::Logger::Severity) - include(::Concurrent::Concern::Logging) - extend(::Logger::Severity) - extend(::Concurrent::Concern::Logging) - extend(::Concurrent::Concern::Deprecation) + include ::Logger::Severity + include ::Concurrent::Concern::Logging + extend ::Logger::Severity + extend ::Concurrent::Concern::Logging + extend ::Concurrent::Concern::Deprecation def deprecated(message, strip = T.unsafe(nil)); end def deprecated_method(old_name, new_name); end @@ -430,13 +556,13 @@ module Concurrent::Concern::Dereferenceable end module Concurrent::Concern::Logging - include(::Logger::Severity) + include ::Logger::Severity def log(level, progname, message = T.unsafe(nil), &block); end end module Concurrent::Concern::Obligation - include(::Concurrent::Concern::Dereferenceable) + include ::Concurrent::Concern::Dereferenceable def complete?; end def exception(*args); end @@ -480,16 +606,11 @@ module Concurrent::Concern::Observable def observers=(_arg0); end end -class Concurrent::ConcurrentUpdateError < ::ThreadError -end - +class Concurrent::ConcurrentUpdateError < ::ThreadError; end Concurrent::ConcurrentUpdateError::CONC_UP_ERR_BACKTRACE = T.let(T.unsafe(nil), Array) - -class Concurrent::ConfigurationError < ::Concurrent::Error -end - -class Concurrent::CountDownLatch < ::Concurrent::MutexCountDownLatch -end +class Concurrent::ConfigurationError < ::Concurrent::Error; end +class Concurrent::CountDownLatch < ::Concurrent::MutexCountDownLatch; end +Concurrent::CountDownLatchImplementation = Concurrent::MutexCountDownLatch class Concurrent::CyclicBarrier < ::Concurrent::Synchronization::LockableObject def initialize(parties, &block); end @@ -507,9 +628,21 @@ class Concurrent::CyclicBarrier < ::Concurrent::Synchronization::LockableObject def ns_next_generation; end end +class Concurrent::CyclicBarrier::Generation < ::Struct + def status; end + def status=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def members; end + def new(*_arg0); end + end +end + class Concurrent::Delay < ::Concurrent::Synchronization::LockableObject - include(::Concurrent::Concern::Dereferenceable) - include(::Concurrent::Concern::Obligation) + include ::Concurrent::Concern::Dereferenceable + include ::Concurrent::Concern::Obligation def initialize(opts = T.unsafe(nil), &block); end @@ -533,8 +666,7 @@ class Concurrent::DependencyCounter def update(time, value, reason); end end -class Concurrent::Error < ::StandardError -end +class Concurrent::Error < ::StandardError; end class Concurrent::Event < ::Concurrent::Synchronization::LockableObject def initialize; end @@ -551,12 +683,12 @@ class Concurrent::Event < ::Concurrent::Synchronization::LockableObject def ns_set; end end -class Concurrent::Exchanger < ::Concurrent::RubyExchanger -end +class Concurrent::Exchanger < ::Concurrent::RubyExchanger; end +Concurrent::ExchangerImplementation = Concurrent::RubyExchanger module Concurrent::ExecutorService - include(::Logger::Severity) - include(::Concurrent::Concern::Logging) + include ::Logger::Severity + include ::Concurrent::Concern::Logging def <<(task); end def can_overflow?; end @@ -586,13 +718,19 @@ class Concurrent::Future < ::Concurrent::IVar end end -class Concurrent::Hash < ::Hash -end +Concurrent::GLOBAL_FAST_EXECUTOR = T.let(T.unsafe(nil), Concurrent::Delay) +Concurrent::GLOBAL_IMMEDIATE_EXECUTOR = T.let(T.unsafe(nil), Concurrent::ImmediateExecutor) +Concurrent::GLOBAL_IO_EXECUTOR = T.let(T.unsafe(nil), Concurrent::Delay) +Concurrent::GLOBAL_LOGGER = T.let(T.unsafe(nil), Concurrent::AtomicReference) +Concurrent::GLOBAL_MONOTONIC_CLOCK = T.let(T.unsafe(nil), T.untyped) +Concurrent::GLOBAL_TIMER_SET = T.let(T.unsafe(nil), Concurrent::Delay) +class Concurrent::Hash < ::Hash; end +Concurrent::HashImplementation = Hash class Concurrent::IVar < ::Concurrent::Synchronization::LockableObject - include(::Concurrent::Concern::Dereferenceable) - include(::Concurrent::Concern::Obligation) - include(::Concurrent::Concern::Observable) + include ::Concurrent::Concern::Dereferenceable + include ::Concurrent::Concern::Obligation + include ::Concurrent::Concern::Observable def initialize(value = T.unsafe(nil), opts = T.unsafe(nil), &block); end @@ -612,11 +750,10 @@ class Concurrent::IVar < ::Concurrent::Synchronization::LockableObject def safe_execute(task, args = T.unsafe(nil)); end end -class Concurrent::IllegalOperationError < ::Concurrent::Error -end +class Concurrent::IllegalOperationError < ::Concurrent::Error; end class Concurrent::ImmediateExecutor < ::Concurrent::AbstractExecutorService - include(::Concurrent::SerialExecutorService) + include ::Concurrent::SerialExecutorService def initialize; end @@ -630,11 +767,10 @@ class Concurrent::ImmediateExecutor < ::Concurrent::AbstractExecutorService def wait_for_termination(timeout = T.unsafe(nil)); end end -class Concurrent::ImmutabilityError < ::Concurrent::Error -end +class Concurrent::ImmutabilityError < ::Concurrent::Error; end module Concurrent::ImmutableStruct - include(::Concurrent::Synchronization::AbstractStruct) + include ::Concurrent::Synchronization::AbstractStruct def ==(other); end def [](member); end @@ -659,20 +795,19 @@ module Concurrent::ImmutableStruct end end +Concurrent::ImmutableStruct::FACTORY = T.let(T.unsafe(nil), T.untyped) + class Concurrent::IndirectImmediateExecutor < ::Concurrent::ImmediateExecutor def initialize; end def post(*args, &task); end end -class Concurrent::InitializationError < ::Concurrent::Error -end - -class Concurrent::LifecycleError < ::Concurrent::Error -end +class Concurrent::InitializationError < ::Concurrent::Error; end +class Concurrent::LifecycleError < ::Concurrent::Error; end class Concurrent::LockFreeStack < ::Concurrent::Synchronization::Object - include(::Enumerable) + include ::Enumerable def initialize(head = T.unsafe(nil)); end @@ -722,7 +857,7 @@ class Concurrent::LockFreeStack::Node end class Concurrent::MVar < ::Concurrent::Synchronization::Object - include(::Concurrent::Concern::Dereferenceable) + include ::Concurrent::Concern::Dereferenceable def initialize(value = T.unsafe(nil), opts = T.unsafe(nil)); end @@ -755,13 +890,13 @@ class Concurrent::MVar < ::Concurrent::Synchronization::Object end Concurrent::MVar::EMPTY = T.let(T.unsafe(nil), Object) - Concurrent::MVar::TIMEOUT = T.let(T.unsafe(nil), Object) class Concurrent::Map < ::Concurrent::Collection::MriMapBackend def initialize(options = T.unsafe(nil), &block); end def [](key); end + def []=(key, value); end def each; end def each_key; end def each_pair; end @@ -788,11 +923,10 @@ class Concurrent::Map < ::Concurrent::Collection::MriMapBackend def validate_options_hash!(options); end end -class Concurrent::MaxRestartFrequencyError < ::Concurrent::Error -end +class Concurrent::MaxRestartFrequencyError < ::Concurrent::Error; end class Concurrent::Maybe < ::Concurrent::Synchronization::Object - include(::Comparable) + include ::Comparable def initialize(just, nothing); end @@ -834,7 +968,7 @@ class Concurrent::MultipleErrors < ::Concurrent::Error end module Concurrent::MutableStruct - include(::Concurrent::Synchronization::AbstractStruct) + include ::Concurrent::Synchronization::AbstractStruct def ==(other); end def [](member); end @@ -859,6 +993,8 @@ module Concurrent::MutableStruct end end +Concurrent::MutableStruct::FACTORY = T.let(T.unsafe(nil), T.untyped) + class Concurrent::MutexAtomicBoolean < ::Concurrent::Synchronization::LockableObject def initialize(initial = T.unsafe(nil)); end @@ -900,8 +1036,8 @@ class Concurrent::MutexAtomicFixnum < ::Concurrent::Synchronization::LockableObj end class Concurrent::MutexAtomicReference < ::Concurrent::Synchronization::LockableObject - include(::Concurrent::AtomicDirectUpdate) - include(::Concurrent::AtomicNumericCompareAndSetWrapper) + include ::Concurrent::AtomicDirectUpdate + include ::Concurrent::AtomicNumericCompareAndSetWrapper def initialize(value = T.unsafe(nil)); end @@ -952,7 +1088,6 @@ class Concurrent::MutexSemaphore < ::Concurrent::Synchronization::LockableObject end Concurrent::NULL = T.let(T.unsafe(nil), Object) - Concurrent::NULL_LOGGER = T.let(T.unsafe(nil), Proc) module Concurrent::Options @@ -1000,15 +1135,18 @@ class Concurrent::Promise < ::Concurrent::IVar end end -class Concurrent::PromiseExecutionError < ::StandardError -end +class Concurrent::PromiseExecutionError < ::StandardError; end module Concurrent::Promises - extend(::Concurrent::Promises::FactoryMethods::Configuration) - extend(::Concurrent::Promises::FactoryMethods) + extend ::Concurrent::Promises::FactoryMethods::Configuration + extend ::Concurrent::Promises::FactoryMethods end +class Concurrent::Promises::AbstractAnyPromise < ::Concurrent::Promises::BlockedPromise; end + class Concurrent::Promises::AbstractEventFuture < ::Concurrent::Synchronization::Object + include ::Concurrent::Promises::InternalStates + def initialize(promise, default_executor); end def __initialize_atomic_fields__; end @@ -1059,6 +1197,109 @@ class Concurrent::Promises::AbstractEventFuture < ::Concurrent::Synchronization: end end +class Concurrent::Promises::AbstractFlatPromise < ::Concurrent::Promises::BlockedPromise + def initialize(delayed_because, blockers_count, event_or_future); end + + def touch; end + + private + + def add_delayed_of(future); end + def on_resolvable(resolved_future, index); end + def resolvable?(countdown, future, index); end + def touched?; end +end + +class Concurrent::Promises::AbstractPromise < ::Concurrent::Synchronization::Object + include ::Concurrent::Promises::InternalStates + + def initialize(future); end + + def default_executor; end + def delayed_because; end + def event; end + def future; end + def inspect; end + def state; end + def to_s; end + def touch; end + + private + + def evaluate_to(*args, block); end + def resolve_with(new_state, raise_on_reassign = T.unsafe(nil)); end + + class << self + def new(*args, &block); end + end +end + +class Concurrent::Promises::AnyFulfilledFuturePromise < ::Concurrent::Promises::AnyResolvedFuturePromise + private + + def resolvable?(countdown, future, index); end +end + +class Concurrent::Promises::AnyResolvedEventPromise < ::Concurrent::Promises::AbstractAnyPromise + def initialize(delayed, blockers_count, default_executor); end + + private + + def on_resolvable(resolved_future, index); end + def resolvable?(countdown, future, index); end +end + +class Concurrent::Promises::AnyResolvedFuturePromise < ::Concurrent::Promises::AbstractAnyPromise + def initialize(delayed, blockers_count, default_executor); end + + private + + def on_resolvable(resolved_future, index); end + def resolvable?(countdown, future, index); end +end + +class Concurrent::Promises::BlockedPromise < ::Concurrent::Promises::InnerPromise + def initialize(delayed, blockers_count, future); end + + def blocked_by; end + def delayed_because; end + def on_blocker_resolution(future, index); end + def touch; end + + private + + def clear_and_propagate_touch(stack_or_element = T.unsafe(nil)); end + def on_resolvable(resolved_future, index); end + def process_on_blocker_resolution(future, index); end + def resolvable?(countdown, future, index); end + + class << self + def add_delayed(delayed1, delayed2); end + def new_blocked_by(blockers, *args, &block); end + def new_blocked_by1(blocker, *args, &block); end + def new_blocked_by2(blocker1, blocker2, *args, &block); end + end +end + +class Concurrent::Promises::BlockedTaskPromise < ::Concurrent::Promises::BlockedPromise + def initialize(delayed, blockers_count, default_executor, executor, args, &task); end + + def executor; end +end + +class Concurrent::Promises::ChainPromise < ::Concurrent::Promises::BlockedTaskPromise + private + + def on_resolvable(resolved_future, index); end +end + +class Concurrent::Promises::DelayPromise < ::Concurrent::Promises::InnerPromise + def initialize(default_executor); end + + def delayed_because; end + def touch; end +end + class Concurrent::Promises::Event < ::Concurrent::Promises::AbstractEventFuture def &(other); end def any(event_or_future); end @@ -1077,11 +1318,19 @@ class Concurrent::Promises::Event < ::Concurrent::Promises::AbstractEventFuture def rejected_resolution(raise_on_reassign, state); end end +class Concurrent::Promises::EventWrapperPromise < ::Concurrent::Promises::BlockedPromise + def initialize(delayed, blockers_count, default_executor); end + + private + + def on_resolvable(resolved_future, index); end +end + module Concurrent::Promises::FactoryMethods - include(::Concurrent::Promises::FactoryMethods::Configuration) - extend(::Concurrent::ReInclude) - extend(::Concurrent::Promises::FactoryMethods) - extend(::Concurrent::Promises::FactoryMethods::Configuration) + include ::Concurrent::Promises::FactoryMethods::Configuration + extend ::Concurrent::ReInclude + extend ::Concurrent::Promises::FactoryMethods + extend ::Concurrent::Promises::FactoryMethods::Configuration def any(*futures_and_or_events); end def any_event(*futures_and_or_events); end @@ -1116,6 +1365,22 @@ module Concurrent::Promises::FactoryMethods::Configuration def default_executor; end end +class Concurrent::Promises::FlatEventPromise < ::Concurrent::Promises::AbstractFlatPromise + def initialize(delayed, blockers_count, default_executor); end + + private + + def process_on_blocker_resolution(future, index); end +end + +class Concurrent::Promises::FlatFuturePromise < ::Concurrent::Promises::AbstractFlatPromise + def initialize(delayed, blockers_count, levels, default_executor); end + + private + + def process_on_blocker_resolution(future, index); end +end + class Concurrent::Promises::Future < ::Concurrent::Promises::AbstractEventFuture def &(other); end def any(event_or_future); end @@ -1164,19 +1429,112 @@ class Concurrent::Promises::Future < ::Concurrent::Promises::AbstractEventFuture def wait_until_resolved!(timeout = T.unsafe(nil)); end end +class Concurrent::Promises::FutureWrapperPromise < ::Concurrent::Promises::BlockedPromise + def initialize(delayed, blockers_count, default_executor); end + + private + + def on_resolvable(resolved_future, index); end +end + +class Concurrent::Promises::ImmediateEventPromise < ::Concurrent::Promises::InnerPromise + def initialize(default_executor); end +end + +class Concurrent::Promises::ImmediateFuturePromise < ::Concurrent::Promises::InnerPromise + def initialize(default_executor, fulfilled, value, reason); end +end + +class Concurrent::Promises::InnerPromise < ::Concurrent::Promises::AbstractPromise; end +module Concurrent::Promises::InternalStates; end + +class Concurrent::Promises::InternalStates::Fulfilled < ::Concurrent::Promises::InternalStates::ResolvedWithResult + def initialize(value); end + + def apply(args, block); end + def fulfilled?; end + def reason; end + def to_sym; end + def value; end +end + +class Concurrent::Promises::InternalStates::FulfilledArray < ::Concurrent::Promises::InternalStates::Fulfilled + def apply(args, block); end +end + +Concurrent::Promises::InternalStates::PENDING = T.let(T.unsafe(nil), Concurrent::Promises::InternalStates::Pending) + +class Concurrent::Promises::InternalStates::PartiallyRejected < ::Concurrent::Promises::InternalStates::ResolvedWithResult + def initialize(value, reason); end + + def apply(args, block); end + def fulfilled?; end + def reason; end + def to_sym; end + def value; end +end + +class Concurrent::Promises::InternalStates::Pending < ::Concurrent::Promises::InternalStates::State + def resolved?; end + def to_sym; end +end + +Concurrent::Promises::InternalStates::RESERVED = T.let(T.unsafe(nil), Concurrent::Promises::InternalStates::Reserved) +Concurrent::Promises::InternalStates::RESOLVED = T.let(T.unsafe(nil), Concurrent::Promises::InternalStates::Fulfilled) + +class Concurrent::Promises::InternalStates::Rejected < ::Concurrent::Promises::InternalStates::ResolvedWithResult + def initialize(reason); end + + def apply(args, block); end + def fulfilled?; end + def reason; end + def to_sym; end + def value; end +end + +class Concurrent::Promises::InternalStates::Reserved < ::Concurrent::Promises::InternalStates::Pending; end + +class Concurrent::Promises::InternalStates::ResolvedWithResult < ::Concurrent::Promises::InternalStates::State + def apply; end + def fulfilled?; end + def reason; end + def resolved?; end + def result; end + def to_sym; end + def value; end +end + +class Concurrent::Promises::InternalStates::State + def resolved?; end + def to_sym; end +end + +class Concurrent::Promises::RescuePromise < ::Concurrent::Promises::BlockedTaskPromise + def initialize(delayed, blockers_count, default_executor, executor, args, &task); end + + private + + def on_resolvable(resolved_future, index); end +end + module Concurrent::Promises::Resolvable + include ::Concurrent::Promises::InternalStates end class Concurrent::Promises::ResolvableEvent < ::Concurrent::Promises::Event - include(::Concurrent::Promises::Resolvable) + include ::Concurrent::Promises::Resolvable def resolve(raise_on_reassign = T.unsafe(nil), reserved = T.unsafe(nil)); end def wait(timeout = T.unsafe(nil), resolve_on_timeout = T.unsafe(nil)); end def with_hidden_resolvable; end end +class Concurrent::Promises::ResolvableEventPromise < ::Concurrent::Promises::AbstractPromise + def initialize(default_executor); end +end + class Concurrent::Promises::ResolvableFuture < ::Concurrent::Promises::Future - include(::Concurrent::Promises::Resolvable) + include ::Concurrent::Promises::Resolvable def evaluate_to(*args, &block); end def evaluate_to!(*args, &block); end @@ -1192,6 +1550,67 @@ class Concurrent::Promises::ResolvableFuture < ::Concurrent::Promises::Future def with_hidden_resolvable; end end +class Concurrent::Promises::ResolvableFuturePromise < ::Concurrent::Promises::AbstractPromise + def initialize(default_executor); end +end + +class Concurrent::Promises::RunFuturePromise < ::Concurrent::Promises::AbstractFlatPromise + def initialize(delayed, blockers_count, default_executor, run_test); end + + private + + def process_on_blocker_resolution(future, index); end +end + +class Concurrent::Promises::ScheduledPromise < ::Concurrent::Promises::InnerPromise + def initialize(default_executor, intended_time); end + + def inspect; end + def intended_time; end +end + +class Concurrent::Promises::ThenPromise < ::Concurrent::Promises::BlockedTaskPromise + def initialize(delayed, blockers_count, default_executor, executor, args, &task); end + + private + + def on_resolvable(resolved_future, index); end +end + +class Concurrent::Promises::ZipEventEventPromise < ::Concurrent::Promises::BlockedPromise + def initialize(delayed, blockers_count, default_executor); end + + private + + def on_resolvable(resolved_future, index); end +end + +class Concurrent::Promises::ZipEventsPromise < ::Concurrent::Promises::BlockedPromise + def initialize(delayed, blockers_count, default_executor); end + + private + + def on_resolvable(resolved_future, index); end +end + +class Concurrent::Promises::ZipFutureEventPromise < ::Concurrent::Promises::BlockedPromise + def initialize(delayed, blockers_count, default_executor); end + + private + + def on_resolvable(resolved_future, index); end + def process_on_blocker_resolution(future, index); end +end + +class Concurrent::Promises::ZipFuturesPromise < ::Concurrent::Promises::BlockedPromise + def initialize(delayed, blockers_count, default_executor); end + + private + + def on_resolvable(resolved_future, index); end + def process_on_blocker_resolution(future, index); end +end + module Concurrent::ReInclude def extended(base); end def include(*modules); end @@ -1226,11 +1645,8 @@ class Concurrent::ReadWriteLock < ::Concurrent::Synchronization::Object end Concurrent::ReadWriteLock::MAX_READERS = T.let(T.unsafe(nil), Integer) - Concurrent::ReadWriteLock::MAX_WRITERS = T.let(T.unsafe(nil), Integer) - Concurrent::ReadWriteLock::RUNNING_WRITER = T.let(T.unsafe(nil), Integer) - Concurrent::ReadWriteLock::WAITING_WRITER = T.let(T.unsafe(nil), Integer) class Concurrent::ReentrantReadWriteLock < ::Concurrent::Synchronization::Object @@ -1261,28 +1677,16 @@ class Concurrent::ReentrantReadWriteLock < ::Concurrent::Synchronization::Object end Concurrent::ReentrantReadWriteLock::MAX_READERS = T.let(T.unsafe(nil), Integer) - Concurrent::ReentrantReadWriteLock::MAX_WRITERS = T.let(T.unsafe(nil), Integer) - Concurrent::ReentrantReadWriteLock::READER_BITS = T.let(T.unsafe(nil), Integer) - Concurrent::ReentrantReadWriteLock::READ_LOCK_MASK = T.let(T.unsafe(nil), Integer) - Concurrent::ReentrantReadWriteLock::RUNNING_WRITER = T.let(T.unsafe(nil), Integer) - Concurrent::ReentrantReadWriteLock::WAITING_WRITER = T.let(T.unsafe(nil), Integer) - Concurrent::ReentrantReadWriteLock::WRITER_BITS = T.let(T.unsafe(nil), Integer) - Concurrent::ReentrantReadWriteLock::WRITE_LOCK_HELD = T.let(T.unsafe(nil), Integer) - Concurrent::ReentrantReadWriteLock::WRITE_LOCK_MASK = T.let(T.unsafe(nil), Integer) - -class Concurrent::RejectedExecutionError < ::Concurrent::Error -end - -class Concurrent::ResourceLimitError < ::Concurrent::Error -end +class Concurrent::RejectedExecutionError < ::Concurrent::Error; end +class Concurrent::ResourceLimitError < ::Concurrent::Error; end class Concurrent::RubyExchanger < ::Concurrent::AbstractExchanger def initialize; end @@ -1303,6 +1707,23 @@ class Concurrent::RubyExchanger < ::Concurrent::AbstractExchanger end end +class Concurrent::RubyExchanger::Node < ::Concurrent::Synchronization::Object + def initialize(item); end + + def __initialize_atomic_fields__; end + def compare_and_set_value(expected, value); end + def item; end + def latch; end + def swap_value(value); end + def update_value(&block); end + def value; end + def value=(value); end + + class << self + def new(*args, &block); end + end +end + class Concurrent::RubyExecutorService < ::Concurrent::AbstractExecutorService def initialize(*args, &block); end @@ -1348,6 +1769,10 @@ class Concurrent::RubyThreadLocalVar < ::Concurrent::AbstractThreadLocalVar end end +Concurrent::RubyThreadLocalVar::FREE = T.let(T.unsafe(nil), Array) +Concurrent::RubyThreadLocalVar::LOCK = T.let(T.unsafe(nil), Thread::Mutex) +Concurrent::RubyThreadLocalVar::THREAD_LOCAL_ARRAYS = T.let(T.unsafe(nil), Hash) + class Concurrent::RubyThreadPoolExecutor < ::Concurrent::RubyExecutorService def initialize(opts = T.unsafe(nil)); end @@ -1388,21 +1813,34 @@ class Concurrent::RubyThreadPoolExecutor < ::Concurrent::RubyExecutorService end Concurrent::RubyThreadPoolExecutor::DEFAULT_MAX_POOL_SIZE = T.let(T.unsafe(nil), Integer) - Concurrent::RubyThreadPoolExecutor::DEFAULT_MAX_QUEUE_SIZE = T.let(T.unsafe(nil), Integer) - Concurrent::RubyThreadPoolExecutor::DEFAULT_MIN_POOL_SIZE = T.let(T.unsafe(nil), Integer) - Concurrent::RubyThreadPoolExecutor::DEFAULT_THREAD_IDLETIMEOUT = T.let(T.unsafe(nil), Integer) +class Concurrent::RubyThreadPoolExecutor::Worker + include ::Logger::Severity + include ::Concurrent::Concern::Logging + + def initialize(pool, id); end + + def <<(message); end + def kill; end + def stop; end + + private + + def create_worker(queue, pool, idletime); end + def run_task(pool, task, args); end +end + class Concurrent::SafeTaskExecutor < ::Concurrent::Synchronization::LockableObject def initialize(task, opts = T.unsafe(nil)); end def execute(*args); end end class Concurrent::ScheduledTask < ::Concurrent::IVar - include(::Comparable) + include ::Comparable def initialize(delay, opts = T.unsafe(nil), &task); end @@ -1428,20 +1866,20 @@ class Concurrent::ScheduledTask < ::Concurrent::IVar end end -class Concurrent::Semaphore < ::Concurrent::MutexSemaphore -end +class Concurrent::Semaphore < ::Concurrent::MutexSemaphore; end +Concurrent::SemaphoreImplementation = Concurrent::MutexSemaphore module Concurrent::SerialExecutorService - include(::Logger::Severity) - include(::Concurrent::Concern::Logging) - include(::Concurrent::ExecutorService) + include ::Logger::Severity + include ::Concurrent::Concern::Logging + include ::Concurrent::ExecutorService def serialized?; end end class Concurrent::SerializedExecution < ::Concurrent::Synchronization::LockableObject - include(::Logger::Severity) - include(::Concurrent::Concern::Logging) + include ::Logger::Severity + include ::Concurrent::Concern::Logging def initialize; end @@ -1473,21 +1911,21 @@ class Concurrent::SerializedExecution::Job < ::Struct end class Concurrent::SerializedExecutionDelegator < ::SimpleDelegator - include(::Logger::Severity) - include(::Concurrent::Concern::Logging) - include(::Concurrent::ExecutorService) - include(::Concurrent::SerialExecutorService) + include ::Logger::Severity + include ::Concurrent::Concern::Logging + include ::Concurrent::ExecutorService + include ::Concurrent::SerialExecutorService def initialize(executor); end def post(*args, &task); end end -class Concurrent::Set < ::Set -end +class Concurrent::Set < ::Concurrent::CRubySet; end +Concurrent::SetImplementation = Concurrent::CRubySet module Concurrent::SettableStruct - include(::Concurrent::Synchronization::AbstractStruct) + include ::Concurrent::Synchronization::AbstractStruct def ==(other); end def [](member); end @@ -1512,6 +1950,8 @@ module Concurrent::SettableStruct end end +Concurrent::SettableStruct::FACTORY = T.let(T.unsafe(nil), T.untyped) + class Concurrent::SimpleExecutorService < ::Concurrent::RubyExecutorService def <<(task); end def kill; end @@ -1532,14 +1972,11 @@ class Concurrent::SimpleExecutorService < ::Concurrent::RubyExecutorService end end -class Concurrent::SingleThreadExecutor < ::Concurrent::RubySingleThreadExecutor -end - -module Concurrent::Synchronization -end +class Concurrent::SingleThreadExecutor < ::Concurrent::RubySingleThreadExecutor; end +Concurrent::SingleThreadExecutorImplementation = Concurrent::RubySingleThreadExecutor +module Concurrent::Synchronization; end class Concurrent::Synchronization::AbstractLockableObject < ::Concurrent::Synchronization::Object - protected def ns_broadcast; end @@ -1604,7 +2041,6 @@ class Concurrent::Synchronization::Condition < ::Concurrent::Synchronization::Lo end module Concurrent::Synchronization::ConditionSignalling - protected def ns_broadcast; end @@ -1622,24 +2058,29 @@ class Concurrent::Synchronization::LockableObject < ::Concurrent::Synchronizatio def new_condition; end end +Concurrent::Synchronization::LockableObjectImplementation = Concurrent::Synchronization::MutexLockableObject + class Concurrent::Synchronization::MonitorLockableObject < ::Concurrent::Synchronization::AbstractLockableObject - include(::Concurrent::Synchronization::ConditionSignalling) + include ::Concurrent::Synchronization::ConditionSignalling def initialize(*defaults); end - protected def ns_wait(timeout = T.unsafe(nil)); end def synchronize; end + private + + def initialize_copy(other); end + class << self def new(*args, &block); end end end module Concurrent::Synchronization::MriAttrVolatile - mixes_in_class_methods(::Concurrent::Synchronization::MriAttrVolatile::ClassMethods) + mixes_in_class_methods ::Concurrent::Synchronization::MriAttrVolatile::ClassMethods def full_memory_barrier; end @@ -1653,23 +2094,26 @@ module Concurrent::Synchronization::MriAttrVolatile::ClassMethods end class Concurrent::Synchronization::MriObject < ::Concurrent::Synchronization::AbstractObject - include(::Concurrent::Synchronization::MriAttrVolatile) - extend(::Concurrent::Synchronization::MriAttrVolatile::ClassMethods) + include ::Concurrent::Synchronization::MriAttrVolatile + extend ::Concurrent::Synchronization::MriAttrVolatile::ClassMethods def initialize; end end class Concurrent::Synchronization::MutexLockableObject < ::Concurrent::Synchronization::AbstractLockableObject - include(::Concurrent::Synchronization::ConditionSignalling) + include ::Concurrent::Synchronization::ConditionSignalling def initialize(*defaults); end - protected def ns_wait(timeout = T.unsafe(nil)); end def synchronize; end + private + + def initialize_copy(other); end + class << self def new(*args, &block); end end @@ -1678,7 +2122,6 @@ end class Concurrent::Synchronization::Object < ::Concurrent::Synchronization::MriObject def initialize; end - private def __initialize_atomic_fields__; end @@ -1697,8 +2140,10 @@ class Concurrent::Synchronization::Object < ::Concurrent::Synchronization::MriOb end end +Concurrent::Synchronization::ObjectImplementation = Concurrent::Synchronization::MriObject + module Concurrent::Synchronization::RbxAttrVolatile - mixes_in_class_methods(::Concurrent::Synchronization::RbxAttrVolatile::ClassMethods) + mixes_in_class_methods ::Concurrent::Synchronization::RbxAttrVolatile::ClassMethods def full_memory_barrier; end @@ -1714,28 +2159,31 @@ end class Concurrent::Synchronization::RbxLockableObject < ::Concurrent::Synchronization::AbstractLockableObject def initialize(*defaults); end - protected def ns_broadcast; end def ns_signal; end def ns_wait(timeout = T.unsafe(nil)); end def synchronize(&block); end + private + + def initialize_copy(other); end + class << self def new(*args, &block); end end end class Concurrent::Synchronization::RbxObject < ::Concurrent::Synchronization::AbstractObject - include(::Concurrent::Synchronization::RbxAttrVolatile) - extend(::Concurrent::Synchronization::RbxAttrVolatile::ClassMethods) + include ::Concurrent::Synchronization::RbxAttrVolatile + extend ::Concurrent::Synchronization::RbxAttrVolatile::ClassMethods def initialize; end end module Concurrent::Synchronization::TruffleRubyAttrVolatile - mixes_in_class_methods(::Concurrent::Synchronization::TruffleRubyAttrVolatile::ClassMethods) + mixes_in_class_methods ::Concurrent::Synchronization::TruffleRubyAttrVolatile::ClassMethods def full_memory_barrier; end @@ -1749,8 +2197,8 @@ module Concurrent::Synchronization::TruffleRubyAttrVolatile::ClassMethods end class Concurrent::Synchronization::TruffleRubyObject < ::Concurrent::Synchronization::AbstractObject - include(::Concurrent::Synchronization::TruffleRubyAttrVolatile) - extend(::Concurrent::Synchronization::TruffleRubyAttrVolatile::ClassMethods) + include ::Concurrent::Synchronization::TruffleRubyAttrVolatile + extend ::Concurrent::Synchronization::TruffleRubyAttrVolatile::ClassMethods def initialize; end end @@ -1781,26 +2229,24 @@ class Concurrent::TVar < ::Concurrent::Synchronization::Object end end -class Concurrent::ThreadLocalVar < ::Concurrent::RubyThreadLocalVar -end - -class Concurrent::ThreadPoolExecutor < ::Concurrent::RubyThreadPoolExecutor -end - -module Concurrent::ThreadSafe -end +class Concurrent::ThreadLocalVar < ::Concurrent::RubyThreadLocalVar; end +Concurrent::ThreadLocalVarImplementation = Concurrent::RubyThreadLocalVar +class Concurrent::ThreadPoolExecutor < ::Concurrent::RubyThreadPoolExecutor; end +Concurrent::ThreadPoolExecutorImplementation = Concurrent::RubyThreadPoolExecutor +module Concurrent::ThreadSafe; end module Concurrent::ThreadSafe::Util + class << self + def make_synchronized_on_cruby(klass); end + def make_synchronized_on_rbx(klass); end + def make_synchronized_on_truffleruby(klass); end + end end Concurrent::ThreadSafe::Util::CPU_COUNT = T.let(T.unsafe(nil), Integer) - Concurrent::ThreadSafe::Util::FIXNUM_BIT_SIZE = T.let(T.unsafe(nil), Integer) - Concurrent::ThreadSafe::Util::MAX_INT = T.let(T.unsafe(nil), Integer) - -class Concurrent::TimeoutError < ::Concurrent::Error -end +class Concurrent::TimeoutError < ::Concurrent::Error; end class Concurrent::TimerSet < ::Concurrent::RubyExecutorService def initialize(opts = T.unsafe(nil)); end @@ -1820,8 +2266,8 @@ class Concurrent::TimerSet < ::Concurrent::RubyExecutorService end class Concurrent::TimerTask < ::Concurrent::RubyExecutorService - include(::Concurrent::Concern::Dereferenceable) - include(::Concurrent::Concern::Observable) + include ::Concurrent::Concern::Dereferenceable + include ::Concurrent::Concern::Observable def initialize(opts = T.unsafe(nil), &task); end @@ -1847,7 +2293,6 @@ class Concurrent::TimerTask < ::Concurrent::RubyExecutorService end Concurrent::TimerTask::EXECUTION_INTERVAL = T.let(T.unsafe(nil), Integer) - Concurrent::TimerTask::TIMEOUT_INTERVAL = T.let(T.unsafe(nil), Integer) class Concurrent::Transaction @@ -1867,12 +2312,8 @@ class Concurrent::Transaction end Concurrent::Transaction::ABORTED = T.let(T.unsafe(nil), Object) - -class Concurrent::Transaction::AbortError < ::StandardError -end - -class Concurrent::Transaction::LeaveError < ::StandardError -end +class Concurrent::Transaction::AbortError < ::StandardError; end +class Concurrent::Transaction::LeaveError < ::StandardError; end class Concurrent::Transaction::ReadLogEntry < ::Struct def tvar; end @@ -1889,7 +2330,7 @@ class Concurrent::Transaction::ReadLogEntry < ::Struct end class Concurrent::Tuple - include(::Enumerable) + include ::Enumerable def initialize(size); end @@ -1903,8 +2344,8 @@ class Concurrent::Tuple def volatile_set(i, value); end end -module Concurrent::Utility -end +Concurrent::Tuple::Tuple = Array +module Concurrent::Utility; end module Concurrent::Utility::EngineDetector def on_cruby?; end @@ -1934,7 +2375,7 @@ module Concurrent::Utility::NativeExtensionLoader end module Concurrent::Utility::NativeInteger - extend(::Concurrent::Utility::NativeInteger) + extend ::Concurrent::Utility::NativeInteger def ensure_integer(value); end def ensure_integer_and_bounds(value); end @@ -1945,7 +2386,6 @@ module Concurrent::Utility::NativeInteger end Concurrent::Utility::NativeInteger::MAX_VALUE = T.let(T.unsafe(nil), Integer) - Concurrent::Utility::NativeInteger::MIN_VALUE = T.let(T.unsafe(nil), Integer) class Concurrent::Utility::ProcessorCounter @@ -1961,9 +2401,3 @@ class Concurrent::Utility::ProcessorCounter end Concurrent::VERSION = T.let(T.unsafe(nil), String) - -Concurrent::Promises::InternalStates::PENDING = T.let(T.unsafe(nil), T.untyped) - -Concurrent::Promises::InternalStates::RESERVED = T.let(T.unsafe(nil), T.untyped) - -Concurrent::Promises::InternalStates::RESOLVED = T.let(T.unsafe(nil), T.untyped)
true
Other
Homebrew
brew
e7ef5f949daf3a9f1d1ead0e70baa8062a637400.json
Update RBI files for concurrent-ruby.
Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi
@@ -6213,14 +6213,6 @@ class CompilerSelector extend ::T::Private::Methods::SingletonMethodHooks end -class Concurrent::Promises::AbstractEventFuture - include ::Concurrent::Promises::InternalStates -end - -module Concurrent::Promises::Resolvable - include ::Concurrent::Promises::InternalStates -end - class Concurrent::RubyThreadPoolExecutor DEFAULT_SYNCHRONOUS = ::T.let(nil, ::T.untyped) end
true
Other
Homebrew
brew
34a3cd00cdee6b6f7ee25aa6a9fa5084eafb1337.json
Update RBI files for rubocop-sorbet.
Library/Homebrew/sorbet/rbi/gems/rubocop-sorbet@0.6.2.rbi
@@ -1,17 +1,12 @@ # DO NOT EDIT MANUALLY # This is an autogenerated file for types exported from the `rubocop-sorbet` gem. -# Please instead update this file by running `tapioca sync`. +# Please instead update this file by running `bin/tapioca sync`. # typed: true -module RuboCop -end - -module RuboCop::Cop -end - -module RuboCop::Cop::Sorbet -end +module RuboCop; end +module RuboCop::Cop; end +module RuboCop::Cop::Sorbet; end class RuboCop::Cop::Sorbet::AllowIncompatibleOverride < ::RuboCop::Cop::Cop def allow_incompatible?(param0); end @@ -37,20 +32,29 @@ class RuboCop::Cop::Sorbet::BindingConstantWithoutTypeAlias < ::RuboCop::Cop::Co def using_type_alias?(param0 = T.unsafe(nil)); end end +class RuboCop::Cop::Sorbet::CallbackConditionalsBinding < ::RuboCop::Cop::Cop + def autocorrect(node); end + def on_send(node); end +end + +RuboCop::Cop::Sorbet::CallbackConditionalsBinding::CALLBACKS = T.let(T.unsafe(nil), Array) + class RuboCop::Cop::Sorbet::CheckedTrueInSignature < ::RuboCop::Cop::Sorbet::SignatureCop - include(::RuboCop::Cop::RangeHelp) + include ::RuboCop::Cop::RangeHelp def offending_node(param0); end def on_signature(node); end end +RuboCop::Cop::Sorbet::CheckedTrueInSignature::MESSAGE = T.let(T.unsafe(nil), String) + class RuboCop::Cop::Sorbet::ConstantsFromStrings < ::RuboCop::Cop::Cop def constant_from_string?(param0 = T.unsafe(nil)); end def on_send(node); end end class RuboCop::Cop::Sorbet::EnforceSigilOrder < ::RuboCop::Cop::Sorbet::ValidSigil - include(::RuboCop::Cop::RangeHelp) + include ::RuboCop::Cop::RangeHelp def autocorrect(_node); end def investigate(processed_source); end @@ -62,13 +66,9 @@ class RuboCop::Cop::Sorbet::EnforceSigilOrder < ::RuboCop::Cop::Sorbet::ValidSig end RuboCop::Cop::Sorbet::EnforceSigilOrder::CODING_REGEX = T.let(T.unsafe(nil), Regexp) - RuboCop::Cop::Sorbet::EnforceSigilOrder::FROZEN_REGEX = T.let(T.unsafe(nil), Regexp) - RuboCop::Cop::Sorbet::EnforceSigilOrder::INDENT_REGEX = T.let(T.unsafe(nil), Regexp) - RuboCop::Cop::Sorbet::EnforceSigilOrder::MAGIC_REGEX = T.let(T.unsafe(nil), Regexp) - RuboCop::Cop::Sorbet::EnforceSigilOrder::PREFERRED_ORDER = T.let(T.unsafe(nil), Hash) class RuboCop::Cop::Sorbet::EnforceSignatures < ::RuboCop::Cop::Sorbet::SignatureCop @@ -109,7 +109,7 @@ class RuboCop::Cop::Sorbet::FalseSigil < ::RuboCop::Cop::Sorbet::HasSigil end class RuboCop::Cop::Sorbet::ForbidExtendTSigHelpersInShims < ::RuboCop::Cop::Cop - include(::RuboCop::Cop::RangeHelp) + include ::RuboCop::Cop::RangeHelp def autocorrect(node); end def extend_t_helpers?(param0 = T.unsafe(nil)); end @@ -118,7 +118,6 @@ class RuboCop::Cop::Sorbet::ForbidExtendTSigHelpersInShims < ::RuboCop::Cop::Cop end RuboCop::Cop::Sorbet::ForbidExtendTSigHelpersInShims::MSG = T.let(T.unsafe(nil), String) - RuboCop::Cop::Sorbet::ForbidExtendTSigHelpersInShims::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Sorbet::ForbidIncludeConstLiteral < ::RuboCop::Cop::Cop @@ -132,13 +131,26 @@ end RuboCop::Cop::Sorbet::ForbidIncludeConstLiteral::MSG = T.let(T.unsafe(nil), String) +class RuboCop::Cop::Sorbet::ForbidRBIOutsideOfSorbetDir < ::RuboCop::Cop::Cop + include ::RuboCop::Cop::RangeHelp + + def investigate(processed_source); end +end + +RuboCop::Cop::Sorbet::ForbidRBIOutsideOfSorbetDir::PATH_REGEXP = T.let(T.unsafe(nil), Regexp) + class RuboCop::Cop::Sorbet::ForbidSuperclassConstLiteral < ::RuboCop::Cop::Cop def not_lit_const_superclass?(param0 = T.unsafe(nil)); end def on_class(node); end end RuboCop::Cop::Sorbet::ForbidSuperclassConstLiteral::MSG = T.let(T.unsafe(nil), String) +class RuboCop::Cop::Sorbet::ForbidTUnsafe < ::RuboCop::Cop::Cop + def on_send(node); end + def t_unsafe?(param0 = T.unsafe(nil)); end +end + class RuboCop::Cop::Sorbet::ForbidUntypedStructProps < ::RuboCop::Cop::Cop def on_class(node); end def subclass_of_t_struct?(param0 = T.unsafe(nil)); end @@ -204,6 +216,7 @@ class RuboCop::Cop::Sorbet::SignatureBuildOrder < ::RuboCop::Cop::Sorbet::Signat def node_reparsed_with_modern_features(node); end end +class RuboCop::Cop::Sorbet::SignatureBuildOrder::ModernBuilder < ::RuboCop::AST::Builder; end RuboCop::Cop::Sorbet::SignatureBuildOrder::ORDER = T.let(T.unsafe(nil), Hash) class RuboCop::Cop::Sorbet::SignatureCop < ::RuboCop::Cop::Cop @@ -256,27 +269,20 @@ class RuboCop::Cop::Sorbet::ValidSigil < ::RuboCop::Cop::Cop end RuboCop::Cop::Sorbet::ValidSigil::SIGIL_REGEX = T.let(T.unsafe(nil), Regexp) - RuboCop::Cop::Sorbet::ValidSigil::STRICTNESS_LEVELS = T.let(T.unsafe(nil), Array) - RuboCop::NodePattern = RuboCop::AST::NodePattern - RuboCop::ProcessedSource = RuboCop::AST::ProcessedSource - -module RuboCop::Sorbet -end - +module RuboCop::Sorbet; end RuboCop::Sorbet::CONFIG = T.let(T.unsafe(nil), Hash) - -class RuboCop::Sorbet::Error < ::StandardError -end +RuboCop::Sorbet::CONFIG_DEFAULT = T.let(T.unsafe(nil), Pathname) +class RuboCop::Sorbet::Error < ::StandardError; end module RuboCop::Sorbet::Inject class << self def defaults!; end end end +RuboCop::Sorbet::PROJECT_ROOT = T.let(T.unsafe(nil), Pathname) RuboCop::Sorbet::VERSION = T.let(T.unsafe(nil), String) - RuboCop::Token = RuboCop::AST::Token
false
Other
Homebrew
brew
144c1c68c343b9f7bef14ed4ee3f4698d98e6af6.json
docs: add terminology to manpage
Library/Homebrew/dev-cmd/generate-man-completions.rb
@@ -67,6 +67,7 @@ def build_man_page(quiet:) generate_cmd_manpages(Commands.official_external_commands_paths(quiet: quiet)) variables[:global_cask_options] = global_cask_options_manpage variables[:global_options] = global_options_manpage + variables[:terminology] = terminology_manpage variables[:environment_variables] = env_vars_manpage readme = HOMEBREW_REPOSITORY/"README.md" @@ -229,6 +230,22 @@ def global_options_manpage lines.join("\n") end + sig { returns(String) } + def terminology_manpage + formula_cookbook_text = (HOMEBREW_REPOSITORY/"docs/Formula-Cookbook.md").read.split("\n") + + start_term = "## Homebrew terminology" + start_index = formula_cookbook_text.index(start_term) + 4 # Skip ahead to the table contents + end_index = formula_cookbook_text.index "## An introduction" + formula_cookbook_text[start_index...end_index].map do |item| + next "" unless item.include? "|" + + term, definition, example = item.split("|").map(&:strip)[1..] + definition.gsub!(/\[(.*)\]\(.*\)/, '\1') + "#{term}: #{definition} (e.g. #{example})" + end.join("\n\n") + end + sig { returns(String) } def env_vars_manpage lines = Homebrew::EnvConfig::ENVS.flat_map do |env, hash|
true
Other
Homebrew
brew
144c1c68c343b9f7bef14ed4ee3f4698d98e6af6.json
docs: add terminology to manpage
Library/Homebrew/manpages/brew.1.md.erb
@@ -137,6 +137,10 @@ And for an authenticated HTTP proxy: export http_proxy=http://$USER:$PASSWORD@$HOST:$PORT +## TERMINOLOGY + +<%= terminology %> + ## SEE ALSO Homebrew Documentation: <https://docs.brew.sh>
true
Other
Homebrew
brew
144c1c68c343b9f7bef14ed4ee3f4698d98e6af6.json
docs: add terminology to manpage
docs/Formula-Cookbook.md
@@ -8,7 +8,7 @@ A *formula* is a package definition written in Ruby. It can be created with `bre |----------------|------------------------------------------------------------|-----------------------------------------------------------------| | **Formula** | The package definition | `/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/foo.rb` | | **Keg** | The installation prefix of a **Formula** | `/usr/local/Cellar/foo/0.1` | -| **opt prefix** | A symlink to the active version of a **Keg** | `/usr/local/opt/foo ` | +| **opt prefix** | A symlink to the active version of a **Keg** | `/usr/local/opt/foo` | | **Cellar** | All **Kegs** are installed here | `/usr/local/Cellar` | | **Tap** | A Git repository of **Formulae** and/or commands | `/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core` | | **Bottle** | Pre-built **Keg** used instead of building from source | `qt-4.8.4.catalina.bottle.tar.gz` |
true
Other
Homebrew
brew
144c1c68c343b9f7bef14ed4ee3f4698d98e6af6.json
docs: add terminology to manpage
docs/Manpage.md
@@ -2052,6 +2052,24 @@ And for an authenticated HTTP proxy: export http_proxy=http://$USER:$PASSWORD@$HOST:$PORT +## TERMINOLOGY + +**Formula**: The package definition (e.g. `/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/foo.rb`) + +**Keg**: The installation prefix of a **Formula** (e.g. `/usr/local/Cellar/foo/0.1`) + +**opt prefix**: A symlink to the active version of a **Keg** (e.g. `/usr/local/opt/foo`) + +**Cellar**: All **Kegs** are installed here (e.g. `/usr/local/Cellar`) + +**Tap**: A Git repository of **Formulae** and/or commands (e.g. `/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core`) + +**Bottle**: Pre-built **Keg** used instead of building from source (e.g. `qt-4.8.4.catalina.bottle.tar.gz`) + +**Cask**: An extension of Homebrew to install macOS native apps (e.g. `/Applications/MacDown.app/Contents/SharedSupport/bin/macdown`) + +**Brew Bundle**: An extension of Homebrew to describe dependencies (e.g. `brew 'myservice', restart_service: true`) + ## SEE ALSO Homebrew Documentation: <https://docs.brew.sh> @@ -2100,6 +2118,7 @@ See our issues on GitHub: [SPECIFYING CASKS]: #SPECIFYING-CASKS "SPECIFYING CASKS" [ENVIRONMENT]: #ENVIRONMENT "ENVIRONMENT" [USING HOMEBREW BEHIND A PROXY]: #USING-HOMEBREW-BEHIND-A-PROXY "USING HOMEBREW BEHIND A PROXY" +[TERMINOLOGY]: #TERMINOLOGY "TERMINOLOGY" [SEE ALSO]: #SEE-ALSO "SEE ALSO" [AUTHORS]: #AUTHORS "AUTHORS" [BUGS]: #BUGS "BUGS"
true
Other
Homebrew
brew
144c1c68c343b9f7bef14ed4ee3f4698d98e6af6.json
docs: add terminology to manpage
manpages/brew.1
@@ -2988,6 +2988,38 @@ export http_proxy=http://$USER:$PASSWORD@$HOST:$PORT . .IP "" 0 . +.SH "TERMINOLOGY" +\fBFormula\fR + The package definition (e\.g\. \fB/usr/local/Homebrew/Library/Taps/homebrew/homebrew\-core/Formula/foo\.rb\fR) +. +.P +\fBKeg\fR + The installation prefix of a \fBFormula\fR (e\.g\. \fB/usr/local/Cellar/foo/0\.1\fR) +. +.P +\fBopt prefix\fR + A symlink to the active version of a \fBKeg\fR (e\.g\. \fB/usr/local/opt/foo\fR) +. +.P +\fBCellar\fR + All \fBKegs\fR are installed here (e\.g\. \fB/usr/local/Cellar\fR) +. +.P +\fBTap\fR + A Git repository of \fBFormulae\fR and/or commands (e\.g\. \fB/usr/local/Homebrew/Library/Taps/homebrew/homebrew\-core\fR) +. +.P +\fBBottle\fR + Pre\-built \fBKeg\fR used instead of building from source (e\.g\. \fBqt\-4\.8\.4\.catalina\.bottle\.tar\.gz\fR) +. +.P +\fBCask\fR + An extension of Homebrew to install macOS native apps (e\.g\. \fB/Applications/MacDown\.app/Contents/SharedSupport/bin/macdown\fR) +. +.P +\fBBrew Bundle\fR: An extension of Homebrew to describe dependencies (e\.g\. \fBbrew \'myservice\', restart_service + true\fR) +. .SH "SEE ALSO" Homebrew Documentation: \fIhttps://docs\.brew\.sh\fR .
true
Other
Homebrew
brew
d60f549a483a1a0d1f7061f8b8f1a68fc39ad8c4.json
info: add `--bottle` option for JSON bottle info
Library/Homebrew/cmd/info.rb
@@ -50,6 +50,9 @@ def info_args description: "Print a JSON representation. Currently the default value for <version> is `v1` for "\ "<formula>. For <formula> and <cask> use `v2`. See the docs for examples of using the "\ "JSON output: <https://docs.brew.sh/Querying-Brew>" + switch "--bottle", + depends_on: "--json", + description: "Output information about the bottles for <formula> and its dependencies." switch "--installed", depends_on: "--json", description: "Print JSON of formulae that are currently installed." @@ -66,6 +69,10 @@ def info_args conflicts "--installed", "--all" conflicts "--formula", "--cask" + %w[--cask --analytics --github].each do |conflict| + conflicts "--bottle", conflict + end + named_args [:formula, :cask] end end @@ -184,7 +191,11 @@ def print_json(args:) args.named.to_formulae end - formulae.map(&:to_hash) + if args.bottle? + formulae.map(&:to_recursive_bottle_hash) + else + formulae.map(&:to_hash) + end when :v2 formulae, casks = if args.all? [Formula.sort, Cask::Cask.to_a.sort_by(&:full_name)] @@ -194,10 +205,14 @@ def print_json(args:) args.named.to_formulae_to_casks end - { - "formulae" => formulae.map(&:to_hash), - "casks" => casks.map(&:to_h), - } + if args.bottle? + { "formulae" => formulae.map(&:to_recursive_bottle_hash) } + else + { + "formulae" => formulae.map(&:to_hash), + "casks" => casks.map(&:to_h), + } + end else raise end
true
Other
Homebrew
brew
d60f549a483a1a0d1f7061f8b8f1a68fc39ad8c4.json
info: add `--bottle` option for JSON bottle info
Library/Homebrew/formula.rb
@@ -1910,7 +1910,7 @@ def to_hash # @api private # Generate a hash to be used to install a formula from a JSON file - def to_bottle_hash(top_level: true) + def to_recursive_bottle_hash(top_level: true) bottle = bottle_hash bottles = bottle["files"].map do |tag, file| @@ -1923,9 +1923,14 @@ def to_bottle_hash(top_level: true) return bottles unless top_level + dependencies = declared_runtime_dependencies.map do |dep| + dep.to_formula.to_recursive_bottle_hash(top_level: false) + end + { + "name" => name, "bottles" => bottles, - "dependencies" => declared_runtime_dependencies.map { |dep| dep.to_formula.to_bottle_hash(top_level: false) }, + "dependencies" => dependencies, } end
true
Other
Homebrew
brew
d60f549a483a1a0d1f7061f8b8f1a68fc39ad8c4.json
info: add `--bottle` option for JSON bottle info
Library/Homebrew/test/formula_spec.rb
@@ -871,7 +871,7 @@ expect(h["versions"]["bottle"]).to be_truthy end - specify "#to_bottle_hash" do + specify "#to_recursive_bottle_hash" do f1 = formula "foo" do url "foo-1.0" @@ -881,9 +881,10 @@ end end - h = f1.to_bottle_hash + h = f1.to_recursive_bottle_hash expect(h).to be_a(Hash) + expect(h["name"]).to eq "foo" expect(h["bottles"].keys).to eq [Utils::Bottles.tag.to_s, "x86_64_foo"] expect(h["bottles"][Utils::Bottles.tag.to_s].keys).to eq ["url", "sha256"] expect(h["bottles"][Utils::Bottles.tag.to_s]["sha256"]).to eq TEST_SHA256
true
Other
Homebrew
brew
8250f733839aaf98578398dac035f79511144913.json
service: add install block to unit
Library/Homebrew/service.rb
@@ -151,6 +151,9 @@ def to_systemd_unit [Unit] Description=Homebrew generated unit for #{@formula.name} + [Install] + WantedBy=multi-user.target + [Service] Type=simple ExecStart=#{command.join(" ")}
true
Other
Homebrew
brew
8250f733839aaf98578398dac035f79511144913.json
service: add install block to unit
Library/Homebrew/test/service_spec.rb
@@ -123,6 +123,9 @@ [Unit] Description=Homebrew generated unit for formula_name + [Install] + WantedBy=multi-user.target + [Service] Type=simple ExecStart=#{HOMEBREW_PREFIX}/opt/#{name}/bin/beanstalkd test @@ -146,6 +149,9 @@ [Unit] Description=Homebrew generated unit for formula_name + [Install] + WantedBy=multi-user.target + [Service] Type=simple ExecStart=#{HOMEBREW_PREFIX}/opt/#{name}/bin/beanstalkd
true
Other
Homebrew
brew
ccfd01ba389ed638f0c67bbf82e01b3108314449.json
Strategy: Replace open-uri with curl
Library/Homebrew/livecheck/strategy.rb
@@ -100,7 +100,8 @@ def self.page_headers(url) *args, url, print_stdout: false, print_stderr: false, debug: false, verbose: false, - user_agent: user_agent, retry: false + user_agent: user_agent, timeout: 20, + retry: false ) while stdout.match?(/\AHTTP.*\r$/) @@ -119,25 +120,70 @@ def self.page_headers(url) # Fetches the content at the URL and returns a hash containing the # content and, if there are any redirections, the final URL. + # If `curl` encounters an error, the hash will contain a `:messages` + # array with the error message instead. # # @param url [String] the URL of the content to check # @return [Hash] sig { params(url: String).returns(T::Hash[Symbol, T.untyped]) } def self.page_content(url) original_url = url - # Manually handling `URI#open` redirections allows us to detect the - # resolved URL while also supporting HTTPS to HTTP redirections (which - # are normally forbidden by `OpenURI`). - begin - content = URI.parse(url).open(redirect: false, &:read) - rescue OpenURI::HTTPRedirect => e - url = e.uri.to_s - retry + args = curl_args( + "--compressed", + # Include HTTP response headers in output, so we can identify the + # final URL after any redirections + "--include", + # Follow redirections to handle mirrors, relocations, etc. + "--location", + # cURL's default timeout can be up to two minutes, so we need to + # set our own timeout settings to avoid a lengthy wait + "--connect-timeout", "10", + "--max-time", "15" + ) + + stdout, stderr, status = curl_with_workarounds( + *args, url, + print_stdout: false, print_stderr: false, + debug: false, verbose: false, + user_agent: :default, timeout: 20, + retry: false + ) + + unless status.success? + /^(?<error_msg>curl: \(\d+\) .+)/ =~ stderr + return { + messages: [error_msg.presence || "cURL failed without an error"], + } end - data = { content: content } - data[:final_url] = url unless url == original_url + # stdout contains the header information followed by the page content. + # We use #scrub here to avoid "invalid byte sequence in UTF-8" errors. + output = stdout.scrub + + # Separate the head(s)/body and identify the final URL (after any + # redirections) + max_iterations = 5 + iterations = 0 + output = output.lstrip + while output.match?(%r{\AHTTP/[\d.]+ \d+}) && output.include?("\r\n\r\n") + iterations += 1 + raise "Too many redirects (max = #{max_iterations})" if iterations > max_iterations + + head_text, _, output = output.partition("\r\n\r\n") + output = output.lstrip + + location = head_text[/^Location:\s*(.*)$/i, 1] + next if location.blank? + + location.chomp! + # Convert a relative redirect URL to an absolute URL + location = URI.join(url, location) unless location.match?(PageMatch::URL_MATCH_REGEX) + final_url = location + end + + data = { content: output } + data[:final_url] = final_url if final_url.present? && final_url != original_url data end end
true
Other
Homebrew
brew
ccfd01ba389ed638f0c67bbf82e01b3108314449.json
Strategy: Replace open-uri with curl
Library/Homebrew/livecheck/strategy/page_match.rb
@@ -1,8 +1,6 @@ # typed: true # frozen_string_literal: true -require "open-uri" - module Homebrew module Livecheck module Strategy
true
Other
Homebrew
brew
8b0f7e7ada254c8b2a046776174b6ff1b80a5499.json
formula: add `to_bottle_hash` method
Library/Homebrew/formula.rb
@@ -1908,6 +1908,27 @@ def to_hash hsh end + # @api private + # Generate a hash to be used to install a formula from a JSON file + def to_bottle_hash(top_level: true) + bottle = bottle_hash + + bottles = bottle["files"].map do |tag, file| + info = { + "url" => file["url"], + "sha256" => file["sha256"], + } + [tag.to_s, info] + end.to_h + + return bottles unless top_level + + { + "bottles" => bottles, + "dependencies" => deps.map { |dep| dep.to_formula.to_bottle_hash(top_level: false) }, + } + end + # Returns the bottle information for a formula def bottle_hash bottle_spec = stable.bottle_specification
true
Other
Homebrew
brew
8b0f7e7ada254c8b2a046776174b6ff1b80a5499.json
formula: add `to_bottle_hash` method
Library/Homebrew/test/formula_spec.rb
@@ -871,6 +871,25 @@ expect(h["versions"]["bottle"]).to be_truthy end + specify "#to_bottle_hash" do + f1 = formula "foo" do + url "foo-1.0" + + bottle do + sha256 cellar: :any, Utils::Bottles.tag.to_sym => TEST_SHA256 + sha256 cellar: :any, foo: TEST_SHA256 + end + end + + h = f1.to_bottle_hash + + expect(h).to be_a(Hash) + expect(h["bottles"].keys).to eq [Utils::Bottles.tag.to_s, "x86_64_foo"] + expect(h["bottles"][Utils::Bottles.tag.to_s].keys).to eq ["url", "sha256"] + expect(h["bottles"][Utils::Bottles.tag.to_s]["sha256"]).to eq TEST_SHA256 + expect(h["dependencies"]).to eq [] + end + describe "#eligible_kegs_for_cleanup" do it "returns Kegs eligible for cleanup" do f1 = Class.new(Testball) do
true
Other
Homebrew
brew
07d571bebc5b05a86e5dc8ebf9c51ec9836da81d.json
fix(vendor-gems): redirect bundler stdout to stderr When running brew commands and interpreting the output, e.g. running `brew livecheck --json`, it's necessary to stop other programs Homebrew happens to execute from writing logging output to stdout. Most programs don't do this, but `bundle install` does seem to. To reproduce the issue you can run: ```shell git -C "$(brew --prefix)" clean -ffdx Library/Homebrew/vendor stdout=$(HOMEBREW_FORCE_VENDOR_RUBY=1 brew livecheck --newer-only --json --cask $(brew --repo homebrew/cask)/Casks/grid.rb) echo "^^^ was stderr, >>> is stdout: $stdout" ``` If you run it without this change it will print a bunch of output like this to the stdout before printing out the livecheck JSON output: ```text Using bundler 1.17.3 Fetching byebug 11.1.3 Fetching coderay 1.1.3 Installing byebug 11.1.3 with native extensions Installing coderay 1.1.3 Fetching colorize 0.8.1 Installing colorize 0.8.1 [ # Contents of the JSON block. ] ``` With this change the stdout from `bundle install` will be redirected to brew's stderr, meaning only the JSON goes to stdout, and the rest goes to stderr.
Library/Homebrew/dev-cmd/vendor-gems.rb
@@ -40,7 +40,7 @@ def vendor_gems end ohai "bundle install --standalone" - safe_system "bundle", "install", "--standalone" + safe_system_redirect_stdout_to_stderr "bundle", "install", "--standalone" ohai "bundle pristine" safe_system "bundle", "pristine"
true
Other
Homebrew
brew
07d571bebc5b05a86e5dc8ebf9c51ec9836da81d.json
fix(vendor-gems): redirect bundler stdout to stderr When running brew commands and interpreting the output, e.g. running `brew livecheck --json`, it's necessary to stop other programs Homebrew happens to execute from writing logging output to stdout. Most programs don't do this, but `bundle install` does seem to. To reproduce the issue you can run: ```shell git -C "$(brew --prefix)" clean -ffdx Library/Homebrew/vendor stdout=$(HOMEBREW_FORCE_VENDOR_RUBY=1 brew livecheck --newer-only --json --cask $(brew --repo homebrew/cask)/Casks/grid.rb) echo "^^^ was stderr, >>> is stdout: $stdout" ``` If you run it without this change it will print a bunch of output like this to the stdout before printing out the livecheck JSON output: ```text Using bundler 1.17.3 Fetching byebug 11.1.3 Fetching coderay 1.1.3 Installing byebug 11.1.3 with native extensions Installing coderay 1.1.3 Fetching colorize 0.8.1 Installing colorize 0.8.1 [ # Contents of the JSON block. ] ``` With this change the stdout from `bundle install` will be redirected to brew's stderr, meaning only the JSON goes to stdout, and the rest goes to stderr.
Library/Homebrew/utils.rb
@@ -332,6 +332,19 @@ def quiet_system(cmd, *args) end end + # Redirects stdout to stderr, throws exception on command failure. + def safe_system_redirect_stdout_to_stderr(cmd, *args) + return if Homebrew._system(cmd, *args) do + # Redirect stdout stream to stderr stream. This is useful to prevent + # subprocesses from writing to stdout and interfering with the intended + # output, e.g. when running a brew command with `--json` for programs + # automating brew commands. + $stdout.reopen($stderr) + end + + raise ErrorDuringExecution.new([cmd, *args], status: $CHILD_STATUS) + end + def which(cmd, path = ENV["PATH"]) PATH.new(path).each do |p| begin
true
Other
Homebrew
brew
07d571bebc5b05a86e5dc8ebf9c51ec9836da81d.json
fix(vendor-gems): redirect bundler stdout to stderr When running brew commands and interpreting the output, e.g. running `brew livecheck --json`, it's necessary to stop other programs Homebrew happens to execute from writing logging output to stdout. Most programs don't do this, but `bundle install` does seem to. To reproduce the issue you can run: ```shell git -C "$(brew --prefix)" clean -ffdx Library/Homebrew/vendor stdout=$(HOMEBREW_FORCE_VENDOR_RUBY=1 brew livecheck --newer-only --json --cask $(brew --repo homebrew/cask)/Casks/grid.rb) echo "^^^ was stderr, >>> is stdout: $stdout" ``` If you run it without this change it will print a bunch of output like this to the stdout before printing out the livecheck JSON output: ```text Using bundler 1.17.3 Fetching byebug 11.1.3 Fetching coderay 1.1.3 Installing byebug 11.1.3 with native extensions Installing coderay 1.1.3 Fetching colorize 0.8.1 Installing colorize 0.8.1 [ # Contents of the JSON block. ] ``` With this change the stdout from `bundle install` will be redirected to brew's stderr, meaning only the JSON goes to stdout, and the rest goes to stderr.
Library/Homebrew/utils/gems.rb
@@ -144,7 +144,9 @@ def install_bundler_gems!(only_warn_on_failure: false, setup_path: true) # for some reason sometimes the exit code lies so check the output too. if bundle_check_failed || bundle_check_output.include?("Install missing gems") - unless system bundle, "install" + begin + safe_system_redirect_stdout_to_stderr bundle, "install" + rescue ErrorDuringExecution message = <<~EOS failed to run `#{bundle} install`! EOS
true
Other
Homebrew
brew
141edc8506ef72f5b8700d59c72615517964a0b7.json
formula_auditor: add audit for elasticsearch and kibana Prevent upgrading them to version 7.11 or newer, as they were relicensed to an incompatible license.
Library/Homebrew/formula_auditor.rb
@@ -353,6 +353,17 @@ def audit_glibc "which allows them to use our Linux bottles, which were compiled against system Glibc on CI." end + ELASTICSEARCH_KIBANA_RELICENSED_VERSION = "7.11" + + def audit_elasticsearch_kibana + return if formula.name != "elasticsearch" && formula.name != "kibana" + return unless @core_tap + return if formula.version < Version.new(ELASTICSEARCH_KIBANA_RELICENSED_VERSION) + + problem "Elasticsearch and Kibana were relicensed to a non-open-source license from version 7.11. " \ + "They must not be upgraded to version 7.11 or newer." + end + def audit_versioned_keg_only return unless @versioned_formula return unless @core_tap
false
Other
Homebrew
brew
cb78499cd4b96fa00b51d235e0dd2ea61ec20336.json
Install build deps for `--HEAD`
Library/Homebrew/formula_installer.rb
@@ -592,7 +592,7 @@ def expand_dependencies keep_build_test = false keep_build_test ||= dep.test? && include_test? && @include_test_formulae.include?(dependent.full_name) - keep_build_test ||= dep.build? && !install_bottle_for?(dependent, build) && !dependent.latest_version_installed? + keep_build_test ||= dep.build? && !install_bottle_for?(dependent, build) && (formula.head? || !dependent.latest_version_installed?) if dep.prune_from_option?(build) || ((dep.build? || dep.test?) && !keep_build_test) Dependency.prune
false
Other
Homebrew
brew
c7bbb904e8f83b08fe8d10913e37298fa7a03386.json
diagnostic: add check for broken taps Detect half-baked core taps that show up on a fairly regular basis (e.g. #11465). The logic is simple enough: Since an improper tap wouldn't have a complete Git config, and is always somewhere below `HOMEBREW_REPOSITORY`, any Git operation would look at the Brew repo instead. We simply need to test for any of: 1. Empty tap origin 2. Empty tap HEAD 3. Tap HEAD == Brew HEAD
Library/Homebrew/diagnostic.rb
@@ -147,6 +147,27 @@ def examine_git_origin(repository_path, desired_origin) end end + def broken_tap_msg(tap) + <<~EOS + #{tap.full_name} was not tapped properly. + To fix: + rm -rf "#{tap.path}" + brew tap #{tap.name} + EOS + end + + def broken_tap(tap) + return unless Utils::Git.available? + return unless HOMEBREW_REPOSITORY.git? + + return broken_tap_msg(tap) if tap.remote.blank? + + tap_head = tap.git_head + return broken_tap_msg(tap) if tap_head.blank? + + return broken_tap_msg(tap) if tap_head == HOMEBREW_REPOSITORY.git_head + end + def check_for_installed_developer_tools return if DevelopmentTools.installed? @@ -558,15 +579,16 @@ def check_brew_git_origin examine_git_origin(HOMEBREW_REPOSITORY, Homebrew::EnvConfig.brew_git_remote) end - def check_coretap_git_origin - examine_git_origin(CoreTap.instance.path, Homebrew::EnvConfig.core_git_remote) + def check_coretap_integrity + coretap = CoreTap.instance + broken_tap(coretap) || examine_git_origin(coretap.path, Homebrew::EnvConfig.core_git_remote) end - def check_casktap_git_origin + def check_casktap_integrity default_cask_tap = Tap.default_cask_tap return unless default_cask_tap.installed? - examine_git_origin(default_cask_tap.path, default_cask_tap.remote) + broken_tap(default_cask_tap) || examine_git_origin(default_cask_tap.path, default_cask_tap.remote) end sig { returns(T.nilable(String)) }
false
Other
Homebrew
brew
7d8723d8857b207814b31d813568e586e2c692c1.json
Update RBI files for rubocop-ast.
Library/Homebrew/sorbet/rbi/gems/rubocop-ast@1.7.0.rbi
@@ -675,6 +675,7 @@ end class RuboCop::AST::InPatternNode < ::RuboCop::AST::Node def body; end def branch_index; end + def pattern; end def then?; end end @@ -757,7 +758,8 @@ module RuboCop::AST::MethodDispatchNode def block_node; end def command?(name); end def const_receiver?; end - def def_modifier?; end + def def_modifier(node = T.unsafe(nil)); end + def def_modifier?(node = T.unsafe(nil)); end def dot?; end def double_colon?; end def implicit_call?; end
false
Other
Homebrew
brew
40b39151f916e612c1fc7efe259b3fc28efe7336.json
rename the variable
Library/Homebrew/diagnostic.rb
@@ -679,17 +679,17 @@ def check_git_status message = nil - taps = { + repos = { "Homebrew/brew" => HOMEBREW_REPOSITORY, "Homebrew/homebrew-core" => CoreTap.instance.path, } %w[cask cask-drivers cask-fonts cask-versions].each do |tap| cask_tap = Tap.fetch "homebrew", tap - taps[cask_tap.full_name] = cask_tap.path if cask_tap.installed? + repos[cask_tap.full_name] = cask_tap.path if cask_tap.installed? end - taps.each do |name, path| + repos.each do |name, path| status = path.cd do `git status --untracked-files=all --porcelain 2>/dev/null` end
false
Other
Homebrew
brew
ca6fc4873e4cb396e9ff650a52853ccd2359ac47.json
audit_spec: expect error for uppercase formula Our docs state that formula filenames must not have uppercase letters. This adds a test to expect that FormulaAuditor's audit_formula_name method complains about such a formula.
Library/Homebrew/test/dev-cmd/audit_spec.rb
@@ -488,6 +488,32 @@ class Foo < Formula end end + describe "#audit_formula_name" do + specify "no issue" do + fa = formula_auditor "foo", <<~RUBY, core_tap: true, strict: true + class Foo < Formula + url "https://brew.sh/foo-1.0.tgz" + homepage "https://brew.sh" + end + RUBY + + fa.audit_formula_name + expect(fa.problems).to be_empty + end + + specify "uppercase formula name" do + fa = formula_auditor "Foo", <<~RUBY + class Foo < Formula + url "https://brew.sh/Foo-1.0.tgz" + homepage "https://brew.sh" + end + RUBY + + fa.audit_formula_name + expect(fa.problems.first[:message]).to match "must not contain uppercase letters" + end + end + describe "#check_service_command" do specify "Not installed" do fa = formula_auditor "foo", <<~RUBY
false
Other
Homebrew
brew
d2b74b3e21e8be9422cb92a90ada9814729156f8.json
Update RBI files for rubocop-ast.
Library/Homebrew/sorbet/rbi/gems/rubocop-ast@1.6.0.rbi
@@ -4,11 +4,273 @@ # typed: true -module RuboCop +class AST::Node + def initialize(type, children = T.unsafe(nil), properties = T.unsafe(nil)); end + + def +(array); end + def <<(element); end + def ==(other); end + def append(element); end + def children; end + def clone; end + def concat(array); end + def deconstruct; end + def dup; end + def eql?(other); end + def hash; end + def inspect(indent = T.unsafe(nil)); end + def to_a; end + def to_ast; end + def to_s(indent = T.unsafe(nil)); end + def to_sexp(indent = T.unsafe(nil)); end + def to_sexp_array; end + def type; end + def updated(type = T.unsafe(nil), children = T.unsafe(nil), properties = T.unsafe(nil)); end + + protected + + def assign_properties(properties); end + def fancy_type; end + + private + + def original_dup; end +end + +class Parser::AST::Node < ::AST::Node + def assign_properties(properties); end + def loc; end + def location; end +end + +class Parser::Builders::Default + def initialize; end + + def __ENCODING__(__ENCODING__t); end + def __FILE__(__FILE__t); end + def __LINE__(__LINE__t); end + def accessible(node); end + def alias(alias_t, to, from); end + def arg(name_t); end + def arg_expr(expr); end + def args(begin_t, args, end_t, check_args = T.unsafe(nil)); end + def array(begin_t, elements, end_t); end + def array_pattern(lbrack_t, elements, rbrack_t); end + def assign(lhs, eql_t, rhs); end + def assignable(node); end + def associate(begin_t, pairs, end_t); end + def attr_asgn(receiver, dot_t, selector_t); end + def back_ref(token); end + def begin(begin_t, body, end_t); end + def begin_body(compound_stmt, rescue_bodies = T.unsafe(nil), else_t = T.unsafe(nil), else_ = T.unsafe(nil), ensure_t = T.unsafe(nil), ensure_ = T.unsafe(nil)); end + def begin_keyword(begin_t, body, end_t); end + def binary_op(receiver, operator_t, arg); end + def block(method_call, begin_t, args, body, end_t); end + def block_pass(amper_t, arg); end + def blockarg(amper_t, name_t); end + def blockarg_expr(amper_t, expr); end + def call_lambda(lambda_t); end + def call_method(receiver, dot_t, selector_t, lparen_t = T.unsafe(nil), args = T.unsafe(nil), rparen_t = T.unsafe(nil)); end + def call_type_for_dot(dot_t); end + def case(case_t, expr, when_bodies, else_t, else_body, end_t); end + def case_match(case_t, expr, in_bodies, else_t, else_body, end_t); end + def character(char_t); end + def complex(complex_t); end + def compstmt(statements); end + def condition(cond_t, cond, then_t, if_true, else_t, if_false, end_t); end + def condition_mod(if_true, if_false, cond_t, cond); end + def const(name_t); end + def const_fetch(scope, t_colon2, name_t); end + def const_global(t_colon3, name_t); end + def const_op_assignable(node); end + def const_pattern(const, ldelim_t, pattern, rdelim_t); end + def cvar(token); end + def dedent_string(node, dedent_level); end + def def_class(class_t, name, lt_t, superclass, body, end_t); end + def def_endless_method(def_t, name_t, args, assignment_t, body); end + def def_endless_singleton(def_t, definee, dot_t, name_t, args, assignment_t, body); end + def def_method(def_t, name_t, args, body, end_t); end + def def_module(module_t, name, body, end_t); end + def def_sclass(class_t, lshft_t, expr, body, end_t); end + def def_singleton(def_t, definee, dot_t, name_t, args, body, end_t); end + def emit_file_line_as_literals; end + def emit_file_line_as_literals=(_arg0); end + def false(false_t); end + def find_pattern(lbrack_t, elements, rbrack_t); end + def float(float_t); end + def for(for_t, iterator, in_t, iteratee, do_t, body, end_t); end + def forward_arg(dots_t); end + def forward_only_args(begin_t, dots_t, end_t); end + def forwarded_args(dots_t); end + def gvar(token); end + def hash_pattern(lbrace_t, kwargs, rbrace_t); end + def ident(token); end + def if_guard(if_t, if_body); end + def in_match(lhs, in_t, rhs); end + def in_pattern(in_t, pattern, guard, then_t, body); end + def index(receiver, lbrack_t, indexes, rbrack_t); end + def index_asgn(receiver, lbrack_t, indexes, rbrack_t); end + def integer(integer_t); end + def ivar(token); end + def keyword_cmd(type, keyword_t, lparen_t = T.unsafe(nil), args = T.unsafe(nil), rparen_t = T.unsafe(nil)); end + def kwarg(name_t); end + def kwnilarg(dstar_t, nil_t); end + def kwoptarg(name_t, value); end + def kwrestarg(dstar_t, name_t = T.unsafe(nil)); end + def kwsplat(dstar_t, arg); end + def logical_op(type, lhs, op_t, rhs); end + def loop(type, keyword_t, cond, do_t, body, end_t); end + def loop_mod(type, body, keyword_t, cond); end + def match_alt(left, pipe_t, right); end + def match_as(value, assoc_t, as); end + def match_hash_var(name_t); end + def match_hash_var_from_str(begin_t, strings, end_t); end + def match_label(label_type, label); end + def match_nil_pattern(dstar_t, nil_t); end + def match_op(receiver, match_t, arg); end + def match_pair(label_type, label, value); end + def match_pattern(lhs, match_t, rhs); end + def match_pattern_p(lhs, match_t, rhs); end + def match_rest(star_t, name_t = T.unsafe(nil)); end + def match_var(name_t); end + def match_with_trailing_comma(match, comma_t); end + def multi_assign(lhs, eql_t, rhs); end + def multi_lhs(begin_t, items, end_t); end + def nil(nil_t); end + def not_op(not_t, begin_t = T.unsafe(nil), receiver = T.unsafe(nil), end_t = T.unsafe(nil)); end + def nth_ref(token); end + def numargs(max_numparam); end + def objc_kwarg(kwname_t, assoc_t, name_t); end + def objc_restarg(star_t, name = T.unsafe(nil)); end + def objc_varargs(pair, rest_of_varargs); end + def op_assign(lhs, op_t, rhs); end + def optarg(name_t, eql_t, value); end + def pair(key, assoc_t, value); end + def pair_keyword(key_t, value); end + def pair_list_18(list); end + def pair_quoted(begin_t, parts, end_t, value); end + def parser; end + def parser=(_arg0); end + def pin(pin_t, var); end + def postexe(postexe_t, lbrace_t, compstmt, rbrace_t); end + def preexe(preexe_t, lbrace_t, compstmt, rbrace_t); end + def procarg0(arg); end + def range_exclusive(lhs, dot3_t, rhs); end + def range_inclusive(lhs, dot2_t, rhs); end + def rational(rational_t); end + def regexp_compose(begin_t, parts, end_t, options); end + def regexp_options(regopt_t); end + def rescue_body(rescue_t, exc_list, assoc_t, exc_var, then_t, compound_stmt); end + def restarg(star_t, name_t = T.unsafe(nil)); end + def restarg_expr(star_t, expr = T.unsafe(nil)); end + def self(token); end + def shadowarg(name_t); end + def splat(star_t, arg = T.unsafe(nil)); end + def string(string_t); end + def string_compose(begin_t, parts, end_t); end + def string_internal(string_t); end + def symbol(symbol_t); end + def symbol_compose(begin_t, parts, end_t); end + def symbol_internal(symbol_t); end + def symbols_compose(begin_t, parts, end_t); end + def ternary(cond, question_t, if_true, colon_t, if_false); end + def true(true_t); end + def unary_num(unary_t, numeric); end + def unary_op(op_t, receiver); end + def undef_method(undef_t, names); end + def unless_guard(unless_t, unless_body); end + def when(when_t, patterns, then_t, body); end + def word(parts); end + def words_compose(begin_t, parts, end_t); end + def xstring_compose(begin_t, parts, end_t); end + + private + + def arg_name_collides?(this_name, that_name); end + def arg_prefix_map(op_t, name_t = T.unsafe(nil)); end + def binary_op_map(left_e, op_t, right_e); end + def block_map(receiver_l, begin_t, end_t); end + def check_assignment_to_numparam(name, loc); end + def check_condition(cond); end + def check_duplicate_arg(this_arg, map = T.unsafe(nil)); end + def check_duplicate_args(args, map = T.unsafe(nil)); end + def check_duplicate_pattern_key(name, loc); end + def check_duplicate_pattern_variable(name, loc); end + def check_lvar_name(name, loc); end + def check_reserved_for_numparam(name, loc); end + def collapse_string_parts?(parts); end + def collection_map(begin_t, parts, end_t); end + def condition_map(keyword_t, cond_e, begin_t, body_e, else_t, else_e, end_t); end + def constant_map(scope, colon2_t, name_t); end + def definition_map(keyword_t, operator_t, name_t, end_t); end + def delimited_string_map(string_t); end + def diagnostic(type, reason, arguments, location, highlights = T.unsafe(nil)); end + def eh_keyword_map(compstmt_e, keyword_t, body_es, else_t, else_e); end + def endless_definition_map(keyword_t, operator_t, name_t, assignment_t, body_e); end + def expr_map(loc); end + def for_map(keyword_t, in_t, begin_t, end_t); end + def guard_map(keyword_t, guard_body_e); end + def index_map(receiver_e, lbrack_t, rbrack_t); end + def join_exprs(left_expr, right_expr); end + def keyword_map(keyword_t, begin_t, args, end_t); end + def keyword_mod_map(pre_e, keyword_t, post_e); end + def kwarg_map(name_t, value_e = T.unsafe(nil)); end + def kwargs?(node); end + def loc(token); end + def module_definition_map(keyword_t, name_e, operator_t, end_t); end + def n(type, children, source_map); end + def n0(type, source_map); end + def numeric(kind, token); end + def pair_keyword_map(key_t, value_e); end + def pair_quoted_map(begin_t, end_t, value_e); end + def prefix_string_map(symbol); end + def range_map(start_e, op_t, end_e); end + def regexp_map(begin_t, end_t, options_e); end + def rescue_body_map(keyword_t, exc_list_e, assoc_t, exc_var_e, then_t, compstmt_e); end + def rewrite_hash_args_to_kwargs(args); end + def send_binary_op_map(lhs_e, selector_t, rhs_e); end + def send_index_map(receiver_e, lbrack_t, rbrack_t); end + def send_map(receiver_e, dot_t, selector_t, begin_t = T.unsafe(nil), args = T.unsafe(nil), end_t = T.unsafe(nil)); end + def send_unary_op_map(selector_t, arg_e); end + def static_regexp(parts, options); end + def static_regexp_node(node); end + def static_string(nodes); end + def string_map(begin_t, parts, end_t); end + def string_value(token); end + def ternary_map(begin_e, question_t, mid_e, colon_t, end_e); end + def token_map(token); end + def unary_op_map(op_t, arg_e = T.unsafe(nil)); end + def unquoted_map(token); end + def validate_definee(definee); end + def value(token); end + def var_send_map(variable_e); end + def variable_map(name_t); end + + class << self + def emit_arg_inside_procarg0; end + def emit_arg_inside_procarg0=(_arg0); end + def emit_encoding; end + def emit_encoding=(_arg0); end + def emit_forward_arg; end + def emit_forward_arg=(_arg0); end + def emit_index; end + def emit_index=(_arg0); end + def emit_kwargs; end + def emit_kwargs=(_arg0); end + def emit_lambda; end + def emit_lambda=(_arg0); end + def emit_match_pattern; end + def emit_match_pattern=(_arg0); end + def emit_procarg0; end + def emit_procarg0=(_arg0); end + def modernize; end + end end +module RuboCop; end + module RuboCop::AST - extend(::RuboCop::AST::RuboCopCompatibility) + extend ::RuboCop::AST::RuboCopCompatibility end class RuboCop::AST::AliasNode < ::RuboCop::AST::Node @@ -17,8 +279,8 @@ class RuboCop::AST::AliasNode < ::RuboCop::AST::Node end class RuboCop::AST::AndNode < ::RuboCop::AST::Node - include(::RuboCop::AST::BinaryOperatorNode) - include(::RuboCop::AST::PredicateOperatorNode) + include ::RuboCop::AST::BinaryOperatorNode + include ::RuboCop::AST::PredicateOperatorNode def alternate_operator; end def inverse_operator; end @@ -31,7 +293,7 @@ class RuboCop::AST::ArgNode < ::RuboCop::AST::Node end class RuboCop::AST::ArgsNode < ::RuboCop::AST::Node - include(::RuboCop::AST::CollectionNode) + include ::RuboCop::AST::CollectionNode def argument_list; end def empty_and_without_delimiters?; end @@ -45,6 +307,8 @@ class RuboCop::AST::ArrayNode < ::RuboCop::AST::Node def values; end end +RuboCop::AST::ArrayNode::PERCENT_LITERAL_TYPES = T.let(T.unsafe(nil), Hash) + module RuboCop::AST::BasicLiteralNode def value; end end @@ -56,7 +320,7 @@ module RuboCop::AST::BinaryOperatorNode end class RuboCop::AST::BlockNode < ::RuboCop::AST::Node - include(::RuboCop::AST::MethodIdentifierPredicates) + include ::RuboCop::AST::MethodIdentifierPredicates def argument_list; end def arguments; end @@ -79,9 +343,11 @@ class RuboCop::AST::BlockNode < ::RuboCop::AST::Node def numbered_arguments; end end +RuboCop::AST::BlockNode::VOID_CONTEXT_METHODS = T.let(T.unsafe(nil), Array) + class RuboCop::AST::BreakNode < ::RuboCop::AST::Node - include(::RuboCop::AST::ParameterizedNode) - include(::RuboCop::AST::ParameterizedNode::WrappedArguments) + include ::RuboCop::AST::ParameterizedNode + include ::RuboCop::AST::ParameterizedNode::WrappedArguments end class RuboCop::AST::Builder < ::Parser::Builders::Default @@ -96,7 +362,7 @@ end RuboCop::AST::Builder::NODE_MAP = T.let(T.unsafe(nil), Hash) class RuboCop::AST::CaseMatchNode < ::RuboCop::AST::Node - include(::RuboCop::AST::ConditionalNode) + include ::RuboCop::AST::ConditionalNode def each_in_pattern(&block); end def else?; end @@ -106,7 +372,7 @@ class RuboCop::AST::CaseMatchNode < ::RuboCop::AST::Node end class RuboCop::AST::CaseNode < ::RuboCop::AST::Node - include(::RuboCop::AST::ConditionalNode) + include ::RuboCop::AST::ConditionalNode def branches; end def each_when(&block); end @@ -123,7 +389,7 @@ class RuboCop::AST::ClassNode < ::RuboCop::AST::Node end module RuboCop::AST::CollectionNode - extend(::Forwardable) + extend ::Forwardable def &(*args, &block); end def *(*args, &block); end @@ -258,6 +524,8 @@ module RuboCop::AST::CollectionNode def |(*args, &block); end end +RuboCop::AST::CollectionNode::ARRAY_METHODS = T.let(T.unsafe(nil), Array) + module RuboCop::AST::ConditionalNode def body; end def condition; end @@ -276,8 +544,8 @@ class RuboCop::AST::ConstNode < ::RuboCop::AST::Node end class RuboCop::AST::DefNode < ::RuboCop::AST::Node - include(::RuboCop::AST::ParameterizedNode) - include(::RuboCop::AST::MethodIdentifierPredicates) + include ::RuboCop::AST::ParameterizedNode + include ::RuboCop::AST::MethodIdentifierPredicates def argument_forwarding?; end def arguments; end @@ -289,9 +557,9 @@ class RuboCop::AST::DefNode < ::RuboCop::AST::Node end class RuboCop::AST::DefinedNode < ::RuboCop::AST::Node - include(::RuboCop::AST::ParameterizedNode) - include(::RuboCop::AST::MethodIdentifierPredicates) - include(::RuboCop::AST::MethodDispatchNode) + include ::RuboCop::AST::ParameterizedNode + include ::RuboCop::AST::MethodIdentifierPredicates + include ::RuboCop::AST::MethodDispatchNode def arguments; end def node_parts; end @@ -317,19 +585,17 @@ class RuboCop::AST::EnsureNode < ::RuboCop::AST::Node def body; end end -module RuboCop::AST::Ext -end +module RuboCop::AST::Ext; end module RuboCop::AST::Ext::Range def line_span(exclude_end: T.unsafe(nil)); end end -module RuboCop::AST::Ext::RangeMinMax -end +module RuboCop::AST::Ext::RangeMinMax; end class RuboCop::AST::FloatNode < ::RuboCop::AST::Node - include(::RuboCop::AST::BasicLiteralNode) - include(::RuboCop::AST::NumericNode) + include ::RuboCop::AST::BasicLiteralNode + include ::RuboCop::AST::NumericNode end class RuboCop::AST::ForNode < ::RuboCop::AST::Node @@ -342,7 +608,7 @@ class RuboCop::AST::ForNode < ::RuboCop::AST::Node end class RuboCop::AST::ForwardArgsNode < ::RuboCop::AST::Node - include(::RuboCop::AST::CollectionNode) + include ::RuboCop::AST::CollectionNode def to_a; end end @@ -356,6 +622,22 @@ module RuboCop::AST::HashElementNode def value_delta(other); end end +class RuboCop::AST::HashElementNode::HashElementDelta + def initialize(first, second); end + + def delimiter_delta; end + def key_delta(alignment = T.unsafe(nil)); end + def value_delta; end + + private + + def delta(first, second, alignment = T.unsafe(nil)); end + def first; end + def keyword_splat?; end + def second; end + def valid_argument_types?; end +end + class RuboCop::AST::HashNode < ::RuboCop::AST::Node def braces?; end def each_key(&block); end @@ -370,8 +652,8 @@ class RuboCop::AST::HashNode < ::RuboCop::AST::Node end class RuboCop::AST::IfNode < ::RuboCop::AST::Node - include(::RuboCop::AST::ConditionalNode) - include(::RuboCop::AST::ModifierNode) + include ::RuboCop::AST::ConditionalNode + include ::RuboCop::AST::ModifierNode def branches; end def each_branch(&block); end @@ -390,11 +672,17 @@ class RuboCop::AST::IfNode < ::RuboCop::AST::Node def unless?; end end +class RuboCop::AST::InPatternNode < ::RuboCop::AST::Node + def body; end + def branch_index; end + def then?; end +end + class RuboCop::AST::IndexNode < ::RuboCop::AST::Node - include(::RuboCop::AST::ParameterizedNode) - include(::RuboCop::AST::ParameterizedNode::RestArguments) - include(::RuboCop::AST::MethodIdentifierPredicates) - include(::RuboCop::AST::MethodDispatchNode) + include ::RuboCop::AST::ParameterizedNode + include ::RuboCop::AST::ParameterizedNode::RestArguments + include ::RuboCop::AST::MethodIdentifierPredicates + include ::RuboCop::AST::MethodDispatchNode def assignment_method?; end def attribute_accessor?; end @@ -406,10 +694,10 @@ class RuboCop::AST::IndexNode < ::RuboCop::AST::Node end class RuboCop::AST::IndexasgnNode < ::RuboCop::AST::Node - include(::RuboCop::AST::ParameterizedNode) - include(::RuboCop::AST::ParameterizedNode::RestArguments) - include(::RuboCop::AST::MethodIdentifierPredicates) - include(::RuboCop::AST::MethodDispatchNode) + include ::RuboCop::AST::ParameterizedNode + include ::RuboCop::AST::ParameterizedNode::RestArguments + include ::RuboCop::AST::MethodIdentifierPredicates + include ::RuboCop::AST::MethodDispatchNode def assignment_method?; end def attribute_accessor?; end @@ -421,24 +709,26 @@ class RuboCop::AST::IndexasgnNode < ::RuboCop::AST::Node end class RuboCop::AST::IntNode < ::RuboCop::AST::Node - include(::RuboCop::AST::BasicLiteralNode) - include(::RuboCop::AST::NumericNode) + include ::RuboCop::AST::BasicLiteralNode + include ::RuboCop::AST::NumericNode end class RuboCop::AST::KeywordSplatNode < ::RuboCop::AST::Node - include(::RuboCop::AST::HashElementNode) + include ::RuboCop::AST::HashElementNode def colon?; end def hash_rocket?; end def node_parts; end def operator; end end +RuboCop::AST::KeywordSplatNode::DOUBLE_SPLAT = T.let(T.unsafe(nil), String) + class RuboCop::AST::LambdaNode < ::RuboCop::AST::Node - include(::RuboCop::AST::ParameterizedNode) - include(::RuboCop::AST::ParameterizedNode::RestArguments) - include(::RuboCop::AST::MethodIdentifierPredicates) - include(::RuboCop::AST::MethodDispatchNode) + include ::RuboCop::AST::ParameterizedNode + include ::RuboCop::AST::ParameterizedNode::RestArguments + include ::RuboCop::AST::MethodIdentifierPredicates + include ::RuboCop::AST::MethodDispatchNode def assignment_method?; end def attribute_accessor?; end @@ -453,8 +743,8 @@ class RuboCop::AST::LambdaNode < ::RuboCop::AST::Node end module RuboCop::AST::MethodDispatchNode - include(::RuboCop::AST::MethodIdentifierPredicates) - extend(::RuboCop::AST::NodePattern::Macros) + include ::RuboCop::AST::MethodIdentifierPredicates + extend ::RuboCop::AST::NodePattern::Macros def access_modifier?; end def adjacent_def_modifier?(param0 = T.unsafe(nil)); end @@ -486,6 +776,9 @@ module RuboCop::AST::MethodDispatchNode def unary_operation?; end end +RuboCop::AST::MethodDispatchNode::ARITHMETIC_OPERATORS = T.let(T.unsafe(nil), Array) +RuboCop::AST::MethodDispatchNode::SPECIAL_MODIFIERS = T.let(T.unsafe(nil), Array) + module RuboCop::AST::MethodIdentifierPredicates def assignment_method?; end def bang_method?; end @@ -509,6 +802,16 @@ module RuboCop::AST::MethodIdentifierPredicates def self_receiver?; end end +RuboCop::AST::MethodIdentifierPredicates::ENUMERABLE_METHODS = T.let(T.unsafe(nil), Set) +RuboCop::AST::MethodIdentifierPredicates::ENUMERATOR_METHODS = T.let(T.unsafe(nil), Set) +RuboCop::AST::MethodIdentifierPredicates::NONMUTATING_ARRAY_METHODS = T.let(T.unsafe(nil), Set) +RuboCop::AST::MethodIdentifierPredicates::NONMUTATING_BINARY_OPERATOR_METHODS = T.let(T.unsafe(nil), Set) +RuboCop::AST::MethodIdentifierPredicates::NONMUTATING_HASH_METHODS = T.let(T.unsafe(nil), Set) +RuboCop::AST::MethodIdentifierPredicates::NONMUTATING_OPERATOR_METHODS = T.let(T.unsafe(nil), Set) +RuboCop::AST::MethodIdentifierPredicates::NONMUTATING_STRING_METHODS = T.let(T.unsafe(nil), Set) +RuboCop::AST::MethodIdentifierPredicates::NONMUTATING_UNARY_OPERATOR_METHODS = T.let(T.unsafe(nil), Set) +RuboCop::AST::MethodIdentifierPredicates::OPERATOR_METHODS = T.let(T.unsafe(nil), Set) + module RuboCop::AST::ModifierNode def modifier_form?; end end @@ -519,15 +822,15 @@ class RuboCop::AST::ModuleNode < ::RuboCop::AST::Node end class RuboCop::AST::NextNode < ::RuboCop::AST::Node - include(::RuboCop::AST::ParameterizedNode) - include(::RuboCop::AST::ParameterizedNode::WrappedArguments) + include ::RuboCop::AST::ParameterizedNode + include ::RuboCop::AST::ParameterizedNode::WrappedArguments end class RuboCop::AST::Node < ::Parser::AST::Node - include(::RuboCop::AST::Sexp) - include(::RuboCop::AST::Descendence) - include(::RuboCop::RSpec::Node) - extend(::RuboCop::AST::NodePattern::Macros) + include ::RuboCop::AST::Sexp + include ::RuboCop::AST::Descendence + include ::RuboCop::RSpec::Node + extend ::RuboCop::AST::NodePattern::Macros def initialize(type, children = T.unsafe(nil), properties = T.unsafe(nil)); end @@ -754,50 +1057,32 @@ class RuboCop::AST::Node < ::Parser::AST::Node end RuboCop::AST::Node::ARGUMENT_TYPES = T.let(T.unsafe(nil), Set) - RuboCop::AST::Node::ASSIGNMENTS = T.let(T.unsafe(nil), Set) - RuboCop::AST::Node::BASIC_CONDITIONALS = T.let(T.unsafe(nil), Set) - RuboCop::AST::Node::BASIC_LITERALS = T.let(T.unsafe(nil), Set) - RuboCop::AST::Node::COMPARISON_OPERATORS = T.let(T.unsafe(nil), Set) - RuboCop::AST::Node::COMPOSITE_LITERALS = T.let(T.unsafe(nil), Set) - RuboCop::AST::Node::CONDITIONALS = T.let(T.unsafe(nil), Set) - RuboCop::AST::Node::EQUALS_ASSIGNMENTS = T.let(T.unsafe(nil), Set) - RuboCop::AST::Node::FALSEY_LITERALS = T.let(T.unsafe(nil), Set) - RuboCop::AST::Node::IMMUTABLE_LITERALS = T.let(T.unsafe(nil), Set) - RuboCop::AST::Node::KEYWORDS = T.let(T.unsafe(nil), Set) - RuboCop::AST::Node::LITERALS = T.let(T.unsafe(nil), Set) - +RuboCop::AST::Node::LITERAL_RECURSIVE_METHODS = T.let(T.unsafe(nil), Set) +RuboCop::AST::Node::LITERAL_RECURSIVE_TYPES = T.let(T.unsafe(nil), Set) RuboCop::AST::Node::LOOP_TYPES = T.let(T.unsafe(nil), Set) - RuboCop::AST::Node::MUTABLE_LITERALS = T.let(T.unsafe(nil), Set) - RuboCop::AST::Node::OPERATOR_KEYWORDS = T.let(T.unsafe(nil), Set) - RuboCop::AST::Node::POST_CONDITION_LOOP_TYPES = T.let(T.unsafe(nil), Set) - RuboCop::AST::Node::REFERENCES = T.let(T.unsafe(nil), Set) - RuboCop::AST::Node::SHORTHAND_ASSIGNMENTS = T.let(T.unsafe(nil), Set) - RuboCop::AST::Node::SPECIAL_KEYWORDS = T.let(T.unsafe(nil), Set) - RuboCop::AST::Node::TRUTHY_LITERALS = T.let(T.unsafe(nil), Set) - RuboCop::AST::Node::VARIABLES = T.let(T.unsafe(nil), Set) class RuboCop::AST::NodePattern - include(::RuboCop::AST::NodePattern::MethodDefiner) - extend(::Forwardable) + include ::RuboCop::AST::NodePattern::MethodDefiner + extend ::Forwardable def initialize(str, compiler: T.unsafe(nil)); end @@ -850,7 +1135,7 @@ class RuboCop::AST::NodePattern::Comment end class RuboCop::AST::NodePattern::Compiler - extend(::Forwardable) + extend ::Forwardable def initialize; end @@ -877,7 +1162,6 @@ class RuboCop::AST::NodePattern::Compiler end class RuboCop::AST::NodePattern::Compiler::AtomSubcompiler < ::RuboCop::AST::NodePattern::Compiler::Subcompiler - private def visit_const; end @@ -928,7 +1212,6 @@ class RuboCop::AST::NodePattern::Compiler::Debug::Colorizer end RuboCop::AST::NodePattern::Compiler::Debug::Colorizer::COLOR_SCHEME = T.let(T.unsafe(nil), Hash) - RuboCop::AST::NodePattern::Compiler::Debug::Colorizer::Compiler = RuboCop::AST::NodePattern::Compiler::Debug class RuboCop::AST::NodePattern::Compiler::Debug::Colorizer::Result < ::Struct @@ -968,11 +1251,11 @@ module RuboCop::AST::NodePattern::Compiler::Debug::InstrumentationSubcompiler end class RuboCop::AST::NodePattern::Compiler::Debug::NodePatternSubcompiler < ::RuboCop::AST::NodePattern::Compiler::NodePatternSubcompiler - include(::RuboCop::AST::NodePattern::Compiler::Debug::InstrumentationSubcompiler) + include ::RuboCop::AST::NodePattern::Compiler::Debug::InstrumentationSubcompiler end class RuboCop::AST::NodePattern::Compiler::Debug::SequenceSubcompiler < ::RuboCop::AST::NodePattern::Compiler::SequenceSubcompiler - include(::RuboCop::AST::NodePattern::Compiler::Debug::InstrumentationSubcompiler) + include ::RuboCop::AST::NodePattern::Compiler::Debug::InstrumentationSubcompiler end class RuboCop::AST::NodePattern::Compiler::Debug::Trace @@ -1057,6 +1340,7 @@ class RuboCop::AST::NodePattern::Compiler::SequenceSubcompiler < ::RuboCop::AST: end RuboCop::AST::NodePattern::Compiler::SequenceSubcompiler::DELTA = T.let(T.unsafe(nil), Integer) +RuboCop::AST::NodePattern::Compiler::SequenceSubcompiler::POSITIVE = T.let(T.unsafe(nil), Proc) class RuboCop::AST::NodePattern::Compiler::Subcompiler def initialize(compiler); end @@ -1076,8 +1360,7 @@ class RuboCop::AST::NodePattern::Compiler::Subcompiler end end -class RuboCop::AST::NodePattern::Invalid < ::StandardError -end +class RuboCop::AST::NodePattern::Invalid < ::StandardError; end class RuboCop::AST::NodePattern::Lexer < ::RuboCop::AST::NodePattern::LexerRex def initialize(source); end @@ -1096,6 +1379,7 @@ class RuboCop::AST::NodePattern::Lexer < ::RuboCop::AST::NodePattern::LexerRex end RuboCop::AST::NodePattern::Lexer::Error = RuboCop::AST::NodePattern::LexerRex::ScanError +RuboCop::AST::NodePattern::Lexer::REGEXP_OPTIONS = T.let(T.unsafe(nil), Hash) class RuboCop::AST::NodePattern::LexerRex def action; end @@ -1115,24 +1399,14 @@ class RuboCop::AST::NodePattern::LexerRex end RuboCop::AST::NodePattern::LexerRex::CALL = T.let(T.unsafe(nil), Regexp) - RuboCop::AST::NodePattern::LexerRex::CONST_NAME = T.let(T.unsafe(nil), Regexp) - RuboCop::AST::NodePattern::LexerRex::IDENTIFIER = T.let(T.unsafe(nil), Regexp) - -class RuboCop::AST::NodePattern::LexerRex::LexerError < ::StandardError -end - +class RuboCop::AST::NodePattern::LexerRex::LexerError < ::StandardError; end RuboCop::AST::NodePattern::LexerRex::NODE_TYPE = T.let(T.unsafe(nil), Regexp) - RuboCop::AST::NodePattern::LexerRex::REGEXP = T.let(T.unsafe(nil), Regexp) - RuboCop::AST::NodePattern::LexerRex::REGEXP_BODY = T.let(T.unsafe(nil), Regexp) - RuboCop::AST::NodePattern::LexerRex::SYMBOL_NAME = T.let(T.unsafe(nil), Regexp) - -class RuboCop::AST::NodePattern::LexerRex::ScanError < ::RuboCop::AST::NodePattern::LexerRex::LexerError -end +class RuboCop::AST::NodePattern::LexerRex::ScanError < ::RuboCop::AST::NodePattern::LexerRex::LexerError; end module RuboCop::AST::NodePattern::Macros def def_node_matcher(method_name, pattern_str, **keyword_defaults); end @@ -1162,8 +1436,8 @@ module RuboCop::AST::NodePattern::MethodDefiner end class RuboCop::AST::NodePattern::Node < ::Parser::AST::Node - include(::RuboCop::AST::Descendence) - extend(::Forwardable) + include ::RuboCop::AST::Descendence + extend ::Forwardable def arity; end def arity_range; end @@ -1179,14 +1453,16 @@ class RuboCop::AST::NodePattern::Node < ::Parser::AST::Node end class RuboCop::AST::NodePattern::Node::AnyOrder < ::RuboCop::AST::NodePattern::Node - include(::RuboCop::AST::NodePattern::Node::ForbidInSeqHead) + include ::RuboCop::AST::NodePattern::Node::ForbidInSeqHead def arity; end def ends_with_rest?; end def rest_node; end def term_nodes; end end +RuboCop::AST::NodePattern::Node::AnyOrder::ARITIES = T.let(T.unsafe(nil), Hash) + class RuboCop::AST::NodePattern::Node::Capture < ::RuboCop::AST::NodePattern::Node def arity(*args, &block); end def capture?; end @@ -1200,16 +1476,17 @@ module RuboCop::AST::NodePattern::Node::ForbidInSeqHead end RuboCop::AST::NodePattern::Node::FunctionCall = RuboCop::AST::NodePattern::Node::Predicate - +RuboCop::AST::NodePattern::Node::INT_TO_RANGE = T.let(T.unsafe(nil), Hash) RuboCop::AST::NodePattern::Node::MAP = T.let(T.unsafe(nil), Hash) +RuboCop::AST::NodePattern::Node::MATCHES_WITHIN_SET = T.let(T.unsafe(nil), Set) class RuboCop::AST::NodePattern::Node::Predicate < ::RuboCop::AST::NodePattern::Node def arg_list; end def method_name; end end class RuboCop::AST::NodePattern::Node::Repetition < ::RuboCop::AST::NodePattern::Node - include(::RuboCop::AST::NodePattern::Node::ForbidInSeqHead) + include ::RuboCop::AST::NodePattern::Node::ForbidInSeqHead def arity; end def operator; end @@ -1223,14 +1500,16 @@ class RuboCop::AST::NodePattern::Node::Rest < ::RuboCop::AST::NodePattern::Node def rest?; end end +RuboCop::AST::NodePattern::Node::Rest::ARITY = T.let(T.unsafe(nil), Range) + class RuboCop::AST::NodePattern::Node::Sequence < ::RuboCop::AST::NodePattern::Node - include(::RuboCop::AST::NodePattern::Node::ForbidInSeqHead) + include ::RuboCop::AST::NodePattern::Node::ForbidInSeqHead def initialize(type, children = T.unsafe(nil), properties = T.unsafe(nil)); end end class RuboCop::AST::NodePattern::Node::Subsequence < ::RuboCop::AST::NodePattern::Node - include(::RuboCop::AST::NodePattern::Node::ForbidInSeqHead) + include ::RuboCop::AST::NodePattern::Node::ForbidInSeqHead def arity; end def in_sequence_head; end @@ -1242,7 +1521,7 @@ class RuboCop::AST::NodePattern::Node::Union < ::RuboCop::AST::NodePattern::Node end class RuboCop::AST::NodePattern::Parser < ::Racc::Parser - extend(::Forwardable) + extend ::Forwardable def initialize(builder = T.unsafe(nil)); end @@ -1297,11 +1576,8 @@ class RuboCop::AST::NodePattern::Parser < ::Racc::Parser end RuboCop::AST::NodePattern::Parser::Builder = RuboCop::AST::NodePattern::Builder - RuboCop::AST::NodePattern::Parser::Lexer = RuboCop::AST::NodePattern::Lexer - RuboCop::AST::NodePattern::Parser::Racc_arg = T.let(T.unsafe(nil), Array) - RuboCop::AST::NodePattern::Parser::Racc_token_to_s_table = T.let(T.unsafe(nil), Array) class RuboCop::AST::NodePattern::Parser::WithMeta < ::RuboCop::AST::NodePattern::Parser @@ -1342,301 +1618,163 @@ module RuboCop::AST::NodePattern::Sets end RuboCop::AST::NodePattern::Sets::MAX = T.let(T.unsafe(nil), Integer) - RuboCop::AST::NodePattern::Sets::REGISTRY = T.let(T.unsafe(nil), Hash) - RuboCop::AST::NodePattern::Sets::SET_0_1 = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_0_1_2 = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_10_10 = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_1_1 = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_1_2 = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_ABSTRACT_OVERRIDE_OVERRIDABLE_ETC = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_ADD_DEPENDENCY_ADD_RUNTIME_DEPENDENCY_ADD_DEVELOPMENT_DEPENDENCY = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_AFTER_ACTION_APPEND_AFTER_ACTION_APPEND_AROUND_ACTION_ETC = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_ALL_CONTEXT = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_AND_RETURN_AND_RAISE_AND_THROW_ETC = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_ANY_ALL_NORETURN_ETC = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_AP_P_PP_ETC = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_ATTR_READER_ATTR_WRITER_ATTR_ACCESSOR = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_ATTR_READER_ATTR_WRITER_ATTR_ACCESSOR_ATTR = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_BACKGROUND_SCENARIO_XSCENARIO_ETC = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_BEFORE_AFTER = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_BELONGS_TO_HAS_ONE_HAS_MANY_HAS_AND_BELONGS_TO_MANY = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_BE_EQ_EQL_EQUAL = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_BE_TRUTHY_BE_FALSEY_BE_FALSY_ETC = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_BINWRITE_SYSWRITE_WRITE_WRITE_NONBLOCK = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_CALLER_CALLER_LOCATIONS = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_CALL_RUN = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_CAPTURE2_CAPTURE2E_CAPTURE3_ETC = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_CIPHER_DIGEST = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_CLASS_EVAL_INSTANCE_EVAL = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_CLASS_EVAL_MODULE_EVAL = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_CLASS_MODULE = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_CLASS_MODULE_STRUCT = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_CONSTANTIZE_CONSTANTS_CONST_GET = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_CONTEXT_SHARED_CONTEXT = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_COUNT_LENGTH_SIZE = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_CREATED_AT_UPDATED_AT = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_CREATED_AT_UPDATED_AT_2 = T.let(T.unsafe(nil), Set) - +RuboCop::AST::NodePattern::Sets::SET_DEFINE_METHOD = T.let(T.unsafe(nil), Set) RuboCop::AST::NodePattern::Sets::SET_DEFINE_METHOD_DEFINE_SINGLETON_METHOD = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_DESCRIBE_FEATURE = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_DOUBLE_SPY = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_DOWNCASE_UPCASE = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_EACH_EXAMPLE = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_EACH_WITH_INDEX_WITH_INDEX = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_EACH_WITH_OBJECT_WITH_OBJECT = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_ENUMERATOR_RATIONAL_COMPLEX_THREAD = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_ESCAPE_ENCODE_UNESCAPE_DECODE = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_EXACTLY_AT_LEAST_AT_MOST = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_EXECUTE_REMOVE_BELONGS_TO = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_EXPECT_ALLOW = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_FACTORYGIRL_FACTORYBOT = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_FIRST_LAST__ETC = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_FIRST_TAKE = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_FIXNUM_BIGNUM = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_FLATTEN_FLATTEN = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_FORMAT_SPRINTF_PRINTF = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_GEMCUTTER_RUBYGEMS_RUBYFORGE = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_GET_POST_PUT_ETC = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_GSUB_GSUB = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_GSUB_GSUB_SUB_SUB = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_HAS_MANY_HAS_ONE = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_HAS_MANY_HAS_ONE_BELONGS_TO = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_INCLUDE_EXTEND_PREPEND = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_INCLUDE_MEMBER = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_INSERT_INSERT = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_INSTANCE_EVAL_CLASS_EVAL_MODULE_EVAL = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_INSTANCE_EXEC_CLASS_EXEC_MODULE_EXEC = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_IO_FILE = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_IS_EXPECTED_SHOULD_SHOULD_NOT = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_KEYS_VALUES = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_KEY_HAS_KEY_FETCH_ETC = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_LAST_FIRST = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_LENGTH_SIZE = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_LOAD_RESTORE = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_MAP_COLLECT = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_MATCH_MATCH = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_MATCH__MATCH = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_NEW_COMPILE = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_NEW_OPEN = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_NIL_ = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_ONLY_EXCEPT = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_PIPELINE_PIPELINE_R_PIPELINE_RW_ETC = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_PRIVATE_PROTECTED = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_PRIVATE_PROTECTED_PUBLIC = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_PROC_LAMBDA = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_PROP_CONST = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_PUBLIC_CONSTANT_PRIVATE_CONSTANT = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_PUBLIC_PROTECTED_PRIVATE_MODULE_FUNCTION = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_RAISE_ERROR_RAISE_EXCEPTION = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_RAISE_FAIL = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_RAISE_FAIL_THROW_ETC = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_RECEIVE_HAVE_RECEIVED = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_RECEIVE_MESSAGE_CHAIN_STUB_CHAIN = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_RECEIVE_RECEIVE_MESSAGES_RECEIVE_MESSAGE_CHAIN_HAVE_RECEIVED = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_RECEIVE_RECEIVE_MESSAGE_CHAIN = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_REDUCE_INJECT = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_REFERER_REFERRER = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_REJECT_REJECT = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_RENDER_REDIRECT_TO = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_REQUIRE_REQUIRE_RELATIVE = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_RETURNING_UNIQUE_BY = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_SELECT_FILTER_FIND_ALL_REJECT = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_SELECT_SELECT = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_SEND_PUBLIC_SEND___SEND__ = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_SHOULD_SHOULD_NOT = T.let(T.unsafe(nil), Set) - -RuboCop::AST::NodePattern::Sets::SET_SINCE_FROM_NOW_AFTER_ETC = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_SKIP_AFTER_ACTION_SKIP_AROUND_ACTION_SKIP_BEFORE_ACTION_SKIP_ACTION_CALLBACK = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_SKIP_PENDING = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_SORT_BY_SORT = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_SORT_MIN_MAX = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_SPAWN_SYSTEM = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_SPRINTF_FORMAT = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_START_WITH_END_WITH = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_START_WITH_STARTS_WITH_END_WITH_ENDS_WITH = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_STRUCT_CLASS = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_SUCC_PRED_NEXT = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_TEMPFILE_STRINGIO = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_TO_ENUM_ENUM_FOR = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_TO_I_TO_F_TO_C = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_TRANSLATE_LOCALIZE = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_TRUE_FALSE = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_TRY_TRY = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_TYPE_TEMPLATE_TYPE_MEMBER = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_UNIQ_DISTINCT = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET_ZERO_POSITIVE_NEGATIVE = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET__ = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET__AT_SLICE = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET__EQUAL_EQL = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET__GLOB = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET___ = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET___2 = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET___3 = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET___4 = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET___5 = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET___6 = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET___7 = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET___8 = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET___EQL = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET___METHOD_____CALLEE__ = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET____ = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET____ETC = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET____ETC_2 = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::Sets::SET____ETC_3 = T.let(T.unsafe(nil), Set) - RuboCop::AST::NodePattern::VAR = T.let(T.unsafe(nil), String) module RuboCop::AST::NumericNode def sign?; end end +RuboCop::AST::NumericNode::SIGN_REGEX = T.let(T.unsafe(nil), Regexp) + class RuboCop::AST::OrNode < ::RuboCop::AST::Node - include(::RuboCop::AST::BinaryOperatorNode) - include(::RuboCop::AST::PredicateOperatorNode) + include ::RuboCop::AST::BinaryOperatorNode + include ::RuboCop::AST::PredicateOperatorNode def alternate_operator; end def inverse_operator; end end class RuboCop::AST::PairNode < ::RuboCop::AST::Node - include(::RuboCop::AST::HashElementNode) + include ::RuboCop::AST::HashElementNode def colon?; end def delimiter(*deprecated, with_spacing: T.unsafe(nil)); end @@ -1645,6 +1783,11 @@ class RuboCop::AST::PairNode < ::RuboCop::AST::Node def value_on_new_line?; end end +RuboCop::AST::PairNode::COLON = T.let(T.unsafe(nil), String) +RuboCop::AST::PairNode::HASH_ROCKET = T.let(T.unsafe(nil), String) +RuboCop::AST::PairNode::SPACED_COLON = T.let(T.unsafe(nil), String) +RuboCop::AST::PairNode::SPACED_HASH_ROCKET = T.let(T.unsafe(nil), String) + module RuboCop::AST::ParameterizedNode def arguments?; end def block_argument?; end @@ -1656,7 +1799,7 @@ module RuboCop::AST::ParameterizedNode end module RuboCop::AST::ParameterizedNode::RestArguments - include(::RuboCop::AST::ParameterizedNode) + include ::RuboCop::AST::ParameterizedNode def arguments; end def arguments?; end @@ -1665,7 +1808,7 @@ module RuboCop::AST::ParameterizedNode::RestArguments end module RuboCop::AST::ParameterizedNode::WrappedArguments - include(::RuboCop::AST::ParameterizedNode) + include ::RuboCop::AST::ParameterizedNode def arguments; end end @@ -1676,12 +1819,17 @@ module RuboCop::AST::PredicateOperatorNode def semantic_operator?; end end +RuboCop::AST::PredicateOperatorNode::LOGICAL_AND = T.let(T.unsafe(nil), String) +RuboCop::AST::PredicateOperatorNode::LOGICAL_OR = T.let(T.unsafe(nil), String) +RuboCop::AST::PredicateOperatorNode::SEMANTIC_AND = T.let(T.unsafe(nil), String) +RuboCop::AST::PredicateOperatorNode::SEMANTIC_OR = T.let(T.unsafe(nil), String) + class RuboCop::AST::Procarg0Node < ::RuboCop::AST::ArgNode def name; end end class RuboCop::AST::ProcessedSource - include(::RuboCop::Ext::ProcessedSource) + include ::RuboCop::Ext::ProcessedSource def initialize(source, ruby_version, path = T.unsafe(nil)); end @@ -1737,6 +1885,7 @@ class RuboCop::AST::ProcessedSource end end +RuboCop::AST::ProcessedSource::INVALID_LEVELS = T.let(T.unsafe(nil), Array) RuboCop::AST::ProcessedSource::STRING_SOURCE_NAME = T.let(T.unsafe(nil), String) class RuboCop::AST::RangeNode < ::RuboCop::AST::Node @@ -1745,7 +1894,7 @@ class RuboCop::AST::RangeNode < ::RuboCop::AST::Node end class RuboCop::AST::RegexpNode < ::RuboCop::AST::Node - include(::RuboCop::Ext::RegexpNode) + include ::RuboCop::Ext::RegexpNode def content; end def delimiter?(char); end @@ -1767,6 +1916,8 @@ class RuboCop::AST::RegexpNode < ::RuboCop::AST::Node def regopt_include?(option); end end +RuboCop::AST::RegexpNode::OPTIONS = T.let(T.unsafe(nil), Hash) + class RuboCop::AST::ResbodyNode < ::RuboCop::AST::Node def body; end def branch_index; end @@ -1783,8 +1934,8 @@ class RuboCop::AST::RescueNode < ::RuboCop::AST::Node end class RuboCop::AST::ReturnNode < ::RuboCop::AST::Node - include(::RuboCop::AST::ParameterizedNode) - include(::RuboCop::AST::ParameterizedNode::WrappedArguments) + include ::RuboCop::AST::ParameterizedNode + include ::RuboCop::AST::ParameterizedNode::WrappedArguments end module RuboCop::AST::RuboCopCompatibility @@ -1799,10 +1950,10 @@ class RuboCop::AST::SelfClassNode < ::RuboCop::AST::Node end class RuboCop::AST::SendNode < ::RuboCop::AST::Node - include(::RuboCop::AST::ParameterizedNode) - include(::RuboCop::AST::ParameterizedNode::RestArguments) - include(::RuboCop::AST::MethodIdentifierPredicates) - include(::RuboCop::AST::MethodDispatchNode) + include ::RuboCop::AST::ParameterizedNode + include ::RuboCop::AST::ParameterizedNode::RestArguments + include ::RuboCop::AST::MethodIdentifierPredicates + include ::RuboCop::AST::MethodDispatchNode def attribute_accessor?(param0 = T.unsafe(nil)); end @@ -1816,22 +1967,22 @@ module RuboCop::AST::Sexp end class RuboCop::AST::StrNode < ::RuboCop::AST::Node - include(::RuboCop::AST::BasicLiteralNode) + include ::RuboCop::AST::BasicLiteralNode def heredoc?; end end class RuboCop::AST::SuperNode < ::RuboCop::AST::Node - include(::RuboCop::AST::ParameterizedNode) - include(::RuboCop::AST::MethodIdentifierPredicates) - include(::RuboCop::AST::MethodDispatchNode) + include ::RuboCop::AST::ParameterizedNode + include ::RuboCop::AST::MethodIdentifierPredicates + include ::RuboCop::AST::MethodDispatchNode def arguments; end def node_parts; end end class RuboCop::AST::SymbolNode < ::RuboCop::AST::Node - include(::RuboCop::AST::BasicLiteralNode) + include ::RuboCop::AST::BasicLiteralNode end class RuboCop::AST::Token @@ -1869,6 +2020,8 @@ class RuboCop::AST::Token end module RuboCop::AST::Traversal + extend ::RuboCop::AST::Traversal::CallbackCompiler + def on_(node); end def on___ENCODING__(node); end def on___FILE__(node); end @@ -2000,23 +2153,28 @@ module RuboCop::AST::Traversal def walk(node); end end -class RuboCop::AST::Traversal::DebugError < ::RuntimeError +module RuboCop::AST::Traversal::CallbackCompiler + def arity_check(range); end + def body(signature, prelude); end + def def_callback(type, *signature, arity: T.unsafe(nil), arity_check: T.unsafe(nil), body: T.unsafe(nil)); end end +RuboCop::AST::Traversal::CallbackCompiler::SEND = T.let(T.unsafe(nil), String) +RuboCop::AST::Traversal::CallbackCompiler::TEMPLATE = T.let(T.unsafe(nil), Hash) +class RuboCop::AST::Traversal::DebugError < ::RuntimeError; end +RuboCop::AST::Traversal::NO_CHILD_NODES = T.let(T.unsafe(nil), Set) RuboCop::AST::Traversal::TYPE_TO_METHOD = T.let(T.unsafe(nil), Hash) class RuboCop::AST::UntilNode < ::RuboCop::AST::Node - include(::RuboCop::AST::ConditionalNode) - include(::RuboCop::AST::ModifierNode) + include ::RuboCop::AST::ConditionalNode + include ::RuboCop::AST::ModifierNode def do?; end def inverse_keyword; end def keyword; end end -module RuboCop::AST::Version -end - +module RuboCop::AST::Version; end RuboCop::AST::Version::STRING = T.let(T.unsafe(nil), String) class RuboCop::AST::WhenNode < ::RuboCop::AST::Node @@ -2028,29 +2186,23 @@ class RuboCop::AST::WhenNode < ::RuboCop::AST::Node end class RuboCop::AST::WhileNode < ::RuboCop::AST::Node - include(::RuboCop::AST::ConditionalNode) - include(::RuboCop::AST::ModifierNode) + include ::RuboCop::AST::ConditionalNode + include ::RuboCop::AST::ModifierNode def do?; end def inverse_keyword; end def keyword; end end class RuboCop::AST::YieldNode < ::RuboCop::AST::Node - include(::RuboCop::AST::ParameterizedNode) - include(::RuboCop::AST::MethodIdentifierPredicates) - include(::RuboCop::AST::MethodDispatchNode) + include ::RuboCop::AST::ParameterizedNode + include ::RuboCop::AST::MethodIdentifierPredicates + include ::RuboCop::AST::MethodDispatchNode def arguments; end def node_parts; end end RuboCop::NodePattern = RuboCop::AST::NodePattern - RuboCop::ProcessedSource = RuboCop::AST::ProcessedSource - RuboCop::Token = RuboCop::AST::Token - -RuboCop::AST::Traversal::CallbackCompiler::SEND = T.let(T.unsafe(nil), String) - -RuboCop::AST::Traversal::CallbackCompiler::TEMPLATE = T.let(T.unsafe(nil), Hash)
true
Other
Homebrew
brew
d2b74b3e21e8be9422cb92a90ada9814729156f8.json
Update RBI files for rubocop-ast.
Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi
@@ -26784,7 +26784,6 @@ end module RuboCop::AST::NodePattern::Sets SET_BUILD_RECOMMENDED_TEST_OPTIONAL = ::T.let(nil, ::T.untyped) - SET_DEFINE_METHOD = ::T.let(nil, ::T.untyped) SET_DEPENDS_ON_USES_FROM_MACOS = ::T.let(nil, ::T.untyped) SET_INCLUDE_WITH_WITHOUT = ::T.let(nil, ::T.untyped) SET_SYSTEM_SHELL_OUTPUT_PIPE_OUTPUT = ::T.let(nil, ::T.untyped)
true
Other
Homebrew
brew
3e70d7becc27035144f20b5ae8b21278ded3aa50.json
Update RBI files for nokogiri.
Library/Homebrew/sorbet/rbi/gems/nokogiri@1.11.6.rbi
@@ -119,13 +119,9 @@ class Nokogiri::CSS::Parser < ::Racc::Parser end Nokogiri::CSS::Parser::CACHE_SWITCH_NAME = T.let(T.unsafe(nil), Symbol) - Nokogiri::CSS::Parser::Racc_arg = T.let(T.unsafe(nil), Array) - Nokogiri::CSS::Parser::Racc_token_to_s_table = T.let(T.unsafe(nil), Array) - -class Nokogiri::CSS::SyntaxError < ::Nokogiri::SyntaxError -end +class Nokogiri::CSS::SyntaxError < ::Nokogiri::SyntaxError; end class Nokogiri::CSS::Tokenizer def _next_token; end @@ -142,8 +138,7 @@ class Nokogiri::CSS::Tokenizer def state=(_arg0); end end -class Nokogiri::CSS::Tokenizer::ScanError < ::StandardError -end +class Nokogiri::CSS::Tokenizer::ScanError < ::StandardError; end class Nokogiri::CSS::XPathVisitor def accept(node); end @@ -172,21 +167,18 @@ class Nokogiri::CSS::XPathVisitor end class Nokogiri::CSS::XPathVisitorAlwaysUseBuiltins < ::Nokogiri::CSS::XPathVisitor - private def css_class(hay, needle); end end class Nokogiri::CSS::XPathVisitorOptimallyUseBuiltins < ::Nokogiri::CSS::XPathVisitor - private def css_class(hay, needle); end end -module Nokogiri::Decorators -end +module Nokogiri::Decorators; end module Nokogiri::Decorators::Slop def method_missing(name, *args, &block); end @@ -312,235 +304,123 @@ class Nokogiri::HTML::ElementDescription end Nokogiri::HTML::ElementDescription::ACTION_ATTR = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::ALIGN_ATTR = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::ALT_ATTR = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::APPLET_ATTRS = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::AREA_ATTRS = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::ATTRS = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::A_ATTRS = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::BASEFONT_ATTRS = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::BGCOLOR_ATTR = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::BLOCK = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::BLOCKLI_ELT = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::BODY_ATTRS = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::BODY_CONTENTS = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::BODY_DEPR = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::BUTTON_ATTRS = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::CELLHALIGN = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::CELLVALIGN = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::CLEAR_ATTRS = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::COL_ATTRS = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::COL_ELT = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::COMPACT_ATTR = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::COMPACT_ATTRS = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::CONTENT_ATTR = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::COREATTRS = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::CORE_ATTRS = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::CORE_I18N_ATTRS = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::DIR_ATTR = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::DL_CONTENTS = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::DefaultDescriptions = T.let(T.unsafe(nil), Hash) - Nokogiri::HTML::ElementDescription::Desc = Struct - Nokogiri::HTML::ElementDescription::EDIT_ATTRS = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::EMBED_ATTRS = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::EMPTY = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::EVENTS = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::FIELDSET_CONTENTS = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::FLOW = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::FLOW_PARAM = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::FONTSTYLE = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::FONT_ATTRS = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::FORMCTRL = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::FORM_ATTRS = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::FORM_CONTENTS = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::FRAMESET_ATTRS = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::FRAMESET_CONTENTS = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::FRAME_ATTRS = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::HEADING = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::HEAD_ATTRS = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::HEAD_CONTENTS = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::HREF_ATTRS = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::HR_DEPR = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::HTML_ATTRS = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::HTML_CDATA = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::HTML_CONTENT = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::HTML_FLOW = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::HTML_INLINE = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::HTML_PCDATA = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::I18N = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::I18N_ATTRS = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::IFRAME_ATTRS = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::IMG_ATTRS = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::INLINE = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::INLINE_P = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::INPUT_ATTRS = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::LABEL_ATTR = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::LABEL_ATTRS = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::LANGUAGE_ATTR = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::LEGEND_ATTRS = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::LINK_ATTRS = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::LIST = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::LI_ELT = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::MAP_CONTENTS = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::META_ATTRS = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::MODIFIER = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::NAME_ATTR = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::NOFRAMES_CONTENT = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::OBJECT_ATTRS = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::OBJECT_CONTENTS = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::OBJECT_DEPR = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::OL_ATTRS = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::OPTGROUP_ATTRS = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::OPTION_ATTRS = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::OPTION_ELT = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::PARAM_ATTRS = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::PCDATA = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::PHRASE = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::PRE_CONTENT = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::PROMPT_ATTRS = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::QUOTE_ATTRS = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::ROWS_COLS_ATTR = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::SCRIPT_ATTRS = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::SELECT_ATTRS = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::SELECT_CONTENT = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::SPECIAL = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::SRC_ALT_ATTRS = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::STYLE_ATTRS = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::TABLE_ATTRS = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::TABLE_CONTENTS = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::TABLE_DEPR = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::TALIGN_ATTRS = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::TARGET_ATTR = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::TEXTAREA_ATTRS = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::TH_TD_ATTR = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::TH_TD_DEPR = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::TR_CONTENTS = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::TR_ELT = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::TYPE_ATTR = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::UL_DEPR = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::VERSION_ATTR = T.let(T.unsafe(nil), Array) - Nokogiri::HTML::ElementDescription::WIDTH_ATTR = T.let(T.unsafe(nil), Array) - -class Nokogiri::HTML::EntityDescription < ::Struct -end +class Nokogiri::HTML::EntityDescription < ::Struct; end class Nokogiri::HTML::EntityLookup def [](name); end def get(_arg0); end end Nokogiri::HTML::NamedCharacters = T.let(T.unsafe(nil), Nokogiri::HTML::EntityLookup) - -module Nokogiri::HTML::SAX -end +module Nokogiri::HTML::SAX; end class Nokogiri::HTML::SAX::Parser < ::Nokogiri::XML::SAX::Parser def parse_file(filename, encoding = T.unsafe(nil)); end @@ -574,29 +454,17 @@ class Nokogiri::HTML::SAX::PushParser < ::Nokogiri::XML::SAX::PushParser end Nokogiri::LIBXML2_PATCHES = T.let(T.unsafe(nil), Array) - Nokogiri::LIBXML_COMPILED_VERSION = T.let(T.unsafe(nil), String) - Nokogiri::LIBXML_ICONV_ENABLED = T.let(T.unsafe(nil), TrueClass) - Nokogiri::LIBXML_LOADED_VERSION = T.let(T.unsafe(nil), String) - Nokogiri::LIBXML_MEMORY_MANAGEMENT = T.let(T.unsafe(nil), String) - Nokogiri::LIBXSLT_COMPILED_VERSION = T.let(T.unsafe(nil), String) - Nokogiri::LIBXSLT_LOADED_VERSION = T.let(T.unsafe(nil), String) - Nokogiri::LIBXSLT_PATCHES = T.let(T.unsafe(nil), Array) - Nokogiri::OTHER_LIBRARY_VERSIONS = T.let(T.unsafe(nil), String) - Nokogiri::PACKAGED_LIBRARIES = T.let(T.unsafe(nil), TrueClass) - Nokogiri::PRECOMPILED_LIBRARIES = T.let(T.unsafe(nil), TrueClass) - -class Nokogiri::SyntaxError < ::StandardError -end +class Nokogiri::SyntaxError < ::StandardError; end module Nokogiri::Test class << self @@ -605,12 +473,11 @@ module Nokogiri::Test end Nokogiri::VERSION = T.let(T.unsafe(nil), String) - Nokogiri::VERSION_INFO = T.let(T.unsafe(nil), Hash) class Nokogiri::VersionInfo - include(::Singleton) - extend(::Singleton::SingletonClassMethods) + include ::Singleton + extend ::Singleton::SingletonClassMethods def compiled_libxml_version; end def compiled_libxslt_version; end @@ -711,7 +578,7 @@ class Nokogiri::XML::CDATA < ::Nokogiri::XML::Text end class Nokogiri::XML::CharacterData < ::Nokogiri::XML::Node - include(::Nokogiri::XML::PP::CharacterData) + include ::Nokogiri::XML::PP::CharacterData end class Nokogiri::XML::Comment < ::Nokogiri::XML::CharacterData @@ -781,11 +648,8 @@ class Nokogiri::XML::Document < ::Nokogiri::XML::Node end Nokogiri::XML::Document::IMPLIED_XPATH_CONTEXTS = T.let(T.unsafe(nil), Array) - Nokogiri::XML::Document::NCNAME_CHAR = T.let(T.unsafe(nil), String) - Nokogiri::XML::Document::NCNAME_RE = T.let(T.unsafe(nil), Regexp) - Nokogiri::XML::Document::NCNAME_START_CHAR = T.let(T.unsafe(nil), String) class Nokogiri::XML::DocumentFragment < ::Nokogiri::XML::Node @@ -814,8 +678,7 @@ class Nokogiri::XML::DocumentFragment < ::Nokogiri::XML::Node end end -class Nokogiri::XML::Element < ::Nokogiri::XML::Node -end +class Nokogiri::XML::Element < ::Nokogiri::XML::Node; end class Nokogiri::XML::ElementContent def children; end @@ -832,19 +695,12 @@ class Nokogiri::XML::ElementContent end Nokogiri::XML::ElementContent::ELEMENT = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::ElementContent::MULT = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::ElementContent::ONCE = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::ElementContent::OPT = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::ElementContent::OR = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::ElementContent::PCDATA = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::ElementContent::PLUS = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::ElementContent::SEQ = T.let(T.unsafe(nil), Integer) class Nokogiri::XML::ElementDecl < ::Nokogiri::XML::Node @@ -868,15 +724,10 @@ class Nokogiri::XML::EntityDecl < ::Nokogiri::XML::Node end Nokogiri::XML::EntityDecl::EXTERNAL_GENERAL_PARSED = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::EntityDecl::EXTERNAL_GENERAL_UNPARSED = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::EntityDecl::EXTERNAL_PARAMETER = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::EntityDecl::INTERNAL_GENERAL = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::EntityDecl::INTERNAL_PARAMETER = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::EntityDecl::INTERNAL_PREDEFINED = T.let(T.unsafe(nil), Integer) class Nokogiri::XML::EntityReference < ::Nokogiri::XML::Node @@ -889,7 +740,7 @@ class Nokogiri::XML::EntityReference < ::Nokogiri::XML::Node end class Nokogiri::XML::Namespace - include(::Nokogiri::XML::PP::Node) + include ::Nokogiri::XML::PP::Node def document; end def href; end @@ -901,9 +752,9 @@ class Nokogiri::XML::Namespace end class Nokogiri::XML::Node - include(::Nokogiri::XML::PP::Node) - include(::Nokogiri::XML::Searchable) - include(::Enumerable) + include ::Nokogiri::XML::PP::Node + include ::Nokogiri::XML::Searchable + include ::Enumerable def initialize(name, document); end @@ -1065,41 +916,23 @@ class Nokogiri::XML::Node end Nokogiri::XML::Node::ATTRIBUTE_DECL = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::Node::ATTRIBUTE_NODE = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::Node::CDATA_SECTION_NODE = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::Node::COMMENT_NODE = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::Node::DOCB_DOCUMENT_NODE = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::Node::DOCUMENT_FRAG_NODE = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::Node::DOCUMENT_NODE = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::Node::DOCUMENT_TYPE_NODE = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::Node::DTD_NODE = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::Node::ELEMENT_DECL = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::Node::ELEMENT_NODE = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::Node::ENTITY_DECL = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::Node::ENTITY_NODE = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::Node::ENTITY_REF_NODE = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::Node::HTML_DOCUMENT_NODE = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::Node::IMPLIED_XPATH_CONTEXTS = T.let(T.unsafe(nil), Array) - Nokogiri::XML::Node::NAMESPACE_DECL = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::Node::NOTATION_NODE = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::Node::PI_NODE = T.let(T.unsafe(nil), Integer) class Nokogiri::XML::Node::SaveOptions @@ -1130,34 +963,22 @@ class Nokogiri::XML::Node::SaveOptions end Nokogiri::XML::Node::SaveOptions::AS_HTML = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::Node::SaveOptions::AS_XHTML = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::Node::SaveOptions::AS_XML = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::Node::SaveOptions::DEFAULT_HTML = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::Node::SaveOptions::DEFAULT_XHTML = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::Node::SaveOptions::DEFAULT_XML = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::Node::SaveOptions::FORMAT = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::Node::SaveOptions::NO_DECLARATION = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::Node::SaveOptions::NO_EMPTY_TAGS = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::Node::SaveOptions::NO_XHTML = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::Node::TEXT_NODE = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::Node::XINCLUDE_END = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::Node::XINCLUDE_START = T.let(T.unsafe(nil), Integer) class Nokogiri::XML::NodeSet - include(::Nokogiri::XML::Searchable) - include(::Enumerable) + include ::Nokogiri::XML::Searchable + include ::Enumerable def initialize(document, list = T.unsafe(nil)); end @@ -1219,12 +1040,8 @@ class Nokogiri::XML::NodeSet end Nokogiri::XML::NodeSet::IMPLIED_XPATH_CONTEXTS = T.let(T.unsafe(nil), Array) - -class Nokogiri::XML::Notation < ::Struct -end - -module Nokogiri::XML::PP -end +class Nokogiri::XML::Notation < ::Struct; end +module Nokogiri::XML::PP; end module Nokogiri::XML::PP::CharacterData def inspect; end @@ -1318,51 +1135,28 @@ class Nokogiri::XML::ParseOptions end Nokogiri::XML::ParseOptions::COMPACT = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::ParseOptions::DEFAULT_HTML = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::ParseOptions::DEFAULT_SCHEMA = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::ParseOptions::DEFAULT_XML = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::ParseOptions::DTDATTR = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::ParseOptions::DTDLOAD = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::ParseOptions::DTDVALID = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::ParseOptions::HUGE = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::ParseOptions::NOBASEFIX = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::ParseOptions::NOBLANKS = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::ParseOptions::NOCDATA = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::ParseOptions::NODICT = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::ParseOptions::NOENT = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::ParseOptions::NOERROR = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::ParseOptions::NONET = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::ParseOptions::NOWARNING = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::ParseOptions::NOXINCNODE = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::ParseOptions::NSCLEAN = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::ParseOptions::OLD10 = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::ParseOptions::PEDANTIC = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::ParseOptions::RECOVER = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::ParseOptions::SAX1 = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::ParseOptions::STRICT = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::ParseOptions::XINCLUDE = T.let(T.unsafe(nil), Integer) class Nokogiri::XML::ProcessingInstruction < ::Nokogiri::XML::Node @@ -1374,7 +1168,7 @@ class Nokogiri::XML::ProcessingInstruction < ::Nokogiri::XML::Node end class Nokogiri::XML::Reader - include(::Enumerable) + include ::Enumerable def initialize(source, url = T.unsafe(nil), encoding = T.unsafe(nil)); end @@ -1416,43 +1210,25 @@ class Nokogiri::XML::Reader end Nokogiri::XML::Reader::TYPE_ATTRIBUTE = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::Reader::TYPE_CDATA = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::Reader::TYPE_COMMENT = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::Reader::TYPE_DOCUMENT = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::Reader::TYPE_DOCUMENT_FRAGMENT = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::Reader::TYPE_DOCUMENT_TYPE = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::Reader::TYPE_ELEMENT = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::Reader::TYPE_END_ELEMENT = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::Reader::TYPE_END_ENTITY = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::Reader::TYPE_ENTITY = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::Reader::TYPE_ENTITY_REFERENCE = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::Reader::TYPE_NONE = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::Reader::TYPE_NOTATION = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::Reader::TYPE_PROCESSING_INSTRUCTION = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::Reader::TYPE_SIGNIFICANT_WHITESPACE = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::Reader::TYPE_TEXT = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::Reader::TYPE_WHITESPACE = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::Reader::TYPE_XML_DECLARATION = T.let(T.unsafe(nil), Integer) class Nokogiri::XML::RelaxNG < ::Nokogiri::XML::Schema - private def validate_document(_arg0); end @@ -1463,8 +1239,7 @@ class Nokogiri::XML::RelaxNG < ::Nokogiri::XML::Schema end end -module Nokogiri::XML::SAX -end +module Nokogiri::XML::SAX; end class Nokogiri::XML::SAX::Document def cdata_block(string); end @@ -1499,9 +1274,7 @@ class Nokogiri::XML::SAX::Parser def check_encoding(encoding); end end -class Nokogiri::XML::SAX::Parser::Attribute < ::Struct -end - +class Nokogiri::XML::SAX::Parser::Attribute < ::Struct; end Nokogiri::XML::SAX::Parser::ENCODINGS = T.let(T.unsafe(nil), Hash) class Nokogiri::XML::SAX::ParserContext @@ -1615,13 +1388,9 @@ class Nokogiri::XML::Text < ::Nokogiri::XML::CharacterData end Nokogiri::XML::XML_C14N_1_0 = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::XML_C14N_1_1 = T.let(T.unsafe(nil), Integer) - Nokogiri::XML::XML_C14N_EXCLUSIVE_1_0 = T.let(T.unsafe(nil), Integer) - -module Nokogiri::XML::XPath -end +module Nokogiri::XML::XPath; end class Nokogiri::XML::XPath::SyntaxError < ::Nokogiri::XML::SyntaxError def to_s; end
false
Other
Homebrew
brew
bf64de2ad690aca471b41442eea18e4a6dbc8ab8.json
Update RBI files for tapioca.
Library/Homebrew/sorbet/rbi/gems/tapioca@0.4.23.rbi
@@ -870,6 +870,9 @@ class Tapioca::Compilers::SymbolTable::SymbolGenerator sig { params(tree: Tapioca::RBI::Tree, symbol: String).void } def generate_from_symbol(tree, symbol); end + sig { params(constant: T.all(Module, T::Generic)).returns(String) } + def generic_name_of(constant); end + sig { params(constant: Module).returns(T::Array[String]) } def get_file_candidates(constant); end @@ -1109,6 +1112,9 @@ class Tapioca::Gemfile::Gem private + sig { returns(T::Boolean) } + def default_gem?; end + sig { returns(T::Boolean) } def gem_ignored?; end @@ -1121,6 +1127,9 @@ class Tapioca::Gemfile::Gem sig { params(path: String).returns(T::Boolean) } def has_parent_gemspec?(path); end + sig { returns(Pathname) } + def ruby_lib_dir; end + sig { params(path: T.any(Pathname, String)).returns(String) } def to_realpath(path); end
false
Other
Homebrew
brew
3ce5737425488d0199a0146af7d85ae448221a13.json
service: ensure environment variables are strings
Library/Homebrew/service.rb
@@ -135,13 +135,11 @@ def run_type(type = nil) end end - sig { params(variables: T.nilable(T::Hash[String, String])).returns(T.nilable(T::Hash[String, String])) } + sig { params(variables: T::Hash[String, String]).returns(T.nilable(T::Hash[String, String])) } def environment_variables(variables = {}) case T.unsafe(variables) - when nil - @environment_variables when Hash - @environment_variables = variables + @environment_variables = variables.transform_values(&:to_s) else raise TypeError, "Service#environment_variables expects a hash" end
true
Other
Homebrew
brew
3ce5737425488d0199a0146af7d85ae448221a13.json
service: ensure environment variables are strings
Library/Homebrew/test/service_spec.rb
@@ -69,7 +69,7 @@ f.class.service do run [opt_bin/"beanstalkd", "test"] run_type :immediate - environment_variables PATH: std_service_path_env, FOO: "BAR" + environment_variables PATH: std_service_path_env, FOO: "BAR", ETC_DIR: etc/"beanstalkd" error_log_path var/"log/beanstalkd.error.log" log_path var/"log/beanstalkd.log" input_path var/"in/beanstalkd" @@ -88,6 +88,8 @@ <dict> \t<key>EnvironmentVariables</key> \t<dict> + \t\t<key>ETC_DIR</key> + \t\t<string>#{HOMEBREW_PREFIX}/etc/beanstalkd</string> \t\t<key>FOO</key> \t\t<string>BAR</string> \t\t<key>PATH</key>
true
Other
Homebrew
brew
e29b2caee03a2749c976e08ab99bfc137747e535.json
service: define paths as expecting Pathname or string Co-authored-by: Rylan Polster <rslpolster@gmail.com>
Library/Homebrew/service.rb
@@ -55,7 +55,7 @@ def root_dir(path = nil) when String, Pathname @root_dir = path.to_s else - raise TypeError, "Service#root_dir expects a String" + raise TypeError, "Service#root_dir expects a String or Pathname" end end @@ -67,7 +67,7 @@ def input_path(path = nil) when String, Pathname @input_path = path.to_s else - raise TypeError, "Service#input_path expects a String" + raise TypeError, "Service#input_path expects a String or Pathname" end end
false
Other
Homebrew
brew
b81a522230b8166d0a5409095ab43d2cae75bbb8.json
Add tests for `to_latest_kegs`
Library/Homebrew/test/cli/named_args_spec.rb
@@ -218,6 +218,24 @@ def setup_unredable_cask(name) end end + describe "#to_latest_kegs" do + before do + (HOMEBREW_CELLAR/"foo/1.0").mkpath + (HOMEBREW_CELLAR/"foo/2.0").mkpath + (HOMEBREW_CELLAR/"bar/1.0").mkpath + end + + it "resolves the latest kegs with #resolve_latest_keg" do + latest_kegs = described_class.new("foo", "bar").to_latest_kegs + expect(latest_kegs.map(&:name)).to eq ["foo", "bar"] + expect(latest_kegs.map { |k| k.version.version.to_s }).to eq ["2.0", "1.0"] + end + + it "when there are no matching kegs returns an empty array" do + expect(described_class.new.to_latest_kegs).to be_empty + end + end + describe "#to_kegs_to_casks" do before do (HOMEBREW_CELLAR/"foo/1.0").mkpath
false
Other
Homebrew
brew
fceaa2bb74d7beac30afe5fcf21c4d10e8ef53fa.json
Service: add additional options
Library/Homebrew/service.rb
@@ -47,6 +47,30 @@ def working_dir(path = nil) end end + sig { params(path: T.nilable(T.any(String, Pathname))).returns(T.nilable(String)) } + def root_dir(path = nil) + case T.unsafe(path) + when nil + @root_dir + when String, Pathname + @root_dir = path.to_s + else + raise TypeError, "Service#root_dir expects a String" + end + end + + sig { params(path: T.nilable(T.any(String, Pathname))).returns(T.nilable(String)) } + def input_path(path = nil) + case T.unsafe(path) + when nil + @input_path + when String, Pathname + @input_path = path.to_s + else + raise TypeError, "Service#input_path expects a String" + end + end + sig { params(path: T.nilable(T.any(String, Pathname))).returns(T.nilable(String)) } def log_path(path = nil) case T.unsafe(path) @@ -83,6 +107,18 @@ def keep_alive(value = nil) end end + sig { params(value: T.nilable(Integer)).returns(T.nilable(Integer)) } + def restart_delay(value = nil) + case T.unsafe(value) + when nil + @restart_delay + when Integer + @restart_delay = value + else + raise TypeError, "Service#restart_delay expects an Integer" + end + end + sig { params(type: T.nilable(T.any(String, Symbol))).returns(T.nilable(String)) } def run_type(type = nil) case T.unsafe(type) @@ -111,6 +147,18 @@ def environment_variables(variables = {}) end end + sig { params(value: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } + def macos_legacy_timers(value = nil) + case T.unsafe(value) + when nil + @macos_legacy_timers + when true, false + @macos_legacy_timers = value + else + raise TypeError, "Service#macos_legacy_timers expects a Boolean" + end + end + delegate [:bin, :etc, :libexec, :opt_bin, :opt_libexec, :opt_pkgshare, :opt_prefix, :opt_sbin, :var] => :@formula sig { returns(String) } @@ -135,7 +183,11 @@ def to_plist } base[:KeepAlive] = @keep_alive if @keep_alive == true + base[:LegacyTimers] = @macos_legacy_timers if @macos_legacy_timers == true + base[:TimeOut] = @restart_delay if @restart_delay.present? base[:WorkingDirectory] = @working_dir if @working_dir.present? + base[:RootDirectory] = @root_dir if @root_dir.present? + base[:StandardInPath] = @input_path if @input_path.present? base[:StandardOutPath] = @log_path if @log_path.present? base[:StandardErrorPath] = @error_log_path if @error_log_path.present? base[:EnvironmentVariables] = @environment_variables unless @environment_variables.empty? @@ -158,7 +210,10 @@ def to_systemd_unit options = [] options << "Restart=always" if @keep_alive == true + options << "RestartSec=#{restart_delay}" if @restart_delay.present? options << "WorkingDirectory=#{@working_dir}" if @working_dir.present? + options << "RootDirectory=#{@root_dir}" if @root_dir.present? + options << "StandardInput=file:#{@input_path}" if @input_path.present? options << "StandardOutput=append:#{@log_path}" if @log_path.present? options << "StandardError=append:#{@error_log_path}" if @error_log_path.present? if @environment_variables.present?
true
Other
Homebrew
brew
fceaa2bb74d7beac30afe5fcf21c4d10e8ef53fa.json
Service: add additional options
Library/Homebrew/test/service_spec.rb
@@ -40,8 +40,12 @@ environment_variables PATH: std_service_path_env error_log_path var/"log/beanstalkd.error.log" log_path var/"log/beanstalkd.log" + input_path var/"in/beanstalkd" + root_dir var working_dir var keep_alive true + restart_delay 30 + macos_legacy_timers true end plist = f.service.to_plist @@ -59,17 +63,25 @@ \t<true/> \t<key>Label</key> \t<string>homebrew.mxcl.formula_name</string> + \t<key>LegacyTimers</key> + \t<true/> \t<key>ProgramArguments</key> \t<array> \t\t<string>#{HOMEBREW_PREFIX}/opt/formula_name/bin/beanstalkd</string> \t\t<string>test</string> \t</array> + \t<key>RootDirectory</key> + \t<string>#{HOMEBREW_PREFIX}/var</string> \t<key>RunAtLoad</key> \t<true/> \t<key>StandardErrorPath</key> \t<string>#{HOMEBREW_PREFIX}/var/log/beanstalkd.error.log</string> + \t<key>StandardInPath</key> + \t<string>#{HOMEBREW_PREFIX}/var/in/beanstalkd</string> \t<key>StandardOutPath</key> \t<string>#{HOMEBREW_PREFIX}/var/log/beanstalkd.log</string> + \t<key>TimeOut</key> + \t<integer>30</integer> \t<key>WorkingDirectory</key> \t<string>#{HOMEBREW_PREFIX}/var</string> </dict> @@ -113,8 +125,12 @@ environment_variables PATH: std_service_path_env error_log_path var/"log/beanstalkd.error.log" log_path var/"log/beanstalkd.log" + input_path var/"in/beanstalkd" + root_dir var working_dir var keep_alive true + restart_delay 30 + macos_legacy_timers true end unit = f.service.to_systemd_unit @@ -127,7 +143,10 @@ Type=simple ExecStart=#{HOMEBREW_PREFIX}/opt/#{name}/bin/beanstalkd test Restart=always + RestartSec=30 WorkingDirectory=#{HOMEBREW_PREFIX}/var + RootDirectory=#{HOMEBREW_PREFIX}/var + StandardInput=file:#{HOMEBREW_PREFIX}/var/in/beanstalkd StandardOutput=append:#{HOMEBREW_PREFIX}/var/log/beanstalkd.log StandardError=append:#{HOMEBREW_PREFIX}/var/log/beanstalkd.error.log Environment=\"PATH=#{std_path}\"
true
Other
Homebrew
brew
1182440f80ff665566e965e90d195195ebba6e8a.json
livecheck/strategy/sparkle: install bundler gems
Library/Homebrew/livecheck/strategy/sparkle.rb
@@ -57,6 +57,7 @@ def self.match?(url) sig { params(content: String).returns(T.nilable(Item)) } def self.item_from_content(content) + Homebrew.install_bundler_gems! require "nokogiri" xml = Nokogiri::XML(content)
false
Other
Homebrew
brew
31ce4c8b4fd60e6c1436cd4c8200af9e0353298f.json
Update RBI files for tapioca.
Library/Homebrew/sorbet/rbi/gems/tapioca@0.4.21.rbi
@@ -1,609 +0,0 @@ -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `tapioca` gem. -# Please instead update this file by running `bin/tapioca sync`. - -# typed: true - -module T::Generic::TypeStoragePatch - def [](*types); end - def type_member(variance = T.unsafe(nil), fixed: T.unsafe(nil), lower: T.unsafe(nil), upper: T.unsafe(nil)); end - def type_template(variance = T.unsafe(nil), fixed: T.unsafe(nil), lower: T.unsafe(nil), upper: T.unsafe(nil)); end -end - -module T::Types::Simple::GenericNamePatch - def name; end -end - -module T::Types::Simple::NamePatch - def name; end -end - -module Tapioca - class << self - def silence_warnings(&blk); end - end -end - -module Tapioca::Cli -end - -class Tapioca::Cli::Main < ::Thor - include(::Thor::Actions) - extend(::Thor::Actions::ClassMethods) - - def __print_version; end - def dsl(*constants); end - def generate(*gems); end - def init; end - def require; end - def sync; end - def todo; end - - private - - def create_config; end - def create_post_require; end - def generate_binstub; end - def generator; end - - class << self - def exit_on_failure?; end - end -end - -module Tapioca::Compilers -end - -module Tapioca::Compilers::Dsl -end - -class Tapioca::Compilers::Dsl::Base - abstract! - - sig { void } - def initialize; end - - sig { abstract.type_parameters(:T).params(root: Parlour::RbiGenerator::Namespace, constant: T.type_parameter(:T)).void } - def decorate(root, constant); end - sig { abstract.returns(T::Enumerable[Module]) } - def gather_constants; end - sig { params(constant: Module).returns(T::Boolean) } - def handles?(constant); end - sig { returns(T::Set[Module]) } - def processable_constants; end - - private - - sig { params(method_def: T.any(Method, UnboundMethod)).returns(T::Array[Parlour::RbiGenerator::Parameter]) } - def compile_method_parameters_to_parlour(method_def); end - sig { params(method_def: T.any(Method, UnboundMethod)).returns(T.nilable(String)) } - def compile_method_return_type_to_parlour(method_def); end - sig { params(namespace: Parlour::RbiGenerator::Namespace, name: String, options: T::Hash[T.untyped, T.untyped]).void } - def create_method(namespace, name, options = T.unsafe(nil)); end - sig { params(namespace: Parlour::RbiGenerator::Namespace, method_def: T.any(Method, UnboundMethod), class_method: T::Boolean).void } - def create_method_from_def(namespace, method_def, class_method: T.unsafe(nil)); end - sig { params(method_def: T.any(Method, UnboundMethod), signature: T.untyped).returns(T::Array[String]) } - def parameters_types_from_signature(method_def, signature); end - sig { params(name: String).returns(T::Boolean) } - def valid_method_name?(name); end -end - -Tapioca::Compilers::Dsl::Base::SPECIAL_METHOD_NAMES = T.let(T.unsafe(nil), Array) - -class Tapioca::Compilers::DslCompiler - sig { params(requested_constants: T::Array[Module], requested_generators: T::Array[String], error_handler: T.nilable(T.proc.params(error: String).void)).void } - def initialize(requested_constants:, requested_generators: T.unsafe(nil), error_handler: T.unsafe(nil)); end - - sig { returns(T.proc.params(error: String).void) } - def error_handler; end - sig { returns(T::Enumerable[Tapioca::Compilers::Dsl::Base]) } - def generators; end - sig { returns(T::Array[Module]) } - def requested_constants; end - sig { params(blk: T.proc.params(constant: Module, rbi: String).void).void } - def run(&blk); end - - private - - sig { params(requested_constants: T::Array[Module]).returns(T::Set[Module]) } - def gather_constants(requested_constants); end - sig { params(requested_generators: T::Array[String]).returns(T::Enumerable[Tapioca::Compilers::Dsl::Base]) } - def gather_generators(requested_generators); end - sig { params(requested_generators: T::Array[String]).returns(T.proc.params(klass: Class).returns(T::Boolean)) } - def generator_filter(requested_generators); end - sig { params(constant: Module).returns(T.nilable(String)) } - def rbi_for_constant(constant); end - sig { params(error: String).returns(T.noreturn) } - def report_error(error); end - sig { params(parlour: Parlour::RbiGenerator).void } - def resolve_conflicts(parlour); end -end - -class Tapioca::Compilers::RequiresCompiler - sig { params(sorbet_path: String).void } - def initialize(sorbet_path); end - - sig { returns(String) } - def compile; end - - private - - sig { params(config: Spoom::Sorbet::Config).returns(T::Array[String]) } - def collect_files(config); end - sig { params(file_path: String).returns(T::Enumerable[String]) } - def collect_requires(file_path); end - sig { params(config: Spoom::Sorbet::Config, file_path: Pathname).returns(T::Boolean) } - def file_ignored_by_sorbet?(config, file_path); end - sig { params(files: T::Enumerable[String], name: String).returns(T::Boolean) } - def name_in_project?(files, name); end - sig { params(path: Pathname).returns(T::Array[String]) } - def path_parts(path); end -end - -module Tapioca::Compilers::Sorbet - class << self - sig { params(args: String).returns(String) } - def run(*args); end - sig { returns(String) } - def sorbet_path; end - end -end - -Tapioca::Compilers::Sorbet::EXE_PATH_ENV_VAR = T.let(T.unsafe(nil), String) - -Tapioca::Compilers::Sorbet::SORBET = T.let(T.unsafe(nil), Pathname) - -module Tapioca::Compilers::SymbolTable -end - -class Tapioca::Compilers::SymbolTable::SymbolGenerator - sig { params(gem: Tapioca::Gemfile::Gem, indent: Integer).void } - def initialize(gem, indent = T.unsafe(nil)); end - - def gem; end - sig { returns(String) } - def generate; end - def indent; end - - private - - sig { params(name: String).void } - def add_to_alias_namespace(name); end - sig { params(name: String).returns(T::Boolean) } - def alias_namespaced?(name); end - sig { params(constant: Module).returns(T::Array[Module]) } - def ancestors_of(constant); end - sig { params(constant: Module, other: BasicObject).returns(T::Boolean) } - def are_equal?(constant, other); end - sig { params(constant: BasicObject).returns(Class) } - def class_of(constant); end - sig { params(name: T.nilable(String), constant: BasicObject).returns(T.nilable(String)) } - def compile(name, constant); end - sig { params(name: String, constant: Module).returns(T.nilable(String)) } - def compile_alias(name, constant); end - sig { params(name: String, constant: Module).returns(T.nilable(String)) } - def compile_body(name, constant); end - sig { params(name: String, constant: BasicObject).returns(T.nilable(String)) } - def compile_constant(name, constant); end - sig { params(module_name: String, mod: Module, for_visibility: T::Array[Symbol]).returns(T.nilable(String)) } - def compile_directly_owned_methods(module_name, mod, for_visibility = T.unsafe(nil)); end - sig { params(constant: Module).returns(T.nilable(String)) } - def compile_enums(constant); end - sig { params(symbol_name: String, constant: Module, method: T.nilable(UnboundMethod)).returns(T.nilable(String)) } - def compile_method(symbol_name, constant, method); end - sig { params(name: String, constant: Module).returns(T.nilable(String)) } - def compile_methods(name, constant); end - sig { params(constant: Module).returns(String) } - def compile_mixes_in_class_methods(constant); end - sig { params(constant: Module).returns(String) } - def compile_mixins(constant); end - sig { params(name: String, constant: Module).returns(T.nilable(String)) } - def compile_module(name, constant); end - sig { params(constant: Module).returns(T.nilable(String)) } - def compile_module_helpers(constant); end - sig { params(name: String, value: BasicObject).returns(T.nilable(String)) } - def compile_object(name, value); end - sig { params(constant: Module).returns(T.nilable(String)) } - def compile_props(constant); end - sig { params(signature: T.untyped, parameters: T::Array[[Symbol, String]]).returns(String) } - def compile_signature(signature, parameters); end - sig { params(name: String, constant: Module).returns(T.nilable(String)) } - def compile_subconstants(name, constant); end - sig { params(constant: Class).returns(String) } - def compile_superclass(constant); end - sig { params(constant: Module).returns(T.nilable(String)) } - def compile_type_variable_declarations(constant); end - sig { params(constant: Module).returns(T.nilable(String)) } - def compile_type_variables(constant); end - sig { params(constant: Module).returns(T::Array[Symbol]) } - def constants_of(constant); end - sig { params(constant: Module, strict: T::Boolean).returns(T::Boolean) } - def defined_in_gem?(constant, strict: T.unsafe(nil)); end - sig { params(symbols: T::Set[String]).returns(T::Set[String]) } - def engine_symbols(symbols); end - sig { params(symbol: String).returns(T.nilable(String)) } - def generate_from_symbol(symbol); end - sig { params(constant: Module).returns(T::Array[String]) } - def get_file_candidates(constant); end - sig { params(str: String).returns(String) } - def indented(str); end - sig { params(constant: Module).returns(T::Array[Module]) } - def inherited_ancestors_of(constant); end - def initialize_method_for(constant); end - sig { params(constant: Module).returns(T::Array[Module]) } - def interesting_ancestors_of(constant); end - sig { params(name: String).void } - def mark_seen(name); end - sig { params(method: UnboundMethod).returns(T::Boolean) } - def method_in_gem?(method); end - sig { params(mod: Module).returns(T::Hash[Symbol, T::Array[Symbol]]) } - def method_names_by_visibility(mod); end - sig { params(constant: Module).returns(T.nilable(String)) } - def name_of(constant); end - sig { params(constant: Module).returns(T.nilable(String)) } - def name_of_proxy_target(constant); end - sig { params(object: BasicObject).returns(Integer) } - def object_id_of(object); end - def parent_declares_constant?(name); end - sig { params(constant: Module).returns(T::Boolean) } - def public_module?(constant); end - sig { params(constant: Module).returns(T.nilable(String)) } - def qualified_name_of(constant); end - sig { params(constant: Module).returns(T.nilable(String)) } - def raw_name_of(constant); end - sig { params(symbol: String, inherit: T::Boolean, namespace: Module).returns(BasicObject) } - def resolve_constant(symbol, inherit: T.unsafe(nil), namespace: T.unsafe(nil)); end - sig { params(name: String).returns(T::Boolean) } - def seen?(name); end - sig { params(method: T.any(Method, UnboundMethod)).returns(T.untyped) } - def signature_of(method); end - sig { params(constant: Module).returns(Class) } - def singleton_class_of(constant); end - sig { params(constant: Module, method_name: String).returns(T::Boolean) } - def struct_method?(constant, method_name); end - sig { params(constant: Class).returns(T.nilable(Class)) } - def superclass_of(constant); end - sig { params(symbol_name: String).returns(T::Boolean) } - def symbol_ignored?(symbol_name); end - sig { returns(T::Set[String]) } - def symbols; end - sig { params(constant: T::Types::Base).returns(String) } - def type_of(constant); end - sig { params(name: String).returns(T::Boolean) } - def valid_method_name?(name); end - sig { type_parameters(:U).params(step: Integer, _blk: T.proc.returns(T.type_parameter(:U))).returns(T.type_parameter(:U)) } - def with_indentation(step = T.unsafe(nil), &_blk); end - sig { params(constant: Module, blk: T.proc.returns(T.nilable(String))).returns(T.nilable(String)) } - def with_indentation_for_constant(constant, &blk); end -end - -Tapioca::Compilers::SymbolTable::SymbolGenerator::IGNORED_SYMBOLS = T.let(T.unsafe(nil), Array) - -Tapioca::Compilers::SymbolTable::SymbolGenerator::SPECIAL_METHOD_NAMES = T.let(T.unsafe(nil), Array) - -Tapioca::Compilers::SymbolTable::SymbolGenerator::TYPE_PARAMETER_MATCHER = T.let(T.unsafe(nil), Regexp) - -module Tapioca::Compilers::SymbolTable::SymbolLoader - class << self - def ignore_symbol?(symbol); end - sig { params(paths: T::Array[Pathname]).returns(T::Set[String]) } - def list_from_paths(paths); end - - private - - def ignored_symbols; end - sig { params(paths: T::Array[String]).returns(T::Set[String]) } - def load_symbols(paths); end - def symbol_table_json_from(input, table_type: T.unsafe(nil)); end - end -end - -class Tapioca::Compilers::SymbolTable::SymbolLoader::SymbolTableParser - class << self - def parse(object, parents = T.unsafe(nil)); end - end -end - -class Tapioca::Compilers::SymbolTableCompiler - sig { params(gem: Tapioca::Gemfile::Gem, indent: Integer).returns(String) } - def compile(gem, indent = T.unsafe(nil)); end -end - -class Tapioca::Compilers::TodosCompiler - sig { returns(String) } - def compile; end - - private - - sig { returns(String) } - def list_todos; end -end - -class Tapioca::Config < ::T::Struct - const :outdir, String - const :prerequire, T.nilable(String) - const :postrequire, String - const :exclude, T::Array[String] - const :typed_overrides, T::Hash[String, String] - const :todos_path, String - const :generators, T::Array[String] - - sig { returns(Pathname) } - def outpath; end - - class << self - def inherited(s); end - end -end - -Tapioca::Config::DEFAULT_COMMAND = T.let(T.unsafe(nil), String) - -Tapioca::Config::DEFAULT_DSLDIR = T.let(T.unsafe(nil), String) - -Tapioca::Config::DEFAULT_GEMDIR = T.let(T.unsafe(nil), String) - -Tapioca::Config::DEFAULT_OVERRIDES = T.let(T.unsafe(nil), Hash) - -Tapioca::Config::DEFAULT_POSTREQUIRE = T.let(T.unsafe(nil), String) - -Tapioca::Config::DEFAULT_RBIDIR = T.let(T.unsafe(nil), String) - -Tapioca::Config::DEFAULT_TODOSPATH = T.let(T.unsafe(nil), String) - -Tapioca::Config::SORBET_CONFIG = T.let(T.unsafe(nil), String) - -Tapioca::Config::SORBET_PATH = T.let(T.unsafe(nil), String) - -Tapioca::Config::TAPIOCA_CONFIG = T.let(T.unsafe(nil), String) - -Tapioca::Config::TAPIOCA_PATH = T.let(T.unsafe(nil), String) - -class Tapioca::ConfigBuilder - class << self - sig { params(command: Symbol, options: T::Hash[String, T.untyped]).returns(Tapioca::Config) } - def from_options(command, options); end - - private - - sig { returns(T::Hash[String, T.untyped]) } - def config_options; end - sig { params(command: Symbol).returns(T::Hash[String, T.untyped]) } - def default_options(command); end - sig { params(options: T::Hash[String, T.untyped]).returns(T::Hash[String, T.untyped]) } - def merge_options(*options); end - end -end - -Tapioca::ConfigBuilder::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) - -module Tapioca::ConstantLocator - - private - - def files_for(klass); end - - class << self - def files_for(klass); end - end -end - -class Tapioca::Error < ::StandardError -end - -class Tapioca::Gemfile - sig { void } - def initialize; end - - sig { returns(Bundler::Definition) } - def definition; end - sig { returns(T::Array[Tapioca::Gemfile::Gem]) } - def dependencies; end - sig { params(gem_name: String).returns(T.nilable(Tapioca::Gemfile::Gem)) } - def gem(gem_name); end - sig { returns(T::Array[String]) } - def missing_specs; end - sig { void } - def require; end - - private - - sig { returns(String) } - def dir; end - sig { returns(File) } - def gemfile; end - sig { returns(T::Array[Symbol]) } - def groups; end - sig { returns([T::Array[Tapioca::Gemfile::Gem], T::Array[String]]) } - def load_dependencies; end - def lockfile; end - sig { returns(Bundler::Runtime) } - def runtime; end -end - -class Tapioca::Gemfile::Gem - sig { params(spec: T.any(Gem::Specification, T.all(Bundler::RemoteSpecification, Bundler::StubSpecification))).void } - def initialize(spec); end - - sig { params(path: String).returns(T::Boolean) } - def contains_path?(path); end - sig { returns(T::Array[Pathname]) } - def files; end - sig { returns(String) } - def full_gem_path; end - sig { params(gemfile_dir: String).returns(T::Boolean) } - def ignore?(gemfile_dir); end - sig { returns(String) } - def name; end - sig { returns(String) } - def rbi_file_name; end - def version; end - - private - - sig { returns(T::Boolean) } - def gem_ignored?; end - sig { params(gemfile_dir: String).returns(T::Boolean) } - def gem_in_app_dir?(gemfile_dir); end - sig { returns(T::Boolean) } - def gem_in_bundle_path?; end - sig { params(path: String).returns(T::Boolean) } - def has_parent_gemspec?(path); end - sig { params(path: T.any(Pathname, String)).returns(String) } - def to_realpath(path); end - sig { returns(String) } - def version_string; end -end - -Tapioca::Gemfile::Gem::IGNORED_GEMS = T.let(T.unsafe(nil), Array) - -class Tapioca::Generator < ::Thor::Shell::Color - sig { params(config: Tapioca::Config).void } - def initialize(config); end - - sig { params(requested_constants: T::Array[String], should_verify: T::Boolean, quiet: T::Boolean).void } - def build_dsl(requested_constants, should_verify: T.unsafe(nil), quiet: T.unsafe(nil)); end - sig { params(gem_names: T::Array[String]).void } - def build_gem_rbis(gem_names); end - sig { void } - def build_requires; end - sig { void } - def build_todos; end - sig { returns(Tapioca::Config) } - def config; end - sig { void } - def sync_rbis_with_gemfile; end - - private - - sig { params(filename: Pathname).void } - def add(filename); end - sig { returns(T::Array[String]) } - def added_rbis; end - sig { params(cause: Symbol, files: T::Array[String]).returns(String) } - def build_error_for_files(cause, files); end - sig { returns(Tapioca::Gemfile) } - def bundle; end - sig { params(constant_name: String, contents: String, outpath: Pathname, quiet: T::Boolean).returns(T.nilable(Pathname)) } - def compile_dsl_rbi(constant_name, contents, outpath: T.unsafe(nil), quiet: T.unsafe(nil)); end - sig { params(gem: Tapioca::Gemfile::Gem).void } - def compile_gem_rbi(gem); end - sig { returns(Tapioca::Compilers::SymbolTableCompiler) } - def compiler; end - sig { params(constant_names: T::Array[String]).returns(T::Array[Module]) } - def constantize(constant_names); end - sig { params(constant_name: String).returns(Pathname) } - def dsl_rbi_filename(constant_name); end - sig { params(gem_name: String).returns(Pathname) } - def existing_rbi(gem_name); end - sig { params(requested_constants: T::Array[String], path: Pathname).returns(T::Set[Pathname]) } - def existing_rbi_filenames(requested_constants, path: T.unsafe(nil)); end - sig { returns(T::Hash[String, String]) } - def existing_rbis; end - sig { params(gem_name: String).returns(Pathname) } - def expected_rbi(gem_name); end - sig { returns(T::Hash[String, String]) } - def expected_rbis; end - sig { params(file: String, error: LoadError).void } - def explain_failed_require(file, error); end - sig { params(gem_name: String).returns(T::Boolean) } - def gem_rbi_exists?(gem_name); end - sig { params(gem_name: String, version: String).returns(Pathname) } - def gem_rbi_filename(gem_name, version); end - sig { params(gem_names: T::Array[String]).returns(T::Array[Tapioca::Gemfile::Gem]) } - def gems_to_generate(gem_names); end - sig { params(eager_load: T::Boolean).void } - def load_application(eager_load:); end - sig { void } - def load_dsl_generators; end - sig { returns(Tapioca::Loader) } - def loader; end - sig { params(old_filename: Pathname, new_filename: Pathname).void } - def move(old_filename, new_filename); end - sig { void } - def perform_additions; end - sig { params(dir: Pathname).void } - def perform_dsl_verification(dir); end - sig { void } - def perform_removals; end - sig { params(files: T::Set[Pathname]).void } - def purge_stale_dsl_rbi_files(files); end - sig { params(path: Pathname).returns(T::Array[Pathname]) } - def rbi_files_in(path); end - sig { params(command: String, reason: T.nilable(String), strictness: T.nilable(String)).returns(String) } - def rbi_header(command, reason: T.unsafe(nil), strictness: T.unsafe(nil)); end - sig { params(filename: Pathname).void } - def remove(filename); end - sig { returns(T::Array[String]) } - def removed_rbis; end - sig { void } - def require_gem_file; end - sig { params(message: String, color: T.any(Symbol, T::Array[Symbol])).void } - def say_error(message = T.unsafe(nil), *color); end - sig { params(tmp_dir: Pathname).returns(T::Hash[String, Symbol]) } - def verify_dsl_rbi(tmp_dir:); end -end - -Tapioca::Generator::EMPTY_RBI_COMMENT = T.let(T.unsafe(nil), String) - -module Tapioca::GenericTypeRegistry - class << self - sig { params(constant: Module).returns(T.nilable(T::Hash[Integer, String])) } - def lookup_type_variables(constant); end - sig { params(constant: T.untyped, types: T.untyped).returns(Module) } - def register_type(constant, types); end - sig { params(constant: T.untyped, type_member: T::Types::TypeVariable, fixed: T.untyped, lower: T.untyped, upper: T.untyped).void } - def register_type_member(constant, type_member, fixed, lower, upper); end - sig { params(constant: T.untyped, type_template: T::Types::TypeVariable, fixed: T.untyped, lower: T.untyped, upper: T.untyped).void } - def register_type_template(constant, type_template, fixed, lower, upper); end - - private - - sig { params(constant: Module, name: String).returns(Module) } - def create_generic_type(constant, name); end - sig { params(constant: Class).returns(Class) } - def create_safe_subclass(constant); end - sig { params(constant: Module).returns(T::Hash[Integer, String]) } - def lookup_or_initialize_type_variables(constant); end - sig { params(constant: Module).returns(T.nilable(String)) } - def name_of(constant); end - sig { params(object: BasicObject).returns(Integer) } - def object_id_of(object); end - sig { params(constant: T.untyped, type_variable_type: T.enum([:type_member, :type_template]), type_variable: T::Types::TypeVariable, fixed: T.untyped, lower: T.untyped, upper: T.untyped).void } - def register_type_variable(constant, type_variable_type, type_variable, fixed, lower, upper); end - sig { params(type_variable_type: Symbol, variance: Symbol, fixed: T.untyped, lower: T.untyped, upper: T.untyped).returns(String) } - def serialize_type_variable(type_variable_type, variance, fixed, lower, upper); end - end -end - -class Tapioca::Loader - sig { params(gemfile: Tapioca::Gemfile).void } - def initialize(gemfile); end - - sig { params(initialize_file: T.nilable(String), require_file: T.nilable(String)).void } - def load_bundle(initialize_file, require_file); end - sig { params(environment_load: T::Boolean, eager_load: T::Boolean).void } - def load_rails(environment_load: T.unsafe(nil), eager_load: T.unsafe(nil)); end - - private - - sig { void } - def eager_load_rails_app; end - sig { returns(Tapioca::Gemfile) } - def gemfile; end - sig { void } - def load_rails_engines; end - sig { void } - def load_rake; end - sig { returns(T::Array[T.untyped]) } - def rails_engines; end - sig { void } - def require_bundle; end - sig { params(file: T.nilable(String)).void } - def require_helper(file); end - sig { params(path: String).void } - def safe_require(path); end - sig { void } - def silence_deprecations; end -end - -Tapioca::VERSION = T.let(T.unsafe(nil), String)
true
Other
Homebrew
brew
31ce4c8b4fd60e6c1436cd4c8200af9e0353298f.json
Update RBI files for tapioca.
Library/Homebrew/sorbet/rbi/gems/tapioca@0.4.22.rbi
@@ -0,0 +1,1814 @@ +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `tapioca` gem. +# Please instead update this file by running `bin/tapioca sync`. + +# typed: true + +class Parlour::Generator + sig { params(break_params: Integer, tab_size: Integer, sort_namespaces: T::Boolean).void } + def initialize(break_params: T.unsafe(nil), tab_size: T.unsafe(nil), sort_namespaces: T.unsafe(nil)); end + + sig { overridable.returns(T.nilable(Parlour::Plugin)) } + def current_plugin; end + + def current_plugin=(_arg0); end + + sig { overridable.returns(Parlour::Options) } + def options; end +end + +class Parlour::Options + sig { params(break_params: Integer, tab_size: Integer, sort_namespaces: T::Boolean).void } + def initialize(break_params:, tab_size:, sort_namespaces:); end + + sig { returns(Integer) } + def break_params; end + + sig { params(level: Integer, str: String).returns(String) } + def indented(level, str); end + + sig { returns(T::Boolean) } + def sort_namespaces; end + + sig { returns(Integer) } + def tab_size; end +end + +class Parlour::RbiGenerator < ::Parlour::Generator + def initialize(**hash); end + + sig { overridable.params(strictness: String).returns(String) } + def rbi(strictness = T.unsafe(nil)); end + + sig { overridable.returns(Parlour::RbiGenerator::Namespace) } + def root; end +end + +class Parlour::RbiGenerator::Arbitrary < ::Parlour::RbiGenerator::RbiObject + sig { params(generator: Parlour::Generator, code: String, block: T.nilable(T.proc.params(x: Parlour::RbiGenerator::Arbitrary).void)).void } + def initialize(generator, code: T.unsafe(nil), &block); end + + sig { params(other: Object).returns(T::Boolean) } + def ==(other); end + + sig { returns(String) } + def code; end + + def code=(_arg0); end + + sig { override.returns(String) } + def describe; end + + sig { override.void } + def generalize_from_rbi!; end + + sig { override.params(indent_level: Integer, options: Parlour::Options).returns(T::Array[String]) } + def generate_rbi(indent_level, options); end + + sig { override.params(others: T::Array[Parlour::RbiGenerator::RbiObject]).void } + def merge_into_self(others); end + + sig { override.params(others: T::Array[Parlour::RbiGenerator::RbiObject]).returns(T::Boolean) } + def mergeable?(others); end +end + +class Parlour::RbiGenerator::Attribute < ::Parlour::RbiGenerator::Method + sig { params(generator: Parlour::Generator, name: String, kind: Symbol, type: T.any(Parlour::Types::Type, String), class_attribute: T::Boolean, block: T.nilable(T.proc.params(x: Parlour::RbiGenerator::Attribute).void)).void } + def initialize(generator, name, kind, type, class_attribute: T.unsafe(nil), &block); end + + sig { override.params(other: Object).returns(T::Boolean) } + def ==(other); end + + sig { returns(T::Boolean) } + def class_attribute; end + + sig { override.void } + def generalize_from_rbi!; end + + sig { returns(Symbol) } + def kind; end + + sig { returns(T.any(Parlour::Types::Type, String)) } + def type; end + + private + + sig { override.params(indent_level: Integer, options: Parlour::Options).returns(T::Array[String]) } + def generate_definition(indent_level, options); end +end + +class Parlour::RbiGenerator::ClassNamespace < ::Parlour::RbiGenerator::Namespace + sig { params(generator: Parlour::Generator, name: String, final: T::Boolean, sealed: T::Boolean, superclass: T.nilable(String), abstract: T::Boolean, block: T.nilable(T.proc.params(x: Parlour::RbiGenerator::ClassNamespace).void)).void } + def initialize(generator, name, final, sealed, superclass, abstract, &block); end + + sig { returns(T::Boolean) } + def abstract; end + + sig { override.returns(String) } + def describe; end + + sig { override.void } + def generalize_from_rbi!; end + + sig { override.params(indent_level: Integer, options: Parlour::Options).returns(T::Array[String]) } + def generate_rbi(indent_level, options); end + + sig { override.params(others: T::Array[Parlour::RbiGenerator::RbiObject]).void } + def merge_into_self(others); end + + sig { override.params(others: T::Array[Parlour::RbiGenerator::RbiObject]).returns(T::Boolean) } + def mergeable?(others); end + + sig { returns(T.nilable(String)) } + def superclass; end +end + +class Parlour::RbiGenerator::Constant < ::Parlour::RbiGenerator::RbiObject + sig { params(generator: Parlour::Generator, name: String, value: T.any(Parlour::Types::Type, String), eigen_constant: T::Boolean, block: T.nilable(T.proc.params(x: Parlour::RbiGenerator::Constant).void)).void } + def initialize(generator, name: T.unsafe(nil), value: T.unsafe(nil), eigen_constant: T.unsafe(nil), &block); end + + sig { params(other: Object).returns(T::Boolean) } + def ==(other); end + + sig { override.returns(String) } + def describe; end + + def eigen_constant; end + + sig { override.void } + def generalize_from_rbi!; end + + sig { override.params(indent_level: Integer, options: Parlour::Options).returns(T::Array[String]) } + def generate_rbi(indent_level, options); end + + sig { override.params(others: T::Array[Parlour::RbiGenerator::RbiObject]).void } + def merge_into_self(others); end + + sig { override.params(others: T::Array[Parlour::RbiGenerator::RbiObject]).returns(T::Boolean) } + def mergeable?(others); end + + sig { returns(T.any(Parlour::Types::Type, String)) } + def value; end +end + +class Parlour::RbiGenerator::EnumClassNamespace < ::Parlour::RbiGenerator::ClassNamespace + sig { params(generator: Parlour::Generator, name: String, final: T::Boolean, sealed: T::Boolean, enums: T::Array[T.any(String, [String, String])], abstract: T::Boolean, block: T.nilable(T.proc.params(x: Parlour::RbiGenerator::EnumClassNamespace).void)).void } + def initialize(generator, name, final, sealed, enums, abstract, &block); end + + sig { returns(T::Array[T.any(String, [String, String])]) } + def enums; end + + sig { override.void } + def generalize_from_rbi!; end + + sig { override.params(indent_level: Integer, options: Parlour::Options).returns(T::Array[String]) } + def generate_body(indent_level, options); end + + sig { override.params(others: T::Array[Parlour::RbiGenerator::RbiObject]).void } + def merge_into_self(others); end + + sig { override.params(others: T::Array[Parlour::RbiGenerator::RbiObject]).returns(T::Boolean) } + def mergeable?(others); end +end + +class Parlour::RbiGenerator::Extend < ::Parlour::RbiGenerator::RbiObject + sig { params(generator: Parlour::Generator, name: String, block: T.nilable(T.proc.params(x: Parlour::RbiGenerator::Extend).void)).void } + def initialize(generator, name: T.unsafe(nil), &block); end + + sig { params(other: Object).returns(T::Boolean) } + def ==(other); end + + sig { override.returns(String) } + def describe; end + + sig { override.void } + def generalize_from_rbi!; end + + sig { override.params(indent_level: Integer, options: Parlour::Options).returns(T::Array[String]) } + def generate_rbi(indent_level, options); end + + sig { override.params(others: T::Array[Parlour::RbiGenerator::RbiObject]).void } + def merge_into_self(others); end + + sig { override.params(others: T::Array[Parlour::RbiGenerator::RbiObject]).returns(T::Boolean) } + def mergeable?(others); end +end + +class Parlour::RbiGenerator::Include < ::Parlour::RbiGenerator::RbiObject + sig { params(generator: Parlour::Generator, name: String, block: T.nilable(T.proc.params(x: Parlour::RbiGenerator::Include).void)).void } + def initialize(generator, name: T.unsafe(nil), &block); end + + sig { params(other: Object).returns(T::Boolean) } + def ==(other); end + + sig { override.returns(String) } + def describe; end + + sig { override.void } + def generalize_from_rbi!; end + + sig { override.params(indent_level: Integer, options: Parlour::Options).returns(T::Array[String]) } + def generate_rbi(indent_level, options); end + + sig { override.params(others: T::Array[Parlour::RbiGenerator::RbiObject]).void } + def merge_into_self(others); end + + sig { override.params(others: T::Array[Parlour::RbiGenerator::RbiObject]).returns(T::Boolean) } + def mergeable?(others); end +end + +class Parlour::RbiGenerator::Method < ::Parlour::RbiGenerator::RbiObject + sig { params(generator: Parlour::Generator, name: String, parameters: T::Array[Parlour::RbiGenerator::Parameter], return_type: T.nilable(T.any(Parlour::Types::Type, String)), abstract: T::Boolean, implementation: T::Boolean, override: T::Boolean, overridable: T::Boolean, class_method: T::Boolean, final: T::Boolean, type_parameters: T.nilable(T::Array[Symbol]), block: T.nilable(T.proc.params(x: Parlour::RbiGenerator::Method).void)).void } + def initialize(generator, name, parameters, return_type = T.unsafe(nil), abstract: T.unsafe(nil), implementation: T.unsafe(nil), override: T.unsafe(nil), overridable: T.unsafe(nil), class_method: T.unsafe(nil), final: T.unsafe(nil), type_parameters: T.unsafe(nil), &block); end + + sig { overridable.params(other: Object).returns(T::Boolean) } + def ==(other); end + + sig { returns(T::Boolean) } + def abstract; end + + sig { returns(T::Boolean) } + def class_method; end + + sig { override.returns(String) } + def describe; end + + sig { returns(T::Boolean) } + def final; end + + sig { override.void } + def generalize_from_rbi!; end + + sig { override.params(indent_level: Integer, options: Parlour::Options).returns(T::Array[String]) } + def generate_rbi(indent_level, options); end + + sig { returns(T::Boolean) } + def implementation; end + + sig { override.params(others: T::Array[Parlour::RbiGenerator::RbiObject]).void } + def merge_into_self(others); end + + sig { override.params(others: T::Array[Parlour::RbiGenerator::RbiObject]).returns(T::Boolean) } + def mergeable?(others); end + + sig { returns(T::Boolean) } + def overridable; end + + sig { returns(T::Boolean) } + def override; end + + sig { returns(T::Array[Parlour::RbiGenerator::Parameter]) } + def parameters; end + + sig { returns(T.nilable(T.any(Parlour::Types::Type, String))) } + def return_type; end + + sig { returns(T::Array[Symbol]) } + def type_parameters; end + + private + + sig { overridable.params(indent_level: Integer, options: Parlour::Options).returns(T::Array[String]) } + def generate_definition(indent_level, options); end + + sig { returns(String) } + def qualifiers; end +end + +class Parlour::RbiGenerator::ModuleNamespace < ::Parlour::RbiGenerator::Namespace + sig { params(generator: Parlour::Generator, name: String, final: T::Boolean, sealed: T::Boolean, interface: T::Boolean, abstract: T::Boolean, block: T.nilable(T.proc.params(x: Parlour::RbiGenerator::ClassNamespace).void)).void } + def initialize(generator, name, final, sealed, interface, abstract, &block); end + + sig { returns(T::Boolean) } + def abstract; end + + sig { override.returns(String) } + def describe; end + + sig { override.void } + def generalize_from_rbi!; end + + sig { override.params(indent_level: Integer, options: Parlour::Options).returns(T::Array[String]) } + def generate_rbi(indent_level, options); end + + sig { returns(T::Boolean) } + def interface; end + + sig { override.params(others: T::Array[Parlour::RbiGenerator::RbiObject]).void } + def merge_into_self(others); end + + sig { override.params(others: T::Array[Parlour::RbiGenerator::RbiObject]).returns(T::Boolean) } + def mergeable?(others); end +end + +class Parlour::RbiGenerator::Namespace < ::Parlour::RbiGenerator::RbiObject + sig { params(generator: Parlour::Generator, name: T.nilable(String), final: T::Boolean, sealed: T::Boolean, block: T.nilable(T.proc.params(x: Parlour::RbiGenerator::Namespace).void)).void } + def initialize(generator, name = T.unsafe(nil), final = T.unsafe(nil), sealed = T.unsafe(nil), &block); end + + sig { params(comment: T.any(String, T::Array[String])).void } + def add_comment_to_next_child(comment); end + + sig { returns(T::Array[Parlour::RbiGenerator::TypeAlias]) } + def aliases; end + + sig { returns(T::Array[Parlour::RbiGenerator::RbiObject]) } + def children; end + + sig { returns(T::Array[Parlour::RbiGenerator::Constant]) } + def constants; end + + def create_arbitrary(code:, &block); end + def create_attr(*args, &blk); end + + sig { params(name: String, type: T.any(Parlour::Types::Type, String), class_attribute: T::Boolean, block: T.nilable(T.proc.params(x: Parlour::RbiGenerator::Attribute).void)).returns(Parlour::RbiGenerator::Attribute) } + def create_attr_accessor(name, type:, class_attribute: T.unsafe(nil), &block); end + + sig { params(name: String, type: T.any(Parlour::Types::Type, String), class_attribute: T::Boolean, block: T.nilable(T.proc.params(x: Parlour::RbiGenerator::Attribute).void)).returns(Parlour::RbiGenerator::Attribute) } + def create_attr_reader(name, type:, class_attribute: T.unsafe(nil), &block); end + + sig { params(name: String, type: T.any(Parlour::Types::Type, String), class_attribute: T::Boolean, block: T.nilable(T.proc.params(x: Parlour::RbiGenerator::Attribute).void)).returns(Parlour::RbiGenerator::Attribute) } + def create_attr_writer(name, type:, class_attribute: T.unsafe(nil), &block); end + + sig { params(name: String, kind: Symbol, type: T.any(Parlour::Types::Type, String), class_attribute: T::Boolean, block: T.nilable(T.proc.params(x: Parlour::RbiGenerator::Attribute).void)).returns(Parlour::RbiGenerator::Attribute) } + def create_attribute(name, kind:, type:, class_attribute: T.unsafe(nil), &block); end + + sig { params(name: String, final: T::Boolean, sealed: T::Boolean, superclass: T.nilable(String), abstract: T::Boolean, block: T.nilable(T.proc.params(x: Parlour::RbiGenerator::ClassNamespace).void)).returns(Parlour::RbiGenerator::ClassNamespace) } + def create_class(name, final: T.unsafe(nil), sealed: T.unsafe(nil), superclass: T.unsafe(nil), abstract: T.unsafe(nil), &block); end + + sig { params(name: String, value: String, eigen_constant: T::Boolean, block: T.nilable(T.proc.params(x: Parlour::RbiGenerator::Constant).void)).returns(Parlour::RbiGenerator::Constant) } + def create_constant(name, value:, eigen_constant: T.unsafe(nil), &block); end + + sig { params(name: String, final: T::Boolean, sealed: T::Boolean, enums: T.nilable(T::Array[T.any(String, [String, String])]), abstract: T::Boolean, block: T.nilable(T.proc.params(x: Parlour::RbiGenerator::EnumClassNamespace).void)).returns(Parlour::RbiGenerator::EnumClassNamespace) } + def create_enum_class(name, final: T.unsafe(nil), sealed: T.unsafe(nil), enums: T.unsafe(nil), abstract: T.unsafe(nil), &block); end + + sig { params(name: String, block: T.nilable(T.proc.params(x: Parlour::RbiGenerator::Extend).void)).returns(Parlour::RbiGenerator::Extend) } + def create_extend(name, &block); end + + sig { params(extendables: T::Array[String]).returns(T::Array[Parlour::RbiGenerator::Extend]) } + def create_extends(extendables); end + + sig { params(name: String, block: T.nilable(T.proc.params(x: Parlour::RbiGenerator::Include).void)).returns(Parlour::RbiGenerator::Include) } + def create_include(name, &block); end + + sig { params(includables: T::Array[String]).returns(T::Array[Parlour::RbiGenerator::Include]) } + def create_includes(includables); end + + sig { params(name: String, parameters: T.nilable(T::Array[Parlour::RbiGenerator::Parameter]), return_type: T.nilable(T.any(Parlour::Types::Type, String)), returns: T.nilable(T.any(Parlour::Types::Type, String)), abstract: T::Boolean, implementation: T::Boolean, override: T::Boolean, overridable: T::Boolean, class_method: T::Boolean, final: T::Boolean, type_parameters: T.nilable(T::Array[Symbol]), block: T.nilable(T.proc.params(x: Parlour::RbiGenerator::Method).void)).returns(Parlour::RbiGenerator::Method) } + def create_method(name, parameters: T.unsafe(nil), return_type: T.unsafe(nil), returns: T.unsafe(nil), abstract: T.unsafe(nil), implementation: T.unsafe(nil), override: T.unsafe(nil), overridable: T.unsafe(nil), class_method: T.unsafe(nil), final: T.unsafe(nil), type_parameters: T.unsafe(nil), &block); end + + sig { params(name: String, final: T::Boolean, sealed: T::Boolean, interface: T::Boolean, abstract: T::Boolean, block: T.nilable(T.proc.params(x: Parlour::RbiGenerator::ClassNamespace).void)).returns(Parlour::RbiGenerator::ModuleNamespace) } + def create_module(name, final: T.unsafe(nil), sealed: T.unsafe(nil), interface: T.unsafe(nil), abstract: T.unsafe(nil), &block); end + + sig { params(name: String, final: T::Boolean, sealed: T::Boolean, props: T.nilable(T::Array[Parlour::RbiGenerator::StructProp]), abstract: T::Boolean, block: T.nilable(T.proc.params(x: Parlour::RbiGenerator::StructClassNamespace).void)).returns(Parlour::RbiGenerator::StructClassNamespace) } + def create_struct_class(name, final: T.unsafe(nil), sealed: T.unsafe(nil), props: T.unsafe(nil), abstract: T.unsafe(nil), &block); end + + sig { params(name: String, type: T.any(Parlour::Types::Type, String), block: T.nilable(T.proc.params(x: Parlour::RbiGenerator::TypeAlias).void)).returns(Parlour::RbiGenerator::TypeAlias) } + def create_type_alias(name, type:, &block); end + + sig { override.overridable.returns(String) } + def describe; end + + sig { returns(T::Array[Parlour::RbiGenerator::Extend]) } + def extends; end + + sig { returns(T::Boolean) } + def final; end + + sig { override.void } + def generalize_from_rbi!; end + + sig { override.overridable.params(indent_level: Integer, options: Parlour::Options).returns(T::Array[String]) } + def generate_rbi(indent_level, options); end + + sig { returns(T::Array[Parlour::RbiGenerator::Include]) } + def includes; end + + sig { override.overridable.params(others: T::Array[Parlour::RbiGenerator::RbiObject]).void } + def merge_into_self(others); end + + sig { override.overridable.params(others: T::Array[Parlour::RbiGenerator::RbiObject]).returns(T::Boolean) } + def mergeable?(others); end + + sig { params(constant: Module, block: T.proc.params(x: Parlour::RbiGenerator::Namespace).void).void } + def path(constant, &block); end + + sig { returns(T::Boolean) } + def sealed; end + + def type_aliases(*args, &blk); end + + private + + sig { overridable.params(indent_level: Integer, options: Parlour::Options).returns(T::Array[String]) } + def generate_body(indent_level, options); end + + sig { params(object: Parlour::RbiGenerator::RbiObject).void } + def move_next_comments(object); end +end + +Parlour::RbiGenerator::Options = Parlour::Options + +class Parlour::RbiGenerator::Parameter + sig { params(name: String, type: T.nilable(T.any(Parlour::Types::Type, String)), default: T.nilable(String)).void } + def initialize(name, type: T.unsafe(nil), default: T.unsafe(nil)); end + + sig { params(other: Object).returns(T::Boolean) } + def ==(other); end + + sig { returns(T.nilable(String)) } + def default; end + + sig { void } + def generalize_from_rbi!; end + + sig { returns(Symbol) } + def kind; end + + sig { returns(String) } + def name; end + + sig { returns(String) } + def name_without_kind; end + + sig { returns(String) } + def to_def_param; end + + sig { returns(String) } + def to_sig_param; end + + sig { returns(T.any(Parlour::Types::Type, String)) } + def type; end +end + +Parlour::RbiGenerator::Parameter::PREFIXES = T.let(T.unsafe(nil), Hash) + +class Parlour::RbiGenerator::RbiObject < ::Parlour::TypedObject + abstract! + + sig { params(generator: Parlour::Generator, name: String).void } + def initialize(generator, name); end + + sig { override.overridable.returns(String) } + def describe; end + + sig { abstract.void } + def generalize_from_rbi!; end + + sig { abstract.params(indent_level: Integer, options: Parlour::Options).returns(T::Array[String]) } + def generate_rbi(indent_level, options); end + + sig { returns(Parlour::Generator) } + def generator; end + + sig { abstract.params(others: T::Array[Parlour::RbiGenerator::RbiObject]).void } + def merge_into_self(others); end + + sig { abstract.params(others: T::Array[Parlour::RbiGenerator::RbiObject]).returns(T::Boolean) } + def mergeable?(others); end +end + +class Parlour::RbiGenerator::StructClassNamespace < ::Parlour::RbiGenerator::ClassNamespace + sig { params(generator: Parlour::Generator, name: String, final: T::Boolean, sealed: T::Boolean, props: T::Array[Parlour::RbiGenerator::StructProp], abstract: T::Boolean, block: T.nilable(T.proc.params(x: Parlour::RbiGenerator::StructClassNamespace).void)).void } + def initialize(generator, name, final, sealed, props, abstract, &block); end + + sig { override.void } + def generalize_from_rbi!; end + + sig { override.params(indent_level: Integer, options: Parlour::Options).returns(T::Array[String]) } + def generate_body(indent_level, options); end + + sig { override.params(others: T::Array[Parlour::RbiGenerator::RbiObject]).void } + def merge_into_self(others); end + + sig { override.params(others: T::Array[Parlour::RbiGenerator::RbiObject]).returns(T::Boolean) } + def mergeable?(others); end + + sig { returns(T::Array[Parlour::RbiGenerator::StructProp]) } + def props; end +end + +class Parlour::RbiGenerator::StructProp + sig { params(name: String, type: T.any(Parlour::Types::Type, String), optional: T.nilable(T.any(Symbol, T::Boolean)), enum: T.nilable(String), dont_store: T.nilable(T::Boolean), foreign: T.nilable(String), default: T.nilable(String), factory: T.nilable(String), immutable: T.nilable(T::Boolean), array: T.nilable(String), override: T.nilable(T::Boolean), redaction: T.nilable(String)).void } + def initialize(name, type, optional: T.unsafe(nil), enum: T.unsafe(nil), dont_store: T.unsafe(nil), foreign: T.unsafe(nil), default: T.unsafe(nil), factory: T.unsafe(nil), immutable: T.unsafe(nil), array: T.unsafe(nil), override: T.unsafe(nil), redaction: T.unsafe(nil)); end + + sig { params(other: Object).returns(T::Boolean) } + def ==(other); end + + sig { returns(T.nilable(String)) } + def array; end + + sig { returns(T.nilable(String)) } + def default; end + + sig { returns(T.nilable(T::Boolean)) } + def dont_store; end + + sig { returns(T.nilable(String)) } + def enum; end + + sig { returns(T.nilable(String)) } + def factory; end + + sig { returns(T.nilable(String)) } + def foreign; end + + sig { void } + def generalize_from_rbi!; end + + sig { returns(T.nilable(T::Boolean)) } + def immutable; end + + sig { returns(String) } + def name; end + + sig { returns(T.nilable(T.any(Symbol, T::Boolean))) } + def optional; end + + sig { returns(T.nilable(T::Boolean)) } + def override; end + + sig { returns(T.nilable(String)) } + def redaction; end + + sig { returns(String) } + def to_prop_call; end + + sig { returns(T.any(Parlour::Types::Type, String)) } + def type; end +end + +Parlour::RbiGenerator::StructProp::EXTRA_PROPERTIES = T.let(T.unsafe(nil), Array) + +class Parlour::RbiGenerator::TypeAlias < ::Parlour::RbiGenerator::RbiObject + sig { params(generator: Parlour::Generator, name: String, type: T.any(Parlour::Types::Type, String), block: T.nilable(T.proc.params(x: Parlour::RbiGenerator::TypeAlias).void)).void } + def initialize(generator, name:, type:, &block); end + + sig { params(other: Object).returns(T::Boolean) } + def ==(other); end + + sig { override.returns(String) } + def describe; end + + sig { override.void } + def generalize_from_rbi!; end + + sig { override.params(indent_level: Integer, options: Parlour::Options).returns(T::Array[String]) } + def generate_rbi(indent_level, options); end + + sig { override.params(others: T::Array[Parlour::RbiGenerator::RbiObject]).void } + def merge_into_self(others); end + + sig { override.params(others: T::Array[Parlour::RbiGenerator::RbiObject]).returns(T::Boolean) } + def mergeable?(others); end + + sig { returns(T.any(Parlour::Types::Type, String)) } + def type; end +end + +class Parlour::TypedObject + abstract! + + sig { params(name: String).void } + def initialize(name); end + + sig { params(comment: T.any(String, T::Array[String])).void } + def add_comment(comment); end + + def add_comments(*args, &blk); end + + sig { returns(T::Array[String]) } + def comments; end + + sig { abstract.returns(String) } + def describe; end + + sig { returns(T.nilable(Parlour::Plugin)) } + def generated_by; end + + sig { returns(String) } + def name; end + + protected + + sig { params(indent_level: Integer, options: Parlour::Options).returns(T::Array[String]) } + def generate_comments(indent_level, options); end +end + +class String + include ::Comparable + include ::JSON::Ext::Generator::GeneratorMethods::String + include ::Colorize::InstanceMethods + extend ::JSON::Ext::Generator::GeneratorMethods::String::Extend + extend ::Colorize::ClassMethods +end + +String::BLANK_RE = T.let(T.unsafe(nil), Regexp) +String::ENCODED_BLANKS = T.let(T.unsafe(nil), Concurrent::Map) + +module T::Generic::TypeStoragePatch + def [](*types); end + def type_member(variance = T.unsafe(nil), fixed: T.unsafe(nil), lower: T.unsafe(nil), upper: T.unsafe(nil)); end + def type_template(variance = T.unsafe(nil), fixed: T.unsafe(nil), lower: T.unsafe(nil), upper: T.unsafe(nil)); end +end + +module T::Types::Simple::GenericNamePatch + def name; end +end + +module T::Types::Simple::NamePatch + def name; end +end + +module Tapioca + class << self + def silence_warnings(&blk); end + end +end + +module Tapioca::Cli; end + +class Tapioca::Cli::Main < ::Thor + include ::Thor::Actions + extend ::Thor::Actions::ClassMethods + + def __print_version; end + def dsl(*constants); end + def generate(*gems); end + def init; end + def require; end + def sync; end + def todo; end + + private + + def create_config; end + def create_post_require; end + def generate_binstub; end + def generator; end + + class << self + def exit_on_failure?; end + end +end + +module Tapioca::Compilers; end +module Tapioca::Compilers::Dsl; end + +class Tapioca::Compilers::Dsl::Base + abstract! + + sig { void } + def initialize; end + + sig { abstract.type_parameters(:T).params(root: Parlour::RbiGenerator::Namespace, constant: T.type_parameter(:T)).void } + def decorate(root, constant); end + + sig { abstract.returns(T::Enumerable[Module]) } + def gather_constants; end + + sig { params(constant: Module).returns(T::Boolean) } + def handles?(constant); end + + sig { returns(T::Set[Module]) } + def processable_constants; end + + private + + sig { params(method_def: T.any(Method, UnboundMethod)).returns(T::Array[Parlour::RbiGenerator::Parameter]) } + def compile_method_parameters_to_parlour(method_def); end + + sig { params(method_def: T.any(Method, UnboundMethod)).returns(T.nilable(String)) } + def compile_method_return_type_to_parlour(method_def); end + + sig { params(namespace: Parlour::RbiGenerator::Namespace, name: String, options: T::Hash[T.untyped, T.untyped]).void } + def create_method(namespace, name, options = T.unsafe(nil)); end + + sig { params(namespace: Parlour::RbiGenerator::Namespace, method_def: T.any(Method, UnboundMethod), class_method: T::Boolean).void } + def create_method_from_def(namespace, method_def, class_method: T.unsafe(nil)); end + + sig { params(method_def: T.any(Method, UnboundMethod), signature: T.untyped).returns(T::Array[String]) } + def parameters_types_from_signature(method_def, signature); end + + sig { params(name: String).returns(T::Boolean) } + def valid_method_name?(name); end +end + +Tapioca::Compilers::Dsl::Base::SPECIAL_METHOD_NAMES = T.let(T.unsafe(nil), Array) + +class Tapioca::Compilers::DslCompiler + sig { params(requested_constants: T::Array[Module], requested_generators: T::Array[String], error_handler: T.nilable(T.proc.params(error: String).void)).void } + def initialize(requested_constants:, requested_generators: T.unsafe(nil), error_handler: T.unsafe(nil)); end + + sig { returns(T.proc.params(error: String).void) } + def error_handler; end + + sig { returns(T::Enumerable[Tapioca::Compilers::Dsl::Base]) } + def generators; end + + sig { returns(T::Array[Module]) } + def requested_constants; end + + sig { params(blk: T.proc.params(constant: Module, rbi: String).void).void } + def run(&blk); end + + private + + sig { params(requested_constants: T::Array[Module]).returns(T::Set[Module]) } + def gather_constants(requested_constants); end + + sig { params(requested_generators: T::Array[String]).returns(T::Enumerable[Tapioca::Compilers::Dsl::Base]) } + def gather_generators(requested_generators); end + + sig { params(requested_generators: T::Array[String]).returns(T.proc.params(klass: Class).returns(T::Boolean)) } + def generator_filter(requested_generators); end + + sig { params(constant: Module).returns(T.nilable(String)) } + def rbi_for_constant(constant); end + + sig { params(error: String).returns(T.noreturn) } + def report_error(error); end + + sig { params(parlour: Parlour::RbiGenerator).void } + def resolve_conflicts(parlour); end +end + +class Tapioca::Compilers::RequiresCompiler + sig { params(sorbet_path: String).void } + def initialize(sorbet_path); end + + sig { returns(String) } + def compile; end + + private + + sig { params(config: Spoom::Sorbet::Config).returns(T::Array[String]) } + def collect_files(config); end + + sig { params(file_path: String).returns(T::Enumerable[String]) } + def collect_requires(file_path); end + + sig { params(config: Spoom::Sorbet::Config, file_path: Pathname).returns(T::Boolean) } + def file_ignored_by_sorbet?(config, file_path); end + + sig { params(files: T::Enumerable[String], name: String).returns(T::Boolean) } + def name_in_project?(files, name); end + + sig { params(path: Pathname).returns(T::Array[String]) } + def path_parts(path); end +end + +module Tapioca::Compilers::Sorbet + class << self + sig { params(args: String).returns(String) } + def run(*args); end + + sig { returns(String) } + def sorbet_path; end + end +end + +Tapioca::Compilers::Sorbet::EXE_PATH_ENV_VAR = T.let(T.unsafe(nil), String) +Tapioca::Compilers::Sorbet::SORBET = T.let(T.unsafe(nil), Pathname) +module Tapioca::Compilers::SymbolTable; end + +class Tapioca::Compilers::SymbolTable::SymbolGenerator + sig { params(gem: Tapioca::Gemfile::Gem, indent: Integer).void } + def initialize(gem, indent = T.unsafe(nil)); end + + def gem; end + + sig { returns(String) } + def generate; end + + def indent; end + + private + + sig { params(name: String).void } + def add_to_alias_namespace(name); end + + def add_to_symbol_queue(name); end + + sig { params(name: String).returns(T::Boolean) } + def alias_namespaced?(name); end + + sig { params(constant: Module).returns(T::Array[Module]) } + def ancestors_of(constant); end + + sig { params(constant: Module, other: BasicObject).returns(T::Boolean) } + def are_equal?(constant, other); end + + sig { params(constant: BasicObject).returns(Class) } + def class_of(constant); end + + sig { params(tree: Tapioca::RBI::Tree, name: T.nilable(String), constant: BasicObject).void } + def compile(tree, name, constant); end + + sig { params(tree: Tapioca::RBI::Tree, name: String, constant: Module).void } + def compile_alias(tree, name, constant); end + + sig { params(tree: Tapioca::RBI::Tree, name: String, constant: Module).void } + def compile_body(tree, name, constant); end + + sig { params(tree: Tapioca::RBI::Tree, name: String, constant: BasicObject).void } + def compile_constant(tree, name, constant); end + + sig { params(tree: Tapioca::RBI::Tree, module_name: String, mod: Module, for_visibility: T::Array[Symbol]).void } + def compile_directly_owned_methods(tree, module_name, mod, for_visibility = T.unsafe(nil)); end + + sig { params(tree: Tapioca::RBI::Tree, constant: Module).void } + def compile_enums(tree, constant); end + + sig { params(tree: Tapioca::RBI::Tree, symbol_name: String, constant: Module, method: T.nilable(UnboundMethod), visibility: Tapioca::RBI::Visibility).void } + def compile_method(tree, symbol_name, constant, method, visibility = T.unsafe(nil)); end + + sig { params(tree: Tapioca::RBI::Tree, name: String, constant: Module).void } + def compile_methods(tree, name, constant); end + + sig { params(tree: Tapioca::RBI::Tree, constant: Module).void } + def compile_mixes_in_class_methods(tree, constant); end + + sig { params(tree: Tapioca::RBI::Tree, constant: Module).void } + def compile_mixins(tree, constant); end + + sig { params(tree: Tapioca::RBI::Tree, name: String, constant: Module).void } + def compile_module(tree, name, constant); end + + sig { params(tree: Tapioca::RBI::Tree, constant: Module).void } + def compile_module_helpers(tree, constant); end + + sig { params(tree: Tapioca::RBI::Tree, name: String, value: BasicObject).void } + def compile_object(tree, name, value); end + + sig { params(tree: Tapioca::RBI::Tree, constant: Module).void } + def compile_props(tree, constant); end + + sig { params(signature: T.untyped, parameters: T::Array[[Symbol, String]]).returns(Tapioca::RBI::Sig) } + def compile_signature(signature, parameters); end + + sig { params(tree: Tapioca::RBI::Tree, name: String, constant: Module).void } + def compile_subconstants(tree, name, constant); end + + sig { params(constant: Class).returns(T.nilable(String)) } + def compile_superclass(constant); end + + sig { params(tree: Tapioca::RBI::Tree, constant: Module).void } + def compile_type_variable_declarations(tree, constant); end + + sig { params(tree: Tapioca::RBI::Tree, constant: Module).void } + def compile_type_variables(tree, constant); end + + sig { params(constant: Module).returns(T::Array[Symbol]) } + def constants_of(constant); end + + sig { params(constant: Module, strict: T::Boolean).returns(T::Boolean) } + def defined_in_gem?(constant, strict: T.unsafe(nil)); end + + sig { params(symbols: T::Set[String]).returns(T::Set[String]) } + def engine_symbols(symbols); end + + sig { params(tree: Tapioca::RBI::Tree, symbol: String).void } + def generate_from_symbol(tree, symbol); end + + sig { params(constant: Module).returns(T::Array[String]) } + def get_file_candidates(constant); end + + sig { params(constant: Module).returns(T::Array[Module]) } + def inherited_ancestors_of(constant); end + + def initialize_method_for(constant); end + + sig { params(constant: Module).returns(T::Array[Module]) } + def interesting_ancestors_of(constant); end + + sig { params(name: String).void } + def mark_seen(name); end + + sig { params(method: UnboundMethod).returns(T::Boolean) } + def method_in_gem?(method); end + + sig { params(mod: Module).returns(T::Hash[Symbol, T::Array[Symbol]]) } + def method_names_by_visibility(mod); end + + sig { params(constant: Module).returns(T.nilable(String)) } + def name_of(constant); end + + sig { params(constant: Module).returns(T.nilable(String)) } + def name_of_proxy_target(constant); end + + sig { params(object: BasicObject).returns(Integer) } + def object_id_of(object); end + + sig { params(constant: Module).returns(T.nilable(String)) } + def qualified_name_of(constant); end + + sig { params(constant: Module).returns(T.nilable(String)) } + def raw_name_of(constant); end + + sig { params(symbol: String, inherit: T::Boolean, namespace: Module).returns(BasicObject) } + def resolve_constant(symbol, inherit: T.unsafe(nil), namespace: T.unsafe(nil)); end + + sig { params(sig_string: String).returns(String) } + def sanitize_signature_types(sig_string); end + + sig { params(name: String).returns(T::Boolean) } + def seen?(name); end + + sig { params(method: T.any(Method, UnboundMethod)).returns(T.untyped) } + def signature_of(method); end + + sig { params(constant: Module).returns(Class) } + def singleton_class_of(constant); end + + sig { params(constant: Module, method_name: String).returns(T::Boolean) } + def struct_method?(constant, method_name); end + + sig { params(constant: Class).returns(T.nilable(Class)) } + def superclass_of(constant); end + + sig { params(symbol_name: String).returns(T::Boolean) } + def symbol_ignored?(symbol_name); end + + sig { returns(T::Set[String]) } + def symbols; end + + sig { params(constant: T::Types::Base).returns(String) } + def type_of(constant); end + + sig { params(name: String).returns(T::Boolean) } + def valid_method_name?(name); end +end + +Tapioca::Compilers::SymbolTable::SymbolGenerator::IGNORED_SYMBOLS = T.let(T.unsafe(nil), Array) +Tapioca::Compilers::SymbolTable::SymbolGenerator::SPECIAL_METHOD_NAMES = T.let(T.unsafe(nil), Array) +Tapioca::Compilers::SymbolTable::SymbolGenerator::TYPE_PARAMETER_MATCHER = T.let(T.unsafe(nil), Regexp) + +module Tapioca::Compilers::SymbolTable::SymbolLoader + class << self + def ignore_symbol?(symbol); end + + sig { params(paths: T::Array[Pathname]).returns(T::Set[String]) } + def list_from_paths(paths); end + + private + + def ignored_symbols; end + + sig { params(paths: T::Array[String]).returns(T::Set[String]) } + def load_symbols(paths); end + + def symbol_table_json_from(input, table_type: T.unsafe(nil)); end + end +end + +class Tapioca::Compilers::SymbolTable::SymbolLoader::SymbolTableParser + class << self + def parse(object, parents = T.unsafe(nil)); end + end +end + +class Tapioca::Compilers::SymbolTableCompiler + sig { params(gem: Tapioca::Gemfile::Gem, indent: Integer).returns(String) } + def compile(gem, indent = T.unsafe(nil)); end +end + +class Tapioca::Compilers::TodosCompiler + sig { returns(String) } + def compile; end + + private + + sig { returns(String) } + def list_todos; end +end + +class Tapioca::Config < ::T::Struct + const :exclude, T::Array[String] + const :generators, T::Array[String] + const :outdir, String + const :postrequire, String + const :prerequire, T.nilable(String) + const :todos_path, String + const :typed_overrides, T::Hash[String, String] + + sig { returns(Pathname) } + def outpath; end + + class << self + def inherited(s); end + end +end + +Tapioca::Config::DEFAULT_COMMAND = T.let(T.unsafe(nil), String) +Tapioca::Config::DEFAULT_DSLDIR = T.let(T.unsafe(nil), String) +Tapioca::Config::DEFAULT_GEMDIR = T.let(T.unsafe(nil), String) +Tapioca::Config::DEFAULT_OVERRIDES = T.let(T.unsafe(nil), Hash) +Tapioca::Config::DEFAULT_POSTREQUIRE = T.let(T.unsafe(nil), String) +Tapioca::Config::DEFAULT_RBIDIR = T.let(T.unsafe(nil), String) +Tapioca::Config::DEFAULT_TODOSPATH = T.let(T.unsafe(nil), String) +Tapioca::Config::SORBET_CONFIG = T.let(T.unsafe(nil), String) +Tapioca::Config::SORBET_PATH = T.let(T.unsafe(nil), String) +Tapioca::Config::TAPIOCA_CONFIG = T.let(T.unsafe(nil), String) +Tapioca::Config::TAPIOCA_PATH = T.let(T.unsafe(nil), String) + +class Tapioca::ConfigBuilder + class << self + sig { params(command: Symbol, options: T::Hash[String, T.untyped]).returns(Tapioca::Config) } + def from_options(command, options); end + + private + + sig { returns(T::Hash[String, T.untyped]) } + def config_options; end + + sig { params(command: Symbol).returns(T::Hash[String, T.untyped]) } + def default_options(command); end + + sig { params(options: T::Hash[String, T.untyped]).returns(T::Hash[String, T.untyped]) } + def merge_options(*options); end + end +end + +Tapioca::ConfigBuilder::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + +module Tapioca::ConstantLocator + private + + def files_for(klass); end + + class << self + def files_for(klass); end + end +end + +Tapioca::ConstantLocator::NAME = T.let(T.unsafe(nil), UnboundMethod) +class Tapioca::Error < ::StandardError; end + +class Tapioca::Gemfile + sig { void } + def initialize; end + + sig { returns(Bundler::Definition) } + def definition; end + + sig { returns(T::Array[Tapioca::Gemfile::Gem]) } + def dependencies; end + + sig { params(gem_name: String).returns(T.nilable(Tapioca::Gemfile::Gem)) } + def gem(gem_name); end + + sig { returns(T::Array[String]) } + def missing_specs; end + + sig { void } + def require; end + + private + + sig { returns(String) } + def dir; end + + sig { returns(File) } + def gemfile; end + + sig { returns(T::Array[Symbol]) } + def groups; end + + sig { returns([T::Array[Tapioca::Gemfile::Gem], T::Array[String]]) } + def load_dependencies; end + + def lockfile; end + + sig { returns(Bundler::Runtime) } + def runtime; end +end + +class Tapioca::Gemfile::Gem + sig { params(spec: T.any(Gem::Specification, T.all(Bundler::RemoteSpecification, Bundler::StubSpecification))).void } + def initialize(spec); end + + sig { params(path: String).returns(T::Boolean) } + def contains_path?(path); end + + sig { returns(T::Array[Pathname]) } + def files; end + + sig { returns(String) } + def full_gem_path; end + + sig { params(gemfile_dir: String).returns(T::Boolean) } + def ignore?(gemfile_dir); end + + sig { returns(String) } + def name; end + + sig { returns(String) } + def rbi_file_name; end + + def version; end + + private + + sig { returns(T::Boolean) } + def gem_ignored?; end + + sig { params(gemfile_dir: String).returns(T::Boolean) } + def gem_in_app_dir?(gemfile_dir); end + + sig { returns(T::Boolean) } + def gem_in_bundle_path?; end + + sig { params(path: String).returns(T::Boolean) } + def has_parent_gemspec?(path); end + + sig { params(path: T.any(Pathname, String)).returns(String) } + def to_realpath(path); end + + sig { returns(String) } + def version_string; end +end + +Tapioca::Gemfile::Gem::IGNORED_GEMS = T.let(T.unsafe(nil), Array) +Tapioca::Gemfile::Spec = T.type_alias { T.any(Gem::Specification, T.all(Bundler::RemoteSpecification, Bundler::StubSpecification)) } + +class Tapioca::Generator < ::Thor::Shell::Color + sig { params(config: Tapioca::Config).void } + def initialize(config); end + + sig { params(requested_constants: T::Array[String], should_verify: T::Boolean, quiet: T::Boolean).void } + def build_dsl(requested_constants, should_verify: T.unsafe(nil), quiet: T.unsafe(nil)); end + + sig { params(gem_names: T::Array[String]).void } + def build_gem_rbis(gem_names); end + + sig { void } + def build_requires; end + + sig { void } + def build_todos; end + + sig { returns(Tapioca::Config) } + def config; end + + sig { void } + def sync_rbis_with_gemfile; end + + private + + sig { params(filename: Pathname).void } + def add(filename); end + + sig { returns(T::Array[String]) } + def added_rbis; end + + sig { params(cause: Symbol, files: T::Array[String]).returns(String) } + def build_error_for_files(cause, files); end + + sig { returns(Tapioca::Gemfile) } + def bundle; end + + sig { params(constant_name: String, contents: String, outpath: Pathname, quiet: T::Boolean).returns(T.nilable(Pathname)) } + def compile_dsl_rbi(constant_name, contents, outpath: T.unsafe(nil), quiet: T.unsafe(nil)); end + + sig { params(gem: Tapioca::Gemfile::Gem).void } + def compile_gem_rbi(gem); end + + sig { returns(Tapioca::Compilers::SymbolTableCompiler) } + def compiler; end + + sig { params(constant_names: T::Array[String]).returns(T::Array[Module]) } + def constantize(constant_names); end + + sig { params(constant_name: String).returns(Pathname) } + def dsl_rbi_filename(constant_name); end + + sig { params(gem_name: String).returns(Pathname) } + def existing_rbi(gem_name); end + + sig { params(requested_constants: T::Array[String], path: Pathname).returns(T::Set[Pathname]) } + def existing_rbi_filenames(requested_constants, path: T.unsafe(nil)); end + + sig { returns(T::Hash[String, String]) } + def existing_rbis; end + + sig { params(gem_name: String).returns(Pathname) } + def expected_rbi(gem_name); end + + sig { returns(T::Hash[String, String]) } + def expected_rbis; end + + sig { params(file: String, error: LoadError).void } + def explain_failed_require(file, error); end + + sig { params(gem_name: String).returns(T::Boolean) } + def gem_rbi_exists?(gem_name); end + + sig { params(gem_name: String, version: String).returns(Pathname) } + def gem_rbi_filename(gem_name, version); end + + sig { params(gem_names: T::Array[String]).returns(T::Array[Tapioca::Gemfile::Gem]) } + def gems_to_generate(gem_names); end + + sig { params(eager_load: T::Boolean).void } + def load_application(eager_load:); end + + sig { void } + def load_dsl_generators; end + + sig { returns(Tapioca::Loader) } + def loader; end + + sig { params(old_filename: Pathname, new_filename: Pathname).void } + def move(old_filename, new_filename); end + + sig { void } + def perform_additions; end + + sig { params(dir: Pathname).void } + def perform_dsl_verification(dir); end + + sig { void } + def perform_removals; end + + sig { params(files: T::Set[Pathname]).void } + def purge_stale_dsl_rbi_files(files); end + + sig { params(path: Pathname).returns(T::Array[Pathname]) } + def rbi_files_in(path); end + + sig { params(command: String, reason: T.nilable(String), strictness: T.nilable(String)).returns(String) } + def rbi_header(command, reason: T.unsafe(nil), strictness: T.unsafe(nil)); end + + sig { params(filename: Pathname).void } + def remove(filename); end + + sig { returns(T::Array[String]) } + def removed_rbis; end + + sig { void } + def require_gem_file; end + + sig { params(message: String, color: T.any(Symbol, T::Array[Symbol])).void } + def say_error(message = T.unsafe(nil), *color); end + + sig { params(tmp_dir: Pathname).returns(T::Hash[String, Symbol]) } + def verify_dsl_rbi(tmp_dir:); end +end + +Tapioca::Generator::EMPTY_RBI_COMMENT = T.let(T.unsafe(nil), String) + +module Tapioca::GenericTypeRegistry + class << self + sig { params(constant: Module).returns(T.nilable(T::Hash[Integer, String])) } + def lookup_type_variables(constant); end + + sig { params(constant: T.untyped, types: T.untyped).returns(Module) } + def register_type(constant, types); end + + sig { params(constant: T.untyped, type_member: T::Types::TypeVariable, fixed: T.untyped, lower: T.untyped, upper: T.untyped).void } + def register_type_member(constant, type_member, fixed, lower, upper); end + + sig { params(constant: T.untyped, type_template: T::Types::TypeVariable, fixed: T.untyped, lower: T.untyped, upper: T.untyped).void } + def register_type_template(constant, type_template, fixed, lower, upper); end + + private + + sig { params(constant: Module, name: String).returns(Module) } + def create_generic_type(constant, name); end + + sig { params(constant: Class).returns(Class) } + def create_safe_subclass(constant); end + + sig { params(constant: Module).returns(T::Hash[Integer, String]) } + def lookup_or_initialize_type_variables(constant); end + + sig { params(constant: Module).returns(T.nilable(String)) } + def name_of(constant); end + + sig { params(object: BasicObject).returns(Integer) } + def object_id_of(object); end + + sig { params(constant: T.untyped, type_variable_type: T.enum([:type_member, :type_template]), type_variable: T::Types::TypeVariable, fixed: T.untyped, lower: T.untyped, upper: T.untyped).void } + def register_type_variable(constant, type_variable_type, type_variable, fixed, lower, upper); end + + sig { params(type_variable_type: Symbol, variance: Symbol, fixed: T.untyped, lower: T.untyped, upper: T.untyped).returns(String) } + def serialize_type_variable(type_variable_type, variance, fixed, lower, upper); end + end +end + +class Tapioca::Loader + sig { params(gemfile: Tapioca::Gemfile).void } + def initialize(gemfile); end + + sig { params(initialize_file: T.nilable(String), require_file: T.nilable(String)).void } + def load_bundle(initialize_file, require_file); end + + sig { params(environment_load: T::Boolean, eager_load: T::Boolean).void } + def load_rails(environment_load: T.unsafe(nil), eager_load: T.unsafe(nil)); end + + private + + sig { void } + def eager_load_rails_app; end + + sig { returns(Tapioca::Gemfile) } + def gemfile; end + + sig { void } + def load_rails_engines; end + + sig { void } + def load_rake; end + + sig { returns(T::Array[T.untyped]) } + def rails_engines; end + + sig { void } + def require_bundle; end + + sig { params(file: T.nilable(String)).void } + def require_helper(file); end + + sig { params(path: String).void } + def safe_require(path); end + + sig { void } + def silence_deprecations; end +end + +module Tapioca::RBI; end + +class Tapioca::RBI::BlockParam < ::Tapioca::RBI::Param + sig { override.params(v: Tapioca::RBI::Printer).void } + def accept_printer(v); end +end + +class Tapioca::RBI::Class < ::Tapioca::RBI::Scope + sig { params(name: String, superclass_name: T.nilable(String)).void } + def initialize(name, superclass_name: T.unsafe(nil)); end + + sig { returns(String) } + def name; end + + def name=(_arg0); end + + sig { returns(T.nilable(String)) } + def superclass_name; end + + def superclass_name=(_arg0); end +end + +class Tapioca::RBI::Const < ::Tapioca::RBI::Node + sig { params(name: String, value: String).void } + def initialize(name, value); end + + sig { override.params(v: Tapioca::RBI::Printer).void } + def accept_printer(v); end + + sig { returns(String) } + def name; end + + def value; end +end + +class Tapioca::RBI::Extend < ::Tapioca::RBI::Mixin; end + +class Tapioca::RBI::Group < ::Tapioca::RBI::Tree + sig { params(kind: Tapioca::RBI::Group::Kind).void } + def initialize(kind); end + + sig { override.params(v: Tapioca::RBI::Printer).void } + def accept_printer(v); end + + sig { returns(Tapioca::RBI::Group::Kind) } + def kind; end +end + +class Tapioca::RBI::Group::Kind < ::T::Enum + enums do + Mixins = new + Helpers = new + TypeMembers = new + MixesInClassMethods = new + TStructFields = new + TEnums = new + Inits = new + Methods = new + Consts = new + end +end + +class Tapioca::RBI::Helper < ::Tapioca::RBI::Node + sig { params(name: String).void } + def initialize(name); end + + sig { override.params(v: Tapioca::RBI::Printer).void } + def accept_printer(v); end + + sig { returns(String) } + def name; end +end + +class Tapioca::RBI::Include < ::Tapioca::RBI::Mixin; end + +class Tapioca::RBI::KwOptParam < ::Tapioca::RBI::OptParam + sig { override.params(v: Tapioca::RBI::Printer).void } + def accept_printer(v); end +end + +class Tapioca::RBI::KwParam < ::Tapioca::RBI::Param + sig { override.params(v: Tapioca::RBI::Printer).void } + def accept_printer(v); end +end + +class Tapioca::RBI::KwRestParam < ::Tapioca::RBI::Param + sig { override.params(v: Tapioca::RBI::Printer).void } + def accept_printer(v); end +end + +class Tapioca::RBI::Method < ::Tapioca::RBI::Node + sig { params(name: String, params: T::Array[Tapioca::RBI::Param], is_singleton: T::Boolean, visibility: Tapioca::RBI::Visibility, sigs: T::Array[Tapioca::RBI::Sig]).void } + def initialize(name, params: T.unsafe(nil), is_singleton: T.unsafe(nil), visibility: T.unsafe(nil), sigs: T.unsafe(nil)); end + + sig { params(param: Tapioca::RBI::Param).void } + def <<(param); end + + sig { override.params(v: Tapioca::RBI::Printer).void } + def accept_printer(v); end + + sig { returns(T::Boolean) } + def is_singleton; end + + def is_singleton=(_arg0); end + + sig { returns(String) } + def name; end + + def name=(_arg0); end + + sig { override.returns(T::Boolean) } + def oneline?; end + + sig { returns(T::Array[Tapioca::RBI::Param]) } + def params; end + + sig { returns(T::Array[Tapioca::RBI::Sig]) } + def sigs; end + + def sigs=(_arg0); end + + sig { returns(Tapioca::RBI::Visibility) } + def visibility; end + + def visibility=(_arg0); end +end + +class Tapioca::RBI::MixesInClassMethods < ::Tapioca::RBI::Mixin; end + +class Tapioca::RBI::Mixin < ::Tapioca::RBI::Node + abstract! + + sig { params(name: String).void } + def initialize(name); end + + sig { override.params(v: Tapioca::RBI::Printer).void } + def accept_printer(v); end + + sig { returns(String) } + def name; end +end + +class Tapioca::RBI::Module < ::Tapioca::RBI::Scope + sig { params(name: String).void } + def initialize(name); end + + sig { returns(String) } + def name; end + + def name=(_arg0); end +end + +class Tapioca::RBI::Node + abstract! + + sig { void } + def initialize; end + + sig { abstract.params(v: Tapioca::RBI::Printer).void } + def accept_printer(v); end + + sig { void } + def detach; end + + sig { returns(Tapioca::RBI::Group::Kind) } + def group_kind; end + + sig { returns(T::Boolean) } + def oneline?; end + + sig { returns(T.nilable(Tapioca::RBI::Tree)) } + def parent_tree; end + + def parent_tree=(_arg0); end + + sig { params(out: T.any(IO, StringIO), indent: Integer).void } + def print(out: T.unsafe(nil), indent: T.unsafe(nil)); end + + sig { params(indent: Integer).returns(String) } + def string(indent: T.unsafe(nil)); end +end + +class Tapioca::RBI::OptParam < ::Tapioca::RBI::Param + sig { params(name: String, value: String).void } + def initialize(name, value); end + + sig { override.params(v: Tapioca::RBI::Printer).void } + def accept_printer(v); end + + sig { returns(String) } + def value; end +end + +class Tapioca::RBI::Param < ::Tapioca::RBI::Node + sig { params(name: String).void } + def initialize(name); end + + sig { override.params(v: Tapioca::RBI::Printer).void } + def accept_printer(v); end + + sig { returns(String) } + def name; end +end + +class Tapioca::RBI::Printer < ::Tapioca::RBI::Visitor + sig { params(out: T.any(IO, StringIO), indent: Integer).void } + def initialize(out: T.unsafe(nil), indent: T.unsafe(nil)); end + + sig { void } + def dedent; end + + sig { returns(T::Boolean) } + def in_visibility_group; end + + def in_visibility_group=(_arg0); end + + sig { void } + def indent; end + + sig { returns(T.nilable(Tapioca::RBI::Node)) } + def previous_node; end + + sig { params(string: String).void } + def print(string); end + + sig { params(string: String).void } + def printl(string); end + + sig { params(string: T.nilable(String)).void } + def printn(string = T.unsafe(nil)); end + + sig { params(string: T.nilable(String)).void } + def printt(string = T.unsafe(nil)); end + + sig { override.params(node: T.nilable(Tapioca::RBI::Node)).void } + def visit(node); end + + sig { override.params(nodes: T::Array[Tapioca::RBI::Node]).void } + def visit_all(nodes); end +end + +class Tapioca::RBI::RestParam < ::Tapioca::RBI::Param + sig { override.params(v: Tapioca::RBI::Printer).void } + def accept_printer(v); end +end + +module Tapioca::RBI::Rewriters; end + +class Tapioca::RBI::Rewriters::GroupNodes < ::Tapioca::RBI::Visitor + sig { override.params(node: T.nilable(Tapioca::RBI::Node)).void } + def visit(node); end +end + +class Tapioca::RBI::Rewriters::NestNonPublicMethods < ::Tapioca::RBI::Visitor + sig { override.params(node: T.nilable(Tapioca::RBI::Node)).void } + def visit(node); end +end + +class Tapioca::RBI::Rewriters::NestSingletonMethods < ::Tapioca::RBI::Visitor + sig { override.params(node: T.nilable(Tapioca::RBI::Node)).void } + def visit(node); end +end + +class Tapioca::RBI::Rewriters::SortNodes < ::Tapioca::RBI::Visitor + sig { override.params(node: T.nilable(Tapioca::RBI::Node)).void } + def visit(node); end + + private + + sig { params(kind: Tapioca::RBI::Group::Kind).returns(Integer) } + def kind_rank(kind); end + + sig { params(node: Tapioca::RBI::Node).returns(T.nilable(String)) } + def node_name(node); end + + sig { params(node: Tapioca::RBI::Node).returns(Integer) } + def node_rank(node); end +end + +class Tapioca::RBI::Scope < ::Tapioca::RBI::Tree + abstract! + + def initialize(*args, &blk); end + + sig { override.params(v: Tapioca::RBI::Printer).void } + def accept_printer(v); end +end + +class Tapioca::RBI::Sig < ::Tapioca::RBI::Node + sig { params(params: T::Array[Tapioca::RBI::SigParam], return_type: T.nilable(String), is_abstract: T::Boolean, is_override: T::Boolean, is_overridable: T::Boolean, type_params: T::Array[String]).void } + def initialize(params: T.unsafe(nil), return_type: T.unsafe(nil), is_abstract: T.unsafe(nil), is_override: T.unsafe(nil), is_overridable: T.unsafe(nil), type_params: T.unsafe(nil)); end + + sig { params(param: Tapioca::RBI::SigParam).void } + def <<(param); end + + sig { override.params(v: Tapioca::RBI::Printer).void } + def accept_printer(v); end + + sig { returns(T::Boolean) } + def is_abstract; end + + def is_abstract=(_arg0); end + def is_overridable; end + def is_overridable=(_arg0); end + def is_override; end + def is_override=(_arg0); end + + sig { returns(T::Array[Tapioca::RBI::SigParam]) } + def params; end + + sig { returns(T.nilable(String)) } + def return_type; end + + def return_type=(_arg0); end + + sig { returns(T::Array[String]) } + def type_params; end +end + +class Tapioca::RBI::SigParam < ::Tapioca::RBI::Node + sig { params(name: String, type: String).void } + def initialize(name, type); end + + sig { override.params(v: Tapioca::RBI::Printer).void } + def accept_printer(v); end + + sig { returns(String) } + def name; end + + def type; end +end + +class Tapioca::RBI::SingletonClass < ::Tapioca::RBI::Scope + sig { void } + def initialize; end +end + +class Tapioca::RBI::TEnum < ::Tapioca::RBI::Class + sig { params(name: String).void } + def initialize(name); end +end + +class Tapioca::RBI::TEnumBlock < ::Tapioca::RBI::Node + sig { params(names: T::Array[String]).void } + def initialize(names = T.unsafe(nil)); end + + sig { override.params(v: Tapioca::RBI::Printer).void } + def accept_printer(v); end + + sig { returns(T::Boolean) } + def empty?; end + + sig { returns(T::Array[String]) } + def names; end +end + +class Tapioca::RBI::TStruct < ::Tapioca::RBI::Class + sig { params(name: String).void } + def initialize(name); end +end + +class Tapioca::RBI::TStructConst < ::Tapioca::RBI::TStructField; end + +class Tapioca::RBI::TStructField < ::Tapioca::RBI::Node + abstract! + + sig { params(name: String, type: String, default: T.nilable(String)).void } + def initialize(name, type, default: T.unsafe(nil)); end + + sig { override.params(v: Tapioca::RBI::Printer).void } + def accept_printer(v); end + + sig { returns(T.nilable(String)) } + def default; end + + def default=(_arg0); end + + sig { returns(String) } + def name; end + + def name=(_arg0); end + def type; end + def type=(_arg0); end +end + +class Tapioca::RBI::TStructProp < ::Tapioca::RBI::TStructField; end + +class Tapioca::RBI::Tree < ::Tapioca::RBI::Node + sig { void } + def initialize; end + + sig { params(node: Tapioca::RBI::Node).void } + def <<(node); end + + sig { override.params(v: Tapioca::RBI::Printer).void } + def accept_printer(v); end + + sig { returns(T::Boolean) } + def empty?; end + + sig { void } + def group_nodes!; end + + sig { void } + def nest_non_public_methods!; end + + sig { void } + def nest_singleton_methods!; end + + sig { returns(T::Array[Tapioca::RBI::Node]) } + def nodes; end + + sig { override.returns(T::Boolean) } + def oneline?; end + + sig { void } + def sort_nodes!; end +end + +class Tapioca::RBI::TypeMember < ::Tapioca::RBI::Node + sig { params(name: String, value: String).void } + def initialize(name, value); end + + sig { override.params(v: Tapioca::RBI::Printer).void } + def accept_printer(v); end + + sig { returns(String) } + def name; end + + def value; end +end + +class Tapioca::RBI::Visibility < ::Tapioca::RBI::Node + abstract! + + sig { params(visibility: Symbol).void } + def initialize(visibility); end + + sig { override.params(v: Tapioca::RBI::Printer).void } + def accept_printer(v); end + + sig { returns(T::Boolean) } + def public?; end + + sig { returns(Symbol) } + def visibility; end +end + +Tapioca::RBI::Visibility::Private = T.let(T.unsafe(nil), Tapioca::RBI::Visibility) +Tapioca::RBI::Visibility::Protected = T.let(T.unsafe(nil), Tapioca::RBI::Visibility) +Tapioca::RBI::Visibility::Public = T.let(T.unsafe(nil), Tapioca::RBI::Visibility) + +class Tapioca::RBI::VisibilityGroup < ::Tapioca::RBI::Tree + sig { params(visibility: Tapioca::RBI::Visibility).void } + def initialize(visibility); end + + sig { override.params(v: Tapioca::RBI::Printer).void } + def accept_printer(v); end + + sig { returns(Tapioca::RBI::Visibility) } + def visibility; end +end + +class Tapioca::RBI::Visitor + abstract! + + def initialize(*args, &blk); end + + sig { abstract.params(node: T.nilable(Tapioca::RBI::Node)).void } + def visit(node); end + + sig { params(nodes: T::Array[Tapioca::RBI::Node]).void } + def visit_all(nodes); end +end + +Tapioca::VERSION = T.let(T.unsafe(nil), String)
true
Other
Homebrew
brew
fcc3c4f84d005a43f33db3ce536350ff1c25c4ae.json
Update RBI files for nokogiri.
Library/Homebrew/sorbet/rbi/gems/nokogiri@1.11.5.rbi
@@ -581,6 +581,8 @@ Nokogiri::LIBXML_ICONV_ENABLED = T.let(T.unsafe(nil), TrueClass) Nokogiri::LIBXML_LOADED_VERSION = T.let(T.unsafe(nil), String) +Nokogiri::LIBXML_MEMORY_MANAGEMENT = T.let(T.unsafe(nil), String) + Nokogiri::LIBXSLT_COMPILED_VERSION = T.let(T.unsafe(nil), String) Nokogiri::LIBXSLT_LOADED_VERSION = T.let(T.unsafe(nil), String)
false
Other
Homebrew
brew
08bbb95cfba4ba755fc45e427b33802fab9e9cc1.json
Add `to_kegs` test
Library/Homebrew/test/cli/named_args_spec.rb
@@ -176,6 +176,26 @@ def setup_unredable_cask(name) end end + describe "#to_kegs" do + before do + (HOMEBREW_CELLAR/"foo/1.0").mkpath + (HOMEBREW_CELLAR/"foo/2.0").mkpath + (HOMEBREW_CELLAR/"bar/1.0").mkpath + end + + it "resolves kegs with #resolve_kegs" do + expect(described_class.new("foo", "bar").to_kegs.map(&:name)).to eq ["foo", "foo", "bar"] + end + + it "resolves kegs with multiple versions with #resolve_keg" do + expect(described_class.new("foo").to_kegs.map(&->(k) { k.version.version })).to eq ["1.0", "2.0"] + end + + it "when there are no matching kegs returns an array of Kegs" do + expect(described_class.new.to_kegs).to be_empty + end + end + describe "#to_default_kegs" do before do (HOMEBREW_CELLAR/"foo/1.0").mkpath
false
Other
Homebrew
brew
ddcb0519b6740eb4147e7520de424e895c0318bc.json
feat: add branch param
Library/Homebrew/dev-cmd/pr-publish.rb
@@ -19,6 +19,8 @@ def pr_publish_args switch "--autosquash", description: "If supported on the target tap, automatically reformat and reword commits "\ "in the pull request to our preferred format." + flag "--branch=", + description: "Branch to publish (default: `master`)." flag "--message=", depends_on: "--autosquash", description: "Message to include when autosquashing revision bumps, deletions, and rebuilds." @@ -36,7 +38,7 @@ def pr_publish tap = Tap.fetch(args.tap || CoreTap.instance.name) workflow = args.workflow || "publish-commit-bottles.yml" - ref = "master" + ref = args.branch || "master" extra_args = [] extra_args << "--autosquash" if args.autosquash?
false
Other
Homebrew
brew
6bcb3bd3678f3975e79a4688a1766ad940b5cfc4.json
docs: clarify link to above section
docs/Homebrew-brew-Maintainer-Guide.md
@@ -60,7 +60,7 @@ There are many checks that run on every PR. The following is a quick list of the any new/changed dependencies. See [Type Checking With Sorbet](Typechecking.md) for more information about RBI files and typechecking. - `Triage / review`: This verifies that the PR has been open for long enough. - See [above](#automatic-approvals) for more information about automatic approvals. + See the ["Automatic approvals" section above](#automatic-approvals) for more information about automatic approvals. - `codecov/patch` and `codecov/project`: These show the Codecov report for the PR. See the ["`brew tests` and Codecov" section below](#brew-tests-and-codecov) for more info about Codecov. - `CI / vendored gems (Linux)`: This checks whether there was a change to the vendored gems on Linux that needs to be
false
Other
Homebrew
brew
ac6b4dbe6e6921f6cb33fbbd87d4f39416a6af90.json
docs: update new maintainer checklist
docs/New-Maintainer-Checklist.md
@@ -26,28 +26,24 @@ contribute to Homebrew, but we will ask you to step down as a maintainer. A few requests: -- Please make pull requests on any changes to Homebrew/brew code or any - non-trivial (e.g. not a test or audit improvement or version bump) changes - to formulae code and don't merge them unless you get at least one approval +- Please make pull requests for any changes in the Homebrew repositories (instead + of committing directly) and don't merge them unless you get at least one approval and passing tests. -- In Homebrew/brew, close pull requests using GitHub's "Merge pull request" - button in "Create a merge commit" mode. -- In Homebrew/homebrew-core, use `brew pr-publish` to close pull requests - that require new bottles or change multiple formulae. Note that an approving - review on a pull request for an existing formula will trigger this automatically. - If commits need to be amended use `brew pr-pull` instead. Let these commands - auto-close issues whenever possible (it may take up to 5 minutes). If in doubt, - check with e.g. Fork.app that you've not accidentally added merge commits. - If bottles are unnecessary, use GitHub's "Merge pull request" button in - "Squash and merge" mode for a single formula change. +- Please review the Maintainer Guidelines at https://docs.brew.sh/Maintainer-Guidelines +- Please review the team-specific guides for whichever teams you will be a part of. + Here are links to these guides: + - Homebrew/brew: https://docs.brew.sh/Homebrew-brew-Maintainer-Guide + - Homebrew/homebrew-core: https://docs.brew.sh/Homebrew-homebrew-core-Maintainer-Guide + - Homebrew/linuxbrew-core: https://docs.brew.sh/Homebrew-linuxbrew-core-Maintainer-Guide + - Homebrew/homebrew-cask: https://docs.brew.sh/Homebrew-homebrew-cask-Maintainer-Guide - Still create your branches on your fork rather than in the main repository. Note GitHub's UI will create edits and reverts on the main repository if you make edits or click "Revert" on the Homebrew/brew repository rather than your own fork. - If still in doubt please ask for help and we'll help you out. - Please read: - - https://docs.brew.sh/Brew-Test-Bot-For-Core-Contributors - https://docs.brew.sh/Maintainer-Guidelines + - the team-specific guides linked above and in the maintainer guidelines - anything else you haven't read on https://docs.brew.sh How does that sound?
false
Other
Homebrew
brew
847d7a233d611992e07228089a1d79e261c1f6d7.json
Update RBI files for rubocop.
Library/Homebrew/sorbet/rbi/gems/rubocop@1.15.0.rbi
@@ -943,6 +943,7 @@ module RuboCop::Cop::CheckLineBreakable def extract_first_element_over_column_limit(node, elements, max); end def process_args(args); end def safe_to_ignore?(node); end + def shift_elements_for_heredoc_arg(node, elements, index); end def within_column_limit?(element, max, line); end end @@ -1450,6 +1451,7 @@ module RuboCop::Cop::FrozenStringLiteral def frozen_string_literal_comment_exists?; end def frozen_string_literal_specified?; end + def frozen_string_literals_disabled?; end def frozen_string_literals_enabled?; end def leading_comment_lines; end @@ -1866,9 +1868,10 @@ class RuboCop::Cop::Layout::ArgumentAlignment < ::RuboCop::Cop::Base private def autocorrect(corrector, node); end - def base_column(node, args); end + def base_column(node, first_argument); end def fixed_indentation?; end def message(_node); end + def multiple_arguments?(node, first_argument); end def target_method_lineno(node); end end @@ -2669,12 +2672,14 @@ class RuboCop::Cop::Layout::FirstHashElementIndentation < ::RuboCop::Cop::Base private + def argument_alignment_config; end def autocorrect(corrector, node); end def base_description(left_parenthesis); end def brace_alignment_style; end def check(hash_node, left_parenthesis); end def check_based_on_longest_key(hash_node, left_brace, left_parenthesis); end def check_right_brace(right_brace, left_brace, left_parenthesis); end + def enforce_first_argument_with_fixed_indentation?; end def message(base_description); end def message_for_right_brace(left_parenthesis); end def separator_style?(first_pair); end @@ -2753,12 +2758,14 @@ class RuboCop::Cop::Layout::HashAlignment < ::RuboCop::Cop::Base def alignment_for(pair); end def alignment_for_colons; end def alignment_for_hash_rockets; end + def argument_alignment_config; end def check_delta(delta, node:, alignment:); end def check_pairs(node); end def correct_key_value(corrector, delta, key, value, separator); end def correct_no_value(corrector, key_delta, key); end def correct_node(corrector, node, delta); end def double_splat?(node); end + def enforce_first_argument_with_fixed_indentation?; end def good_alignment?(column_deltas); end def ignore_hash_argument?(node); end def new_alignment(key); end @@ -4375,6 +4382,7 @@ class RuboCop::Cop::Lint::EmptyBlock < ::RuboCop::Cop::Base def allow_comment?(node); end def allow_empty_lambdas?; end def comment_disables_cop?(comment); end + def lambda_or_proc?(node); end end RuboCop::Cop::Lint::EmptyBlock::MSG = T.let(T.unsafe(nil), String) @@ -7585,6 +7593,7 @@ class RuboCop::Cop::Style::ClassAndModuleChildren < ::RuboCop::Cop::Base def compact_identifier_name(node); end def compact_node(corrector, node); end def compact_node_name?(node); end + def compact_replacement(node); end def indent_width; end def leading_spaces(node); end def needs_compacting?(body); end @@ -8225,6 +8234,7 @@ class RuboCop::Cop::Style::EmptyLiteral < ::RuboCop::Cop::Base def correction(node); end def enforce_double_quotes?; end def first_argument_unparenthesized?(node); end + def frozen_strings?; end def offense_array_node?(node); end def offense_hash_node?(node); end def offense_message(node); end @@ -9681,6 +9691,10 @@ class RuboCop::Cop::Style::NilLambda < ::RuboCop::Cop::Base def nil_return?(param0 = T.unsafe(nil)); end def on_block(node); end + + private + + def autocorrect(corrector, node); end end RuboCop::Cop::Style::NilLambda::MSG = T.let(T.unsafe(nil), String) @@ -11291,6 +11305,18 @@ RuboCop::Cop::Style::TernaryParentheses::NON_COMPLEX_TYPES = T.let(T.unsafe(nil) RuboCop::Cop::Style::TernaryParentheses::VARIABLE_TYPES = T.let(T.unsafe(nil), Set) +class RuboCop::Cop::Style::TopLevelMethodDefinition < ::RuboCop::Cop::Base + def define_method_block?(param0 = T.unsafe(nil)); end + def on_block(node); end + def on_def(node); end + def on_defs(node); end + def on_send(node); end +end + +RuboCop::Cop::Style::TopLevelMethodDefinition::MSG = T.let(T.unsafe(nil), String) + +RuboCop::Cop::Style::TopLevelMethodDefinition::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + class RuboCop::Cop::Style::TrailingBodyOnClass < ::RuboCop::Cop::Base include(::RuboCop::Cop::Alignment) include(::RuboCop::Cop::TrailingBody) @@ -12576,6 +12602,7 @@ end class RuboCop::Formatter::JUnitFormatter < ::RuboCop::Formatter::BaseFormatter def initialize(output, options = T.unsafe(nil)); end + def add_testcase_element_to_testsuite_element(file, target_offenses, cop); end def classname_attribute_value(file); end def file_finished(file, offenses); end def finished(_inspected_files); end @@ -12585,6 +12612,7 @@ class RuboCop::Formatter::JUnitFormatter < ::RuboCop::Formatter::BaseFormatter private def add_failure_to(testcase, offenses, cop_name); end + def reset_count; end end class RuboCop::Formatter::OffenseCountFormatter < ::RuboCop::Formatter::BaseFormatter @@ -12855,7 +12883,7 @@ class RuboCop::OptionsValidator def initialize(options); end def boolean_or_empty_cache?; end - def disable_parallel_when_invalid_combo; end + def disable_parallel_when_invalid_option_combo; end def display_only_fail_level_offenses_with_autocorrect?; end def except_syntax?; end def incompatible_options; end @@ -12867,7 +12895,6 @@ class RuboCop::OptionsValidator def validate_cop_options; end def validate_display_only_failed; end def validate_exclude_limit_option; end - def validate_parallel; end class << self def validate_cop_list(names); end
true
Other
Homebrew
brew
847d7a233d611992e07228089a1d79e261c1f6d7.json
Update RBI files for rubocop.
Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi
@@ -26784,6 +26784,7 @@ end module RuboCop::AST::NodePattern::Sets SET_BUILD_RECOMMENDED_TEST_OPTIONAL = ::T.let(nil, ::T.untyped) + SET_DEFINE_METHOD = ::T.let(nil, ::T.untyped) SET_DEPENDS_ON_USES_FROM_MACOS = ::T.let(nil, ::T.untyped) SET_INCLUDE_WITH_WITHOUT = ::T.let(nil, ::T.untyped) SET_SYSTEM_SHELL_OUTPUT_PIPE_OUTPUT = ::T.let(nil, ::T.untyped)
true
Other
Homebrew
brew
69e29a358bb1bdea66db3d02e852a4858a11becd.json
Raise errors on invalid symbol/block combinations
Library/Homebrew/formula.rb
@@ -2924,8 +2924,13 @@ def service(&block) def pour_bottle?(reason: nil, &block) @pour_bottle_check = PourBottleCheck.new(self) - if reason == :clt_required - block = lambda do |_| + if reason.present? && block.present? + raise ArgumentError, "Do not pass both a reason and a block to `pour_bottle?`" + end + + block ||= case reason + when :clt_required + lambda do |_| on_macos do T.cast(self, PourBottleCheck).reason(+<<~EOS) The bottle needs the Apple Command Line Tools to be installed. @@ -2935,6 +2940,8 @@ def pour_bottle?(reason: nil, &block) T.cast(self, PourBottleCheck).satisfy { MacOS::CLT.installed? } end end + else + raise ArgumentError, "Invalid `pour_bottle?` reason" if reason.present? end @pour_bottle_check.instance_eval(&block)
true
Other
Homebrew
brew
69e29a358bb1bdea66db3d02e852a4858a11becd.json
Raise errors on invalid symbol/block combinations
Library/Homebrew/test/formula_spec.rb
@@ -1021,6 +1021,29 @@ def pour_bottle? expect(f).to pour_bottle end + + it "throws an error if passed both a symbol and a block" do + expect do + formula "foo" do + url "foo-1.0" + + pour_bottle? reason: :clt_required do + reason "true reason" + satisfy { true } + end + end + end.to raise_error(ArgumentError, "Do not pass both a reason and a block to `pour_bottle?`") + end + + it "throws an error if passed an invalid symbol" do + expect do + formula "foo" do + url "foo-1.0" + + pour_bottle? reason: :foo + end + end.to raise_error(ArgumentError, "Invalid `pour_bottle?` reason") + end end describe "alias changes" do
true
Other
Homebrew
brew
212b64836f6e0fe76e11169caf8c6db7a12f34c7.json
Update usage message
Library/Homebrew/cmd/link.rb
@@ -27,7 +27,7 @@ def link_args switch "-f", "--force", description: "Allow keg-only formulae to be linked." switch "--HEAD", - description: "If it is installed, link the HEAD version." + description: "Link the HEAD version of the formula if it is installed." named_args :installed_formula, min: 1 end
false
Other
Homebrew
brew
fb3bfbb65c75227abce523aa2446c3e8f390e3da.json
Remove prefix option and add reason argument name
Library/Homebrew/formula.rb
@@ -2920,21 +2920,12 @@ def service(&block) # the {Formula} will be built from source and `reason` will be printed. # # Alternatively, a preset reason can be passed as a symbol: - # <pre>pour_bottle? :default_prefix_required</pre> - # <pre>pour_bottle? :clt_required</pre> - def pour_bottle?(requirement = nil, &block) + # <pre>pour_bottle? reason: :clt_required</pre> + def pour_bottle?(reason: nil, &block) @pour_bottle_check = PourBottleCheck.new(self) - block ||= case requirement - when :default_prefix_required - lambda do |_| - T.cast(self, PourBottleCheck).reason(+<<~EOS) - The bottle needs to be installed into #{Homebrew::DEFAULT_PREFIX}. - EOS - T.cast(self, PourBottleCheck).satisfy { HOMEBREW_PREFIX.to_s == Homebrew::DEFAULT_PREFIX } - end - when :clt_required - lambda do |_| + if reason == :clt_required + block = lambda do |_| on_macos do T.cast(self, PourBottleCheck).reason(+<<~EOS) The bottle needs the Apple Command Line Tools to be installed.
true
Other
Homebrew
brew
fb3bfbb65c75227abce523aa2446c3e8f390e3da.json
Remove prefix option and add reason argument name
Library/Homebrew/test/formula_spec.rb
@@ -997,26 +997,26 @@ def pour_bottle? end it "returns false when set with a symbol" do - # Ensure that prefix does not match the default - stub_const "Homebrew::DEFAULT_PREFIX", "foo" + # Pretend CLT is not installed + allow(MacOS::CLT).to receive(:installed?).and_return(false) f = formula "foo" do url "foo-1.0" - pour_bottle? :default_prefix_required + pour_bottle? reason: :clt_required end expect(f).not_to pour_bottle end it "returns true when set with a symbol" do - # Ensure that prefix matches the default - stub_const "Homebrew::DEFAULT_PREFIX", HOMEBREW_PREFIX.to_s + # Pretend CLT is installed + allow(MacOS::CLT).to receive(:installed?).and_return(true) f = formula "foo" do url "foo-1.0" - pour_bottle? :default_prefix_required + pour_bottle? reason: :clt_required end expect(f).to pour_bottle
true
Other
Homebrew
brew
e8b5eb7e42c925b7cc10c78a029b8c70e4d7965b.json
extend/os/mac/keg_relocate: fix relocation of duplicate `RPATH`s Homebrew/homebrew-core#77623 revealed two bugs. One in `ruby-macho`, which turns out to be unable to delete duplicated `RPATH`s. This was fixed with `ruby-macho` 2.5.1. The second, which this commit fixes, is in our handling of duplicate `RPATH`s. Since we iterate over each `RPATH`, attempting to relocate the first duplicate fails since it will no longer exist after having relocated the original.
Library/Homebrew/extend/os/mac/keg_relocate.rb
@@ -94,6 +94,7 @@ def fixed_name(file, bad_name) def each_linkage_for(file, linkage_type, &block) links = file.method(linkage_type) .call + .uniq .reject { |fn| fn =~ /^@(loader_|executable_|r)path/ } links.each(&block) end
false
Other
Homebrew
brew
41baec1a497ba0da1e1e28d55b8d8a197ff7ceb5.json
Update RBI files for ruby-macho.
Library/Homebrew/sorbet/rbi/gems/ruby-macho@2.5.1.rbi
@@ -1,6 +1,6 @@ # DO NOT EDIT MANUALLY # This is an autogenerated file for types exported from the `ruby-macho` gem. -# Please instead update this file by running `tapioca sync`. +# Please instead update this file by running `bin/tapioca sync`. # typed: true
false
Other
Homebrew
brew
5e9fcafbd8af57a5166c105f8aab3ca38edcfa63.json
formula: add preset `pour_bottle?` symbols
Library/Homebrew/formula.rb
@@ -2918,8 +2918,34 @@ def service(&block) # # If `satisfy` returns `false` then a bottle will not be used and instead # the {Formula} will be built from source and `reason` will be printed. - def pour_bottle?(&block) + # + # Alternatively, a preset reason can be passed as a symbol: + # <pre>pour_bottle? :default_prefix_required</pre> + # <pre>pour_bottle? :clt_required</pre> + def pour_bottle?(requirement = nil, &block) @pour_bottle_check = PourBottleCheck.new(self) + + block ||= case requirement + when :default_prefix_required + lambda do |_| + T.cast(self, PourBottleCheck).reason(+<<~EOS) + The bottle needs to be installed into #{Homebrew::DEFAULT_PREFIX}. + EOS + T.cast(self, PourBottleCheck).satisfy { HOMEBREW_PREFIX.to_s == Homebrew::DEFAULT_PREFIX } + end + when :clt_required + lambda do |_| + on_macos do + T.cast(self, PourBottleCheck).reason(+<<~EOS) + The bottle needs the Apple Command Line Tools to be installed. + You can install them, if desired, with: + xcode-select --install + EOS + T.cast(self, PourBottleCheck).satisfy { MacOS::CLT.installed? } + end + end + end + @pour_bottle_check.instance_eval(&block) end
true
Other
Homebrew
brew
5e9fcafbd8af57a5166c105f8aab3ca38edcfa63.json
formula: add preset `pour_bottle?` symbols
Library/Homebrew/test/formula_spec.rb
@@ -995,6 +995,31 @@ def pour_bottle? expect(f).to pour_bottle end + + it "returns false when set with a symbol" do + f = formula "foo" do + url "foo-1.0" + + pour_bottle? :default_prefix_required + end + + # Homebrew::DEFAULT_PREFIX is still /usr/local or /opt/homebrew + # and HOMEBREW_PREFIX is a temporary test directory + expect(f).not_to pour_bottle + end + + it "returns true when set with a symbol" do + # Ensure that prefix matches the default + stub_const "Homebrew::DEFAULT_PREFIX", HOMEBREW_PREFIX.to_s + + f = formula "foo" do + url "foo-1.0" + + pour_bottle? :default_prefix_required + end + + expect(f).to pour_bottle + end end describe "alias changes" do
true
Other
Homebrew
brew
a079ba9bb389de0d4a849042f45dad6d9ccd31d9.json
Add parentheses for clarity
Library/Homebrew/utils/curl.rb
@@ -138,7 +138,7 @@ def curl_download(*args, to: nil, try_partial: true, **options) # Any value for `accept-ranges` other than none indicates that the server supports partial requests. # Its absence indicates no support. - supports_partial = headers.key? "accept-ranges" && headers["accept-ranges"] != "none" + supports_partial = headers.key?("accept-ranges") && headers["accept-ranges"] != "none" if supports_partial && destination.exist? &&
false
Other
Homebrew
brew
a1566212976072d8b5b95f5b335a3d98f77c713d.json
Simplify header parsing
Library/Homebrew/utils/curl.rb
@@ -121,10 +121,8 @@ def curl(*args, print_stdout: true, **options) def parse_headers(headers) return {} unless headers - headers.split("\n").to_h do |h| - partitioned = h.partition(": ") - [partitioned.first, partitioned.last] - end + # Skip status code + headers.split("\r\n")[2..].to_h { |h| h.split(": ") } end def curl_download(*args, to: nil, try_partial: true, **options)
false
Other
Homebrew
brew
5f62f417fd1b86bb664afa364d2af2972bb489d6.json
add error message that cask was installed manually
Library/Homebrew/cask/cmd/upgrade.rb
@@ -97,6 +97,11 @@ def self.upgrade_casks( cask.artifacts.any?(Artifact::Installer::ManualInstaller) end + if manual_installer_casks.present? + ofail "Not upgrading #{manual_installer_casks.count} casks because they was install manually" + puts manual_installer_casks.map(&:to_s) + end + outdated_casks -= manual_installer_casks return false if outdated_casks.empty?
false
Other
Homebrew
brew
16e707254391d50de331489d42ed5c36e4b0c722.json
Fix argument order
Library/Homebrew/utils/curl.rb
@@ -119,6 +119,8 @@ def curl(*args, print_stdout: true, **options) end def parse_headers(headers) + return {} unless headers + headers.split("\n").to_h do |h| partitioned = h.partition(": ") [partitioned.first, partitioned.last] @@ -145,10 +147,9 @@ def curl_download(*args, to: nil, try_partial: true, **options) end end - - args += ["--location", "--remote-time", "--output", destination] + args = ["--location", "--remote-time", "--output", destination] + args # continue-at shouldn't be used with servers that don't support partial requests. - args += ["--continue-at", "-"] if destination.exist? && supports_partial + args = ["--continue-at", "-"] + args if destination.exist? && supports_partial curl(*args, **options) end
false
Other
Homebrew
brew
df0915e33f554cf0139e83359cae867393d31b6f.json
Check partial request support with Accept-Ranges
Library/Homebrew/utils/curl.rb
@@ -130,23 +130,22 @@ def curl_download(*args, to: nil, try_partial: true, **options) destination.dirname.mkpath if try_partial - range_stdout = curl_output("--location", "--range", "0-1", - "--dump-header", "-", - "--write-out", "%\{http_code}", + range_stdout = curl_output("--location", "--dump-header", "-", "--head", *args, **options).stdout - headers, _, http_status = range_stdout.partition("\r\n\r\n") + headers = parse_headers(range_stdout.split("\r\n\r\n").first) - supports_partial_download = http_status.to_i == 206 # Partial Content - if supports_partial_download && + # Any value for `accept-ranges` other than none indicates that the server supports range requests. + # Its absence indicates no support. + supports_partial = headers["accept-ranges"] && headers["accept-ranges"] != "none" + + if supports_partial && destination.exist? && - destination.size == %r{^.*Content-Range: bytes \d+-\d+/(\d+)\r\n.*$}m.match(headers)&.[](1)&.to_i + destination.size == headers["content-length"].to_i return # We've already downloaded all the bytes end - else - supports_partial_download = false end - continue_at = if destination.exist? && supports_partial_download + continue_at = if destination.exist? && supports_partial "-" else 0
false
Other
Homebrew
brew
b9b917756c6408f20a341fe47fe0385d067f14d1.json
Add header parsing
Library/Homebrew/utils/curl.rb
@@ -118,6 +118,13 @@ def curl(*args, print_stdout: true, **options) result end + def parse_headers(headers) + headers.split("\n").to_h do |h| + partitioned = h.partition(": ") + [partitioned.first, partitioned.last] + end + end + def curl_download(*args, to: nil, try_partial: true, **options) destination = Pathname(to) destination.dirname.mkpath
false
Other
Homebrew
brew
aa989bd55a2013c9858e19455c700b707d65021e.json
Change inititial partial request to HEAD request
Library/Homebrew/utils/curl.rb
@@ -118,15 +118,15 @@ def curl(*args, print_stdout: true, **options) result end - def curl_download(*args, to: nil, partial: true, **options) + def curl_download(*args, to: nil, try_partial: true, **options) destination = Pathname(to) destination.dirname.mkpath - if partial + if try_partial range_stdout = curl_output("--location", "--range", "0-1", "--dump-header", "-", "--write-out", "%\{http_code}", - "--output", "/dev/null", *args, **options).stdout + "--head", *args, **options).stdout headers, _, http_status = range_stdout.partition("\r\n\r\n") supports_partial_download = http_status.to_i == 206 # Partial Content
false
Other
Homebrew
brew
73ca9a0e05efa24c9e26011271729589d48e481b.json
docs: add cask cookbook link to maintainer guidlines
docs/Maintainer-Guidelines.md
@@ -5,7 +5,7 @@ access** to Homebrew’s repository and help merge the contributions of others. You may find what is written here interesting, but it’s definitely not a beginner’s guide. -Maybe you were looking for the [Formula Cookbook](Formula-Cookbook.md)? +Maybe you were looking for the [Formula Cookbook](Formula-Cookbook.md) or [Cask Cookbook](Cask-Cookbook.md)? ## Overview
false
Other
Homebrew
brew
0f472906222c16c4d33265446cb5ddcc0c41e788.json
docs: add cask maintainer guide
docs/Cask-Maintainer-Guide.md
@@ -0,0 +1,59 @@ +# Cask Maintainer Guide + +This guide is intended to help maintainers effectively maintain the cask repositories. +It is meant to be used in conjunction with the more generic [Maintainer Guidelines](Maintainer-Guidelines.md). + +This guide applies to all four of the cask repositories: + +- [Homebrew/homebrew-cask](https://github.com/Homebrew/homebrew-cask): The main cask repository +- [Homebrew/homebrew-cask-drivers](https://github.com/Homebrew/homebrew-cask-drivers): Casks of drivers +- [Homebrew/homebrew-cask-fonts](https://github.com/Homebrew/homebrew-cask-fonts): Casks of fonts +- [Homebrew/homebrew-cask-versions](https://github.com/Homebrew/homebrew-cask-versions): Alternate versions of Casks + +## Common Situations + +Here is a list of the most common situations that arise in PRs and how to handle them: + +- The `version` and `sha256` both change (keeping the same format): Merge +- Only the `sha256` changes: Merge unless the version needs to be updated as well. + It’s not uncommon for upstream vendors to update versions in-place. +- `livecheck` is updated: Use your best judgement and try to make sure that the changes + follow the [`livecheck` guidelines](Brew-Livecheck.md). +- Only the `version` changes or the `version` format changes: Use your best judgement and + merge if it seems correct (this is relatively rare). +- Other changes (including adding new casks): Use the [Cask Cookbook](Cask-Cookbook.md) to determine what's correct. + +If in doubt, ask another cask maintainer on GitHub or Slack. + +Note that unlike in formulae, casks do not consider the `sha256` stanza as meaningful security measure as maintainers cannot realistically check them for authenticity. Casks download from upstream; if a malicious actor compromised a URL, they could just as well compromise a version and make it look like an update. + +## Merging + +### Approvals + +In general, PRs in the cask repositories should have at least one approval from a maintainer +before being merged. + +If desired, a maintainer can self-approve one of their PRs using the +`self-approve` GitHub Actions workflow to satisfy this requirement. To trigger a self-approval, navigate to the +["Self-approve a Pull Request" section of the Actions tab](https://github.com/Homebrew/homebrew-cask/actions/workflows/self-approve.yml), +click on "Run workflow", enter the PR number and click "Run workflow". + +### Merge Types + +In general, using GitHub's Squash and Merge button is the best way to merge a PR. This can be used when +the PR modifies only one cask, regardless of the number of commits or whether the commit message +format is correct. When merging using this method, the commit message can be modified if needed. +Usually, version bump commit messages follow the form `Update CASK from OLD_VERSION to NEW_VERSION`. + +If the PR modifies multiple casks, use the Rebase and Merge button to merge the PR. This will use the +commit messages from the PR, so make sure that they are appropriate before merging. If needed, +checkout the PR, squash/reword the commits and force-push back to the PR branch to ensure the proper commit format. + +Finally, make sure to thank the contributor for submitting a PR! + +## Other Tips + +A maintainer can easily rebase a PR onto the latest `master` branch by adding a `/rebase` comment. +`BrewTestBot` will automatically rebase the PR and add a reaction to +the comment once the rebase is in progress and complete.
true
Other
Homebrew
brew
0f472906222c16c4d33265446cb5ddcc0c41e788.json
docs: add cask maintainer guide
docs/README.md
@@ -66,6 +66,7 @@ - [Releases](Releases.md) - [Developer/Internal API Documentation](https://rubydoc.brew.sh) - [Homebrew/homebrew-core merge checklist](Homebrew-homebrew-core-Merge-Checklist.md) +- [Cask Maintainer Guide](Cask-Maintainer-Guide.md) ## Governance
true
Other
Homebrew
brew
c7de544fe8b7671a02399b895abfdeb8823f982c.json
extend/os/mac/keg_relocate: fix post-bottling dylib ID relocation Running `brew bottle` changes dylib IDs, install names, and rpaths into placeholders for the bottle, creates a bottle tarball, and then changes the placeholders back to their correct values. With my refactoring in #11358, the behaviour of this relocation changed: dylib IDs would no longer be changed back from placeholders into their correct values after the creation of the bottle tarball.
Library/Homebrew/extend/os/mac/keg_relocate.rb
@@ -22,8 +22,8 @@ def relocate_dynamic_linkage(relocation) mach_o_files.each do |file| file.ensure_writable do if file.dylib? - id = relocated_name_for(dylib_id_for(file), relocation) - change_dylib_id(id, file) if id + id = relocated_name_for(file.dylib_id, relocation) + change_dylib_id(id, file) end each_install_name_for(file) do |old_name|
false
Other
Homebrew
brew
706c40869662c0ddf18d3a6bb62b25740ddbee4e.json
Add leaves flags tests
Library/Homebrew/test/cmd/leaves_spec.rb
@@ -44,4 +44,27 @@ .and be_a_success end end + + context "when there are installed formulae with dependencies", :integration_test do + it "prints leaves installed as dependencies with --installed-as-dependency" do + setup_test_formula "testball" + install_test_formula "testball1", 'depends_on "testball"' + + expect { brew "leaves", "--installed-as-dependency" } + .to output("testball\n").to_stdout + .and not_to_output.to_stderr + .and be_a_success + end + end + + context "when there are installed formulae without dependencies", :integration_test do + it "prints leaves installed on request with --installed-on-request" do + install_test_formula "testball" + + expect { brew "leaves", "--installed-on-request" } + .to output("testball\n").to_stdout + .and not_to_output.to_stderr + .and be_a_success + end + end end
false
Other
Homebrew
brew
8764c4fc21890087bcfde8daac714fce46c4ada8.json
Fix proc coercion
Library/Homebrew/cmd/leaves.rb
@@ -37,8 +37,8 @@ def leaves leaves_list = Formula.installed_formulae_with_no_dependents - leaves_list.select!(&:installed_on_request?) if args.installed_on_request? - leaves_list.select!(&:installed_as_dependency?) if args.installed_as_dependency? + leaves_list.select!(&method(:installed_on_request?)) if args.installed_on_request? + leaves_list.select!(&method(:installed_as_dependency?)) if args.installed_as_dependency? leaves_list.map(&:full_name) .sort
false
Other
Homebrew
brew
e5285b5ed8d1ca7c653819a1d1023d4affda4072.json
Add cop for IO.read usage
Library/.rubocop.yml
@@ -54,6 +54,10 @@ FormulaAudit: FormulaAuditStrict: Enabled: true +# enable all Homebrew custom cops +Homebrew: + Enabled: true + # makes DSL usage ugly. Layout/SpaceBeforeBrackets: Exclude:
true
Other
Homebrew
brew
e5285b5ed8d1ca7c653819a1d1023d4affda4072.json
Add cop for IO.read usage
Library/Homebrew/rubocops.rb
@@ -12,6 +12,7 @@ require "rubocop-rspec" require "rubocop-sorbet" +require "rubocops/io_read" require "rubocops/shell_commands" require "rubocops/formula_desc"
true
Other
Homebrew
brew
e5285b5ed8d1ca7c653819a1d1023d4affda4072.json
Add cop for IO.read usage
Library/Homebrew/rubocops/io_read.rb
@@ -0,0 +1,35 @@ +# typed: true +# frozen_string_literal: true + +module RuboCop + module Cop + module Homebrew + # This cop restricts usage of IO.read functions for security reasons. + # + # @api private + class IORead < Base + MSG = "The use of `IO.%<method>s` is a security risk." + RESTRICT_ON_SEND = [:read, :readlines].freeze + + def on_send(node) + return if node.receiver != s(:const, nil, :IO) + return if safe?(node.arguments.first) + + add_offense(node, message: format(MSG, method: node.method_name)) + end + + private + + def safe?(node) + if node.str_type? + !node.str_content.empty? && !node.str_content.start_with?("|") + elsif node.dstr_type? || (node.send_type? && node.method?(:+)) + safe?(node.children.first) + else + false + end + end + end + end + end +end
true
Other
Homebrew
brew
e5285b5ed8d1ca7c653819a1d1023d4affda4072.json
Add cop for IO.read usage
Library/Homebrew/rubocops/shell_commands.rb
@@ -6,7 +6,7 @@ module RuboCop module Cop - module Style + module Homebrew # https://github.com/ruby/ruby/blob/v2_6_3/process.c#L2430-L2460 SHELL_BUILTINS = %w[ !
true
Other
Homebrew
brew
e5285b5ed8d1ca7c653819a1d1023d4affda4072.json
Add cop for IO.read usage
Library/Homebrew/test/rubocops/io_read_spec.rb
@@ -0,0 +1,75 @@ +# typed: false +# frozen_string_literal: true + +require "rubocops/io_read" + +describe RuboCop::Cop::Homebrew::IORead do + subject(:cop) { described_class.new } + + it "reports an offense when `IO.read` is used with a pipe character" do + expect_offense(<<~RUBY) + IO.read("|echo test") + ^^^^^^^^^^^^^^^^^^^^^ The use of `IO.read` is a security risk. + RUBY + end + + it "does not report an offense when `IO.read` is used without a pipe character" do + expect_no_offenses(<<~RUBY) + IO.read("file.txt") + RUBY + end + + it "reports an offense when `IO.read` is used with untrustworthy input" do + expect_offense(<<~RUBY) + input = "input value from an unknown source" + IO.read(input) + ^^^^^^^^^^^^^^ The use of `IO.read` is a security risk. + RUBY + end + + it "reports an offense when `IO.read` is used with a dynamic string starting with a pipe character" do + expect_offense(<<~'RUBY') + input = "test" + IO.read("|echo #{input}") + ^^^^^^^^^^^^^^^^^^^^^^^^^ The use of `IO.read` is a security risk. + RUBY + end + + it "reports an offense when `IO.read` is used with a dynamic string at the start" do + expect_offense(<<~'RUBY') + input = "|echo test" + IO.read("#{input}.txt") + ^^^^^^^^^^^^^^^^^^^^^^^ The use of `IO.read` is a security risk. + RUBY + end + + it "does not report an offense when `IO.read` is used with a dynamic string safely" do + expect_no_offenses(<<~'RUBY') + input = "test" + IO.read("somefile#{input}.txt") + RUBY + end + + it "reports an offense when `IO.read` is used with a concatenated string starting with a pipe character" do + expect_offense(<<~'RUBY') + input = "|echo test" + IO.read("|echo " + input) + ^^^^^^^^^^^^^^^^^^^^^^^^^ The use of `IO.read` is a security risk. + RUBY + end + + it "reports an offense when `IO.read` is used with a concatenated string starting with untrustworthy input" do + expect_offense(<<~'RUBY') + input = "|echo test" + IO.read(input + ".txt") + ^^^^^^^^^^^^^^^^^^^^^^^ The use of `IO.read` is a security risk. + RUBY + end + + it "does not report an offense when `IO.read` is used with a concatenated string safely" do + expect_no_offenses(<<~'RUBY') + input = "test" + IO.read("somefile" + input + ".txt") + RUBY + end +end
true
Other
Homebrew
brew
e5285b5ed8d1ca7c653819a1d1023d4affda4072.json
Add cop for IO.read usage
Library/Homebrew/test/rubocops/shell_commands_spec.rb
@@ -5,7 +5,7 @@ module RuboCop module Cop - module Style + module Homebrew describe ShellCommands do subject(:cop) { described_class.new }
true
Other
Homebrew
brew
09505496291e73c1d2ae7f0f07ea7dc98bbcda5f.json
os/mac: use perl 5.18 on Catalina
Library/Homebrew/os/mac.rb
@@ -64,8 +64,6 @@ def prerelease? def preferred_perl_version if version >= :big_sur "5.30" - elsif version == :catalina - "5.28" else "5.18" end
false
Other
Homebrew
brew
09a996181d7233543f6adbf190685d89d349b35b.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
@@ -9726,9 +9726,8 @@ class Keg::DirectoryNotWritableError end class Keg::Relocation - def self.[](*_); end - - def self.members(); end + extend ::T::Private::Methods::MethodHooks + extend ::T::Private::Methods::SingletonMethodHooks end class Keg
false
Other
Homebrew
brew
6e2f194e0933c82246eb84aa0fd7283832bc435e.json
rubocops/shell_commands: add cop for shell metacharacters in `exec`
Library/Homebrew/rubocops/shared/helper_functions.rb
@@ -54,15 +54,15 @@ def source_buffer(node) end # Returns the string representation if node is of type str(plain) or dstr(interpolated) or const. - def string_content(node) + def string_content(node, strip_dynamic: false) case node.type when :str node.str_content when :dstr content = "" node.each_child_node(:str, :begin) do |child| content += if child.begin_type? - child.source + strip_dynamic ? "" : child.source else child.str_content end
true