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 | 41b0bf7bbb84495c82987f2fba7cf029d8abef11.json | Add `developer` command | manpages/brew.1 | @@ -229,6 +229,17 @@ Search just names for \fItext\fR\. If \fItext\fR is flanked by slashes, it is in
\fB\-d\fR, \fB\-\-description\fR
Search just descriptions for \fItext\fR\. If \fItext\fR is flanked by slashes, it is interpreted as a regular expression\.
.
+.SS "\fBdeveloper\fR [\fIsubcommand\fR]"
+Control Homebrew\'s developer mode\. When developer mode is enabled, \fBbrew update\fR will update Homebrew to the latest commit on the \fBmaster\fR branch instead of the latest stable version\.
+.
+.P
+\fBbrew developer\fR [\fBstate\fR]
+ Display the current state of Homebrew\'s developer mode\.
+.
+.P
+\fBbrew developer\fR (\fBon\fR|\fBoff\fR)
+ Turn Homebrew\'s developer mode on or off respectively\.
+.
.SS "\fBdoctor\fR, \fBdr\fR [\fI\-\-list\-checks\fR] [\fI\-\-audit\-debug\fR] [\fIdiagnostic_check\fR \.\.\.]"
Check your system for potential problems\. Will exit with a non\-zero status if any potential problems are found\. Please note that these warnings are just used to help the Homebrew maintainers with debugging if you file an issue\. If everything you use Homebrew for is working fine: please don\'t worry or file an issue; just ignore this\.
. | true |
Other | Homebrew | brew | 91fffeeff6a5b1d9fd042716035a14698bc674be.json | info: show latest version | Library/Homebrew/cmd/info.rb | @@ -244,7 +244,13 @@ def info_formula(f, args:)
specs = []
if (stable = f.stable)
- s = "stable #{stable.version}"
+ latest_version = if ENV["HOMEBREW_JSON_CORE"].present?
+ BottleAPI.latest_pkg_version(f.name).version || stable.version
+ else
+ stable.version
+ end
+
+ s = "stable #{latest_version}"
s += " (bottled)" if stable.bottled? && f.pour_bottle?
specs << s
end | false |
Other | Homebrew | brew | dff24049deb36beaa09fbaf8b4d29263076f7b17.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 | @@ -3217,6 +3217,11 @@ module Bootsnap
def self.setup(cache_dir:, development_mode: T.unsafe(nil), load_path_cache: T.unsafe(nil), autoload_paths_cache: T.unsafe(nil), disable_trace: T.unsafe(nil), compile_cache_iseq: T.unsafe(nil), compile_cache_yaml: T.unsafe(nil)); end
end
+module BottleAPI
+ extend ::T::Private::Methods::MethodHooks
+ extend ::T::Private::Methods::SingletonMethodHooks
+end
+
class BottleSpecification
extend ::T::Private::Methods::MethodHooks
extend ::T::Private::Methods::SingletonMethodHooks | false |
Other | Homebrew | brew | e5e2674c15853c39ee994272b766b510a03f3f94.json | Update RBI files for rubocop-rails. | Library/Homebrew/sorbet/rbi/gems/rubocop-rails@2.11.3.rbi | @@ -17,6 +17,7 @@ module RuboCop::Cop::ActiveRecordHelper
def foreign_key_of(belongs_to); end
def in_where?(node); end
def inherit_active_record_base?(node); end
+ def polymorphic?(belongs_to); end
def resolve_relation_into_column(name:, class_node:, table:); end
def schema; end
def table_name(class_node); end
@@ -144,8 +145,6 @@ class RuboCop::Cop::Rails::ActiveRecordCallbacksOrder < ::RuboCop::Cop::Base
def defined_callbacks(class_node); end
def end_position_for(node); end
def inline_comment?(comment); end
- def left_siblings_of(node); end
- def siblings_of(node); end
def source_range_with_comment(node); end
def start_line_position(node); end
end
@@ -1212,10 +1211,8 @@ class RuboCop::Cop::Rails::RedundantAllowNil < ::RuboCop::Cop::Base
private
def find_allow_nil_and_allow_blank(node); end
- def next_sibling(node); end
def node_beg(node); end
def node_end(node); end
- def previous_sibling(node); end
def register_offense(allow_nil, message); end
end
| false |
Other | Homebrew | brew | 2599cccc81782e45517dae03ba093f2d74f22f7f.json | Add comment for in-source style exception | Library/Homebrew/extend/ENV/super.rb | @@ -338,6 +338,7 @@ def refurbish_args
end
# rubocop: disable Naming/MethodName
+ # Fixes style error `Naming/MethodName: Use snake_case for method names.`
sig { params(block: T.nilable(T.proc.void)).void }
def O0(&block)
if block | false |
Other | Homebrew | brew | 640663eba781074bfaf5da484d7d69bd9d64c086.json | Update RBI files for parser. | Library/Homebrew/sorbet/rbi/gems/parser@3.0.2.0.rbi | @@ -4,17 +4,58 @@
# typed: true
+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 AST::Processor
+ include ::AST::Processor::Mixin
+end
+
+module AST::Processor::Mixin
+ def handler_missing(node); end
+ def process(node); end
+ def process_all(nodes); end
+end
+
module Parser
class << self
-
private
def warn_syntax_deviation(feature, version); end
end
end
-module Parser::AST
-end
+module Parser::AST; end
class Parser::AST::Node < ::AST::Node
def assign_properties(properties); end
@@ -176,8 +217,7 @@ class Parser::Base < ::Racc::Parser
end
end
-module Parser::Builders
-end
+module Parser::Builders; end
class Parser::Builders::Default
def initialize; end
@@ -403,8 +443,7 @@ class Parser::Builders::Default
end
end
-class Parser::ClobberingError < ::RuntimeError
-end
+class Parser::ClobberingError < ::RuntimeError; end
class Parser::Context
def initialize; end
@@ -624,13 +663,9 @@ class Parser::Lexer::Dedenter
end
Parser::Lexer::Dedenter::TAB_WIDTH = T.let(T.unsafe(nil), Integer)
-
Parser::Lexer::ESCAPES = T.let(T.unsafe(nil), Hash)
-
Parser::Lexer::KEYWORDS = T.let(T.unsafe(nil), Hash)
-
Parser::Lexer::KEYWORDS_BEGIN = T.let(T.unsafe(nil), Hash)
-
Parser::Lexer::LEX_STATES = T.let(T.unsafe(nil), Hash)
class Parser::Lexer::Literal
@@ -670,13 +705,9 @@ class Parser::Lexer::Literal
end
Parser::Lexer::Literal::DELIMITERS = T.let(T.unsafe(nil), Hash)
-
Parser::Lexer::Literal::TYPES = T.let(T.unsafe(nil), Hash)
-
Parser::Lexer::PUNCTUATION = T.let(T.unsafe(nil), Hash)
-
Parser::Lexer::PUNCTUATION_BEGIN = T.let(T.unsafe(nil), Hash)
-
Parser::Lexer::REGEXP_META_CHARACTERS = T.let(T.unsafe(nil), Regexp)
class Parser::Lexer::StackState
@@ -720,13 +751,11 @@ module Parser::Messages
end
end
-module Parser::Meta
-end
-
+module Parser::Meta; end
Parser::Meta::NODE_TYPES = T.let(T.unsafe(nil), Set)
class Parser::Rewriter < ::Parser::AST::Processor
- extend(::Parser::Deprecation)
+ extend ::Parser::Deprecation
def initialize(*_arg0); end
@@ -1181,11 +1210,8 @@ class Parser::Ruby26 < ::Parser::Base
end
Parser::Ruby26::Racc_arg = T.let(T.unsafe(nil), Array)
-
Parser::Ruby26::Racc_token_to_s_table = T.let(T.unsafe(nil), Array)
-
-module Parser::Source
-end
+module Parser::Source; end
class Parser::Source::Buffer
def initialize(name, first_line = T.unsafe(nil), source: T.unsafe(nil)); end
@@ -1266,7 +1292,6 @@ class Parser::Source::Comment::Associator
end
Parser::Source::Comment::Associator::MAGIC_COMMENT_RE = T.let(T.unsafe(nil), Regexp)
-
Parser::Source::Comment::Associator::POSTFIX_TYPES = T.let(T.unsafe(nil), Set)
class Parser::Source::Map
@@ -1436,8 +1461,8 @@ class Parser::Source::Map::Variable < ::Parser::Source::Map
end
class Parser::Source::Range
- include(::Comparable)
- include(::RuboCop::AST::Ext::Range)
+ include ::Comparable
+ include ::RuboCop::AST::Ext::Range
def initialize(source_buffer, begin_pos, end_pos); end
@@ -1478,7 +1503,7 @@ class Parser::Source::Range
end
class Parser::Source::Rewriter
- extend(::Parser::Deprecation)
+ extend ::Parser::Deprecation
def initialize(source_buffer); end
@@ -1522,7 +1547,7 @@ class Parser::Source::Rewriter
end
class Parser::Source::Rewriter::Action
- include(::Comparable)
+ include ::Comparable
def initialize(range, replacement = T.unsafe(nil), allow_multiple_insertions = T.unsafe(nil), order = T.unsafe(nil)); end
@@ -1538,7 +1563,7 @@ end
Parser::Source::Rewriter::DEPRECATION_WARNING = T.let(T.unsafe(nil), String)
class Parser::Source::TreeRewriter
- extend(::Parser::Deprecation)
+ extend ::Parser::Deprecation
def initialize(source_buffer, crossing_deletions: T.unsafe(nil), different_replacements: T.unsafe(nil), swallowed_insertions: T.unsafe(nil)); end
@@ -1610,7 +1635,6 @@ class Parser::Source::TreeRewriter::Action
end
Parser::Source::TreeRewriter::DEPRECATION_WARNING = T.let(T.unsafe(nil), String)
-
Parser::Source::TreeRewriter::POLICY_TO_LEVEL = T.let(T.unsafe(nil), Hash)
class Parser::StaticEnvironment | false |
Other | Homebrew | brew | aed7e4389c8160670fb59b8668fc2ed9516e7cd6.json | Fix function name typo at the correct place.
As nandahkrishna writes in
https://github.com/Homebrew/brew/pull/11678#issuecomment-876356490,
completions/fish/brew.fish is generated automatically. This commit makes
the change in the proper template instead. | Library/Homebrew/completions/fish.erb | @@ -162,7 +162,7 @@ function __fish_brew_suggest_commands -d "Lists all commands names, including al
end
end
-function __fish_brew_suggest_diagnostic_check -d "List available diagnostic checks"
+function __fish_brew_suggest_diagnostic_checks -d "List available diagnostic checks"
brew doctor --list-checks
end
| true |
Other | Homebrew | brew | aed7e4389c8160670fb59b8668fc2ed9516e7cd6.json | Fix function name typo at the correct place.
As nandahkrishna writes in
https://github.com/Homebrew/brew/pull/11678#issuecomment-876356490,
completions/fish/brew.fish is generated automatically. This commit makes
the change in the proper template instead. | completions/fish/brew.fish | @@ -149,7 +149,7 @@ function __fish_brew_suggest_commands -d "Lists all commands names, including al
end
end
-function __fish_brew_suggest_diagnostic_checks -d "List available diagnostic checks"
+function __fish_brew_suggest_diagnostic_check -d "List available diagnostic checks"
brew doctor --list-checks
end
| true |
Other | Homebrew | brew | 423e8e104fda8805fe79fc2cad042b9192f5fa3e.json | Fix typo in brew doctor completion function name
Wherever in the file the function __fish_brew_suggest_diagnostic_checks
is called, the name has a trailing 's' (plural 'checks'), whereas the
function definition uses 'check' in singular. Changing the function name
to match the callsites. | completions/fish/brew.fish | @@ -149,7 +149,7 @@ function __fish_brew_suggest_commands -d "Lists all commands names, including al
end
end
-function __fish_brew_suggest_diagnostic_check -d "List available diagnostic checks"
+function __fish_brew_suggest_diagnostic_checks -d "List available diagnostic checks"
brew doctor --list-checks
end
| false |
Other | Homebrew | brew | e6607665140ec8262c071ca65d076a8d837856dd.json | brew: add `DBUS_SESSION_BUS_ADDRESS` copy | bin/brew | @@ -64,7 +64,7 @@ HOMEBREW_LIBRARY="${HOMEBREW_REPOSITORY}/Library"
# Copy and export all HOMEBREW_* variables previously mentioned in
# manpage or used elsewhere by Homebrew.
-for VAR in BROWSER DISPLAY EDITOR NO_COLOR PATH TMUX
+for VAR in BROWSER DISPLAY EDITOR NO_COLOR PATH TMUX DBUS_SESSION_BUS_ADDRESS
do
# Skip if variable value is empty.
[[ -z "${!VAR}" ]] && continue | false |
Other | Homebrew | brew | 87e776fed616723e86d5a127aac6079e856e7150.json | Update configuration in `Library/.rubocop.yml` | Library/.rubocop.yml | @@ -84,6 +84,25 @@ Naming/HeredocDelimiterNaming:
ForbiddenDelimiters:
- END, EOD, EOF
+Naming/InclusiveLanguage:
+ CheckStrings: true
+ FlaggedTerms:
+ # TODO: If possible, make this stricter.
+ slave:
+ AllowedRegex:
+ - "gitslave" # Used in formula `gitslave`
+ - "log_slave" # Used in formula `ssdb`
+ - "ssdb_slave" # Used in formula `ssdb`
+ - "var_slave" # Used in formula `ssdb`
+ - "patches/13_fix_scope_for_show_slave_status_data.patch" # Used in formula `mytop`
+ blacklist:
+ AllowedRegex:
+ - "--listBlacklist" # Used in formula `xmlsectool`
+ whitelist:
+ AllowedRegex:
+ - "--error-white-list" # For an option passed to `srb` in dev-cmd/typecheck.rb
+ - "--repo-whitelist" # Used in formula `atlantis`
+
Naming/MethodName:
IgnoredPatterns:
- '\A(fetch_)?HEAD\?\Z' | false |
Other | Homebrew | brew | 77d972c67c6dafbb89d46cdb073a9ef4f2d376e3.json | Update RBI files for rubocop. | Library/Homebrew/sorbet/rbi/gems/rubocop@1.18.3.rbi | @@ -1075,16 +1075,19 @@ class RuboCop::Cop::Bundler::GemVersion < ::RuboCop::Cop::Base
include ::RuboCop::Cop::ConfigurableEnforcedStyle
include ::RuboCop::Cop::GemDeclaration
+ def includes_commit_reference?(param0 = T.unsafe(nil)); end
def includes_version_specification?(param0 = T.unsafe(nil)); end
def on_send(node); end
private
def allowed_gem?(node); end
def allowed_gems; end
+ def forbidden_offense?(node); end
def forbidden_style?; end
def message(range); end
def offense?(node); end
+ def required_offense?(node); end
def required_style?; end
def version_specification?(expression); end
end
@@ -1153,6 +1156,7 @@ module RuboCop::Cop::CheckLineBreakable
def contained_by_multiline_collection_that_could_be_broken_up?(node); end
def extract_breakable_node_from_elements(node, elements, max); end
def extract_first_element_over_column_limit(node, elements, max); end
+ def first_argument_is_heredoc?(node); end
def process_args(args); end
def safe_to_ignore?(node); end
def shift_elements_for_heredoc_arg(node, elements, index); end
@@ -3177,6 +3181,28 @@ end
RuboCop::Cop::Layout::LeadingEmptyLines::MSG = T.let(T.unsafe(nil), String)
+class RuboCop::Cop::Layout::LineEndStringConcatenationIndentation < ::RuboCop::Cop::Base
+ include ::RuboCop::Cop::ConfigurableEnforcedStyle
+ include ::RuboCop::Cop::Alignment
+ extend ::RuboCop::Cop::AutoCorrector
+
+ def autocorrect(corrector, node); end
+ def on_dstr(node); end
+
+ private
+
+ def add_offense_and_correction(node, message); end
+ def always_aligned?(dstr_node); end
+ def always_indented?(dstr_node); end
+ def check_aligned(children, start_index); end
+ def check_indented(children); end
+ def strings_concatenated_with_backslash?(dstr_node); end
+end
+
+RuboCop::Cop::Layout::LineEndStringConcatenationIndentation::MSG_ALIGN = T.let(T.unsafe(nil), String)
+RuboCop::Cop::Layout::LineEndStringConcatenationIndentation::MSG_INDENT = T.let(T.unsafe(nil), String)
+RuboCop::Cop::Layout::LineEndStringConcatenationIndentation::PARENT_TYPES_FOR_INDENTED = T.let(T.unsafe(nil), Array)
+
class RuboCop::Cop::Layout::LineLength < ::RuboCop::Cop::Base
include ::RuboCop::Cop::CheckLineBreakable
include ::RuboCop::Cop::IgnoredPattern
@@ -3697,6 +3723,7 @@ class RuboCop::Cop::Layout::SpaceAroundOperators < ::RuboCop::Cop::Base
def on_or_asgn(node); end
def on_pair(node); end
def on_resbody(node); end
+ def on_sclass(node); end
def on_send(node); end
def on_special_asgn(node); end
@@ -6571,6 +6598,53 @@ end
RuboCop::Cop::Naming::HeredocDelimiterNaming::MSG = T.let(T.unsafe(nil), String)
+class RuboCop::Cop::Naming::InclusiveLanguage < ::RuboCop::Cop::Base
+ include ::RuboCop::Cop::RangeHelp
+
+ def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end
+
+ def on_new_investigation; end
+
+ private
+
+ def add_offenses_for_token(token, word_locations); end
+ def add_to_flagged_term_hash(regex_string, term, term_definition); end
+ def array_to_ignorecase_regex(strings); end
+ def check_token?(type); end
+ def create_message(word); end
+ def create_message_for_file(word); end
+ def create_multiple_word_message_for_file(words); end
+ def create_single_word_message_for_file(word); end
+ def ensure_regex_string(regex); end
+ def find_flagged_term(word); end
+ def format_suggestions(suggestions); end
+ def investigate_filepath; end
+ def investigate_tokens; end
+ def mask_input(str); end
+ def preprocess_check_config; end
+ def preprocess_flagged_terms; end
+ def preprocess_suggestions(suggestions); end
+ def process_allowed_regex(allowed); end
+ def scan_for_words(input); end
+ def set_regexes(flagged_term_strings, allowed_strings); end
+end
+
+RuboCop::Cop::Naming::InclusiveLanguage::EMPTY_ARRAY = T.let(T.unsafe(nil), Array)
+
+class RuboCop::Cop::Naming::InclusiveLanguage::WordLocation < ::Struct
+ def position; end
+ def position=(_); end
+ def word; end
+ def word=(_); end
+
+ class << self
+ def [](*_arg0); end
+ def inspect; end
+ def members; end
+ def new(*_arg0); end
+ end
+end
+
class RuboCop::Cop::Naming::MemoizedInstanceVariableName < ::RuboCop::Cop::Base
include ::RuboCop::Cop::ConfigurableEnforcedStyle
@@ -7488,6 +7562,7 @@ RuboCop::Cop::Style::BlockComments::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Style::BlockDelimiters < ::RuboCop::Cop::Base
include ::RuboCop::Cop::ConfigurableEnforcedStyle
include ::RuboCop::Cop::IgnoredMethods
+ include ::RuboCop::Cop::RangeHelp
extend ::RuboCop::Cop::IgnoredMethods::Config
extend ::RuboCop::Cop::AutoCorrector
@@ -7512,6 +7587,7 @@ class RuboCop::Cop::Style::BlockDelimiters < ::RuboCop::Cop::Base
def line_count_based_block_style?(node); end
def line_count_based_message(node); end
def message(node); end
+ def move_comment_before_block(corrector, comment, block_node, closing_brace); end
def procedural_method?(method_name); end
def procedural_oneliners_may_have_braces?; end
def proper_block_style?(node); end
@@ -7625,6 +7701,7 @@ class RuboCop::Cop::Style::ClassAndModuleChildren < ::RuboCop::Cop::Base
def compact_node(corrector, node); end
def compact_node_name?(node); end
def compact_replacement(node); end
+ def configured_indentation_width; end
def indent_width; end
def leading_spaces(node); end
def needs_compacting?(body); end
@@ -7633,6 +7710,7 @@ class RuboCop::Cop::Style::ClassAndModuleChildren < ::RuboCop::Cop::Base
def remove_end(corrector, body); end
def replace_namespace_keyword(corrector, node); end
def split_on_double_colon(corrector, node, padding); end
+ def unindent(corrector, node); end
end
RuboCop::Cop::Style::ClassAndModuleChildren::COMPACT_MSG = T.let(T.unsafe(nil), String)
@@ -7818,13 +7896,18 @@ class RuboCop::Cop::Style::CommentAnnotation < ::RuboCop::Cop::Base
def annotation_range(comment, margin, first_word, colon, space); end
def concat_length(*args); end
def correct_annotation?(first_word, colon, space, note); end
+ def correct_colon_annotation?(first_word, colon, space, note); end
+ def correct_offense(corrector, range, first_word); end
+ def correct_space_annotation?(first_word, colon, space, note); end
def first_comment_line?(comments, index); end
def inline_comment?(comment); end
def register_offense(range, note, first_word); end
+ def requires_colon?; end
end
RuboCop::Cop::Style::CommentAnnotation::MISSING_NOTE = T.let(T.unsafe(nil), String)
-RuboCop::Cop::Style::CommentAnnotation::MSG = T.let(T.unsafe(nil), String)
+RuboCop::Cop::Style::CommentAnnotation::MSG_COLON_STYLE = T.let(T.unsafe(nil), String)
+RuboCop::Cop::Style::CommentAnnotation::MSG_SPACE_STYLE = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Style::CommentedKeyword < ::RuboCop::Cop::Base
include ::RuboCop::Cop::RangeHelp
@@ -10577,6 +10660,7 @@ class RuboCop::Cop::Style::RegexpLiteral < ::RuboCop::Cop::Base
def allow_inner_slashes?; end
def allowed_mixed_percent_r?(node); end
def allowed_mixed_slash?(node); end
+ def allowed_omit_parentheses_with_percent_r_literal?(node); end
def allowed_percent_r_literal?(node); end
def allowed_slash_literal?(node); end
def calculate_replacement(node); end
@@ -10589,7 +10673,6 @@ class RuboCop::Cop::Style::RegexpLiteral < ::RuboCop::Cop::Base
def inner_slash_for(opening_delimiter); end
def inner_slash_indices(node); end
def node_body(node, include_begin_nodes: T.unsafe(nil)); end
- def omit_parentheses_style?(node); end
def preferred_delimiters; end
def slash_literal?(node); end
end
@@ -10838,13 +10921,15 @@ class RuboCop::Cop::Style::SingleLineMethods < ::RuboCop::Cop::Base
def correct_to_endless(corrector, node); end
def correct_to_endless?(body_node); end
def correct_to_multiline(corrector, node); end
+ def disallow_endless_method_style?; end
def each_part(body); end
def method_body_source(method_body); end
def move_comment(node, corrector); end
def require_parentheses?(method_body); end
end
RuboCop::Cop::Style::SingleLineMethods::MSG = T.let(T.unsafe(nil), String)
+RuboCop::Cop::Style::SingleLineMethods::NOT_SUPPORTED_ENDLESS_METHOD_BODY_TYPES = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Style::SlicingWithRange < ::RuboCop::Cop::Base
extend ::RuboCop::Cop::AutoCorrector
@@ -10981,12 +11066,14 @@ class RuboCop::Cop::Style::StringConcatenation < ::RuboCop::Cop::Base
private
- def collect_parts(node, parts); end
+ def collect_parts(node, parts = T.unsafe(nil)); end
def corrected_ancestor?(node); end
def find_topmost_plus_node(node); end
def handle_quotes(parts); end
def line_end_concatenation?(node); end
+ def offensive_for_mode?(receiver_node); end
def plus_node?(node); end
+ def register_offense(topmost_plus_node, parts); end
def replacement(parts); end
def single_quoted?(str_node); end
def uncorrectable?(part); end | true |
Other | Homebrew | brew | 77d972c67c6dafbb89d46cdb073a9ef4f2d376e3.json | Update RBI files for rubocop. | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -26891,6 +26891,7 @@ end
module RuboCop::AST::NodePattern::Sets
SET_BEGINNING_OF_DAY_BEGINNING_OF_WEEK_BEGINNING_OF_MONTH_ETC = ::T.let(nil, ::T.untyped)
+ SET_BRANCH_REF_TAG = ::T.let(nil, ::T.untyped)
SET_BUILD_RECOMMENDED_TEST_OPTIONAL = ::T.let(nil, ::T.untyped)
SET_DEPENDS_ON_USES_FROM_MACOS = ::T.let(nil, ::T.untyped)
SET_END_OF_DAY_END_OF_WEEK_END_OF_MONTH_ETC = ::T.let(nil, ::T.untyped) | true |
Other | Homebrew | brew | 16e56907b5cf93bd66f87608089944905c506cf5.json | formula_cellar_checks: fix cpuid instruction check on Mojave
The output format of `objdump` on Mojave is different from newer
versions of macOS, so I've adjusted the relevant audit to account for
this difference. | Library/Homebrew/formula_cellar_checks.rb | @@ -345,10 +345,15 @@ def relative_glob(dir, pattern)
def cpuid_instruction?(file, objdump = "objdump")
@instruction_column_index ||= {}
- @instruction_column_index[objdump] ||= if Utils.popen_read(objdump, "--version").include? "LLVM"
- 1 # `llvm-objdump` or macOS `objdump`
- else
- 2 # GNU binutils `objdump`
+ @instruction_column_index[objdump] ||= begin
+ objdump_version = Utils.popen_read(objdump, "--version")
+
+ if (objdump_version.match?(/^Apple LLVM/) && MacOS.version <= :mojave) ||
+ objdump_version.exclude?("LLVM")
+ 2 # Mojave `objdump` or GNU Binutils `objdump`
+ else
+ 1 # `llvm-objdump` or Catalina+ `objdump`
+ end
end
has_cpuid_instruction = false | false |
Other | Homebrew | brew | a7da26a291c1f567720ba316c073a39e2ab4986b.json | Update RBI files for rubocop-performance. | Library/Homebrew/sorbet/rbi/gems/rubocop-performance@1.11.4.rbi | @@ -4,18 +4,13 @@
# typed: true
-module RuboCop
-end
-
-module RuboCop::Cop
-end
-
-module RuboCop::Cop::Performance
-end
+module RuboCop; end
+module RuboCop::Cop; end
+module RuboCop::Cop::Performance; end
class RuboCop::Cop::Performance::AncestorsInclude < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::RangeHelp)
- extend(::RuboCop::Cop::AutoCorrector)
+ include ::RuboCop::Cop::RangeHelp
+ extend ::RuboCop::Cop::AutoCorrector
def ancestors_include_candidate?(param0 = T.unsafe(nil)); end
def on_send(node); end
@@ -26,13 +21,12 @@ class RuboCop::Cop::Performance::AncestorsInclude < ::RuboCop::Cop::Base
end
RuboCop::Cop::Performance::AncestorsInclude::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Performance::AncestorsInclude::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Performance::ArraySemiInfiniteRangeSlice < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::RangeHelp)
- extend(::RuboCop::Cop::AutoCorrector)
- extend(::RuboCop::Cop::TargetRubyVersion)
+ include ::RuboCop::Cop::RangeHelp
+ extend ::RuboCop::Cop::AutoCorrector
+ extend ::RuboCop::Cop::TargetRubyVersion
def endless_range?(param0 = T.unsafe(nil)); end
def endless_range_slice?(param0 = T.unsafe(nil)); end
@@ -44,13 +38,11 @@ class RuboCop::Cop::Performance::ArraySemiInfiniteRangeSlice < ::RuboCop::Cop::B
end
RuboCop::Cop::Performance::ArraySemiInfiniteRangeSlice::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Performance::ArraySemiInfiniteRangeSlice::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set)
-
RuboCop::Cop::Performance::ArraySemiInfiniteRangeSlice::SLICE_METHODS = T.let(T.unsafe(nil), Set)
class RuboCop::Cop::Performance::BigDecimalWithNumericArgument < ::RuboCop::Cop::Base
- extend(::RuboCop::Cop::AutoCorrector)
+ extend ::RuboCop::Cop::AutoCorrector
def big_decimal_with_numeric_argument?(param0 = T.unsafe(nil)); end
def on_send(node); end
@@ -61,13 +53,12 @@ class RuboCop::Cop::Performance::BigDecimalWithNumericArgument < ::RuboCop::Cop:
end
RuboCop::Cop::Performance::BigDecimalWithNumericArgument::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Performance::BigDecimalWithNumericArgument::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Performance::BindCall < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::RangeHelp)
- extend(::RuboCop::Cop::AutoCorrector)
- extend(::RuboCop::Cop::TargetRubyVersion)
+ include ::RuboCop::Cop::RangeHelp
+ extend ::RuboCop::Cop::AutoCorrector
+ extend ::RuboCop::Cop::TargetRubyVersion
def bind_with_call_method?(param0 = T.unsafe(nil)); end
def on_send(node); end
@@ -80,22 +71,20 @@ class RuboCop::Cop::Performance::BindCall < ::RuboCop::Cop::Base
end
RuboCop::Cop::Performance::BindCall::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Performance::BindCall::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Performance::BlockGivenWithExplicitBlock < ::RuboCop::Cop::Base
- extend(::RuboCop::Cop::AutoCorrector)
+ extend ::RuboCop::Cop::AutoCorrector
def on_send(node); end
def reassigns_block_arg?(param0 = T.unsafe(nil), param1); end
end
RuboCop::Cop::Performance::BlockGivenWithExplicitBlock::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Performance::BlockGivenWithExplicitBlock::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Performance::Caller < ::RuboCop::Cop::Base
- extend(::RuboCop::Cop::AutoCorrector)
+ extend ::RuboCop::Cop::AutoCorrector
def caller_with_scope_method?(param0 = T.unsafe(nil)); end
def on_send(node); end
@@ -107,13 +96,12 @@ class RuboCop::Cop::Performance::Caller < ::RuboCop::Cop::Base
end
RuboCop::Cop::Performance::Caller::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Performance::Caller::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Performance::CaseWhenSplat < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::Alignment)
- include(::RuboCop::Cop::RangeHelp)
- extend(::RuboCop::Cop::AutoCorrector)
+ include ::RuboCop::Cop::Alignment
+ include ::RuboCop::Cop::RangeHelp
+ extend ::RuboCop::Cop::AutoCorrector
def on_case(case_node); end
@@ -135,11 +123,10 @@ class RuboCop::Cop::Performance::CaseWhenSplat < ::RuboCop::Cop::Base
end
RuboCop::Cop::Performance::CaseWhenSplat::ARRAY_MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Performance::CaseWhenSplat::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Performance::Casecmp < ::RuboCop::Cop::Base
- extend(::RuboCop::Cop::AutoCorrector)
+ extend ::RuboCop::Cop::AutoCorrector
def downcase_downcase(param0 = T.unsafe(nil)); end
def downcase_eq(param0 = T.unsafe(nil)); end
@@ -154,28 +141,21 @@ class RuboCop::Cop::Performance::Casecmp < ::RuboCop::Cop::Base
end
RuboCop::Cop::Performance::Casecmp::CASE_METHODS = T.let(T.unsafe(nil), Array)
-
RuboCop::Cop::Performance::Casecmp::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Performance::Casecmp::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Performance::ChainArrayAllocation < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::RangeHelp)
+ include ::RuboCop::Cop::RangeHelp
def chain_array_allocation?(param0 = T.unsafe(nil)); end
def on_send(node); end
end
RuboCop::Cop::Performance::ChainArrayAllocation::ALWAYS_RETURNS_NEW_ARRAY = T.let(T.unsafe(nil), Set)
-
RuboCop::Cop::Performance::ChainArrayAllocation::HAS_MUTATION_ALTERNATIVE = T.let(T.unsafe(nil), Set)
-
RuboCop::Cop::Performance::ChainArrayAllocation::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Performance::ChainArrayAllocation::RETURNS_NEW_ARRAY = T.let(T.unsafe(nil), Set)
-
RuboCop::Cop::Performance::ChainArrayAllocation::RETURNS_NEW_ARRAY_WHEN_NO_BLOCK = T.let(T.unsafe(nil), Set)
-
RuboCop::Cop::Performance::ChainArrayAllocation::RETURN_NEW_ARRAY_WHEN_ARGS = T.let(T.unsafe(nil), Set)
class RuboCop::Cop::Performance::CollectionLiteralInLoop < ::RuboCop::Cop::Base
@@ -197,24 +177,17 @@ class RuboCop::Cop::Performance::CollectionLiteralInLoop < ::RuboCop::Cop::Base
end
RuboCop::Cop::Performance::CollectionLiteralInLoop::ARRAY_METHODS = T.let(T.unsafe(nil), Set)
-
RuboCop::Cop::Performance::CollectionLiteralInLoop::ENUMERABLE_METHOD_NAMES = T.let(T.unsafe(nil), Set)
-
RuboCop::Cop::Performance::CollectionLiteralInLoop::HASH_METHODS = T.let(T.unsafe(nil), Set)
-
RuboCop::Cop::Performance::CollectionLiteralInLoop::LOOP_TYPES = T.let(T.unsafe(nil), Array)
-
RuboCop::Cop::Performance::CollectionLiteralInLoop::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Performance::CollectionLiteralInLoop::NONMUTATING_ARRAY_METHODS = T.let(T.unsafe(nil), Array)
-
RuboCop::Cop::Performance::CollectionLiteralInLoop::NONMUTATING_HASH_METHODS = T.let(T.unsafe(nil), Array)
-
RuboCop::Cop::Performance::CollectionLiteralInLoop::POST_CONDITION_LOOP_TYPES = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Performance::CompareWithBlock < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::RangeHelp)
- extend(::RuboCop::Cop::AutoCorrector)
+ include ::RuboCop::Cop::RangeHelp
+ extend ::RuboCop::Cop::AutoCorrector
def compare?(param0 = T.unsafe(nil)); end
def on_block(node); end
@@ -230,7 +203,7 @@ end
RuboCop::Cop::Performance::CompareWithBlock::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Performance::ConstantRegexp < ::RuboCop::Cop::Base
- extend(::RuboCop::Cop::AutoCorrector)
+ extend ::RuboCop::Cop::AutoCorrector
def on_regexp(node); end
def regexp_escape?(param0 = T.unsafe(nil)); end
@@ -244,8 +217,8 @@ end
RuboCop::Cop::Performance::ConstantRegexp::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Performance::Count < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::RangeHelp)
- extend(::RuboCop::Cop::AutoCorrector)
+ include ::RuboCop::Cop::RangeHelp
+ extend ::RuboCop::Cop::AutoCorrector
def count_candidate?(param0 = T.unsafe(nil)); end
def on_send(node); end
@@ -258,41 +231,36 @@ class RuboCop::Cop::Performance::Count < ::RuboCop::Cop::Base
end
RuboCop::Cop::Performance::Count::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Performance::Count::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Performance::DeletePrefix < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::RegexpMetacharacter)
- extend(::RuboCop::Cop::AutoCorrector)
- extend(::RuboCop::Cop::TargetRubyVersion)
+ include ::RuboCop::Cop::RegexpMetacharacter
+ extend ::RuboCop::Cop::AutoCorrector
+ extend ::RuboCop::Cop::TargetRubyVersion
def delete_prefix_candidate?(param0 = T.unsafe(nil)); end
def on_send(node); end
end
RuboCop::Cop::Performance::DeletePrefix::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Performance::DeletePrefix::PREFERRED_METHODS = T.let(T.unsafe(nil), Hash)
-
RuboCop::Cop::Performance::DeletePrefix::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Performance::DeleteSuffix < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::RegexpMetacharacter)
- extend(::RuboCop::Cop::AutoCorrector)
- extend(::RuboCop::Cop::TargetRubyVersion)
+ include ::RuboCop::Cop::RegexpMetacharacter
+ extend ::RuboCop::Cop::AutoCorrector
+ extend ::RuboCop::Cop::TargetRubyVersion
def delete_suffix_candidate?(param0 = T.unsafe(nil)); end
def on_send(node); end
end
RuboCop::Cop::Performance::DeleteSuffix::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Performance::DeleteSuffix::PREFERRED_METHODS = T.let(T.unsafe(nil), Hash)
-
RuboCop::Cop::Performance::DeleteSuffix::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Performance::Detect < ::RuboCop::Cop::Base
- extend(::RuboCop::Cop::AutoCorrector)
+ extend ::RuboCop::Cop::AutoCorrector
def detect_candidate?(param0 = T.unsafe(nil)); end
def on_send(node); end
@@ -309,19 +277,14 @@ class RuboCop::Cop::Performance::Detect < ::RuboCop::Cop::Base
end
RuboCop::Cop::Performance::Detect::CANDIDATE_METHODS = T.let(T.unsafe(nil), Set)
-
RuboCop::Cop::Performance::Detect::INDEX_MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Performance::Detect::INDEX_REVERSE_MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Performance::Detect::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Performance::Detect::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
-
RuboCop::Cop::Performance::Detect::REVERSE_MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Performance::DoubleStartEndWith < ::RuboCop::Cop::Base
- extend(::RuboCop::Cop::AutoCorrector)
+ extend ::RuboCop::Cop::AutoCorrector
def check_with_active_support_aliases(param0 = T.unsafe(nil)); end
def on_or(node); end
@@ -339,16 +302,15 @@ end
RuboCop::Cop::Performance::DoubleStartEndWith::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Performance::EndWith < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::RegexpMetacharacter)
- extend(::RuboCop::Cop::AutoCorrector)
+ include ::RuboCop::Cop::RegexpMetacharacter
+ extend ::RuboCop::Cop::AutoCorrector
def on_match_with_lvasgn(node); end
def on_send(node); end
def redundant_regex?(param0 = T.unsafe(nil)); end
end
RuboCop::Cop::Performance::EndWith::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Performance::EndWith::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Performance::FixedSize < ::RuboCop::Cop::Base
@@ -366,12 +328,11 @@ class RuboCop::Cop::Performance::FixedSize < ::RuboCop::Cop::Base
end
RuboCop::Cop::Performance::FixedSize::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Performance::FixedSize::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Performance::FlatMap < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::RangeHelp)
- extend(::RuboCop::Cop::AutoCorrector)
+ include ::RuboCop::Cop::RangeHelp
+ extend ::RuboCop::Cop::AutoCorrector
def flat_map_candidate?(param0 = T.unsafe(nil)); end
def on_send(node); end
@@ -385,13 +346,11 @@ class RuboCop::Cop::Performance::FlatMap < ::RuboCop::Cop::Base
end
RuboCop::Cop::Performance::FlatMap::FLATTEN_MULTIPLE_LEVELS = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Performance::FlatMap::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Performance::FlatMap::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Performance::InefficientHashSearch < ::RuboCop::Cop::Base
- extend(::RuboCop::Cop::AutoCorrector)
+ extend ::RuboCop::Cop::AutoCorrector
def inefficient_include?(param0 = T.unsafe(nil)); end
def on_send(node); end
@@ -409,8 +368,8 @@ end
RuboCop::Cop::Performance::InefficientHashSearch::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Performance::IoReadlines < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::RangeHelp)
- extend(::RuboCop::Cop::AutoCorrector)
+ include ::RuboCop::Cop::RangeHelp
+ extend ::RuboCop::Cop::AutoCorrector
def on_send(node); end
def readlines_on_class?(param0 = T.unsafe(nil)); end
@@ -427,25 +386,23 @@ class RuboCop::Cop::Performance::IoReadlines < ::RuboCop::Cop::Base
end
RuboCop::Cop::Performance::IoReadlines::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Performance::IoReadlines::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Performance::MapCompact < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::RangeHelp)
- extend(::RuboCop::Cop::AutoCorrector)
- extend(::RuboCop::Cop::TargetRubyVersion)
+ include ::RuboCop::Cop::RangeHelp
+ extend ::RuboCop::Cop::AutoCorrector
+ extend ::RuboCop::Cop::TargetRubyVersion
def map_compact(param0 = T.unsafe(nil)); end
def on_send(node); end
private
- def compact_method_range(compact_node); end
def invoke_method_after_map_compact_on_same_line?(compact_node, chained_method); end
+ def remove_compact_method(corrector, compact_node); end
end
RuboCop::Cop::Performance::MapCompact::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Performance::MapCompact::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Performance::MethodObjectAsBlock < ::RuboCop::Cop::Base
@@ -461,22 +418,20 @@ class RuboCop::Cop::Performance::OpenStruct < ::RuboCop::Cop::Base
end
RuboCop::Cop::Performance::OpenStruct::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Performance::OpenStruct::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Performance::RangeInclude < ::RuboCop::Cop::Base
- extend(::RuboCop::Cop::AutoCorrector)
+ extend ::RuboCop::Cop::AutoCorrector
def on_send(node); end
def range_include(param0 = T.unsafe(nil)); end
end
RuboCop::Cop::Performance::RangeInclude::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Performance::RangeInclude::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Performance::RedundantBlockCall < ::RuboCop::Cop::Base
- extend(::RuboCop::Cop::AutoCorrector)
+ extend ::RuboCop::Cop::AutoCorrector
def blockarg_assigned?(param0, param1); end
def blockarg_calls(param0, param1); end
@@ -492,18 +447,14 @@ class RuboCop::Cop::Performance::RedundantBlockCall < ::RuboCop::Cop::Base
end
RuboCop::Cop::Performance::RedundantBlockCall::CLOSE_PAREN = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Performance::RedundantBlockCall::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Performance::RedundantBlockCall::OPEN_PAREN = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Performance::RedundantBlockCall::SPACE = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Performance::RedundantBlockCall::YIELD = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Performance::RedundantEqualityComparisonBlock < ::RuboCop::Cop::Base
- extend(::RuboCop::Cop::AutoCorrector)
- extend(::RuboCop::Cop::TargetRubyVersion)
+ extend ::RuboCop::Cop::AutoCorrector
+ extend ::RuboCop::Cop::TargetRubyVersion
def on_block(node); end
@@ -517,15 +468,12 @@ class RuboCop::Cop::Performance::RedundantEqualityComparisonBlock < ::RuboCop::C
end
RuboCop::Cop::Performance::RedundantEqualityComparisonBlock::COMPARISON_METHODS = T.let(T.unsafe(nil), Array)
-
RuboCop::Cop::Performance::RedundantEqualityComparisonBlock::IS_A_METHODS = T.let(T.unsafe(nil), Array)
-
RuboCop::Cop::Performance::RedundantEqualityComparisonBlock::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Performance::RedundantEqualityComparisonBlock::TARGET_METHODS = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Performance::RedundantMatch < ::RuboCop::Cop::Base
- extend(::RuboCop::Cop::AutoCorrector)
+ extend ::RuboCop::Cop::AutoCorrector
def match_call?(param0 = T.unsafe(nil)); end
def on_send(node); end
@@ -537,11 +485,10 @@ class RuboCop::Cop::Performance::RedundantMatch < ::RuboCop::Cop::Base
end
RuboCop::Cop::Performance::RedundantMatch::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Performance::RedundantMatch::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Performance::RedundantMerge < ::RuboCop::Cop::Base
- extend(::RuboCop::Cop::AutoCorrector)
+ extend ::RuboCop::Cop::AutoCorrector
def modifier_flow_control?(param0 = T.unsafe(nil)); end
def on_send(node); end
@@ -567,7 +514,7 @@ end
RuboCop::Cop::Performance::RedundantMerge::AREF_ASGN = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Performance::RedundantMerge::EachWithObjectInspector
- extend(::RuboCop::AST::NodePattern::Macros)
+ extend ::RuboCop::AST::NodePattern::Macros
def initialize(node, receiver); end
@@ -584,15 +531,13 @@ class RuboCop::Cop::Performance::RedundantMerge::EachWithObjectInspector
end
RuboCop::Cop::Performance::RedundantMerge::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Performance::RedundantMerge::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
-
RuboCop::Cop::Performance::RedundantMerge::WITH_MODIFIER_CORRECTION = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Performance::RedundantSortBlock < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::RangeHelp)
- include(::RuboCop::Cop::SortBlock)
- extend(::RuboCop::Cop::AutoCorrector)
+ include ::RuboCop::Cop::RangeHelp
+ include ::RuboCop::Cop::SortBlock
+ extend ::RuboCop::Cop::AutoCorrector
def on_block(node); end
@@ -604,7 +549,7 @@ end
RuboCop::Cop::Performance::RedundantSortBlock::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Performance::RedundantSplitRegexpArgument < ::RuboCop::Cop::Base
- extend(::RuboCop::Cop::AutoCorrector)
+ extend ::RuboCop::Cop::AutoCorrector
def on_send(node); end
def split_call_with_regexp?(param0 = T.unsafe(nil)); end
@@ -616,16 +561,13 @@ class RuboCop::Cop::Performance::RedundantSplitRegexpArgument < ::RuboCop::Cop::
end
RuboCop::Cop::Performance::RedundantSplitRegexpArgument::DETERMINISTIC_REGEX = T.let(T.unsafe(nil), Regexp)
-
RuboCop::Cop::Performance::RedundantSplitRegexpArgument::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Performance::RedundantSplitRegexpArgument::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
-
RuboCop::Cop::Performance::RedundantSplitRegexpArgument::STR_SPECIAL_CHARS = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Performance::RedundantStringChars < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::RangeHelp)
- extend(::RuboCop::Cop::AutoCorrector)
+ include ::RuboCop::Cop::RangeHelp
+ extend ::RuboCop::Cop::AutoCorrector
def on_send(node); end
def redundant_chars_call?(param0 = T.unsafe(nil)); end
@@ -641,11 +583,10 @@ class RuboCop::Cop::Performance::RedundantStringChars < ::RuboCop::Cop::Base
end
RuboCop::Cop::Performance::RedundantStringChars::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Performance::RedundantStringChars::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Performance::RegexpMatch < ::RuboCop::Cop::Base
- extend(::RuboCop::Cop::AutoCorrector)
+ extend ::RuboCop::Cop::AutoCorrector
def last_matches(param0); end
def match_method?(param0 = T.unsafe(nil)); end
@@ -678,14 +619,12 @@ class RuboCop::Cop::Performance::RegexpMatch < ::RuboCop::Cop::Base
end
RuboCop::Cop::Performance::RegexpMatch::MATCH_NODE_PATTERN = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Performance::RegexpMatch::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Performance::RegexpMatch::TYPES_IMPLEMENTING_MATCH = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Performance::ReverseEach < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::RangeHelp)
- extend(::RuboCop::Cop::AutoCorrector)
+ include ::RuboCop::Cop::RangeHelp
+ extend ::RuboCop::Cop::AutoCorrector
def on_send(node); end
def reverse_each?(param0 = T.unsafe(nil)); end
@@ -697,12 +636,11 @@ class RuboCop::Cop::Performance::ReverseEach < ::RuboCop::Cop::Base
end
RuboCop::Cop::Performance::ReverseEach::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Performance::ReverseEach::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Performance::ReverseFirst < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::RangeHelp)
- extend(::RuboCop::Cop::AutoCorrector)
+ include ::RuboCop::Cop::RangeHelp
+ extend ::RuboCop::Cop::AutoCorrector
def on_send(node); end
def reverse_first_candidate?(param0 = T.unsafe(nil)); end
@@ -716,12 +654,11 @@ class RuboCop::Cop::Performance::ReverseFirst < ::RuboCop::Cop::Base
end
RuboCop::Cop::Performance::ReverseFirst::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Performance::ReverseFirst::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Performance::SelectMap < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::RangeHelp)
- extend(::RuboCop::Cop::TargetRubyVersion)
+ include ::RuboCop::Cop::RangeHelp
+ extend ::RuboCop::Cop::TargetRubyVersion
def bad_method?(param0 = T.unsafe(nil)); end
def on_send(node); end
@@ -733,11 +670,10 @@ class RuboCop::Cop::Performance::SelectMap < ::RuboCop::Cop::Base
end
RuboCop::Cop::Performance::SelectMap::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Performance::SelectMap::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Performance::Size < ::RuboCop::Cop::Base
- extend(::RuboCop::Cop::AutoCorrector)
+ extend ::RuboCop::Cop::AutoCorrector
def array?(param0 = T.unsafe(nil)); end
def count?(param0 = T.unsafe(nil)); end
@@ -746,13 +682,12 @@ class RuboCop::Cop::Performance::Size < ::RuboCop::Cop::Base
end
RuboCop::Cop::Performance::Size::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Performance::Size::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Performance::SortReverse < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::RangeHelp)
- include(::RuboCop::Cop::SortBlock)
- extend(::RuboCop::Cop::AutoCorrector)
+ include ::RuboCop::Cop::RangeHelp
+ include ::RuboCop::Cop::SortBlock
+ extend ::RuboCop::Cop::AutoCorrector
def on_block(node); end
@@ -764,7 +699,7 @@ end
RuboCop::Cop::Performance::SortReverse::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Performance::Squeeze < ::RuboCop::Cop::Base
- extend(::RuboCop::Cop::AutoCorrector)
+ extend ::RuboCop::Cop::AutoCorrector
def on_send(node); end
def squeeze_candidate?(param0 = T.unsafe(nil)); end
@@ -775,26 +710,23 @@ class RuboCop::Cop::Performance::Squeeze < ::RuboCop::Cop::Base
end
RuboCop::Cop::Performance::Squeeze::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Performance::Squeeze::PREFERRED_METHODS = T.let(T.unsafe(nil), Hash)
-
RuboCop::Cop::Performance::Squeeze::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Performance::StartWith < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::RegexpMetacharacter)
- extend(::RuboCop::Cop::AutoCorrector)
+ include ::RuboCop::Cop::RegexpMetacharacter
+ extend ::RuboCop::Cop::AutoCorrector
def on_match_with_lvasgn(node); end
def on_send(node); end
def redundant_regex?(param0 = T.unsafe(nil)); end
end
RuboCop::Cop::Performance::StartWith::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Performance::StartWith::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Performance::StringInclude < ::RuboCop::Cop::Base
- extend(::RuboCop::Cop::AutoCorrector)
+ extend ::RuboCop::Cop::AutoCorrector
def on_match_with_lvasgn(node); end
def on_send(node); end
@@ -806,12 +738,11 @@ class RuboCop::Cop::Performance::StringInclude < ::RuboCop::Cop::Base
end
RuboCop::Cop::Performance::StringInclude::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Performance::StringInclude::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Performance::StringReplacement < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::RangeHelp)
- extend(::RuboCop::Cop::AutoCorrector)
+ include ::RuboCop::Cop::RangeHelp
+ extend ::RuboCop::Cop::AutoCorrector
def on_send(node); end
def string_replacement?(param0 = T.unsafe(nil)); end
@@ -834,20 +765,15 @@ class RuboCop::Cop::Performance::StringReplacement < ::RuboCop::Cop::Base
end
RuboCop::Cop::Performance::StringReplacement::BANG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Performance::StringReplacement::DELETE = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Performance::StringReplacement::DETERMINISTIC_REGEX = T.let(T.unsafe(nil), Regexp)
-
RuboCop::Cop::Performance::StringReplacement::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Performance::StringReplacement::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
-
RuboCop::Cop::Performance::StringReplacement::TR = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Performance::Sum < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::RangeHelp)
- extend(::RuboCop::Cop::AutoCorrector)
+ include ::RuboCop::Cop::RangeHelp
+ extend ::RuboCop::Cop::AutoCorrector
def acc_plus_elem?(param0 = T.unsafe(nil), param1, param2); end
def elem_plus_acc?(param0 = T.unsafe(nil), param1, param2); end
@@ -878,13 +804,11 @@ class RuboCop::Cop::Performance::Sum < ::RuboCop::Cop::Base
end
RuboCop::Cop::Performance::Sum::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Performance::Sum::MSG_IF_NO_INIT_VALUE = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Performance::Sum::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Performance::TimesMap < ::RuboCop::Cop::Base
- extend(::RuboCop::Cop::AutoCorrector)
+ extend ::RuboCop::Cop::AutoCorrector
def on_block(node); end
def on_send(node); end
@@ -897,13 +821,11 @@ class RuboCop::Cop::Performance::TimesMap < ::RuboCop::Cop::Base
end
RuboCop::Cop::Performance::TimesMap::MESSAGE = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Performance::TimesMap::MESSAGE_ONLY_IF = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Performance::TimesMap::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Performance::UnfreezeString < ::RuboCop::Cop::Base
- extend(::RuboCop::Cop::AutoCorrector)
+ extend ::RuboCop::Cop::AutoCorrector
def dup_string?(param0 = T.unsafe(nil)); end
def on_send(node); end
@@ -915,22 +837,19 @@ class RuboCop::Cop::Performance::UnfreezeString < ::RuboCop::Cop::Base
end
RuboCop::Cop::Performance::UnfreezeString::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Performance::UnfreezeString::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Performance::UriDefaultParser < ::RuboCop::Cop::Base
- extend(::RuboCop::Cop::AutoCorrector)
+ extend ::RuboCop::Cop::AutoCorrector
def on_send(node); end
def uri_parser_new?(param0 = T.unsafe(nil)); end
end
RuboCop::Cop::Performance::UriDefaultParser::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Performance::UriDefaultParser::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
module RuboCop::Cop::RegexpMetacharacter
-
private
def drop_end_metacharacter(regexp_string); end
@@ -945,8 +864,8 @@ module RuboCop::Cop::RegexpMetacharacter
end
module RuboCop::Cop::SortBlock
- include(::RuboCop::Cop::RangeHelp)
- extend(::RuboCop::AST::NodePattern::Macros)
+ include ::RuboCop::Cop::RangeHelp
+ extend ::RuboCop::AST::NodePattern::Macros
def replaceable_body?(param0 = T.unsafe(nil), param1, param2); end
def sort_with_block?(param0 = T.unsafe(nil)); end
@@ -957,26 +876,24 @@ module RuboCop::Cop::SortBlock
end
RuboCop::NodePattern = RuboCop::AST::NodePattern
-
-module RuboCop::Performance
-end
-
+module RuboCop::Performance; end
RuboCop::Performance::CONFIG = T.let(T.unsafe(nil), Hash)
+RuboCop::Performance::CONFIG_DEFAULT = T.let(T.unsafe(nil), Pathname)
module RuboCop::Performance::Inject
class << self
def defaults!; end
end
end
+RuboCop::Performance::PROJECT_ROOT = T.let(T.unsafe(nil), Pathname)
+
module RuboCop::Performance::Version
class << self
def document_version; end
end
end
RuboCop::Performance::Version::STRING = T.let(T.unsafe(nil), String)
-
RuboCop::ProcessedSource = RuboCop::AST::ProcessedSource
-
RuboCop::Token = RuboCop::AST::Token | false |
Other | Homebrew | brew | 2b5342f12dd2cd7120ea3e69236085ee495fae78.json | Update RBI files for parlour. | Library/Homebrew/sorbet/rbi/gems/parlour@6.0.1.rbi | @@ -1,12 +1,44 @@
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `parlour` gem.
-# Please instead update this file by running `tapioca sync`.
+# Please instead update this file by running `bin/tapioca sync`.
# typed: true
-module Parlour
+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
+module Parlour; end
+
class Parlour::ConflictResolver
sig { params(namespace: Parlour::RbiGenerator::Namespace, resolver: T.proc.params(desc: String, choices: T::Array[Parlour::RbiGenerator::RbiObject]).returns(T.nilable(Parlour::RbiGenerator::RbiObject))).void }
def resolve_conflicts(namespace, &resolver); end
@@ -15,14 +47,15 @@ class Parlour::ConflictResolver
sig { params(arr: T::Array[T.untyped]).returns(T::Boolean) }
def all_eql?(arr); end
+
sig { params(namespace: Parlour::RbiGenerator::Namespace, name: T.nilable(String)).void }
def deduplicate_mixins_of_name(namespace, name); end
+
sig { params(arr: T::Array[T.untyped]).returns(T.nilable(Symbol)) }
def merge_strategy(arr); end
end
-module Parlour::Conversion
-end
+module Parlour::Conversion; end
class Parlour::Conversion::Converter
abstract!
@@ -31,6 +64,7 @@ class Parlour::Conversion::Converter
sig { params(msg: String, node: Parlour::RbiGenerator::RbiObject).void }
def add_warning(msg, node); end
+
sig { returns(T::Array[[String, Parlour::TypedObject]]) }
def warnings; end
end
@@ -41,8 +75,10 @@ class Parlour::Conversion::RbiToRbs < ::Parlour::Conversion::Converter
sig { params(from: Parlour::RbiGenerator::Namespace, to: Parlour::RbsGenerator::Namespace).void }
def convert_all(from, to); end
+
sig { params(node: Parlour::RbiGenerator::RbiObject, new_parent: Parlour::RbsGenerator::Namespace).void }
def convert_object(node, new_parent); end
+
sig { returns(Parlour::RbsGenerator) }
def rbs_gen; end
end
@@ -51,10 +87,13 @@ module Parlour::Debugging
class << self
sig { params(value: T::Boolean).returns(T::Boolean) }
def debug_mode=(value); end
+
sig { returns(T::Boolean) }
def debug_mode?; end
+
sig { params(object: T.untyped, message: String).void }
def debug_puts(object, message); end
+
sig { params(object: T.untyped).returns(String) }
def name_for_debug_caller(object); end
end
@@ -64,10 +103,13 @@ module Parlour::Debugging::Tree
class << self
sig { params(message: String).returns(String) }
def begin(message); end
+
sig { params(message: String).returns(String) }
def end(message); end
+
sig { params(message: String).returns(String) }
def here(message); end
+
def line_prefix; end
def text_prefix; end
end
@@ -78,21 +120,27 @@ Parlour::Debugging::Tree::INDENT_SPACES = T.let(T.unsafe(nil), Integer)
class Parlour::DetachedRbiGenerator < ::Parlour::RbiGenerator
sig { override.returns(T.nilable(Parlour::Plugin)) }
def current_plugin; end
+
sig { returns(T.untyped) }
def detached!; end
+
sig { override.returns(Parlour::Options) }
def options; end
+
sig { override.params(strictness: String).returns(String) }
def rbi(strictness = T.unsafe(nil)); end
end
class Parlour::DetachedRbsGenerator < ::Parlour::RbsGenerator
sig { override.returns(T.nilable(Parlour::Plugin)) }
def current_plugin; end
+
sig { returns(T.untyped) }
def detached!; end
+
sig { override.returns(Parlour::Options) }
def options; end
+
sig { override.returns(String) }
def rbs; end
end
@@ -103,7 +151,9 @@ class Parlour::Generator
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
@@ -114,10 +164,13 @@ class Parlour::Options
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
@@ -127,6 +180,7 @@ class Parlour::ParseError < ::StandardError
sig { returns(Parser::Source::Buffer) }
def buffer; end
+
sig { returns(Parser::Source::Range) }
def range; end
end
@@ -139,15 +193,19 @@ class Parlour::Plugin
sig { abstract.params(root: Parlour::RbiGenerator::Namespace).void }
def generate(root); end
+
sig { returns(T.nilable(String)) }
def strictness; end
+
def strictness=(_arg0); end
class << self
sig { params(new_plugin: T.class_of(Parlour::Plugin)).void }
def inherited(new_plugin); end
+
sig { returns(T::Hash[String, T.class_of(Parlour::Plugin)]) }
def registered_plugins; end
+
sig { params(plugins: T::Array[Parlour::Plugin], generator: Parlour::RbiGenerator, allow_failure: T::Boolean).void }
def run_plugins(plugins, generator, allow_failure: T.unsafe(nil)); end
end
@@ -158,6 +216,7 @@ class Parlour::RbiGenerator < ::Parlour::Generator
sig { overridable.params(strictness: String).returns(String) }
def rbi(strictness = T.unsafe(nil)); end
+
sig { overridable.returns(Parlour::RbiGenerator::Namespace) }
def root; end
end
@@ -168,17 +227,24 @@ class Parlour::RbiGenerator::Arbitrary < ::Parlour::RbiGenerator::RbiObject
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
@@ -189,12 +255,16 @@ class Parlour::RbiGenerator::Attribute < ::Parlour::RbiGenerator::Method
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
@@ -210,16 +280,22 @@ class Parlour::RbiGenerator::ClassNamespace < ::Parlour::RbiGenerator::Namespace
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
@@ -230,17 +306,24 @@ class Parlour::RbiGenerator::Constant < ::Parlour::RbiGenerator::RbiObject
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
@@ -251,12 +334,16 @@ class Parlour::RbiGenerator::EnumClassNamespace < ::Parlour::RbiGenerator::Class
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
@@ -267,14 +354,19 @@ class Parlour::RbiGenerator::Extend < ::Parlour::RbiGenerator::RbiObject
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
@@ -285,14 +377,19 @@ class Parlour::RbiGenerator::Include < ::Parlour::RbiGenerator::RbiObject
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
@@ -303,39 +400,54 @@ class Parlour::RbiGenerator::Method < ::Parlour::RbiGenerator::RbiObject
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
@@ -346,16 +458,22 @@ class Parlour::RbiGenerator::ModuleNamespace < ::Parlour::RbiGenerator::Namespac
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
@@ -366,70 +484,101 @@ class Parlour::RbiGenerator::Namespace < ::Parlour::RbiGenerator::RbiObject
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 { overridable.override.returns(String) }
+
+ 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 { overridable.override.params(indent_level: Integer, options: Parlour::Options).returns(T::Array[String]) }
+
+ 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 { overridable.override.params(others: T::Array[Parlour::RbiGenerator::RbiObject]).void }
+
+ sig { override.overridable.params(others: T::Array[Parlour::RbiGenerator::RbiObject]).void }
def merge_into_self(others); end
- sig { overridable.override.params(others: T::Array[Parlour::RbiGenerator::RbiObject]).returns(T::Boolean) }
+
+ 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
@@ -442,20 +591,28 @@ class Parlour::RbiGenerator::Parameter
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
@@ -468,16 +625,21 @@ class Parlour::RbiGenerator::RbiObject < ::Parlour::TypedObject
sig { params(generator: Parlour::Generator, name: String).void }
def initialize(generator, name); end
- sig { overridable.override.returns(String) }
+ 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
@@ -488,12 +650,16 @@ class Parlour::RbiGenerator::StructClassNamespace < ::Parlour::RbiGenerator::Cla
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
@@ -504,32 +670,46 @@ class Parlour::RbiGenerator::StructProp
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
@@ -542,16 +722,22 @@ class Parlour::RbiGenerator::TypeAlias < ::Parlour::RbiGenerator::RbiObject
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
@@ -561,6 +747,7 @@ class Parlour::RbsGenerator < ::Parlour::Generator
sig { overridable.returns(String) }
def rbs; end
+
sig { overridable.returns(Parlour::RbsGenerator::Namespace) }
def root; end
end
@@ -571,15 +758,21 @@ class Parlour::RbsGenerator::Arbitrary < ::Parlour::RbsGenerator::RbsObject
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.params(indent_level: Integer, options: Parlour::Options).returns(T::Array[String]) }
def generate_rbs(indent_level, options); end
+
sig { override.params(others: T::Array[Parlour::RbsGenerator::RbsObject]).void }
def merge_into_self(others); end
+
sig { override.params(others: T::Array[Parlour::RbsGenerator::RbsObject]).returns(T::Boolean) }
def mergeable?(others); end
end
@@ -590,10 +783,13 @@ class Parlour::RbsGenerator::Attribute < ::Parlour::RbsGenerator::Method
sig { override.params(other: Object).returns(T::Boolean) }
def ==(other); end
+
sig { override.params(indent_level: Integer, options: Parlour::Options).returns(T::Array[String]) }
def generate_rbs(indent_level, options); end
+
sig { returns(Symbol) }
def kind; end
+
sig { returns(T.any(Parlour::Types::Type, String)) }
def type; end
end
@@ -604,10 +800,13 @@ class Parlour::RbsGenerator::Block
sig { overridable.params(other: Object).returns(T::Boolean) }
def ==(other); end
+
sig { params(options: Parlour::Options).returns(T::Array[String]) }
def generate_rbs(options); end
+
sig { returns(T::Boolean) }
def required; end
+
sig { returns(Parlour::Types::Proc) }
def type; end
end
@@ -618,12 +817,16 @@ class Parlour::RbsGenerator::ClassNamespace < ::Parlour::RbsGenerator::Namespace
sig { override.returns(String) }
def describe; end
+
sig { override.params(indent_level: Integer, options: Parlour::Options).returns(T::Array[String]) }
def generate_rbs(indent_level, options); end
+
sig { override.params(others: T::Array[Parlour::RbsGenerator::RbsObject]).void }
def merge_into_self(others); end
+
sig { override.params(others: T::Array[Parlour::RbsGenerator::RbsObject]).returns(T::Boolean) }
def mergeable?(others); end
+
sig { returns(T.nilable(T.any(Parlour::Types::Type, String))) }
def superclass; end
end
@@ -634,14 +837,19 @@ class Parlour::RbsGenerator::Constant < ::Parlour::RbsGenerator::RbsObject
sig { params(other: Object).returns(T::Boolean) }
def ==(other); end
+
sig { override.returns(String) }
def describe; end
+
sig { override.params(indent_level: Integer, options: Parlour::Options).returns(T::Array[String]) }
def generate_rbs(indent_level, options); end
+
sig { override.params(others: T::Array[Parlour::RbsGenerator::RbsObject]).void }
def merge_into_self(others); end
+
sig { override.params(others: T::Array[Parlour::RbsGenerator::RbsObject]).returns(T::Boolean) }
def mergeable?(others); end
+
sig { returns(T.any(Parlour::Types::Type, String)) }
def type; end
end
@@ -652,14 +860,19 @@ class Parlour::RbsGenerator::Extend < ::Parlour::RbsGenerator::RbsObject
sig { params(other: Object).returns(T::Boolean) }
def ==(other); end
+
sig { override.returns(String) }
def describe; end
+
sig { override.params(indent_level: Integer, options: Parlour::Options).returns(T::Array[String]) }
def generate_rbs(indent_level, options); end
+
sig { override.params(others: T::Array[Parlour::RbsGenerator::RbsObject]).void }
def merge_into_self(others); end
+
sig { override.params(others: T::Array[Parlour::RbsGenerator::RbsObject]).returns(T::Boolean) }
def mergeable?(others); end
+
sig { returns(T.any(Parlour::Types::Type, String)) }
def type; end
end
@@ -670,21 +883,27 @@ class Parlour::RbsGenerator::Include < ::Parlour::RbsGenerator::RbsObject
sig { params(other: Object).returns(T::Boolean) }
def ==(other); end
+
sig { override.returns(String) }
def describe; end
+
sig { override.params(indent_level: Integer, options: Parlour::Options).returns(T::Array[String]) }
def generate_rbs(indent_level, options); end
+
sig { override.params(others: T::Array[Parlour::RbsGenerator::RbsObject]).void }
def merge_into_self(others); end
+
sig { override.params(others: T::Array[Parlour::RbsGenerator::RbsObject]).returns(T::Boolean) }
def mergeable?(others); end
+
sig { returns(T.any(Parlour::Types::Type, String)) }
def type; end
end
class Parlour::RbsGenerator::InterfaceNamespace < ::Parlour::RbsGenerator::Namespace
sig { override.returns(String) }
def describe; end
+
sig { override.params(indent_level: Integer, options: Parlour::Options).returns(T::Array[String]) }
def generate_rbs(indent_level, options); end
end
@@ -695,16 +914,22 @@ class Parlour::RbsGenerator::Method < ::Parlour::RbsGenerator::RbsObject
sig { overridable.params(other: Object).returns(T::Boolean) }
def ==(other); end
+
sig { returns(T::Boolean) }
def class_method; end
+
sig { override.returns(String) }
def describe; end
+
sig { override.params(indent_level: Integer, options: Parlour::Options).returns(T::Array[String]) }
def generate_rbs(indent_level, options); end
+
sig { override.params(others: T::Array[Parlour::RbsGenerator::RbsObject]).void }
def merge_into_self(others); end
+
sig { override.params(others: T::Array[Parlour::RbsGenerator::RbsObject]).returns(T::Boolean) }
def mergeable?(others); end
+
sig { returns(T::Array[Parlour::RbsGenerator::MethodSignature]) }
def signatures; end
end
@@ -715,21 +940,27 @@ class Parlour::RbsGenerator::MethodSignature
sig { overridable.params(other: Object).returns(T::Boolean) }
def ==(other); end
+
sig { returns(T.nilable(Parlour::RbsGenerator::Block)) }
def block; end
+
sig { params(options: Parlour::Options).returns(T::Array[String]) }
def generate_rbs(options); end
+
sig { returns(T::Array[Parlour::RbsGenerator::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
end
class Parlour::RbsGenerator::ModuleNamespace < ::Parlour::RbsGenerator::Namespace
sig { override.returns(String) }
def describe; end
+
sig { override.params(indent_level: Integer, options: Parlour::Options).returns(T::Array[String]) }
def generate_rbs(indent_level, options); end
end
@@ -740,62 +971,89 @@ class Parlour::RbsGenerator::Namespace < ::Parlour::RbsGenerator::RbsObject
sig { params(comment: T.any(String, T::Array[String])).void }
def add_comment_to_next_child(comment); end
+
sig { returns(T::Array[Parlour::RbsGenerator::TypeAlias]) }
def aliases; end
+
sig { returns(T::Array[Parlour::RbsGenerator::RbsObject]) }
def children; end
+
sig { returns(T::Array[Parlour::RbsGenerator::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), block: T.nilable(T.proc.params(x: Parlour::RbsGenerator::Attribute).void)).returns(Parlour::RbsGenerator::Attribute) }
def create_attr_accessor(name, type:, &block); end
+
sig { params(name: String, type: T.any(Parlour::Types::Type, String), block: T.nilable(T.proc.params(x: Parlour::RbsGenerator::Attribute).void)).returns(Parlour::RbsGenerator::Attribute) }
def create_attr_reader(name, type:, &block); end
+
sig { params(name: String, type: T.any(Parlour::Types::Type, String), block: T.nilable(T.proc.params(x: Parlour::RbsGenerator::Attribute).void)).returns(Parlour::RbsGenerator::Attribute) }
def create_attr_writer(name, type:, &block); end
+
sig { params(name: String, kind: Symbol, type: T.any(Parlour::Types::Type, String), block: T.nilable(T.proc.params(x: Parlour::RbsGenerator::Attribute).void)).returns(Parlour::RbsGenerator::Attribute) }
def create_attribute(name, kind:, type:, &block); end
+
sig { params(name: String, superclass: T.nilable(T.any(Parlour::Types::Type, String)), block: T.nilable(T.proc.params(x: Parlour::RbsGenerator::ClassNamespace).void)).returns(Parlour::RbsGenerator::ClassNamespace) }
def create_class(name, superclass: T.unsafe(nil), &block); end
+
sig { params(name: String, type: T.any(Parlour::Types::Type, String), block: T.nilable(T.proc.params(x: Parlour::RbsGenerator::Constant).void)).returns(Parlour::RbsGenerator::Constant) }
def create_constant(name, type:, &block); end
+
sig { params(type: T.any(Parlour::Types::Type, String), block: T.nilable(T.proc.params(x: Parlour::RbsGenerator::Extend).void)).returns(Parlour::RbsGenerator::Extend) }
def create_extend(type, &block); end
+
sig { params(extendables: T::Array[T.any(Parlour::Types::Type, String)]).returns(T::Array[Parlour::RbsGenerator::Extend]) }
def create_extends(extendables); end
+
sig { params(type: T.any(Parlour::Types::Type, String), block: T.nilable(T.proc.params(x: Parlour::RbsGenerator::Include).void)).returns(Parlour::RbsGenerator::Include) }
def create_include(type, &block); end
+
sig { params(includables: T::Array[T.any(Parlour::Types::Type, String)]).returns(T::Array[Parlour::RbsGenerator::Include]) }
def create_includes(includables); end
+
sig { params(name: String, block: T.nilable(T.proc.params(x: Parlour::RbsGenerator::Namespace).void)).returns(Parlour::RbsGenerator::InterfaceNamespace) }
def create_interface(name, &block); end
+
sig { params(name: String, signatures: T.nilable(T::Array[Parlour::RbsGenerator::MethodSignature]), class_method: T::Boolean, block: T.nilable(T.proc.params(x: Parlour::RbsGenerator::Method).void)).returns(Parlour::RbsGenerator::Method) }
def create_method(name, signatures = T.unsafe(nil), class_method: T.unsafe(nil), &block); end
+
sig { params(name: String, block: T.nilable(T.proc.params(x: Parlour::RbsGenerator::Namespace).void)).returns(Parlour::RbsGenerator::ModuleNamespace) }
def create_module(name, &block); end
+
sig { params(name: String, type: T.any(Parlour::Types::Type, String), block: T.nilable(T.proc.params(x: Parlour::RbsGenerator::TypeAlias).void)).returns(Parlour::RbsGenerator::TypeAlias) }
def create_type_alias(name, type:, &block); end
- sig { overridable.override.returns(String) }
+
+ sig { override.overridable.returns(String) }
def describe; end
+
sig { returns(T::Array[Parlour::RbsGenerator::Extend]) }
def extends; end
- sig { overridable.override.params(indent_level: Integer, options: Parlour::Options).returns(T::Array[String]) }
+
+ sig { override.overridable.params(indent_level: Integer, options: Parlour::Options).returns(T::Array[String]) }
def generate_rbs(indent_level, options); end
+
sig { returns(T::Array[Parlour::RbsGenerator::Include]) }
def includes; end
- sig { overridable.override.params(others: T::Array[Parlour::RbsGenerator::RbsObject]).void }
+
+ sig { override.overridable.params(others: T::Array[Parlour::RbsGenerator::RbsObject]).void }
def merge_into_self(others); end
- sig { overridable.override.params(others: T::Array[Parlour::RbsGenerator::RbsObject]).returns(T::Boolean) }
+
+ sig { override.overridable.params(others: T::Array[Parlour::RbsGenerator::RbsObject]).returns(T::Boolean) }
def mergeable?(others); end
+
sig { params(object: T.untyped, block: T.proc.params(x: Parlour::RbsGenerator::Namespace).void).void }
def path(object, &block); 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::RbsGenerator::RbsObject).void }
def move_next_comments(object); end
end
@@ -806,22 +1064,27 @@ class Parlour::RbsGenerator::Parameter
sig { params(other: Object).returns(T::Boolean) }
def ==(other); end
+
sig { returns(Symbol) }
def kind; end
+
sig { returns(String) }
def name; end
+
sig { returns(String) }
def name_without_kind; end
+
sig { returns(T::Boolean) }
def required; end
+
sig { returns(String) }
def to_rbs_param; end
+
sig { returns(T.any(Parlour::Types::Type, String)) }
def type; end
end
Parlour::RbsGenerator::Parameter::PREFIXES = T.let(T.unsafe(nil), Hash)
-
Parlour::RbsGenerator::Parameter::RBS_KEYWORDS = T.let(T.unsafe(nil), Array)
class Parlour::RbsGenerator::RbsObject < ::Parlour::TypedObject
@@ -830,14 +1093,18 @@ class Parlour::RbsGenerator::RbsObject < ::Parlour::TypedObject
sig { params(generator: Parlour::Generator, name: String).void }
def initialize(generator, name); end
- sig { overridable.override.returns(String) }
+ sig { override.overridable.returns(String) }
def describe; end
+
sig { abstract.params(indent_level: Integer, options: Parlour::Options).returns(T::Array[String]) }
def generate_rbs(indent_level, options); end
+
sig { returns(Parlour::Generator) }
def generator; end
+
sig { abstract.params(others: T::Array[Parlour::RbsGenerator::RbsObject]).void }
def merge_into_self(others); end
+
sig { abstract.params(others: T::Array[Parlour::RbsGenerator::RbsObject]).returns(T::Boolean) }
def mergeable?(others); end
end
@@ -848,14 +1115,19 @@ class Parlour::RbsGenerator::TypeAlias < ::Parlour::RbsGenerator::RbsObject
sig { params(other: Object).returns(T::Boolean) }
def ==(other); end
+
sig { override.returns(String) }
def describe; end
+
sig { override.params(indent_level: Integer, options: Parlour::Options).returns(T::Array[String]) }
def generate_rbs(indent_level, options); end
+
sig { override.params(others: T::Array[Parlour::RbsGenerator::RbsObject]).void }
def merge_into_self(others); end
+
sig { override.params(others: T::Array[Parlour::RbsGenerator::RbsObject]).returns(T::Boolean) }
def mergeable?(others); end
+
sig { returns(T.any(Parlour::Types::Type, String)) }
def type; end
end
@@ -864,8 +1136,10 @@ module Parlour::TypeLoader
class << self
sig { params(filename: String, generator: T.nilable(Parlour::RbiGenerator)).returns(Parlour::RbiGenerator::Namespace) }
def load_file(filename, generator: T.unsafe(nil)); end
+
sig { params(root: String, inclusions: T::Array[String], exclusions: T::Array[String], generator: T.nilable(Parlour::RbiGenerator)).returns(Parlour::RbiGenerator::Namespace) }
def load_project(root, inclusions: T.unsafe(nil), exclusions: T.unsafe(nil), generator: T.unsafe(nil)); end
+
sig { params(source: String, filename: T.nilable(String), generator: T.nilable(Parlour::RbiGenerator)).returns(Parlour::RbiGenerator::Namespace) }
def load_source(source, filename = T.unsafe(nil), generator: T.unsafe(nil)); end
end
@@ -877,62 +1151,81 @@ class Parlour::TypeParser
sig { returns(Parser::AST::Node) }
def ast; end
+
def ast=(_arg0); end
+
sig { returns(Parlour::RbiGenerator) }
def generator; end
+
def generator=(_arg0); end
+
sig { returns(Parlour::RbiGenerator::Namespace) }
def parse_all; end
+
sig { params(path: Parlour::TypeParser::NodePath, is_within_eigenclass: T::Boolean).returns(T::Array[Parlour::RbiGenerator::Method]) }
def parse_method_into_methods(path, is_within_eigenclass: T.unsafe(nil)); end
+
sig { params(node: Parser::AST::Node).returns(Parlour::Types::Type) }
def parse_node_to_type(node); end
+
sig { params(path: Parlour::TypeParser::NodePath, is_within_eigenclass: T::Boolean).returns(T::Array[Parlour::RbiGenerator::RbiObject]) }
def parse_path_to_object(path, is_within_eigenclass: T.unsafe(nil)); end
+
sig { params(path: Parlour::TypeParser::NodePath, is_within_eigenclass: T::Boolean).returns(T::Array[Parlour::RbiGenerator::Method]) }
def parse_sig_into_methods(path, is_within_eigenclass: T.unsafe(nil)); end
+
sig { params(path: Parlour::TypeParser::NodePath).returns(Parlour::TypeParser::IntermediateSig) }
def parse_sig_into_sig(path); end
+
sig { returns(T::Boolean) }
def unknown_node_errors; end
protected
sig { params(node: T.nilable(Parser::AST::Node), modifier: Symbol).returns(T::Boolean) }
def body_has_modifier?(node, modifier); end
+
sig { params(node: Parser::AST::Node).returns([T::Array[String], T::Array[String]]) }
def body_includes_and_extends(node); end
+
sig { params(node: T.nilable(Parser::AST::Node)).returns(T::Array[Symbol]) }
def constant_names(node); end
+
sig { params(node: T.nilable(Parser::AST::Node)).returns(T.nilable(String)) }
def node_to_s(node); end
+
sig { params(desc: String, node: T.any(Parlour::TypeParser::NodePath, Parser::AST::Node)).returns(T.noreturn) }
def parse_err(desc, node); end
+
sig { params(path: Parlour::TypeParser::NodePath).returns(T::Boolean) }
def previous_sibling_sig_node?(path); end
+
sig { params(node: Parser::AST::Node).returns(T::Boolean) }
def sig_node?(node); end
+
sig { params(msg: String, node: Parser::AST::Node).void }
def warning(msg, node); end
+
sig { type_parameters(:A, :B).params(a: T::Array[T.type_parameter(:A)], fa: T.proc.params(item: T.type_parameter(:A)).returns(T.untyped), b: T::Array[T.type_parameter(:B)], fb: T.proc.params(item: T.type_parameter(:B)).returns(T.untyped)).returns(T::Array[[T.type_parameter(:A), T.type_parameter(:B)]]) }
def zip_by(a, fa, b, fb); end
class << self
sig { params(filename: String, source: String, generator: T.nilable(Parlour::RbiGenerator)).returns(Parlour::TypeParser) }
def from_source(filename, source, generator: T.unsafe(nil)); end
+
sig { params(str: String).returns(Parlour::Types::Type) }
def parse_single_type(str); end
end
end
class Parlour::TypeParser::IntermediateSig < ::T::Struct
- prop :type_parameters, T.nilable(T::Array[Symbol])
- prop :overridable, T::Boolean
- prop :override, T::Boolean
prop :abstract, T::Boolean
prop :final, T::Boolean
- prop :return_type, T.nilable(String)
+ prop :overridable, T::Boolean
+ prop :override, T::Boolean
prop :params, T.nilable(T::Array[Parser::AST::Node])
+ prop :return_type, T.nilable(String)
+ prop :type_parameters, T.nilable(T::Array[Symbol])
class << self
def inherited(s); end
@@ -945,12 +1238,16 @@ class Parlour::TypeParser::NodePath
sig { params(index: Integer).returns(Parlour::TypeParser::NodePath) }
def child(index); end
+
sig { returns(T::Array[Integer]) }
def indices; end
+
sig { returns(Parlour::TypeParser::NodePath) }
def parent; end
+
sig { params(offset: Integer).returns(Parlour::TypeParser::NodePath) }
def sibling(offset); end
+
sig { params(start: Parser::AST::Node).returns(Parser::AST::Node) }
def traverse(start); end
end
@@ -963,13 +1260,18 @@ class Parlour::TypedObject
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
@@ -979,23 +1281,26 @@ class Parlour::TypedObject
def generate_comments(indent_level, options); end
end
-module Parlour::Types
-end
+module Parlour::Types; end
class Parlour::Types::Array < ::Parlour::Types::SingleElementCollection
sig { params(other: Object).returns(T::Boolean) }
def ==(other); end
+
sig { override.returns(String) }
def collection_name; end
end
class Parlour::Types::Boolean < ::Parlour::Types::Type
sig { params(other: Object).returns(T::Boolean) }
def ==(other); end
+
sig { override.returns(String) }
def describe; end
+
sig { override.returns(String) }
def generate_rbi; end
+
sig { override.returns(String) }
def generate_rbs; end
end
@@ -1006,26 +1311,32 @@ class Parlour::Types::Class < ::Parlour::Types::Type
sig { params(other: Object).returns(T::Boolean) }
def ==(other); end
+
sig { override.returns(String) }
def describe; end
+
sig { override.returns(String) }
def generate_rbi; end
+
sig { override.returns(String) }
def generate_rbs; end
+
sig { returns(Parlour::Types::Type) }
def type; end
end
class Parlour::Types::Enumerable < ::Parlour::Types::SingleElementCollection
sig { params(other: Object).returns(T::Boolean) }
def ==(other); end
+
sig { override.returns(String) }
def collection_name; end
end
class Parlour::Types::Enumerator < ::Parlour::Types::SingleElementCollection
sig { params(other: Object).returns(T::Boolean) }
def ==(other); end
+
sig { override.returns(String) }
def collection_name; end
end
@@ -1036,14 +1347,19 @@ class Parlour::Types::Generic < ::Parlour::Types::Type
sig { params(other: Object).returns(T::Boolean) }
def ==(other); end
+
sig { override.returns(String) }
def describe; end
+
sig { override.returns(String) }
def generate_rbi; end
+
sig { override.returns(String) }
def generate_rbs; end
+
sig { returns(Parlour::Types::Type) }
def type; end
+
sig { returns(T::Array[Parlour::Types::Type]) }
def type_params; end
end
@@ -1054,14 +1370,19 @@ class Parlour::Types::Hash < ::Parlour::Types::Type
sig { params(other: Object).returns(T::Boolean) }
def ==(other); end
+
sig { override.returns(String) }
def describe; end
+
sig { override.returns(String) }
def generate_rbi; end
+
sig { override.returns(String) }
def generate_rbs; end
+
sig { returns(Parlour::Types::Type) }
def key; end
+
sig { returns(Parlour::Types::Type) }
def value; end
end
@@ -1072,12 +1393,16 @@ class Parlour::Types::Intersection < ::Parlour::Types::Type
sig { params(other: Object).returns(T::Boolean) }
def ==(other); end
+
sig { override.returns(String) }
def describe; end
+
sig { override.returns(String) }
def generate_rbi; end
+
sig { override.returns(String) }
def generate_rbs; end
+
sig { returns(T::Array[Parlour::Types::Type]) }
def types; end
end
@@ -1088,12 +1413,16 @@ class Parlour::Types::Nilable < ::Parlour::Types::Type
sig { params(other: Object).returns(T::Boolean) }
def ==(other); end
+
sig { override.returns(String) }
def describe; end
+
sig { override.returns(String) }
def generate_rbi; end
+
sig { override.returns(String) }
def generate_rbs; end
+
sig { returns(Parlour::Types::Type) }
def type; end
end
@@ -1104,14 +1433,19 @@ class Parlour::Types::Proc < ::Parlour::Types::Type
sig { params(other: Object).returns(T::Boolean) }
def ==(other); end
+
sig { override.returns(String) }
def describe; end
+
sig { override.returns(String) }
def generate_rbi; end
+
sig { override.returns(String) }
def generate_rbs; end
+
sig { returns(T::Array[Parlour::Types::Proc::Parameter]) }
def parameters; end
+
sig { returns(T.nilable(Parlour::Types::Type)) }
def return_type; end
end
@@ -1122,17 +1456,21 @@ class Parlour::Types::Proc::Parameter
sig { params(other: Object).returns(T::Boolean) }
def ==(other); end
+
sig { returns(T.nilable(String)) }
def default; end
+
sig { returns(String) }
def name; end
+
sig { returns(Parlour::Types::Type) }
def type; end
end
class Parlour::Types::Range < ::Parlour::Types::SingleElementCollection
sig { params(other: Object).returns(T::Boolean) }
def ==(other); end
+
sig { override.returns(String) }
def collection_name; end
end
@@ -1143,12 +1481,16 @@ class Parlour::Types::Raw < ::Parlour::Types::Type
sig { params(other: Object).returns(T::Boolean) }
def ==(other); end
+
sig { override.returns(String) }
def describe; end
+
sig { override.returns(String) }
def generate_rbi; end
+
sig { override.returns(String) }
def generate_rbs; end
+
sig { returns(String) }
def str; end
end
@@ -1159,30 +1501,38 @@ class Parlour::Types::Record < ::Parlour::Types::Type
sig { params(other: Object).returns(T::Boolean) }
def ==(other); end
+
sig { override.returns(String) }
def describe; end
+
sig { override.returns(String) }
def generate_rbi; end
+
sig { override.returns(String) }
def generate_rbs; end
+
sig { returns(T::Hash[Symbol, Parlour::Types::Type]) }
def keys_to_types; end
end
class Parlour::Types::Self < ::Parlour::Types::Type
sig { params(other: Object).returns(T::Boolean) }
def ==(other); end
+
sig { override.returns(String) }
def describe; end
+
sig { override.returns(String) }
def generate_rbi; end
+
sig { override.returns(String) }
def generate_rbs; end
end
class Parlour::Types::Set < ::Parlour::Types::SingleElementCollection
sig { params(other: Object).returns(T::Boolean) }
def ==(other); end
+
sig { override.returns(String) }
def collection_name; end
end
@@ -1195,12 +1545,16 @@ class Parlour::Types::SingleElementCollection < ::Parlour::Types::Type
sig { abstract.returns(String) }
def collection_name; end
+
sig { override.returns(String) }
def describe; end
+
sig { returns(Parlour::Types::Type) }
def element; end
+
sig { override.returns(String) }
def generate_rbi; end
+
sig { override.returns(String) }
def generate_rbs; end
end
@@ -1211,12 +1565,16 @@ class Parlour::Types::Tuple < ::Parlour::Types::Type
sig { params(other: Object).returns(T::Boolean) }
def ==(other); end
+
sig { override.returns(String) }
def describe; end
+
sig { override.returns(String) }
def generate_rbi; end
+
sig { override.returns(String) }
def generate_rbs; end
+
sig { returns(T::Array[Parlour::Types::Type]) }
def types; end
end
@@ -1228,11 +1586,15 @@ class Parlour::Types::Type
sig { abstract.returns(String) }
def describe; end
+
sig { abstract.returns(String) }
def generate_rbi; end
+
sig { abstract.returns(String) }
def generate_rbs; end
+
def hash; end
+
sig { params(type_like: T.any(Parlour::Types::Type, String)).returns(Parlour::Types::Type) }
def to_type(type_like); end
@@ -1242,31 +1604,123 @@ class Parlour::Types::Type
end
end
+Parlour::Types::TypeLike = T.type_alias { T.any(Parlour::Types::Type, String) }
+
class Parlour::Types::Union < ::Parlour::Types::Type
sig { params(types: T::Array[T.any(Parlour::Types::Type, String)]).void }
def initialize(types); end
sig { params(other: Object).returns(T::Boolean) }
def ==(other); end
+
sig { override.returns(String) }
def describe; end
+
sig { override.returns(String) }
def generate_rbi; end
+
sig { override.returns(String) }
def generate_rbs; end
+
sig { returns(T::Array[Parlour::Types::Type]) }
def types; end
end
class Parlour::Types::Untyped < ::Parlour::Types::Type
sig { params(other: Object).returns(T::Boolean) }
def ==(other); end
+
sig { override.returns(String) }
def describe; end
+
sig { override.returns(String) }
def generate_rbi; end
+
sig { override.returns(String) }
def generate_rbs; end
end
Parlour::VERSION = T.let(T.unsafe(nil), String)
+
+class Parser::AST::Node < ::AST::Node
+ def assign_properties(properties); end
+ def loc; end
+ def location; end
+end
+
+class Parser::Source::Buffer
+ def initialize(name, first_line = T.unsafe(nil), source: T.unsafe(nil)); end
+
+ def column_for_position(position); end
+ def decompose_position(position); end
+ def first_line; end
+ def freeze; end
+ def inspect; end
+ def last_line; end
+ def line_for_position(position); end
+ def line_range(lineno); end
+ def name; end
+ def raw_source=(input); end
+ def read; end
+ def slice(range); end
+ def source; end
+ def source=(input); end
+ def source_line(lineno); end
+ def source_lines; end
+ def source_range; end
+
+ private
+
+ def bsearch(line_begins, position); end
+ def line_begins; end
+ def line_index_for_position(position); end
+
+ class << self
+ def recognize_encoding(string); end
+ def reencode_string(input); end
+ end
+end
+
+Parser::Source::Buffer::ENCODING_RE = T.let(T.unsafe(nil), Regexp)
+
+class Parser::Source::Range
+ include ::Comparable
+ include ::RuboCop::AST::Ext::Range
+
+ def initialize(source_buffer, begin_pos, end_pos); end
+
+ def <=>(other); end
+ def adjust(begin_pos: T.unsafe(nil), end_pos: T.unsafe(nil)); end
+ def begin; end
+ def begin_pos; end
+ def column; end
+ def column_range; end
+ def contained?(other); end
+ def contains?(other); end
+ def crossing?(other); end
+ def disjoint?(other); end
+ def empty?; end
+ def end; end
+ def end_pos; end
+ def eql?(_arg0); end
+ def first_line; end
+ def hash; end
+ def inspect; end
+ def intersect(other); end
+ def is?(*what); end
+ def join(other); end
+ def last_column; end
+ def last_line; end
+ def length; end
+ def line; end
+ def overlaps?(other); end
+ def resize(new_size); end
+ def size; end
+ def source; end
+ def source_buffer; end
+ def source_line; end
+ def to_a; end
+ def to_range; end
+ def to_s; end
+ def with(begin_pos: T.unsafe(nil), end_pos: T.unsafe(nil)); end
+end | true |
Other | Homebrew | brew | 2b5342f12dd2cd7120ea3e69236085ee495fae78.json | Update RBI files for parlour. | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -13162,10 +13162,6 @@ class Parlour::TypedObject
extend ::T::Private::Methods::SingletonMethodHooks
end
-module Parlour::Types
- TypeLike = ::T.let(nil, ::T.untyped)
-end
-
class Parlour::Types::Proc::Parameter
extend ::T::Sig
extend ::T::Private::Methods::MethodHooks | true |
Other | Homebrew | brew | 3776ba9756de63fad533167baa2db77088ba1817.json | formula: add a `time` method for use as the build time
A number of formulae use a variant of `Time.now` to generate the build
time of the formula. Let's define a method to make sure that:
1. it uses `SOURCE_DATE_EPOCH` whenever available; and,
2. it uses `utc`.
Both should help with build reproducibility.
See Homebrew/homebrew-core#80608. | Library/Homebrew/formula.rb | @@ -1551,6 +1551,18 @@ def rpath
"@loader_path/../lib"
end
+ # Creates a new `Time` object for use in the formula as the build time.
+ #
+ # @see https://www.rubydoc.info/stdlib/time/Time Time
+ sig { returns(Time) }
+ def time
+ if ENV["SOURCE_DATE_EPOCH"].present?
+ Time.at(ENV["SOURCE_DATE_EPOCH"].to_i).utc
+ else
+ Time.now.utc
+ end
+ end
+
# an array of all core {Formula} names
# @private
def self.core_names | false |
Other | Homebrew | brew | 322d5c67ec636dd44ce17f835dd6ec5cd36a9625.json | Add parentheses to if statement | Library/Homebrew/cask/cask.rb | @@ -122,7 +122,7 @@ def outdated_versions(greedy: false, greedy_latest: false, greedy_auto_updates:
# special case: tap version is not available
return [] if version.nil?
- if greedy || greedy_latest && greedy_auto_updates || greedy_auto_updates && auto_updates
+ if greedy || (greedy_latest && greedy_auto_updates) || (greedy_auto_updates && auto_updates)
return versions if version.latest?
elsif greedy_latest && version.latest?
return versions | false |
Other | Homebrew | brew | 30118918f66f4ed18a6ce34430dd397322f0c60a.json | Update RBI files for mime-types-data. | Library/Homebrew/sorbet/rbi/gems/mime-types-data@3.2021.0704.rbi | @@ -4,12 +4,11 @@
# typed: true
-module MIME
-end
+module MIME; end
class MIME::Types
- include(::Enumerable)
- extend(::Enumerable)
+ include ::Enumerable
+ extend ::Enumerable
def initialize; end
@@ -68,11 +67,7 @@ class MIME::Types::Cache < ::Struct
end
end
-module MIME::Types::Data
-end
-
+module MIME::Types::Data; end
MIME::Types::Data::PATH = T.let(T.unsafe(nil), String)
-
MIME::Types::Data::VERSION = T.let(T.unsafe(nil), String)
-
MIME::Types::VERSION = T.let(T.unsafe(nil), String) | false |
Other | Homebrew | brew | cb1ef7062c1a9181761dcaf7a24d00a00dfeb8ee.json | Update RBI files for addressable. | Library/Homebrew/sorbet/rbi/gems/addressable@2.8.0.rbi | @@ -4,8 +4,7 @@
# typed: true
-module Addressable
-end
+module Addressable; end
module Addressable::IDNA
class << self
@@ -26,6 +25,7 @@ module Addressable::IDNA
def punycode_delimiter?(codepoint); end
def punycode_encode(unicode); end
def punycode_encode_digit(d); end
+ def ucs4_to_utf8(char, buffer); end
def unicode_compose(unpacked); end
def unicode_compose_pair(ch_one, ch_two); end
def unicode_decompose(unpacked); end
@@ -36,80 +36,41 @@ module Addressable::IDNA
end
Addressable::IDNA::ACE_MAX_LENGTH = T.let(T.unsafe(nil), Integer)
-
Addressable::IDNA::ACE_PREFIX = T.let(T.unsafe(nil), String)
-
Addressable::IDNA::COMPOSITION_TABLE = T.let(T.unsafe(nil), Hash)
-
Addressable::IDNA::HANGUL_LBASE = T.let(T.unsafe(nil), Integer)
-
Addressable::IDNA::HANGUL_LCOUNT = T.let(T.unsafe(nil), Integer)
-
Addressable::IDNA::HANGUL_NCOUNT = T.let(T.unsafe(nil), Integer)
-
Addressable::IDNA::HANGUL_SBASE = T.let(T.unsafe(nil), Integer)
-
Addressable::IDNA::HANGUL_SCOUNT = T.let(T.unsafe(nil), Integer)
-
Addressable::IDNA::HANGUL_TBASE = T.let(T.unsafe(nil), Integer)
-
Addressable::IDNA::HANGUL_TCOUNT = T.let(T.unsafe(nil), Integer)
-
Addressable::IDNA::HANGUL_VBASE = T.let(T.unsafe(nil), Integer)
-
Addressable::IDNA::HANGUL_VCOUNT = T.let(T.unsafe(nil), Integer)
-
Addressable::IDNA::PUNYCODE_BASE = T.let(T.unsafe(nil), Integer)
-
Addressable::IDNA::PUNYCODE_DAMP = T.let(T.unsafe(nil), Integer)
-
Addressable::IDNA::PUNYCODE_DELIMITER = T.let(T.unsafe(nil), Integer)
-
Addressable::IDNA::PUNYCODE_INITIAL_BIAS = T.let(T.unsafe(nil), Integer)
-
Addressable::IDNA::PUNYCODE_INITIAL_N = T.let(T.unsafe(nil), Integer)
-
Addressable::IDNA::PUNYCODE_MAXINT = T.let(T.unsafe(nil), Integer)
-
Addressable::IDNA::PUNYCODE_PRINT_ASCII = T.let(T.unsafe(nil), String)
-
Addressable::IDNA::PUNYCODE_SKEW = T.let(T.unsafe(nil), Integer)
-
Addressable::IDNA::PUNYCODE_TMAX = T.let(T.unsafe(nil), Integer)
-
Addressable::IDNA::PUNYCODE_TMIN = T.let(T.unsafe(nil), Integer)
-
-class Addressable::IDNA::PunycodeBadInput < ::StandardError
-end
-
-class Addressable::IDNA::PunycodeBigOutput < ::StandardError
-end
-
-class Addressable::IDNA::PunycodeOverflow < ::StandardError
-end
-
+class Addressable::IDNA::PunycodeBadInput < ::StandardError; end
+class Addressable::IDNA::PunycodeBigOutput < ::StandardError; end
+class Addressable::IDNA::PunycodeOverflow < ::StandardError; end
Addressable::IDNA::UNICODE_DATA = T.let(T.unsafe(nil), Hash)
-
Addressable::IDNA::UNICODE_DATA_CANONICAL = T.let(T.unsafe(nil), Integer)
-
Addressable::IDNA::UNICODE_DATA_COMBINING_CLASS = T.let(T.unsafe(nil), Integer)
-
Addressable::IDNA::UNICODE_DATA_COMPATIBILITY = T.let(T.unsafe(nil), Integer)
-
Addressable::IDNA::UNICODE_DATA_EXCLUSION = T.let(T.unsafe(nil), Integer)
-
Addressable::IDNA::UNICODE_DATA_LOWERCASE = T.let(T.unsafe(nil), Integer)
-
Addressable::IDNA::UNICODE_DATA_TITLECASE = T.let(T.unsafe(nil), Integer)
-
Addressable::IDNA::UNICODE_DATA_UPPERCASE = T.let(T.unsafe(nil), Integer)
-
Addressable::IDNA::UNICODE_MAX_LENGTH = T.let(T.unsafe(nil), Integer)
-
Addressable::IDNA::UNICODE_TABLE = T.let(T.unsafe(nil), String)
-
Addressable::IDNA::UTF8_REGEX = T.let(T.unsafe(nil), Regexp)
-
Addressable::IDNA::UTF8_REGEX_MULTIBYTE = T.let(T.unsafe(nil), Regexp)
class Addressable::URI
@@ -203,6 +164,7 @@ class Addressable::URI
def encode(uri, return_type = T.unsafe(nil)); end
def encode_component(component, character_class = T.unsafe(nil), upcase_encoded = T.unsafe(nil)); end
def escape(uri, return_type = T.unsafe(nil)); end
+ def escape_component(component, character_class = T.unsafe(nil), upcase_encoded = T.unsafe(nil)); end
def form_encode(form_values, sort = T.unsafe(nil)); end
def form_unencode(encoded_value); end
def heuristic_parse(uri, hints = T.unsafe(nil)); end
@@ -220,71 +182,43 @@ class Addressable::URI
end
end
-module Addressable::URI::CharacterClasses
-end
-
+module Addressable::URI::CharacterClasses; end
Addressable::URI::CharacterClasses::ALPHA = T.let(T.unsafe(nil), String)
-
Addressable::URI::CharacterClasses::AUTHORITY = T.let(T.unsafe(nil), String)
-
Addressable::URI::CharacterClasses::DIGIT = T.let(T.unsafe(nil), String)
-
Addressable::URI::CharacterClasses::FRAGMENT = T.let(T.unsafe(nil), String)
-
Addressable::URI::CharacterClasses::GEN_DELIMS = T.let(T.unsafe(nil), String)
-
Addressable::URI::CharacterClasses::HOST = T.let(T.unsafe(nil), String)
-
Addressable::URI::CharacterClasses::PATH = T.let(T.unsafe(nil), String)
-
Addressable::URI::CharacterClasses::PCHAR = T.let(T.unsafe(nil), String)
-
Addressable::URI::CharacterClasses::QUERY = T.let(T.unsafe(nil), String)
-
Addressable::URI::CharacterClasses::RESERVED = T.let(T.unsafe(nil), String)
-
Addressable::URI::CharacterClasses::SCHEME = T.let(T.unsafe(nil), String)
-
Addressable::URI::CharacterClasses::SUB_DELIMS = T.let(T.unsafe(nil), String)
-
Addressable::URI::CharacterClasses::UNRESERVED = T.let(T.unsafe(nil), String)
-
Addressable::URI::EMPTY_STR = T.let(T.unsafe(nil), String)
-
-class Addressable::URI::InvalidURIError < ::StandardError
-end
-
+class Addressable::URI::InvalidURIError < ::StandardError; end
Addressable::URI::NORMPATH = T.let(T.unsafe(nil), Regexp)
-
+module Addressable::URI::NormalizeCharacterClasses; end
+Addressable::URI::NormalizeCharacterClasses::FRAGMENT = T.let(T.unsafe(nil), Regexp)
+Addressable::URI::NormalizeCharacterClasses::HOST = T.let(T.unsafe(nil), Regexp)
+Addressable::URI::NormalizeCharacterClasses::PCHAR = T.let(T.unsafe(nil), Regexp)
+Addressable::URI::NormalizeCharacterClasses::QUERY = T.let(T.unsafe(nil), Regexp)
+Addressable::URI::NormalizeCharacterClasses::SCHEME = T.let(T.unsafe(nil), Regexp)
+Addressable::URI::NormalizeCharacterClasses::UNRESERVED = T.let(T.unsafe(nil), Regexp)
Addressable::URI::PARENT = T.let(T.unsafe(nil), String)
-
Addressable::URI::PORT_MAPPING = T.let(T.unsafe(nil), Hash)
-
Addressable::URI::RULE_2A = T.let(T.unsafe(nil), Regexp)
-
Addressable::URI::RULE_2B_2C = T.let(T.unsafe(nil), Regexp)
-
Addressable::URI::RULE_2D = T.let(T.unsafe(nil), Regexp)
-
Addressable::URI::RULE_PREFIXED_PARENT = T.let(T.unsafe(nil), Regexp)
-
Addressable::URI::SELF_REF = T.let(T.unsafe(nil), String)
-
Addressable::URI::SEQUENCE_ENCODING_TABLE = T.let(T.unsafe(nil), Hash)
-
Addressable::URI::SEQUENCE_UPCASED_PERCENT_ENCODING_TABLE = T.let(T.unsafe(nil), Hash)
-
Addressable::URI::SLASH = T.let(T.unsafe(nil), String)
-
Addressable::URI::URIREGEX = T.let(T.unsafe(nil), Regexp)
-
-module Addressable::VERSION
-end
-
+module Addressable::VERSION; end
Addressable::VERSION::MAJOR = T.let(T.unsafe(nil), Integer)
-
Addressable::VERSION::MINOR = T.let(T.unsafe(nil), Integer)
-
Addressable::VERSION::STRING = T.let(T.unsafe(nil), String)
-
Addressable::VERSION::TINY = T.let(T.unsafe(nil), Integer) | true |
Other | Homebrew | brew | cb1ef7062c1a9181761dcaf7a24d00a00dfeb8ee.json | Update RBI files for addressable. | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -2740,8 +2740,6 @@ class Addressable::Template
def extract(uri, processor=T.unsafe(nil)); end
- def generate(params=T.unsafe(nil), recall=T.unsafe(nil), options=T.unsafe(nil)); end
-
def initialize(pattern); end
def keys(); end
@@ -12578,13 +12576,9 @@ Net::HTTPServerErrorCode = Net::HTTPServerError
Net::HTTPSession = Net::HTTP
-class Net::HTTPSuccess
-end
-
-Net::HTTPSuccessCode::EXCEPTION_TYPE = Net::HTTPError
+Net::HTTPSuccess::EXCEPTION_TYPE = Net::HTTPError
-class Net::HTTPSuccess
-end
+Net::HTTPSuccessCode = Net::HTTPSuccess
class Net::HTTPURITooLong
HAS_BODY = ::T.let(nil, ::T.untyped) | true |
Other | Homebrew | brew | 5ed4430daf8108462126cbcdf3088f2ec887a74e.json | Apply suggestions from code review
Co-authored-by: Rylan Polster <rslpolster@gmail.com> | Library/Homebrew/formula_cellar_checks.rb | @@ -307,10 +307,9 @@ def check_cpuid_instruction(formula)
end
keg = Keg.new(formula.prefix)
- has_cpuid_instruction = keg.binary_executable_or_library_files.any? do |file|
+ return if keg.binary_executable_or_library_files.any? do |file|
cpuid_instruction?(file, objdump)
end
- return if has_cpuid_instruction
"No `cpuid` instruction detected. #{formula} should not use `ENV.runtime_cpu_detection`."
end
@@ -355,8 +354,8 @@ def cpuid_instruction?(file, objdump = "objdump")
has_cpuid_instruction = false
Utils.popen_read(objdump, "--disassemble", file) do |io|
until io.eof?
- instruction = io.readline.split("\t")[@instruction_column_index[objdump]]&.chomp
- has_cpuid_instruction = instruction.match?(/^cpuid(\s+|$)/) if instruction
+ instruction = io.readline.split("\t")[@instruction_column_index[objdump]]&.strip
+ has_cpuid_instruction = instruction == "cpuid" if instruction.present?
break if has_cpuid_instruction
end
end | false |
Other | Homebrew | brew | 63aa1920883841fb0d6eb0c5513de63406d91879.json | Incorporate suggestions from feedback
1. Never install `binutils`. Instead, report an audit failure.
2. Tighten instruction check with a stricter matching strategy. | Library/Homebrew/formula_cellar_checks.rb | @@ -298,19 +298,17 @@ def check_cpuid_instruction(formula)
objdump ||= Formula["binutils"].opt_bin/"objdump" if Formula["binutils"].any_version_installed?
objdump ||= which("objdump")
objdump ||= which("objdump", ENV["HOMEBREW_PATH"])
- objdump ||= begin
- # If the system provides no `objdump`, install binutils instead of llvm since
- # binutils is smaller and has fewer dependencies.
- ohai "Installing `binutils` for `cpuid` instruction check..."
- safe_system HOMEBREW_BREW_FILE, "install", "binutils"
- Formula["binutils"].opt_bin/"objdump"
+
+ unless objdump
+ return <<~EOS
+ No `objdump` found, so cannot check for a `cpuid` instruction. Install `objdump` with
+ brew install binutils
+ EOS
end
keg = Keg.new(formula.prefix)
- has_cpuid_instruction = false
- keg.binary_executable_or_library_files.each do |file|
- has_cpuid_instruction = cpuid_instruction?(file, objdump)
- break if has_cpuid_instruction
+ has_cpuid_instruction = keg.binary_executable_or_library_files.any? do |file|
+ cpuid_instruction?(file, objdump)
end
return if has_cpuid_instruction
@@ -347,10 +345,18 @@ def relative_glob(dir, pattern)
end
def cpuid_instruction?(file, objdump = "objdump")
+ @instruction_column_index ||= {}
+ @instruction_column_index[objdump] ||= if Utils.popen_read(objdump, "--version").include? "LLVM"
+ 1 # `llvm-objdump` or macOS `objdump`
+ else
+ 2 # GNU binutils `objdump`
+ end
+
has_cpuid_instruction = false
Utils.popen_read(objdump, "--disassemble", file) do |io|
until io.eof?
- has_cpuid_instruction = io.readline.include? "cpuid"
+ instruction = io.readline.split("\t")[@instruction_column_index[objdump]]&.chomp
+ has_cpuid_instruction = instruction.match?(/^cpuid(\s+|$)/) if instruction
break if has_cpuid_instruction
end
end | false |
Other | Homebrew | brew | 22f986b89a95184126c0dca3de70fcbfc3af0f2f.json | Install formulae from JSON files | Library/Homebrew/cli/named_args.rb | @@ -49,12 +49,14 @@ def to_formulae
ignore_unavailable: T.nilable(T::Boolean),
method: T.nilable(Symbol),
uniq: T::Boolean,
+ load_from_json: T::Boolean,
).returns(T::Array[T.any(Formula, Keg, Cask::Cask)])
}
- def to_formulae_and_casks(only: parent&.only_formula_or_cask, ignore_unavailable: nil, method: nil, uniq: true)
+ def to_formulae_and_casks(only: parent&.only_formula_or_cask, ignore_unavailable: nil, method: nil, uniq: true,
+ load_from_json: false)
@to_formulae_and_casks ||= {}
@to_formulae_and_casks[only] ||= downcased_unique_named.flat_map do |name|
- load_formula_or_cask(name, only: only, method: method)
+ load_formula_or_cask(name, only: only, method: method, load_from_json: load_from_json)
rescue FormulaUnreadableError, FormulaClassUnavailableError,
TapFormulaUnreadableError, TapFormulaClassUnavailableError,
Cask::CaskUnreadableError
@@ -88,7 +90,7 @@ def to_formulae_and_casks_and_unavailable(only: parent&.only_formula_or_cask, me
end.uniq.freeze
end
- def load_formula_or_cask(name, only: nil, method: nil)
+ def load_formula_or_cask(name, only: nil, method: nil, load_from_json: false)
unreadable_error = nil
if only != :cask
@@ -121,6 +123,12 @@ def load_formula_or_cask(name, only: nil, method: nil)
# The formula was found, but there's a problem with its implementation
unreadable_error ||= e
rescue NoSuchKegError, FormulaUnavailableError => e
+ if load_from_json && ENV["HOMEBREW_JSON_CORE"].present? && !CoreTap.instance.installed? &&
+ Utils::BottleAPI.bottle_available?(name)
+ Utils::BottleAPI.download_bottles(name)
+ retry
+ end
+
raise e if only == :formula
end
end | true |
Other | Homebrew | brew | 22f986b89a95184126c0dca3de70fcbfc3af0f2f.json | Install formulae from JSON files | Library/Homebrew/cmd/install.rb | @@ -154,8 +154,10 @@ def install
EOS
end
+ allow_loading_from_json = ENV["HOMEBREW_JSON_CORE"].present? && !CoreTap.instance.installed?
+
begin
- formulae, casks = args.named.to_formulae_and_casks
+ formulae, casks = args.named.to_formulae_and_casks(load_from_json: allow_loading_from_json)
.partition { |formula_or_cask| formula_or_cask.is_a?(Formula) }
rescue FormulaOrCaskUnavailableError, Cask::CaskUnavailableError => e
retry if Tap.install_default_cask_tap_if_necessary(force: args.cask?) | true |
Other | Homebrew | brew | 22f986b89a95184126c0dca3de70fcbfc3af0f2f.json | Install formulae from JSON files | Library/Homebrew/cmd/outdated.rb | @@ -97,8 +97,10 @@ def print_outdated(formulae_or_casks, args:)
elsif f.head? && outdated_kegs.any? { |k| k.version.to_s == f.pkg_version.to_s }
# There is a newer HEAD but the version number has not changed.
"latest HEAD"
- else
+ elsif f.tap.present?
f.pkg_version.to_s
+ else
+ Utils::BottleAPI.latest_pkg_version(f.name).to_s
end
outdated_versions = outdated_kegs.group_by { |keg| Formulary.from_keg(keg).full_name } | true |
Other | Homebrew | brew | 22f986b89a95184126c0dca3de70fcbfc3af0f2f.json | Install formulae from JSON files | Library/Homebrew/cmd/reinstall.rb | @@ -84,6 +84,19 @@ def reinstall_args
def reinstall
args = reinstall_args.parse
+ if ENV["HOMEBREW_JSON_CORE"].present? && !CoreTap.instance.installed?
+ args.named.each do |name|
+ formula = Formulary.factory(name)
+ next unless formula.any_version_installed?
+ next if formula.tap.present? && !formula.tap.installed?
+ next unless Utils::BottleAPI.bottle_available?(name)
+
+ Utils::BottleAPI.download_bottles(name)
+ rescue FormulaUnavailableError
+ next
+ end
+ end
+
formulae, casks = args.named.to_formulae_and_casks(method: :resolve)
.partition { |o| o.is_a?(Formula) }
| true |
Other | Homebrew | brew | 22f986b89a95184126c0dca3de70fcbfc3af0f2f.json | Install formulae from JSON files | Library/Homebrew/cmd/upgrade.rb | @@ -159,6 +159,20 @@ def upgrade_outdated_formulae(formulae, args:)
puts pinned.map { |f| "#{f.full_specified_name} #{f.pkg_version}" } * ", "
end
+ if ENV["HOMEBREW_JSON_CORE"].present? && !CoreTap.instance.installed?
+ formulae_to_install.map! do |formula|
+ next formula if formula.tap.present? && formula.tap.installed?
+ next formula unless Utils::BottleAPI.bottle_available?(formula.name)
+
+ Utils::BottleAPI.download_bottles(formula.name)
+ Formulary.factory(formula.name)
+ rescue FormulaUnavailableError
+ formula
+ end
+ end
+
+ opoo formulae_to_install
+
if formulae_to_install.empty?
oh1 "No packages to upgrade"
else | true |
Other | Homebrew | brew | 22f986b89a95184126c0dca3de70fcbfc3af0f2f.json | Install formulae from JSON files | Library/Homebrew/formula.rb | @@ -1325,15 +1325,20 @@ def outdated_kegs(fetch_head: false)
Formula.cache[:outdated_kegs][cache_key] ||= begin
all_kegs = []
current_version = T.let(false, T::Boolean)
+ latest_version = if tap.present?
+ pkg_version
+ else
+ Utils::BottleAPI.latest_pkg_version name
+ end
installed_kegs.each do |keg|
all_kegs << keg
version = keg.version
next if version.head?
tab = Tab.for_keg(keg)
- next if version_scheme > tab.version_scheme && pkg_version != version
- next if version_scheme == tab.version_scheme && pkg_version > version
+ next if version_scheme > tab.version_scheme && latest_version != version
+ next if version_scheme == tab.version_scheme && latest_version > version
# don't consider this keg current if there's a newer formula available
next if follow_installed_alias? && new_formula_available? | true |
Other | Homebrew | brew | 22f986b89a95184126c0dca3de70fcbfc3af0f2f.json | Install formulae from JSON files | Library/Homebrew/utils.rb | @@ -4,6 +4,7 @@
require "time"
require "utils/analytics"
+require "utils/bottle_api"
require "utils/curl"
require "utils/fork"
require "utils/formatter" | true |
Other | Homebrew | brew | 22f986b89a95184126c0dca3de70fcbfc3af0f2f.json | Install formulae from JSON files | Library/Homebrew/utils/bottle_api.rb | @@ -0,0 +1,103 @@
+# typed: true
+# frozen_string_literal: true
+
+require "github_packages"
+
+module Utils
+ # Helper functions for using the Bottle JSON API.
+ #
+ # @api private
+ module BottleAPI
+ extend T::Sig
+
+ module_function
+
+ FORMULAE_BREW_SH_BOTTLE_API_DOMAIN = if OS.mac?
+ "https://formulae.brew.sh/api/bottle"
+ else
+ "https://formulae.brew.sh/api/bottle-linux"
+ end.freeze
+
+ FORMULAE_BREW_SH_VERSIONS_API_URL = if OS.mac?
+ "https://formulae.brew.sh/api/versions.json"
+ else
+ "https://formulae.brew.sh/api/versions-linux.json"
+ end.freeze
+
+ GITHUB_PACKAGES_SHA256_REGEX = %r{#{GitHubPackages::URL_REGEX}.*/blobs/sha256:(?<sha256>\h{64})$}.freeze
+
+ sig { params(name: String).returns(Hash) }
+ def fetch(name)
+ return @cache[name] if @cache.present? && @cache.key?(name)
+
+ api_url = "#{FORMULAE_BREW_SH_BOTTLE_API_DOMAIN}/#{name}.json"
+ output = Utils::Curl.curl_output("--fail", api_url)
+ raise ArgumentError, "No JSON file found at #{Tty.underline}#{api_url}#{Tty.reset}" unless output.success?
+
+ @cache ||= {}
+ @cache[name] = JSON.parse(output.stdout)
+ rescue JSON::ParserError
+ raise ArgumentError, "Invalid JSON file: #{Tty.underline}#{api_url}#{Tty.reset}"
+ end
+
+ sig { params(name: String).returns(PkgVersion) }
+ def latest_pkg_version(name)
+ @formula_versions ||= begin
+ output = Utils::Curl.curl_output("--fail", FORMULAE_BREW_SH_VERSIONS_API_URL)
+ JSON.parse(output.stdout)
+ end
+ PkgVersion.new(@formula_versions[name]["version"], @formula_versions[name]["revision"])
+ end
+
+ sig { params(name: String).returns(T::Boolean) }
+ def bottle_available?(name)
+ fetch name
+ true
+ rescue ArgumentError
+ false
+ end
+
+ sig { params(name: String).void }
+ def download_bottles(name)
+ hash = fetch(name)
+ bottle_tag = Utils::Bottles.tag.to_s
+
+ odie "No bottle availabe for current OS" unless hash["bottles"].key? bottle_tag
+
+ download_bottle(hash, bottle_tag)
+
+ hash["dependencies"].each do |dep_hash|
+ download_bottle(dep_hash, bottle_tag)
+ end
+ end
+
+ sig { params(url: String).returns(T.nilable(String)) }
+ def checksum_from_url(url)
+ match = url.match GITHUB_PACKAGES_SHA256_REGEX
+ return if match.blank?
+
+ match[:sha256]
+ end
+
+ sig { params(hash: Hash, tag: Symbol).void }
+ def download_bottle(hash, tag)
+ bottle = hash["bottles"][tag]
+ return if bottle.blank?
+
+ sha256 = bottle["sha256"] || checksum_from_url(bottle["url"])
+ bottle_filename = Bottle::Filename.new(hash["name"], hash["pkg_version"], tag, hash["rebuild"])
+
+ resource = Resource.new hash["name"]
+ resource.url bottle["url"]
+ resource.sha256 sha256
+ resource.version hash["pkg_version"]
+ resource.downloader.resolved_basename = bottle_filename
+
+ resource.fetch
+
+ # Map the name of this formula to the local bottle path to allow the
+ # formula to be loaded by passing just the name to `Formulary::factory`.
+ Formulary.map_formula_name_to_local_bottle_path hash["name"], resource.downloader.cached_location
+ end
+ end
+end | true |
Other | Homebrew | brew | 22f986b89a95184126c0dca3de70fcbfc3af0f2f.json | Install formulae from JSON files | Library/Homebrew/utils/bottle_api.rbi | @@ -0,0 +1,7 @@
+# typed: strict
+
+module Utils
+ module BottleAPI
+ include Kernel
+ end
+end | true |
Other | Homebrew | brew | 22f986b89a95184126c0dca3de70fcbfc3af0f2f.json | Install formulae from JSON files | manpages/brew.1 | @@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BREW" "1" "June 2021" "Homebrew" "brew"
+.TH "BREW" "1" "July 2021" "Homebrew" "brew"
.
.SH "NAME"
\fBbrew\fR \- The Missing Package Manager for macOS (or Linux) | true |
Other | Homebrew | brew | d50bd605b833d13339c6e5d6f76ed94ecb4f5078.json | components_order: allow ignore_missing_libraries in on_os | Library/Homebrew/rubocops/components_order.rb | @@ -110,7 +110,16 @@ def audit_formula(_node, _class_node, _parent_class_node, body_node)
end
def check_on_os_block_content(component_precedence_list, on_os_block)
- on_os_allowed_methods = %w[depends_on patch resource deprecate! disable! conflicts_with keg_only]
+ on_os_allowed_methods = %w[
+ depends_on
+ patch
+ resource
+ deprecate!
+ disable!
+ conflicts_with
+ keg_only
+ ignore_missing_libraries
+ ]
_, offensive_node = check_order(component_precedence_list, on_os_block.body)
component_problem(*offensive_node) if offensive_node
child_nodes = on_os_block.body.begin_type? ? on_os_block.body.child_nodes : [on_os_block.body] | false |
Other | Homebrew | brew | 507fba73c493dc8d05fcd836e1a8f58471fe04d5.json | update command line outputs | Library/Homebrew/cask/cmd/upgrade.rb | @@ -48,8 +48,8 @@ def run
*casks,
force: args.force?,
greedy: args.greedy?,
- greedy_latest: args.greedy_latest,
- greedy_auto_updates: args.greedy_auto_updates,
+ greedy_latest: args.greedy_latest?,
+ greedy_auto_updates: args.greedy_auto_updates?,
dry_run: args.dry_run?,
binaries: args.binaries?,
quarantine: args.quarantine?,
@@ -67,7 +67,7 @@ def run
force: T.nilable(T::Boolean),
greedy: T.nilable(T::Boolean),
greedy_latest: T.nilable(T::Boolean),
- greedy_auto_updates: T.nilabel(T::Boolean),
+ greedy_auto_updates: T.nilable(T::Boolean),
dry_run: T.nilable(T::Boolean),
skip_cask_deps: T.nilable(T::Boolean),
verbose: T.nilable(T::Boolean),
@@ -120,7 +120,9 @@ def self.upgrade_casks(
return false if outdated_casks.empty?
if casks.empty? && !greedy
- ohai "Casks with 'auto_updates' or 'version :latest' will not be upgraded; pass `--greedy` to upgrade them."
+ ohai "Casks with 'auto_updates true' or 'version :latest' will not be upgraded; pass `--greedy` to upgrade them." if !args.greedy_auto_updates? && !args.greedy_latest?
+ ohai "Casks with 'version :latest' will not be upgraded; pass `--greedy-latest` to upgrade them." if args.greedy_auto_updates? && !args.greedy_latest?
+ ohai "Casks with 'auto_updates true' will not be upgraded; pass `--greedy-auto-updates` to upgrade them." if !args.greedy_auto_updates? && args.greedy_latest?
end
verb = dry_run ? "Would upgrade" : "Upgrading" | true |
Other | Homebrew | brew | 507fba73c493dc8d05fcd836e1a8f58471fe04d5.json | update command line outputs | Library/Homebrew/cmd/outdated.rb | @@ -36,13 +36,13 @@ def outdated_args
"formula is outdated. Otherwise, the repository's HEAD will only be checked for "\
"updates when a new stable or development version has been released."
switch "--greedy",
- description: "Print outdated casks with `auto_updates` or `version :latest`."
+ description: "Print outdated casks with `auto_updates true` or `version :latest`."
switch "--greedy-latest",
description: "Print outdated casks including those with `version :latest`."
switch "--greedy-auto-updates",
- description: "Print outdated casks including those with `auto_updates`."
+ description: "Print outdated casks including those with `auto_updates true`."
conflicts "--quiet", "--verbose", "--json"
conflicts "--formula", "--cask"
@@ -147,7 +147,8 @@ def json_info(formulae_or_casks, args:)
else
c = formula_or_cask
- c.outdated_info(args.greedy?, verbose?, true)
+ c.outdated_info(args.greedy?, verbose?, true, greedy_latest: args.greedy_latest?,
+ greedy_auto_updates: args.greedy_auto_updates?)
end
end
end | true |
Other | Homebrew | brew | 366a901fc932ca87d6cdbf5f163a5817ab9e383f.json | Update RBI files for rubocop-rails. | Library/Homebrew/sorbet/rbi/gems/rubocop-rails@2.11.2.rbi | @@ -655,6 +655,7 @@ class RuboCop::Cop::Rails::FindBy < ::RuboCop::Cop::Base
def autocorrect(corrector, node); end
def ignore_where_first?; end
+ def offense_range(node); end
def where_method?(receiver); end
end
| false |
Other | Homebrew | brew | 0404da7ba7d22379b236c503d6a87746a848776c.json | superenv: handle formulae with runtime CPU detection
Some formulae are able to detect the features of the runtime CPU, and
execute code accordingly. This typically entails 1) the detection of
features of the build-time CPU in order to determine the targets that
the compiler can generate code for, and 2) generating code for the
targets that the compiler can support.
Our filtering of optimization flags can cause misdetection of compiler
features, leading to failed builds [1], and miscompilation even when the
build does not fail [2].
Let's try to fix this by allowing formulae to declare
`ENV.runtime_cpu_detection` which skips the filtering of `-march` and
related flags.
I've also skipped the filtering of the optimisation
level, since it seems to me that if upstream maintainers have gone to
the lengths of writing code that detects runtime hardware, they probably
also know better about appropriate `-O` flags to use.
This is a partial list of formulae that should make use of this feature:
1. apache-arrow
2. fftw
3. gromacs
4. open-mpi
5. openblas
Partially resolves Homebrew/homebrew-core#76537.
[1] open-mpi/ompi#8306 and linked issues/PRs
[2] Homebrew/homebrew-core#76537 | Library/Homebrew/extend/ENV/super.rb | @@ -91,10 +91,11 @@ def setup_build_environment(formula: nil, cc: nil, build_bottle: false, bottle_a
# g - Enable "-stdlib=libc++" for clang.
# h - Enable "-stdlib=libstdc++" for clang.
# K - Don't strip -arch <arch>, -m32, or -m64
+ # d - Don't strip -march=<target>. Use only in formulae that
+ # have runtime detection of CPU features.
# w - Pass -no_weak_imports to the linker
#
# These flags will also be present:
- # s - apply fix for sed's Unicode support
# a - apply fix for apr-1-config path
end
alias generic_setup_build_environment setup_build_environment
@@ -314,6 +315,11 @@ def permit_arch_flags
append_to_cccfg "K"
end
+ sig { void }
+ def runtime_cpu_detection
+ append_to_cccfg "d"
+ end
+
sig { void }
def cxx11
append_to_cccfg "x" | true |
Other | Homebrew | brew | 0404da7ba7d22379b236c503d6a87746a848776c.json | superenv: handle formulae with runtime CPU detection
Some formulae are able to detect the features of the runtime CPU, and
execute code accordingly. This typically entails 1) the detection of
features of the build-time CPU in order to determine the targets that
the compiler can generate code for, and 2) generating code for the
targets that the compiler can support.
Our filtering of optimization flags can cause misdetection of compiler
features, leading to failed builds [1], and miscompilation even when the
build does not fail [2].
Let's try to fix this by allowing formulae to declare
`ENV.runtime_cpu_detection` which skips the filtering of `-march` and
related flags.
I've also skipped the filtering of the optimisation
level, since it seems to me that if upstream maintainers have gone to
the lengths of writing code that detects runtime hardware, they probably
also know better about appropriate `-O` flags to use.
This is a partial list of formulae that should make use of this feature:
1. apache-arrow
2. fftw
3. gromacs
4. open-mpi
5. openblas
Partially resolves Homebrew/homebrew-core#76537.
[1] open-mpi/ompi#8306 and linked issues/PRs
[2] Homebrew/homebrew-core#76537 | Library/Homebrew/shims/super/cc | @@ -173,10 +173,12 @@ class Cmd
case arg
when /^-g\d?$/, /^-gstabs\d+/, "-gstabs+", /^-ggdb\d?/,
- /^-march=.+/, /^-mtune=.+/, /^-mcpu=.+/,
- /^-O[0-9zs]?$/, "-fast", "-no-cpp-precomp",
- "-pedantic", "-pedantic-errors", "-Wno-long-double",
+ /^-mtune=.+/, /^-mcpu=.+/, /^-O[0-9zs]?$/,
+ "-fast", "-no-cpp-precomp", "-pedantic",
+ "-pedantic-errors", "-Wno-long-double",
"-Wno-unused-but-set-variable"
+ when /^-march=.+/
+ args << arg if runtime_cpu_detection?
when "-fopenmp", "-lgomp", "-mno-fused-madd", "-fforce-addr", "-fno-defer-pop",
"-mno-dynamic-no-pic", "-fearly-inlining", /^-f(?:no-)?inline-functions-called-once/,
/^-finline-limit/, /^-f(?:no-)?check-new/, "-fno-delete-null-pointer-checks",
@@ -283,7 +285,7 @@ class Cmd
args << "-pipe"
args << "-w" unless configure?
args << "-#{ENV["HOMEBREW_OPTIMIZATION_LEVEL"]}"
- args.concat(optflags)
+ args.concat(optflags) unless runtime_cpu_detection?
args.concat(archflags)
args << "-std=#{@arg0}" if /c[89]9/.match?(@arg0)
args
@@ -385,6 +387,10 @@ class Cmd
config.include?("K")
end
+ def runtime_cpu_detection?
+ config.include?("d")
+ end
+
def no_weak_imports?
config.include?("w")
end | true |
Other | Homebrew | brew | f634c672de90006eec5ef751183bf497a4179695.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 | @@ -11437,83 +11437,6 @@ class Migrator
extend ::T::Private::Methods::SingletonMethodHooks
end
-class MiniPortile
- def activate(); end
-
- def apply_patch(patch_file); end
-
- def compile(); end
-
- def configure(); end
-
- def configure_options(); end
-
- def configure_options=(configure_options); end
-
- def configured?(); end
-
- def cook(); end
-
- def download(); end
-
- def downloaded?(); end
-
- def extract(); end
-
- def files(); end
-
- def files=(files); end
-
- def host(); end
-
- def host=(host); end
-
- def initialize(name, version); end
-
- def install(); end
-
- def installed?(); end
-
- def logger(); end
-
- def logger=(logger); end
-
- def name(); end
-
- def original_host(); end
-
- def patch(); end
-
- def patch_files(); end
-
- def patch_files=(patch_files); end
-
- def path(); end
-
- def target(); end
-
- def target=(target); end
-
- def version(); end
- KEYRING_NAME = ::T.let(nil, ::T.untyped)
- TAR_EXECUTABLES = ::T.let(nil, ::T.untyped)
- VERSION = ::T.let(nil, ::T.untyped)
-end
-
-class MiniPortile
- def self.mingw?(); end
-
- def self.mswin?(); end
-
- def self.windows?(); end
-end
-
-class MiniPortileCMake
-end
-
-class MiniPortileCMake
-end
-
MiniTest = Minitest
module Minitest
@@ -13048,58 +12971,6 @@ module OpenSSL
def self.fips_mode(); end
end
-class OpenURI::Buffer
- def <<(str); end
-
- def io(); end
-
- def size(); end
- StringMax = ::T.let(nil, ::T.untyped)
-end
-
-class OpenURI::Buffer
-end
-
-class OpenURI::HTTPError
- def initialize(message, io); end
-end
-
-class OpenURI::HTTPRedirect
- def initialize(message, io, uri); end
-end
-
-module OpenURI::Meta
- def content_type_parse(); end
-
- def meta_add_field(name, value); end
-
- def meta_add_field2(name, values); end
-
- def meta_setup_encoding(); end
- RE_LWS = ::T.let(nil, ::T.untyped)
- RE_PARAMETERS = ::T.let(nil, ::T.untyped)
- RE_QUOTED_STRING = ::T.let(nil, ::T.untyped)
- RE_TOKEN = ::T.let(nil, ::T.untyped)
-end
-
-module OpenURI::Meta
- def self.init(obj, src=T.unsafe(nil)); end
-end
-
-module OpenURI
- def self.check_options(options); end
-
- def self.open_http(buf, target, proxy, options); end
-
- def self.open_loop(uri, options); end
-
- def self.open_uri(name, *rest); end
-
- def self.redirectable?(uri1, uri2); end
-
- def self.scan_open_optional_arguments(*rest); end
-end
-
class Option
extend ::T::Private::Methods::MethodHooks
extend ::T::Private::Methods::SingletonMethodHooks
@@ -29869,10 +29740,6 @@ module Tty
def self.yellow(); end
end
-class URI::FTP
- def buffer_open(buf, proxy, options); end
-end
-
class URI::FTP
def self.new2(user, password, host, port, path, typecode=T.unsafe(nil), arg_check=T.unsafe(nil)); end
end
@@ -29881,10 +29748,6 @@ class URI::File
DEFAULT_PORT = ::T.let(nil, ::T.untyped)
end
-class URI::HTTP
- def buffer_open(buf, proxy, options); end
-end
-
class URI::LDAP
def attributes(); end
| false |
Other | Homebrew | brew | 128f63db53db07a59d7df19748fc95b34a86f83c.json | reinstall: add support for the --git option | Library/Homebrew/cmd/reinstall.rb | @@ -57,6 +57,9 @@ def reinstall_args
env: :display_install_times,
description: "Print install times for each formula at the end of the run.",
}],
+ [:switch, "-g", "--git", {
+ description: "Create a Git repository, useful for creating patches to the software.",
+ }],
].each do |options|
send(*options)
conflicts "--cask", options[-2]
@@ -108,6 +111,7 @@ def reinstall
debug: args.debug?,
quiet: args.quiet?,
verbose: args.verbose?,
+ git: args.git?,
)
Cleanup.install_formula_clean!(formula)
end | true |
Other | Homebrew | brew | 128f63db53db07a59d7df19748fc95b34a86f83c.json | reinstall: add support for the --git option | Library/Homebrew/reinstall.rb | @@ -19,7 +19,8 @@ def reinstall_formula(
force: false,
debug: false,
quiet: false,
- verbose: false
+ verbose: false,
+ git: false
)
if formula.opt_prefix.directory?
keg = Keg.new(formula.opt_prefix.resolved_path)
@@ -44,6 +45,7 @@ def reinstall_formula(
build_bottle: tab&.built_bottle?,
force_bottle: force_bottle,
build_from_source_formulae: build_from_source_formulae,
+ git: git,
interactive: interactive,
keep_tmp: keep_tmp,
force: force, | true |
Other | Homebrew | brew | 2342dcd90c6329269baba21fe0b33e76415066c4.json | Add comment to Gemfile about disallowed gems | Library/Homebrew/Gemfile | @@ -2,6 +2,9 @@
source "https://rubygems.org"
+# disallowed gems (should not be used)
+# * nokogiri - use rexml instead for XML parsing
+
# installed gems (should all be require: false)
gem "bootsnap", require: false
gem "byebug", require: false | false |
Other | Homebrew | brew | bb463376e8fce26283fd7299642cab7592b79e3c.json | Remove nokogiri from Gemfile | Library/Homebrew/Gemfile | @@ -6,7 +6,6 @@ source "https://rubygems.org"
gem "bootsnap", require: false
gem "byebug", require: false
gem "minitest", require: false
-gem "nokogiri", require: false
gem "parallel_tests", require: false
gem "ronn", require: false
gem "rspec", require: false | true |
Other | Homebrew | brew | bb463376e8fce26283fd7299642cab7592b79e3c.json | Remove nokogiri from Gemfile | Library/Homebrew/Gemfile.lock | @@ -187,7 +187,6 @@ DEPENDENCIES
did_you_mean
mechanize
minitest
- nokogiri
parallel_tests
patchelf
plist | true |
Other | Homebrew | brew | d490e2a9a794393d7c706f8273d3121cf1f402a6.json | Fix BuildPulse handling
- be more verbose with output to be clear when we're using/submitting to
BuildPulse
- remove the duplicate BuildPulse submission step | .github/workflows/tests.yml | @@ -333,14 +333,3 @@ jobs:
- run: brew test-bot --only-formulae --test-default-formula
- uses: codecov/codecov-action@29386c70ef20e286228c72b668a06fd0e8399192
-
- - name: Upload test results to BuildPulse for flaky test detection
- # Only run this step for non-PR pushes or PRs where where we have access to secrets.
- # Run this step even when the tests fail. Skip if the workflow is cancelled.
- if: (github.event.pull_request == null || github.event.pull_request.head.repo.full_name == github.repository) && !cancelled()
- env:
- BUILDPULSE_ACCESS_KEY_ID: ${{ secrets.BUILDPULSE_ACCESS_KEY_ID }}
- BUILDPULSE_SECRET_ACCESS_KEY: ${{ secrets.BUILDPULSE_SECRET_ACCESS_KEY }}
- run: |
- brew install buildpulse-test-reporter
- buildpulse-test-reporter submit Library/Homebrew/test/junit --account-id 1503512 --repository-id 53238813 | true |
Other | Homebrew | brew | d490e2a9a794393d7c706f8273d3121cf1f402a6.json | Fix BuildPulse handling
- be more verbose with output to be clear when we're using/submitting to
BuildPulse
- remove the duplicate BuildPulse submission step | Library/Homebrew/dev-cmd/tests.rb | @@ -50,14 +50,18 @@ def run_buildpulse
unless Formula["buildpulse-test-reporter"].any_version_installed?
ohai "Installing `buildpulse-test-reporter` for reporting test flakiness..."
- safe_system HOMEBREW_BREW_FILE, "install", "buildpulse-test-reporter"
+ with_env(HOMEBREW_NO_AUTO_UPDATE: "1", HOMEBREW_NO_BOOTSNAP: "1") do
+ safe_system HOMEBREW_BREW_FILE, "install", "buildpulse-test-reporter"
+ end
end
ENV["BUILDPULSE_ACCESS_KEY_ID"] = ENV["HOMEBREW_BUILDPULSE_ACCESS_KEY_ID"]
ENV["BUILDPULSE_SECRET_ACCESS_KEY"] = ENV["HOMEBREW_BUILDPULSE_SECRET_ACCESS_KEY"]
+ ohai "Sending test results to BuildPulse"
+
safe_system Formula["buildpulse-test-reporter"].opt_bin/"buildpulse-test-reporter",
- "submit", "Library/Homebrew/test/junit",
+ "submit", "#{HOMEBREW_LIBRARY_PATH}/test/junit",
"--account-id", ENV["HOMEBREW_BUILDPULSE_ACCOUNT_ID"],
"--repository-id", ENV["HOMEBREW_BUILDPULSE_REPOSITORY_ID"]
end
@@ -182,7 +186,10 @@ def tests
# Submit test flakiness information using BuildPulse
# BUILDPULSE used in spec_helper.rb
- ENV["BUILDPULSE"] = "1" if use_buildpulse?
+ if use_buildpulse?
+ ENV["BUILDPULSE"] = "1"
+ ohai "Running tests with BuildPulse-friendly settings"
+ end
if parallel
system "bundle", "exec", "parallel_rspec", *parallel_args, "--", *bundle_args, "--", *files | true |
Other | Homebrew | brew | 4433f4a985e92526bd77705039a3dcbb6d128956.json | Sparkle: Update minimumSystemVersion condition | Library/Homebrew/livecheck/strategy/sparkle.rb | @@ -115,7 +115,7 @@ def self.item_from_content(content)
next if os && os != "osx"
- if OS.mac? && (minimum_system_version = (item > "minimumSystemVersion").first&.text&.strip)
+ if (minimum_system_version = item.elements["minimumSystemVersion"]&.text&.gsub(/\A\D+|\D+\z/, ""))
macos_minimum_system_version = begin
MacOS::Version.new(minimum_system_version).strip_patch
rescue MacOSVersionError | false |
Other | Homebrew | brew | 823dc28c2164c6db8842ebdf0fce51443c83baec.json | livecheck/strategy/sparkle: check minimumSystemVersion for compatibility | Library/Homebrew/livecheck/strategy/sparkle.rb | @@ -115,6 +115,16 @@ def self.item_from_content(content)
next if os && os != "osx"
+ if OS.mac? && (minimum_system_version = (item > "minimumSystemVersion").first&.text&.strip)
+ macos_minimum_system_version = begin
+ MacOS::Version.new(minimum_system_version).strip_patch
+ rescue MacOSVersionError
+ nil
+ end
+
+ next if MacOS.version < macos_minimum_system_version
+ end
+
data = {
title: title,
pub_date: pub_date || Time.new(0), | false |
Other | Homebrew | brew | cede4a4bd358948b8214e054084c84b849085d9e.json | Update RBI files for activesupport. | Library/Homebrew/sorbet/rbi/gems/activesupport@6.1.4.rbi | @@ -5,11 +5,15 @@
# typed: false
module ActiveSupport
- extend(::ActiveSupport::LazyLoadHooks)
+ extend ::ActiveSupport::LazyLoadHooks
+end
+
+module ActiveSupport::BigDecimalWithDefaultFormat
+ def to_s(format = T.unsafe(nil)); end
end
module ActiveSupport::Inflector
- extend(::ActiveSupport::Inflector)
+ extend ::ActiveSupport::Inflector
def camelize(term, uppercase_first_letter = T.unsafe(nil)); end
def classify(table_name); end
@@ -81,6 +85,55 @@ class ActiveSupport::Inflector::Inflections::Uncountables < ::Array
def to_regex(string); end
end
+module ActiveSupport::JSON
+ class << self
+ def decode(json); end
+ def encode(value, options = T.unsafe(nil)); end
+ def parse_error; end
+
+ private
+
+ def convert_dates_from(data); end
+ end
+end
+
+ActiveSupport::JSON::DATETIME_REGEX = T.let(T.unsafe(nil), Regexp)
+ActiveSupport::JSON::DATE_REGEX = T.let(T.unsafe(nil), Regexp)
+
+module ActiveSupport::JSON::Encoding
+ class << self
+ def escape_html_entities_in_json; end
+ def escape_html_entities_in_json=(_arg0); end
+ def json_encoder; end
+ def json_encoder=(_arg0); end
+ def time_precision; end
+ def time_precision=(_arg0); end
+ def use_standard_json_time_format; end
+ def use_standard_json_time_format=(_arg0); end
+ end
+end
+
+class ActiveSupport::JSON::Encoding::JSONGemEncoder
+ def initialize(options = T.unsafe(nil)); end
+
+ def encode(value); end
+ def options; end
+
+ private
+
+ def jsonify(value); end
+ def stringify(jsonified); end
+end
+
+ActiveSupport::JSON::Encoding::JSONGemEncoder::ESCAPED_CHARS = T.let(T.unsafe(nil), Hash)
+ActiveSupport::JSON::Encoding::JSONGemEncoder::ESCAPE_REGEX_WITHOUT_HTML_ENTITIES = T.let(T.unsafe(nil), Regexp)
+ActiveSupport::JSON::Encoding::JSONGemEncoder::ESCAPE_REGEX_WITH_HTML_ENTITIES = T.let(T.unsafe(nil), Regexp)
+
+class ActiveSupport::JSON::Encoding::JSONGemEncoder::EscapedString < ::String
+ def to_json(*_arg0); end
+ def to_s; end
+end
+
module ActiveSupport::LazyLoadHooks
def on_load(name, options = T.unsafe(nil), &block); end
def run_load_hooks(name, base = T.unsafe(nil)); end
@@ -103,7 +156,7 @@ module ActiveSupport::Multibyte
end
class ActiveSupport::Multibyte::Chars
- include(::Comparable)
+ include ::Comparable
def initialize(string); end
@@ -136,7 +189,7 @@ class ActiveSupport::Multibyte::Chars
end
module ActiveSupport::Multibyte::Unicode
- extend(::ActiveSupport::Multibyte::Unicode)
+ extend ::ActiveSupport::Multibyte::Unicode
def compose(codepoints); end
def decompose(type, codepoints); end
@@ -151,53 +204,8 @@ end
ActiveSupport::Multibyte::Unicode::UNICODE_VERSION = T.let(T.unsafe(nil), String)
-module ActiveSupport::BigDecimalWithDefaultFormat
- def to_s(format = T.unsafe(nil)); end
-end
-
-module ActiveSupport::JSON
- class << self
- def decode(json); end
- def encode(value, options = T.unsafe(nil)); end
- def parse_error; end
-
- private
-
- def convert_dates_from(data); end
- end
-end
-
-ActiveSupport::JSON::DATETIME_REGEX = T.let(T.unsafe(nil), Regexp)
-
-ActiveSupport::JSON::DATE_REGEX = T.let(T.unsafe(nil), Regexp)
-
-module ActiveSupport::JSON::Encoding
- class << self
- def escape_html_entities_in_json; end
- def escape_html_entities_in_json=(_arg0); end
- def json_encoder; end
- def json_encoder=(_arg0); end
- def time_precision; end
- def time_precision=(_arg0); end
- def use_standard_json_time_format; end
- def use_standard_json_time_format=(_arg0); end
- end
-end
-
-class ActiveSupport::JSON::Encoding::JSONGemEncoder
- def initialize(options = T.unsafe(nil)); end
-
- def encode(value); end
- def options; end
-
- private
-
- def jsonify(value); end
- def stringify(jsonified); end
-end
-
class ActiveSupport::TimeZone
- include(::Comparable)
+ include ::Comparable
def initialize(name, utc_offset = T.unsafe(nil), tzinfo = T.unsafe(nil)); end
@@ -251,32 +259,33 @@ class ActiveSupport::TimeZone
end
ActiveSupport::TimeZone::MAPPING = T.let(T.unsafe(nil), Hash)
+ActiveSupport::TimeZone::UTC_OFFSET_WITHOUT_COLON = T.let(T.unsafe(nil), String)
+ActiveSupport::TimeZone::UTC_OFFSET_WITH_COLON = T.let(T.unsafe(nil), String)
module ActiveSupport::ToJsonWithActiveSupportEncoder
def to_json(options = T.unsafe(nil)); end
end
class Array
- include(::Enumerable)
- include(::JSON::Ext::Generator::GeneratorMethods::Array)
- include(::Plist::Emit)
+ include ::Enumerable
+ include ::JSON::Ext::Generator::GeneratorMethods::Array
+ include ::Plist::Emit
def as_json(options = T.unsafe(nil)); end
end
class BigDecimal < ::Numeric
- include(::ActiveSupport::BigDecimalWithDefaultFormat)
+ include ::ActiveSupport::BigDecimalWithDefaultFormat
def as_json(options = T.unsafe(nil)); end
end
BigDecimal::EXCEPTION_NaN = T.let(T.unsafe(nil), Integer)
-
BigDecimal::VERSION = T.let(T.unsafe(nil), String)
class Date
- include(::Comparable)
- include(::DateAndTime::Zones)
+ include ::Comparable
+ include ::DateAndTime::Zones
def as_json(options = T.unsafe(nil)); end
def inspect; end
@@ -288,9 +297,7 @@ class Date
end
Date::DATE_FORMATS = T.let(T.unsafe(nil), Hash)
-
-module DateAndTime
-end
+module DateAndTime; end
module DateAndTime::Zones
def in_time_zone(zone = T.unsafe(nil)); end
@@ -369,22 +376,22 @@ class Exception
end
class FalseClass
- include(::JSON::Ext::Generator::GeneratorMethods::FalseClass)
+ include ::JSON::Ext::Generator::GeneratorMethods::FalseClass
def as_json(options = T.unsafe(nil)); end
def blank?; end
end
class Float < ::Numeric
- include(::JSON::Ext::Generator::GeneratorMethods::Float)
+ include ::JSON::Ext::Generator::GeneratorMethods::Float
def as_json(options = T.unsafe(nil)); end
end
class Hash
- include(::Enumerable)
- include(::JSON::Ext::Generator::GeneratorMethods::Hash)
- include(::Plist::Emit)
+ include ::Enumerable
+ include ::JSON::Ext::Generator::GeneratorMethods::Hash
+ include ::Plist::Emit
def as_json(options = T.unsafe(nil)); end
def deep_merge(other_hash, &block); end
@@ -396,18 +403,33 @@ class Hash
end
class IO
- include(::Enumerable)
- include(::File::Constants)
+ include ::Enumerable
+ include ::File::Constants
def as_json(options = T.unsafe(nil)); end
end
-IO::EWOULDBLOCKWaitReadable = IO::EAGAINWaitReadable
+class IO::EAGAINWaitReadable < ::Errno::EAGAIN
+ include ::IO::WaitReadable
+end
+
+class IO::EAGAINWaitWritable < ::Errno::EAGAIN
+ include ::IO::WaitWritable
+end
+
+class IO::EINPROGRESSWaitReadable < ::Errno::EINPROGRESS
+ include ::IO::WaitReadable
+end
+
+class IO::EINPROGRESSWaitWritable < ::Errno::EINPROGRESS
+ include ::IO::WaitWritable
+end
+IO::EWOULDBLOCKWaitReadable = IO::EAGAINWaitReadable
IO::EWOULDBLOCKWaitWritable = IO::EAGAINWaitWritable
class IPAddr
- include(::Comparable)
+ include ::Comparable
def as_json(options = T.unsafe(nil)); end
end
@@ -428,33 +450,33 @@ class Module
end
Module::DELEGATION_RESERVED_KEYWORDS = T.let(T.unsafe(nil), Array)
-
Module::DELEGATION_RESERVED_METHOD_NAMES = T.let(T.unsafe(nil), Set)
+class Module::DelegationError < ::NoMethodError; end
+Module::RUBY_RESERVED_KEYWORDS = T.let(T.unsafe(nil), Array)
-class Module::DelegationError < ::NoMethodError
+class NameError < ::StandardError
+ include ::DidYouMean::Correctable
end
-Module::RUBY_RESERVED_KEYWORDS = T.let(T.unsafe(nil), Array)
-
class NilClass
- include(::JSON::Ext::Generator::GeneratorMethods::NilClass)
+ include ::JSON::Ext::Generator::GeneratorMethods::NilClass
def as_json(options = T.unsafe(nil)); end
def blank?; end
end
class Numeric
- include(::Comparable)
+ include ::Comparable
def as_json(options = T.unsafe(nil)); end
def blank?; end
end
class Object < ::BasicObject
- include(::ActiveSupport::ToJsonWithActiveSupportEncoder)
- include(::Kernel)
- include(::JSON::Ext::Generator::GeneratorMethods::Object)
- include(::PP::ObjectMixin)
+ include ::ActiveSupport::ToJsonWithActiveSupportEncoder
+ include ::Kernel
+ include ::JSON::Ext::Generator::GeneratorMethods::Object
+ include ::PP::ObjectMixin
def as_json(options = T.unsafe(nil)); end
def blank?; end
@@ -473,7 +495,7 @@ class Process::Status
end
class Range
- include(::Enumerable)
+ include ::Enumerable
def as_json(options = T.unsafe(nil)); end
end
@@ -517,11 +539,11 @@ class Regexp::Token < ::Struct
end
class String
- include(::Comparable)
- include(::JSON::Ext::Generator::GeneratorMethods::String)
- include(::Colorize::InstanceMethods)
- extend(::JSON::Ext::Generator::GeneratorMethods::String::Extend)
- extend(::Colorize::ClassMethods)
+ include ::Comparable
+ include ::JSON::Ext::Generator::GeneratorMethods::String
+ include ::Colorize::InstanceMethods
+ extend ::JSON::Ext::Generator::GeneratorMethods::String::Extend
+ extend ::Colorize::ClassMethods
def acts_like_string?; end
def as_json(options = T.unsafe(nil)); end
@@ -549,30 +571,29 @@ class String
def titlecase(keep_id_suffix: T.unsafe(nil)); end
def titleize(keep_id_suffix: T.unsafe(nil)); end
def to(position); end
+
+ sig { returns(String) }
def underscore; end
+
def upcase_first; end
end
String::BLANK_RE = T.let(T.unsafe(nil), Regexp)
-
String::ENCODED_BLANKS = T.let(T.unsafe(nil), Concurrent::Map)
class Struct
- include(::Enumerable)
+ include ::Enumerable
def as_json(options = T.unsafe(nil)); end
end
Struct::Group = Etc::Group
-
Struct::HTMLElementDescription = Struct
-
Struct::Passwd = Etc::Passwd
-
Struct::Tms = Process::Tms
class Symbol
- include(::Comparable)
+ include ::Comparable
def as_json(options = T.unsafe(nil)); end
def end_with?(*suffixes); end
@@ -582,7 +603,7 @@ class Symbol
end
class Time
- include(::Comparable)
+ include ::Comparable
def as_json(options = T.unsafe(nil)); end
def blank?; end
@@ -594,15 +615,44 @@ end
Time::DATE_FORMATS = T.let(T.unsafe(nil), Hash)
class TrueClass
- include(::JSON::Ext::Generator::GeneratorMethods::TrueClass)
+ include ::JSON::Ext::Generator::GeneratorMethods::TrueClass
def as_json(options = T.unsafe(nil)); end
def blank?; end
end
+module URI
+ include ::URI::RFC2396_REGEXP
+ extend ::URI::Escape
+end
+
+class URI::File < ::URI::Generic
+ def check_password(user); end
+ def check_user(user); end
+ def check_userinfo(user); end
+ def set_host(v); end
+ def set_password(v); end
+ def set_port(v); end
+ def set_user(v); end
+ def set_userinfo(v); end
+
+ class << self
+ def build(args); end
+ end
+end
+
+URI::File::COMPONENT = T.let(T.unsafe(nil), Array)
+
class URI::Generic
- include(::URI::RFC2396_REGEXP)
- include(::URI)
+ include ::URI::RFC2396_REGEXP
+ include ::URI
def as_json(options = T.unsafe(nil)); end
end
+
+URI::Parser = URI::RFC2396_Parser
+URI::REGEXP = URI::RFC2396_REGEXP
+
+class URI::RFC2396_Parser
+ include ::URI::RFC2396_REGEXP
+end | true |
Other | Homebrew | brew | cede4a4bd358948b8214e054084c84b849085d9e.json | Update RBI files for activesupport. | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -127,7 +127,7 @@ class ActiveSupport::Cache::FileStore
include ::ActiveSupport::Cache::Strategy::LocalCache
def cache_path(); end
- def initialize(cache_path, options=T.unsafe(nil)); end
+ def initialize(cache_path, **options); end
DIR_FORMATTER = ::T.let(nil, ::T.untyped)
FILENAME_MAX_SIZE = ::T.let(nil, ::T.untyped)
FILEPATH_MAX_SIZE = ::T.let(nil, ::T.untyped)
@@ -482,6 +482,36 @@ module ActiveSupport::Concern
def self.extended(base); end
end
+module ActiveSupport::Concurrency
+end
+
+class ActiveSupport::Concurrency::ShareLock
+ include ::MonitorMixin
+ def exclusive(purpose: T.unsafe(nil), compatible: T.unsafe(nil), after_compatible: T.unsafe(nil), no_wait: T.unsafe(nil)); end
+
+ def initialize(); end
+
+ def raw_state(); end
+
+ def sharing(); end
+
+ def start_exclusive(purpose: T.unsafe(nil), compatible: T.unsafe(nil), no_wait: T.unsafe(nil)); end
+
+ def start_sharing(); end
+
+ def stop_exclusive(compatible: T.unsafe(nil)); end
+
+ def stop_sharing(); end
+
+ def yield_shares(purpose: T.unsafe(nil), compatible: T.unsafe(nil), block_share: T.unsafe(nil)); end
+end
+
+class ActiveSupport::Concurrency::ShareLock
+end
+
+module ActiveSupport::Concurrency
+end
+
module ActiveSupport::Configurable
def config(); end
end
@@ -532,6 +562,14 @@ class ActiveSupport::CurrentAttributes
def _reset_callbacks(); end
def _run_reset_callbacks(&block); end
+
+ def attributes(); end
+
+ def attributes=(attributes); end
+
+ def reset(); end
+
+ def set(set_attributes); end
end
class ActiveSupport::CurrentAttributes
@@ -553,9 +591,17 @@ class ActiveSupport::CurrentAttributes
def self.before_reset(&block); end
+ def self.clear_all(); end
+
def self.instance(); end
+ def self.reset(*args, &block); end
+
+ def self.reset_all(); end
+
def self.resets(&block); end
+
+ def self.set(*args, &block); end
end
module ActiveSupport::Dependencies
@@ -12489,7 +12535,6 @@ module NKF
end
class NameError
- include ::DidYouMean::Correctable
def missing_name(); end
def missing_name?(name); end
@@ -12610,9 +12655,13 @@ Net::HTTPServerErrorCode = Net::HTTPServerError
Net::HTTPSession = Net::HTTP
-Net::HTTPSuccess::EXCEPTION_TYPE = Net::HTTPError
+class Net::HTTPSuccess
+end
+
+Net::HTTPSuccessCode::EXCEPTION_TYPE = Net::HTTPError
-Net::HTTPSuccessCode = Net::HTTPSuccess
+class Net::HTTPSuccess
+end
class Net::HTTPURITooLong
HAS_BODY = ::T.let(nil, ::T.untyped)
@@ -12762,11 +12811,11 @@ module OS
end
class Object
- include ::Minitest::Expectations
+ include ::ActiveSupport::Dependencies::Loadable
include ::ActiveSupport::Tryable
+ include ::Minitest::Expectations
include ::Utils::Curl
include ::SystemCommand::Mixin
- include ::ActiveSupport::Dependencies::Loadable
include ::ActiveSupport::ForkTracker::CoreExtPrivate
include ::ActiveSupport::ForkTracker::CoreExt
def acts_like?(duck); end
@@ -19145,6 +19194,8 @@ module RSpec::Core::HashImitatable
def any?(*args, &block); end
+ def assert_valid_keys(*args, &block); end
+
def assoc(*args, &block); end
def chain(*args, &block); end
@@ -19179,6 +19230,18 @@ module RSpec::Core::HashImitatable
def deep_merge!(*args, &block); end
+ def deep_stringify_keys(*args, &block); end
+
+ def deep_stringify_keys!(*args, &block); end
+
+ def deep_symbolize_keys(*args, &block); end
+
+ def deep_symbolize_keys!(*args, &block); end
+
+ def deep_transform_keys(*args, &block); end
+
+ def deep_transform_keys!(*args, &block); end
+
def default(*args, &block); end
def default=(*args, &block); end
@@ -19361,8 +19424,16 @@ module RSpec::Core::HashImitatable
def store(*args, &block); end
+ def stringify_keys(*args, &block); end
+
+ def stringify_keys!(*args, &block); end
+
def sum(*args, &block); end
+ def symbolize_keys(*args, &block); end
+
+ def symbolize_keys!(*args, &block); end
+
def take(*args, &block); end
def take_while(*args, &block); end
@@ -19375,6 +19446,10 @@ module RSpec::Core::HashImitatable
def to_msgpack(*args, &block); end
+ def to_options(*args, &block); end
+
+ def to_options!(*args, &block); end
+
def to_plist(*args, &block); end
def to_proc(*args, &block); end
@@ -26922,8 +26997,16 @@ module RuboCop::AST::CollectionNode
def pluck(*args, &block); end
+ def to_default_s(*args, &block); end
+
+ def to_formatted_s(*args, &block); end
+
def to_msgpack(*args, &block); end
+ def to_sentence(*args, &block); end
+
+ def to_xml(*args, &block); end
+
def without(*args, &block); end
end
@@ -29704,7 +29787,7 @@ end
class Time
def self.===(other); end
- def self.at_with_coercion(*args, **kwargs); end
+ def self.at_with_coercion(*args); end
def self.at_without_coercion(*_); end
@@ -29786,10 +29869,6 @@ module Tty
def self.yellow(); end
end
-module URI
- include ::URI::RFC2396_REGEXP
-end
-
class URI::FTP
def buffer_open(buf, proxy, options); end
end
@@ -29799,20 +29878,9 @@ class URI::FTP
end
class URI::File
- def check_password(user); end
-
- def check_user(user); end
-
- def check_userinfo(user); end
-
- def set_userinfo(v); end
- COMPONENT = ::T.let(nil, ::T.untyped)
DEFAULT_PORT = ::T.let(nil, ::T.untyped)
end
-class URI::File
-end
-
class URI::HTTP
def buffer_open(buf, proxy, options); end
end
@@ -29855,10 +29923,6 @@ class URI::MailTo
def initialize(*arg); end
end
-URI::Parser = URI::RFC2396_Parser
-
-URI::REGEXP = URI::RFC2396_REGEXP
-
class URI::RFC2396_Parser
def initialize(opts=T.unsafe(nil)); end
end
@@ -29879,7 +29943,6 @@ module URI::Util
end
module URI
- extend ::URI::Escape
def self.get_encoding(label); end
end
| true |
Other | Homebrew | brew | a9059239f82d46ec8be996986f8908f5d9708457.json | Update RBI files for rubocop-rails. | Library/Homebrew/sorbet/rbi/gems/rubocop-rails@2.11.1.rbi | @@ -655,6 +655,7 @@ class RuboCop::Cop::Rails::FindBy < ::RuboCop::Cop::Base
def autocorrect(corrector, node); end
def ignore_where_first?; end
+ def where_method?(receiver); end
end
RuboCop::Cop::Rails::FindBy::MSG = T.let(T.unsafe(nil), String) | false |
Other | Homebrew | brew | 3d3b9874f93e30b75d2d1595cb207cd7f03169b9.json | language/python: create venvs with access to system site packages
A user may wish to use two use two brew-installed Python packages
together. For example, one might want to `import numpy` when using
`jupyterlab` or `ptpython`.
Currently, the only ways to do this I'm aware of is with some hacking of
`PYTHONPATH` or the creation of `.pth` files in a formula's prefix.
A better solution is to allow the virtualenvs that `brew` creates to
have access to system site-packages by default, so that `import numpy`
inside `ptpython` or `jupyterlab` just works.
Partially resolves Homebrew/homebrew-core#76950. | Library/Homebrew/language/python.rb | @@ -218,7 +218,7 @@ def initialize(formula, venv_root, python)
def create
return if (@venv_root/"bin/python").exist?
- @formula.system @python, "-m", "venv", @venv_root
+ @formula.system @python, "-m", "venv", "--system-site-packages", @venv_root
# Robustify symlinks to survive python patch upgrades
@venv_root.find do |f| | true |
Other | Homebrew | brew | 3d3b9874f93e30b75d2d1595cb207cd7f03169b9.json | language/python: create venvs with access to system site packages
A user may wish to use two use two brew-installed Python packages
together. For example, one might want to `import numpy` when using
`jupyterlab` or `ptpython`.
Currently, the only ways to do this I'm aware of is with some hacking of
`PYTHONPATH` or the creation of `.pth` files in a formula's prefix.
A better solution is to allow the virtualenvs that `brew` creates to
have access to system site-packages by default, so that `import numpy`
inside `ptpython` or `jupyterlab` just works.
Partially resolves Homebrew/homebrew-core#76950. | Library/Homebrew/test/language/python/virtualenv_spec.rb | @@ -15,7 +15,7 @@
describe "#create" do
it "creates a venv" do
- expect(formula).to receive(:system).with("python", "-m", "venv", dir)
+ expect(formula).to receive(:system).with("python", "-m", "venv", "--system-site-packages", dir)
virtualenv.create
end
end | true |
Other | Homebrew | brew | 7835bcd10b5cdb8ba6235bd6827c70c74638867c.json | UnversionedCaskChecker: Replace Nokogiri with REXML | Library/Homebrew/unversioned_cask_checker.rb | @@ -176,13 +176,13 @@ def guess_cask_version
distribution_path = extract_dir/"Distribution"
if distribution_path.exist?
- Homebrew.install_bundler_gems!
- require "nokogiri"
+ require "rexml/document"
- xml = Nokogiri::XML(distribution_path.read)
+ xml = REXML::Document.new(distribution_path.read)
- product_version = xml.xpath("//installer-gui-script//product").first&.attr("version")
- return product_version if product_version
+ product = xml.get_elements("//installer-gui-script//product").first
+ product_version = product["version"] if product
+ return product_version if product_version.present?
end
opoo "#{pkg_path.basename} contains multiple packages: #{packages}" if packages.count != 1 | false |
Other | Homebrew | brew | 282c71d275a5bc11f4bb1f284f82a83742629d26.json | BundleVersion: Replace Nokogiri with REXML | Library/Homebrew/bundle_version.rb | @@ -30,15 +30,15 @@ def self.from_info_plist_content(plist)
sig { params(package_info_path: Pathname).returns(T.nilable(T.attached_class)) }
def self.from_package_info(package_info_path)
- Homebrew.install_bundler_gems!
- require "nokogiri"
+ require "rexml/document"
- xml = Nokogiri::XML(package_info_path.read)
+ xml = REXML::Document.new(package_info_path.read)
- bundle_id = xml.xpath("//pkg-info//bundle-version//bundle").first&.attr("id")
- return unless bundle_id
+ bundle_version_bundle = xml.get_elements("//pkg-info//bundle-version//bundle").first
+ bundle_id = bundle_version_bundle["id"] if bundle_version_bundle
+ return if bundle_id.blank?
- bundle = xml.xpath("//pkg-info//bundle").find { |b| b["id"] == bundle_id }
+ bundle = xml.get_elements("//pkg-info//bundle").find { |b| b["id"] == bundle_id }
return unless bundle
short_version = bundle["CFBundleShortVersionString"] | false |
Other | Homebrew | brew | da347ca1aa03c11087f2963d7cc1f160f68812d4.json | Fix duplicate formulae in search results | Library/Homebrew/search.rb | @@ -87,7 +87,7 @@ def search_formulae(string_or_regex)
.search(string_or_regex)
.sort
- results += Formula.fuzzy_search(string_or_regex)
+ results |= Formula.fuzzy_search(string_or_regex)
results.map do |name|
formula, canonical_full_name = begin | false |
Other | Homebrew | brew | 2c4a7ae2cb0cf19cf1542ad7f7a985eb964e5d38.json | Sparkle: Replace Nokogiri with REXML | Library/Homebrew/livecheck/strategy/sparkle.rb | @@ -2,7 +2,6 @@
# frozen_string_literal: true
require "bundle_version"
-require_relative "page_match"
module Homebrew
module Livecheck
@@ -57,25 +56,50 @@ def self.match?(url)
sig { params(content: String).returns(T.nilable(Item)) }
def self.item_from_content(content)
- Homebrew.install_bundler_gems!
- require "nokogiri"
+ require "rexml/document"
+
+ parsing_tries = 0
+ xml = begin
+ REXML::Document.new(content)
+ rescue REXML::UndefinedNamespaceException => e
+ undefined_prefix = e.to_s[/Undefined prefix ([^ ]+) found/i, 1]
+ raise if undefined_prefix.blank?
+
+ # Only retry parsing once after removing prefix from content
+ parsing_tries += 1
+ raise if parsing_tries > 1
+
+ # When an XML document contains a prefix without a corresponding
+ # namespace, it's necessary to remove the the prefix from the
+ # content to be able to successfully parse it using REXML
+ content = content.gsub(%r{(</?| )#{Regexp.escape(undefined_prefix)}:}, '\1')
+ retry
+ end
- xml = Nokogiri::XML(content)
- xml.remove_namespaces!
+ # Remove prefixes, so we can reliably identify elements and attributes
+ xml.root&.each_recursive do |node|
+ node.prefix = ""
+ node.attributes.each_attribute do |attribute|
+ attribute.prefix = ""
+ end
+ end
- items = xml.xpath("//rss//channel//item").map do |item|
- enclosure = (item > "enclosure").first
+ items = xml.get_elements("//rss//channel//item").map do |item|
+ enclosure = item.elements["enclosure"]
- url = enclosure&.attr("url")
- short_version = enclosure&.attr("shortVersionString")
- version = enclosure&.attr("version")
+ if enclosure
+ url = enclosure["url"]
+ short_version = enclosure["shortVersionString"]
+ version = enclosure["version"]
+ os = enclosure["os"]
+ end
- url ||= (item > "link").first&.text
- short_version ||= (item > "shortVersionString").first&.text&.strip
- version ||= (item > "version").first&.text&.strip
+ url ||= item.elements["link"]&.text
+ short_version ||= item.elements["shortVersionString"]&.text&.strip
+ version ||= item.elements["version"]&.text&.strip
- title = (item > "title").first&.text&.strip
- pub_date = (item > "pubDate").first&.text&.strip&.presence&.yield_self do |date_string|
+ title = item.elements["title"]&.text&.strip
+ pub_date = item.elements["pubDate"]&.text&.strip&.presence&.yield_self do |date_string|
Time.parse(date_string)
rescue ArgumentError
# Omit unparseable strings (e.g. non-English dates)
@@ -89,7 +113,7 @@ def self.item_from_content(content)
bundle_version = BundleVersion.new(short_version, version) if short_version || version
- next if (os = enclosure&.attr("os")) && os != "osx"
+ next if os && os != "osx"
data = {
title: title, | false |
Other | Homebrew | brew | d304c84f2aa264ca60eaeb3d7848f88198ff1c8c.json | test/utils/github_spec: fix artifact number | Library/Homebrew/test/utils/github_spec.rb | @@ -86,7 +86,7 @@
url = described_class.get_artifact_url(
described_class.get_workflow_run("Homebrew", "homebrew-core", 79751, artifact_name: "bottles"),
)
- expect(url).to eq("https://api.github.com/repos/Homebrew/homebrew-core/actions/artifacts/69422207/zip")
+ expect(url).to eq("https://api.github.com/repos/Homebrew/homebrew-core/actions/artifacts/70494047/zip")
end
end
| false |
Other | Homebrew | brew | f0cdf61e7846cadd74e9b3c44cfb79556591c145.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/gems/rspec_junit_formatter@0.4.1.rbi | @@ -0,0 +1,8 @@
+# DO NOT EDIT MANUALLY
+# This is an autogenerated file for types exported from the `rspec_junit_formatter` gem.
+# Please instead update this file by running `bin/tapioca sync`.
+
+# typed: true
+
+# THIS IS AN EMPTY RBI FILE.
+# see https://github.com/Shopify/tapioca/blob/master/README.md#manual-gem-requires | true |
Other | Homebrew | brew | f0cdf61e7846cadd74e9b3c44cfb79556591c145.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 | @@ -6695,6 +6695,143 @@ class DevelopmentTools
extend ::T::Private::Methods::SingletonMethodHooks
end
+class DidYouMean::ClassNameChecker
+ def class_name(); end
+
+ def class_names(); end
+
+ def corrections(); end
+
+ def initialize(exception); end
+
+ def scopes(); end
+end
+
+module DidYouMean::Correctable
+ def corrections(); end
+
+ def original_message(); end
+
+ def spell_checker(); end
+
+ def to_s(); end
+end
+
+module DidYouMean::Jaro
+ def self.distance(str1, str2); end
+end
+
+module DidYouMean::JaroWinkler
+ def self.distance(str1, str2); end
+end
+
+class DidYouMean::KeyErrorChecker
+ def corrections(); end
+
+ def initialize(key_error); end
+end
+
+class DidYouMean::KeyErrorChecker
+end
+
+module DidYouMean::Levenshtein
+ def self.distance(str1, str2); end
+
+ def self.min3(a, b, c); end
+end
+
+class DidYouMean::MethodNameChecker
+ def corrections(); end
+
+ def initialize(exception); end
+
+ def method_name(); end
+
+ def method_names(); end
+
+ def names_to_exclude(); end
+
+ def receiver(); end
+ RB_RESERVED_WORDS = ::T.let(nil, ::T.untyped)
+end
+
+class DidYouMean::NullChecker
+ def corrections(); end
+
+ def initialize(*_); end
+end
+
+class DidYouMean::PlainFormatter
+ def message_for(corrections); end
+end
+
+class DidYouMean::PlainFormatter
+end
+
+class DidYouMean::RequirePathChecker
+ def corrections(); end
+
+ def initialize(exception); end
+
+ def path(); end
+end
+
+class DidYouMean::RequirePathChecker
+ def self.requireables(); end
+end
+
+class DidYouMean::TreeSpellChecker
+ def augment(); end
+
+ def correct(input); end
+
+ def dictionary(); end
+
+ def dictionary_without_leaves(); end
+
+ def dimensions(); end
+
+ def find_leaves(path); end
+
+ def initialize(dictionary:, separator: T.unsafe(nil), augment: T.unsafe(nil)); end
+
+ def plausible_dimensions(input); end
+
+ def possible_paths(states); end
+
+ def separator(); end
+
+ def tree_depth(); end
+end
+
+class DidYouMean::TreeSpellChecker
+end
+
+class DidYouMean::VariableNameChecker
+ def corrections(); end
+
+ def cvar_names(); end
+
+ def initialize(exception); end
+
+ def ivar_names(); end
+
+ def lvar_names(); end
+
+ def method_names(); end
+
+ def name(); end
+ RB_RESERVED_WORDS = ::T.let(nil, ::T.untyped)
+end
+
+module DidYouMean
+ def self.correct_error(error_class, spell_checker); end
+
+ def self.formatter(); end
+
+ def self.formatter=(formatter); end
+end
+
class Dir
def children(); end
@@ -9739,6 +9876,10 @@ module Kernel
def self.require(path); end
end
+class KeyError
+ include ::DidYouMean::Correctable
+end
+
module Language::Node
extend ::T::Private::Methods::MethodHooks
extend ::T::Private::Methods::SingletonMethodHooks
@@ -12348,6 +12489,7 @@ module NKF
end
class NameError
+ include ::DidYouMean::Correctable
def missing_name(); end
def missing_name?(name); end
@@ -12389,6 +12531,8 @@ end
class Net::HTTPAlreadyReported
end
+Net::HTTPClientError::EXCEPTION_TYPE = Net::HTTPServerException
+
Net::HTTPClientErrorCode = Net::HTTPClientError
class Net::HTTPEarlyHints
@@ -12400,13 +12544,9 @@ end
Net::HTTPFatalErrorCode = Net::HTTPClientError
-class Net::HTTPInformation
-end
-
-Net::HTTPInformationCode::EXCEPTION_TYPE = Net::HTTPError
+Net::HTTPInformation::EXCEPTION_TYPE = Net::HTTPError
-class Net::HTTPInformation
-end
+Net::HTTPInformationCode = Net::HTTPInformation
class Net::HTTPLoopDetected
HAS_BODY = ::T.let(nil, ::T.untyped)
@@ -12454,6 +12594,8 @@ end
class Net::HTTPRangeNotSatisfiable
end
+Net::HTTPRedirection::EXCEPTION_TYPE = Net::HTTPRetriableError
+
Net::HTTPRedirectionCode = Net::HTTPRedirection
Net::HTTPRequestURITooLarge = Net::HTTPURITooLong
@@ -12462,17 +12604,15 @@ Net::HTTPResponceReceiver = Net::HTTPResponse
Net::HTTPRetriableCode = Net::HTTPRedirection
+Net::HTTPServerError::EXCEPTION_TYPE = Net::HTTPFatalError
+
Net::HTTPServerErrorCode = Net::HTTPServerError
Net::HTTPSession = Net::HTTP
-class Net::HTTPSuccess
-end
-
-Net::HTTPSuccessCode::EXCEPTION_TYPE = Net::HTTPError
+Net::HTTPSuccess::EXCEPTION_TYPE = Net::HTTPError
-class Net::HTTPSuccess
-end
+Net::HTTPSuccessCode = Net::HTTPSuccess
class Net::HTTPURITooLong
HAS_BODY = ::T.let(nil, ::T.untyped)
@@ -24607,6 +24747,21 @@ module RSpec
def self.xdescribe(*args, &example_group_block); end
end
+class RSpecJUnitFormatter
+ def dump_summary(notification); end
+
+ def stop(notification); end
+ DISCOURAGED_REGEXP = ::T.let(nil, ::T.untyped)
+ DISCOURAGED_REPLACEMENTS = ::T.let(nil, ::T.untyped)
+ ILLEGAL_REGEXP = ::T.let(nil, ::T.untyped)
+ ILLEGAL_REPLACEMENT = ::T.let(nil, ::T.untyped)
+ STRIP_DIFF_COLORS_BLOCK_REGEXP = ::T.let(nil, ::T.untyped)
+ STRIP_DIFF_COLORS_CODES_REGEXP = ::T.let(nil, ::T.untyped)
+end
+
+class RSpecJUnitFormatter
+end
+
module Racc
Racc_No_Extensions = ::T.let(nil, ::T.untyped)
end
@@ -26742,6 +26897,8 @@ module Ronn
def self.version(); end
end
+RspecJunitFormatter = RSpecJUnitFormatter
+
module RuboCop::AST::CollectionNode
def compact_blank(*args, &block); end
| true |
Other | Homebrew | brew | d55cbeac789d00c0ce319ee8cb8e67e3d71aac79.json | github_spec: Update PR number with unexpired artifacts | Library/Homebrew/test/utils/github_spec.rb | @@ -77,16 +77,16 @@
it "fails to find artifacts that don't exist" do
expect {
described_class.get_artifact_url(
- described_class.get_workflow_run("Homebrew", "homebrew-core", 51971, artifact_name: "false_bottles"),
+ described_class.get_workflow_run("Homebrew", "homebrew-core", 79751, artifact_name: "false_bottles"),
)
}.to raise_error(/No artifact .+ was found/)
end
it "gets an artifact link" do
url = described_class.get_artifact_url(
- described_class.get_workflow_run("Homebrew", "homebrew-core", 51971, artifact_name: "bottles"),
+ described_class.get_workflow_run("Homebrew", "homebrew-core", 79751, artifact_name: "bottles"),
)
- expect(url).to eq("https://api.github.com/repos/Homebrew/homebrew-core/actions/artifacts/3557392/zip")
+ expect(url).to eq("https://api.github.com/repos/Homebrew/homebrew-core/actions/artifacts/69422207/zip")
end
end
| false |
Other | Homebrew | brew | ee17ab0ee92cdee836d1d767800673b9c8d04501.json | Upload results to BuildPulse for non-PR pushes | .github/workflows/tests.yml | @@ -322,9 +322,9 @@ jobs:
- uses: codecov/codecov-action@29386c70ef20e286228c72b668a06fd0e8399192
- name: Upload test results to BuildPulse for flaky test detection
- # Only run this step for PRs where where we have access to secrets.
+ # Only run this step for non-PR pushes or PRs where where we have access to secrets.
# Run this step even when the tests fail. Skip if the workflow is cancelled.
- if: github.event.pull_request.head.repo.full_name == github.repository && !cancelled()
+ if: (github.event.pull_request == null || github.event.pull_request.head.repo.full_name == github.repository) && !cancelled()
env:
BUILDPULSE_ACCESS_KEY_ID: ${{ secrets.BUILDPULSE_ACCESS_KEY_ID }}
BUILDPULSE_SECRET_ACCESS_KEY: ${{ secrets.BUILDPULSE_SECRET_ACCESS_KEY }} | false |
Other | Homebrew | brew | 4c57b9d8f84746a362bb46be7b74b6113e319756.json | Gemfile: add did_you_mean gem | Library/Homebrew/Gemfile | @@ -30,6 +30,7 @@ end
# vendored gems
gem "activesupport"
gem "concurrent-ruby"
+gem "did_you_mean" # remove when HOMEBREW_REQUIRED_RUBY_VERSION >= 2.7
gem "mechanize"
gem "patchelf"
gem "plist" | true |
Other | Homebrew | brew | 4c57b9d8f84746a362bb46be7b74b6113e319756.json | Gemfile: add did_you_mean gem | Library/Homebrew/Gemfile.lock | @@ -20,6 +20,7 @@ GEM
highline (~> 2.0.0)
concurrent-ruby (1.1.9)
connection_pool (2.2.5)
+ did_you_mean (1.5.0)
diff-lcs (1.4.4)
docile (1.4.0)
domain_name (0.5.20190701)
@@ -181,6 +182,7 @@ DEPENDENCIES
bootsnap
byebug
concurrent-ruby
+ did_you_mean
mechanize
minitest
nokogiri | true |
Other | Homebrew | brew | d455ca937784aa4e1b282579064202cafb780c34.json | search: add fuzzy search results | Library/Homebrew/search.rb | @@ -87,6 +87,8 @@ def search_formulae(string_or_regex)
.search(string_or_regex)
.sort
+ results += Formula.fuzzy_search(string_or_regex)
+
results.map do |name|
formula, canonical_full_name = begin
f = Formulary.factory(name) | false |
Other | Homebrew | brew | 7aacda175465d105d1db07e2268782e72a9cbf99.json | formula: add fuzzy_search method | Library/Homebrew/brew.sh | @@ -583,14 +583,11 @@ then
# Don't allow non-developers to customise Ruby warnings.
unset HOMEBREW_RUBY_WARNINGS
-
- # Disable Ruby options we don't need.
- RUBY_DISABLE_OPTIONS="--disable=did_you_mean,rubyopt"
-else
- # Don't disable did_you_mean for developers as it's useful.
- RUBY_DISABLE_OPTIONS="--disable=rubyopt"
fi
+# Disable Ruby options we don't need.
+RUBY_DISABLE_OPTIONS="--disable=rubyopt"
+
if [[ -z "${HOMEBREW_RUBY_WARNINGS}" ]]
then
export HOMEBREW_RUBY_WARNINGS="-W1" | true |
Other | Homebrew | brew | 7aacda175465d105d1db07e2268782e72a9cbf99.json | formula: add fuzzy_search method | Library/Homebrew/formula.rb | @@ -2,6 +2,7 @@
# frozen_string_literal: true
require "cache_store"
+require "did_you_mean"
require "formula_support"
require "lock_file"
require "formula_pin"
@@ -1671,6 +1672,13 @@ def self.core_alias_reverse_table
CoreTap.instance.alias_reverse_table
end
+ # Returns a list of approximately matching formula names, but not the complete match
+ # @private
+ def self.fuzzy_search(name)
+ @spell_checker ||= DidYouMean::SpellChecker.new(dictionary: Set.new(names + full_names).to_a)
+ @spell_checker.correct(name)
+ end
+
def self.[](name)
Formulary.factory(name)
end | true |
Other | Homebrew | brew | 7aacda175465d105d1db07e2268782e72a9cbf99.json | formula: add fuzzy_search method | Library/Homebrew/tap.rb | @@ -127,6 +127,7 @@ def clear_cache
@style_exceptions = nil
@pypi_formula_mappings = nil
@config = nil
+ @spell_checker = nil
remove_instance_variable(:@private) if instance_variable_defined?(:@private)
end
| true |
Other | Homebrew | brew | 23f8cb9f4acc83949037ce8f6c95067e9cc49629.json | Sparkle: Handle ArgumentError from Time#parse | Library/Homebrew/livecheck/strategy/sparkle.rb | @@ -75,7 +75,12 @@ def self.item_from_content(content)
version ||= (item > "version").first&.text&.strip
title = (item > "title").first&.text&.strip
- pub_date = (item > "pubDate").first&.text&.strip&.presence&.yield_self { |d| Time.parse(d) }
+ pub_date = (item > "pubDate").first&.text&.strip&.presence&.yield_self do |date_string|
+ Time.parse(date_string)
+ rescue ArgumentError
+ # Omit unparseable strings (e.g. non-English dates)
+ nil
+ end
if (match = title&.match(/(\d+(?:\.\d+)*)\s*(\([^)]+\))?\Z/))
short_version ||= match[1] | false |
Other | Homebrew | brew | e7d3b2cb3116cdd5354c443b0534e50b26ce6113.json | Sparkle: Move default pub_date value | Library/Homebrew/livecheck/strategy/sparkle.rb | @@ -75,7 +75,7 @@ def self.item_from_content(content)
version ||= (item > "version").first&.text&.strip
title = (item > "title").first&.text&.strip
- pub_date = (item > "pubDate").first&.text&.strip&.yield_self { |d| Time.parse(d) } || Time.new(0)
+ pub_date = (item > "pubDate").first&.text&.strip&.yield_self { |d| Time.parse(d) }
if (match = title&.match(/(\d+(?:\.\d+)*)\s*(\([^)]+\))?\Z/))
short_version ||= match[1]
@@ -88,7 +88,7 @@ def self.item_from_content(content)
data = {
title: title,
- pub_date: pub_date,
+ pub_date: pub_date || Time.new(0),
url: url,
bundle_version: bundle_version,
}.compact | false |
Other | Homebrew | brew | 6720f8bd1e0237a44bbc0f53769a9d232fb19d62.json | repair pub-date in livecheck | Library/Homebrew/livecheck/strategy/sparkle.rb | @@ -75,7 +75,7 @@ def self.item_from_content(content)
version ||= (item > "version").first&.text&.strip
title = (item > "title").first&.text&.strip
- pub_date = (item > "pubDate").first&.text&.strip&.yield_self { |d| Time.parse(d) }
+ pub_date = (item > "pubDate").first&.text&.strip&.yield_self { |d| Time.parse(d) } || Time.new(0)
if (match = title&.match(/(\d+(?:\.\d+)*)\s*(\([^)]+\))?\Z/))
short_version ||= match[1] | false |
Other | Homebrew | brew | f9fe62f88368edb838cd14a5f2d2ef7c7e4600b7.json | Update RBI files for rubocop-rails. | Library/Homebrew/sorbet/rbi/gems/rubocop-rails@2.11.0.rbi | @@ -4,14 +4,11 @@
# typed: true
-module RuboCop
-end
-
-module RuboCop::Cop
-end
+module RuboCop; end
+module RuboCop::Cop; end
module RuboCop::Cop::ActiveRecordHelper
- extend(::RuboCop::AST::NodePattern::Macros)
+ extend ::RuboCop::AST::NodePattern::Macros
def active_record?(param0 = T.unsafe(nil)); end
def external_dependency_checksum; end
@@ -100,13 +97,11 @@ class RuboCop::Cop::IndexMethod::Captures < ::Struct
end
RuboCop::Cop::IndexMethod::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
-
-module RuboCop::Cop::Rails
-end
+module RuboCop::Cop::Rails; end
class RuboCop::Cop::Rails::ActionFilter < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::ConfigurableEnforcedStyle)
- extend(::RuboCop::Cop::AutoCorrector)
+ include ::RuboCop::Cop::ConfigurableEnforcedStyle
+ extend ::RuboCop::Cop::AutoCorrector
def on_block(node); end
def on_send(node); end
@@ -120,28 +115,23 @@ class RuboCop::Cop::Rails::ActionFilter < ::RuboCop::Cop::Base
end
RuboCop::Cop::Rails::ActionFilter::ACTION_METHODS = T.let(T.unsafe(nil), Array)
-
RuboCop::Cop::Rails::ActionFilter::FILTER_METHODS = T.let(T.unsafe(nil), Array)
-
RuboCop::Cop::Rails::ActionFilter::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::ActionFilter::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Rails::ActiveRecordAliases < ::RuboCop::Cop::Base
- extend(::RuboCop::Cop::AutoCorrector)
+ extend ::RuboCop::Cop::AutoCorrector
def on_csend(node); end
def on_send(node); end
end
RuboCop::Cop::Rails::ActiveRecordAliases::ALIASES = T.let(T.unsafe(nil), Hash)
-
RuboCop::Cop::Rails::ActiveRecordAliases::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::ActiveRecordAliases::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Rails::ActiveRecordCallbacksOrder < ::RuboCop::Cop::Base
- extend(::RuboCop::Cop::AutoCorrector)
+ extend ::RuboCop::Cop::AutoCorrector
def on_class(class_node); end
@@ -161,9 +151,7 @@ class RuboCop::Cop::Rails::ActiveRecordCallbacksOrder < ::RuboCop::Cop::Base
end
RuboCop::Cop::Rails::ActiveRecordCallbacksOrder::CALLBACKS_IN_ORDER = T.let(T.unsafe(nil), Array)
-
RuboCop::Cop::Rails::ActiveRecordCallbacksOrder::CALLBACKS_ORDER_MAP = T.let(T.unsafe(nil), Hash)
-
RuboCop::Cop::Rails::ActiveRecordCallbacksOrder::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Rails::ActiveRecordOverride < ::RuboCop::Cop::Base
@@ -178,13 +166,11 @@ class RuboCop::Cop::Rails::ActiveRecordOverride < ::RuboCop::Cop::Base
end
RuboCop::Cop::Rails::ActiveRecordOverride::ACTIVE_RECORD_CLASSES = T.let(T.unsafe(nil), Array)
-
RuboCop::Cop::Rails::ActiveRecordOverride::BAD_METHODS = T.let(T.unsafe(nil), Array)
-
RuboCop::Cop::Rails::ActiveRecordOverride::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Rails::ActiveSupportAliases < ::RuboCop::Cop::Base
- extend(::RuboCop::Cop::AutoCorrector)
+ extend ::RuboCop::Cop::AutoCorrector
def append(param0 = T.unsafe(nil)); end
def ends_with?(param0 = T.unsafe(nil)); end
@@ -194,11 +180,24 @@ class RuboCop::Cop::Rails::ActiveSupportAliases < ::RuboCop::Cop::Base
end
RuboCop::Cop::Rails::ActiveSupportAliases::ALIASES = T.let(T.unsafe(nil), Hash)
-
RuboCop::Cop::Rails::ActiveSupportAliases::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::ActiveSupportAliases::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
+class RuboCop::Cop::Rails::AddColumnIndex < ::RuboCop::Cop::Base
+ include ::RuboCop::Cop::RangeHelp
+ extend ::RuboCop::Cop::AutoCorrector
+
+ def add_column_with_index(param0 = T.unsafe(nil)); end
+ def on_send(node); end
+
+ private
+
+ def index_range(pair_node); end
+end
+
+RuboCop::Cop::Rails::AddColumnIndex::MSG = T.let(T.unsafe(nil), String)
+RuboCop::Cop::Rails::AddColumnIndex::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
+
class RuboCop::Cop::Rails::AfterCommitOverride < ::RuboCop::Cop::Base
def on_class(class_node); end
@@ -211,82 +210,72 @@ class RuboCop::Cop::Rails::AfterCommitOverride < ::RuboCop::Cop::Base
end
RuboCop::Cop::Rails::AfterCommitOverride::AFTER_COMMIT_CALLBACKS = T.let(T.unsafe(nil), Array)
-
RuboCop::Cop::Rails::AfterCommitOverride::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Rails::ApplicationController < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::EnforceSuperclass)
- extend(::RuboCop::Cop::AutoCorrector)
+ include ::RuboCop::Cop::EnforceSuperclass
+ extend ::RuboCop::Cop::AutoCorrector
def class_definition(param0 = T.unsafe(nil)); end
def class_new_definition(param0 = T.unsafe(nil)); end
end
RuboCop::Cop::Rails::ApplicationController::BASE_PATTERN = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::ApplicationController::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::ApplicationController::SUPERCLASS = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Rails::ApplicationJob < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::EnforceSuperclass)
- extend(::RuboCop::Cop::AutoCorrector)
- extend(::RuboCop::Cop::TargetRailsVersion)
+ include ::RuboCop::Cop::EnforceSuperclass
+ extend ::RuboCop::Cop::AutoCorrector
+ extend ::RuboCop::Cop::TargetRailsVersion
def autocorrect(node); end
def class_definition(param0 = T.unsafe(nil)); end
def class_new_definition(param0 = T.unsafe(nil)); end
end
RuboCop::Cop::Rails::ApplicationJob::BASE_PATTERN = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::ApplicationJob::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::ApplicationJob::SUPERCLASS = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Rails::ApplicationMailer < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::EnforceSuperclass)
- extend(::RuboCop::Cop::AutoCorrector)
- extend(::RuboCop::Cop::TargetRailsVersion)
+ include ::RuboCop::Cop::EnforceSuperclass
+ extend ::RuboCop::Cop::AutoCorrector
+ extend ::RuboCop::Cop::TargetRailsVersion
def class_definition(param0 = T.unsafe(nil)); end
def class_new_definition(param0 = T.unsafe(nil)); end
end
RuboCop::Cop::Rails::ApplicationMailer::BASE_PATTERN = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::ApplicationMailer::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::ApplicationMailer::SUPERCLASS = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Rails::ApplicationRecord < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::EnforceSuperclass)
- extend(::RuboCop::Cop::AutoCorrector)
- extend(::RuboCop::Cop::TargetRailsVersion)
+ include ::RuboCop::Cop::EnforceSuperclass
+ extend ::RuboCop::Cop::AutoCorrector
+ extend ::RuboCop::Cop::TargetRailsVersion
def class_definition(param0 = T.unsafe(nil)); end
def class_new_definition(param0 = T.unsafe(nil)); end
end
RuboCop::Cop::Rails::ApplicationRecord::BASE_PATTERN = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::ApplicationRecord::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::ApplicationRecord::SUPERCLASS = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Rails::ArelStar < ::RuboCop::Cop::Base
- extend(::RuboCop::Cop::AutoCorrector)
+ extend ::RuboCop::Cop::AutoCorrector
def on_send(node); end
def star_bracket?(param0 = T.unsafe(nil)); end
end
RuboCop::Cop::Rails::ArelStar::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::ArelStar::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Rails::AssertNot < ::RuboCop::Cop::Base
- extend(::RuboCop::Cop::AutoCorrector)
+ extend ::RuboCop::Cop::AutoCorrector
def offensive?(param0 = T.unsafe(nil)); end
def on_send(node); end
@@ -297,39 +286,34 @@ class RuboCop::Cop::Rails::AssertNot < ::RuboCop::Cop::Base
end
RuboCop::Cop::Rails::AssertNot::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::AssertNot::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Rails::AttributeDefaultBlockValue < ::RuboCop::Cop::Base
- extend(::RuboCop::Cop::AutoCorrector)
+ extend ::RuboCop::Cop::AutoCorrector
def attribute(param0 = T.unsafe(nil)); end
def default_attribute(param0 = T.unsafe(nil)); end
def on_send(node); end
end
RuboCop::Cop::Rails::AttributeDefaultBlockValue::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::AttributeDefaultBlockValue::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
-
RuboCop::Cop::Rails::AttributeDefaultBlockValue::TYPE_OFFENDERS = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Rails::BelongsTo < ::RuboCop::Cop::Base
- extend(::RuboCop::Cop::AutoCorrector)
- extend(::RuboCop::Cop::TargetRailsVersion)
+ extend ::RuboCop::Cop::AutoCorrector
+ extend ::RuboCop::Cop::TargetRailsVersion
def match_belongs_to_with_options(param0 = T.unsafe(nil)); end
def on_send(node); end
end
RuboCop::Cop::Rails::BelongsTo::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
-
RuboCop::Cop::Rails::BelongsTo::SUPERFLOUS_REQUIRE_FALSE_MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::BelongsTo::SUPERFLOUS_REQUIRE_TRUE_MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Rails::Blank < ::RuboCop::Cop::Base
- extend(::RuboCop::Cop::AutoCorrector)
+ extend ::RuboCop::Cop::AutoCorrector
def defining_blank?(param0 = T.unsafe(nil)); end
def nil_or_empty?(param0 = T.unsafe(nil)); end
@@ -347,11 +331,8 @@ class RuboCop::Cop::Rails::Blank < ::RuboCop::Cop::Base
end
RuboCop::Cop::Rails::Blank::MSG_NIL_OR_EMPTY = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::Blank::MSG_NOT_PRESENT = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::Blank::MSG_UNLESS_PRESENT = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::Blank::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Rails::BulkChangeTable < ::RuboCop::Cop::Base
@@ -381,31 +362,21 @@ class RuboCop::Cop::Rails::BulkChangeTable::AlterMethodsRecorder
end
RuboCop::Cop::Rails::BulkChangeTable::COMBINABLE_ALTER_METHODS = T.let(T.unsafe(nil), Array)
-
RuboCop::Cop::Rails::BulkChangeTable::COMBINABLE_TRANSFORMATIONS = T.let(T.unsafe(nil), Array)
-
RuboCop::Cop::Rails::BulkChangeTable::MIGRATION_METHODS = T.let(T.unsafe(nil), Array)
-
RuboCop::Cop::Rails::BulkChangeTable::MSG_FOR_ALTER_METHODS = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::BulkChangeTable::MSG_FOR_CHANGE_TABLE = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::BulkChangeTable::MYSQL = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::BulkChangeTable::MYSQL_COMBINABLE_ALTER_METHODS = T.let(T.unsafe(nil), Array)
-
RuboCop::Cop::Rails::BulkChangeTable::MYSQL_COMBINABLE_TRANSFORMATIONS = T.let(T.unsafe(nil), Array)
-
RuboCop::Cop::Rails::BulkChangeTable::POSTGRESQL = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::BulkChangeTable::POSTGRESQL_COMBINABLE_ALTER_METHODS = T.let(T.unsafe(nil), Array)
-
RuboCop::Cop::Rails::BulkChangeTable::POSTGRESQL_COMBINABLE_TRANSFORMATIONS = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Rails::ContentTag < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::RangeHelp)
- extend(::RuboCop::Cop::AutoCorrector)
- extend(::RuboCop::Cop::TargetRailsVersion)
+ include ::RuboCop::Cop::RangeHelp
+ extend ::RuboCop::Cop::AutoCorrector
+ extend ::RuboCop::Cop::TargetRailsVersion
def on_new_investigation; end
def on_send(node); end
@@ -420,7 +391,6 @@ class RuboCop::Cop::Rails::ContentTag < ::RuboCop::Cop::Base
end
RuboCop::Cop::Rails::ContentTag::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::ContentTag::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Rails::CreateTableWithTimestamps < ::RuboCop::Cop::Base
@@ -436,18 +406,18 @@ class RuboCop::Cop::Rails::CreateTableWithTimestamps < ::RuboCop::Cop::Base
end
RuboCop::Cop::Rails::CreateTableWithTimestamps::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::CreateTableWithTimestamps::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Rails::Date < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::ConfigurableEnforcedStyle)
+ include ::RuboCop::Cop::ConfigurableEnforcedStyle
def on_const(node); end
def on_csend(node); end
def on_send(node); end
private
+ def allow_to_time?; end
def bad_days; end
def bad_methods; end
def check_date_node(node); end
@@ -461,15 +431,10 @@ class RuboCop::Cop::Rails::Date < ::RuboCop::Cop::Base
end
RuboCop::Cop::Rails::Date::BAD_DAYS = T.let(T.unsafe(nil), Array)
-
RuboCop::Cop::Rails::Date::DEPRECATED_METHODS = T.let(T.unsafe(nil), Array)
-
RuboCop::Cop::Rails::Date::DEPRECATED_MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::Date::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::Date::MSG_SEND = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::Date::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Rails::DefaultScope < ::RuboCop::Cop::Base
@@ -482,11 +447,10 @@ class RuboCop::Cop::Rails::DefaultScope < ::RuboCop::Cop::Base
end
RuboCop::Cop::Rails::DefaultScope::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::DefaultScope::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Rails::Delegate < ::RuboCop::Cop::Base
- extend(::RuboCop::Cop::AutoCorrector)
+ extend ::RuboCop::Cop::AutoCorrector
def delegate?(param0 = T.unsafe(nil)); end
def on_def(node); end
@@ -507,19 +471,18 @@ end
RuboCop::Cop::Rails::Delegate::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Rails::DelegateAllowBlank < ::RuboCop::Cop::Base
- extend(::RuboCop::Cop::AutoCorrector)
+ extend ::RuboCop::Cop::AutoCorrector
def allow_blank_option(param0 = T.unsafe(nil)); end
def on_send(node); end
end
RuboCop::Cop::Rails::DelegateAllowBlank::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::DelegateAllowBlank::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Rails::DynamicFindBy < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::ActiveRecordHelper)
- extend(::RuboCop::Cop::AutoCorrector)
+ include ::RuboCop::Cop::ActiveRecordHelper
+ extend ::RuboCop::Cop::AutoCorrector
def on_csend(node); end
def on_send(node); end
@@ -537,12 +500,27 @@ class RuboCop::Cop::Rails::DynamicFindBy < ::RuboCop::Cop::Base
def whitelisted?(node); end
end
+RuboCop::Cop::Rails::DynamicFindBy::IGNORED_ARGUMENT_TYPES = T.let(T.unsafe(nil), Array)
RuboCop::Cop::Rails::DynamicFindBy::METHOD_PATTERN = T.let(T.unsafe(nil), Regexp)
-
RuboCop::Cop::Rails::DynamicFindBy::MSG = T.let(T.unsafe(nil), String)
+class RuboCop::Cop::Rails::EagerEvaluationLogMessage < ::RuboCop::Cop::Base
+ extend ::RuboCop::Cop::AutoCorrector
+
+ def interpolated_string_passed_to_debug(param0 = T.unsafe(nil)); end
+ def on_send(node); end
+
+ private
+
+ def replacement_range(node); end
+ def replacement_source(node, arguments); end
+end
+
+RuboCop::Cop::Rails::EagerEvaluationLogMessage::MSG = T.let(T.unsafe(nil), String)
+RuboCop::Cop::Rails::EagerEvaluationLogMessage::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
+
class RuboCop::Cop::Rails::EnumHash < ::RuboCop::Cop::Base
- extend(::RuboCop::Cop::AutoCorrector)
+ extend ::RuboCop::Cop::AutoCorrector
def array_pair?(param0 = T.unsafe(nil)); end
def enum?(param0 = T.unsafe(nil)); end
@@ -555,11 +533,10 @@ class RuboCop::Cop::Rails::EnumHash < ::RuboCop::Cop::Base
end
RuboCop::Cop::Rails::EnumHash::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::EnumHash::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Rails::EnumUniqueness < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::Duplication)
+ include ::RuboCop::Cop::Duplication
def enum?(param0 = T.unsafe(nil)); end
def enum_values(param0 = T.unsafe(nil)); end
@@ -571,11 +548,10 @@ class RuboCop::Cop::Rails::EnumUniqueness < ::RuboCop::Cop::Base
end
RuboCop::Cop::Rails::EnumUniqueness::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::EnumUniqueness::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Rails::EnvironmentComparison < ::RuboCop::Cop::Base
- extend(::RuboCop::Cop::AutoCorrector)
+ extend ::RuboCop::Cop::AutoCorrector
def comparing_str_env_with_rails_env_on_lhs?(param0 = T.unsafe(nil)); end
def comparing_str_env_with_rails_env_on_rhs?(param0 = T.unsafe(nil)); end
@@ -594,9 +570,7 @@ class RuboCop::Cop::Rails::EnvironmentComparison < ::RuboCop::Cop::Base
end
RuboCop::Cop::Rails::EnvironmentComparison::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::EnvironmentComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
-
RuboCop::Cop::Rails::EnvironmentComparison::SYM_MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Rails::EnvironmentVariableAccess < ::RuboCop::Cop::Base
@@ -611,11 +585,10 @@ class RuboCop::Cop::Rails::EnvironmentVariableAccess < ::RuboCop::Cop::Base
end
RuboCop::Cop::Rails::EnvironmentVariableAccess::READ_MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::EnvironmentVariableAccess::WRITE_MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Rails::Exit < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::ConfigurableEnforcedStyle)
+ include ::RuboCop::Cop::ConfigurableEnforcedStyle
def on_send(node); end
@@ -627,14 +600,29 @@ class RuboCop::Cop::Rails::Exit < ::RuboCop::Cop::Base
end
RuboCop::Cop::Rails::Exit::EXPLICIT_RECEIVERS = T.let(T.unsafe(nil), Array)
-
RuboCop::Cop::Rails::Exit::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::Exit::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
+class RuboCop::Cop::Rails::ExpandedDateRange < ::RuboCop::Cop::Base
+ extend ::RuboCop::Cop::AutoCorrector
+ extend ::RuboCop::Cop::TargetRailsVersion
+
+ def expanded_date_range(param0 = T.unsafe(nil)); end
+ def on_irange(node); end
+
+ private
+
+ def same_receiver?(begin_node, end_node); end
+ def use_mapped_methods?(beginning_method, end_method); end
+end
+
+RuboCop::Cop::Rails::ExpandedDateRange::MAPPED_DATE_RANGE_METHODS = T.let(T.unsafe(nil), Hash)
+RuboCop::Cop::Rails::ExpandedDateRange::MSG = T.let(T.unsafe(nil), String)
+RuboCop::Cop::Rails::ExpandedDateRange::PREFERRED_METHODS = T.let(T.unsafe(nil), Hash)
+
class RuboCop::Cop::Rails::FilePath < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::ConfigurableEnforcedStyle)
- include(::RuboCop::Cop::RangeHelp)
+ include ::RuboCop::Cop::ConfigurableEnforcedStyle
+ include ::RuboCop::Cop::RangeHelp
def file_join_nodes?(param0 = T.unsafe(nil)); end
def on_dstr(node); end
@@ -653,31 +641,28 @@ class RuboCop::Cop::Rails::FilePath < ::RuboCop::Cop::Base
end
RuboCop::Cop::Rails::FilePath::MSG_ARGUMENTS = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::FilePath::MSG_SLASHES = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::FilePath::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Rails::FindBy < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::RangeHelp)
- extend(::RuboCop::Cop::AutoCorrector)
+ include ::RuboCop::Cop::RangeHelp
+ extend ::RuboCop::Cop::AutoCorrector
def on_csend(node); end
def on_send(node); end
- def where_first?(param0 = T.unsafe(nil)); end
private
def autocorrect(corrector, node); end
+ def ignore_where_first?; end
end
RuboCop::Cop::Rails::FindBy::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::FindBy::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Rails::FindById < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::RangeHelp)
- extend(::RuboCop::Cop::AutoCorrector)
+ include ::RuboCop::Cop::RangeHelp
+ extend ::RuboCop::Cop::AutoCorrector
def find_by?(param0 = T.unsafe(nil)); end
def on_send(node); end
@@ -694,12 +679,11 @@ class RuboCop::Cop::Rails::FindById < ::RuboCop::Cop::Base
end
RuboCop::Cop::Rails::FindById::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::FindById::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Rails::FindEach < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::ActiveRecordHelper)
- extend(::RuboCop::Cop::AutoCorrector)
+ include ::RuboCop::Cop::ActiveRecordHelper
+ extend ::RuboCop::Cop::AutoCorrector
def on_send(node); end
@@ -709,17 +693,14 @@ class RuboCop::Cop::Rails::FindEach < ::RuboCop::Cop::Base
end
RuboCop::Cop::Rails::FindEach::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::FindEach::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
-
RuboCop::Cop::Rails::FindEach::SCOPE_METHODS = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Rails::HasAndBelongsToMany < ::RuboCop::Cop::Base
def on_send(node); end
end
RuboCop::Cop::Rails::HasAndBelongsToMany::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::HasAndBelongsToMany::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Rails::HasManyOrHasOneDependent < ::RuboCop::Cop::Base
@@ -743,7 +724,6 @@ class RuboCop::Cop::Rails::HasManyOrHasOneDependent < ::RuboCop::Cop::Base
end
RuboCop::Cop::Rails::HasManyOrHasOneDependent::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::HasManyOrHasOneDependent::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Rails::HelperInstanceVariable < ::RuboCop::Cop::Base
@@ -759,9 +739,9 @@ end
RuboCop::Cop::Rails::HelperInstanceVariable::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Rails::HttpPositionalArguments < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::RangeHelp)
- extend(::RuboCop::Cop::AutoCorrector)
- extend(::RuboCop::Cop::TargetRailsVersion)
+ include ::RuboCop::Cop::RangeHelp
+ extend ::RuboCop::Cop::AutoCorrector
+ extend ::RuboCop::Cop::TargetRailsVersion
def http_request?(param0 = T.unsafe(nil)); end
def kwsplat_hash?(param0 = T.unsafe(nil)); end
@@ -779,14 +759,12 @@ class RuboCop::Cop::Rails::HttpPositionalArguments < ::RuboCop::Cop::Base
end
RuboCop::Cop::Rails::HttpPositionalArguments::KEYWORD_ARGS = T.let(T.unsafe(nil), Array)
-
RuboCop::Cop::Rails::HttpPositionalArguments::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::HttpPositionalArguments::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Rails::HttpStatus < ::RuboCop::Cop::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
@@ -813,11 +791,8 @@ class RuboCop::Cop::Rails::HttpStatus::NumericStyleChecker
end
RuboCop::Cop::Rails::HttpStatus::NumericStyleChecker::DEFAULT_MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::HttpStatus::NumericStyleChecker::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::HttpStatus::NumericStyleChecker::PERMITTED_STATUS = T.let(T.unsafe(nil), Array)
-
RuboCop::Cop::Rails::HttpStatus::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Rails::HttpStatus::SymbolicStyleChecker
@@ -836,9 +811,16 @@ class RuboCop::Cop::Rails::HttpStatus::SymbolicStyleChecker
end
RuboCop::Cop::Rails::HttpStatus::SymbolicStyleChecker::DEFAULT_MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::HttpStatus::SymbolicStyleChecker::MSG = T.let(T.unsafe(nil), String)
+class RuboCop::Cop::Rails::I18nLocaleAssignment < ::RuboCop::Cop::Base
+ def i18n_locale_assignment?(param0 = T.unsafe(nil)); end
+ def on_send(node); end
+end
+
+RuboCop::Cop::Rails::I18nLocaleAssignment::MSG = T.let(T.unsafe(nil), String)
+RuboCop::Cop::Rails::I18nLocaleAssignment::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
+
class RuboCop::Cop::Rails::IgnoredSkipActionFilterOption < ::RuboCop::Cop::Base
def filter_options(param0 = T.unsafe(nil)); end
def on_send(node); end
@@ -851,14 +833,12 @@ class RuboCop::Cop::Rails::IgnoredSkipActionFilterOption < ::RuboCop::Cop::Base
end
RuboCop::Cop::Rails::IgnoredSkipActionFilterOption::FILTERS = T.let(T.unsafe(nil), Array)
-
RuboCop::Cop::Rails::IgnoredSkipActionFilterOption::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::IgnoredSkipActionFilterOption::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Rails::IndexBy < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::IndexMethod)
- extend(::RuboCop::Cop::AutoCorrector)
+ include ::RuboCop::Cop::IndexMethod
+ extend ::RuboCop::Cop::AutoCorrector
def on_bad_each_with_object(param0 = T.unsafe(nil)); end
def on_bad_hash_brackets_map(param0 = T.unsafe(nil)); end
@@ -871,9 +851,9 @@ class RuboCop::Cop::Rails::IndexBy < ::RuboCop::Cop::Base
end
class RuboCop::Cop::Rails::IndexWith < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::IndexMethod)
- extend(::RuboCop::Cop::AutoCorrector)
- extend(::RuboCop::Cop::TargetRailsVersion)
+ include ::RuboCop::Cop::IndexMethod
+ extend ::RuboCop::Cop::AutoCorrector
+ extend ::RuboCop::Cop::TargetRailsVersion
def on_bad_each_with_object(param0 = T.unsafe(nil)); end
def on_bad_hash_brackets_map(param0 = T.unsafe(nil)); end
@@ -890,7 +870,6 @@ class RuboCop::Cop::Rails::Inquiry < ::RuboCop::Cop::Base
end
RuboCop::Cop::Rails::Inquiry::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::Inquiry::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Rails::InverseOf < ::RuboCop::Cop::Base
@@ -917,9 +896,7 @@ class RuboCop::Cop::Rails::InverseOf < ::RuboCop::Cop::Base
end
RuboCop::Cop::Rails::InverseOf::NIL_MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::InverseOf::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
-
RuboCop::Cop::Rails::InverseOf::SPECIFY_MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Rails::LexicallyScopedActionFilter < ::RuboCop::Cop::Base
@@ -933,13 +910,11 @@ class RuboCop::Cop::Rails::LexicallyScopedActionFilter < ::RuboCop::Cop::Base
end
RuboCop::Cop::Rails::LexicallyScopedActionFilter::FILTERS = T.let(T.unsafe(nil), Array)
-
RuboCop::Cop::Rails::LexicallyScopedActionFilter::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::LexicallyScopedActionFilter::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Rails::LinkToBlank < ::RuboCop::Cop::Base
- extend(::RuboCop::Cop::AutoCorrector)
+ extend ::RuboCop::Cop::AutoCorrector
def blank_target?(param0 = T.unsafe(nil)); end
def includes_noopener?(param0 = T.unsafe(nil)); end
@@ -955,11 +930,10 @@ class RuboCop::Cop::Rails::LinkToBlank < ::RuboCop::Cop::Base
end
RuboCop::Cop::Rails::LinkToBlank::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::LinkToBlank::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Rails::MailerName < ::RuboCop::Cop::Base
- extend(::RuboCop::Cop::AutoCorrector)
+ extend ::RuboCop::Cop::AutoCorrector
def class_definition?(param0 = T.unsafe(nil)); end
def class_new_definition?(param0 = T.unsafe(nil)); end
@@ -976,7 +950,7 @@ end
RuboCop::Cop::Rails::MailerName::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Rails::MatchRoute < ::RuboCop::Cop::Base
- extend(::RuboCop::Cop::AutoCorrector)
+ extend ::RuboCop::Cop::AutoCorrector
def match_method_call?(param0 = T.unsafe(nil)); end
def on_send(node); end
@@ -994,20 +968,17 @@ class RuboCop::Cop::Rails::MatchRoute < ::RuboCop::Cop::Base
end
RuboCop::Cop::Rails::MatchRoute::HTTP_METHODS = T.let(T.unsafe(nil), Array)
-
RuboCop::Cop::Rails::MatchRoute::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::MatchRoute::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Rails::NegateInclude < ::RuboCop::Cop::Base
- extend(::RuboCop::Cop::AutoCorrector)
+ extend ::RuboCop::Cop::AutoCorrector
def negate_include_call?(param0 = T.unsafe(nil)); end
def on_send(node); end
end
RuboCop::Cop::Rails::NegateInclude::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::NegateInclude::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Rails::NotNullColumn < ::RuboCop::Cop::Base
@@ -1025,11 +996,10 @@ class RuboCop::Cop::Rails::NotNullColumn < ::RuboCop::Cop::Base
end
RuboCop::Cop::Rails::NotNullColumn::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::NotNullColumn::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Rails::OrderById < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::RangeHelp)
+ include ::RuboCop::Cop::RangeHelp
def on_send(node); end
def order_by_id?(param0 = T.unsafe(nil)); end
@@ -1040,7 +1010,6 @@ class RuboCop::Cop::Rails::OrderById < ::RuboCop::Cop::Base
end
RuboCop::Cop::Rails::OrderById::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::OrderById::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Rails::Output < ::RuboCop::Cop::Base
@@ -1054,7 +1023,6 @@ class RuboCop::Cop::Rails::Output < ::RuboCop::Cop::Base
end
RuboCop::Cop::Rails::Output::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::Output::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Rails::OutputSafety < ::RuboCop::Cop::Base
@@ -1070,12 +1038,11 @@ class RuboCop::Cop::Rails::OutputSafety < ::RuboCop::Cop::Base
end
RuboCop::Cop::Rails::OutputSafety::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::OutputSafety::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Rails::Pick < ::RuboCop::Cop::Base
- extend(::RuboCop::Cop::AutoCorrector)
- extend(::RuboCop::Cop::TargetRailsVersion)
+ extend ::RuboCop::Cop::AutoCorrector
+ extend ::RuboCop::Cop::TargetRailsVersion
def on_send(node); end
def pick_candidate?(param0 = T.unsafe(nil)); end
@@ -1086,12 +1053,11 @@ class RuboCop::Cop::Rails::Pick < ::RuboCop::Cop::Base
end
RuboCop::Cop::Rails::Pick::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::Pick::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Rails::Pluck < ::RuboCop::Cop::Base
- extend(::RuboCop::Cop::AutoCorrector)
- extend(::RuboCop::Cop::TargetRailsVersion)
+ extend ::RuboCop::Cop::AutoCorrector
+ extend ::RuboCop::Cop::TargetRailsVersion
def on_block(node); end
def pluck_candidate?(param0 = T.unsafe(nil)); end
@@ -1105,9 +1071,9 @@ end
RuboCop::Cop::Rails::Pluck::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Rails::PluckId < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::RangeHelp)
- include(::RuboCop::Cop::ActiveRecordHelper)
- extend(::RuboCop::Cop::AutoCorrector)
+ include ::RuboCop::Cop::RangeHelp
+ include ::RuboCop::Cop::ActiveRecordHelper
+ extend ::RuboCop::Cop::AutoCorrector
def on_send(node); end
def pluck_id_call?(param0 = T.unsafe(nil)); end
@@ -1118,13 +1084,12 @@ class RuboCop::Cop::Rails::PluckId < ::RuboCop::Cop::Base
end
RuboCop::Cop::Rails::PluckId::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::PluckId::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Rails::PluckInWhere < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::ActiveRecordHelper)
- include(::RuboCop::Cop::ConfigurableEnforcedStyle)
- extend(::RuboCop::Cop::AutoCorrector)
+ include ::RuboCop::Cop::ActiveRecordHelper
+ include ::RuboCop::Cop::ConfigurableEnforcedStyle
+ extend ::RuboCop::Cop::AutoCorrector
def on_send(node); end
@@ -1134,11 +1099,10 @@ class RuboCop::Cop::Rails::PluckInWhere < ::RuboCop::Cop::Base
end
RuboCop::Cop::Rails::PluckInWhere::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::PluckInWhere::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Rails::PluralizationGrammar < ::RuboCop::Cop::Base
- extend(::RuboCop::Cop::AutoCorrector)
+ extend ::RuboCop::Cop::AutoCorrector
def on_send(node); end
@@ -1158,16 +1122,13 @@ class RuboCop::Cop::Rails::PluralizationGrammar < ::RuboCop::Cop::Base
end
RuboCop::Cop::Rails::PluralizationGrammar::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::PluralizationGrammar::PLURAL_DURATION_METHODS = T.let(T.unsafe(nil), Hash)
-
RuboCop::Cop::Rails::PluralizationGrammar::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
-
RuboCop::Cop::Rails::PluralizationGrammar::SINGULAR_DURATION_METHODS = T.let(T.unsafe(nil), Hash)
class RuboCop::Cop::Rails::Presence < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::RangeHelp)
- extend(::RuboCop::Cop::AutoCorrector)
+ include ::RuboCop::Cop::RangeHelp
+ extend ::RuboCop::Cop::AutoCorrector
def on_if(node); end
def redundant_negative_receiver_and_other(param0 = T.unsafe(nil)); end
@@ -1186,7 +1147,7 @@ end
RuboCop::Cop::Rails::Presence::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Rails::Present < ::RuboCop::Cop::Base
- extend(::RuboCop::Cop::AutoCorrector)
+ extend ::RuboCop::Cop::AutoCorrector
def autocorrect(corrector, node); end
def exists_and_not_empty?(param0 = T.unsafe(nil)); end
@@ -1204,15 +1165,12 @@ class RuboCop::Cop::Rails::Present < ::RuboCop::Cop::Base
end
RuboCop::Cop::Rails::Present::MSG_EXISTS_AND_NOT_EMPTY = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::Present::MSG_NOT_BLANK = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::Present::MSG_UNLESS_BLANK = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::Present::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Rails::RakeEnvironment < ::RuboCop::Cop::Base
- extend(::RuboCop::Cop::AutoCorrector)
+ extend ::RuboCop::Cop::AutoCorrector
def on_block(node); end
def task_definition?(param0 = T.unsafe(nil)); end
@@ -1228,7 +1186,7 @@ end
RuboCop::Cop::Rails::RakeEnvironment::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Rails::ReadWriteAttribute < ::RuboCop::Cop::Base
- extend(::RuboCop::Cop::AutoCorrector)
+ extend ::RuboCop::Cop::AutoCorrector
def on_send(node); end
def read_write_attribute?(param0 = T.unsafe(nil)); end
@@ -1241,12 +1199,11 @@ class RuboCop::Cop::Rails::ReadWriteAttribute < ::RuboCop::Cop::Base
end
RuboCop::Cop::Rails::ReadWriteAttribute::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::ReadWriteAttribute::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Rails::RedundantAllowNil < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::RangeHelp)
- extend(::RuboCop::Cop::AutoCorrector)
+ include ::RuboCop::Cop::RangeHelp
+ extend ::RuboCop::Cop::AutoCorrector
def on_send(node); end
@@ -1261,14 +1218,12 @@ class RuboCop::Cop::Rails::RedundantAllowNil < ::RuboCop::Cop::Base
end
RuboCop::Cop::Rails::RedundantAllowNil::MSG_ALLOW_NIL_FALSE = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::RedundantAllowNil::MSG_SAME = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::RedundantAllowNil::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Rails::RedundantForeignKey < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::RangeHelp)
- extend(::RuboCop::Cop::AutoCorrector)
+ include ::RuboCop::Cop::RangeHelp
+ extend ::RuboCop::Cop::AutoCorrector
def association_with_foreign_key(param0 = T.unsafe(nil)); end
def on_send(node); end
@@ -1281,12 +1236,11 @@ class RuboCop::Cop::Rails::RedundantForeignKey < ::RuboCop::Cop::Base
end
RuboCop::Cop::Rails::RedundantForeignKey::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::RedundantForeignKey::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Rails::RedundantReceiverInWithOptions < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::RangeHelp)
- extend(::RuboCop::Cop::AutoCorrector)
+ include ::RuboCop::Cop::RangeHelp
+ extend ::RuboCop::Cop::AutoCorrector
def all_block_nodes_in(param0); end
def all_send_nodes_in(param0); end
@@ -1314,14 +1268,12 @@ class RuboCop::Cop::Rails::ReflectionClassName < ::RuboCop::Cop::Base
end
RuboCop::Cop::Rails::ReflectionClassName::ALLOWED_REFLECTION_CLASS_TYPES = T.let(T.unsafe(nil), Array)
-
RuboCop::Cop::Rails::ReflectionClassName::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::ReflectionClassName::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Rails::RefuteMethods < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::ConfigurableEnforcedStyle)
- extend(::RuboCop::Cop::AutoCorrector)
+ include ::RuboCop::Cop::ConfigurableEnforcedStyle
+ extend ::RuboCop::Cop::AutoCorrector
def offensive?(param0 = T.unsafe(nil)); end
def on_send(node); end
@@ -1334,48 +1286,42 @@ class RuboCop::Cop::Rails::RefuteMethods < ::RuboCop::Cop::Base
end
RuboCop::Cop::Rails::RefuteMethods::ASSERT_NOT_METHODS = T.let(T.unsafe(nil), Array)
-
RuboCop::Cop::Rails::RefuteMethods::CORRECTIONS = T.let(T.unsafe(nil), Hash)
-
RuboCop::Cop::Rails::RefuteMethods::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::RefuteMethods::REFUTE_METHODS = T.let(T.unsafe(nil), Array)
-
RuboCop::Cop::Rails::RefuteMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Rails::RelativeDateConstant < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::RangeHelp)
- extend(::RuboCop::Cop::AutoCorrector)
+ include ::RuboCop::Cop::RangeHelp
+ extend ::RuboCop::Cop::AutoCorrector
def on_casgn(node); end
def on_masgn(node); end
def on_or_asgn(node); end
- def relative_date?(param0 = T.unsafe(nil)); end
- def relative_date_or_assignment?(param0 = T.unsafe(nil)); end
+ def relative_date(param0 = T.unsafe(nil)); end
+ def relative_date_or_assignment(param0 = T.unsafe(nil)); end
private
def autocorrect(corrector, node); end
def message(method_name); end
+ def nested_relative_date(node, &callback); end
def offense_range(name, value); end
- def relative_date_method?(method_name); end
end
RuboCop::Cop::Rails::RelativeDateConstant::MSG = T.let(T.unsafe(nil), String)
-
-RuboCop::Cop::Rails::RelativeDateConstant::RELATIVE_DATE_METHODS = T.let(T.unsafe(nil), Array)
+RuboCop::Cop::Rails::RelativeDateConstant::RELATIVE_DATE_METHODS = T.let(T.unsafe(nil), Set)
class RuboCop::Cop::Rails::RenderInline < ::RuboCop::Cop::Base
def on_send(node); end
def render_with_inline_option?(param0 = T.unsafe(nil)); end
end
RuboCop::Cop::Rails::RenderInline::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::RenderInline::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Rails::RenderPlainText < ::RuboCop::Cop::Base
- extend(::RuboCop::Cop::AutoCorrector)
+ extend ::RuboCop::Cop::AutoCorrector
def on_send(node); end
def render_plain_text?(param0 = T.unsafe(nil)); end
@@ -1388,12 +1334,11 @@ class RuboCop::Cop::Rails::RenderPlainText < ::RuboCop::Cop::Base
end
RuboCop::Cop::Rails::RenderPlainText::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::RenderPlainText::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Rails::RequestReferer < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::ConfigurableEnforcedStyle)
- extend(::RuboCop::Cop::AutoCorrector)
+ include ::RuboCop::Cop::ConfigurableEnforcedStyle
+ extend ::RuboCop::Cop::AutoCorrector
def on_send(node); end
def referer?(param0 = T.unsafe(nil)); end
@@ -1405,18 +1350,16 @@ class RuboCop::Cop::Rails::RequestReferer < ::RuboCop::Cop::Base
end
RuboCop::Cop::Rails::RequestReferer::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::RequestReferer::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Rails::RequireDependency < ::RuboCop::Cop::Base
- extend(::RuboCop::Cop::TargetRailsVersion)
+ extend ::RuboCop::Cop::TargetRailsVersion
def on_send(node); end
def require_dependency_call?(param0 = T.unsafe(nil)); end
end
RuboCop::Cop::Rails::RequireDependency::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::RequireDependency::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Rails::ReversibleMigration < ::RuboCop::Cop::Base
@@ -1459,8 +1402,8 @@ end
RuboCop::Cop::Rails::ReversibleMigrationMethodDefinition::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Rails::SafeNavigation < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::RangeHelp)
- extend(::RuboCop::Cop::AutoCorrector)
+ include ::RuboCop::Cop::RangeHelp
+ extend ::RuboCop::Cop::AutoCorrector
def on_send(node); end
def try_call(param0 = T.unsafe(nil)); end
@@ -1476,11 +1419,10 @@ class RuboCop::Cop::Rails::SafeNavigation < ::RuboCop::Cop::Base
end
RuboCop::Cop::Rails::SafeNavigation::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::SafeNavigation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Rails::SafeNavigationWithBlank < ::RuboCop::Cop::Base
- extend(::RuboCop::Cop::AutoCorrector)
+ extend ::RuboCop::Cop::AutoCorrector
def on_if(node); end
def safe_navigation_blank_in_conditional?(param0 = T.unsafe(nil)); end
@@ -1489,8 +1431,8 @@ end
RuboCop::Cop::Rails::SafeNavigationWithBlank::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Rails::SaveBang < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::NegativeConditional)
- extend(::RuboCop::Cop::AutoCorrector)
+ include ::RuboCop::Cop::NegativeConditional
+ extend ::RuboCop::Cop::AutoCorrector
def after_leaving_scope(scope, _variable_table); end
def check_assignment(assignment); end
@@ -1528,15 +1470,10 @@ class RuboCop::Cop::Rails::SaveBang < ::RuboCop::Cop::Base
end
RuboCop::Cop::Rails::SaveBang::CREATE_CONDITIONAL_MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::SaveBang::CREATE_MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::SaveBang::CREATE_PERSIST_METHODS = T.let(T.unsafe(nil), Array)
-
RuboCop::Cop::Rails::SaveBang::MODIFY_PERSIST_METHODS = T.let(T.unsafe(nil), Array)
-
RuboCop::Cop::Rails::SaveBang::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::SaveBang::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Rails::ScopeArgs < ::RuboCop::Cop::Base
@@ -1545,21 +1482,18 @@ class RuboCop::Cop::Rails::ScopeArgs < ::RuboCop::Cop::Base
end
RuboCop::Cop::Rails::ScopeArgs::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::ScopeArgs::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Rails::ShortI18n < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::ConfigurableEnforcedStyle)
- extend(::RuboCop::Cop::AutoCorrector)
+ include ::RuboCop::Cop::ConfigurableEnforcedStyle
+ extend ::RuboCop::Cop::AutoCorrector
def long_i18n?(param0 = T.unsafe(nil)); end
def on_send(node); end
end
RuboCop::Cop::Rails::ShortI18n::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::ShortI18n::PREFERRED_METHODS = T.let(T.unsafe(nil), Hash)
-
RuboCop::Cop::Rails::ShortI18n::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Rails::SkipsModelValidations < ::RuboCop::Cop::Base
@@ -1579,12 +1513,11 @@ class RuboCop::Cop::Rails::SkipsModelValidations < ::RuboCop::Cop::Base
end
RuboCop::Cop::Rails::SkipsModelValidations::METHODS_WITH_ARGUMENTS = T.let(T.unsafe(nil), Array)
-
RuboCop::Cop::Rails::SkipsModelValidations::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Rails::SquishedSQLHeredocs < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::Heredoc)
- extend(::RuboCop::Cop::AutoCorrector)
+ include ::RuboCop::Cop::Heredoc
+ extend ::RuboCop::Cop::AutoCorrector
def on_heredoc(node); end
@@ -1597,14 +1530,12 @@ class RuboCop::Cop::Rails::SquishedSQLHeredocs < ::RuboCop::Cop::Base
end
RuboCop::Cop::Rails::SquishedSQLHeredocs::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::SquishedSQLHeredocs::SQL = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::SquishedSQLHeredocs::SQUISH = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Rails::TimeZone < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::ConfigurableEnforcedStyle)
- extend(::RuboCop::Cop::AutoCorrector)
+ include ::RuboCop::Cop::ConfigurableEnforcedStyle
+ extend ::RuboCop::Cop::AutoCorrector
def on_const(node); end
@@ -1631,17 +1562,11 @@ class RuboCop::Cop::Rails::TimeZone < ::RuboCop::Cop::Base
end
RuboCop::Cop::Rails::TimeZone::ACCEPTED_METHODS = T.let(T.unsafe(nil), Array)
-
RuboCop::Cop::Rails::TimeZone::DANGEROUS_METHODS = T.let(T.unsafe(nil), Array)
-
RuboCop::Cop::Rails::TimeZone::GOOD_METHODS = T.let(T.unsafe(nil), Array)
-
RuboCop::Cop::Rails::TimeZone::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::TimeZone::MSG_ACCEPTABLE = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::TimeZone::MSG_LOCALTIME = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::TimeZone::TIMEZONE_SPECIFIER = T.let(T.unsafe(nil), Regexp)
class RuboCop::Cop::Rails::TimeZoneAssignment < ::RuboCop::Cop::Base
@@ -1650,13 +1575,12 @@ class RuboCop::Cop::Rails::TimeZoneAssignment < ::RuboCop::Cop::Base
end
RuboCop::Cop::Rails::TimeZoneAssignment::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::TimeZoneAssignment::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Rails::UniqBeforePluck < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::ConfigurableEnforcedStyle)
- include(::RuboCop::Cop::RangeHelp)
- extend(::RuboCop::Cop::AutoCorrector)
+ include ::RuboCop::Cop::ConfigurableEnforcedStyle
+ include ::RuboCop::Cop::RangeHelp
+ extend ::RuboCop::Cop::AutoCorrector
def aggressive_node_match(param0 = T.unsafe(nil)); end
def conservative_node_match(param0 = T.unsafe(nil)); end
@@ -1670,15 +1594,12 @@ class RuboCop::Cop::Rails::UniqBeforePluck < ::RuboCop::Cop::Base
end
RuboCop::Cop::Rails::UniqBeforePluck::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::UniqBeforePluck::NEWLINE = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::UniqBeforePluck::PATTERN = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::UniqBeforePluck::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Rails::UniqueValidationWithoutIndex < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::ActiveRecordHelper)
+ include ::RuboCop::Cop::ActiveRecordHelper
def on_send(node); end
@@ -1698,7 +1619,6 @@ class RuboCop::Cop::Rails::UniqueValidationWithoutIndex < ::RuboCop::Cop::Base
end
RuboCop::Cop::Rails::UniqueValidationWithoutIndex::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::UniqueValidationWithoutIndex::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Rails::UnknownEnv < ::RuboCop::Cop::Base
@@ -1717,11 +1637,27 @@ class RuboCop::Cop::Rails::UnknownEnv < ::RuboCop::Cop::Base
end
RuboCop::Cop::Rails::UnknownEnv::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::UnknownEnv::MSG_SIMILAR = T.let(T.unsafe(nil), String)
+class RuboCop::Cop::Rails::UnusedIgnoredColumns < ::RuboCop::Cop::Base
+ include ::RuboCop::Cop::ActiveRecordHelper
+
+ def column_name(param0 = T.unsafe(nil)); end
+ def ignored_columns(param0 = T.unsafe(nil)); end
+ def on_send(node); end
+
+ private
+
+ def check_column_existence(column_node, table); end
+ def class_node(node); end
+ def table(node); end
+end
+
+RuboCop::Cop::Rails::UnusedIgnoredColumns::MSG = T.let(T.unsafe(nil), String)
+RuboCop::Cop::Rails::UnusedIgnoredColumns::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
+
class RuboCop::Cop::Rails::Validation < ::RuboCop::Cop::Base
- extend(::RuboCop::Cop::AutoCorrector)
+ extend ::RuboCop::Cop::AutoCorrector
def on_send(node); end
@@ -1738,16 +1674,13 @@ class RuboCop::Cop::Rails::Validation < ::RuboCop::Cop::Base
end
RuboCop::Cop::Rails::Validation::ALLOWLIST = T.let(T.unsafe(nil), Array)
-
RuboCop::Cop::Rails::Validation::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::Validation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
-
RuboCop::Cop::Rails::Validation::TYPES = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Rails::WhereEquals < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::RangeHelp)
- extend(::RuboCop::Cop::AutoCorrector)
+ include ::RuboCop::Cop::RangeHelp
+ extend ::RuboCop::Cop::AutoCorrector
def on_send(node); end
def where_method_call?(param0 = T.unsafe(nil)); end
@@ -1760,22 +1693,16 @@ class RuboCop::Cop::Rails::WhereEquals < ::RuboCop::Cop::Base
end
RuboCop::Cop::Rails::WhereEquals::EQ_ANONYMOUS_RE = T.let(T.unsafe(nil), Regexp)
-
RuboCop::Cop::Rails::WhereEquals::EQ_NAMED_RE = T.let(T.unsafe(nil), Regexp)
-
RuboCop::Cop::Rails::WhereEquals::IN_ANONYMOUS_RE = T.let(T.unsafe(nil), Regexp)
-
RuboCop::Cop::Rails::WhereEquals::IN_NAMED_RE = T.let(T.unsafe(nil), Regexp)
-
RuboCop::Cop::Rails::WhereEquals::IS_NULL_RE = T.let(T.unsafe(nil), Regexp)
-
RuboCop::Cop::Rails::WhereEquals::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::WhereEquals::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Rails::WhereExists < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::ConfigurableEnforcedStyle)
- extend(::RuboCop::Cop::AutoCorrector)
+ include ::RuboCop::Cop::ConfigurableEnforcedStyle
+ extend ::RuboCop::Cop::AutoCorrector
def exists_with_args?(param0 = T.unsafe(nil)); end
def on_send(node); end
@@ -1794,12 +1721,11 @@ class RuboCop::Cop::Rails::WhereExists < ::RuboCop::Cop::Base
end
RuboCop::Cop::Rails::WhereExists::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::WhereExists::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Rails::WhereNot < ::RuboCop::Cop::Base
- include(::RuboCop::Cop::RangeHelp)
- extend(::RuboCop::Cop::AutoCorrector)
+ include ::RuboCop::Cop::RangeHelp
+ extend ::RuboCop::Cop::AutoCorrector
def on_send(node); end
def where_method_call?(param0 = T.unsafe(nil)); end
@@ -1812,17 +1738,11 @@ class RuboCop::Cop::Rails::WhereNot < ::RuboCop::Cop::Base
end
RuboCop::Cop::Rails::WhereNot::IS_NOT_NULL_RE = T.let(T.unsafe(nil), Regexp)
-
RuboCop::Cop::Rails::WhereNot::MSG = T.let(T.unsafe(nil), String)
-
RuboCop::Cop::Rails::WhereNot::NOT_EQ_ANONYMOUS_RE = T.let(T.unsafe(nil), Regexp)
-
RuboCop::Cop::Rails::WhereNot::NOT_EQ_NAMED_RE = T.let(T.unsafe(nil), Regexp)
-
RuboCop::Cop::Rails::WhereNot::NOT_IN_ANONYMOUS_RE = T.let(T.unsafe(nil), Regexp)
-
RuboCop::Cop::Rails::WhereNot::NOT_IN_NAMED_RE = T.let(T.unsafe(nil), Regexp)
-
RuboCop::Cop::Rails::WhereNot::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
module RuboCop::Cop::TargetRailsVersion
@@ -1831,22 +1751,21 @@ module RuboCop::Cop::TargetRailsVersion
end
RuboCop::NodePattern = RuboCop::AST::NodePattern
-
RuboCop::ProcessedSource = RuboCop::AST::ProcessedSource
-
-module RuboCop::Rails
-end
-
+module RuboCop::Rails; end
RuboCop::Rails::CONFIG = T.let(T.unsafe(nil), Hash)
+RuboCop::Rails::CONFIG_DEFAULT = T.let(T.unsafe(nil), Pathname)
module RuboCop::Rails::Inject
class << self
def defaults!; end
end
end
+RuboCop::Rails::PROJECT_ROOT = T.let(T.unsafe(nil), Pathname)
+
module RuboCop::Rails::SchemaLoader
- extend(::RuboCop::Rails::SchemaLoader)
+ extend ::RuboCop::Rails::SchemaLoader
def db_schema_path; end
def load(target_ruby_version); end
@@ -1927,5 +1846,4 @@ module RuboCop::Rails::Version
end
RuboCop::Rails::Version::STRING = T.let(T.unsafe(nil), String)
-
RuboCop::Token = RuboCop::AST::Token | true |
Other | Homebrew | brew | f9fe62f88368edb838cd14a5f2d2ef7c7e4600b7.json | Update RBI files for rubocop-rails. | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -26789,8 +26789,10 @@ class RuboCop::AST::NodePattern::Parser
end
module RuboCop::AST::NodePattern::Sets
+ SET_BEGINNING_OF_DAY_BEGINNING_OF_WEEK_BEGINNING_OF_MONTH_ETC = ::T.let(nil, ::T.untyped)
SET_BUILD_RECOMMENDED_TEST_OPTIONAL = ::T.let(nil, ::T.untyped)
SET_DEPENDS_ON_USES_FROM_MACOS = ::T.let(nil, ::T.untyped)
+ SET_END_OF_DAY_END_OF_WEEK_END_OF_MONTH_ETC = ::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) | true |
Other | Homebrew | brew | 4b126b8cf3c720914c359a7d047969140e9d7255.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 | @@ -6234,10 +6234,6 @@ module CopHelper
extend ::RSpec::Its
end
-class CurlDownloadStrategy
- include ::AbstractDownloadStrategy::Compat_Fetch
-end
-
class CxxStdlib
extend ::T::Private::Methods::MethodHooks
extend ::T::Private::Methods::SingletonMethodHooks | false |
Other | Homebrew | brew | 84e3e0a6b87229067041da4e947ee4f352892b62.json | audit_spec: add tests for audit_conflicts | Library/Homebrew/test/dev-cmd/audit_spec.rb | @@ -1139,5 +1139,58 @@ class FooAT11 < Formula
expect(fa.problems).to be_empty
end
end
+
+ describe "#audit_conflicts" do
+ specify "it warns when conflicting with non-existing formula" do
+ fa = formula_auditor "foo", <<~RUBY
+ class Foo < Formula
+ url "https://brew.sh/foo-1.0.tgz"
+
+ conflicts_with "bar"
+ end
+ RUBY
+
+ fa.audit_conflicts
+
+ expect(fa.problems.first[:message])
+ .to match("Can't find conflicting formula \"bar\"")
+ end
+
+ specify "it warns when conflicting with itself" do
+ fa = formula_auditor "foo", <<~RUBY
+ class Foo < Formula
+ url "https://brew.sh/foo-1.0.tgz"
+
+ conflicts_with "#{dir}/foo.rb"
+ end
+ RUBY
+
+ fa.audit_conflicts
+
+ expect(fa.problems.first[:message])
+ .to match("Formula should not conflict with itself")
+ end
+
+ specify "it warns when another formula does not have a symmetric conflict" do
+ formula_auditor "bar", <<~RUBY
+ class Bar < Formula
+ url "https://brew.sh/foo-1.0.tgz"
+ end
+ RUBY
+
+ fa = formula_auditor "foo", <<~RUBY
+ class Foo < Formula
+ url "https://brew.sh/foo-1.0.tgz"
+
+ conflicts_with "#{dir}/bar.rb"
+ end
+ RUBY
+
+ fa.audit_conflicts
+
+ expect(fa.problems.first[:message])
+ .to match("Formula bar should also have a conflict declared with foo")
+ end
+ end
end
end | false |
Other | Homebrew | brew | 4c14675021ce399dc64459f94763e2016bc58b41.json | audit: add more checks for conflics_with audit | Library/Homebrew/formula_auditor.rb | @@ -315,7 +315,14 @@ def audit_deps
def audit_conflicts
formula.conflicts.each do |c|
- Formulary.factory(c.name)
+ conflicting_formula = Formulary.factory(c.name)
+ problem "Formula should not conflict with itself" if formula == conflicting_formula
+
+ # Use Formula instead of FormulaConflict to be able correctly handle renamed formulae and aliases
+ reverse_conflicts = conflicting_formula.conflicts.map { |rc| Formulary.factory(rc.name) }
+ if reverse_conflicts.exclude? formula
+ problem "Formula #{conflicting_formula.name} should also have a conflict declared with #{formula.name}"
+ end
rescue TapFormulaUnavailableError
# Don't complain about missing cross-tap conflicts.
next | false |
Other | Homebrew | brew | 35e5c8a61248eddaccdf1b674de089bf40a2dc97.json | formula_installer: add fallback to use tap formula
The keg formula isn't present in some old bottles. Use the tap
formula as a fallback when this is the case. | Library/Homebrew/formula_installer.rb | @@ -1056,9 +1056,11 @@ def post_install
# * Installing from a local bottle, or
# * The formula doesn't exist in the tap (or the tap isn't installed), or
# * The formula in the tap has a different pkg_version.
+ #
# In all other cases, including if the formula from the keg is unreadable
- # (third-party taps may `require` some of their own libraries), use the
- # formula from the tap.
+ # (third-party taps may `require` some of their own libraries) or if there
+ # is no formula present in the keg (as is the case with old bottles), use
+ # the formula from the tap.
formula_path = begin
keg_formula_path = formula.opt_prefix/".brew/#{formula.name}.rb"
tap_formula_path = formula.path
@@ -1073,7 +1075,7 @@ def post_install
else
tap_formula_path
end
- rescue FormulaUnreadableError
+ rescue FormulaUnavailableError, FormulaUnreadableError
tap_formula_path
end
| false |
Other | Homebrew | brew | b9e183c1f5b7bf7e5ddaf771fb9fc88e62f074fc.json | Update RBI files for bindata. | Library/Homebrew/sorbet/rbi/gems/bindata@2.4.10.rbi | @@ -1,13 +1,12 @@
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `bindata` gem.
-# Please instead update this file by running `tapioca generate --exclude json`.
+# Please instead update this file by running `bin/tapioca sync`.
# typed: true
module BinData
- extend(::BinData::BitFieldFactory)
- extend(::BinData::IntFactory)
-
+ extend ::BinData::BitFieldFactory
+ extend ::BinData::IntFactory
private
@@ -51,8 +50,8 @@ class BinData::AcceptedParametersPlugin::AcceptedParameters
end
class BinData::Array < ::BinData::Base
- include(::Enumerable)
- extend(::BinData::DSLMixin)
+ include ::Enumerable
+ extend ::BinData::DSLMixin
def <<(*args); end
def [](arg1, arg2 = T.unsafe(nil)); end
@@ -101,16 +100,16 @@ class BinData::ArrayArgProcessor < ::BinData::BaseArgProcessor
end
class BinData::Base
- include(::BinData::Framework)
- include(::BinData::RegisterNamePlugin)
- extend(::BinData::AcceptedParametersPlugin)
+ include ::BinData::Framework
+ include ::BinData::RegisterNamePlugin
+ extend ::BinData::AcceptedParametersPlugin
def initialize(*args); end
def ==(other); end
def =~(other); end
def abs_offset; end
- def base_respond_to?(*_); end
+ def base_respond_to?(*_arg0); end
def clear; end
def debug_name; end
def eval_parameter(key, overrides = T.unsafe(nil)); end
@@ -134,7 +133,7 @@ class BinData::Base
protected
- def parent=(_); end
+ def parent=(_arg0); end
private
@@ -288,7 +287,7 @@ class BinData::BitLe < ::BinData::BasePrimitive
end
class BinData::Buffer < ::BinData::Base
- extend(::BinData::DSLMixin)
+ extend ::BinData::DSLMixin
def assign(val); end
def clear?; end
@@ -303,7 +302,7 @@ class BinData::Buffer < ::BinData::Base
end
class BinData::BufferArgProcessor < ::BinData::BaseArgProcessor
- include(::BinData::MultiFieldArgSeparator)
+ include ::BinData::MultiFieldArgSeparator
def sanitize_parameters!(obj_class, params); end
end
@@ -317,7 +316,7 @@ module BinData::ByteAlignPlugin
end
class BinData::Choice < ::BinData::Base
- extend(::BinData::DSLMixin)
+ extend ::BinData::DSLMixin
def assign(*args); end
def clear?(*args); end
@@ -362,7 +361,6 @@ module BinData::CopyOnChangePlugin
end
class BinData::CountBytesRemaining < ::BinData::BasePrimitive
-
private
def read_and_return_value(io); end
@@ -449,7 +447,7 @@ class BinData::DSLMixin::DSLParser
end
class BinData::DelayedIO < ::BinData::Base
- extend(::BinData::DSLMixin)
+ extend ::BinData::DSLMixin
def abs_offset; end
def abs_offset=(offset); end
@@ -469,7 +467,7 @@ class BinData::DelayedIO < ::BinData::Base
end
class BinData::DelayedIoArgProcessor < ::BinData::BaseArgProcessor
- include(::BinData::MultiFieldArgSeparator)
+ include ::BinData::MultiFieldArgSeparator
def sanitize_parameters!(obj_class, params); end
end
@@ -549,7 +547,6 @@ end
module BinData::IO::Common
def initialize(io); end
-
private
def buffer_limited_n(n); end
@@ -586,7 +583,7 @@ module BinData::IO::Common::UnSeekableStream
end
class BinData::IO::Read
- include(::BinData::IO::Common)
+ include ::BinData::IO::Common
def initialize(io); end
@@ -609,7 +606,7 @@ class BinData::IO::Read
end
class BinData::IO::Write
- include(::BinData::IO::Common)
+ include ::BinData::IO::Common
def initialize(io); end
@@ -738,7 +735,7 @@ module BinData::MultiFieldArgSeparator
end
class BinData::Primitive < ::BinData::BasePrimitive
- extend(::BinData::DSLMixin)
+ extend ::BinData::DSLMixin
def assign(val); end
def debug_name_of(child); end
@@ -773,15 +770,15 @@ module BinData::ReadUntilPlugin
end
class BinData::Record < ::BinData::Struct
- extend(::BinData::DSLMixin)
+ extend ::BinData::DSLMixin
class << self
def inherited(subclass); end
end
end
class BinData::RecordArgProcessor < ::BinData::StructArgProcessor
- include(::BinData::MultiFieldArgSeparator)
+ include ::BinData::MultiFieldArgSeparator
def sanitize_parameters!(obj_class, params); end
end
@@ -815,7 +812,6 @@ class BinData::Registry
end
class BinData::Rest < ::BinData::BasePrimitive
-
private
def read_and_return_value(io); end
@@ -853,7 +849,7 @@ class BinData::SanitizedField < ::BinData::SanitizedParameter
end
class BinData::SanitizedFields < ::BinData::SanitizedParameter
- include(::Enumerable)
+ include ::Enumerable
def initialize(hints, base_fields = T.unsafe(nil)); end
@@ -874,15 +870,14 @@ class BinData::SanitizedLittleEndian < ::BinData::SanitizedParameter
def endian; end
end
-class BinData::SanitizedParameter
-end
+class BinData::SanitizedParameter; end
class BinData::SanitizedParameters < ::Hash
def initialize(parameters, the_class, hints); end
def create_sanitized_params(params, the_class); end
def has_at_least_one_of?(*keys); end
- def has_parameter?(_); end
+ def has_parameter?(_arg0); end
def hints; end
def must_be_integer(*keys); end
def rename_parameter(old_key, new_key); end
@@ -912,7 +907,6 @@ class BinData::SanitizedParameters < ::Hash
end
BinData::SanitizedParameters::BIG_ENDIAN = T.let(T.unsafe(nil), BinData::SanitizedBigEndian)
-
BinData::SanitizedParameters::LITTLE_ENDIAN = T.let(T.unsafe(nil), BinData::SanitizedLittleEndian)
class BinData::SanitizedPrototype < ::BinData::SanitizedParameter
@@ -1156,7 +1150,6 @@ class BinData::Uint8 < ::BinData::BasePrimitive
end
class BinData::Uint8Array < ::BinData::BasePrimitive
-
private
def read_and_return_value(io); end
@@ -1168,13 +1161,9 @@ class BinData::Uint8ArrayArgProcessor < ::BinData::BaseArgProcessor
def sanitize_parameters!(obj_class, params); end
end
-class BinData::UnRegisteredTypeError < ::StandardError
-end
-
+class BinData::UnRegisteredTypeError < ::StandardError; end
BinData::VERSION = T.let(T.unsafe(nil), String)
-
-class BinData::ValidityError < ::StandardError
-end
+class BinData::ValidityError < ::StandardError; end
class BinData::Virtual < ::BinData::BasePrimitive
def do_num_bytes; end | false |
Other | Homebrew | brew | 2a9aaf6da8bd0b1b7ae74da512fd9be0beb399c2.json | Update RBI files for simplecov_json_formatter. | Library/Homebrew/sorbet/rbi/gems/simplecov_json_formatter@0.1.3.rbi | @@ -1,6 +1,6 @@
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `simplecov_json_formatter` 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 | 070dcd085f786eed8819aa95d3797f8c6c01777f.json | Update RBI files for docile. | Library/Homebrew/sorbet/rbi/gems/docile@1.4.0.rbi | @@ -1,6 +1,6 @@
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `docile` 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 | 6ebadd9d142c6f09be205950b17dbc072cad97db.json | Update RBI files for http-cookie. | Library/Homebrew/sorbet/rbi/gems/http-cookie@1.0.4.rbi | @@ -1,29 +1,28 @@
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `http-cookie` gem.
-# Please instead update this file by running `tapioca generate --exclude json`.
+# Please instead update this file by running `bin/tapioca sync`.
# typed: true
-module HTTP
-end
+module HTTP; end
class HTTP::Cookie
- include(::Mechanize::CookieDeprecated)
- include(::Mechanize::CookieIMethods)
- include(::Comparable)
- extend(::Mechanize::CookieDeprecated)
- extend(::Mechanize::CookieCMethods)
+ include ::Mechanize::CookieDeprecated
+ include ::Mechanize::CookieIMethods
+ include ::Comparable
+ extend ::Mechanize::CookieDeprecated
+ extend ::Mechanize::CookieCMethods
def initialize(*args); end
def <=>(other); end
def acceptable?; end
def acceptable_from_uri?(uri); end
def accessed_at; end
- def accessed_at=(_); end
+ def accessed_at=(_arg0); end
def cookie_value; end
def created_at; end
- def created_at=(_); end
+ def created_at=(_arg0); end
def domain; end
def domain=(domain); end
def domain_name; end
@@ -36,10 +35,10 @@ class HTTP::Cookie
def expires_at; end
def expires_at=(t); end
def for_domain; end
- def for_domain=(_); end
+ def for_domain=(_arg0); end
def for_domain?; end
def httponly; end
- def httponly=(_); end
+ def httponly=(_arg0); end
def httponly?; end
def init_with(coder); end
def inspect; end
@@ -52,7 +51,7 @@ class HTTP::Cookie
def path; end
def path=(path); end
def secure; end
- def secure=(_); end
+ def secure=(_arg0); end
def secure?; end
def session; end
def session?; end
@@ -72,11 +71,8 @@ class HTTP::Cookie
end
HTTP::Cookie::MAX_COOKIES_PER_DOMAIN = T.let(T.unsafe(nil), Integer)
-
HTTP::Cookie::MAX_COOKIES_TOTAL = T.let(T.unsafe(nil), Integer)
-
HTTP::Cookie::MAX_LENGTH = T.let(T.unsafe(nil), Integer)
-
HTTP::Cookie::PERSISTENT_PROPERTIES = T.let(T.unsafe(nil), Array)
class HTTP::Cookie::Scanner < ::StringScanner
@@ -101,21 +97,16 @@ class HTTP::Cookie::Scanner < ::StringScanner
end
HTTP::Cookie::Scanner::RE_BAD_CHAR = T.let(T.unsafe(nil), Regexp)
-
HTTP::Cookie::Scanner::RE_COOKIE_COMMA = T.let(T.unsafe(nil), Regexp)
-
HTTP::Cookie::Scanner::RE_NAME = T.let(T.unsafe(nil), Regexp)
-
HTTP::Cookie::Scanner::RE_WSP = T.let(T.unsafe(nil), Regexp)
-
HTTP::Cookie::UNIX_EPOCH = T.let(T.unsafe(nil), Time)
-
HTTP::Cookie::VERSION = T.let(T.unsafe(nil), String)
class HTTP::CookieJar
- include(::Mechanize::CookieDeprecated)
- include(::Mechanize::CookieJarIMethods)
- include(::Enumerable)
+ include ::Mechanize::CookieDeprecated
+ include ::Mechanize::CookieJarIMethods
+ include ::Enumerable
def initialize(options = T.unsafe(nil)); end
@@ -158,18 +149,9 @@ class HTTP::CookieJar::AbstractSaver
end
end
-class HTTP::CookieJar::YAMLSaver < ::HTTP::CookieJar::AbstractSaver
- def load(io, jar); end
- def save(io, jar); end
-
- private
-
- def default_options; end
-end
-
class HTTP::CookieJar::AbstractStore
- include(::MonitorMixin)
- include(::Enumerable)
+ include ::MonitorMixin
+ include ::Enumerable
def initialize(options = T.unsafe(nil)); end
@@ -204,11 +186,8 @@ class HTTP::CookieJar::CookiestxtSaver < ::HTTP::CookieJar::AbstractSaver
end
HTTP::CookieJar::CookiestxtSaver::False = T.let(T.unsafe(nil), String)
-
HTTP::CookieJar::CookiestxtSaver::HTTPONLY_PREFIX = T.let(T.unsafe(nil), String)
-
HTTP::CookieJar::CookiestxtSaver::RE_HTTPONLY_PREFIX = T.let(T.unsafe(nil), Regexp)
-
HTTP::CookieJar::CookiestxtSaver::True = T.let(T.unsafe(nil), String)
class HTTP::CookieJar::HashStore < ::HTTP::CookieJar::AbstractStore
@@ -225,3 +204,13 @@ class HTTP::CookieJar::HashStore < ::HTTP::CookieJar::AbstractStore
def initialize_copy(other); end
end
+
+class HTTP::CookieJar::YAMLSaver < ::HTTP::CookieJar::AbstractSaver
+ def load(io, jar); end
+ def save(io, jar); end
+
+ private
+
+ def default_options; end
+ def load_yaml(yaml); end
+end | false |
Other | Homebrew | brew | d4c15a6d9d2d0641491d652285cd1d628bc8d530.json | Version: Add parser for hyphenated filenames | Library/Homebrew/test/version_spec.rb | @@ -479,6 +479,12 @@
specify "version internal dash" do
expect(described_class.create("1.1-2"))
.to be_detected_from("https://brew.sh/foo-arse-1.1-2.tar.gz")
+ expect(described_class.create("3.3.04-1"))
+ .to be_detected_from("https://brew.sh/3.3.04-1.tar.gz")
+ expect(described_class.create("1.2-20200102"))
+ .to be_detected_from("https://brew.sh/v1.2-20200102.tar.gz")
+ expect(described_class.create("3.6.6-0.2"))
+ .to be_detected_from("https://brew.sh/v3.6.6-0.2.tar.gz")
end
specify "version single digit" do | true |
Other | Homebrew | brew | d4c15a6d9d2d0641491d652285cd1d628bc8d530.json | Version: Add parser for hyphenated filenames | Library/Homebrew/version.rb | @@ -417,6 +417,14 @@ def self._parse(spec, detected_from_url:)
# e.g. ruby-1.9.1-p243
StemParser.new(/[_-](#{NUMERIC_WITH_DOTS}-(?:p|rc|RC)?\d+)#{CONTENT_SUFFIX}?$/),
+ # Hyphenated versions without software-name prefix (e.g. brew-)
+ # e.g. v0.0.8-12.tar.gz
+ # e.g. 3.3.04-1.tar.gz
+ # e.g. v2.1-20210510.tar.gz
+ # e.g. 2020.11.11-3.tar.gz
+ # e.g. v3.6.6-0.2
+ StemParser.new(/^v?(#{NUMERIC_WITH_DOTS}(?:-#{NUMERIC_WITH_OPTIONAL_DOTS})+)/),
+
# URL with no extension
# e.g. https://waf.io/waf-1.8.12
# e.g. https://codeload.github.com/gsamokovarov/jump/tar.gz/v0.7.1 | true |
Other | Homebrew | brew | affa5c9e449266edb7539dd6b846818c435febd3.json | Exclude version audit on CI | .github/workflows/tests.yml | @@ -78,7 +78,7 @@ jobs:
run: brew style --display-cop-names homebrew/core
- name: Run brew audit --skip-style on all taps
- run: brew audit --skip-style --display-failures-only
+ run: brew audit --skip-style --except=version --display-failures-only
- name: Set up all Homebrew taps
run: |
@@ -112,7 +112,7 @@ jobs:
HOMEBREW_SIMULATE_MACOS_ON_LINUX: 1
- name: Run brew audit --skip-style on homebrew-core
- run: brew audit --skip-style --tap=homebrew/core
+ run: brew audit --skip-style --except=version --tap=homebrew/core
env:
HOMEBREW_SIMULATE_MACOS_ON_LINUX: 1
| false |
Other | Homebrew | brew | b75af5e0dbda7131b365559f929b87b2ac5527dd.json | Update RBI files for rubocop. | Library/Homebrew/sorbet/rbi/gems/rubocop@1.17.0.rbi | @@ -2332,6 +2332,7 @@ RuboCop::Cop::Layout::DefEndAlignment::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Layout::DotPosition < ::RuboCop::Cop::Base
include ::RuboCop::Cop::ConfigurableEnforcedStyle
+ include ::RuboCop::Cop::RangeHelp
extend ::RuboCop::Cop::AutoCorrector
def on_csend(node); end
@@ -2409,8 +2410,8 @@ class RuboCop::Cop::Layout::EmptyLineAfterGuardClause < ::RuboCop::Cop::Base
def correct_style?(node); end
def heredoc?(node); end
def heredoc_line(node, heredoc_node); end
- def last_argument_is_heredoc?(node); end
def last_heredoc_argument(node); end
+ def last_heredoc_argument_node(node); end
def next_line_empty?(line); end
def next_line_empty_or_enable_directive_comment?(line); end
def next_line_enable_directive_comment?(line); end
@@ -3085,6 +3086,7 @@ class RuboCop::Cop::Layout::IndentationWidth < ::RuboCop::Cop::Base
def access_modifier?(param0 = T.unsafe(nil)); end
def on_block(node); end
def on_case(case_node); end
+ def on_case_match(case_match); end
def on_class(node); end
def on_csend(node); end
def on_def(node); end
@@ -3424,21 +3426,22 @@ end
RuboCop::Cop::Layout::ParameterAlignment::ALIGN_PARAMS_MSG = T.let(T.unsafe(nil), String)
RuboCop::Cop::Layout::ParameterAlignment::FIXED_INDENT_MSG = T.let(T.unsafe(nil), String)
-class RuboCop::Cop::Layout::RedundantLineBreak < ::RuboCop::Cop::Cop
+class RuboCop::Cop::Layout::RedundantLineBreak < ::RuboCop::Cop::Base
include ::RuboCop::Cop::CheckAssignment
+ extend ::RuboCop::Cop::AutoCorrector
- def autocorrect(node); end
- def check_assignment(node, _rhs); end
def on_send(node); end
private
+ def check_assignment(node, _rhs); end
def comment_within?(node); end
def configured_to_not_be_inspected?(node); end
def convertible_block?(node); end
def max_line_length; end
def offense?(node); end
def other_cop_takes_precedence?(node); end
+ def register_offense(node); end
def single_line_block_chain_enabled?; end
def suitable_as_single_line?(node); end
def to_single_line(source); end
@@ -3606,6 +3609,8 @@ class RuboCop::Cop::Layout::SpaceAroundKeyword < ::RuboCop::Cop::Base
def on_if_guard(node); end
def on_in_pattern(node); end
def on_kwbegin(node); end
+ def on_match_pattern(node); end
+ def on_match_pattern_p(node); end
def on_next(node); end
def on_or(node); end
def on_postexe(node); end
@@ -3686,6 +3691,7 @@ class RuboCop::Cop::Layout::SpaceAroundOperators < ::RuboCop::Cop::Base
def on_ivasgn(node); end
def on_lvasgn(node); end
def on_masgn(node); end
+ def on_match_pattern(node); end
def on_op_asgn(node); end
def on_or(node); end
def on_or_asgn(node); end
@@ -4812,6 +4818,7 @@ class RuboCop::Cop::Lint::LiteralAsCondition < ::RuboCop::Cop::Base
def message(node); end
def on_case(case_node); end
+ def on_case_match(case_match_node); end
def on_if(node); end
def on_send(node); end
def on_until(node); end
@@ -4880,7 +4887,10 @@ class RuboCop::Cop::Lint::MissingCopEnableDirective < ::RuboCop::Cop::Base
private
- def message(max_range:, cop:); end
+ def department_enabled?(cop, comment); end
+ def each_missing_enable; end
+ def max_range; end
+ def message(cop, comment, type = T.unsafe(nil)); end
end
RuboCop::Cop::Lint::MissingCopEnableDirective::MSG = T.let(T.unsafe(nil), String)
@@ -5183,28 +5193,40 @@ class RuboCop::Cop::Lint::RedundantCopDisableDirective < ::RuboCop::Cop::Base
private
+ def add_department_marker(department); end
def add_offense_for_entire_comment(comment, cops); end
def add_offense_for_some_cops(comment, cops); end
def add_offenses(redundant_cops); end
def all_cop_names; end
def all_disabled?(comment); end
def comment_range_with_surrounding_space(directive_comment_range, line_comment_range); end
+ def cop_disabled_line_ranges; end
def cop_range(comment, cop); end
+ def department_disabled?(cop, comment); end
+ def department_marker?(department); end
def describe(cop); end
def directive_count(comment); end
def directive_range_in_list(range, ranges); end
- def each_already_disabled(line_ranges, disabled_ranges); end
- def each_line_range(line_ranges, disabled_ranges, offenses, cop); end
- def each_redundant_disable(cop_disabled_line_ranges, offenses, &block); end
+ def disabled_ranges; end
+ def each_already_disabled(cop, line_ranges); end
+ def each_line_range(cop, line_ranges); end
+ def each_redundant_disable(&block); end
def ends_its_line?(range); end
- def find_redundant(comment, offenses, cop, line_range, next_line_range); end
- def ignore_offense?(disabled_ranges, line_range); end
+ def find_redundant_all(range, next_range); end
+ def find_redundant_cop(cop, range); end
+ def find_redundant_department(cop, range); end
+ def followed_ranges?(range, next_range); end
+ def ignore_offense?(line_range); end
def matching_range(haystack, needle); end
+ def message(cop_names); end
def previous_line_blank?(range); end
+ def range_with_offense?(range, offenses = T.unsafe(nil)); end
+ def remove_department_marker(department); end
def trailing_range?(ranges, range); end
end
RuboCop::Cop::Lint::RedundantCopDisableDirective::COP_NAME = T.let(T.unsafe(nil), String)
+RuboCop::Cop::Lint::RedundantCopDisableDirective::DEPARTMENT_MARKER = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Lint::RedundantCopEnableDirective < ::RuboCop::Cop::Base
include ::RuboCop::Cop::RangeHelp
@@ -5218,6 +5240,7 @@ class RuboCop::Cop::Lint::RedundantCopEnableDirective < ::RuboCop::Cop::Base
def all_or_name(name); end
def comment_start(comment); end
def cop_name_indention(comment, name); end
+ def department?(directive, name); end
def range_of_offense(comment, name); end
def range_to_remove(begin_pos, end_pos, comment); end
def range_with_comma(comment, name); end
@@ -8724,6 +8747,7 @@ class RuboCop::Cop::Style::IdenticalConditionalBranches < ::RuboCop::Cop::Base
extend ::RuboCop::Cop::AutoCorrector
def on_case(node); end
+ def on_case_match(node); end
def on_if(node); end
private
@@ -10565,6 +10589,7 @@ class RuboCop::Cop::Style::RegexpLiteral < ::RuboCop::Cop::Base
def inner_slash_for(opening_delimiter); end
def inner_slash_indices(node); end
def node_body(node, include_begin_nodes: T.unsafe(nil)); end
+ def omit_parentheses_style?(node); end
def preferred_delimiters; end
def slash_literal?(node); end
end
@@ -12130,26 +12155,36 @@ end
RuboCop::Cop::VisibilityHelp::VISIBILITY_SCOPES = T.let(T.unsafe(nil), Array)
class RuboCop::DirectiveComment
- def initialize(comment); end
+ def initialize(comment, cop_registry = T.unsafe(nil)); end
def all_cops?; end
def comment; end
def cop_names; end
+ def cop_registry; end
def cops; end
+ def department_names; end
+ def directive_count; end
def disabled?; end
+ def disabled_all?; end
def enabled?; end
def enabled_all?; end
+ def in_directive_department?(cop); end
def line_number; end
def match?(cop_names); end
def match_captures; end
def mode; end
+ def overridden_by_department?(cop); end
def range; end
def single_line?; end
private
def all_cop_names; end
+ def cop_names_for_department(department); end
+ def department?(name); end
+ def exclude_redundant_directive_cop(cops); end
def parsed_cop_names; end
+ def splitted_cops_string; end
class << self
def before_comment(line); end
@@ -12160,7 +12195,8 @@ RuboCop::DirectiveComment::COPS_PATTERN = T.let(T.unsafe(nil), String)
RuboCop::DirectiveComment::COP_NAMES_PATTERN = T.let(T.unsafe(nil), String)
RuboCop::DirectiveComment::COP_NAME_PATTERN = T.let(T.unsafe(nil), String)
RuboCop::DirectiveComment::DIRECTIVE_COMMENT_REGEXP = T.let(T.unsafe(nil), Regexp)
-RuboCop::DirectiveComment::REDUNDANT_COP = T.let(T.unsafe(nil), String)
+RuboCop::DirectiveComment::REDUNDANT_DIRECTIVE_COP = T.let(T.unsafe(nil), String)
+RuboCop::DirectiveComment::REDUNDANT_DIRECTIVE_COP_DEPARTMENT = T.let(T.unsafe(nil), String)
class RuboCop::Error < ::StandardError; end
class RuboCop::ErrorWithAnalyzedFileLocation < ::RuboCop::Error
@@ -12781,6 +12817,7 @@ class RuboCop::RemoteConfig
def cache_path; end
def cache_path_exists?; end
def cache_path_expired?; end
+ def cloned_url; end
def generate_request(uri); end
def handle_response(response, limit, &block); end
def request(uri = T.unsafe(nil), limit = T.unsafe(nil), &block); end | false |
Other | Homebrew | brew | 13e1457249ce68a158eae72300a3de4f7361c148.json | Consolidate shared install and upgrade logic | Library/Homebrew/install.rb | @@ -5,6 +5,7 @@
require "fileutils"
require "hardware"
require "development_tools"
+require "upgrade"
module Homebrew
# Helper module for performing (pre-)install checks.
@@ -249,20 +250,6 @@ def install_formula(
f.print_tap_action
build_options = f.build
- if !Homebrew::EnvConfig.no_install_upgrade? && f.outdated? && !f.head?
- outdated_formulae = [f, *f.old_installed_formulae]
- version_upgrade = "#{f.linked_version} -> #{f.pkg_version}"
-
- oh1 <<~EOS
- #{f.name} #{f.linked_version} is installed but outdated
- Upgrading #{Formatter.identifier(f.name)} #{version_upgrade}
- EOS
- outdated_kegs = outdated_formulae.map(&:linked_keg)
- .select(&:directory?)
- .map { |k| Keg.new(k.resolved_path) }
- linked_kegs = outdated_kegs.select(&:linked?)
- end
-
fi = FormulaInstaller.new(
f,
options: build_options.used_options,
@@ -282,10 +269,17 @@ def install_formula(
quiet: quiet,
verbose: verbose,
)
+
+ if !Homebrew::EnvConfig.no_install_upgrade? && f.outdated? && !f.head?
+ kegs = Upgrade.outdated_kegs(f)
+ linked_kegs = kegs.select(&:linked?)
+ Upgrade.print_upgrade_message(f, fi.options)
+ end
+
fi.prelude
fi.fetch
- outdated_kegs.each(&:unlink) if outdated_kegs.present?
+ kegs.each(&:unlink) if kegs.present?
fi.install
fi.finish | true |
Other | Homebrew | brew | 13e1457249ce68a158eae72300a3de4f7361c148.json | Consolidate shared install and upgrade logic | Library/Homebrew/upgrade.rb | @@ -64,6 +64,24 @@ def upgrade_formulae(
end
end
+ def outdated_kegs(formula)
+ [formula, *formula.old_installed_formulae].map(&:linked_keg)
+ .select(&:directory?)
+ .map { |k| Keg.new(k.resolved_path) }
+ end
+
+ def print_upgrade_message(formula, fi_options)
+ version_upgrade = if formula.optlinked?
+ "#{Keg.new(formula.opt_prefix).version} -> #{formula.pkg_version}"
+ else
+ "-> #{formula.pkg_version}"
+ end
+ oh1 <<~EOS
+ Upgrading #{Formatter.identifier(formula.full_specified_name)}
+ #{version_upgrade} #{fi_options.to_a.join(" ")}
+ EOS
+ end
+
def upgrade_formula(
formula,
flags:,
@@ -83,11 +101,8 @@ def upgrade_formula(
keg_was_linked = keg.linked?
end
- formulae_maybe_with_kegs = [formula] + formula.old_installed_formulae
- outdated_kegs = formulae_maybe_with_kegs.map(&:linked_keg)
- .select(&:directory?)
- .map { |k| Keg.new(k.resolved_path) }
- linked_kegs = outdated_kegs.select(&:linked?)
+ kegs = outdated_kegs(formula)
+ linked_kegs = kegs.select(&:linked?)
if formula.opt_prefix.directory?
keg = Keg.new(formula.opt_prefix.resolved_path)
@@ -118,21 +133,15 @@ def upgrade_formula(
}.compact,
)
- upgrade_version = if formula.optlinked?
- "#{Keg.new(formula.opt_prefix).version} -> #{formula.pkg_version}"
- else
- "-> #{formula.pkg_version}"
- end
- oh1 "Upgrading #{Formatter.identifier(formula.full_specified_name)} " \
- "#{upgrade_version} #{fi.options.to_a.join(" ")}"
+ print_upgrade_message(formula, fi.options)
fi.prelude
fi.fetch
# first we unlink the currently active keg for this formula otherwise it is
# possible for the existing build to interfere with the build we are about to
# do! Seriously, it happens!
- outdated_kegs.each(&:unlink)
+ kegs.each(&:unlink)
fi.install
fi.finish | true |
Other | Homebrew | brew | 2395113154ebd8c68b155635cfaa80033ed1dafa.json | diagnostic: hide some warnings on Apple Silicon.
We don't want to complain about either Intel or ARM installations of
Homebrew in `brew doctor` so check for/allow both. | Library/Homebrew/diagnostic.rb | @@ -487,7 +487,16 @@ def check_for_config_scripts
#{HOMEBREW_PREFIX}/bin #{HOMEBREW_PREFIX}/sbin
/Applications/Server.app/Contents/ServerRoot/usr/bin
/Applications/Server.app/Contents/ServerRoot/usr/sbin
- ].map(&:downcase)
+ ]
+ if OS.mac? && Hardware::CPU.physical_cpu_arm64?
+ allowlist += %W[
+ #{HOMEBREW_MACOS_ARM_DEFAULT_PREFIX}/bin
+ #{HOMEBREW_MACOS_ARM_DEFAULT_PREFIX}/sbin
+ #{HOMEBREW_DEFAULT_PREFIX}/bin
+ #{HOMEBREW_DEFAULT_PREFIX}/sbin
+ ]
+ end
+ allowlist.map!(&:downcase)
paths.each do |p|
next if allowlist.include?(p.downcase) || !File.directory?(p) | true |
Other | Homebrew | brew | 2395113154ebd8c68b155635cfaa80033ed1dafa.json | diagnostic: hide some warnings on Apple Silicon.
We don't want to complain about either Intel or ARM installations of
Homebrew in `brew doctor` so check for/allow both. | Library/Homebrew/extend/os/mac/diagnostic.rb | @@ -316,10 +316,18 @@ def check_for_gettext
end
if gettext&.linked_keg&.directory?
- homebrew_owned = @found.all? do |path|
- Pathname.new(path).realpath.to_s.start_with? "#{HOMEBREW_CELLAR}/gettext"
+ allowlist = ["#{HOMEBREW_CELLAR}/gettext"]
+ if Hardware::CPU.physical_cpu_arm64?
+ allowlist += %W[
+ #{HOMEBREW_MACOS_ARM_DEFAULT_PREFIX}/Cellar/gettext
+ #{HOMEBREW_DEFAULT_PREFIX}/Cellar/gettext
+ ]
+ end
+
+ return if @found.all? do |path|
+ realpath = Pathname.new(path).realpath.to_s
+ allowlist.any? { |rack| realpath.start_with?(rack) }
end
- return if homebrew_owned
end
inject_file_list @found, <<~EOS | true |
Other | Homebrew | brew | b9d64fed4de6500e376e58a36596f9dffb22224b.json | formula_installer: restrict use of Formula from Keg | Library/Homebrew/formula_installer.rb | @@ -1076,10 +1076,30 @@ def post_install
#{HOMEBREW_LIBRARY_PATH}/postinstall.rb
]
- args << if formula.local_bottle_path.present?
- formula.prefix/".brew/#{formula.name}.rb"
- else
- formula.path
+ keg_formula_path = formula.opt_prefix/".brew/#{formula.name}.rb"
+ tap_formula_path = formula.path
+
+ # Use the formula from the keg if:
+ # * Installing from a local bottle, or
+ # * The formula doesn't exist in the tap (or the tap isn't installed), or
+ # * The formula in the tap has a different pkg_version.
+ # In all other cases, including if the formula from the keg is unreadable
+ # (third-party taps may `require` some of their own libraries), use the
+ # formula from the tap.
+ args << begin
+ keg_formula = Formulary.factory(keg_formula_path)
+ tap_formula = Formulary.factory(tap_formula_path) if tap_formula_path.exist?
+ other_version_installed = (keg_formula.pkg_version != tap_formula&.pkg_version)
+
+ if formula.local_bottle_path.present? ||
+ !tap_formula_path.exist? ||
+ other_version_installed
+ keg_formula_path
+ else
+ tap_formula_path
+ end
+ rescue FormulaUnreadableError
+ tap_formula_path
end
Utils.safe_fork do | false |
Other | Homebrew | brew | f0601e91bc6bbd9abbc5cf76acfd6685aabc5239.json | Change outdated message | Library/Homebrew/install.rb | @@ -254,7 +254,7 @@ def install_formula(
version_upgrade = "#{f.linked_version} -> #{f.pkg_version}"
oh1 <<~EOS
- #{f.name} #{f.linked_version} is installed and outdated
+ #{f.name} #{f.linked_version} is installed but outdated
Upgrading #{Formatter.identifier(f.name)} #{version_upgrade}
EOS
outdated_kegs = outdated_formulae.map(&:linked_keg).select(&:directory?).map { |k| Keg.new(k.resolved_path) } | false |
Other | Homebrew | brew | 48641f3a3a0423004a7e6f8bae931e752b534f28.json | Fix method typo | Library/Homebrew/install.rb | @@ -258,7 +258,7 @@ def install_formula(
Upgrading #{Formatted.identifier(f.name)} #{version_upgrade}
EOS
outdated_kegs = outdated_formulae.map(&:linked_keg).select(&:directory?).map { |k| Keg.new(k.resolved_path) }
- linked_kegs = outdated_kegs.select(&:linked)
+ linked_kegs = outdated_kegs.select(&:linked?)
end
fi = FormulaInstaller.new( | false |
Other | Homebrew | brew | a998c364f4394b30ca45f7e100c51652d26389d6.json | Reduce potential modifications to frozen string | Library/Homebrew/requirement.rb | @@ -142,8 +142,8 @@ def mktemp(&block)
def infer_name
klass = self.class.name || self.class.to_s
- klass.sub!(/(Dependency|Requirement)$/, "")
- klass.sub!(/^(\w+::)*/, "")
+ klass = klass.sub(/(Dependency|Requirement)$/, "")
+ klass = klass.sub(/^(\w+::)*/, "")
return klass.downcase if klass.present?
return @cask if @cask.present? | false |
Other | Homebrew | brew | a4e6edea5bbf33df0874b7d5f26e4e3213cad5c5.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 | @@ -6991,11 +6991,6 @@ class Enumerator::Generator
def initialize(*_); end
end
-module EnvVar
- extend ::T::Private::Methods::MethodHooks
- extend ::T::Private::Methods::SingletonMethodHooks
-end
-
class Errno::EAUTH
Errno = ::T.let(nil, ::T.untyped)
end
@@ -8392,11 +8387,6 @@ class Homebrew::Service
extend ::T::Private::Methods::SingletonMethodHooks
end
-module Homebrew::Settings
- extend ::T::Private::Methods::MethodHooks
- extend ::T::Private::Methods::SingletonMethodHooks
-end
-
class Homebrew::Style::LineLocation
extend ::T::Private::Methods::MethodHooks
extend ::T::Private::Methods::SingletonMethodHooks
@@ -12636,8 +12626,8 @@ end
class Object
include ::Minitest::Expectations
include ::ActiveSupport::Tryable
- include ::SystemCommand::Mixin
include ::Utils::Curl
+ include ::SystemCommand::Mixin
include ::ActiveSupport::Dependencies::Loadable
include ::ActiveSupport::ForkTracker::CoreExtPrivate
include ::ActiveSupport::ForkTracker::CoreExt | false |
Other | Homebrew | brew | 1ee0c1987eb5b94c117a05fc928193d2c74804e5.json | Skip unlinking if `HOMEBREW_NO_INSTALL_UPGRADE` | Library/Homebrew/cmd/install.rb | @@ -396,7 +396,7 @@ def install_formula(f, args:)
f.print_tap_action
build_options = f.build
- if f.outdated? && !f.head?
+ if !Homebrew::EnvConfig.no_install_upgrade? && f.outdated? && !f.head?
formulae = [f] + f.old_installed_formulae
version_upgrade = "#{f.linked_version} -> #{f.pkg_version}"
| false |
Other | Homebrew | brew | a0dfe4aa180f602af0c4b5ed6d9c0ffd315dbc6d.json | formula_installer: use formula from Keg for local bottle installs
Use the formula file from the Keg if `local_bottle_install` is set,
which means that the formula file from the tap is used for `-s`,
`--HEAD` and normal installs but the formula file present within
formula.prefix/".brew" is used for local bottle installs. | Library/Homebrew/formula_installer.rb | @@ -1074,9 +1074,14 @@ def post_install
-I #{$LOAD_PATH.join(File::PATH_SEPARATOR)}
--
#{HOMEBREW_LIBRARY_PATH}/postinstall.rb
- #{formula.path}
]
+ args << if formula.local_bottle_path.present?
+ formula.prefix/".brew/#{formula.name}.rb"
+ else
+ formula.path
+ end
+
Utils.safe_fork do
if Sandbox.available?
sandbox = Sandbox.new | false |
Other | Homebrew | brew | 0735eba995a1b35d14fbba8f41553d96b2fa14f7.json | formula_installer: improve support for local bottle installs | Library/Homebrew/formula_installer.rb | @@ -404,7 +404,7 @@ def install
options = display_options(formula).join(" ")
oh1 "Installing #{Formatter.identifier(formula.full_name)} #{options}".strip if show_header?
- unless formula.tap&.private?
+ if formula.tap&.installed? && !formula.tap&.private?
action = "#{formula.full_name} #{options}".strip
Utils::Analytics.report_event("install", action)
@@ -1163,7 +1163,7 @@ def pour
tab.source["versions"]["stable"] = formula.stable.version.to_s
tab.source["versions"]["version_scheme"] = formula.version_scheme
tab.source["path"] = formula.specified_path.to_s
- tab.source["tap_git_head"] = formula.tap&.git_head
+ tab.source["tap_git_revision"] = formula.tap&.installed? ? formula.tap&.git_head : nil
tab.tap = formula.tap
tab.write
| true |
Other | Homebrew | brew | 0735eba995a1b35d14fbba8f41553d96b2fa14f7.json | formula_installer: improve support for local bottle installs | Library/Homebrew/tab.rb | @@ -39,11 +39,11 @@ def self.create(formula, compiler, stdlib)
"runtime_dependencies" => Tab.runtime_deps_hash(formula, runtime_deps),
"arch" => Hardware::CPU.arch,
"source" => {
- "path" => formula.specified_path.to_s,
- "tap" => formula.tap&.name,
- "tap_git_head" => formula.tap&.git_head,
- "spec" => formula.active_spec_sym.to_s,
- "versions" => {
+ "path" => formula.specified_path.to_s,
+ "tap" => formula.tap&.name,
+ "tap_git_revision" => formula.tap&.git_head,
+ "spec" => formula.active_spec_sym.to_s,
+ "versions" => {
"stable" => formula.stable&.version.to_s,
"head" => formula.head&.version.to_s,
"version_scheme" => formula.version_scheme,
@@ -194,11 +194,11 @@ def self.empty
"runtime_dependencies" => nil,
"arch" => nil,
"source" => {
- "path" => nil,
- "tap" => nil,
- "tap_git_head" => nil,
- "spec" => "stable",
- "versions" => {
+ "path" => nil,
+ "tap" => nil,
+ "tap_git_revision" => nil,
+ "spec" => "stable",
+ "versions" => {
"stable" => nil,
"head" => nil,
"version_scheme" => 0, | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.