From 5d0cc6b6e8548fd0c1ed208425a8a5036972ba6c Mon Sep 17 00:00:00 2001 From: Bart de Water <118401830+bdewater-thatch@users.noreply.github.com> Date: Thu, 30 May 2024 15:22:44 -0400 Subject: [PATCH 1/2] Change protected visibility to private Not needed, and not recommended per https://docs.ruby-lang.org/en/3.3/Module.html#method-i-protected --- README.md | 4 ++-- lib/sorbet_operation/base.rb | 4 ++-- test/sorbet_operation/base_test.rb | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 277f3a5..71c39f1 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ class CreateUser < SorbetOperation::Base @user_params = user_params end - protected + private sig { returns(ValueType) } def execute @@ -71,7 +71,7 @@ An operation is a Ruby class that derives from `SorbetOperation::Base`. `SorbetO 1. define the return type using the `ValueType` generic type member 2. define an `#execute` method that returns a `ValueType` -The `#execute` method should be `protected` or `private`, since it is not meant to be invoked directly; rather, operation callers should use the `#perform` public method to actually perform the operation. (Unfortunately, at this time there is no mechanism to enforce that `#execute` is not a public method on child classes, so it's up to the programmer to be vigilant.) +The `#execute` method should be `private`, since it is not meant to be invoked directly; rather, operation callers should use the `#perform` public method to actually perform the operation. (Unfortunately, at this time there is no mechanism to enforce that `#execute` is not a public method on child classes, so it's up to the programmer to be vigilant.) The `#execute` method does not take any arguments. Most operations require one or more input values. Input values should be passed to the `#initialize` constructor method and stored as instance variables, which can then be accessed from the `#execute` body. diff --git a/lib/sorbet_operation/base.rb b/lib/sorbet_operation/base.rb index c7ff67e..afc48f8 100644 --- a/lib/sorbet_operation/base.rb +++ b/lib/sorbet_operation/base.rb @@ -57,7 +57,7 @@ def perform sig { params(logger: ::Logger).void } attr_writer :logger - protected + private # Implement this method in subclasses to perform the operation. # @@ -70,7 +70,7 @@ def perform # exception. The exception will not be caught and will be propagated to # the caller. # - # This method should be declared as `protected` in subclasses to prevent + # This method should be declared as `private` in subclasses to prevent # callers from calling it directly. Callers should instead call {#perform} # to perform the operation and get the result. sig { abstract.returns(ValueType) } diff --git a/test/sorbet_operation/base_test.rb b/test/sorbet_operation/base_test.rb index 2a26e49..e5d3352 100644 --- a/test/sorbet_operation/base_test.rb +++ b/test/sorbet_operation/base_test.rb @@ -19,7 +19,7 @@ def initialize(dividend, divisor) @divisor = divisor end - protected + private sig { override.returns(Float) } def execute From e6ae0dfa28bf3420d0b6ccbb719f36f00d75d8d9 Mon Sep 17 00:00:00 2001 From: Bart de Water <118401830+bdewater-thatch@users.noreply.github.com> Date: Thu, 30 May 2024 15:28:28 -0400 Subject: [PATCH 2/2] Update dependencies to fix CI --- .ruby-version | 2 +- Gemfile.lock | 8 +- .../gems/{rexml@3.2.6.rbi => rexml@3.2.8.rbi} | 230 +++++++++--------- sorbet/rbi/gems/strscan@3.1.0.rbi | 8 + .../gems/{yard@0.9.34.rbi => yard@0.9.36.rbi} | 127 +++++----- 5 files changed, 201 insertions(+), 174 deletions(-) rename sorbet/rbi/gems/{rexml@3.2.6.rbi => rexml@3.2.8.rbi} (96%) create mode 100644 sorbet/rbi/gems/strscan@3.1.0.rbi rename sorbet/rbi/gems/{yard@0.9.34.rbi => yard@0.9.36.rbi} (99%) diff --git a/.ruby-version b/.ruby-version index 818bd47..bea438e 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.0.6 +3.3.1 diff --git a/Gemfile.lock b/Gemfile.lock index 19ac10e..b448c4d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -48,7 +48,8 @@ GEM regexp_parser (2.9.0) reline (0.4.2) io-console (~> 0.5) - rexml (3.2.6) + rexml (3.2.8) + strscan (>= 3.0.9) rubocop (1.60.2) json (~> 2.3) language_server-protocol (>= 3.17.0) @@ -95,6 +96,7 @@ GEM syntax_tree (>= 6.1.1) thor (>= 0.19.2) stringio (3.1.0) + strscan (3.1.0) syntax_tree (6.2.0) prettier_print (>= 1.2.0) tapioca (0.12.0) @@ -108,7 +110,7 @@ GEM yard-sorbet thor (1.3.0) unicode-display_width (2.5.0) - yard (0.9.34) + yard (0.9.36) yard-sorbet (0.8.1) sorbet-runtime (>= 0.5) yard (>= 0.9) @@ -139,4 +141,4 @@ DEPENDENCIES yard-sorbet BUNDLED WITH - 2.5.5 + 2.5.9 diff --git a/sorbet/rbi/gems/rexml@3.2.6.rbi b/sorbet/rbi/gems/rexml@3.2.8.rbi similarity index 96% rename from sorbet/rbi/gems/rexml@3.2.6.rbi rename to sorbet/rbi/gems/rexml@3.2.8.rbi index 189adf0..d536b53 100644 --- a/sorbet/rbi/gems/rexml@3.2.6.rbi +++ b/sorbet/rbi/gems/rexml@3.2.8.rbi @@ -1,4 +1,4 @@ -# typed: true +# typed: false # DO NOT EDIT MANUALLY # This is an autogenerated file for types exported from the `rexml` gem. @@ -946,7 +946,7 @@ end # and in particular, the # {tasks page for documents}[../doc/rexml/tasks/tocs/document_toc_rdoc.html]. # -# source://rexml//lib/rexml/document.rb#39 +# source://rexml//lib/rexml/document.rb#35 class REXML::Document < ::REXML::Element # :call-seq: # new(string = nil, context = {}) -> new_document @@ -3453,47 +3453,48 @@ end # A Source that wraps an IO. See the Source class for method # documentation # -# source://rexml//lib/rexml/source.rb#160 +# source://rexml//lib/rexml/source.rb#140 class REXML::IOSource < ::REXML::Source # block_size has been deprecated # # @return [IOSource] a new instance of IOSource # - # source://rexml//lib/rexml/source.rb#163 + # source://rexml//lib/rexml/source.rb#144 def initialize(arg, block_size = T.unsafe(nil), encoding = T.unsafe(nil)); end - # source://rexml//lib/rexml/source.rb#215 - def consume(pattern); end - # @return the current line in the source # - # source://rexml//lib/rexml/source.rb#244 + # source://rexml//lib/rexml/source.rb#217 def current_line; end # @return [Boolean] # - # source://rexml//lib/rexml/source.rb#235 + # source://rexml//lib/rexml/source.rb#212 def empty?; end - # source://rexml//lib/rexml/source.rb#219 - def match(pattern, cons = T.unsafe(nil)); end + # source://rexml//lib/rexml/source.rb#189 + def ensure_buffer; end - # source://rexml//lib/rexml/source.rb#239 - def position; end + # Note: When specifying a string for 'pattern', it must not include '>' except in the following formats: + # - ">" + # - "XXX>" (X is any string excluding '>') + # + # source://rexml//lib/rexml/source.rb#196 + def match(pattern, cons = T.unsafe(nil)); end - # source://rexml//lib/rexml/source.rb#207 - def read; end + # source://rexml//lib/rexml/source.rb#165 + def read(term = T.unsafe(nil)); end - # source://rexml//lib/rexml/source.rb#184 - def scan(pattern, cons = T.unsafe(nil)); end + # source://rexml//lib/rexml/source.rb#175 + def read_until(term); end private - # source://rexml//lib/rexml/source.rb#286 + # source://rexml//lib/rexml/source.rb#259 def encoding_updated; end - # source://rexml//lib/rexml/source.rb#266 - def readline; end + # source://rexml//lib/rexml/source.rb#239 + def readline(term = T.unsafe(nil)); end end # Represents an XML Instruction; IE, @@ -3816,7 +3817,7 @@ class REXML::ParseException < ::RuntimeError # source://rexml//lib/rexml/parseexception.rb#6 def initialize(message, source = T.unsafe(nil), parser = T.unsafe(nil), exception = T.unsafe(nil)); end - # source://rexml//lib/rexml/parseexception.rb#48 + # source://rexml//lib/rexml/parseexception.rb#49 def context; end # Returns the value of attribute continued_exception. @@ -3831,7 +3832,7 @@ class REXML::ParseException < ::RuntimeError # source://rexml//lib/rexml/parseexception.rb#4 def continued_exception=(_arg0); end - # source://rexml//lib/rexml/parseexception.rb#43 + # source://rexml//lib/rexml/parseexception.rb#44 def line; end # Returns the value of attribute parser. @@ -3846,7 +3847,7 @@ class REXML::ParseException < ::RuntimeError # source://rexml//lib/rexml/parseexception.rb#4 def parser=(_arg0); end - # source://rexml//lib/rexml/parseexception.rb#38 + # source://rexml//lib/rexml/parseexception.rb#39 def position; end # Returns the value of attribute source. @@ -3887,34 +3888,36 @@ end # # source://rexml//lib/rexml/parsers/baseparser.rb#29 class REXML::Parsers::BaseParser + include ::REXML::Parsers::BaseParser::Private + # @return [BaseParser] a new instance of BaseParser # - # source://rexml//lib/rexml/parsers/baseparser.rb#115 + # source://rexml//lib/rexml/parsers/baseparser.rb#128 def initialize(source); end - # source://rexml//lib/rexml/parsers/baseparser.rb#120 + # source://rexml//lib/rexml/parsers/baseparser.rb#133 def add_listener(listener); end # Returns true if there are no more events # # @return [Boolean] # - # source://rexml//lib/rexml/parsers/baseparser.rb#146 + # source://rexml//lib/rexml/parsers/baseparser.rb#159 def empty?; end - # source://rexml//lib/rexml/parsers/baseparser.rb#438 + # source://rexml//lib/rexml/parsers/baseparser.rb#446 def entity(reference, entities); end # Returns true if there are more events. Synonymous with !empty? # # @return [Boolean] # - # source://rexml//lib/rexml/parsers/baseparser.rb#151 + # source://rexml//lib/rexml/parsers/baseparser.rb#164 def has_next?; end # Escapes all possible entities # - # source://rexml//lib/rexml/parsers/baseparser.rb#449 + # source://rexml//lib/rexml/parsers/baseparser.rb#457 def normalize(input, entities = T.unsafe(nil), entity_filter = T.unsafe(nil)); end # Peek at the +depth+ event in the stack. The first element on the stack @@ -3924,59 +3927,59 @@ class REXML::Parsers::BaseParser # event, so you can effectively pre-parse the entire document (pull the # entire thing into memory) using this method. # - # source://rexml//lib/rexml/parsers/baseparser.rb#167 + # source://rexml//lib/rexml/parsers/baseparser.rb#180 def peek(depth = T.unsafe(nil)); end - # source://rexml//lib/rexml/parsers/baseparser.rb#136 + # source://rexml//lib/rexml/parsers/baseparser.rb#149 def position; end # Returns the next event. This is a +PullEvent+ object. # - # source://rexml//lib/rexml/parsers/baseparser.rb#182 + # source://rexml//lib/rexml/parsers/baseparser.rb#195 def pull; end # Returns the value of attribute source. # - # source://rexml//lib/rexml/parsers/baseparser.rb#124 + # source://rexml//lib/rexml/parsers/baseparser.rb#137 def source; end - # source://rexml//lib/rexml/parsers/baseparser.rb#126 + # source://rexml//lib/rexml/parsers/baseparser.rb#139 def stream=(source); end # Unescapes all possible entities # - # source://rexml//lib/rexml/parsers/baseparser.rb#465 + # source://rexml//lib/rexml/parsers/baseparser.rb#473 def unnormalize(string, entities = T.unsafe(nil), filter = T.unsafe(nil)); end # Push an event back on the head of the stream. This method # has (theoretically) infinite depth. # - # source://rexml//lib/rexml/parsers/baseparser.rb#157 + # source://rexml//lib/rexml/parsers/baseparser.rb#170 def unshift(token); end private # @return [Boolean] # - # source://rexml//lib/rexml/parsers/baseparser.rb#495 + # source://rexml//lib/rexml/parsers/baseparser.rb#502 def need_source_encoding_update?(xml_declaration_encoding); end - # source://rexml//lib/rexml/parsers/baseparser.rb#589 + # source://rexml//lib/rexml/parsers/baseparser.rb#613 def parse_attributes(prefixes, curr_ns); end - # source://rexml//lib/rexml/parsers/baseparser.rb#514 + # source://rexml//lib/rexml/parsers/baseparser.rb#521 def parse_id(base_error_message, accept_external_id:, accept_public_id:); end - # source://rexml//lib/rexml/parsers/baseparser.rb#542 + # source://rexml//lib/rexml/parsers/baseparser.rb#549 def parse_id_invalid_details(accept_external_id:, accept_public_id:); end - # source://rexml//lib/rexml/parsers/baseparser.rb#501 + # source://rexml//lib/rexml/parsers/baseparser.rb#508 def parse_name(base_error_message); end - # source://rexml//lib/rexml/parsers/baseparser.rb#580 - def process_instruction; end + # source://rexml//lib/rexml/parsers/baseparser.rb#587 + def process_instruction(start_position); end - # source://rexml//lib/rexml/parsers/baseparser.rb#190 + # source://rexml//lib/rexml/parsers/baseparser.rb#203 def pull_event; end end @@ -3989,6 +3992,33 @@ REXML::Parsers::BaseParser::EXTERNAL_ID_SYSTEM = T.let(T.unsafe(nil), Regexp) # source://rexml//lib/rexml/parsers/baseparser.rb#104 REXML::Parsers::BaseParser::PUBLIC_ID = T.let(T.unsafe(nil), Regexp) +# source://rexml//lib/rexml/parsers/baseparser.rb#115 +module REXML::Parsers::BaseParser::Private; end + +# source://rexml//lib/rexml/parsers/baseparser.rb#119 +REXML::Parsers::BaseParser::Private::ATTLISTDECL_END = T.let(T.unsafe(nil), Regexp) + +# source://rexml//lib/rexml/parsers/baseparser.rb#118 +REXML::Parsers::BaseParser::Private::CLOSE_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://rexml//lib/rexml/parsers/baseparser.rb#123 +REXML::Parsers::BaseParser::Private::ENTITYDECL_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://rexml//lib/rexml/parsers/baseparser.rb#121 +REXML::Parsers::BaseParser::Private::GEDECL_PATTERN = T.let(T.unsafe(nil), String) + +# source://rexml//lib/rexml/parsers/baseparser.rb#116 +REXML::Parsers::BaseParser::Private::INSTRUCTION_END = T.let(T.unsafe(nil), Regexp) + +# source://rexml//lib/rexml/parsers/baseparser.rb#120 +REXML::Parsers::BaseParser::Private::NAME_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://rexml//lib/rexml/parsers/baseparser.rb#122 +REXML::Parsers::BaseParser::Private::PEDECL_PATTERN = T.let(T.unsafe(nil), String) + +# source://rexml//lib/rexml/parsers/baseparser.rb#117 +REXML::Parsers::BaseParser::Private::TAG_PATTERN = T.let(T.unsafe(nil), Regexp) + # source://rexml//lib/rexml/parsers/baseparser.rb#38 REXML::Parsers::BaseParser::QNAME = T.let(T.unsafe(nil), Regexp) @@ -4198,85 +4228,67 @@ class REXML::Source # @param encoding if non-null, sets the encoding of the source to this # @return [Source] a new instance of Source # - # source://rexml//lib/rexml/source.rb#43 + # source://rexml//lib/rexml/source.rb#41 def initialize(arg, encoding = T.unsafe(nil)); end # The current buffer (what we're going to read next) # - # source://rexml//lib/rexml/source.rb#34 + # source://rexml//lib/rexml/source.rb#53 def buffer; end - # source://rexml//lib/rexml/source.rb#87 - def consume(pattern); end + # source://rexml//lib/rexml/source.rb#57 + def buffer_encoding=(encoding); end # @return the current line in the source # - # source://rexml//lib/rexml/source.rb#117 + # source://rexml//lib/rexml/source.rb#100 def current_line; end # @return [Boolean] true if the Source is exhausted # - # source://rexml//lib/rexml/source.rb#108 + # source://rexml//lib/rexml/source.rb#95 def empty?; end # Returns the value of attribute encoding. # - # source://rexml//lib/rexml/source.rb#37 + # source://rexml//lib/rexml/source.rb#35 def encoding; end # Inherited from Encoding # Overridden to support optimized en/decoding # - # source://rexml//lib/rexml/source.rb#56 + # source://rexml//lib/rexml/source.rb#63 def encoding=(enc); end + # source://rexml//lib/rexml/source.rb#75 + def ensure_buffer; end + # The line number of the last consumed text # - # source://rexml//lib/rexml/source.rb#36 + # source://rexml//lib/rexml/source.rb#34 def line; end - # source://rexml//lib/rexml/source.rb#101 + # source://rexml//lib/rexml/source.rb#78 def match(pattern, cons = T.unsafe(nil)); end - # source://rexml//lib/rexml/source.rb#91 - def match_to(char, pattern); end + # source://rexml//lib/rexml/source.rb#86 + def position; end - # source://rexml//lib/rexml/source.rb#95 - def match_to_consume(char, pattern); end + # source://rexml//lib/rexml/source.rb#90 + def position=(pos); end - # source://rexml//lib/rexml/source.rb#112 - def position; end + # source://rexml//lib/rexml/source.rb#68 + def read(term = T.unsafe(nil)); end - # source://rexml//lib/rexml/source.rb#84 - def read; end - - # Scans the source for a given pattern. Note, that this is not your - # usual scan() method. For one thing, the pattern argument has some - # requirements; for another, the source can be consumed. You can easily - # confuse this method. Originally, the patterns were easier - # to construct and this method more robust, because this method - # generated search regexps on the fly; however, this was - # computationally expensive and slowed down the entire REXML package - # considerably, since this is by far the most commonly called method. - # /^\s*(#{your pattern, with no groups})(.*)/. The first group - # will be returned; the second group is used if the consume flag is - # set. - # everything after it in the Source. - # pattern is not found. - # - # @param pattern must be a Regexp, and must be in the form of - # @param consume if true, the pattern returned will be consumed, leaving - # @return the pattern, if found, or nil if the Source is empty or the - # - # source://rexml//lib/rexml/source.rb#77 - def scan(pattern, cons = T.unsafe(nil)); end + # source://rexml//lib/rexml/source.rb#71 + def read_until(term); end private - # source://rexml//lib/rexml/source.rb#125 + # source://rexml//lib/rexml/source.rb#109 def detect_encoding; end - # source://rexml//lib/rexml/source.rb#146 + # source://rexml//lib/rexml/source.rb#127 def encoding_updated; end end @@ -4607,24 +4619,24 @@ end # @private # -# source://rexml//lib/rexml/xpath_parser.rb#959 +# source://rexml//lib/rexml/xpath_parser.rb#963 class REXML::XPathNode # @return [XPathNode] a new instance of XPathNode # - # source://rexml//lib/rexml/xpath_parser.rb#961 + # source://rexml//lib/rexml/xpath_parser.rb#965 def initialize(node, context = T.unsafe(nil)); end # Returns the value of attribute context. # - # source://rexml//lib/rexml/xpath_parser.rb#960 + # source://rexml//lib/rexml/xpath_parser.rb#964 def context; end - # source://rexml//lib/rexml/xpath_parser.rb#970 + # source://rexml//lib/rexml/xpath_parser.rb#974 def position; end # Returns the value of attribute raw_node. # - # source://rexml//lib/rexml/xpath_parser.rb#960 + # source://rexml//lib/rexml/xpath_parser.rb#964 def raw_node; end end @@ -4673,25 +4685,25 @@ class REXML::XPathParser private - # source://rexml//lib/rexml/xpath_parser.rb#775 + # source://rexml//lib/rexml/xpath_parser.rb#779 def child(nodeset); end - # source://rexml//lib/rexml/xpath_parser.rb#916 + # source://rexml//lib/rexml/xpath_parser.rb#920 def compare(a, operator, b); end - # source://rexml//lib/rexml/xpath_parser.rb#678 + # source://rexml//lib/rexml/xpath_parser.rb#682 def descendant(nodeset, include_self); end - # source://rexml//lib/rexml/xpath_parser.rb#689 + # source://rexml//lib/rexml/xpath_parser.rb#693 def descendant_recursive(raw_node, new_nodeset, new_nodes, include_self); end - # source://rexml//lib/rexml/xpath_parser.rb#938 + # source://rexml//lib/rexml/xpath_parser.rb#942 def each_unnode(nodeset); end - # source://rexml//lib/rexml/xpath_parser.rb#637 + # source://rexml//lib/rexml/xpath_parser.rb#641 def enter(tag, *args); end - # source://rexml//lib/rexml/xpath_parser.rb#815 + # source://rexml//lib/rexml/xpath_parser.rb#819 def equality_relational_compare(set1, op, set2); end # source://rexml//lib/rexml/xpath_parser.rb#591 @@ -4706,10 +4718,10 @@ class REXML::XPathParser # source://rexml//lib/rexml/xpath_parser.rb#582 def filter_nodeset(nodeset); end - # source://rexml//lib/rexml/xpath_parser.rb#745 + # source://rexml//lib/rexml/xpath_parser.rb#749 def following(node); end - # source://rexml//lib/rexml/xpath_parser.rb#756 + # source://rexml//lib/rexml/xpath_parser.rb#760 def following_node_of(node); end # Returns a String namespace for a node, given a prefix @@ -4721,19 +4733,19 @@ class REXML::XPathParser # source://rexml//lib/rexml/xpath_parser.rb#163 def get_namespace(node, prefix); end - # source://rexml//lib/rexml/xpath_parser.rb#642 + # source://rexml//lib/rexml/xpath_parser.rb#646 def leave(tag, *args); end - # source://rexml//lib/rexml/xpath_parser.rb#763 + # source://rexml//lib/rexml/xpath_parser.rb#767 def next_sibling_node(node); end # source://rexml//lib/rexml/xpath_parser.rb#477 def node_test(path_stack, nodesets, any_type: T.unsafe(nil)); end - # source://rexml//lib/rexml/xpath_parser.rb#802 + # source://rexml//lib/rexml/xpath_parser.rb#806 def norm(b); end - # source://rexml//lib/rexml/xpath_parser.rb#890 + # source://rexml//lib/rexml/xpath_parser.rb#894 def normalize_compare_values(a, operator, b); end # Builds a nodeset of all of the preceding nodes of the supplied node, @@ -4741,10 +4753,10 @@ class REXML::XPathParser # preceding:: includes every element in the document that precedes this node, # except for ancestors # - # source://rexml//lib/rexml/xpath_parser.rb#708 + # source://rexml//lib/rexml/xpath_parser.rb#712 def preceding(node); end - # source://rexml//lib/rexml/xpath_parser.rb#730 + # source://rexml//lib/rexml/xpath_parser.rb#734 def preceding_node_of(node); end # Reorders an array of nodes so that they are in document order @@ -4756,7 +4768,7 @@ class REXML::XPathParser # I wouldn't have to do this. Maybe add a document IDX for each node? # Problems with mutable documents. Or, rewrite everything. # - # source://rexml//lib/rexml/xpath_parser.rb#655 + # source://rexml//lib/rexml/xpath_parser.rb#659 def sort(array_of_nodes, order); end # source://rexml//lib/rexml/xpath_parser.rb#441 @@ -4767,13 +4779,13 @@ class REXML::XPathParser # source://rexml//lib/rexml/xpath_parser.rb#154 def strict?; end - # source://rexml//lib/rexml/xpath_parser.rb#630 + # source://rexml//lib/rexml/xpath_parser.rb#634 def trace(*args); end - # source://rexml//lib/rexml/xpath_parser.rb#950 + # source://rexml//lib/rexml/xpath_parser.rb#954 def unnode(nodeset); end - # source://rexml//lib/rexml/xpath_parser.rb#877 + # source://rexml//lib/rexml/xpath_parser.rb#881 def value_type(value); end end diff --git a/sorbet/rbi/gems/strscan@3.1.0.rbi b/sorbet/rbi/gems/strscan@3.1.0.rbi new file mode 100644 index 0000000..e74659c --- /dev/null +++ b/sorbet/rbi/gems/strscan@3.1.0.rbi @@ -0,0 +1,8 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `strscan` gem. +# Please instead update this file by running `bin/tapioca gem strscan`. + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/yard@0.9.34.rbi b/sorbet/rbi/gems/yard@0.9.36.rbi similarity index 99% rename from sorbet/rbi/gems/yard@0.9.34.rbi rename to sorbet/rbi/gems/yard@0.9.36.rbi index bda0973..ad5cb43 100644 --- a/sorbet/rbi/gems/yard@0.9.34.rbi +++ b/sorbet/rbi/gems/yard@0.9.36.rbi @@ -503,7 +503,7 @@ end # A subclass of Hash where all keys are converted into Symbols, and # optionally, all String values are converted into Symbols. # -# source://yard//lib/yard/core_ext/symbol_hash.rb#8 +# source://yard//lib/yard/core_ext/symbol_hash.rb#4 class SymbolHash < ::Hash # Creates a new SymbolHash object # @@ -808,7 +808,7 @@ end # # @since 0.6.2 # -# source://yard//lib/yard/cli/config.rb#7 +# source://yard//lib/yard/cli/config.rb#6 class YARD::CLI::Config < ::YARD::CLI::Command # @return [Config] a new instance of Config # @since 0.6.2 @@ -1129,7 +1129,7 @@ end # @see Graph#run # @since 0.6.0 # -# source://yard//lib/yard/cli/graph.rb#27 +# source://yard//lib/yard/cli/graph.rb#24 class YARD::CLI::Graph < ::YARD::CLI::YardoptsCommand # Creates a new instance of the command-line utility # @@ -1189,7 +1189,7 @@ end # Options to pass to the {Graph} CLI. # -# source://yard//lib/yard/cli/graph.rb#6 +# source://yard//lib/yard/cli/graph.rb#5 class YARD::CLI::GraphOptions < ::YARD::Templates::TemplateOptions # @return [String] any contents to pass to the digraph # @@ -1329,7 +1329,7 @@ end # # @since 0.6.0 # -# source://yard//lib/yard/cli/server.rb#8 +# source://yard//lib/yard/cli/server.rb#7 class YARD::CLI::Server < ::YARD::CLI::Command # Creates a new instance of the Server command line utility # @@ -1632,7 +1632,7 @@ YARD::CLI::Stats::STATS_ORDER = T.let(T.unsafe(nil), Array) # A tool to view documentation in the console like `ri` # -# source://yard//lib/yard/cli/yri.rb#9 +# source://yard//lib/yard/cli/yri.rb#7 class YARD::CLI::YRI < ::YARD::CLI::Command # @return [YRI] a new instance of YRI # @@ -1762,7 +1762,7 @@ YARD::CLI::YRI::DEFAULT_SEARCH_PATHS = T.let(T.unsafe(nil), Array) # source://yard//lib/yard/cli/yri.rb#15 YARD::CLI::YRI::SEARCH_PATHS_FILE = T.let(T.unsafe(nil), String) -# source://yard//lib/yard/cli/yardoc.rb#147 +# source://yard//lib/yard/cli/yardoc.rb#145 class YARD::CLI::Yardoc < ::YARD::CLI::YardoptsCommand # Creates a new instance of the commandline utility # @@ -2135,7 +2135,7 @@ end # Default options used in +yard doc+ command. # -# source://yard//lib/yard/cli/yardoc.rb#10 +# source://yard//lib/yard/cli/yardoc.rb#8 class YARD::CLI::YardocOptions < ::YARD::Templates::TemplateOptions # @return [CodeObjects::ExtraFileObject] the file object being rendered. # The +object+ key is not used so that a file may be rendered in the context @@ -2263,7 +2263,7 @@ end # @abstract # @since 0.8.3 # -# source://yard//lib/yard/cli/yardopts_command.rb#11 +# source://yard//lib/yard/cli/yardopts_command.rb#10 class YARD::CLI::YardoptsCommand < ::YARD::CLI::Command # Creates a new command that reads .yardopts # @@ -2480,7 +2480,7 @@ class YARD::CodeObjects::Base # the paths are equal # @return [Boolean] whether or not the objects are considered the same # - # source://yard//lib/yard/code_objects/base.rb#322 + # source://yard//lib/yard/code_objects/base.rb#323 def ==(other); end # Accesses a custom attribute on the object @@ -2489,7 +2489,7 @@ class YARD::CodeObjects::Base # @return [Object, nil] the custom attribute or nil if not found. # @see #[]= # - # source://yard//lib/yard/code_objects/base.rb#342 + # source://yard//lib/yard/code_objects/base.rb#343 def [](key); end # Sets a custom attribute on the object @@ -2499,7 +2499,7 @@ class YARD::CodeObjects::Base # @return [void] # @see #[] # - # source://yard//lib/yard/code_objects/base.rb#355 + # source://yard//lib/yard/code_objects/base.rb#356 def []=(key, value); end # Associates a file with a code object, optionally adding the line where it was defined. @@ -2520,7 +2520,7 @@ class YARD::CodeObjects::Base # @see Docstring#add_tag # @since 0.8.4 # - # source://yard//lib/yard/code_objects/base.rb#560 + # source://yard//lib/yard/code_objects/base.rb#561 def add_tag(*tags); end # The non-localized documentation string associated with the object @@ -2547,7 +2547,7 @@ class YARD::CodeObjects::Base # the locale of the documentation string. # @return [Docstring] the documentation string # - # source://yard//lib/yard/code_objects/base.rb#404 + # source://yard//lib/yard/code_objects/base.rb#405 def docstring(locale = T.unsafe(nil)); end # Attaches a docstring to a code object by parsing the comments attached to the statement @@ -2556,7 +2556,7 @@ class YARD::CodeObjects::Base # @param comments [String, Array, Docstring] the comments attached to the code object to be parsed # into a docstring and meta tags. # - # source://yard//lib/yard/code_objects/base.rb#426 + # source://yard//lib/yard/code_objects/base.rb#427 def docstring=(comments); end # Marks whether or not the method is conditionally defined at runtime @@ -2587,7 +2587,7 @@ class YARD::CodeObjects::Base # the paths are equal # @return [Boolean] whether or not the objects are considered the same # - # source://yard//lib/yard/code_objects/base.rb#322 + # source://yard//lib/yard/code_objects/base.rb#323 def eql?(other); end # Tests if another object is equal to this, including a proxy @@ -2596,15 +2596,16 @@ class YARD::CodeObjects::Base # the paths are equal # @return [Boolean] whether or not the objects are considered the same # - # source://yard//lib/yard/code_objects/base.rb#322 + # source://yard//lib/yard/code_objects/base.rb#323 def equal?(other); end # Returns the filename the object was first parsed at, taking # definitions with docstrings first. # # @return [String] a filename + # @return [nil] if there is no file associated with the object # - # source://yard//lib/yard/code_objects/base.rb#306 + # source://yard//lib/yard/code_objects/base.rb#307 def file; end # The files the object was defined in. To add a file, use {#add_file}. @@ -2629,7 +2630,7 @@ class YARD::CodeObjects::Base # @return [String] the rendered template # @see Templates::Engine#render # - # source://yard//lib/yard/code_objects/base.rb#504 + # source://yard//lib/yard/code_objects/base.rb#505 def format(options = T.unsafe(nil)); end # @return [String] the group this object is associated with @@ -2649,19 +2650,19 @@ class YARD::CodeObjects::Base # @return [Boolean] # @see Docstring#has_tag? # - # source://yard//lib/yard/code_objects/base.rb#555 + # source://yard//lib/yard/code_objects/base.rb#556 def has_tag?(name); end # @return [Integer] the object's hash value (for equality checking) # - # source://yard//lib/yard/code_objects/base.rb#333 + # source://yard//lib/yard/code_objects/base.rb#334 def hash; end # Inspects the object, returning the type and path # # @return [String] a string describing the object # - # source://yard//lib/yard/code_objects/base.rb#512 + # source://yard//lib/yard/code_objects/base.rb#513 def inspect; end # Returns the line the object was first parsed at (or nil) @@ -2669,13 +2670,13 @@ class YARD::CodeObjects::Base # @return [Fixnum] the line where the object was first defined. # @return [nil] if there is no line associated with the object # - # source://yard//lib/yard/code_objects/base.rb#314 + # source://yard//lib/yard/code_objects/base.rb#315 def line; end # @overload dynamic_attr_name # @overload dynamic_attr_name= # - # source://yard//lib/yard/code_objects/base.rb#372 + # source://yard//lib/yard/code_objects/base.rb#373 def method_missing(meth, *args, &block); end # The name of the object @@ -2703,7 +2704,7 @@ class YARD::CodeObjects::Base # for {Registry.root}). If obj is nil, the object is unregistered # from the Registry. # - # source://yard//lib/yard/code_objects/base.rb#521 + # source://yard//lib/yard/code_objects/base.rb#522 def namespace=(obj); end # The namespace the object is defined in. If the object is in the @@ -2720,7 +2721,7 @@ class YARD::CodeObjects::Base # for {Registry.root}). If obj is nil, the object is unregistered # from the Registry. # - # source://yard//lib/yard/code_objects/base.rb#521 + # source://yard//lib/yard/code_objects/base.rb#522 def parent=(obj); end # Represents the unique path of the object. The default implementation @@ -2733,19 +2734,19 @@ class YARD::CodeObjects::Base # @return [String] the unique path of the object # @see #sep # - # source://yard//lib/yard/code_objects/base.rb#452 + # source://yard//lib/yard/code_objects/base.rb#453 def path; end # @param other [Base, String] another code object (or object path) # @return [String] the shortest relative path from this object to +other+ # @since 0.5.3 # - # source://yard//lib/yard/code_objects/base.rb#474 + # source://yard//lib/yard/code_objects/base.rb#475 def relative_path(other); end # @return [Boolean] whether or not this object is a RootObject # - # source://yard//lib/yard/code_objects/base.rb#566 + # source://yard//lib/yard/code_objects/base.rb#567 def root?; end # Override this method with a custom component separator. For instance, @@ -2756,7 +2757,7 @@ class YARD::CodeObjects::Base # @return [String] the component that separates the namespace path # and the name (default is {NSEP}) # - # source://yard//lib/yard/code_objects/base.rb#575 + # source://yard//lib/yard/code_objects/base.rb#576 def sep; end # The one line signature representing an object. For a method, this will @@ -2789,7 +2790,7 @@ class YARD::CodeObjects::Base # @param statement [#source, String] the +Parser::Statement+ holding the source code or the raw source # as a +String+ for the definition of the code object only (not the block) # - # source://yard//lib/yard/code_objects/base.rb#387 + # source://yard//lib/yard/code_objects/base.rb#388 def source=(statement); end # Language of the source code associated with the object. Defaults to @@ -2812,14 +2813,14 @@ class YARD::CodeObjects::Base # # @see Docstring#tag # - # source://yard//lib/yard/code_objects/base.rb#547 + # source://yard//lib/yard/code_objects/base.rb#548 def tag(name); end # Gets a list of tags from the {#docstring} # # @see Docstring#tags # - # source://yard//lib/yard/code_objects/base.rb#551 + # source://yard//lib/yard/code_objects/base.rb#552 def tags(name = T.unsafe(nil)); end # @note Override this method if your object has a special title that does @@ -2828,12 +2829,12 @@ class YARD::CodeObjects::Base # @return [String] the display title for an object # @see 0.8.4 # - # source://yard//lib/yard/code_objects/base.rb#467 + # source://yard//lib/yard/code_objects/base.rb#468 def title; end # @return [nil] this object does not turn into an array # - # source://yard//lib/yard/code_objects/base.rb#336 + # source://yard//lib/yard/code_objects/base.rb#337 def to_ary; end # Represents the unique path of the object. The default implementation @@ -2846,7 +2847,7 @@ class YARD::CodeObjects::Base # @return [String] the unique path of the object # @see #sep # - # source://yard//lib/yard/code_objects/base.rb#452 + # source://yard//lib/yard/code_objects/base.rb#453 def to_s; end # Default type is the lowercase class name without the "Object" suffix. @@ -2854,7 +2855,7 @@ class YARD::CodeObjects::Base # # @return [Symbol] the type of code object this represents # - # source://yard//lib/yard/code_objects/base.rb#436 + # source://yard//lib/yard/code_objects/base.rb#437 def type; end # @return [Symbol] the visibility of an object (:public, :private, :protected) @@ -2877,7 +2878,7 @@ class YARD::CodeObjects::Base # @see #copy_to # @since 0.8.0 # - # source://yard//lib/yard/code_objects/base.rb#586 + # source://yard//lib/yard/code_objects/base.rb#587 def copyable_attributes; end private @@ -2887,10 +2888,10 @@ class YARD::CodeObjects::Base # @param source [String] the source code to format # @return [String] formatted source # - # source://yard//lib/yard/code_objects/base.rb#598 + # source://yard//lib/yard/code_objects/base.rb#599 def format_source(source); end - # source://yard//lib/yard/code_objects/base.rb#605 + # source://yard//lib/yard/code_objects/base.rb#606 def translate_docstring(locale); end class << self @@ -2937,7 +2938,7 @@ YARD::CodeObjects::CSEPQ = T.let(T.unsafe(nil), String) # A ClassObject represents a Ruby class in source code. It is a {ModuleObject} # with extra inheritance semantics through the superclass. # -# source://yard//lib/yard/code_objects/class_object.rb#9 +# source://yard//lib/yard/code_objects/class_object.rb#7 class YARD::CodeObjects::ClassObject < ::YARD::CodeObjects::NamespaceObject # Creates a new class object in +namespace+ with +name+ # @@ -3018,7 +3019,7 @@ end # Represents a class variable inside a namespace. The path is expressed # in the form "A::B::@@classvariable" # -# source://yard//lib/yard/code_objects/class_variable_object.rb#8 +# source://yard//lib/yard/code_objects/class_variable_object.rb#7 class YARD::CodeObjects::ClassVariableObject < ::YARD::CodeObjects::Base # @return [String] the class variable's value # @@ -3034,7 +3035,7 @@ end # A list of code objects. This array acts like a set (no unique items) # but also disallows any {Proxy} objects from being added. # -# source://yard//lib/yard/code_objects/base.rb#10 +# source://yard//lib/yard/code_objects/base.rb#6 class YARD::CodeObjects::CodeObjectList < ::Array # Creates a new object list associated with a namespace # @@ -3064,7 +3065,7 @@ end # A +ConstantObject+ represents a Ruby constant (not a module or class). # To access the constant's (source code) value, use {#value}. # -# source://yard//lib/yard/code_objects/constant_object.rb#9 +# source://yard//lib/yard/code_objects/constant_object.rb#7 class YARD::CodeObjects::ConstantObject < ::YARD::CodeObjects::Base # The source code representing the constant's value # @@ -3431,7 +3432,7 @@ YARD::CodeObjects::MacroObject::MACRO_MATCH = T.let(T.unsafe(nil), Regexp) # Represents a Ruby method in source # -# source://yard//lib/yard/code_objects/method_object.rb#10 +# source://yard//lib/yard/code_objects/method_object.rb#7 class YARD::CodeObjects::MethodObject < ::YARD::CodeObjects::Base # Creates a new method object in +namespace+ with +name+ and an instance # or class +scope+ @@ -3604,7 +3605,7 @@ end # Represents a Ruby module. # -# source://yard//lib/yard/code_objects/module_object.rb#11 +# source://yard//lib/yard/code_objects/module_object.rb#6 class YARD::CodeObjects::ModuleObject < ::YARD::CodeObjects::NamespaceObject # Returns the inheritance tree of mixins. # @@ -3769,7 +3770,7 @@ end # The two main Ruby objects that can act as namespaces are modules # ({ModuleObject}) and classes ({ClassObject}). # -# source://yard//lib/yard/code_objects/namespace_object.rb#11 +# source://yard//lib/yard/code_objects/namespace_object.rb#9 class YARD::CodeObjects::NamespaceObject < ::YARD::CodeObjects::Base # Creates a new namespace object inside +namespace+ with +name+. # @@ -5915,7 +5916,7 @@ class YARD::Handlers::HandlerAborted < ::RuntimeError; end # an operation on an object's namespace but the namespace could # not be resolved. # -# source://yard//lib/yard/handlers/base.rb#15 +# source://yard//lib/yard/handlers/base.rb#13 class YARD::Handlers::NamespaceMissingError < ::YARD::Parser::UndocumentableError # @return [NamespaceMissingError] a new instance of NamespaceMissingError # @@ -6503,7 +6504,7 @@ class YARD::Handlers::Ruby::Legacy::AttributeHandler < ::YARD::Handlers::Ruby::L # # @abstract See {Handlers::Base} for subclassing information. # -# source://yard//lib/yard/handlers/ruby/legacy/base.rb#10 +# source://yard//lib/yard/handlers/ruby/legacy/base.rb#9 class YARD::Handlers::Ruby::Legacy::Base < ::YARD::Handlers::Base include ::YARD::Parser::Ruby::Legacy::RubyToken @@ -7459,7 +7460,7 @@ end # Handles console logging for info, warnings and errors. # Uses the stdlib Logger class in Ruby for all the backend logic. # -# source://yard//lib/yard/logging.rb#12 +# source://yard//lib/yard/logging.rb#9 class YARD::Logger < ::Logger # Creates a new logger # @@ -7635,7 +7636,7 @@ class YARD::Logger < ::Logger # source://yard//lib/yard/logging.rb#201 def format_log(sev, _time, _prog, msg); end - # source://logger/1.4.3/logger.rb#485 + # source://logger/1.6.0/logger.rb#684 def print_no_newline(msg); end class << self @@ -9972,7 +9973,7 @@ end # source://yard//lib/yard/parser/ruby/ast_node.rb#479 class YARD::Parser::Ruby::MethodDefinitionNode < ::YARD::Parser::Ruby::AstNode - def block(*_arg0); end + def block(n = T.unsafe(nil)); end # @return [Boolean] # @@ -11033,10 +11034,10 @@ class YARD::Parser::SourceParser # @since 0.5.6 # - # source://yard//lib/yard/parser/source_parser.rb#516 + # source://yard//lib/yard/parser/source_parser.rb#515 def parser_class; end - # source://yard//lib/yard/parser/source_parser.rb#501 + # source://yard//lib/yard/parser/source_parser.rb#500 def parser_type=(value); end # Guesses the parser type to use depending on the file extension. @@ -11044,14 +11045,14 @@ class YARD::Parser::SourceParser # @param filename [String] the filename to use to guess the parser type # @return [Symbol] a parser type that matches the filename # - # source://yard//lib/yard/parser/source_parser.rb#509 + # source://yard//lib/yard/parser/source_parser.rb#508 def parser_type_for_filename(filename); end # Runs a {Handlers::Processor} object to post process the parsed statements. # # @return [void] # - # source://yard//lib/yard/parser/source_parser.rb#491 + # source://yard//lib/yard/parser/source_parser.rb#490 def post_process; end class << self @@ -11360,7 +11361,7 @@ module YARD::Rake; end # The rake task to run {CLI::Yardoc} and generate documentation. # -# source://yard//lib/yard/rake/yardoc_task.rb#10 +# source://yard//lib/yard/rake/yardoc_task.rb#8 class YARD::Rake::YardocTask < ::Rake::TaskLib # Creates a new task with name +name+. # @@ -12298,7 +12299,7 @@ end # Implements a serializer that reads from and writes to the filesystem. # -# source://yard//lib/yard/serializers/file_system_serializer.rb#7 +# source://yard//lib/yard/serializers/file_system_serializer.rb#5 class YARD::Serializers::FileSystemSerializer < ::YARD::Serializers::Base # Creates a new FileSystemSerializer with options # @@ -12386,7 +12387,7 @@ end # serializer = ProcessSerializer.new('less') # serializer.serialize(object, "data!") # -# source://yard//lib/yard/serializers/process_serializer.rb#12 +# source://yard//lib/yard/serializers/process_serializer.rb#9 class YARD::Serializers::ProcessSerializer < ::YARD::Serializers::Base # Creates a new ProcessSerializer for the shell command +cmd+ # @@ -12405,7 +12406,7 @@ end # A serializer that writes data to standard output. # -# source://yard//lib/yard/serializers/stdout_serializer.rb#9 +# source://yard//lib/yard/serializers/stdout_serializer.rb#5 class YARD::Serializers::StdoutSerializer < ::YARD::Serializers::Base # Creates a serializer to print text to stdout # @@ -16166,6 +16167,10 @@ class YARD::Tags::TypesExplainer # # source://yard//lib/yard/tags/types_explainer.rb#17 def explain!(*types); end + + private + + def new(*_arg0); end end end @@ -17861,7 +17866,7 @@ end # # @see CLI::YardocOptions # -# source://yard//lib/yard/templates/template_options.rb#11 +# source://yard//lib/yard/templates/template_options.rb#10 class YARD::Templates::TemplateOptions < ::YARD::Options # @return [OpenStruct] an open struct containing any global state across all # generated objects in a template.