diff --git a/Gemfile.lock b/Gemfile.lock index a71e5ac0..ce27d563 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -56,14 +56,14 @@ GEM rubocop-sorbet (0.7.6) rubocop (>= 0.90.0) ruby-progressbar (1.13.0) - sorbet (0.5.11188) - sorbet-static (= 0.5.11188) - sorbet-runtime (0.5.11188) - sorbet-static (0.5.11188-universal-darwin) - sorbet-static (0.5.11188-x86_64-linux) - sorbet-static-and-runtime (0.5.11188) - sorbet (= 0.5.11188) - sorbet-runtime (= 0.5.11188) + sorbet (0.5.11221) + sorbet-static (= 0.5.11221) + sorbet-runtime (0.5.11221) + sorbet-static (0.5.11221-universal-darwin) + sorbet-static (0.5.11221-x86_64-linux) + sorbet-static-and-runtime (0.5.11221) + sorbet (= 0.5.11221) + sorbet-runtime (= 0.5.11221) spoom (1.2.4) erubi (>= 1.10.0) sorbet-static-and-runtime (>= 0.5.10187) @@ -71,7 +71,7 @@ GEM thor (>= 0.19.2) syntax_tree (6.2.0) prettier_print (>= 1.2.0) - tapioca (0.11.15) + tapioca (0.12.0) bundler (>= 2.2.25) netrc (>= 0.11.0) parallel (>= 1.21.0) diff --git a/gem/Gemfile b/gem/Gemfile index a9d956cf..634f881e 100644 --- a/gem/Gemfile +++ b/gem/Gemfile @@ -7,6 +7,6 @@ gemspec group(:development, :test) do gem("minitest") gem("minitest-reporters") - gem("rake", "~> 13.0") + gem("rake", "~> 13.1") gem("debug") end diff --git a/gem/Gemfile.lock b/gem/Gemfile.lock index 1609a42e..a8f499c1 100644 --- a/gem/Gemfile.lock +++ b/gem/Gemfile.lock @@ -20,17 +20,19 @@ GEM ansi (1.5.0) ast (2.4.2) builder (3.2.4) - debug (1.7.1) - irb (>= 1.5.0) - reline (>= 0.3.1) + debug (1.9.1) + irb (~> 1.10) + reline (>= 0.3.8) erubi (1.12.0) - io-console (0.6.0) - irb (1.6.2) - reline (>= 0.3.0) - json (2.6.2) + io-console (0.7.2) + irb (1.11.1) + rdoc + reline (>= 0.4.2) + json (2.7.1) json-schema (4.1.1) addressable (>= 2.8) - minitest (5.16.2) + language_server-protocol (3.17.0.3) + minitest (5.21.2) minitest-reporters (1.6.1) ansi builder @@ -38,55 +40,61 @@ GEM ruby-progressbar netrc (0.11.0) parallel (1.24.0) - parser (3.2.2.4) + parser (3.3.0.5) ast (~> 2.4.1) racc prettier_print (1.2.1) prism (0.19.0) + psych (5.1.2) + stringio public_suffix (5.0.4) racc (1.7.3) rainbow (3.1.1) - rake (13.0.6) + rake (13.1.0) rbi (0.1.6) prism (>= 0.18.0, < 0.20) sorbet-runtime (>= 0.5.9204) - regexp_parser (2.5.0) - reline (0.3.2) + rdoc (6.6.2) + psych (>= 4.0.0) + regexp_parser (2.9.0) + reline (0.4.2) io-console (~> 0.5) - rexml (3.2.5) - rubocop (1.32.0) + rexml (3.2.6) + rubocop (1.60.2) json (~> 2.3) + language_server-protocol (>= 3.17.0) parallel (~> 1.10) - parser (>= 3.1.0.0) + parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.19.1, < 2.0) + rubocop-ast (>= 1.30.0, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 1.4.0, < 3.0) - rubocop-ast (1.19.1) - parser (>= 3.1.1.0) - rubocop-shopify (2.8.0) - rubocop (~> 1.31) - rubocop-sorbet (0.6.11) + unicode-display_width (>= 2.4.0, < 3.0) + rubocop-ast (1.30.0) + parser (>= 3.2.1.0) + rubocop-shopify (2.14.0) + rubocop (~> 1.51) + rubocop-sorbet (0.7.6) rubocop (>= 0.90.0) ruby-progressbar (1.13.0) - sorbet (0.5.11188) - sorbet-static (= 0.5.11188) - sorbet-runtime (0.5.11188) - sorbet-static (0.5.11188-universal-darwin) - sorbet-static (0.5.11188-x86_64-linux) - sorbet-static-and-runtime (0.5.11188) - sorbet (= 0.5.11188) - sorbet-runtime (= 0.5.11188) + sorbet (0.5.11219) + sorbet-static (= 0.5.11219) + sorbet-runtime (0.5.11219) + sorbet-static (0.5.11219-universal-darwin) + sorbet-static (0.5.11219-x86_64-linux) + sorbet-static-and-runtime (0.5.11219) + sorbet (= 0.5.11219) + sorbet-runtime (= 0.5.11219) spoom (1.2.4) erubi (>= 1.10.0) sorbet-static-and-runtime (>= 0.5.10187) syntax_tree (>= 6.1.1) thor (>= 0.19.2) + stringio (3.1.0) syntax_tree (6.2.0) prettier_print (>= 1.2.0) - tapioca (0.11.15) + tapioca (0.12.0) bundler (>= 2.2.25) netrc (>= 0.11.0) parallel (>= 1.21.0) @@ -96,7 +104,7 @@ GEM thor (>= 1.2.0) yard-sorbet thor (1.3.0) - unicode-display_width (2.2.0) + unicode-display_width (2.5.0) yard (0.9.34) yard-sorbet (0.8.1) sorbet-runtime (>= 0.5) @@ -111,7 +119,7 @@ DEPENDENCIES debug minitest minitest-reporters - rake (~> 13.0) + rake (~> 13.1) rbi-central! BUNDLED WITH diff --git a/gem/exe/repo b/gem/exe/repo index fe4387db..451ca5d3 100755 --- a/gem/exe/repo +++ b/gem/exe/repo @@ -41,7 +41,7 @@ module RBICentral LOG end - unless checks.any? + unless checks.any? # rubocop:disable Style/InvertibleUnlessCondition log("No change detected. Run with `--all` to run all checks.") return end @@ -168,14 +168,16 @@ module RBICentral end class Main < Thor - extend T::Sig - desc "check", "Check repo validity" subcommand "check", RBICentral::CLI::Check - sig { returns(T::Boolean) } - def self.exit_on_failure? - true + class << self + extend T::Sig + + sig { returns(T::Boolean) } + def exit_on_failure? + true + end end end end diff --git a/gem/lib/rbi-central.rb b/gem/lib/rbi-central.rb index 64ed9877..1c3edf00 100644 --- a/gem/lib/rbi-central.rb +++ b/gem/lib/rbi-central.rb @@ -17,41 +17,44 @@ module RBICentral INDEX_PATH = "index.json" ANNOTATIONS_PATH = "rbi/annotations" - INDEX_SCHEMA = T.let({ - "type": "object", - "patternProperties": { - "^.*$": { - "type": "object", - "properties": { - "dependencies": { - "description": "List of other gems that need to be installed to test the RBI contents", - "type": "array", - "items": { + INDEX_SCHEMA = T.let( + { + "type": "object", + "patternProperties": { + "^.*$": { + "type": "object", + "properties": { + "dependencies": { + "description": "List of other gems that need to be installed to test the RBI contents", + "type": "array", + "items": { + "type": "string", + "uniqueItems": true, + }, + }, + "requires": { + "description": "List of files to require to test the RBI contents", + "type": "array", + "items": { + "type": "string", + "uniqueItems": true, + }, + }, + "path": { + "description": "(Optional) Path where this gem can be installed from", "type": "string", - "uniqueItems": true, }, - }, - "requires": { - "description": "List of files to require to test the RBI contents", - "type": "array", - "items": { + "source": { + "description": "(Optional) Source where this gem can be installed from", "type": "string", - "uniqueItems": true, }, }, - "path": { - "description": "(Optional) Path where this gem can be installed from", - "type": "string", - }, - "source": { - "description": "(Optional) Source where this gem can be installed from", - "type": "string", - }, + "additionalProperties": false, }, - "additionalProperties": false, }, }, - }, T::Hash[String, T.untyped]) + T::Hash[String, T.untyped], + ) RUBOCOP_CONFIG = <<~YML inherit_gem: @@ -76,11 +79,15 @@ module RBICentral class Error < StandardError; end - sig { params(string: String).returns(String) } - def self.filter_parser_warning(string) - string - .gsub(/warning:.*\n/, "") - .gsub(/Please.*\n/, "") + class << self + extend T::Sig + + sig { params(string: String).returns(String) } + def filter_parser_warning(string) + string + .gsub(/warning:.*\n/, "") + .gsub(/Please.*\n/, "") + end end end diff --git a/gem/lib/rbi-central/cli/helper.rb b/gem/lib/rbi-central/cli/helper.rb index 72e7f1d4..603dec83 100644 --- a/gem/lib/rbi-central/cli/helper.rb +++ b/gem/lib/rbi-central/cli/helper.rb @@ -112,7 +112,7 @@ def run_check!(&block) sig do params( - block: T.proc.returns(T::Array[Error]) + block: T.proc.returns(T::Array[Error]), ).void end def check_errors!(&block) @@ -133,7 +133,7 @@ def check_errors!(&block) sig do params( names: T::Array[String], - block: T.proc.params(repo: Repo, gem: Gem).returns(T::Array[Error]) + block: T.proc.params(repo: Repo, gem: Gem).returns(T::Array[Error]), ).void end def check_gems!(names:, &block) @@ -179,16 +179,20 @@ class ChecksSelection < T::Struct prop :runtime, T::Boolean prop :static, T::Boolean - sig { params(options: T::Hash[Symbol, T.untyped]).returns(ChecksSelection) } - def self.from_options(options) - ChecksSelection.new( - gem_tests: options[:gem], - index: options[:index], - rubocop: options[:rubocop], - rubygems: options[:rubygems], - runtime: options[:runtime], - static: options[:static], - ) + class << self + extend T::Sig + + sig { params(options: T::Hash[Symbol, T.untyped]).returns(ChecksSelection) } + def from_options(options) + ChecksSelection.new( + gem_tests: options[:gem], + index: options[:index], + rubocop: options[:rubocop], + rubygems: options[:rubygems], + runtime: options[:runtime], + static: options[:static], + ) + end end sig { returns(T::Boolean) } diff --git a/gem/lib/rbi-central/gem.rb b/gem/lib/rbi-central/gem.rb index 084debe6..d0ee97b3 100644 --- a/gem/lib/rbi-central/gem.rb +++ b/gem/lib/rbi-central/gem.rb @@ -13,15 +13,18 @@ class Error < RBICentral::Error; end const :dependencies, T::Array[String], default: [] const :requires, T::Array[String], default: [] - sig { params(name: String, object: T::Hash[String, T.untyped]).returns(Gem) } - def self.from_object(name, object = {}) - Gem.new( - name: name, - path: object["path"], - source: object["source"], - dependencies: object["dependencies"] || [], - requires: object["requires"] || [] - ) + class << self + extend T::Sig + sig { params(name: String, object: T::Hash[String, T.untyped]).returns(Gem) } + def from_object(name, object = {}) + Gem.new( + name: name, + path: object["path"], + source: object["source"], + dependencies: object["dependencies"] || [], + requires: object["requires"] || [], + ) + end end sig { params(_args: T.untyped).returns(T::Hash[String, T.untyped]) } diff --git a/gem/lib/rbi-central/index.rb b/gem/lib/rbi-central/index.rb index 9713a39c..4acc1122 100644 --- a/gem/lib/rbi-central/index.rb +++ b/gem/lib/rbi-central/index.rb @@ -9,20 +9,24 @@ class Index < T::Struct class Error < RBICentral::Error; end - sig { params(object: T::Hash[String, T.untyped]).returns(Index) } - def self.from_object(object) - Index.new(gems: object.map { |name, gem_object| [name, Gem.from_object(name, gem_object)] }.to_h) - end + class << self + extend T::Sig - sig { params(before: Index, after: Index).returns(ChangeSet) } - def self.compare(before:, after:) - ChangeSet.new( - before: before, - after: after, - added: after.gems.values.select { |gem| !before.gem?(gem.name) }, - removed: before.gems.values.select { |gem| !after.gem?(gem.name) }, - updated: before.gems.values.select { |gem| after.gem?(gem.name) && after[gem.name] != gem } - ) + sig { params(object: T::Hash[String, T.untyped]).returns(Index) } + def from_object(object) + Index.new(gems: object.map { |name, gem_object| [name, Gem.from_object(name, gem_object)] }.to_h) + end + + sig { params(before: Index, after: Index).returns(ChangeSet) } + def compare(before:, after:) + ChangeSet.new( + before: before, + after: after, + added: after.gems.values.select { |gem| !before.gem?(gem.name) }, + removed: before.gems.values.select { |gem| !after.gem?(gem.name) }, + updated: before.gems.values.select { |gem| after.gem?(gem.name) && after[gem.name] != gem }, + ) + end end sig { params(name: String).returns(Gem) } diff --git a/gem/lib/rbi-central/repo.rb b/gem/lib/rbi-central/repo.rb index d7fcfe7c..8aae6782 100644 --- a/gem/lib/rbi-central/repo.rb +++ b/gem/lib/rbi-central/repo.rb @@ -19,7 +19,7 @@ class Error < RBICentral::Error; end index_schema: T::Hash[String, T.untyped], index_path: String, annotations_path: String, - bundle_config: T::Hash[String, String] + bundle_config: T::Hash[String, String], ).void end def initialize( @@ -76,11 +76,11 @@ def check_unexpected_annotations_files next unless file?(path) errors << Index::Error.new( - "Unexpected RBI annotations file `#{path}` (must be in `#{@annotations_path}` root directory)" + "Unexpected RBI annotations file `#{path}` (must be in `#{@annotations_path}` root directory)", ) unless File.dirname(path) == @annotations_path errors << Index::Error.new( - "Unexpected RBI annotations file `#{path}` (should have `.rbi` extension)" + "Unexpected RBI annotations file `#{path}` (should have `.rbi` extension)", ) unless File.extname(path) == ".rbi" end @@ -118,7 +118,7 @@ def check_missing_index_entries next if index.gems.key?(name) errors << Index::Error.new( - "Missing index entry for `#{path}` (key `#{name}` not found in `#{@index_path}`)" + "Missing index entry for `#{path}` (key `#{name}` not found in `#{@index_path}`)", ) end @@ -134,7 +134,7 @@ def check_missing_annotations_files next if file?(file) errors << Gem::Error.new( - "Missing RBI annotations file for `#{gem_name}` (file `#{file}` not found)" + "Missing RBI annotations file for `#{gem_name}` (file `#{file}` not found)", ) end @@ -221,7 +221,7 @@ def index_changed?(ref: "HEAD") sig { params(ref: String).returns(T.nilable(Index::ChangeSet)) } def index_changes(ref: "HEAD") - return nil unless index_changed?(ref: ref) + return unless index_changed?(ref: ref) Index.compare(before: load_index(ref: ref), after: load_index) end diff --git a/gem/lib/rbi-central/runtime/context.rb b/gem/lib/rbi-central/runtime/context.rb index 47728f13..df5815df 100644 --- a/gem/lib/rbi-central/runtime/context.rb +++ b/gem/lib/rbi-central/runtime/context.rb @@ -99,7 +99,7 @@ def add_extend(const_name, mixin_name, loc) method_name: String, loc: RBI::Loc, allow_missing: T::Boolean, - singleton: T::Boolean + singleton: T::Boolean, ).void end def add_method(recv_name, method_name, loc, allow_missing:, singleton: false) diff --git a/gem/sorbet/rbi/annotations/.gitattributes b/gem/sorbet/rbi/annotations/.gitattributes new file mode 100644 index 00000000..d2eacd2c --- /dev/null +++ b/gem/sorbet/rbi/annotations/.gitattributes @@ -0,0 +1 @@ +**/*.rbi linguist-vendored=true diff --git a/gem/sorbet/rbi/annotations/rainbow.rbi b/gem/sorbet/rbi/annotations/rainbow.rbi index d6034cd5..0d2cb4e4 100644 --- a/gem/sorbet/rbi/annotations/rainbow.rbi +++ b/gem/sorbet/rbi/annotations/rainbow.rbi @@ -1,4 +1,4 @@ -# typed: strict +# typed: true # DO NOT EDIT MANUALLY # This file was pulled from a central RBI files repository. @@ -19,7 +19,7 @@ module Rainbow sig { params(hex: String).returns([Integer, Integer, Integer]) } def self.parse_hex_color(hex); end - class Indexed < Color + class Indexed < Rainbow::Color sig { returns(Integer) } attr_reader :num @@ -30,7 +30,7 @@ module Rainbow def codes; end end - class Named < Indexed + class Named < Rainbow::Color::Indexed NAMES = T.let(nil, T::Hash[Symbol, Integer]) sig { params(ground: Symbol, name: Symbol).void } @@ -43,7 +43,7 @@ module Rainbow def self.valid_names; end end - class RGB < Indexed + class RGB < Rainbow::Color::Indexed sig { returns(Integer) } attr_reader :r, :g, :b @@ -57,17 +57,17 @@ module Rainbow def self.to_ansi_domain(value); end end - class X11Named < RGB - include X11ColorNames + class X11Named < Rainbow::Color::RGB + include Rainbow::X11ColorNames + + sig { params(ground: Symbol, name: Symbol).void } + def initialize(ground, name); end sig { returns(T::Array[Symbol]) } def self.color_names; end sig { returns(String) } def self.valid_names; end - - sig { params(ground: Symbol, name: Symbol).void } - def initialize(ground, name); end end end diff --git a/gem/sorbet/rbi/gems/addressable@2.8.0.rbi b/gem/sorbet/rbi/gems/addressable@2.8.6.rbi similarity index 80% rename from gem/sorbet/rbi/gems/addressable@2.8.0.rbi rename to gem/sorbet/rbi/gems/addressable@2.8.6.rbi index c65c6b10..cc191076 100644 --- a/gem/sorbet/rbi/gems/addressable@2.8.0.rbi +++ b/gem/sorbet/rbi/gems/addressable@2.8.6.rbi @@ -6,89 +6,66 @@ # Addressable is a library for processing links and URIs. # -# source://addressable//lib/addressable/version.rb#23 +# source://addressable//lib/addressable/version.rb#22 module Addressable; end -# source://addressable//lib/addressable/idna/pure.rb#22 +# source://addressable//lib/addressable/idna/pure.rb#21 module Addressable::IDNA class << self + # source://addressable//lib/addressable/idna/pure.rb#117 + def _deprecated_unicode_normalize_kc(value); end + # Converts from a Unicode internationalized domain name to an ASCII # domain name as described in RFC 3490. # - # source://addressable//lib/addressable/idna/pure.rb#68 + # source://addressable//lib/addressable/idna/pure.rb#67 def to_ascii(input); end # Converts from an ASCII domain name to a Unicode internationalized # domain name as described in RFC 3490. # - # source://addressable//lib/addressable/idna/pure.rb#94 + # source://addressable//lib/addressable/idna/pure.rb#93 def to_unicode(input); end - # Unicode normalization form KC. - # - # source://addressable//lib/addressable/idna/pure.rb#117 - def unicode_normalize_kc(input); end + # @deprecated Use {String#unicode_normalize(:nfkc)} instead + def unicode_normalize_kc(*args, **_arg1, &block); end private - # source://addressable//lib/addressable/idna/pure.rb#283 - def lookup_unicode_combining_class(codepoint); end - - # source://addressable//lib/addressable/idna/pure.rb#291 - def lookup_unicode_compatibility(codepoint); end - - # source://addressable//lib/addressable/idna/pure.rb#306 - def lookup_unicode_composition(unpacked); end - - # source://addressable//lib/addressable/idna/pure.rb#298 + # source://addressable//lib/addressable/idna/pure.rb#140 def lookup_unicode_lowercase(codepoint); end # Bias adaptation method # - # source://addressable//lib/addressable/idna/pure.rb#661 + # source://addressable//lib/addressable/idna/pure.rb#488 def punycode_adapt(delta, numpoints, firsttime); end # @return [Boolean] # - # source://addressable//lib/addressable/idna/pure.rb#629 + # source://addressable//lib/addressable/idna/pure.rb#456 def punycode_basic?(codepoint); end - # source://addressable//lib/addressable/idna/pure.rb#507 + # source://addressable//lib/addressable/idna/pure.rb#334 def punycode_decode(punycode); end # Returns the numeric value of a basic codepoint # (for use in representing integers) in the range 0 to # base - 1, or PUNYCODE_BASE if codepoint does not represent a value. # - # source://addressable//lib/addressable/idna/pure.rb#647 + # source://addressable//lib/addressable/idna/pure.rb#474 def punycode_decode_digit(codepoint); end # @return [Boolean] # - # source://addressable//lib/addressable/idna/pure.rb#634 + # source://addressable//lib/addressable/idna/pure.rb#461 def punycode_delimiter?(codepoint); end - # source://addressable//lib/addressable/idna/pure.rb#386 + # source://addressable//lib/addressable/idna/pure.rb#213 def punycode_encode(unicode); end - # source://addressable//lib/addressable/idna/pure.rb#639 + # source://addressable//lib/addressable/idna/pure.rb#466 def punycode_encode_digit(d); end - # source://addressable//lib/addressable/idna/pure.rb#189 - def ucs4_to_utf8(char, buffer); end - - # source://addressable//lib/addressable/idna/pure.rb#140 - def unicode_compose(unpacked); end - - # source://addressable//lib/addressable/idna/pure.rb#165 - def unicode_compose_pair(ch_one, ch_two); end - - # source://addressable//lib/addressable/idna/pure.rb#245 - def unicode_decompose(unpacked); end - - # source://addressable//lib/addressable/idna/pure.rb#266 - def unicode_decompose_hangul(codepoint); end - # Unicode aware downcase method. # # @api private @@ -97,138 +74,104 @@ module Addressable::IDNA # # source://addressable//lib/addressable/idna/pure.rb#132 def unicode_downcase(input); end - - # source://addressable//lib/addressable/idna/pure.rb#221 - def unicode_sort_canonical(unpacked); end end end -# source://addressable//lib/addressable/idna/pure.rb#356 +# source://addressable//lib/addressable/idna/pure.rb#183 Addressable::IDNA::ACE_MAX_LENGTH = T.let(T.unsafe(nil), Integer) -# source://addressable//lib/addressable/idna/pure.rb#41 +# source://addressable//lib/addressable/idna/pure.rb#40 Addressable::IDNA::ACE_PREFIX = T.let(T.unsafe(nil), String) -# source://addressable//lib/addressable/idna/pure.rb#345 +# source://addressable//lib/addressable/idna/pure.rb#172 Addressable::IDNA::COMPOSITION_TABLE = T.let(T.unsafe(nil), Hash) -# source://addressable//lib/addressable/idna/pure.rb#312 -Addressable::IDNA::HANGUL_LBASE = T.let(T.unsafe(nil), Integer) - -# source://addressable//lib/addressable/idna/pure.rb#313 -Addressable::IDNA::HANGUL_LCOUNT = T.let(T.unsafe(nil), Integer) - -# 588 -# -# source://addressable//lib/addressable/idna/pure.rb#318 -Addressable::IDNA::HANGUL_NCOUNT = T.let(T.unsafe(nil), Integer) - -# source://addressable//lib/addressable/idna/pure.rb#311 -Addressable::IDNA::HANGUL_SBASE = T.let(T.unsafe(nil), Integer) - -# 11172 -# -# source://addressable//lib/addressable/idna/pure.rb#319 -Addressable::IDNA::HANGUL_SCOUNT = T.let(T.unsafe(nil), Integer) - -# source://addressable//lib/addressable/idna/pure.rb#316 -Addressable::IDNA::HANGUL_TBASE = T.let(T.unsafe(nil), Integer) - -# source://addressable//lib/addressable/idna/pure.rb#317 -Addressable::IDNA::HANGUL_TCOUNT = T.let(T.unsafe(nil), Integer) - -# source://addressable//lib/addressable/idna/pure.rb#314 -Addressable::IDNA::HANGUL_VBASE = T.let(T.unsafe(nil), Integer) - -# source://addressable//lib/addressable/idna/pure.rb#315 -Addressable::IDNA::HANGUL_VCOUNT = T.let(T.unsafe(nil), Integer) - -# source://addressable//lib/addressable/idna/pure.rb#358 +# source://addressable//lib/addressable/idna/pure.rb#185 Addressable::IDNA::PUNYCODE_BASE = T.let(T.unsafe(nil), Integer) -# source://addressable//lib/addressable/idna/pure.rb#362 +# source://addressable//lib/addressable/idna/pure.rb#189 Addressable::IDNA::PUNYCODE_DAMP = T.let(T.unsafe(nil), Integer) -# source://addressable//lib/addressable/idna/pure.rb#365 +# source://addressable//lib/addressable/idna/pure.rb#192 Addressable::IDNA::PUNYCODE_DELIMITER = T.let(T.unsafe(nil), Integer) -# source://addressable//lib/addressable/idna/pure.rb#363 +# source://addressable//lib/addressable/idna/pure.rb#190 Addressable::IDNA::PUNYCODE_INITIAL_BIAS = T.let(T.unsafe(nil), Integer) -# source://addressable//lib/addressable/idna/pure.rb#364 +# source://addressable//lib/addressable/idna/pure.rb#191 Addressable::IDNA::PUNYCODE_INITIAL_N = T.let(T.unsafe(nil), Integer) -# source://addressable//lib/addressable/idna/pure.rb#367 +# source://addressable//lib/addressable/idna/pure.rb#194 Addressable::IDNA::PUNYCODE_MAXINT = T.let(T.unsafe(nil), Integer) -# source://addressable//lib/addressable/idna/pure.rb#369 +# source://addressable//lib/addressable/idna/pure.rb#196 Addressable::IDNA::PUNYCODE_PRINT_ASCII = T.let(T.unsafe(nil), String) -# source://addressable//lib/addressable/idna/pure.rb#361 +# source://addressable//lib/addressable/idna/pure.rb#188 Addressable::IDNA::PUNYCODE_SKEW = T.let(T.unsafe(nil), Integer) -# source://addressable//lib/addressable/idna/pure.rb#360 +# source://addressable//lib/addressable/idna/pure.rb#187 Addressable::IDNA::PUNYCODE_TMAX = T.let(T.unsafe(nil), Integer) -# source://addressable//lib/addressable/idna/pure.rb#359 +# source://addressable//lib/addressable/idna/pure.rb#186 Addressable::IDNA::PUNYCODE_TMIN = T.let(T.unsafe(nil), Integer) # Input is invalid. # -# source://addressable//lib/addressable/idna/pure.rb#380 +# source://addressable//lib/addressable/idna/pure.rb#207 class Addressable::IDNA::PunycodeBadInput < ::StandardError; end # Output would exceed the space provided. # -# source://addressable//lib/addressable/idna/pure.rb#382 +# source://addressable//lib/addressable/idna/pure.rb#209 class Addressable::IDNA::PunycodeBigOutput < ::StandardError; end # Input needs wider integers to process. # -# source://addressable//lib/addressable/idna/pure.rb#384 +# source://addressable//lib/addressable/idna/pure.rb#211 class Addressable::IDNA::PunycodeOverflow < ::StandardError; end -# source://addressable//lib/addressable/idna/pure.rb#336 +# source://addressable//lib/addressable/idna/pure.rb#163 Addressable::IDNA::UNICODE_DATA = T.let(T.unsafe(nil), Hash) -# source://addressable//lib/addressable/idna/pure.rb#323 +# source://addressable//lib/addressable/idna/pure.rb#150 Addressable::IDNA::UNICODE_DATA_CANONICAL = T.let(T.unsafe(nil), Integer) -# source://addressable//lib/addressable/idna/pure.rb#321 +# source://addressable//lib/addressable/idna/pure.rb#148 Addressable::IDNA::UNICODE_DATA_COMBINING_CLASS = T.let(T.unsafe(nil), Integer) -# source://addressable//lib/addressable/idna/pure.rb#324 +# source://addressable//lib/addressable/idna/pure.rb#151 Addressable::IDNA::UNICODE_DATA_COMPATIBILITY = T.let(T.unsafe(nil), Integer) -# source://addressable//lib/addressable/idna/pure.rb#322 +# source://addressable//lib/addressable/idna/pure.rb#149 Addressable::IDNA::UNICODE_DATA_EXCLUSION = T.let(T.unsafe(nil), Integer) -# source://addressable//lib/addressable/idna/pure.rb#326 +# source://addressable//lib/addressable/idna/pure.rb#153 Addressable::IDNA::UNICODE_DATA_LOWERCASE = T.let(T.unsafe(nil), Integer) -# source://addressable//lib/addressable/idna/pure.rb#327 +# source://addressable//lib/addressable/idna/pure.rb#154 Addressable::IDNA::UNICODE_DATA_TITLECASE = T.let(T.unsafe(nil), Integer) -# source://addressable//lib/addressable/idna/pure.rb#325 +# source://addressable//lib/addressable/idna/pure.rb#152 Addressable::IDNA::UNICODE_DATA_UPPERCASE = T.let(T.unsafe(nil), Integer) -# source://addressable//lib/addressable/idna/pure.rb#355 +# source://addressable//lib/addressable/idna/pure.rb#182 Addressable::IDNA::UNICODE_MAX_LENGTH = T.let(T.unsafe(nil), Integer) -# source://addressable//lib/addressable/idna/pure.rb#37 +# source://addressable//lib/addressable/idna/pure.rb#36 Addressable::IDNA::UNICODE_TABLE = T.let(T.unsafe(nil), String) -# source://addressable//lib/addressable/idna/pure.rb#43 +# source://addressable//lib/addressable/idna/pure.rb#42 Addressable::IDNA::UTF8_REGEX = T.let(T.unsafe(nil), Regexp) -# source://addressable//lib/addressable/idna/pure.rb#54 +# source://addressable//lib/addressable/idna/pure.rb#53 Addressable::IDNA::UTF8_REGEX_MULTIBYTE = T.let(T.unsafe(nil), Regexp) # This is an implementation of a URI parser based on # RFC 3986, # RFC 3987. # -# source://addressable//lib/addressable/uri.rb#32 +# source://addressable//lib/addressable/uri.rb#31 class Addressable::URI # Creates a new uri object from component parts. # @@ -245,7 +188,7 @@ class Addressable::URI # @param [String, [Hash] a customizable set of options # @return [Addressable::URI] The constructed URI object. # - # source://addressable//lib/addressable/uri.rb#825 + # source://addressable//lib/addressable/uri.rb#830 def initialize(options = T.unsafe(nil)); end # Joins two URIs together. @@ -253,7 +196,7 @@ class Addressable::URI # @param The [String, Addressable::URI, #to_str] URI to join with. # @return [Addressable::URI] The joined URI. # - # source://addressable//lib/addressable/uri.rb#1909 + # source://addressable//lib/addressable/uri.rb#1889 def +(uri); end # Returns true if the URI objects are equal. This method @@ -263,7 +206,7 @@ class Addressable::URI # @return [TrueClass, FalseClass] true if the URIs are equivalent, false # otherwise. # - # source://addressable//lib/addressable/uri.rb#2259 + # source://addressable//lib/addressable/uri.rb#2239 def ==(uri); end # Returns true if the URI objects are equal. This method @@ -274,7 +217,7 @@ class Addressable::URI # @return [TrueClass, FalseClass] true if the URIs are equivalent, false # otherwise. # - # source://addressable//lib/addressable/uri.rb#2237 + # source://addressable//lib/addressable/uri.rb#2217 def ===(uri); end # Determines if the URI is absolute. @@ -282,7 +225,7 @@ class Addressable::URI # @return [TrueClass, FalseClass] true if the URI is absolute. false # otherwise. # - # source://addressable//lib/addressable/uri.rb#1899 + # source://addressable//lib/addressable/uri.rb#1879 def absolute?; end # The authority component for this URI. @@ -290,21 +233,21 @@ class Addressable::URI # # @return [String] The authority component. # - # source://addressable//lib/addressable/uri.rb#1242 + # source://addressable//lib/addressable/uri.rb#1234 def authority; end # Sets the authority component for this URI. # # @param new_authority [String, #to_str] The new authority component. # - # source://addressable//lib/addressable/uri.rb#1284 + # source://addressable//lib/addressable/uri.rb#1274 def authority=(new_authority); end # The basename, if any, of the file in the path component. # # @return [String] The path's basename. # - # source://addressable//lib/addressable/uri.rb#1602 + # source://addressable//lib/addressable/uri.rb#1588 def basename; end # The default port for this URI's scheme. @@ -313,7 +256,7 @@ class Addressable::URI # # @return [Integer] The default port. # - # source://addressable//lib/addressable/uri.rb#1466 + # source://addressable//lib/addressable/uri.rb#1454 def default_port; end # This method allows you to make several changes to a URI simultaneously, @@ -322,9 +265,8 @@ class Addressable::URI # been executed. # # @param block [Proc] A set of operations to perform on a given URI. - # @raise [LocalJumpError] # - # source://addressable//lib/addressable/uri.rb#2416 + # source://addressable//lib/addressable/uri.rb#2396 def defer_validation; end # Creates a URI suitable for display to users. If semantic attacks are @@ -334,7 +276,7 @@ class Addressable::URI # # @return [Addressable::URI] A URI suitable for display purposes. # - # source://addressable//lib/addressable/uri.rb#2221 + # source://addressable//lib/addressable/uri.rb#2201 def display_uri; end # Returns the public suffix domain for this host. @@ -342,23 +284,26 @@ class Addressable::URI # @example # Addressable::URI.parse("http://www.example.co.uk").domain # => "example.co.uk" # - # source://addressable//lib/addressable/uri.rb#1233 + # source://addressable//lib/addressable/uri.rb#1225 def domain; end # Clones the URI object. # # @return [Addressable::URI] The cloned URI. # - # source://addressable//lib/addressable/uri.rb#2291 + # source://addressable//lib/addressable/uri.rb#2271 def dup; end # Determines if the URI is an empty string. # # @return [TrueClass, FalseClass] Returns true if empty, false otherwise. # - # source://addressable//lib/addressable/uri.rb#2353 + # source://addressable//lib/addressable/uri.rb#2333 def empty?; end + # source://addressable//lib/addressable/uri.rb#2406 + def encode_with(coder); end + # Returns true if the URI objects are equal. This method # does NOT normalize either URI before doing the comparison. # @@ -366,7 +311,7 @@ class Addressable::URI # @return [TrueClass, FalseClass] true if the URIs are equivalent, false # otherwise. # - # source://addressable//lib/addressable/uri.rb#2273 + # source://addressable//lib/addressable/uri.rb#2253 def eql?(uri); end # The extname, if any, of the file in the path component. @@ -374,28 +319,28 @@ class Addressable::URI # # @return [String] The path's extname. # - # source://addressable//lib/addressable/uri.rb#1612 + # source://addressable//lib/addressable/uri.rb#1598 def extname; end # The fragment component for this URI. # # @return [String] The fragment component. # - # source://addressable//lib/addressable/uri.rb#1826 + # source://addressable//lib/addressable/uri.rb#1810 def fragment; end # Sets the fragment component for this URI. # # @param new_fragment [String, #to_str] The new fragment component. # - # source://addressable//lib/addressable/uri.rb#1855 + # source://addressable//lib/addressable/uri.rb#1835 def fragment=(new_fragment); end # Freeze URI, initializing instance variables. # # @return [Addressable::URI] The frozen URI object. # - # source://addressable//lib/addressable/uri.rb#862 + # source://addressable//lib/addressable/uri.rb#870 def freeze; end # A hash value that will make a URI equivalent to its normalized @@ -403,21 +348,21 @@ class Addressable::URI # # @return [Integer] A hash of the URI. # - # source://addressable//lib/addressable/uri.rb#2283 + # source://addressable//lib/addressable/uri.rb#2263 def hash; end # The host component for this URI. # # @return [String] The host component. # - # source://addressable//lib/addressable/uri.rb#1124 + # source://addressable//lib/addressable/uri.rb#1120 def host; end # Sets the host component for this URI. # # @param new_host [String, #to_str] The new host component. # - # source://addressable//lib/addressable/uri.rb#1164 + # source://addressable//lib/addressable/uri.rb#1156 def host=(new_host); end # This method is same as URI::Generic#host except @@ -426,7 +371,7 @@ class Addressable::URI # @return [String] The hostname for this URI. # @see Addressable::URI#host # - # source://addressable//lib/addressable/uri.rb#1186 + # source://addressable//lib/addressable/uri.rb#1178 def hostname; end # This method is same as URI::Generic#host= except @@ -435,7 +380,7 @@ class Addressable::URI # @param new_hostname [String, #to_str] The new hostname for this URI. # @see Addressable::URI#host= # - # source://addressable//lib/addressable/uri.rb#1198 + # source://addressable//lib/addressable/uri.rb#1190 def hostname=(new_hostname); end # The inferred port component for this URI. @@ -444,14 +389,17 @@ class Addressable::URI # # @return [Integer] The inferred port component. # - # source://addressable//lib/addressable/uri.rb#1452 + # source://addressable//lib/addressable/uri.rb#1440 def inferred_port; end + # source://addressable//lib/addressable/uri.rb#2417 + def init_with(coder); end + # Returns a String representation of the URI object's state. # # @return [String] The URI object's state, as a String. # - # source://addressable//lib/addressable/uri.rb#2404 + # source://addressable//lib/addressable/uri.rb#2384 def inspect; end # Determines if the scheme indicates an IP-based protocol. @@ -459,7 +407,7 @@ class Addressable::URI # @return [TrueClass, FalseClass] true if the scheme indicates an IP-based protocol. # false otherwise. # - # source://addressable//lib/addressable/uri.rb#1875 + # source://addressable//lib/addressable/uri.rb#1855 def ip_based?; end # Joins two URIs together. @@ -467,7 +415,7 @@ class Addressable::URI # @param The [String, Addressable::URI, #to_str] URI to join with. # @return [Addressable::URI] The joined URI. # - # source://addressable//lib/addressable/uri.rb#1909 + # source://addressable//lib/addressable/uri.rb#1889 def join(uri); end # Destructive form of join. @@ -476,7 +424,7 @@ class Addressable::URI # @return [Addressable::URI] The joined URI. # @see Addressable::URI#join # - # source://addressable//lib/addressable/uri.rb#2012 + # source://addressable//lib/addressable/uri.rb#1992 def join!(uri); end # Merges a URI with a Hash of components. @@ -488,7 +436,7 @@ class Addressable::URI # @return [Addressable::URI] The merged URI. # @see Hash#merge # - # source://addressable//lib/addressable/uri.rb#2027 + # source://addressable//lib/addressable/uri.rb#2007 def merge(hash); end # Destructive form of merge. @@ -497,7 +445,7 @@ class Addressable::URI # @return [Addressable::URI] The merged URI. # @see Addressable::URI#merge # - # source://addressable//lib/addressable/uri.rb#2092 + # source://addressable//lib/addressable/uri.rb#2072 def merge!(uri); end # Returns a normalized URI object. @@ -510,7 +458,7 @@ class Addressable::URI # # @return [Addressable::URI] The normalized URI. # - # source://addressable//lib/addressable/uri.rb#2184 + # source://addressable//lib/addressable/uri.rb#2164 def normalize; end # Destructively normalizes this URI object. @@ -518,63 +466,63 @@ class Addressable::URI # @return [Addressable::URI] The normalized URI. # @see Addressable::URI#normalize # - # source://addressable//lib/addressable/uri.rb#2210 + # source://addressable//lib/addressable/uri.rb#2190 def normalize!; end # The authority component for this URI, normalized. # # @return [String] The authority component, normalized. # - # source://addressable//lib/addressable/uri.rb#1260 + # source://addressable//lib/addressable/uri.rb#1252 def normalized_authority; end # The fragment component for this URI, normalized. # # @return [String] The fragment component, normalized. # - # source://addressable//lib/addressable/uri.rb#1834 + # source://addressable//lib/addressable/uri.rb#1816 def normalized_fragment; end # The host component for this URI, normalized. # # @return [String] The host component, normalized. # - # source://addressable//lib/addressable/uri.rb#1132 + # source://addressable//lib/addressable/uri.rb#1126 def normalized_host; end # The password component for this URI, normalized. # # @return [String] The password component, normalized. # - # source://addressable//lib/addressable/uri.rb#1000 + # source://addressable//lib/addressable/uri.rb#1002 def normalized_password; end # The path component for this URI, normalized. # # @return [String] The path component, normalized. # - # source://addressable//lib/addressable/uri.rb#1549 + # source://addressable//lib/addressable/uri.rb#1535 def normalized_path; end # The port component for this URI, normalized. # # @return [Integer] The port component, normalized. # - # source://addressable//lib/addressable/uri.rb#1404 + # source://addressable//lib/addressable/uri.rb#1392 def normalized_port; end # The query component for this URI, normalized. # # @return [String] The query component, normalized. # - # source://addressable//lib/addressable/uri.rb#1629 + # source://addressable//lib/addressable/uri.rb#1613 def normalized_query(*flags); end # The scheme component for this URI, normalized. # # @return [String] The scheme component, normalized. # - # source://addressable//lib/addressable/uri.rb#890 + # source://addressable//lib/addressable/uri.rb#896 def normalized_scheme; end # The normalized combination of components that represent a site. @@ -586,21 +534,21 @@ class Addressable::URI # # @return [String] The normalized components that identify a site. # - # source://addressable//lib/addressable/uri.rb#1497 + # source://addressable//lib/addressable/uri.rb#1485 def normalized_site; end # The user component for this URI, normalized. # # @return [String] The user component, normalized. # - # source://addressable//lib/addressable/uri.rb#943 + # source://addressable//lib/addressable/uri.rb#947 def normalized_user; end # The userinfo component for this URI, normalized. # # @return [String] The userinfo component, normalized. # - # source://addressable//lib/addressable/uri.rb#1070 + # source://addressable//lib/addressable/uri.rb#1068 def normalized_userinfo; end # Omits components from a URI. @@ -613,7 +561,7 @@ class Addressable::URI # @param *components [Symbol] The components to be omitted. # @return [Addressable::URI] The URI with components omitted. # - # source://addressable//lib/addressable/uri.rb#2317 + # source://addressable//lib/addressable/uri.rb#2297 def omit(*components); end # Destructive form of omit. @@ -622,7 +570,7 @@ class Addressable::URI # @return [Addressable::URI] The URI with components omitted. # @see Addressable::URI#omit # - # source://addressable//lib/addressable/uri.rb#2344 + # source://addressable//lib/addressable/uri.rb#2324 def omit!(*components); end # The origin for this URI, serialized to ASCII, as per @@ -630,7 +578,7 @@ class Addressable::URI # # @return [String] The serialized origin. # - # source://addressable//lib/addressable/uri.rb#1324 + # source://addressable//lib/addressable/uri.rb#1314 def origin; end # Sets the origin for this URI, serialized to ASCII, as per @@ -639,14 +587,14 @@ class Addressable::URI # # @param new_origin [String, #to_str] The new origin component. # - # source://addressable//lib/addressable/uri.rb#1343 + # source://addressable//lib/addressable/uri.rb#1333 def origin=(new_origin); end # The password component for this URI. # # @return [String] The password component. # - # source://addressable//lib/addressable/uri.rb#992 + # source://addressable//lib/addressable/uri.rb#996 def password; end # Sets the password component for this URI. @@ -660,14 +608,14 @@ class Addressable::URI # # @return [String] The path component. # - # source://addressable//lib/addressable/uri.rb#1540 + # source://addressable//lib/addressable/uri.rb#1528 def path; end # Sets the path component for this URI. # # @param new_path [String, #to_str] The new path component. # - # source://addressable//lib/addressable/uri.rb#1581 + # source://addressable//lib/addressable/uri.rb#1567 def path=(new_path); end # The port component for this URI. @@ -676,28 +624,28 @@ class Addressable::URI # # @return [Integer] The port component. # - # source://addressable//lib/addressable/uri.rb#1396 + # source://addressable//lib/addressable/uri.rb#1386 def port; end # Sets the port component for this URI. # # @param new_port [String, Integer, #to_s] The new port component. # - # source://addressable//lib/addressable/uri.rb#1420 + # source://addressable//lib/addressable/uri.rb#1408 def port=(new_port); end # The query component for this URI. # # @return [String] The query component. # - # source://addressable//lib/addressable/uri.rb#1621 + # source://addressable//lib/addressable/uri.rb#1607 def query; end # Sets the query component for this URI. # # @param new_query [String, #to_str] The new query component. # - # source://addressable//lib/addressable/uri.rb#1657 + # source://addressable//lib/addressable/uri.rb#1641 def query=(new_query); end # Converts the query component to a Hash value. @@ -718,7 +666,7 @@ class Addressable::URI # @return [Hash, Array, nil] The query string parsed as a Hash or Array # or nil if the query string is blank. # - # source://addressable//lib/addressable/uri.rb#1688 + # source://addressable//lib/addressable/uri.rb#1672 def query_values(return_type = T.unsafe(nil)); end # Sets the query component for this URI from a Hash object. @@ -739,7 +687,7 @@ class Addressable::URI # # => "flag&key=value" # @param new_query_values [Hash, #to_hash, Array] The new query values. # - # source://addressable//lib/addressable/uri.rb#1739 + # source://addressable//lib/addressable/uri.rb#1723 def query_values=(new_query_values); end # Determines if the URI is relative. @@ -747,7 +695,7 @@ class Addressable::URI # @return [TrueClass, FalseClass] true if the URI is relative. false # otherwise. # - # source://addressable//lib/addressable/uri.rb#1889 + # source://addressable//lib/addressable/uri.rb#1869 def relative?; end # The HTTP request URI for this URI. This is the path and the @@ -755,14 +703,14 @@ class Addressable::URI # # @return [String] The request URI required for an HTTP request. # - # source://addressable//lib/addressable/uri.rb#1790 + # source://addressable//lib/addressable/uri.rb#1774 def request_uri; end # Sets the HTTP request URI for this URI. # # @param new_request_uri [String, #to_str] The new HTTP request URI. # - # source://addressable//lib/addressable/uri.rb#1802 + # source://addressable//lib/addressable/uri.rb#1786 def request_uri=(new_request_uri); end # Returns the shortest normalized relative form of this URI that uses the @@ -772,7 +720,7 @@ class Addressable::URI # @param uri [String, Addressable::URI, #to_str] The URI to route from. # @return [Addressable::URI] The normalized relative URI that is equivalent to the original URI. # - # source://addressable//lib/addressable/uri.rb#2105 + # source://addressable//lib/addressable/uri.rb#2085 def route_from(uri); end # Returns the shortest normalized relative form of the supplied URI that @@ -782,21 +730,21 @@ class Addressable::URI # @param uri [String, Addressable::URI, #to_str] The URI to route to. # @return [Addressable::URI] The normalized relative URI that is equivalent to the supplied URI. # - # source://addressable//lib/addressable/uri.rb#2170 + # source://addressable//lib/addressable/uri.rb#2150 def route_to(uri); end # The scheme component for this URI. # # @return [String] The scheme component. # - # source://addressable//lib/addressable/uri.rb#882 + # source://addressable//lib/addressable/uri.rb#890 def scheme; end # Sets the scheme component for this URI. # # @param new_scheme [String, #to_str] The new scheme component. # - # source://addressable//lib/addressable/uri.rb#911 + # source://addressable//lib/addressable/uri.rb#917 def scheme=(new_scheme); end # The combination of components that represent a site. @@ -808,14 +756,14 @@ class Addressable::URI # # @return [String] The components that identify a site. # - # source://addressable//lib/addressable/uri.rb#1479 + # source://addressable//lib/addressable/uri.rb#1467 def site; end # Sets the site value for this URI. # # @param new_site [String, #to_str] The new site value. # - # source://addressable//lib/addressable/uri.rb#1518 + # source://addressable//lib/addressable/uri.rb#1506 def site=(new_site); end # Returns the top-level domain for this host. @@ -823,28 +771,28 @@ class Addressable::URI # @example # Addressable::URI.parse("http://www.example.co.uk").tld # => "co.uk" # - # source://addressable//lib/addressable/uri.rb#1215 + # source://addressable//lib/addressable/uri.rb#1207 def tld; end # Sets the top-level domain for this URI. # # @param new_tld [String, #to_str] The new top-level domain. # - # source://addressable//lib/addressable/uri.rb#1223 + # source://addressable//lib/addressable/uri.rb#1215 def tld=(new_tld); end # Returns a Hash of the URI components. # # @return [Hash] The URI as a Hash of components. # - # source://addressable//lib/addressable/uri.rb#2387 + # source://addressable//lib/addressable/uri.rb#2367 def to_hash; end # Converts the URI to a String. # # @return [String] The URI's String representation. # - # source://addressable//lib/addressable/uri.rb#2361 + # source://addressable//lib/addressable/uri.rb#2341 def to_s; end # Converts the URI to a String. @@ -852,21 +800,21 @@ class Addressable::URI # # @return [String] The URI's String representation. # - # source://addressable//lib/addressable/uri.rb#2361 + # source://addressable//lib/addressable/uri.rb#2341 def to_str; end # The user component for this URI. # # @return [String] The user component. # - # source://addressable//lib/addressable/uri.rb#935 + # source://addressable//lib/addressable/uri.rb#941 def user; end # Sets the user component for this URI. # # @param new_user [String, #to_str] The new user component. # - # source://addressable//lib/addressable/uri.rb#966 + # source://addressable//lib/addressable/uri.rb#970 def user=(new_user); end # The userinfo component for this URI. @@ -874,23 +822,30 @@ class Addressable::URI # # @return [String] The userinfo component. # - # source://addressable//lib/addressable/uri.rb#1054 + # source://addressable//lib/addressable/uri.rb#1052 def userinfo; end # Sets the userinfo component for this URI. # # @param new_userinfo [String, #to_str] The new userinfo component. # - # source://addressable//lib/addressable/uri.rb#1095 + # source://addressable//lib/addressable/uri.rb#1091 def userinfo=(new_userinfo); end protected + # Converts the string to be UTF-8 if it is not already UTF-8 + # + # @api private + # + # source://addressable//lib/addressable/uri.rb#2561 + def force_utf8_encoding_if_needed(str); end + # Resets composite values for the entire URI # # @api private # - # source://addressable//lib/addressable/uri.rb#2551 + # source://addressable//lib/addressable/uri.rb#2552 def remove_composite_values; end # Replaces the internal state of self with the specified URI's state. @@ -899,7 +854,7 @@ class Addressable::URI # @param uri [Addressable::URI] The URI to replace self with. # @return [Addressable::URI] self. # - # source://addressable//lib/addressable/uri.rb#2514 + # source://addressable//lib/addressable/uri.rb#2519 def replace_self(uri); end # Splits path string with "/" (slash). @@ -909,14 +864,23 @@ class Addressable::URI # @param path [String] The path to split. # @return [Array] An array of parts of path. # - # source://addressable//lib/addressable/uri.rb#2541 + # source://addressable//lib/addressable/uri.rb#2542 def split_path(path); end # Ensures that the URI is valid. # - # source://addressable//lib/addressable/uri.rb#2471 + # source://addressable//lib/addressable/uri.rb#2476 def validate; end + private + + # Resets instance variables + # + # @api private + # + # source://addressable//lib/addressable/uri.rb#2573 + def reset_ivs; end + class << self # Converts a path to a file scheme URI. If the path supplied is # relative, it will be returned as a relative URI. If the path supplied @@ -943,7 +907,7 @@ class Addressable::URI # @return [Addressable::URI] The parsed file scheme URI or the original URI if some other URI # scheme was provided. # - # source://addressable//lib/addressable/uri.rb#274 + # source://addressable//lib/addressable/uri.rb#292 def convert_path(path); end # Percent encodes any special characters in the URI. @@ -957,7 +921,7 @@ class Addressable::URI # The return type is determined by the return_type # parameter. # - # source://addressable//lib/addressable/uri.rb#610 + # source://addressable//lib/addressable/uri.rb#616 def encode(uri, return_type = T.unsafe(nil)); end # Percent encodes a URI component. @@ -990,7 +954,7 @@ class Addressable::URI # character_class. # @return [String] The encoded component. # - # source://addressable//lib/addressable/uri.rb#389 + # source://addressable//lib/addressable/uri.rb#403 def encode_component(component, character_class = T.unsafe(nil), upcase_encoded = T.unsafe(nil)); end # Percent encodes any special characters in the URI. @@ -1004,7 +968,7 @@ class Addressable::URI # The return type is determined by the return_type # parameter. # - # source://addressable//lib/addressable/uri.rb#610 + # source://addressable//lib/addressable/uri.rb#616 def escape(uri, return_type = T.unsafe(nil)); end # Percent encodes a URI component. @@ -1037,7 +1001,7 @@ class Addressable::URI # character_class. # @return [String] The encoded component. # - # source://addressable//lib/addressable/uri.rb#389 + # source://addressable//lib/addressable/uri.rb#403 def escape_component(component, character_class = T.unsafe(nil), upcase_encoded = T.unsafe(nil)); end # Encodes a set of key/value pairs according to the rules for the @@ -1048,7 +1012,7 @@ class Addressable::URI # Defaults to false. # @return [String] The encoded value. # - # source://addressable//lib/addressable/uri.rb#735 + # source://addressable//lib/addressable/uri.rb#740 def form_encode(form_values, sort = T.unsafe(nil)); end # Decodes a String according to the rules for the @@ -1059,7 +1023,7 @@ class Addressable::URI # This is not a Hash because of the possibility for # duplicate keys. # - # source://addressable//lib/addressable/uri.rb#788 + # source://addressable//lib/addressable/uri.rb#793 def form_unencode(encoded_value); end # Converts an input to a URI. The input does not have to be a valid @@ -1073,14 +1037,14 @@ class Addressable::URI # Defaults to {:scheme => "http"}. # @return [Addressable::URI] The parsed URI. # - # source://addressable//lib/addressable/uri.rb#173 + # source://addressable//lib/addressable/uri.rb#191 def heuristic_parse(uri, hints = T.unsafe(nil)); end # Returns an array of known ip-based schemes. These schemes typically # use a similar URI form: # //:@:/ # - # source://addressable//lib/addressable/uri.rb#1379 + # source://addressable//lib/addressable/uri.rb#1369 def ip_based_schemes; end # Joins several URIs together. @@ -1093,7 +1057,7 @@ class Addressable::URI # @param *uris [String, Addressable::URI, #to_str] The URIs to join. # @return [Addressable::URI] The joined URI. # - # source://addressable//lib/addressable/uri.rb#325 + # source://addressable//lib/addressable/uri.rb#343 def join(*uris); end # Normalizes the encoding of a URI component. @@ -1135,7 +1099,7 @@ class Addressable::URI # normalized to "%2F") but otherwise left alone. # @return [String] The normalized component. # - # source://addressable//lib/addressable/uri.rb#545 + # source://addressable//lib/addressable/uri.rb#552 def normalize_component(component, character_class = T.unsafe(nil), leave_encoded = T.unsafe(nil)); end # Resolves paths to their simplest form. @@ -1158,7 +1122,7 @@ class Addressable::URI # The return type is determined by the return_type # parameter. # - # source://addressable//lib/addressable/uri.rb#665 + # source://addressable//lib/addressable/uri.rb#671 def normalized_encode(uri, return_type = T.unsafe(nil)); end # Returns a URI object based on the parsed string. @@ -1168,14 +1132,14 @@ class Addressable::URI # Addressable::URI. # @return [Addressable::URI] The parsed URI. # - # source://addressable//lib/addressable/uri.rb#96 + # source://addressable//lib/addressable/uri.rb#114 def parse(uri); end # Returns a hash of common IP-based schemes and their default port # numbers. Adding new schemes to this hash, as necessary, will allow # for better URI normalization. # - # source://addressable//lib/addressable/uri.rb#1386 + # source://addressable//lib/addressable/uri.rb#1376 def port_mapping; end # Unencodes any percent encoded characters within a URI component. @@ -1194,7 +1158,7 @@ class Addressable::URI # The return type is determined by the return_type # parameter. # - # source://addressable//lib/addressable/uri.rb#459 + # source://addressable//lib/addressable/uri.rb#472 def unencode(uri, return_type = T.unsafe(nil), leave_encoded = T.unsafe(nil)); end # Unencodes any percent encoded characters within a URI component. @@ -1213,7 +1177,7 @@ class Addressable::URI # The return type is determined by the return_type # parameter. # - # source://addressable//lib/addressable/uri.rb#459 + # source://addressable//lib/addressable/uri.rb#472 def unencode_component(uri, return_type = T.unsafe(nil), leave_encoded = T.unsafe(nil)); end # Unencodes any percent encoded characters within a URI component. @@ -1232,7 +1196,7 @@ class Addressable::URI # The return type is determined by the return_type # parameter. # - # source://addressable//lib/addressable/uri.rb#459 + # source://addressable//lib/addressable/uri.rb#472 def unescape(uri, return_type = T.unsafe(nil), leave_encoded = T.unsafe(nil)); end # Unencodes any percent encoded characters within a URI component. @@ -1251,7 +1215,7 @@ class Addressable::URI # The return type is determined by the return_type # parameter. # - # source://addressable//lib/addressable/uri.rb#459 + # source://addressable//lib/addressable/uri.rb#472 def unescape_component(uri, return_type = T.unsafe(nil), leave_encoded = T.unsafe(nil)); end end end @@ -1259,84 +1223,126 @@ end # Container for the character classes specified in # RFC 3986. # -# source://addressable//lib/addressable/uri.rb#41 +# Note: Concatenated and interpolated `String`s are not affected by the +# `frozen_string_literal` directive and must be frozen explicitly. +# +# Interpolated `String`s *were* frozen this way before Ruby 3.0: +# https://bugs.ruby-lang.org/issues/17104 +# +# source://addressable//lib/addressable/uri.rb#46 module Addressable::URI::CharacterClasses; end -# source://addressable//lib/addressable/uri.rb#42 +# source://addressable//lib/addressable/uri.rb#47 Addressable::URI::CharacterClasses::ALPHA = T.let(T.unsafe(nil), String) -# source://addressable//lib/addressable/uri.rb#51 +# source://addressable//lib/addressable/uri.rb#57 Addressable::URI::CharacterClasses::AUTHORITY = T.let(T.unsafe(nil), String) -# source://addressable//lib/addressable/uri.rb#43 +# source://addressable//lib/addressable/uri.rb#48 Addressable::URI::CharacterClasses::DIGIT = T.let(T.unsafe(nil), String) -# source://addressable//lib/addressable/uri.rb#54 +# source://addressable//lib/addressable/uri.rb#60 Addressable::URI::CharacterClasses::FRAGMENT = T.let(T.unsafe(nil), String) -# source://addressable//lib/addressable/uri.rb#44 +# source://addressable//lib/addressable/uri.rb#49 Addressable::URI::CharacterClasses::GEN_DELIMS = T.let(T.unsafe(nil), String) -# source://addressable//lib/addressable/uri.rb#50 +# source://addressable//lib/addressable/uri.rb#56 Addressable::URI::CharacterClasses::HOST = T.let(T.unsafe(nil), String) -# source://addressable//lib/addressable/uri.rb#52 +# source://addressable//lib/addressable/uri.rb#58 Addressable::URI::CharacterClasses::PATH = T.let(T.unsafe(nil), String) -# source://addressable//lib/addressable/uri.rb#48 +# source://addressable//lib/addressable/uri.rb#54 Addressable::URI::CharacterClasses::PCHAR = T.let(T.unsafe(nil), String) -# source://addressable//lib/addressable/uri.rb#53 +# source://addressable//lib/addressable/uri.rb#59 Addressable::URI::CharacterClasses::QUERY = T.let(T.unsafe(nil), String) -# source://addressable//lib/addressable/uri.rb#46 +# source://addressable//lib/addressable/uri.rb#51 Addressable::URI::CharacterClasses::RESERVED = T.let(T.unsafe(nil), String) -# source://addressable//lib/addressable/uri.rb#49 +# source://addressable//lib/addressable/uri.rb#53 +Addressable::URI::CharacterClasses::RESERVED_AND_UNRESERVED = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/uri.rb#55 Addressable::URI::CharacterClasses::SCHEME = T.let(T.unsafe(nil), String) -# source://addressable//lib/addressable/uri.rb#45 +# source://addressable//lib/addressable/uri.rb#50 Addressable::URI::CharacterClasses::SUB_DELIMS = T.let(T.unsafe(nil), String) -# source://addressable//lib/addressable/uri.rb#47 +# source://addressable//lib/addressable/uri.rb#52 Addressable::URI::CharacterClasses::UNRESERVED = T.let(T.unsafe(nil), String) -# source://addressable//lib/addressable/uri.rb#67 +# source://addressable//lib/addressable/uri.rb#72 +module Addressable::URI::CharacterClassesRegexps; end + +# source://addressable//lib/addressable/uri.rb#73 +Addressable::URI::CharacterClassesRegexps::AUTHORITY = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#74 +Addressable::URI::CharacterClassesRegexps::FRAGMENT = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#75 +Addressable::URI::CharacterClassesRegexps::HOST = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#76 +Addressable::URI::CharacterClassesRegexps::PATH = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#77 +Addressable::URI::CharacterClassesRegexps::QUERY = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#78 +Addressable::URI::CharacterClassesRegexps::RESERVED = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#79 +Addressable::URI::CharacterClassesRegexps::RESERVED_AND_UNRESERVED = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#80 +Addressable::URI::CharacterClassesRegexps::SCHEME = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#81 +Addressable::URI::CharacterClassesRegexps::UNRESERVED = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#85 Addressable::URI::EMPTY_STR = T.let(T.unsafe(nil), String) # Raised if something other than a uri is supplied. # -# source://addressable//lib/addressable/uri.rb#35 +# source://addressable//lib/addressable/uri.rb#34 class Addressable::URI::InvalidURIError < ::StandardError; end -# source://addressable//lib/addressable/uri.rb#1544 +# source://addressable//lib/addressable/uri.rb#2598 +module Addressable::URI::NONE; end + +# source://addressable//lib/addressable/uri.rb#1530 Addressable::URI::NORMPATH = T.let(T.unsafe(nil), Regexp) -# source://addressable//lib/addressable/uri.rb#57 +# source://addressable//lib/addressable/uri.rb#63 module Addressable::URI::NormalizeCharacterClasses; end -# source://addressable//lib/addressable/uri.rb#62 +# source://addressable//lib/addressable/uri.rb#68 Addressable::URI::NormalizeCharacterClasses::FRAGMENT = T.let(T.unsafe(nil), Regexp) -# source://addressable//lib/addressable/uri.rb#58 +# source://addressable//lib/addressable/uri.rb#64 Addressable::URI::NormalizeCharacterClasses::HOST = T.let(T.unsafe(nil), Regexp) -# source://addressable//lib/addressable/uri.rb#60 +# source://addressable//lib/addressable/uri.rb#66 Addressable::URI::NormalizeCharacterClasses::PCHAR = T.let(T.unsafe(nil), Regexp) -# source://addressable//lib/addressable/uri.rb#63 +# source://addressable//lib/addressable/uri.rb#69 Addressable::URI::NormalizeCharacterClasses::QUERY = T.let(T.unsafe(nil), Regexp) -# source://addressable//lib/addressable/uri.rb#61 +# source://addressable//lib/addressable/uri.rb#67 Addressable::URI::NormalizeCharacterClasses::SCHEME = T.let(T.unsafe(nil), Regexp) -# source://addressable//lib/addressable/uri.rb#59 +# source://addressable//lib/addressable/uri.rb#65 Addressable::URI::NormalizeCharacterClasses::UNRESERVED = T.let(T.unsafe(nil), Regexp) # source://addressable//lib/addressable/uri.rb#2427 Addressable::URI::PARENT = T.let(T.unsafe(nil), String) -# source://addressable//lib/addressable/uri.rb#71 +# source://addressable//lib/addressable/uri.rb#89 Addressable::URI::PORT_MAPPING = T.let(T.unsafe(nil), Hash) # source://addressable//lib/addressable/uri.rb#2429 @@ -1357,29 +1363,29 @@ Addressable::URI::SELF_REF = T.let(T.unsafe(nil), String) # Tables used to optimize encoding operations in `self.encode_component` # and `self.normalize_component` # -# source://addressable//lib/addressable/uri.rb#342 -Addressable::URI::SEQUENCE_ENCODING_TABLE = T.let(T.unsafe(nil), Hash) +# source://addressable//lib/addressable/uri.rb#360 +Addressable::URI::SEQUENCE_ENCODING_TABLE = T.let(T.unsafe(nil), Array) -# source://addressable//lib/addressable/uri.rb#348 -Addressable::URI::SEQUENCE_UPCASED_PERCENT_ENCODING_TABLE = T.let(T.unsafe(nil), Hash) +# source://addressable//lib/addressable/uri.rb#364 +Addressable::URI::SEQUENCE_UPCASED_PERCENT_ENCODING_TABLE = T.let(T.unsafe(nil), Array) -# source://addressable//lib/addressable/uri.rb#66 +# source://addressable//lib/addressable/uri.rb#84 Addressable::URI::SLASH = T.let(T.unsafe(nil), String) -# source://addressable//lib/addressable/uri.rb#69 +# source://addressable//lib/addressable/uri.rb#87 Addressable::URI::URIREGEX = T.let(T.unsafe(nil), Regexp) -# source://addressable//lib/addressable/version.rb#24 +# source://addressable//lib/addressable/version.rb#23 module Addressable::VERSION; end -# source://addressable//lib/addressable/version.rb#25 +# source://addressable//lib/addressable/version.rb#24 Addressable::VERSION::MAJOR = T.let(T.unsafe(nil), Integer) -# source://addressable//lib/addressable/version.rb#26 +# source://addressable//lib/addressable/version.rb#25 Addressable::VERSION::MINOR = T.let(T.unsafe(nil), Integer) -# source://addressable//lib/addressable/version.rb#29 +# source://addressable//lib/addressable/version.rb#28 Addressable::VERSION::STRING = T.let(T.unsafe(nil), String) -# source://addressable//lib/addressable/version.rb#27 +# source://addressable//lib/addressable/version.rb#26 Addressable::VERSION::TINY = T.let(T.unsafe(nil), Integer) diff --git a/gem/sorbet/rbi/gems/io-console@0.6.0.rbi b/gem/sorbet/rbi/gems/io-console@0.7.2.rbi similarity index 100% rename from gem/sorbet/rbi/gems/io-console@0.6.0.rbi rename to gem/sorbet/rbi/gems/io-console@0.7.2.rbi diff --git a/gem/sorbet/rbi/gems/json-schema@3.0.0.rbi b/gem/sorbet/rbi/gems/json-schema@4.1.1.rbi similarity index 88% rename from gem/sorbet/rbi/gems/json-schema@3.0.0.rbi rename to gem/sorbet/rbi/gems/json-schema@4.1.1.rbi index 1cdd14ba..02dcab81 100644 --- a/gem/sorbet/rbi/gems/json-schema@3.0.0.rbi +++ b/gem/sorbet/rbi/gems/json-schema@4.1.1.rbi @@ -24,58 +24,58 @@ end class JSON::Schema # @return [Schema] a new instance of Schema # - # source://json-schema//lib/json-schema/schema.rb#8 + # source://json-schema//lib/json-schema/schema.rb#7 def initialize(schema, uri, parent_validator = T.unsafe(nil)); end # Returns the value of attribute schema. # - # source://json-schema//lib/json-schema/schema.rb#6 + # source://json-schema//lib/json-schema/schema.rb#5 def schema; end # Sets the attribute schema # # @param value the value to set the attribute schema to. # - # source://json-schema//lib/json-schema/schema.rb#6 + # source://json-schema//lib/json-schema/schema.rb#5 def schema=(_arg0); end # @return [JSON::Schema] a new schema matching an array whose items all match this schema. # - # source://json-schema//lib/json-schema/schema.rb#52 + # source://json-schema//lib/json-schema/schema.rb#51 def to_array_schema; end - # source://json-schema//lib/json-schema/schema.rb#58 + # source://json-schema//lib/json-schema/schema.rb#57 def to_s; end # Returns the value of attribute uri. # - # source://json-schema//lib/json-schema/schema.rb#6 + # source://json-schema//lib/json-schema/schema.rb#5 def uri; end # Sets the attribute uri # # @param value the value to set the attribute uri to. # - # source://json-schema//lib/json-schema/schema.rb#6 + # source://json-schema//lib/json-schema/schema.rb#5 def uri=(_arg0); end - # source://json-schema//lib/json-schema/schema.rb#32 + # source://json-schema//lib/json-schema/schema.rb#31 def validate(data, fragments, processor, options = T.unsafe(nil)); end # Returns the value of attribute validator. # - # source://json-schema//lib/json-schema/schema.rb#6 + # source://json-schema//lib/json-schema/schema.rb#5 def validator; end # Sets the attribute validator # # @param value the value to set the attribute validator to. # - # source://json-schema//lib/json-schema/schema.rb#6 + # source://json-schema//lib/json-schema/schema.rb#5 def validator=(_arg0); end class << self - # source://json-schema//lib/json-schema/schema.rb#36 + # source://json-schema//lib/json-schema/schema.rb#35 def stringify(schema); end end end @@ -118,31 +118,31 @@ end # source://json-schema//lib/json-schema/attribute.rb#5 class JSON::Schema::Attribute class << self - # source://json-schema//lib/json-schema/attribute.rb#9 + # source://json-schema//lib/json-schema/attribute.rb#8 def build_fragment(fragments); end # @return [Boolean] # - # source://json-schema//lib/json-schema/attribute.rb#37 + # source://json-schema//lib/json-schema/attribute.rb#36 def data_valid_for_type?(data, type); end # Lookup Schema type of given class instance # - # source://json-schema//lib/json-schema/attribute.rb#43 + # source://json-schema//lib/json-schema/attribute.rb#42 def type_of_data(data); end # source://json-schema//lib/json-schema/attribute.rb#6 def validate(current_schema, data, fragments, processor, validator, options = T.unsafe(nil)); end - # source://json-schema//lib/json-schema/attribute.rb#13 + # source://json-schema//lib/json-schema/attribute.rb#12 def validation_error(processor, message, fragments, current_schema, failed_attribute, record_errors); end - # source://json-schema//lib/json-schema/attribute.rb#22 + # source://json-schema//lib/json-schema/attribute.rb#21 def validation_errors(validator); end end end -# source://json-schema//lib/json-schema/attribute.rb#26 +# source://json-schema//lib/json-schema/attribute.rb#25 JSON::Schema::Attribute::TYPE_CLASS_MAPPINGS = T.let(T.unsafe(nil), Hash) # source://json-schema//lib/json-schema/attributes/const.rb#5 @@ -202,7 +202,7 @@ class JSON::Schema::DependenciesAttribute < ::JSON::Schema::Attribute class << self # @return [Boolean] # - # source://json-schema//lib/json-schema/attributes/dependencies.rb#33 + # source://json-schema//lib/json-schema/attributes/dependencies.rb#34 def accept_value?(value); end # source://json-schema//lib/json-schema/attributes/dependencies.rb#6 @@ -242,43 +242,43 @@ class JSON::Schema::DivisibleByAttribute < ::JSON::Schema::Attribute end end -# source://json-schema//lib/json-schema/validators/draft1.rb#6 +# source://json-schema//lib/json-schema/validators/draft1.rb#5 class JSON::Schema::Draft1 < ::JSON::Schema::Validator # @return [Draft1] a new instance of Draft1 # - # source://json-schema//lib/json-schema/validators/draft1.rb#7 + # source://json-schema//lib/json-schema/validators/draft1.rb#6 def initialize; end end -# source://json-schema//lib/json-schema/validators/draft2.rb#6 +# source://json-schema//lib/json-schema/validators/draft2.rb#5 class JSON::Schema::Draft2 < ::JSON::Schema::Validator # @return [Draft2] a new instance of Draft2 # - # source://json-schema//lib/json-schema/validators/draft2.rb#7 + # source://json-schema//lib/json-schema/validators/draft2.rb#6 def initialize; end end -# source://json-schema//lib/json-schema/validators/draft3.rb#6 +# source://json-schema//lib/json-schema/validators/draft3.rb#5 class JSON::Schema::Draft3 < ::JSON::Schema::Validator # @return [Draft3] a new instance of Draft3 # - # source://json-schema//lib/json-schema/validators/draft3.rb#7 + # source://json-schema//lib/json-schema/validators/draft3.rb#6 def initialize; end end -# source://json-schema//lib/json-schema/validators/draft4.rb#6 +# source://json-schema//lib/json-schema/validators/draft4.rb#5 class JSON::Schema::Draft4 < ::JSON::Schema::Validator # @return [Draft4] a new instance of Draft4 # - # source://json-schema//lib/json-schema/validators/draft4.rb#7 + # source://json-schema//lib/json-schema/validators/draft4.rb#6 def initialize; end end -# source://json-schema//lib/json-schema/validators/draft6.rb#6 +# source://json-schema//lib/json-schema/validators/draft6.rb#5 class JSON::Schema::Draft6 < ::JSON::Schema::Validator # @return [Draft6] a new instance of Draft6 # - # source://json-schema//lib/json-schema/validators/draft6.rb#7 + # source://json-schema//lib/json-schema/validators/draft6.rb#6 def initialize; end end @@ -309,43 +309,43 @@ class JSON::Schema::FormatAttribute < ::JSON::Schema::Attribute end end -# source://json-schema//lib/json-schema/validators/hyper-draft1.rb#4 +# source://json-schema//lib/json-schema/validators/hyper-draft1.rb#3 class JSON::Schema::HyperDraft1 < ::JSON::Schema::Draft1 # @return [HyperDraft1] a new instance of HyperDraft1 # - # source://json-schema//lib/json-schema/validators/hyper-draft1.rb#5 + # source://json-schema//lib/json-schema/validators/hyper-draft1.rb#4 def initialize; end end -# source://json-schema//lib/json-schema/validators/hyper-draft2.rb#4 +# source://json-schema//lib/json-schema/validators/hyper-draft2.rb#3 class JSON::Schema::HyperDraft2 < ::JSON::Schema::Draft2 # @return [HyperDraft2] a new instance of HyperDraft2 # - # source://json-schema//lib/json-schema/validators/hyper-draft2.rb#5 + # source://json-schema//lib/json-schema/validators/hyper-draft2.rb#4 def initialize; end end -# source://json-schema//lib/json-schema/validators/hyper-draft3.rb#4 +# source://json-schema//lib/json-schema/validators/hyper-draft3.rb#3 class JSON::Schema::HyperDraft3 < ::JSON::Schema::Draft3 # @return [HyperDraft3] a new instance of HyperDraft3 # - # source://json-schema//lib/json-schema/validators/hyper-draft3.rb#5 + # source://json-schema//lib/json-schema/validators/hyper-draft3.rb#4 def initialize; end end -# source://json-schema//lib/json-schema/validators/hyper-draft4.rb#4 +# source://json-schema//lib/json-schema/validators/hyper-draft4.rb#3 class JSON::Schema::HyperDraft4 < ::JSON::Schema::Draft4 # @return [HyperDraft4] a new instance of HyperDraft4 # - # source://json-schema//lib/json-schema/validators/hyper-draft4.rb#5 + # source://json-schema//lib/json-schema/validators/hyper-draft4.rb#4 def initialize; end end -# source://json-schema//lib/json-schema/validators/hyper-draft6.rb#4 +# source://json-schema//lib/json-schema/validators/hyper-draft6.rb#3 class JSON::Schema::HyperDraft6 < ::JSON::Schema::Draft6 # @return [HyperDraft6] a new instance of HyperDraft6 # - # source://json-schema//lib/json-schema/validators/hyper-draft6.rb#5 + # source://json-schema//lib/json-schema/validators/hyper-draft6.rb#4 def initialize; end end @@ -656,7 +656,7 @@ class JSON::Schema::PropertiesOptionalAttribute < ::JSON::Schema::Attribute end end -# source://json-schema//lib/json-schema/attributes/properties_v4.rb#5 +# source://json-schema//lib/json-schema/attributes/properties_v4.rb#7 class JSON::Schema::PropertiesV4Attribute < ::JSON::Schema::PropertiesAttribute class << self # draft4 relies on its own RequiredAttribute validation at a higher level, rather than @@ -669,9 +669,17 @@ class JSON::Schema::PropertiesV4Attribute < ::JSON::Schema::PropertiesAttribute end end +# source://json-schema//lib/json-schema/attributes/propertynames.rb#5 +class JSON::Schema::PropertyNames < ::JSON::Schema::Attribute + class << self + # source://json-schema//lib/json-schema/attributes/propertynames.rb#6 + def validate(current_schema, data, fragments, processor, validator, options = T.unsafe(nil)); end + end +end + # Base for any reading exceptions encountered by {JSON::Schema::Reader} # -# source://json-schema//lib/json-schema/schema/reader.rb#7 +# source://json-schema//lib/json-schema/schema/reader.rb#8 class JSON::Schema::ReadError < ::StandardError # @return [ReadError] a new instance of ReadError # @@ -696,11 +704,11 @@ end # Raised by {JSON::Schema::Reader} when an attempt to read a schema fails # -# source://json-schema//lib/json-schema/schema/reader.rb#37 +# source://json-schema//lib/json-schema/schema/reader.rb#38 class JSON::Schema::ReadFailed < ::JSON::Schema::ReadError private - # source://json-schema//lib/json-schema/schema/reader.rb#39 + # source://json-schema//lib/json-schema/schema/reader.rb#41 def error_message; end end @@ -711,7 +719,7 @@ end class JSON::Schema::ReadRefused < ::JSON::Schema::ReadError private - # source://json-schema//lib/json-schema/schema/reader.rb#31 + # source://json-schema//lib/json-schema/schema/reader.rb#32 def error_message; end end @@ -720,7 +728,7 @@ end # # This default reader will read schemas from the filesystem or from a URI. # -# source://json-schema//lib/json-schema/schema/reader.rb#48 +# source://json-schema//lib/json-schema/schema/reader.rb#50 class JSON::Schema::Reader # The behavior of the schema reader can be controlled by providing # callbacks to determine whether to permit reading referenced schemas. @@ -746,19 +754,19 @@ class JSON::Schema::Reader # @param options [Hash] # @return [Reader] a new instance of Reader # - # source://json-schema//lib/json-schema/schema/reader.rb#73 + # source://json-schema//lib/json-schema/schema/reader.rb#75 def initialize(options = T.unsafe(nil)); end # @param pathname [Pathname] # @return [Boolean] # - # source://json-schema//lib/json-schema/schema/reader.rb#109 + # source://json-schema//lib/json-schema/schema/reader.rb#111 def accept_file?(pathname); end # @param uri [Addressable::URI] # @return [Boolean] # - # source://json-schema//lib/json-schema/schema/reader.rb#99 + # source://json-schema//lib/json-schema/schema/reader.rb#101 def accept_uri?(uri); end # @param location [#to_s] The location from which to read the schema @@ -769,15 +777,15 @@ class JSON::Schema::Reader # attempt to retrieve it failed # @return [JSON::Schema] # - # source://json-schema//lib/json-schema/schema/reader.rb#85 + # source://json-schema//lib/json-schema/schema/reader.rb#87 def read(location); end private - # source://json-schema//lib/json-schema/schema/reader.rb#129 + # source://json-schema//lib/json-schema/schema/reader.rb#131 def read_file(pathname); end - # source://json-schema//lib/json-schema/schema/reader.rb#119 + # source://json-schema//lib/json-schema/schema/reader.rb#121 def read_uri(uri); end end @@ -820,7 +828,7 @@ JSON::Schema::TimeFormat::REGEXP = T.let(T.unsafe(nil), Regexp) # source://json-schema//lib/json-schema/attributes/type.rb#5 class JSON::Schema::TypeAttribute < ::JSON::Schema::Attribute class << self - # source://json-schema//lib/json-schema/attributes/type.rb#68 + # source://json-schema//lib/json-schema/attributes/type.rb#69 def list_types(types); end # source://json-schema//lib/json-schema/attributes/type.rb#6 @@ -898,7 +906,7 @@ class JSON::Schema::ValidationError < ::StandardError # source://json-schema//lib/json-schema/errors/validation_error.rb#5 def message=(_arg0); end - # source://json-schema//lib/json-schema/errors/validation_error.rb#41 + # source://json-schema//lib/json-schema/errors/validation_error.rb#40 def message_with_schema; end # Returns the value of attribute schema. @@ -1045,20 +1053,20 @@ JSON::Util::URI::SUPPORTED_PROTOCOLS = T.let(T.unsafe(nil), Array) # Pure ruby UUID generator, which is compatible with RFC4122 # -# source://json-schema//lib/json-schema/util/uuid.rb#35 +# source://json-schema//lib/json-schema/util/uuid.rb#33 class JSON::Util::UUID < ::Struct include ::Comparable # UUIDs are comparable (don't know what benefits are there, though). # - # source://json-schema//lib/json-schema/util/uuid.rb#270 + # source://json-schema//lib/json-schema/util/uuid.rb#271 def <=>(other); end # Two UUIDs are said to be equal if and only if their (byte-order # canonicalized) integer representations are equivallent. Refer RFC4122 for # details. # - # source://json-schema//lib/json-schema/util/uuid.rb#264 + # source://json-schema//lib/json-schema/util/uuid.rb#265 def ==(other); end # Generate the string representation (a.k.a GUID) of this UUID @@ -1203,7 +1211,7 @@ class JSON::Util::UUID < ::Struct # :nodoc # - # source://json-schema//lib/json-schema/util/uuid.rb#41 + # source://json-schema//lib/json-schema/util/uuid.rb#40 def mask19(v, str); end def new(*_arg0); end @@ -1218,177 +1226,177 @@ end # Pre-defined UUID Namespaces described in RFC4122 Appendix C. # -# source://json-schema//lib/json-schema/util/uuid.rb#275 +# source://json-schema//lib/json-schema/util/uuid.rb#276 JSON::Util::UUID::NameSpace_DNS = T.let(T.unsafe(nil), JSON::Util::UUID) -# source://json-schema//lib/json-schema/util/uuid.rb#277 +# source://json-schema//lib/json-schema/util/uuid.rb#278 JSON::Util::UUID::NameSpace_OID = T.let(T.unsafe(nil), JSON::Util::UUID) -# source://json-schema//lib/json-schema/util/uuid.rb#276 +# source://json-schema//lib/json-schema/util/uuid.rb#277 JSON::Util::UUID::NameSpace_URL = T.let(T.unsafe(nil), JSON::Util::UUID) -# source://json-schema//lib/json-schema/util/uuid.rb#278 +# source://json-schema//lib/json-schema/util/uuid.rb#279 JSON::Util::UUID::NameSpace_X500 = T.let(T.unsafe(nil), JSON::Util::UUID) # The Nil UUID in RFC4122 Section 4.1.7 # -# source://json-schema//lib/json-schema/util/uuid.rb#281 +# source://json-schema//lib/json-schema/util/uuid.rb#282 JSON::Util::UUID::Nil = T.let(T.unsafe(nil), JSON::Util::UUID) -# source://json-schema//lib/json-schema/validator.rb#19 +# source://json-schema//lib/json-schema/validator.rb#18 class JSON::Validator # @return [Validator] a new instance of Validator # - # source://json-schema//lib/json-schema/validator.rb#41 - def initialize(schema_data, data, opts = T.unsafe(nil)); end + # source://json-schema//lib/json-schema/validator.rb#42 + def initialize(schema_data, opts = T.unsafe(nil)); end # Build all schemas with IDs, mapping out the namespace # - # source://json-schema//lib/json-schema/validator.rb#140 + # source://json-schema//lib/json-schema/validator.rb#149 def build_schemas(parent_schema); end # Either load a reference schema or create a new schema # - # source://json-schema//lib/json-schema/validator.rb#209 + # source://json-schema//lib/json-schema/validator.rb#220 def handle_schema(parent_schema, obj); end - # source://json-schema//lib/json-schema/validator.rb#127 + # source://json-schema//lib/json-schema/validator.rb#136 def load_ref_schema(parent_schema, ref); end - # source://json-schema//lib/json-schema/validator.rb#71 + # source://json-schema//lib/json-schema/validator.rb#76 def schema_from_fragment(base_schema, fragment); end # Run a simple true/false validation of data against a schema # - # source://json-schema//lib/json-schema/validator.rb#106 - def validate; end + # source://json-schema//lib/json-schema/validator.rb#111 + def validate(data); end - # source://json-schema//lib/json-schema/validator.rb#220 + # source://json-schema//lib/json-schema/validator.rb#231 def validation_error(error); end - # source://json-schema//lib/json-schema/validator.rb#224 + # source://json-schema//lib/json-schema/validator.rb#235 def validation_errors; end private - # source://json-schema//lib/json-schema/validator.rb#584 + # source://json-schema//lib/json-schema/validator.rb#597 def custom_open(uri); end - # source://json-schema//lib/json-schema/validator.rb#510 + # source://json-schema//lib/json-schema/validator.rb#521 def fake_uuid(schema); end - # source://json-schema//lib/json-schema/validator.rb#561 + # source://json-schema//lib/json-schema/validator.rb#572 def initialize_data(data); end - # source://json-schema//lib/json-schema/validator.rb#514 + # source://json-schema//lib/json-schema/validator.rb#525 def initialize_schema(schema, default_validator); end - # source://json-schema//lib/json-schema/validator.rb#502 + # source://json-schema//lib/json-schema/validator.rb#513 def serialize(schema); end class << self - # source://json-schema//lib/json-schema/validator.rb#299 + # source://json-schema//lib/json-schema/validator.rb#309 def add_schema(schema); end - # source://json-schema//lib/json-schema/validator.rb#318 + # source://json-schema//lib/json-schema/validator.rb#328 def cache_schemas=(val); end - # source://json-schema//lib/json-schema/validator.rb#290 + # source://json-schema//lib/json-schema/validator.rb#300 def clear_cache; end - # source://json-schema//lib/json-schema/validator.rb#327 + # source://json-schema//lib/json-schema/validator.rb#337 def default_validator; end - # source://json-schema//lib/json-schema/validator.rb#376 + # source://json-schema//lib/json-schema/validator.rb#388 def deregister_format_validator(format, versions = T.unsafe(nil)); end - # source://json-schema//lib/json-schema/validator.rb#264 + # source://json-schema//lib/json-schema/validator.rb#274 def fully_validate(schema, data, opts = T.unsafe(nil)); end - # source://json-schema//lib/json-schema/validator.rb#274 + # source://json-schema//lib/json-schema/validator.rb#284 def fully_validate_json(schema, data, opts = T.unsafe(nil)); end - # source://json-schema//lib/json-schema/validator.rb#268 + # source://json-schema//lib/json-schema/validator.rb#278 def fully_validate_schema(schema, opts = T.unsafe(nil)); end - # source://json-schema//lib/json-schema/validator.rb#278 + # source://json-schema//lib/json-schema/validator.rb#288 def fully_validate_uri(schema, data, opts = T.unsafe(nil)); end - # source://json-schema//lib/json-schema/validator.rb#390 + # source://json-schema//lib/json-schema/validator.rb#402 def json_backend; end - # source://json-schema//lib/json-schema/validator.rb#398 + # source://json-schema//lib/json-schema/validator.rb#410 def json_backend=(backend); end - # source://json-schema//lib/json-schema/validator.rb#441 + # source://json-schema//lib/json-schema/validator.rb#453 def merge_missing_values(source, destination); end - # source://json-schema//lib/json-schema/validator.rb#412 + # source://json-schema//lib/json-schema/validator.rb#424 def parse(s); end - # source://json-schema//lib/json-schema/validator.rb#364 + # source://json-schema//lib/json-schema/validator.rb#376 def register_default_validator(v); end - # source://json-schema//lib/json-schema/validator.rb#368 + # source://json-schema//lib/json-schema/validator.rb#380 def register_format_validator(format, validation_proc, versions = T.unsafe(nil)); end - # source://json-schema//lib/json-schema/validator.rb#360 + # source://json-schema//lib/json-schema/validator.rb#372 def register_validator(v); end - # source://json-schema//lib/json-schema/validator.rb#383 + # source://json-schema//lib/json-schema/validator.rb#395 def restore_default_formats(versions = T.unsafe(nil)); end - # source://json-schema//lib/json-schema/validator.rb#303 + # source://json-schema//lib/json-schema/validator.rb#313 def schema_for_uri(uri); end - # source://json-schema//lib/json-schema/validator.rb#313 + # source://json-schema//lib/json-schema/validator.rb#323 def schema_key_for(uri); end # @return [Boolean] # - # source://json-schema//lib/json-schema/validator.rb#309 + # source://json-schema//lib/json-schema/validator.rb#319 def schema_loaded?(schema_uri); end - # source://json-schema//lib/json-schema/validator.rb#282 + # source://json-schema//lib/json-schema/validator.rb#292 def schema_reader; end - # source://json-schema//lib/json-schema/validator.rb#286 + # source://json-schema//lib/json-schema/validator.rb#296 def schema_reader=(reader); end - # source://json-schema//lib/json-schema/validator.rb#295 + # source://json-schema//lib/json-schema/validator.rb#305 def schemas; end - # source://json-schema//lib/json-schema/validator.rb#230 + # source://json-schema//lib/json-schema/validator.rb#240 def validate(schema, data, opts = T.unsafe(nil)); end - # source://json-schema//lib/json-schema/validator.rb#246 + # source://json-schema//lib/json-schema/validator.rb#256 def validate!(schema, data, opts = T.unsafe(nil)); end - # source://json-schema//lib/json-schema/validator.rb#251 + # source://json-schema//lib/json-schema/validator.rb#261 def validate2(schema, data, opts = T.unsafe(nil)); end - # source://json-schema//lib/json-schema/validator.rb#238 + # source://json-schema//lib/json-schema/validator.rb#248 def validate_json(schema, data, opts = T.unsafe(nil)); end - # source://json-schema//lib/json-schema/validator.rb#256 + # source://json-schema//lib/json-schema/validator.rb#266 def validate_json!(schema, data, opts = T.unsafe(nil)); end - # source://json-schema//lib/json-schema/validator.rb#242 + # source://json-schema//lib/json-schema/validator.rb#252 def validate_uri(schema, data, opts = T.unsafe(nil)); end - # source://json-schema//lib/json-schema/validator.rb#260 + # source://json-schema//lib/json-schema/validator.rb#270 def validate_uri!(schema, data, opts = T.unsafe(nil)); end - # source://json-schema//lib/json-schema/validator.rb#355 + # source://json-schema//lib/json-schema/validator.rb#367 def validator_for(schema_uri); end - # source://json-schema//lib/json-schema/validator.rb#342 + # source://json-schema//lib/json-schema/validator.rb#353 def validator_for_name(schema_name, raise_not_found = T.unsafe(nil)); end - # source://json-schema//lib/json-schema/validator.rb#331 + # source://json-schema//lib/json-schema/validator.rb#341 def validator_for_uri(schema_uri, raise_not_found = T.unsafe(nil)); end - # source://json-schema//lib/json-schema/validator.rb#323 + # source://json-schema//lib/json-schema/validator.rb#333 def validators; end end end diff --git a/gem/sorbet/rbi/gems/json@2.6.2.rbi b/gem/sorbet/rbi/gems/json@2.7.1.rbi similarity index 93% rename from gem/sorbet/rbi/gems/json@2.6.2.rbi rename to gem/sorbet/rbi/gems/json@2.7.1.rbi index b379bc4b..e22ce040 100644 --- a/gem/sorbet/rbi/gems/json@2.6.2.rbi +++ b/gem/sorbet/rbi/gems/json@2.7.1.rbi @@ -1,4 +1,4 @@ -# typed: true +# typed: false # DO NOT EDIT MANUALLY # This is an autogenerated file for types exported from the `json` gem. @@ -6,7 +6,7 @@ # Extends any Class to include _json_creatable?_ method. # -# source://json//lib/json/common.rb#695 +# source://json//lib/json/common.rb#689 class Class < ::Module # Returns true if this class can be used to create an instance # from a serialised JSON string. The class has to implement a class @@ -15,7 +15,7 @@ class Class < ::Module # # @return [Boolean] # - # source://json//lib/json/common.rb#700 + # source://json//lib/json/common.rb#694 def json_creatable?; end end @@ -302,6 +302,15 @@ end # # Raises JSON::NestingError (nesting of 2 is too deep): # JSON.generate(obj, max_nesting: 2) # +# ====== Escaping Options +# +# Options +script_safe+ (boolean) specifies wether '\u2028', '\u2029' +# and '/' should be escaped as to make the JSON object safe to interpolate in script +# tags. +# +# Options +ascii_only+ (boolean) specifies wether all characters outside the ASCII range +# should be escaped. +# # ====== Output Options # # The default formatting options generate the most compact @@ -621,8 +630,8 @@ module JSON # Output: # {"foo":[0,1],"bar":{"baz":2,"bat":3},"bam":"bad"} # - # source://json//lib/json/common.rb#631 - def dump(obj, anIO = T.unsafe(nil), limit = T.unsafe(nil)); end + # source://json//lib/json/common.rb#614 + def dump(obj, anIO = T.unsafe(nil), limit = T.unsafe(nil), kwargs = T.unsafe(nil)); end # :call-seq: # JSON.fast_generate(obj, opts) -> new_string @@ -638,13 +647,13 @@ module JSON # # Raises SystemStackError (stack level too deep): # JSON.fast_generate(a) # - # source://json//lib/json/common.rb#335 + # source://json//lib/json/common.rb#328 def fast_generate(obj, opts = T.unsafe(nil)); end # :stopdoc: # I want to deprecate these later, so I'll first be silent about them, and later delete them. # - # source://json//lib/json/common.rb#335 + # source://json//lib/json/common.rb#328 def fast_unparse(obj, opts = T.unsafe(nil)); end # :call-seq: @@ -683,7 +692,7 @@ module JSON # # Raises JSON::NestingError (nesting of 100 is too deep): # JSON.generate(a) # - # source://json//lib/json/common.rb#296 + # source://json//lib/json/common.rb#299 def generate(obj, opts = T.unsafe(nil)); end # :call-seq: @@ -814,7 +823,7 @@ module JSON # #"Admin", "password"=>"0wn3d"}>} # - # source://json//lib/json/common.rb#557 + # source://json//lib/json/common.rb#540 def load(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end # :call-seq: @@ -825,7 +834,7 @@ module JSON # # See method #parse. # - # source://json//lib/json/common.rb#245 + # source://json//lib/json/common.rb#248 def load_file(filespec, opts = T.unsafe(nil)); end # :call-seq: @@ -836,9 +845,12 @@ module JSON # # See method #parse! # - # source://json//lib/json/common.rb#256 + # source://json//lib/json/common.rb#259 def load_file!(filespec, opts = T.unsafe(nil)); end + # source://json//lib/json/common.rb#642 + def merge_dump_options(opts, strict: T.unsafe(nil)); end + # :call-seq: # JSON.parse(source, opts) -> object # @@ -887,7 +899,7 @@ module JSON # # Raises JSON::ParserError (783: unexpected token at ''): # JSON.parse('') # - # source://json//lib/json/common.rb#215 + # source://json//lib/json/common.rb#218 def parse(source, opts = T.unsafe(nil)); end # :call-seq: @@ -902,7 +914,7 @@ module JSON # which disables checking for nesting depth. # - Option +allow_nan+, if not provided, defaults to +true+. # - # source://json//lib/json/common.rb#230 + # source://json//lib/json/common.rb#233 def parse!(source, opts = T.unsafe(nil)); end # :call-seq: @@ -935,28 +947,28 @@ module JSON # } # } # - # source://json//lib/json/common.rb#390 + # source://json//lib/json/common.rb#373 def pretty_generate(obj, opts = T.unsafe(nil)); end # :stopdoc: # I want to deprecate these later, so I'll first be silent about them, and later delete them. # - # source://json//lib/json/common.rb#390 + # source://json//lib/json/common.rb#373 def pretty_unparse(obj, opts = T.unsafe(nil)); end # Recursively calls passed _Proc_ if the parsed data structure is an _Array_ or _Hash_ # - # source://json//lib/json/common.rb#575 + # source://json//lib/json/common.rb#558 def recurse_proc(result, &proc); end - # source://json//lib/json/common.rb#557 + # source://json//lib/json/common.rb#540 def restore(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end # :stopdoc: # I want to deprecate these later, so I'll first be silent about them, and # later delete them. # - # source://json//lib/json/common.rb#296 + # source://json//lib/json/common.rb#299 def unparse(obj, opts = T.unsafe(nil)); end class << self @@ -972,26 +984,26 @@ module JSON # ruby = [0, 1, nil] # JSON[ruby] # => '[0,1,null]' # - # source://json//lib/json/common.rb#18 + # source://json//lib/json/common.rb#21 def [](object, opts = T.unsafe(nil)); end - # source://json//lib/json/common.rb#81 + # source://json//lib/json/common.rb#84 def create_fast_state; end # Returns the current create identifier. # See also JSON.create_id=. # - # source://json//lib/json/common.rb#126 + # source://json//lib/json/common.rb#129 def create_id; end # Sets create identifier, which is used to decide if the _json_create_ # hook of a class should be called; initial value is +json_class+: # JSON.create_id # => 'json_class' # - # source://json//lib/json/common.rb#120 + # source://json//lib/json/common.rb#123 def create_id=(new_value); end - # source://json//lib/json/common.rb#91 + # source://json//lib/json/common.rb#94 def create_pretty_state; end # Return the constant located at _path_. The format of _path_ has to be @@ -999,7 +1011,7 @@ module JSON # level (absolute namespace path?). If there doesn't exist a constant at # the given path, an ArgumentError is raised. # - # source://json//lib/json/common.rb#42 + # source://json//lib/json/common.rb#45 def deep_const_get(path); end # :call-seq: @@ -1030,23 +1042,23 @@ module JSON # Output: # {"foo":[0,1],"bar":{"baz":2,"bat":3},"bam":"bad"} # - # source://json//lib/json/common.rb#631 - def dump(obj, anIO = T.unsafe(nil), limit = T.unsafe(nil)); end + # source://json//lib/json/common.rb#614 + def dump(obj, anIO = T.unsafe(nil), limit = T.unsafe(nil), kwargs = T.unsafe(nil)); end # Sets or returns the default options for the JSON.dump method. # Initially: # opts = JSON.dump_default_options - # opts # => {:max_nesting=>false, :allow_nan=>true, :escape_slash=>false} + # opts # => {:max_nesting=>false, :allow_nan=>true, :script_safe=>false} # - # source://json//lib/json/common.rb#596 + # source://json//lib/json/common.rb#579 def dump_default_options; end # Sets or returns the default options for the JSON.dump method. # Initially: # opts = JSON.dump_default_options - # opts # => {:max_nesting=>false, :allow_nan=>true, :escape_slash=>false} + # opts # => {:max_nesting=>false, :allow_nan=>true, :script_safe=>false} # - # source://json//lib/json/common.rb#596 + # source://json//lib/json/common.rb#579 def dump_default_options=(_arg0); end # :call-seq: @@ -1063,13 +1075,13 @@ module JSON # # Raises SystemStackError (stack level too deep): # JSON.fast_generate(a) # - # source://json//lib/json/common.rb#335 + # source://json//lib/json/common.rb#328 def fast_generate(obj, opts = T.unsafe(nil)); end # :stopdoc: # I want to deprecate these later, so I'll first be silent about them, and later delete them. # - # source://json//lib/json/common.rb#335 + # source://json//lib/json/common.rb#328 def fast_unparse(obj, opts = T.unsafe(nil)); end # :call-seq: @@ -1108,24 +1120,24 @@ module JSON # # Raises JSON::NestingError (nesting of 100 is too deep): # JSON.generate(a) # - # source://json//lib/json/common.rb#296 + # source://json//lib/json/common.rb#299 def generate(obj, opts = T.unsafe(nil)); end # Returns the JSON generator module that is used by JSON. This is # either JSON::Ext::Generator or JSON::Pure::Generator: # JSON.generator # => JSON::Ext::Generator # - # source://json//lib/json/common.rb#103 + # source://json//lib/json/common.rb#106 def generator; end # Set the module _generator_ to be used by JSON. # - # source://json//lib/json/common.rb#58 + # source://json//lib/json/common.rb#61 def generator=(generator); end # Encodes string using String.encode. # - # source://json//lib/json/common.rb#653 + # source://json//lib/json/common.rb#638 def iconv(to, from, string); end # :call-seq: @@ -1256,7 +1268,7 @@ module JSON # #"Admin", "password"=>"0wn3d"}>} # - # source://json//lib/json/common.rb#557 + # source://json//lib/json/common.rb#540 def load(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end # Sets or returns default options for the JSON.load method. @@ -1264,7 +1276,7 @@ module JSON # opts = JSON.load_default_options # opts # => {:max_nesting=>false, :allow_nan=>true, :allow_blank=>true, :create_additions=>true} # - # source://json//lib/json/common.rb#420 + # source://json//lib/json/common.rb#403 def load_default_options; end # Sets or returns default options for the JSON.load method. @@ -1272,7 +1284,7 @@ module JSON # opts = JSON.load_default_options # opts # => {:max_nesting=>false, :allow_nan=>true, :allow_blank=>true, :create_additions=>true} # - # source://json//lib/json/common.rb#420 + # source://json//lib/json/common.rb#403 def load_default_options=(_arg0); end # :call-seq: @@ -1283,7 +1295,7 @@ module JSON # # See method #parse. # - # source://json//lib/json/common.rb#245 + # source://json//lib/json/common.rb#248 def load_file(filespec, opts = T.unsafe(nil)); end # :call-seq: @@ -1294,7 +1306,7 @@ module JSON # # See method #parse! # - # source://json//lib/json/common.rb#256 + # source://json//lib/json/common.rb#259 def load_file!(filespec, opts = T.unsafe(nil)); end # :call-seq: @@ -1345,7 +1357,7 @@ module JSON # # Raises JSON::ParserError (783: unexpected token at ''): # JSON.parse('') # - # source://json//lib/json/common.rb#215 + # source://json//lib/json/common.rb#218 def parse(source, opts = T.unsafe(nil)); end # :call-seq: @@ -1360,19 +1372,19 @@ module JSON # which disables checking for nesting depth. # - Option +allow_nan+, if not provided, defaults to +true+. # - # source://json//lib/json/common.rb#230 + # source://json//lib/json/common.rb#233 def parse!(source, opts = T.unsafe(nil)); end # Returns the JSON parser class that is used by JSON. This is either # JSON::Ext::Parser or JSON::Pure::Parser: # JSON.parser # => JSON::Ext::Parser # - # source://json//lib/json/common.rb#29 + # source://json//lib/json/common.rb#32 def parser; end # Set the JSON parser class _parser_ to be used by JSON. # - # source://json//lib/json/common.rb#32 + # source://json//lib/json/common.rb#35 def parser=(parser); end # :call-seq: @@ -1405,50 +1417,55 @@ module JSON # } # } # - # source://json//lib/json/common.rb#390 + # source://json//lib/json/common.rb#373 def pretty_generate(obj, opts = T.unsafe(nil)); end # :stopdoc: # I want to deprecate these later, so I'll first be silent about them, and later delete them. # - # source://json//lib/json/common.rb#390 + # source://json//lib/json/common.rb#373 def pretty_unparse(obj, opts = T.unsafe(nil)); end # Recursively calls passed _Proc_ if the parsed data structure is an _Array_ or _Hash_ # - # source://json//lib/json/common.rb#575 + # source://json//lib/json/common.rb#558 def recurse_proc(result, &proc); end - # source://json//lib/json/common.rb#557 + # source://json//lib/json/common.rb#540 def restore(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end # Sets or Returns the JSON generator state class that is used by JSON. This is # either JSON::Ext::Generator::State or JSON::Pure::Generator::State: # JSON.state # => JSON::Ext::Generator::State # - # source://json//lib/json/common.rb#108 + # source://json//lib/json/common.rb#111 def state; end # Sets or Returns the JSON generator state class that is used by JSON. This is # either JSON::Ext::Generator::State or JSON::Pure::Generator::State: # JSON.state # => JSON::Ext::Generator::State # - # source://json//lib/json/common.rb#108 + # source://json//lib/json/common.rb#111 def state=(_arg0); end # :stopdoc: # I want to deprecate these later, so I'll first be silent about them, and # later delete them. # - # source://json//lib/json/common.rb#296 + # source://json//lib/json/common.rb#299 def unparse(obj, opts = T.unsafe(nil)); end + + private + + # source://json//lib/json/common.rb#642 + def merge_dump_options(opts, strict: T.unsafe(nil)); end end end -# source://json//lib/json/common.rb#114 +# source://json//lib/json/common.rb#117 JSON::CREATE_ID_TLS_KEY = T.let(T.unsafe(nil), String) -# source://json//lib/json/common.rb#111 +# source://json//lib/json/common.rb#114 JSON::DEFAULT_CREATE_ID = T.let(T.unsafe(nil), String) # source://json//lib/json/generic_object.rb#5 @@ -1494,26 +1511,29 @@ end # The base exception for JSON errors. # -# source://json//lib/json/common.rb#137 +# source://json//lib/json/common.rb#140 class JSON::JSONError < ::StandardError class << self - # source://json//lib/json/common.rb#138 + # source://json//lib/json/common.rb#141 def wrap(exception); end end end -# source://json//lib/json/common.rb#35 +# source://json//lib/json/common.rb#6 +JSON::NOT_SET = T.let(T.unsafe(nil), Object) + +# source://json//lib/json/common.rb#38 JSON::Parser = JSON::Ext::Parser -# source://json//lib/json/common.rb#73 +# source://json//lib/json/common.rb#76 JSON::State = JSON::Ext::Generator::State # For backwards compatibility # -# source://json//lib/json/common.rb#159 +# source://json//lib/json/common.rb#162 JSON::UnparserError = JSON::GeneratorError -# source://json//lib/json/common.rb#658 +# source://json//lib/json/common.rb#652 module Kernel private @@ -1524,18 +1544,18 @@ module Kernel # The _opts_ argument is passed through to generate/parse respectively. See # generate and parse for their documentation. # - # source://json//lib/json/common.rb#685 + # source://json//lib/json/common.rb#679 def JSON(object, *args); end # Outputs _objs_ to STDOUT as JSON strings in the shortest form, that is in # one line. # - # source://json//lib/json/common.rb#663 + # source://json//lib/json/common.rb#657 def j(*objs); end # Outputs _objs_ to STDOUT as JSON strings in a pretty format, with # indentation and over many lines. # - # source://json//lib/json/common.rb#672 + # source://json//lib/json/common.rb#666 def jj(*objs); end end diff --git a/gem/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi b/gem/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi new file mode 100644 index 00000000..317fd1a2 --- /dev/null +++ b/gem/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi @@ -0,0 +1,8 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `language_server-protocol` gem. +# Please instead update this file by running `bin/tapioca gem language_server-protocol`. + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/gem/sorbet/rbi/gems/minitest-reporters@1.5.0.rbi b/gem/sorbet/rbi/gems/minitest-reporters@1.6.1.rbi similarity index 93% rename from gem/sorbet/rbi/gems/minitest-reporters@1.5.0.rbi rename to gem/sorbet/rbi/gems/minitest-reporters@1.6.1.rbi index a747787b..2900bf4c 100644 --- a/gem/sorbet/rbi/gems/minitest-reporters@1.5.0.rbi +++ b/gem/sorbet/rbi/gems/minitest-reporters@1.6.1.rbi @@ -7,73 +7,79 @@ # source://minitest-reporters//lib/minitest/reporters.rb#3 module Minitest class << self - # source://minitest/5.16.2/lib/minitest.rb#173 + # source://minitest/5.21.2/lib/minitest.rb#176 def __run(reporter, options); end - # source://minitest/5.16.2/lib/minitest.rb#94 + # source://minitest/5.21.2/lib/minitest.rb#97 def after_run(&block); end - # source://minitest/5.16.2/lib/minitest.rb#66 + # source://minitest/5.21.2/lib/minitest.rb#19 + def allow_fork; end + + # source://minitest/5.21.2/lib/minitest.rb#19 + def allow_fork=(_arg0); end + + # source://minitest/5.21.2/lib/minitest.rb#69 def autorun; end - # source://minitest/5.16.2/lib/minitest.rb#19 + # source://minitest/5.21.2/lib/minitest.rb#19 def backtrace_filter; end - # source://minitest/5.16.2/lib/minitest.rb#19 + # source://minitest/5.21.2/lib/minitest.rb#19 def backtrace_filter=(_arg0); end - # source://minitest/5.16.2/lib/minitest.rb#18 + # source://minitest/5.21.2/lib/minitest.rb#18 def cattr_accessor(name); end - # source://minitest/5.16.2/lib/minitest.rb#1067 + # source://minitest/5.21.2/lib/minitest.rb#1134 def clock_time; end - # source://minitest/5.16.2/lib/minitest.rb#19 + # source://minitest/5.21.2/lib/minitest.rb#19 def extensions; end - # source://minitest/5.16.2/lib/minitest.rb#19 + # source://minitest/5.21.2/lib/minitest.rb#19 def extensions=(_arg0); end - # source://minitest/5.16.2/lib/minitest.rb#264 + # source://minitest/5.21.2/lib/minitest.rb#271 def filter_backtrace(bt); end - # source://minitest/5.16.2/lib/minitest.rb#19 + # source://minitest/5.21.2/lib/minitest.rb#19 def info_signal; end - # source://minitest/5.16.2/lib/minitest.rb#19 + # source://minitest/5.21.2/lib/minitest.rb#19 def info_signal=(_arg0); end - # source://minitest/5.16.2/lib/minitest.rb#98 + # source://minitest/5.21.2/lib/minitest.rb#101 def init_plugins(options); end - # source://minitest/5.16.2/lib/minitest.rb#105 + # source://minitest/5.21.2/lib/minitest.rb#108 def load_plugins; end - # source://minitest/5.16.2/lib/minitest.rb#19 + # source://minitest/5.21.2/lib/minitest.rb#19 def parallel_executor; end - # source://minitest/5.16.2/lib/minitest.rb#19 + # source://minitest/5.21.2/lib/minitest.rb#19 def parallel_executor=(_arg0); end - # source://minitest/5.16.2/lib/minitest.rb#186 + # source://minitest/5.21.2/lib/minitest.rb#189 def process_args(args = T.unsafe(nil)); end - # source://minitest/5.16.2/lib/minitest.rb#19 + # source://minitest/5.21.2/lib/minitest.rb#19 def reporter; end - # source://minitest/5.16.2/lib/minitest.rb#19 + # source://minitest/5.21.2/lib/minitest.rb#19 def reporter=(_arg0); end - # source://minitest/5.16.2/lib/minitest.rb#140 + # source://minitest/5.21.2/lib/minitest.rb#143 def run(args = T.unsafe(nil)); end - # source://minitest/5.16.2/lib/minitest.rb#1058 + # source://minitest/5.21.2/lib/minitest.rb#1125 def run_one_method(klass, method_name); end - # source://minitest/5.16.2/lib/minitest.rb#19 + # source://minitest/5.21.2/lib/minitest.rb#19 def seed; end - # source://minitest/5.16.2/lib/minitest.rb#19 + # source://minitest/5.21.2/lib/minitest.rb#19 def seed=(_arg0); end end end @@ -401,7 +407,7 @@ end # The report is generated using ERB. A custom ERB template can be provided but it is not required # The default ERB template uses JQuery and Bootstrap, both of these are included by referencing the CDN sites # -# source://minitest-reporters//lib/minitest/reporters/html_reporter.rb#20 +# source://minitest-reporters//lib/minitest/reporters/html_reporter.rb#21 class Minitest::Reporters::HtmlReporter < ::Minitest::Reporters::BaseReporter # The constructor takes a hash, and uses the following keys: # :title - the title that will be used in the report, defaults to 'Test Results' @@ -412,12 +418,12 @@ class Minitest::Reporters::HtmlReporter < ::Minitest::Reporters::BaseReporter # # @return [HtmlReporter] a new instance of HtmlReporter # - # source://minitest-reporters//lib/minitest/reporters/html_reporter.rb#57 + # source://minitest-reporters//lib/minitest/reporters/html_reporter.rb#60 def initialize(args = T.unsafe(nil)); end # Trims off the number prefix on test names when using Minitest Specs # - # source://minitest-reporters//lib/minitest/reporters/html_reporter.rb#45 + # source://minitest-reporters//lib/minitest/reporters/html_reporter.rb#48 def friendly_name(test); end # The number of tests that passed @@ -427,7 +433,7 @@ class Minitest::Reporters::HtmlReporter < ::Minitest::Reporters::BaseReporter # The percentage of tests that failed # - # source://minitest-reporters//lib/minitest/reporters/html_reporter.rb#40 + # source://minitest-reporters//lib/minitest/reporters/html_reporter.rb#43 def percent_errors_failures; end # The percentage of tests that passed, calculated in a way that avoids rounding errors @@ -436,16 +442,22 @@ class Minitest::Reporters::HtmlReporter < ::Minitest::Reporters::BaseReporter def percent_passes; end # The percentage of tests that were skipped + # Keeping old method name with typo for backwards compatibility in custom templates (for now) # # source://minitest-reporters//lib/minitest/reporters/html_reporter.rb#35 def percent_skipps; end + # The percentage of tests that were skipped + # + # source://minitest-reporters//lib/minitest/reporters/html_reporter.rb#35 + def percent_skips; end + # Called by the framework to generate the report # - # source://minitest-reporters//lib/minitest/reporters/html_reporter.rb#88 + # source://minitest-reporters//lib/minitest/reporters/html_reporter.rb#91 def report; end - # source://minitest-reporters//lib/minitest/reporters/html_reporter.rb#79 + # source://minitest-reporters//lib/minitest/reporters/html_reporter.rb#82 def start; end # The title of the report @@ -459,46 +471,46 @@ class Minitest::Reporters::HtmlReporter < ::Minitest::Reporters::BaseReporter # Test suites which have failing tests are given highest order # Tests suites which have skipped tests are given second highest priority # - # source://minitest-reporters//lib/minitest/reporters/html_reporter.rb#139 + # source://minitest-reporters//lib/minitest/reporters/html_reporter.rb#142 def compare_suites(suite_a, suite_b); end - # source://minitest-reporters//lib/minitest/reporters/html_reporter.rb#128 + # source://minitest-reporters//lib/minitest/reporters/html_reporter.rb#131 def compare_suites_by_name(suite_a, suite_b); end # Tests are first ordered by evaluating the results of the tests, then by tests names # Tess which fail are given highest order # Tests which are skipped are given second highest priority # - # source://minitest-reporters//lib/minitest/reporters/html_reporter.rb#154 + # source://minitest-reporters//lib/minitest/reporters/html_reporter.rb#157 def compare_tests(test_a, test_b); end - # source://minitest-reporters//lib/minitest/reporters/html_reporter.rb#132 + # source://minitest-reporters//lib/minitest/reporters/html_reporter.rb#135 def compare_tests_by_name(test_a, test_b); end - # source://minitest-reporters//lib/minitest/reporters/html_reporter.rb#124 + # source://minitest-reporters//lib/minitest/reporters/html_reporter.rb#127 def html_file; end # taken from the JUnit reporter # - # source://minitest-reporters//lib/minitest/reporters/html_reporter.rb#204 + # source://minitest-reporters//lib/minitest/reporters/html_reporter.rb#207 def location(exception); end # based on message_for(test) from the JUnit reporter # - # source://minitest-reporters//lib/minitest/reporters/html_reporter.rb#187 + # source://minitest-reporters//lib/minitest/reporters/html_reporter.rb#190 def message_for(test); end # based on analyze_suite from the JUnit reporter # - # source://minitest-reporters//lib/minitest/reporters/html_reporter.rb#172 + # source://minitest-reporters//lib/minitest/reporters/html_reporter.rb#175 def summarize_suite(suite, tests); end # @return [Boolean] # - # source://minitest-reporters//lib/minitest/reporters/html_reporter.rb#167 + # source://minitest-reporters//lib/minitest/reporters/html_reporter.rb#170 def test_fail_or_error?(test); end - # source://minitest-reporters//lib/minitest/reporters/html_reporter.rb#213 + # source://minitest-reporters//lib/minitest/reporters/html_reporter.rb#216 def total_time_to_hms; end end @@ -928,27 +940,39 @@ class Minitest::Reporters::SpecReporter < ::Minitest::Reporters::BaseReporter include ::Minitest::Reporters::ANSI::Code include ::Minitest::RelativePosition - # source://minitest-reporters//lib/minitest/reporters/spec_reporter.rb#29 + # The constructor takes an `options` hash + # + # @option options + # @param options [Hash] + # @return [SpecReporter] a new instance of SpecReporter + # + # source://minitest-reporters//lib/minitest/reporters/spec_reporter.rb#18 + def initialize(options = T.unsafe(nil)); end + + # source://minitest-reporters//lib/minitest/reporters/spec_reporter.rb#50 def record(test); end - # source://minitest-reporters//lib/minitest/reporters/spec_reporter.rb#19 + # source://minitest-reporters//lib/minitest/reporters/spec_reporter.rb#29 def report; end - # source://minitest-reporters//lib/minitest/reporters/spec_reporter.rb#13 + # source://minitest-reporters//lib/minitest/reporters/spec_reporter.rb#23 def start; end protected - # source://minitest-reporters//lib/minitest/reporters/spec_reporter.rb#41 + # source://minitest-reporters//lib/minitest/reporters/spec_reporter.rb#62 def after_suite(_suite); end - # source://minitest-reporters//lib/minitest/reporters/spec_reporter.rb#37 + # source://minitest-reporters//lib/minitest/reporters/spec_reporter.rb#58 def before_suite(suite); end - # source://minitest-reporters//lib/minitest/reporters/spec_reporter.rb#53 + # source://minitest-reporters//lib/minitest/reporters/spec_reporter.rb#66 + def print_failure(name, tests); end + + # source://minitest-reporters//lib/minitest/reporters/spec_reporter.rb#76 def record_print_failures_if_any(test); end - # source://minitest-reporters//lib/minitest/reporters/spec_reporter.rb#45 + # source://minitest-reporters//lib/minitest/reporters/spec_reporter.rb#83 def record_print_status(test); end end diff --git a/gem/sorbet/rbi/gems/minitest@5.16.2.rbi b/gem/sorbet/rbi/gems/minitest@5.21.2.rbi similarity index 71% rename from gem/sorbet/rbi/gems/minitest@5.16.2.rbi rename to gem/sorbet/rbi/gems/minitest@5.21.2.rbi index a1dc82ec..bc825a02 100644 --- a/gem/sorbet/rbi/gems/minitest@5.16.2.rbi +++ b/gem/sorbet/rbi/gems/minitest@5.21.2.rbi @@ -12,7 +12,7 @@ module Minitest # Internal run method. Responsible for telling all Runnable # sub-classes to run. # - # source://minitest//lib/minitest.rb#173 + # source://minitest//lib/minitest.rb#176 def __run(reporter, options); end # A simple hook allowing you to run a block of code after everything @@ -20,12 +20,18 @@ module Minitest # # Minitest.after_run { p $debugging_info } # - # source://minitest//lib/minitest.rb#94 + # source://minitest//lib/minitest.rb#97 def after_run(&block); end + # source://minitest//lib/minitest.rb#19 + def allow_fork; end + + # source://minitest//lib/minitest.rb#19 + def allow_fork=(_arg0); end + # Registers Minitest to run at process exit # - # source://minitest//lib/minitest.rb#66 + # source://minitest//lib/minitest.rb#69 def autorun; end # source://minitest//lib/minitest.rb#19 @@ -37,7 +43,7 @@ module Minitest # source://minitest//lib/minitest.rb#18 def cattr_accessor(name); end - # source://minitest//lib/minitest.rb#1067 + # source://minitest//lib/minitest.rb#1134 def clock_time; end # source://minitest//lib/minitest.rb#19 @@ -46,7 +52,7 @@ module Minitest # source://minitest//lib/minitest.rb#19 def extensions=(_arg0); end - # source://minitest//lib/minitest.rb#264 + # source://minitest//lib/minitest.rb#271 def filter_backtrace(bt); end # source://minitest//lib/minitest.rb#19 @@ -55,10 +61,10 @@ module Minitest # source://minitest//lib/minitest.rb#19 def info_signal=(_arg0); end - # source://minitest//lib/minitest.rb#98 + # source://minitest//lib/minitest.rb#101 def init_plugins(options); end - # source://minitest//lib/minitest.rb#105 + # source://minitest//lib/minitest.rb#108 def load_plugins; end # source://minitest//lib/minitest.rb#19 @@ -67,7 +73,7 @@ module Minitest # source://minitest//lib/minitest.rb#19 def parallel_executor=(_arg0); end - # source://minitest//lib/minitest.rb#186 + # source://minitest//lib/minitest.rb#189 def process_args(args = T.unsafe(nil)); end # source://minitest//lib/minitest.rb#19 @@ -92,10 +98,10 @@ module Minitest # Minitest.run_one_method(klass, runnable_method) # klass.new(runnable_method).run # - # source://minitest//lib/minitest.rb#140 + # source://minitest//lib/minitest.rb#143 def run(args = T.unsafe(nil)); end - # source://minitest//lib/minitest.rb#1058 + # source://minitest//lib/minitest.rb#1125 def run_one_method(klass, method_name); end # source://minitest//lib/minitest.rb#19 @@ -109,27 +115,24 @@ end # Defines the API for Reporters. Subclass this and override whatever # you want. Go nuts. # -# source://minitest//lib/minitest.rb#578 +# source://minitest//lib/minitest.rb#627 class Minitest::AbstractReporter - include ::Mutex_m - - # source://mutex_m/0.1.2/mutex_m.rb#93 - def lock; end - - # source://mutex_m/0.1.2/mutex_m.rb#83 - def locked?; end + # @return [AbstractReporter] a new instance of AbstractReporter + # + # source://minitest//lib/minitest.rb#629 + def initialize; end # Did this run pass? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#612 + # source://minitest//lib/minitest.rb#664 def passed?; end # About to start running a test. This allows a reporter to show # that it is starting or that we are in the middle of a test run. # - # source://minitest//lib/minitest.rb#591 + # source://minitest//lib/minitest.rb#643 def prerecord(klass, name); end # Output and record the result of the test. Call @@ -137,48 +140,45 @@ class Minitest::AbstractReporter # result character string. Stores the result of the run if the run # did not pass. # - # source://minitest//lib/minitest.rb#600 + # source://minitest//lib/minitest.rb#652 def record(result); end # Outputs the summary of the run. # - # source://minitest//lib/minitest.rb#606 + # source://minitest//lib/minitest.rb#658 def report; end # Starts reporting on the run. # - # source://minitest//lib/minitest.rb#584 + # source://minitest//lib/minitest.rb#636 def start; end - # source://mutex_m/0.1.2/mutex_m.rb#78 + # source://minitest//lib/minitest.rb#668 def synchronize(&block); end - - # source://mutex_m/0.1.2/mutex_m.rb#88 - def try_lock; end - - # source://mutex_m/0.1.2/mutex_m.rb#98 - def unlock; end end # Represents run failures. # -# source://minitest//lib/minitest.rb#903 +# source://minitest//lib/minitest.rb#951 class Minitest::Assertion < ::Exception - # source://minitest//lib/minitest.rb#904 + # source://minitest//lib/minitest.rb#954 def error; end # Where was this run before an assertion was raised? # - # source://minitest//lib/minitest.rb#911 + # source://minitest//lib/minitest.rb#961 def location; end - # source://minitest//lib/minitest.rb#920 + # source://minitest//lib/minitest.rb#968 def result_code; end - # source://minitest//lib/minitest.rb#924 + # source://minitest//lib/minitest.rb#972 def result_label; end end +# source://minitest//lib/minitest.rb#952 +Minitest::Assertion::RE = T.let(T.unsafe(nil), Regexp) + # Minitest Assertions. All assertion methods accept a +msg+ which is # printed if the assertion fails. # @@ -193,6 +193,9 @@ module Minitest::Assertions # source://minitest//lib/minitest/assertions.rb#188 def _synchronize; end + # source://minitest//lib/minitest/assertions.rb#201 + def _where; end + # Fails unless +test+ is truthy. # # source://minitest//lib/minitest/assertions.rb#178 @@ -215,7 +218,7 @@ module Minitest::Assertions # # See also: Minitest::Assertions.diff # - # source://minitest//lib/minitest/assertions.rb#216 + # source://minitest//lib/minitest/assertions.rb#221 def assert_equal(exp, act, msg = T.unsafe(nil)); end # For comparing Floats. Fails unless +exp+ and +act+ are within +delta+ @@ -223,45 +226,45 @@ module Minitest::Assertions # # assert_in_delta Math::PI, (22.0 / 7.0), 0.01 # - # source://minitest//lib/minitest/assertions.rb#240 + # source://minitest//lib/minitest/assertions.rb#242 def assert_in_delta(exp, act, delta = T.unsafe(nil), msg = T.unsafe(nil)); end # For comparing Floats. Fails unless +exp+ and +act+ have a relative # error less than +epsilon+. # - # source://minitest//lib/minitest/assertions.rb#252 + # source://minitest//lib/minitest/assertions.rb#254 def assert_in_epsilon(exp, act, epsilon = T.unsafe(nil), msg = T.unsafe(nil)); end # Fails unless +collection+ includes +obj+. # - # source://minitest//lib/minitest/assertions.rb#259 + # source://minitest//lib/minitest/assertions.rb#261 def assert_includes(collection, obj, msg = T.unsafe(nil)); end # Fails unless +obj+ is an instance of +cls+. # - # source://minitest//lib/minitest/assertions.rb#270 + # source://minitest//lib/minitest/assertions.rb#272 def assert_instance_of(cls, obj, msg = T.unsafe(nil)); end # Fails unless +obj+ is a kind of +cls+. # - # source://minitest//lib/minitest/assertions.rb#281 + # source://minitest//lib/minitest/assertions.rb#283 def assert_kind_of(cls, obj, msg = T.unsafe(nil)); end # Fails unless +matcher+ =~ +obj+. # - # source://minitest//lib/minitest/assertions.rb#291 + # source://minitest//lib/minitest/assertions.rb#293 def assert_match(matcher, obj, msg = T.unsafe(nil)); end # Fails unless +obj+ is nil # - # source://minitest//lib/minitest/assertions.rb#303 + # source://minitest//lib/minitest/assertions.rb#305 def assert_nil(obj, msg = T.unsafe(nil)); end # For testing with binary operators. Eg: # # assert_operator 5, :<=, 4 # - # source://minitest//lib/minitest/assertions.rb#313 + # source://minitest//lib/minitest/assertions.rb#315 def assert_operator(o1, op, o2 = T.unsafe(nil), msg = T.unsafe(nil)); end # Fails if stdout or stderr do not output the expected results. @@ -275,14 +278,32 @@ module Minitest::Assertions # # See also: #assert_silent # - # source://minitest//lib/minitest/assertions.rb#331 + # source://minitest//lib/minitest/assertions.rb#333 def assert_output(stdout = T.unsafe(nil), stderr = T.unsafe(nil)); end # Fails unless +path+ exists. # - # source://minitest//lib/minitest/assertions.rb#355 + # source://minitest//lib/minitest/assertions.rb#357 def assert_path_exists(path, msg = T.unsafe(nil)); end + # For testing with pattern matching (only supported with Ruby 3.0 and later) + # + # # pass + # assert_pattern { [1,2,3] => [Integer, Integer, Integer] } + # + # # fail "length mismatch (given 3, expected 1)" + # assert_pattern { [1,2,3] => [Integer] } + # + # The bare => pattern will raise a NoMatchingPatternError on failure, which would + # normally be counted as a test error. This assertion rescues NoMatchingPatternError and + # generates a test failure. Any other exception will be raised as normal and generate a test + # error. + # + # @raise [NotImplementedError] + # + # source://minitest//lib/minitest/assertions.rb#376 + def assert_pattern; end + # For testing with predicates. Eg: # # assert_predicate str, :empty? @@ -291,7 +312,7 @@ module Minitest::Assertions # # str.must_be :empty? # - # source://minitest//lib/minitest/assertions.rb#369 + # source://minitest//lib/minitest/assertions.rb#397 def assert_predicate(o1, op, msg = T.unsafe(nil)); end # Fails unless the block raises one of +exp+. Returns the @@ -315,36 +336,37 @@ module Minitest::Assertions # # assert_equal 'This is really bad', error.message # - # source://minitest//lib/minitest/assertions.rb#396 + # source://minitest//lib/minitest/assertions.rb#424 def assert_raises(*exp); end # Fails unless +obj+ responds to +meth+. + # include_all defaults to false to match Object#respond_to? # - # source://minitest//lib/minitest/assertions.rb#427 - def assert_respond_to(obj, meth, msg = T.unsafe(nil)); end + # source://minitest//lib/minitest/assertions.rb#456 + def assert_respond_to(obj, meth, msg = T.unsafe(nil), include_all: T.unsafe(nil)); end # Fails unless +exp+ and +act+ are #equal? # - # source://minitest//lib/minitest/assertions.rb#437 + # source://minitest//lib/minitest/assertions.rb#466 def assert_same(exp, act, msg = T.unsafe(nil)); end # +send_ary+ is a receiver, message and arguments. # # Fails unless the call returns a true value # - # source://minitest//lib/minitest/assertions.rb#450 + # source://minitest//lib/minitest/assertions.rb#479 def assert_send(send_ary, m = T.unsafe(nil)); end # Fails if the block outputs anything to stderr or stdout. # # See also: #assert_output # - # source://minitest//lib/minitest/assertions.rb#466 + # source://minitest//lib/minitest/assertions.rb#493 def assert_silent; end # Fails unless the block throws +sym+ # - # source://minitest//lib/minitest/assertions.rb#475 + # source://minitest//lib/minitest/assertions.rb#502 def assert_throws(sym, msg = T.unsafe(nil)); end # Captures $stdout and $stderr into strings: @@ -361,7 +383,7 @@ module Minitest::Assertions # capture IO for subprocesses. Use #capture_subprocess_io for # that. # - # source://minitest//lib/minitest/assertions.rb#516 + # source://minitest//lib/minitest/assertions.rb#543 def capture_io; end # Captures $stdout and $stderr into strings, using Tempfile to @@ -378,7 +400,7 @@ module Minitest::Assertions # NOTE: This method is approximately 10x slower than #capture_io so # only use it when you need to test the output of a subprocess. # - # source://minitest//lib/minitest/assertions.rb#549 + # source://minitest//lib/minitest/assertions.rb#576 def capture_subprocess_io; end # Returns a diff between +exp+ and +act+. If there is no known @@ -393,24 +415,24 @@ module Minitest::Assertions # Returns details for exception +e+ # - # source://minitest//lib/minitest/assertions.rb#581 + # source://minitest//lib/minitest/assertions.rb#608 def exception_details(e, msg); end # Fails after a given date (in the local time zone). This allows # you to put time-bombs in your tests if you need to keep # something around until a later date lest you forget about it. # - # source://minitest//lib/minitest/assertions.rb#597 + # source://minitest//lib/minitest/assertions.rb#624 def fail_after(y, m, d, msg); end # Fails with +msg+. # - # source://minitest//lib/minitest/assertions.rb#604 + # source://minitest//lib/minitest/assertions.rb#631 def flunk(msg = T.unsafe(nil)); end # Returns a proc that will output +msg+ along with the default message. # - # source://minitest//lib/minitest/assertions.rb#612 + # source://minitest//lib/minitest/assertions.rb#639 def message(msg = T.unsafe(nil), ending = T.unsafe(nil), &default); end # This returns a human-readable version of +obj+. By default @@ -432,62 +454,62 @@ module Minitest::Assertions # used for counting assertions # - # source://minitest//lib/minitest/assertions.rb#623 + # source://minitest//lib/minitest/assertions.rb#650 def pass(_msg = T.unsafe(nil)); end # Fails if +test+ is truthy. # - # source://minitest//lib/minitest/assertions.rb#630 + # source://minitest//lib/minitest/assertions.rb#657 def refute(test, msg = T.unsafe(nil)); end # Fails if +obj+ is empty. # - # source://minitest//lib/minitest/assertions.rb#638 + # source://minitest//lib/minitest/assertions.rb#665 def refute_empty(obj, msg = T.unsafe(nil)); end # Fails if exp == act. # # For floats use refute_in_delta. # - # source://minitest//lib/minitest/assertions.rb#649 + # source://minitest//lib/minitest/assertions.rb#676 def refute_equal(exp, act, msg = T.unsafe(nil)); end # For comparing Floats. Fails if +exp+ is within +delta+ of +act+. # # refute_in_delta Math::PI, (22.0 / 7.0) # - # source://minitest//lib/minitest/assertions.rb#661 + # source://minitest//lib/minitest/assertions.rb#688 def refute_in_delta(exp, act, delta = T.unsafe(nil), msg = T.unsafe(nil)); end # For comparing Floats. Fails if +exp+ and +act+ have a relative error # less than +epsilon+. # - # source://minitest//lib/minitest/assertions.rb#673 + # source://minitest//lib/minitest/assertions.rb#700 def refute_in_epsilon(a, b, epsilon = T.unsafe(nil), msg = T.unsafe(nil)); end # Fails if +collection+ includes +obj+. # - # source://minitest//lib/minitest/assertions.rb#680 + # source://minitest//lib/minitest/assertions.rb#707 def refute_includes(collection, obj, msg = T.unsafe(nil)); end # Fails if +obj+ is an instance of +cls+. # - # source://minitest//lib/minitest/assertions.rb#691 + # source://minitest//lib/minitest/assertions.rb#718 def refute_instance_of(cls, obj, msg = T.unsafe(nil)); end # Fails if +obj+ is a kind of +cls+. # - # source://minitest//lib/minitest/assertions.rb#701 + # source://minitest//lib/minitest/assertions.rb#728 def refute_kind_of(cls, obj, msg = T.unsafe(nil)); end # Fails if +matcher+ =~ +obj+. # - # source://minitest//lib/minitest/assertions.rb#709 + # source://minitest//lib/minitest/assertions.rb#736 def refute_match(matcher, obj, msg = T.unsafe(nil)); end # Fails if +obj+ is nil. # - # source://minitest//lib/minitest/assertions.rb#719 + # source://minitest//lib/minitest/assertions.rb#746 def refute_nil(obj, msg = T.unsafe(nil)); end # Fails if +o1+ is not +op+ +o2+. Eg: @@ -495,14 +517,30 @@ module Minitest::Assertions # refute_operator 1, :>, 2 #=> pass # refute_operator 1, :<, 2 #=> fail # - # source://minitest//lib/minitest/assertions.rb#730 + # source://minitest//lib/minitest/assertions.rb#781 def refute_operator(o1, op, o2 = T.unsafe(nil), msg = T.unsafe(nil)); end # Fails if +path+ exists. # - # source://minitest//lib/minitest/assertions.rb#739 + # source://minitest//lib/minitest/assertions.rb#790 def refute_path_exists(path, msg = T.unsafe(nil)); end + # For testing with pattern matching (only supported with Ruby 3.0 and later) + # + # # pass + # refute_pattern { [1,2,3] => [String] } + # + # # fail "NoMatchingPatternError expected, but nothing was raised." + # refute_pattern { [1,2,3] => [Integer, Integer, Integer] } + # + # This assertion expects a NoMatchingPatternError exception, and will fail if none is raised. Any + # other exceptions will be raised as normal and generate a test error. + # + # @raise [NotImplementedError] + # + # source://minitest//lib/minitest/assertions.rb#763 + def refute_pattern; end + # For testing with predicates. # # refute_predicate str, :empty? @@ -511,17 +549,18 @@ module Minitest::Assertions # # str.wont_be :empty? # - # source://minitest//lib/minitest/assertions.rb#753 + # source://minitest//lib/minitest/assertions.rb#804 def refute_predicate(o1, op, msg = T.unsafe(nil)); end # Fails if +obj+ responds to the message +meth+. + # include_all defaults to false to match Object#respond_to? # - # source://minitest//lib/minitest/assertions.rb#761 - def refute_respond_to(obj, meth, msg = T.unsafe(nil)); end + # source://minitest//lib/minitest/assertions.rb#813 + def refute_respond_to(obj, meth, msg = T.unsafe(nil), include_all: T.unsafe(nil)); end # Fails if +exp+ is the same (by object identity) as +act+. # - # source://minitest//lib/minitest/assertions.rb#770 + # source://minitest//lib/minitest/assertions.rb#822 def refute_same(exp, act, msg = T.unsafe(nil)); end # Skips the current run. If run in verbose-mode, the skipped run @@ -530,22 +569,22 @@ module Minitest::Assertions # # @raise [Minitest::Skip] # - # source://minitest//lib/minitest/assertions.rb#783 - def skip(msg = T.unsafe(nil), bt = T.unsafe(nil)); end + # source://minitest//lib/minitest/assertions.rb#835 + def skip(msg = T.unsafe(nil), _ignored = T.unsafe(nil)); end # Skips the current run until a given date (in the local time # zone). This allows you to put some fixes on hold until a later # date, but still holds you accountable and prevents you from # forgetting it. # - # source://minitest//lib/minitest/assertions.rb#795 + # source://minitest//lib/minitest/assertions.rb#847 def skip_until(y, m, d, msg); end # Was this testcase skipped? Meant for #teardown. # # @return [Boolean] # - # source://minitest//lib/minitest/assertions.rb#804 + # source://minitest//lib/minitest/assertions.rb#856 def skipped?; end # Returns things to diff [expect, butwas], or [nil, nil] if nothing to diff. @@ -574,7 +613,7 @@ module Minitest::Assertions end end -# source://minitest//lib/minitest/assertions.rb#201 +# source://minitest//lib/minitest/assertions.rb#206 Minitest::Assertions::E = T.let(T.unsafe(nil), String) # source://minitest//lib/minitest/assertions.rb#19 @@ -584,63 +623,91 @@ Minitest::Assertions::UNDEFINED = T.let(T.unsafe(nil), Object) # # See Minitest.backtrace_filter=. # -# source://minitest//lib/minitest.rb#1035 +# source://minitest//lib/minitest.rb#1096 class Minitest::BacktraceFilter + # @return [BacktraceFilter] a new instance of BacktraceFilter + # + # source://minitest//lib/minitest.rb#1102 + def initialize(regexp = T.unsafe(nil)); end + # Filter +bt+ to something useful. Returns the whole thing if # $DEBUG (ruby) or $MT_DEBUG (env). # - # source://minitest//lib/minitest.rb#1043 + # source://minitest//lib/minitest.rb#1110 def filter(bt); end + + # Returns the value of attribute regexp. + # + # source://minitest//lib/minitest.rb#1100 + def regexp; end + + # Sets the attribute regexp + # + # @param value the value to set the attribute regexp to. + # + # source://minitest//lib/minitest.rb#1100 + def regexp=(_arg0); end end -# source://minitest//lib/minitest.rb#1037 +# source://minitest//lib/minitest.rb#1098 Minitest::BacktraceFilter::MT_RE = T.let(T.unsafe(nil), Regexp) # Dispatch to multiple reporters as one. # -# source://minitest//lib/minitest.rb#852 +# source://minitest//lib/minitest.rb#902 class Minitest::CompositeReporter < ::Minitest::AbstractReporter # @return [CompositeReporter] a new instance of CompositeReporter # - # source://minitest//lib/minitest.rb#858 + # source://minitest//lib/minitest.rb#906 def initialize(*reporters); end # Add another reporter to the mix. # - # source://minitest//lib/minitest.rb#870 + # source://minitest//lib/minitest.rb#918 def <<(reporter); end - # source://minitest//lib/minitest.rb#863 + # source://minitest//lib/minitest.rb#911 def io; end # @return [Boolean] # - # source://minitest//lib/minitest.rb#874 + # source://minitest//lib/minitest.rb#922 def passed?; end - # source://minitest//lib/minitest.rb#882 + # source://minitest//lib/minitest.rb#930 def prerecord(klass, name); end - # source://minitest//lib/minitest.rb#889 + # source://minitest//lib/minitest.rb#937 def record(result); end - # source://minitest//lib/minitest.rb#895 + # source://minitest//lib/minitest.rb#943 def report; end # The list of reporters to dispatch to. # - # source://minitest//lib/minitest.rb#856 + # source://minitest//lib/minitest.rb#904 def reporters; end # The list of reporters to dispatch to. # - # source://minitest//lib/minitest.rb#856 + # source://minitest//lib/minitest.rb#904 def reporters=(_arg0); end - # source://minitest//lib/minitest.rb#878 + # source://minitest//lib/minitest.rb#926 def start; end end +# Compresses backtraces. +# +# source://minitest//lib/minitest/compress.rb#5 +module Minitest::Compress + # Takes a backtrace (array of strings) and compresses repeating + # cycles in it to make it more readable. + # + # source://minitest//lib/minitest/compress.rb#11 + def compress(orig); end +end + # Provides a simple set of guards that you can use in your tests # to skip execution if it is not applicable. These methods are # mixed into Test as both instance and class methods so you @@ -655,48 +722,48 @@ end # # ... lots of test methods ... # end # -# source://minitest//lib/minitest.rb#979 +# source://minitest//lib/minitest.rb#1040 module Minitest::Guard # Is this running on jruby? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#984 + # source://minitest//lib/minitest.rb#1045 def jruby?(platform = T.unsafe(nil)); end # Is this running on maglev? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#991 + # source://minitest//lib/minitest.rb#1052 def maglev?(platform = T.unsafe(nil)); end # Is this running on mri? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#1001 + # source://minitest//lib/minitest.rb#1062 def mri?(platform = T.unsafe(nil)); end # Is this running on macOS? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#1008 + # source://minitest//lib/minitest.rb#1069 def osx?(platform = T.unsafe(nil)); end # Is this running on rubinius? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#1015 + # source://minitest//lib/minitest.rb#1076 def rubinius?(platform = T.unsafe(nil)); end # Is this running on windows? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#1025 + # source://minitest//lib/minitest.rb#1086 def windows?(platform = T.unsafe(nil)); end end @@ -759,36 +826,36 @@ end # plugin, pull this out of the composite and replace it with your # own. # -# source://minitest//lib/minitest.rb#643 +# source://minitest//lib/minitest.rb#699 class Minitest::ProgressReporter < ::Minitest::Reporter - # source://minitest//lib/minitest.rb#644 + # source://minitest//lib/minitest.rb#700 def prerecord(klass, name); end - # source://minitest//lib/minitest.rb#651 + # source://minitest//lib/minitest.rb#707 def record(result); end end # Shared code for anything that can get passed to a Reporter. See # Minitest::Test & Minitest::Result. # -# source://minitest//lib/minitest.rb#475 +# source://minitest//lib/minitest.rb#521 module Minitest::Reportable # @raise [NotImplementedError] # - # source://minitest//lib/minitest.rb#495 + # source://minitest//lib/minitest.rb#543 def class_name; end # Did this run error? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#516 + # source://minitest//lib/minitest.rb#564 def error?; end # The location identifier of this test. Depends on a method # existing called class_name. # - # source://minitest//lib/minitest.rb#490 + # source://minitest//lib/minitest.rb#538 def location; end # Did this run pass? @@ -798,47 +865,50 @@ module Minitest::Reportable # # @return [Boolean] # - # source://minitest//lib/minitest.rb#482 + # source://minitest//lib/minitest.rb#528 def passed?; end # Returns ".", "F", or "E" based on the result of the run. # - # source://minitest//lib/minitest.rb#502 + # source://minitest//lib/minitest.rb#550 def result_code; end # Was this run skipped? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#509 + # source://minitest//lib/minitest.rb#557 def skipped?; end end -# source://minitest//lib/minitest.rb#619 +# source://minitest//lib/minitest.rb#532 +Minitest::Reportable::BASE_DIR = T.let(T.unsafe(nil), String) + +# source://minitest//lib/minitest.rb#675 class Minitest::Reporter < ::Minitest::AbstractReporter # @return [Reporter] a new instance of Reporter # - # source://minitest//lib/minitest.rb#628 + # source://minitest//lib/minitest.rb#684 def initialize(io = T.unsafe(nil), options = T.unsafe(nil)); end # The IO used to report. # - # source://minitest//lib/minitest.rb#621 + # source://minitest//lib/minitest.rb#677 def io; end # The IO used to report. # - # source://minitest//lib/minitest.rb#621 + # source://minitest//lib/minitest.rb#677 def io=(_arg0); end # Command-line options for this run. # - # source://minitest//lib/minitest.rb#626 + # source://minitest//lib/minitest.rb#682 def options; end # Command-line options for this run. # - # source://minitest//lib/minitest.rb#626 + # source://minitest//lib/minitest.rb#682 def options=(_arg0); end end @@ -848,90 +918,112 @@ end # blow up. By using Result.from(a_test) you can be reasonably sure # that the test result can be marshalled. # -# source://minitest//lib/minitest.rb#528 +# source://minitest//lib/minitest.rb#576 class Minitest::Result < ::Minitest::Runnable include ::Minitest::Reportable - # source://minitest//lib/minitest.rb#561 + # source://minitest//lib/minitest.rb#610 def class_name; end # The class name of the test result. # - # source://minitest//lib/minitest.rb#537 + # source://minitest//lib/minitest.rb#585 def klass; end # The class name of the test result. # - # source://minitest//lib/minitest.rb#537 + # source://minitest//lib/minitest.rb#585 def klass=(_arg0); end # The location of the test method. # - # source://minitest//lib/minitest.rb#542 + # source://minitest//lib/minitest.rb#590 def source_location; end # The location of the test method. # - # source://minitest//lib/minitest.rb#542 + # source://minitest//lib/minitest.rb#590 def source_location=(_arg0); end - # source://minitest//lib/minitest.rb#565 + # source://minitest//lib/minitest.rb#614 def to_s; end class << self # Create a new test result from a Runnable instance. # - # source://minitest//lib/minitest.rb#547 + # source://minitest//lib/minitest.rb#595 def from(runnable); end end end # re-open # -# source://minitest//lib/minitest.rb#277 +# source://minitest//lib/minitest.rb#284 class Minitest::Runnable # @return [Runnable] a new instance of Runnable # - # source://minitest//lib/minitest.rb#431 + # source://minitest//lib/minitest.rb#452 def initialize(name); end # Number of assertions executed in this run. # - # source://minitest//lib/minitest.rb#281 + # source://minitest//lib/minitest.rb#288 def assertions; end # Number of assertions executed in this run. # - # source://minitest//lib/minitest.rb#281 + # source://minitest//lib/minitest.rb#288 def assertions=(_arg0); end - # source://minitest//lib/minitest.rb#427 + # source://minitest//lib/minitest.rb#448 def failure; end # An assertion raised during the run, if any. # - # source://minitest//lib/minitest.rb#286 + # source://minitest//lib/minitest.rb#293 def failures; end # An assertion raised during the run, if any. # - # source://minitest//lib/minitest.rb#286 + # source://minitest//lib/minitest.rb#293 def failures=(_arg0); end - # source://minitest//lib/minitest.rb#413 + # source://minitest//lib/minitest.rb#434 def marshal_dump; end - # source://minitest//lib/minitest.rb#423 + # source://minitest//lib/minitest.rb#444 def marshal_load(ary); end + # Metadata you attach to the test results that get sent to the reporter. + # + # Lazily initializes to a hash, to keep memory down. + # + # NOTE: this data *must* be plain (read: marshal-able) data! + # Hashes! Arrays! Strings! + # + # source://minitest//lib/minitest.rb#467 + def metadata; end + + # Sets metadata, mainly used for +Result.from+. + # + # source://minitest//lib/minitest.rb#474 + def metadata=(_arg0); end + + # Returns true if metadata exists. + # + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#479 + def metadata?; end + # Name of the run. # - # source://minitest//lib/minitest.rb#304 + # source://minitest//lib/minitest.rb#311 def name; end # Set the name of the run. # - # source://minitest//lib/minitest.rb#311 + # source://minitest//lib/minitest.rb#318 def name=(o); end # Did this run pass? @@ -942,7 +1034,7 @@ class Minitest::Runnable # @raise [NotImplementedError] # @return [Boolean] # - # source://minitest//lib/minitest.rb#450 + # source://minitest//lib/minitest.rb#496 def passed?; end # Returns a single character string to print based on the result @@ -951,14 +1043,14 @@ class Minitest::Runnable # # @raise [NotImplementedError] # - # source://minitest//lib/minitest.rb#459 + # source://minitest//lib/minitest.rb#505 def result_code; end # Runs a single method. Needs to return self. # # @raise [NotImplementedError] # - # source://minitest//lib/minitest.rb#440 + # source://minitest//lib/minitest.rb#486 def run; end # Was this run skipped? See #passed? for more information. @@ -966,42 +1058,42 @@ class Minitest::Runnable # @raise [NotImplementedError] # @return [Boolean] # - # source://minitest//lib/minitest.rb#466 + # source://minitest//lib/minitest.rb#512 def skipped?; end # The time it took to run. # - # source://minitest//lib/minitest.rb#291 + # source://minitest//lib/minitest.rb#298 def time; end # The time it took to run. # - # source://minitest//lib/minitest.rb#291 + # source://minitest//lib/minitest.rb#298 def time=(_arg0); end - # source://minitest//lib/minitest.rb#293 + # source://minitest//lib/minitest.rb#300 def time_it; end class << self - # source://minitest//lib/minitest.rb#1077 + # source://minitest//lib/minitest.rb#1144 def inherited(klass); end # Returns all instance methods matching the pattern +re+. # - # source://minitest//lib/minitest.rb#318 + # source://minitest//lib/minitest.rb#325 def methods_matching(re); end - # source://minitest//lib/minitest.rb#383 + # source://minitest//lib/minitest.rb#404 def on_signal(name, action); end - # source://minitest//lib/minitest.rb#322 + # source://minitest//lib/minitest.rb#329 def reset; end # Responsible for running all runnable methods in a given class, # each in its own instance. Each instance is passed to the # reporter to record. # - # source://minitest//lib/minitest.rb#333 + # source://minitest//lib/minitest.rb#340 def run(reporter, options = T.unsafe(nil)); end # Runs a single method and has the reporter record the result. @@ -1009,7 +1101,7 @@ class Minitest::Runnable # that subclasses can specialize the running of an individual # test. See Minitest::ParallelTest::ClassMethods for an example. # - # source://minitest//lib/minitest.rb#363 + # source://minitest//lib/minitest.rb#376 def run_one_method(klass, method_name, reporter); end # Each subclass of Runnable is responsible for overriding this @@ -1017,27 +1109,33 @@ class Minitest::Runnable # # @raise [NotImplementedError] # - # source://minitest//lib/minitest.rb#400 + # source://minitest//lib/minitest.rb#421 def runnable_methods; end # Returns all subclasses of Runnable. # - # source://minitest//lib/minitest.rb#407 + # source://minitest//lib/minitest.rb#428 def runnables; end - # source://minitest//lib/minitest.rb#368 + # Defines the order to run tests (:random by default). Override + # this or use a convenience method to change it for your tests. + # + # source://minitest//lib/minitest.rb#385 + def test_order; end + + # source://minitest//lib/minitest.rb#389 def with_info_handler(reporter, &block); end end end -# source://minitest//lib/minitest.rb#381 +# source://minitest//lib/minitest.rb#402 Minitest::Runnable::SIGNALS = T.let(T.unsafe(nil), Hash) # Assertion raised when skipping a run. # -# source://minitest//lib/minitest.rb#932 +# source://minitest//lib/minitest.rb#980 class Minitest::Skip < ::Minitest::Assertion - # source://minitest//lib/minitest.rb#933 + # source://minitest//lib/minitest.rb#981 def result_label; end end @@ -1061,113 +1159,113 @@ end # end # end # -# source://minitest//lib/minitest.rb#679 +# source://minitest//lib/minitest.rb#737 class Minitest::StatisticsReporter < ::Minitest::Reporter # @return [StatisticsReporter] a new instance of StatisticsReporter # - # source://minitest//lib/minitest.rb#723 + # source://minitest//lib/minitest.rb#779 def initialize(io = T.unsafe(nil), options = T.unsafe(nil)); end # Total number of assertions. # - # source://minitest//lib/minitest.rb#683 + # source://minitest//lib/minitest.rb#739 def assertions; end # Total number of assertions. # - # source://minitest//lib/minitest.rb#683 + # source://minitest//lib/minitest.rb#739 def assertions=(_arg0); end # Total number of test cases. # - # source://minitest//lib/minitest.rb#688 + # source://minitest//lib/minitest.rb#744 def count; end # Total number of test cases. # - # source://minitest//lib/minitest.rb#688 + # source://minitest//lib/minitest.rb#744 def count=(_arg0); end # Total number of tests that erred. # - # source://minitest//lib/minitest.rb#716 + # source://minitest//lib/minitest.rb#772 def errors; end # Total number of tests that erred. # - # source://minitest//lib/minitest.rb#716 + # source://minitest//lib/minitest.rb#772 def errors=(_arg0); end # Total number of tests that failed. # - # source://minitest//lib/minitest.rb#711 + # source://minitest//lib/minitest.rb#767 def failures; end # Total number of tests that failed. # - # source://minitest//lib/minitest.rb#711 + # source://minitest//lib/minitest.rb#767 def failures=(_arg0); end # @return [Boolean] # - # source://minitest//lib/minitest.rb#736 + # source://minitest//lib/minitest.rb#792 def passed?; end - # source://minitest//lib/minitest.rb#744 + # source://minitest//lib/minitest.rb#800 def record(result); end # Report on the tracked statistics. # - # source://minitest//lib/minitest.rb#754 + # source://minitest//lib/minitest.rb#810 def report; end # An +Array+ of test cases that failed or were skipped. # - # source://minitest//lib/minitest.rb#693 + # source://minitest//lib/minitest.rb#749 def results; end # An +Array+ of test cases that failed or were skipped. # - # source://minitest//lib/minitest.rb#693 + # source://minitest//lib/minitest.rb#749 def results=(_arg0); end # Total number of tests that where skipped. # - # source://minitest//lib/minitest.rb#721 + # source://minitest//lib/minitest.rb#777 def skips; end # Total number of tests that where skipped. # - # source://minitest//lib/minitest.rb#721 + # source://minitest//lib/minitest.rb#777 def skips=(_arg0); end - # source://minitest//lib/minitest.rb#740 + # source://minitest//lib/minitest.rb#796 def start; end # Time the test run started. If available, the monotonic clock is # used and this is a +Float+, otherwise it's an instance of # +Time+. # - # source://minitest//lib/minitest.rb#700 + # source://minitest//lib/minitest.rb#756 def start_time; end # Time the test run started. If available, the monotonic clock is # used and this is a +Float+, otherwise it's an instance of # +Time+. # - # source://minitest//lib/minitest.rb#700 + # source://minitest//lib/minitest.rb#756 def start_time=(_arg0); end # Test run time. If available, the monotonic clock is used and # this is a +Float+, otherwise it's an instance of +Time+. # - # source://minitest//lib/minitest.rb#706 + # source://minitest//lib/minitest.rb#762 def total_time; end # Test run time. If available, the monotonic clock is used and # this is a +Float+, otherwise it's an instance of +Time+. # - # source://minitest//lib/minitest.rb#706 + # source://minitest//lib/minitest.rb#762 def total_time=(_arg0); end end @@ -1179,54 +1277,49 @@ end # plugin, pull this out of the composite and replace it with your # own. # -# source://minitest//lib/minitest.rb#774 +# source://minitest//lib/minitest.rb#831 class Minitest::SummaryReporter < ::Minitest::StatisticsReporter - # source://minitest//lib/minitest.rb#809 + # source://minitest//lib/minitest.rb#865 def aggregated_results(io); end # Returns the value of attribute old_sync. # - # source://minitest//lib/minitest.rb#777 + # source://minitest//lib/minitest.rb#833 def old_sync; end # Sets the attribute old_sync # # @param value the value to set the attribute old_sync to. # - # source://minitest//lib/minitest.rb#777 + # source://minitest//lib/minitest.rb#833 def old_sync=(_arg0); end - # source://minitest//lib/minitest.rb#792 + # source://minitest//lib/minitest.rb#848 def report; end # :startdoc: # - # source://minitest//lib/minitest.rb#780 + # source://minitest//lib/minitest.rb#836 def start; end - # source://minitest//lib/minitest.rb#804 + # source://minitest//lib/minitest.rb#860 def statistics; end - # source://minitest//lib/minitest.rb#829 + # source://minitest//lib/minitest.rb#885 def summary; end # :stopdoc: # - # source://minitest//lib/minitest.rb#776 + # source://minitest//lib/minitest.rb#832 def sync; end # :stopdoc: # - # source://minitest//lib/minitest.rb#776 + # source://minitest//lib/minitest.rb#832 def sync=(_arg0); end - # source://minitest//lib/minitest.rb#825 + # source://minitest//lib/minitest.rb#881 def to_s; end - - private - - # source://minitest//lib/minitest.rb#843 - def binary_string; end end # Subclass Test to create your own tests. Typically you'll want a @@ -1244,27 +1337,27 @@ class Minitest::Test < ::Minitest::Runnable # LifecycleHooks # - # source://minitest//lib/minitest/test.rb#194 + # source://minitest//lib/minitest/test.rb#190 def capture_exceptions; end # source://minitest//lib/minitest/test.rb#15 def class_name; end - # source://minitest//lib/minitest/test.rb#211 + # source://minitest//lib/minitest/test.rb#207 def neuter_exception(e); end - # source://minitest//lib/minitest/test.rb#222 + # source://minitest//lib/minitest/test.rb#218 def new_exception(klass, msg, bt, kill = T.unsafe(nil)); end # Runs a single test with setup/teardown hooks. # - # source://minitest//lib/minitest/test.rb#92 + # source://minitest//lib/minitest/test.rb#86 def run; end - # source://minitest//lib/minitest/test.rb#204 + # source://minitest//lib/minitest/test.rb#200 def sanitize_exception(e); end - # source://minitest//lib/minitest/test.rb#236 + # source://minitest//lib/minitest/test.rb#232 def with_info_handler(&block); end class << self @@ -1272,19 +1365,19 @@ class Minitest::Test < ::Minitest::Runnable # positively need to have ordered tests. In doing so, you're # admitting that you suck and your tests are weak. # - # source://minitest//lib/minitest/test.rb#31 + # source://minitest//lib/minitest/test.rb#35 def i_suck_and_my_tests_are_order_dependent!; end # Returns the value of attribute io_lock. # - # source://minitest//lib/minitest/test.rb#22 + # source://minitest//lib/minitest/test.rb#26 def io_lock; end # Sets the attribute io_lock # # @param value the value to set the attribute io_lock to. # - # source://minitest//lib/minitest/test.rb#22 + # source://minitest//lib/minitest/test.rb#26 def io_lock=(_arg0); end # Make diffs for this Test use #pretty_inspect so that diff @@ -1292,28 +1385,22 @@ class Minitest::Test < ::Minitest::Runnable # than the regular inspect but much more usable for complex # objects. # - # source://minitest//lib/minitest/test.rb#44 + # source://minitest//lib/minitest/test.rb#48 def make_my_diffs_pretty!; end # Call this at the top of your tests when you want to run your # tests in parallel. In doing so, you're admitting that you rule # and your tests are awesome. # - # source://minitest//lib/minitest/test.rb#55 + # source://minitest//lib/minitest/test.rb#59 def parallelize_me!; end # Returns all instance methods starting with "test_". Based on # #test_order, the methods are either sorted, randomized # (default), or run in parallel. # - # source://minitest//lib/minitest/test.rb#65 + # source://minitest//lib/minitest/test.rb#69 def runnable_methods; end - - # Defines the order to run tests (:random by default). Override - # this or use a convenience method to change it for your tests. - # - # source://minitest//lib/minitest/test.rb#83 - def test_order; end end end @@ -1321,7 +1408,7 @@ end # meant for library writers, NOT for regular test authors. See # #before_setup for an example. # -# source://minitest//lib/minitest/test.rb#117 +# source://minitest//lib/minitest/test.rb#113 module Minitest::Test::LifecycleHooks # Runs before every test, after setup. This hook is meant for # libraries to extend minitest. It is not meant to be used by @@ -1329,7 +1416,7 @@ module Minitest::Test::LifecycleHooks # # See #before_setup for an example. # - # source://minitest//lib/minitest/test.rb#167 + # source://minitest//lib/minitest/test.rb#163 def after_setup; end # Runs after every test, after teardown. This hook is meant for @@ -1338,7 +1425,7 @@ module Minitest::Test::LifecycleHooks # # See #before_setup for an example. # - # source://minitest//lib/minitest/test.rb#191 + # source://minitest//lib/minitest/test.rb#187 def after_teardown; end # Runs before every test, before setup. This hook is meant for @@ -1369,11 +1456,11 @@ module Minitest::Test::LifecycleHooks # end # end # - # class MiniTest::Test + # class Minitest::Test # include MyMinitestPlugin # end # - # source://minitest//lib/minitest/test.rb#152 + # source://minitest//lib/minitest/test.rb#148 def before_setup; end # Runs after every test, before teardown. This hook is meant for @@ -1382,78 +1469,64 @@ module Minitest::Test::LifecycleHooks # # See #before_setup for an example. # - # source://minitest//lib/minitest/test.rb#176 + # source://minitest//lib/minitest/test.rb#172 def before_teardown; end # Runs before every test. Use this to set up before each test # run. # - # source://minitest//lib/minitest/test.rb#158 + # source://minitest//lib/minitest/test.rb#154 def setup; end # Runs after every test. Use this to clean up after each test # run. # - # source://minitest//lib/minitest/test.rb#182 + # source://minitest//lib/minitest/test.rb#178 def teardown; end end # source://minitest//lib/minitest/test.rb#19 Minitest::Test::PASSTHROUGH_EXCEPTIONS = T.let(T.unsafe(nil), Array) -# source://minitest//lib/minitest/test.rb#87 +# source://minitest//lib/minitest/test.rb#21 +Minitest::Test::SETUP_METHODS = T.let(T.unsafe(nil), Array) + +# source://minitest//lib/minitest/test.rb#23 Minitest::Test::TEARDOWN_METHODS = T.let(T.unsafe(nil), Array) # Assertion wrapping an unexpected error that was raised during a run. # -# source://minitest//lib/minitest.rb#941 +# source://minitest//lib/minitest.rb#989 class Minitest::UnexpectedError < ::Minitest::Assertion + include ::Minitest::Compress + # @return [UnexpectedError] a new instance of UnexpectedError # - # source://minitest//lib/minitest.rb#945 + # source://minitest//lib/minitest.rb#995 def initialize(error); end - # source://minitest//lib/minitest.rb#950 + # source://minitest//lib/minitest.rb#1008 def backtrace; end # TODO: figure out how to use `cause` instead # - # source://minitest//lib/minitest.rb#943 + # source://minitest//lib/minitest.rb#993 def error; end # TODO: figure out how to use `cause` instead # - # source://minitest//lib/minitest.rb#943 + # source://minitest//lib/minitest.rb#993 def error=(_arg0); end - # source://minitest//lib/minitest.rb#954 + # source://minitest//lib/minitest.rb#1014 def message; end - # source://minitest//lib/minitest.rb#959 + # source://minitest//lib/minitest.rb#1020 def result_label; end end -# source://minitest//lib/minitest/unit.rb#20 -class Minitest::Unit - class << self - # source://minitest//lib/minitest/unit.rb#36 - def after_tests(&b); end - - # source://minitest//lib/minitest/unit.rb#30 - def autorun; end - end -end - -# source://minitest//lib/minitest/unit.rb#22 -class Minitest::Unit::TestCase < ::Minitest::Test - class << self - # source://minitest//lib/minitest/unit.rb#23 - def inherited(klass); end - end -end - -# source://minitest//lib/minitest/unit.rb#21 -Minitest::Unit::VERSION = T.let(T.unsafe(nil), String) +# source://minitest//lib/minitest.rb#1012 +Minitest::UnexpectedError::BASE_RE = T.let(T.unsafe(nil), Regexp) # source://minitest//lib/minitest.rb#12 Minitest::VERSION = T.let(T.unsafe(nil), String) diff --git a/gem/sorbet/rbi/gems/parser@3.2.2.4.rbi b/gem/sorbet/rbi/gems/parser@3.3.0.5.rbi similarity index 100% rename from gem/sorbet/rbi/gems/parser@3.2.2.4.rbi rename to gem/sorbet/rbi/gems/parser@3.3.0.5.rbi diff --git a/gem/sorbet/rbi/gems/psych@5.1.2.rbi b/gem/sorbet/rbi/gems/psych@5.1.2.rbi new file mode 100644 index 00000000..199dfcad --- /dev/null +++ b/gem/sorbet/rbi/gems/psych@5.1.2.rbi @@ -0,0 +1,1768 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `psych` gem. +# Please instead update this file by running `bin/tapioca gem psych`. + +# source://psych//lib/psych/core_ext.rb#2 +class Object < ::BasicObject + include ::Kernel + include ::PP::ObjectMixin + + # call-seq: to_yaml(options = {}) + # + # Convert an object to YAML. See Psych.dump for more information on the + # available +options+. + # + # source://psych//lib/psych/core_ext.rb#12 + def to_yaml(options = T.unsafe(nil)); end + + class << self + # source://psych//lib/psych/core_ext.rb#3 + def yaml_tag(url); end + end +end + +# = Overview +# +# Psych is a YAML parser and emitter. +# Psych leverages libyaml [Home page: https://pyyaml.org/wiki/LibYAML] +# or [git repo: https://github.com/yaml/libyaml] for its YAML parsing +# and emitting capabilities. In addition to wrapping libyaml, Psych also +# knows how to serialize and de-serialize most Ruby objects to and from +# the YAML format. +# +# = I NEED TO PARSE OR EMIT YAML RIGHT NOW! +# +# # Parse some YAML +# Psych.load("--- foo") # => "foo" +# +# # Emit some YAML +# Psych.dump("foo") # => "--- foo\n...\n" +# { :a => 'b'}.to_yaml # => "---\n:a: b\n" +# +# Got more time on your hands? Keep on reading! +# +# == YAML Parsing +# +# Psych provides a range of interfaces for parsing a YAML document ranging from +# low level to high level, depending on your parsing needs. At the lowest +# level, is an event based parser. Mid level is access to the raw YAML AST, +# and at the highest level is the ability to unmarshal YAML to Ruby objects. +# +# == YAML Emitting +# +# Psych provides a range of interfaces ranging from low to high level for +# producing YAML documents. Very similar to the YAML parsing interfaces, Psych +# provides at the lowest level, an event based system, mid-level is building +# a YAML AST, and the highest level is converting a Ruby object straight to +# a YAML document. +# +# == High-level API +# +# === Parsing +# +# The high level YAML parser provided by Psych simply takes YAML as input and +# returns a Ruby data structure. For information on using the high level parser +# see Psych.load +# +# ==== Reading from a string +# +# Psych.safe_load("--- a") # => 'a' +# Psych.safe_load("---\n - a\n - b") # => ['a', 'b'] +# # From a trusted string: +# Psych.load("--- !ruby/range\nbegin: 0\nend: 42\nexcl: false\n") # => 0..42 +# +# ==== Reading from a file +# +# Psych.safe_load_file("data.yml", permitted_classes: [Date]) +# Psych.load_file("trusted_database.yml") +# +# ==== Exception handling +# +# begin +# # The second argument changes only the exception contents +# Psych.parse("--- `", "file.txt") +# rescue Psych::SyntaxError => ex +# ex.file # => 'file.txt' +# ex.message # => "(file.txt): found character that cannot start any token" +# end +# +# === Emitting +# +# The high level emitter has the easiest interface. Psych simply takes a Ruby +# data structure and converts it to a YAML document. See Psych.dump for more +# information on dumping a Ruby data structure. +# +# ==== Writing to a string +# +# # Dump an array, get back a YAML string +# Psych.dump(['a', 'b']) # => "---\n- a\n- b\n" +# +# # Dump an array to an IO object +# Psych.dump(['a', 'b'], StringIO.new) # => # +# +# # Dump an array with indentation set +# Psych.dump(['a', ['b']], :indentation => 3) # => "---\n- a\n- - b\n" +# +# # Dump an array to an IO with indentation set +# Psych.dump(['a', ['b']], StringIO.new, :indentation => 3) +# +# ==== Writing to a file +# +# Currently there is no direct API for dumping Ruby structure to file: +# +# File.open('database.yml', 'w') do |file| +# file.write(Psych.dump(['a', 'b'])) +# end +# +# == Mid-level API +# +# === Parsing +# +# Psych provides access to an AST produced from parsing a YAML document. This +# tree is built using the Psych::Parser and Psych::TreeBuilder. The AST can +# be examined and manipulated freely. Please see Psych::parse_stream, +# Psych::Nodes, and Psych::Nodes::Node for more information on dealing with +# YAML syntax trees. +# +# ==== Reading from a string +# +# # Returns Psych::Nodes::Stream +# Psych.parse_stream("---\n - a\n - b") +# +# # Returns Psych::Nodes::Document +# Psych.parse("---\n - a\n - b") +# +# ==== Reading from a file +# +# # Returns Psych::Nodes::Stream +# Psych.parse_stream(File.read('database.yml')) +# +# # Returns Psych::Nodes::Document +# Psych.parse_file('database.yml') +# +# ==== Exception handling +# +# begin +# # The second argument changes only the exception contents +# Psych.parse("--- `", "file.txt") +# rescue Psych::SyntaxError => ex +# ex.file # => 'file.txt' +# ex.message # => "(file.txt): found character that cannot start any token" +# end +# +# === Emitting +# +# At the mid level is building an AST. This AST is exactly the same as the AST +# used when parsing a YAML document. Users can build an AST by hand and the +# AST knows how to emit itself as a YAML document. See Psych::Nodes, +# Psych::Nodes::Node, and Psych::TreeBuilder for more information on building +# a YAML AST. +# +# ==== Writing to a string +# +# # We need Psych::Nodes::Stream (not Psych::Nodes::Document) +# stream = Psych.parse_stream("---\n - a\n - b") +# +# stream.to_yaml # => "---\n- a\n- b\n" +# +# ==== Writing to a file +# +# # We need Psych::Nodes::Stream (not Psych::Nodes::Document) +# stream = Psych.parse_stream(File.read('database.yml')) +# +# File.open('database.yml', 'w') do |file| +# file.write(stream.to_yaml) +# end +# +# == Low-level API +# +# === Parsing +# +# The lowest level parser should be used when the YAML input is already known, +# and the developer does not want to pay the price of building an AST or +# automatic detection and conversion to Ruby objects. See Psych::Parser for +# more information on using the event based parser. +# +# ==== Reading to Psych::Nodes::Stream structure +# +# parser = Psych::Parser.new(TreeBuilder.new) # => # +# parser = Psych.parser # it's an alias for the above +# +# parser.parse("---\n - a\n - b") # => # +# parser.handler # => # +# parser.handler.root # => # +# +# ==== Receiving an events stream +# +# recorder = Psych::Handlers::Recorder.new +# parser = Psych::Parser.new(recorder) +# +# parser.parse("---\n - a\n - b") +# recorder.events # => [list of [event, args] lists] +# # event is one of: Psych::Handler::EVENTS +# # args are the arguments passed to the event +# +# === Emitting +# +# The lowest level emitter is an event based system. Events are sent to a +# Psych::Emitter object. That object knows how to convert the events to a YAML +# document. This interface should be used when document format is known in +# advance or speed is a concern. See Psych::Emitter for more information. +# +# ==== Writing to a Ruby structure +# +# Psych.parser.parse("--- a") # => # +# +# parser.handler.first # => # +# parser.handler.first.to_ruby # => ["a"] +# +# parser.handler.root.first # => # +# parser.handler.root.first.to_ruby # => "a" +# +# # You can instantiate an Emitter manually +# Psych::Visitors::ToRuby.new.accept(parser.handler.root.first) +# # => "a" +# +# source://psych//lib/psych/versions.rb#3 +module Psych + class << self + # source://psych//lib/psych.rb#682 + def add_builtin_type(type_tag, &block); end + + # :stopdoc: + # + # source://psych//lib/psych.rb#676 + def add_domain_type(domain, type_tag, &block); end + + # source://psych//lib/psych.rb#692 + def add_tag(tag, klass); end + + # source://psych//lib/psych.rb#708 + def config; end + + # source://psych//lib/psych.rb#720 + def domain_types; end + + # source://psych//lib/psych.rb#732 + def domain_types=(value); end + + # call-seq: + # Psych.dump(o) -> string of yaml + # Psych.dump(o, options) -> string of yaml + # Psych.dump(o, io) -> io object passed in + # Psych.dump(o, io, options) -> io object passed in + # + # Dump Ruby object +o+ to a YAML string. Optional +options+ may be passed in + # to control the output format. If an IO object is passed in, the YAML will + # be dumped to that IO object. + # + # Currently supported options are: + # + # [:indentation] Number of space characters used to indent. + # Acceptable value should be in 0..9 range, + # otherwise option is ignored. + # + # Default: 2. + # [:line_width] Max character to wrap line at. + # + # Default: 0 (meaning "wrap at 81"). + # [:canonical] Write "canonical" YAML form (very verbose, yet + # strictly formal). + # + # Default: false. + # [:header] Write %YAML [version] at the beginning of document. + # + # Default: false. + # + # Example: + # + # # Dump an array, get back a YAML string + # Psych.dump(['a', 'b']) # => "---\n- a\n- b\n" + # + # # Dump an array to an IO object + # Psych.dump(['a', 'b'], StringIO.new) # => # + # + # # Dump an array with indentation set + # Psych.dump(['a', ['b']], indentation: 3) # => "---\n- a\n- - b\n" + # + # # Dump an array to an IO with indentation set + # Psych.dump(['a', ['b']], StringIO.new, indentation: 3) + # + # source://psych//lib/psych.rb#505 + def dump(o, io = T.unsafe(nil), options = T.unsafe(nil)); end + + # Dump a list of objects as separate documents to a document stream. + # + # Example: + # + # Psych.dump_stream("foo\n ", {}) # => "--- ! \"foo\\n \"\n--- {}\n" + # + # source://psych//lib/psych.rb#595 + def dump_stream(*objects); end + + # source://psych//lib/psych.rb#716 + def dump_tags; end + + # source://psych//lib/psych.rb#728 + def dump_tags=(value); end + + # Load +yaml+ in to a Ruby data structure. If multiple documents are + # provided, the object contained in the first document will be returned. + # +filename+ will be used in the exception message if any exception + # is raised while parsing. If +yaml+ is empty, it returns + # the specified +fallback+ return value, which defaults to +false+. + # + # Raises a Psych::SyntaxError when a YAML syntax error is detected. + # + # Example: + # + # Psych.load("--- a") # => 'a' + # Psych.load("---\n - a\n - b") # => ['a', 'b'] + # + # begin + # Psych.load("--- `", filename: "file.txt") + # rescue Psych::SyntaxError => ex + # ex.file # => 'file.txt' + # ex.message # => "(file.txt): found character that cannot start any token" + # end + # + # When the optional +symbolize_names+ keyword argument is set to a + # true value, returns symbols for keys in Hash objects (default: strings). + # + # Psych.load("---\n foo: bar") # => {"foo"=>"bar"} + # Psych.load("---\n foo: bar", symbolize_names: true) # => {:foo=>"bar"} + # + # Raises a TypeError when `yaml` parameter is NilClass. This method is + # similar to `safe_load` except that `Symbol` objects are allowed by default. + # + # source://psych//lib/psych.rb#368 + def load(yaml, permitted_classes: T.unsafe(nil), permitted_symbols: T.unsafe(nil), aliases: T.unsafe(nil), filename: T.unsafe(nil), fallback: T.unsafe(nil), symbolize_names: T.unsafe(nil), freeze: T.unsafe(nil), strict_integer: T.unsafe(nil)); end + + # Loads the document contained in +filename+. Returns the yaml contained in + # +filename+ as a Ruby object, or if the file is empty, it returns + # the specified +fallback+ return value, which defaults to +false+. + # See load for options. + # + # source://psych//lib/psych.rb#669 + def load_file(filename, **kwargs); end + + # Load multiple documents given in +yaml+. Returns the parsed documents + # as a list. If a block is given, each document will be converted to Ruby + # and passed to the block during parsing + # + # Example: + # + # Psych.load_stream("--- foo\n...\n--- bar\n...") # => ['foo', 'bar'] + # + # list = [] + # Psych.load_stream("--- foo\n...\n--- bar\n...") do |ruby| + # list << ruby + # end + # list # => ['foo', 'bar'] + # + # source://psych//lib/psych.rb#626 + def load_stream(yaml, filename: T.unsafe(nil), fallback: T.unsafe(nil), **kwargs); end + + # source://psych//lib/psych.rb#712 + def load_tags; end + + # source://psych//lib/psych.rb#724 + def load_tags=(value); end + + # Parse a YAML string in +yaml+. Returns the Psych::Nodes::Document. + # +filename+ is used in the exception message if a Psych::SyntaxError is + # raised. + # + # Raises a Psych::SyntaxError when a YAML syntax error is detected. + # + # Example: + # + # Psych.parse("---\n - a\n - b") # => # + # + # begin + # Psych.parse("--- `", filename: "file.txt") + # rescue Psych::SyntaxError => ex + # ex.file # => 'file.txt' + # ex.message # => "(file.txt): found character that cannot start any token" + # end + # + # See Psych::Nodes for more information about YAML AST. + # + # source://psych//lib/psych.rb#398 + def parse(yaml, filename: T.unsafe(nil)); end + + # Parse a file at +filename+. Returns the Psych::Nodes::Document. + # + # Raises a Psych::SyntaxError when a YAML syntax error is detected. + # + # source://psych//lib/psych.rb#410 + def parse_file(filename, fallback: T.unsafe(nil)); end + + # Parse a YAML string in +yaml+. Returns the Psych::Nodes::Stream. + # This method can handle multiple YAML documents contained in +yaml+. + # +filename+ is used in the exception message if a Psych::SyntaxError is + # raised. + # + # If a block is given, a Psych::Nodes::Document node will be yielded to the + # block as it's being parsed. + # + # Raises a Psych::SyntaxError when a YAML syntax error is detected. + # + # Example: + # + # Psych.parse_stream("---\n - a\n - b") # => # + # + # Psych.parse_stream("--- a\n--- b") do |node| + # node # => # + # end + # + # begin + # Psych.parse_stream("--- `", filename: "file.txt") + # rescue Psych::SyntaxError => ex + # ex.file # => 'file.txt' + # ex.message # => "(file.txt): found character that cannot start any token" + # end + # + # Raises a TypeError when NilClass is passed. + # + # See Psych::Nodes for more information about YAML AST. + # + # source://psych//lib/psych.rb#452 + def parse_stream(yaml, filename: T.unsafe(nil), &block); end + + # Returns a default parser + # + # source://psych//lib/psych.rb#419 + def parser; end + + # source://psych//lib/psych.rb#688 + def remove_type(type_tag); end + + # call-seq: + # Psych.safe_dump(o) -> string of yaml + # Psych.safe_dump(o, options) -> string of yaml + # Psych.safe_dump(o, io) -> io object passed in + # Psych.safe_dump(o, io, options) -> io object passed in + # + # Safely dump Ruby object +o+ to a YAML string. Optional +options+ may be passed in + # to control the output format. If an IO object is passed in, the YAML will + # be dumped to that IO object. By default, only the following + # classes are allowed to be serialized: + # + # * TrueClass + # * FalseClass + # * NilClass + # * Integer + # * Float + # * String + # * Array + # * Hash + # + # Arbitrary classes can be allowed by adding those classes to the +permitted_classes+ + # keyword argument. They are additive. For example, to allow Date serialization: + # + # Psych.safe_dump(yaml, permitted_classes: [Date]) + # + # Now the Date class can be dumped in addition to the classes listed above. + # + # A Psych::DisallowedClass exception will be raised if the object contains a + # class that isn't in the +permitted_classes+ list. + # + # Currently supported options are: + # + # [:indentation] Number of space characters used to indent. + # Acceptable value should be in 0..9 range, + # otherwise option is ignored. + # + # Default: 2. + # [:line_width] Max character to wrap line at. + # + # Default: 0 (meaning "wrap at 81"). + # [:canonical] Write "canonical" YAML form (very verbose, yet + # strictly formal). + # + # Default: false. + # [:header] Write %YAML [version] at the beginning of document. + # + # Default: false. + # + # Example: + # + # # Dump an array, get back a YAML string + # Psych.safe_dump(['a', 'b']) # => "---\n- a\n- b\n" + # + # # Dump an array to an IO object + # Psych.safe_dump(['a', 'b'], StringIO.new) # => # + # + # # Dump an array with indentation set + # Psych.safe_dump(['a', ['b']], indentation: 3) # => "---\n- a\n- - b\n" + # + # # Dump an array to an IO with indentation set + # Psych.safe_dump(['a', ['b']], StringIO.new, indentation: 3) + # + # source://psych//lib/psych.rb#578 + def safe_dump(o, io = T.unsafe(nil), options = T.unsafe(nil)); end + + # Safely load the yaml string in +yaml+. By default, only the following + # classes are allowed to be deserialized: + # + # * TrueClass + # * FalseClass + # * NilClass + # * Integer + # * Float + # * String + # * Array + # * Hash + # + # Recursive data structures are not allowed by default. Arbitrary classes + # can be allowed by adding those classes to the +permitted_classes+ keyword argument. They are + # additive. For example, to allow Date deserialization: + # + # Psych.safe_load(yaml, permitted_classes: [Date]) + # + # Now the Date class can be loaded in addition to the classes listed above. + # + # Aliases can be explicitly allowed by changing the +aliases+ keyword argument. + # For example: + # + # x = [] + # x << x + # yaml = Psych.dump x + # Psych.safe_load yaml # => raises an exception + # Psych.safe_load yaml, aliases: true # => loads the aliases + # + # A Psych::DisallowedClass exception will be raised if the yaml contains a + # class that isn't in the +permitted_classes+ list. + # + # A Psych::AliasesNotEnabled exception will be raised if the yaml contains aliases + # but the +aliases+ keyword argument is set to false. + # + # +filename+ will be used in the exception message if any exception is raised + # while parsing. + # + # When the optional +symbolize_names+ keyword argument is set to a + # true value, returns symbols for keys in Hash objects (default: strings). + # + # Psych.safe_load("---\n foo: bar") # => {"foo"=>"bar"} + # Psych.safe_load("---\n foo: bar", symbolize_names: true) # => {:foo=>"bar"} + # + # source://psych//lib/psych.rb#322 + def safe_load(yaml, permitted_classes: T.unsafe(nil), permitted_symbols: T.unsafe(nil), aliases: T.unsafe(nil), filename: T.unsafe(nil), fallback: T.unsafe(nil), symbolize_names: T.unsafe(nil), freeze: T.unsafe(nil), strict_integer: T.unsafe(nil)); end + + # Safely loads the document contained in +filename+. Returns the yaml contained in + # +filename+ as a Ruby object, or if the file is empty, it returns + # the specified +fallback+ return value, which defaults to +false+. + # See safe_load for options. + # + # source://psych//lib/psych.rb#658 + def safe_load_file(filename, **kwargs); end + + # Dump Ruby +object+ to a JSON string. + # + # source://psych//lib/psych.rb#605 + def to_json(object); end + + # Load +yaml+ in to a Ruby data structure. If multiple documents are + # provided, the object contained in the first document will be returned. + # +filename+ will be used in the exception message if any exception + # is raised while parsing. If +yaml+ is empty, it returns + # the specified +fallback+ return value, which defaults to +false+. + # + # Raises a Psych::SyntaxError when a YAML syntax error is detected. + # + # Example: + # + # Psych.unsafe_load("--- a") # => 'a' + # Psych.unsafe_load("---\n - a\n - b") # => ['a', 'b'] + # + # begin + # Psych.unsafe_load("--- `", filename: "file.txt") + # rescue Psych::SyntaxError => ex + # ex.file # => 'file.txt' + # ex.message # => "(file.txt): found character that cannot start any token" + # end + # + # When the optional +symbolize_names+ keyword argument is set to a + # true value, returns symbols for keys in Hash objects (default: strings). + # + # Psych.unsafe_load("---\n foo: bar") # => {"foo"=>"bar"} + # Psych.unsafe_load("---\n foo: bar", symbolize_names: true) # => {:foo=>"bar"} + # + # Raises a TypeError when `yaml` parameter is NilClass + # + # NOTE: This method *should not* be used to parse untrusted documents, such as + # YAML documents that are supplied via user input. Instead, please use the + # load method or the safe_load method. + # + # source://psych//lib/psych.rb#271 + def unsafe_load(yaml, filename: T.unsafe(nil), fallback: T.unsafe(nil), symbolize_names: T.unsafe(nil), freeze: T.unsafe(nil), strict_integer: T.unsafe(nil)); end + + # Load the document contained in +filename+. Returns the yaml contained in + # +filename+ as a Ruby object, or if the file is empty, it returns + # the specified +fallback+ return value, which defaults to +false+. + # + # NOTE: This method *should not* be used to parse untrusted documents, such as + # YAML documents that are supplied via user input. Instead, please use the + # safe_load_file method. + # + # source://psych//lib/psych.rb#647 + def unsafe_load_file(filename, **kwargs); end + end +end + +# Subclasses `BadAlias` for backwards compatibility +# +# source://psych//lib/psych/exception.rb#10 +class Psych::AliasesNotEnabled < ::Psych::BadAlias + # @return [AliasesNotEnabled] a new instance of AliasesNotEnabled + # + # source://psych//lib/psych/exception.rb#11 + def initialize; end +end + +# Subclasses `BadAlias` for backwards compatibility +# +# source://psych//lib/psych/exception.rb#17 +class Psych::AnchorNotDefined < ::Psych::BadAlias + # @return [AnchorNotDefined] a new instance of AnchorNotDefined + # + # source://psych//lib/psych/exception.rb#18 + def initialize(anchor_name); end +end + +# source://psych//lib/psych/class_loader.rb#6 +class Psych::ClassLoader + # @return [ClassLoader] a new instance of ClassLoader + # + # source://psych//lib/psych/class_loader.rb#21 + def initialize; end + + # source://psych//lib/psych/class_loader.rb#39 + def big_decimal; end + + # source://psych//lib/psych/class_loader.rb#39 + def complex; end + + # source://psych//lib/psych/class_loader.rb#39 + def date; end + + # source://psych//lib/psych/class_loader.rb#39 + def date_time; end + + # source://psych//lib/psych/class_loader.rb#39 + def exception; end + + # source://psych//lib/psych/class_loader.rb#25 + def load(klassname); end + + # source://psych//lib/psych/class_loader.rb#39 + def object; end + + # source://psych//lib/psych/class_loader.rb#39 + def psych_omap; end + + # source://psych//lib/psych/class_loader.rb#39 + def psych_set; end + + # source://psych//lib/psych/class_loader.rb#39 + def range; end + + # source://psych//lib/psych/class_loader.rb#39 + def rational; end + + # source://psych//lib/psych/class_loader.rb#39 + def regexp; end + + # source://psych//lib/psych/class_loader.rb#39 + def struct; end + + # source://psych//lib/psych/class_loader.rb#39 + def symbol; end + + # source://psych//lib/psych/class_loader.rb#31 + def symbolize(sym); end + + private + + # source://psych//lib/psych/class_loader.rb#47 + def find(klassname); end + + # source://psych//lib/psych/class_loader.rb#51 + def resolve(klassname); end +end + +# source://psych//lib/psych/class_loader.rb#76 +class Psych::ClassLoader::Restricted < ::Psych::ClassLoader + # @return [Restricted] a new instance of Restricted + # + # source://psych//lib/psych/class_loader.rb#77 + def initialize(classes, symbols); end + + # source://psych//lib/psych/class_loader.rb#83 + def symbolize(sym); end + + private + + # source://psych//lib/psych/class_loader.rb#95 + def find(klassname); end +end + +# If an object defines +encode_with+, then an instance of Psych::Coder will +# be passed to the method when the object is being serialized. The Coder +# automatically assumes a Psych::Nodes::Mapping is being emitted. Other +# objects like Sequence and Scalar may be emitted if +seq=+ or +scalar=+ are +# called, respectively. +# +# source://psych//lib/psych/coder.rb#9 +class Psych::Coder + # @return [Coder] a new instance of Coder + # + # source://psych//lib/psych/coder.rb#13 + def initialize(tag); end + + # source://psych//lib/psych/coder.rb#84 + def [](k); end + + # source://psych//lib/psych/coder.rb#78 + def []=(k, v); end + + # source://psych//lib/psych/coder.rb#78 + def add(k, v); end + + # Returns the value of attribute implicit. + # + # source://psych//lib/psych/coder.rb#10 + def implicit; end + + # Sets the attribute implicit + # + # @param value the value to set the attribute implicit to. + # + # source://psych//lib/psych/coder.rb#10 + def implicit=(_arg0); end + + # Emit a map. The coder will be yielded to the block. + # + # @yield [_self] + # @yieldparam _self [Psych::Coder] the object that the method was called on + # + # source://psych//lib/psych/coder.rb#34 + def map(tag = T.unsafe(nil), style = T.unsafe(nil)); end + + # Emit a map with +value+ + # + # source://psych//lib/psych/coder.rb#73 + def map=(map); end + + # Returns the value of attribute object. + # + # source://psych//lib/psych/coder.rb#10 + def object; end + + # Sets the attribute object + # + # @param value the value to set the attribute object to. + # + # source://psych//lib/psych/coder.rb#10 + def object=(_arg0); end + + # Emit a sequence with +map+ and +tag+ + # + # source://psych//lib/psych/coder.rb#54 + def represent_map(tag, map); end + + # Emit an arbitrary object +obj+ and +tag+ + # + # source://psych//lib/psych/coder.rb#60 + def represent_object(tag, obj); end + + # Emit a scalar with +value+ and +tag+ + # + # source://psych//lib/psych/coder.rb#42 + def represent_scalar(tag, value); end + + # Emit a sequence with +list+ and +tag+ + # + # source://psych//lib/psych/coder.rb#48 + def represent_seq(tag, list); end + + # source://psych//lib/psych/coder.rb#24 + def scalar(*args); end + + # Emit a scalar with +value+ + # + # source://psych//lib/psych/coder.rb#67 + def scalar=(value); end + + # Returns the value of attribute seq. + # + # source://psych//lib/psych/coder.rb#11 + def seq; end + + # Emit a sequence of +list+ + # + # source://psych//lib/psych/coder.rb#90 + def seq=(list); end + + # Returns the value of attribute style. + # + # source://psych//lib/psych/coder.rb#10 + def style; end + + # Sets the attribute style + # + # @param value the value to set the attribute style to. + # + # source://psych//lib/psych/coder.rb#10 + def style=(_arg0); end + + # Returns the value of attribute tag. + # + # source://psych//lib/psych/coder.rb#10 + def tag; end + + # Sets the attribute tag + # + # @param value the value to set the attribute tag to. + # + # source://psych//lib/psych/coder.rb#10 + def tag=(_arg0); end + + # Returns the value of attribute type. + # + # source://psych//lib/psych/coder.rb#11 + def type; end +end + +# source://psych//lib/psych/exception.rb#23 +class Psych::DisallowedClass < ::Psych::Exception + # @return [DisallowedClass] a new instance of DisallowedClass + # + # source://psych//lib/psych/exception.rb#24 + def initialize(action, klass_name); end +end + +# Psych::Handler is an abstract base class that defines the events used +# when dealing with Psych::Parser. Clients who want to use Psych::Parser +# should implement a class that inherits from Psych::Handler and define +# events that they can handle. +# +# Psych::Handler defines all events that Psych::Parser can possibly send to +# event handlers. +# +# See Psych::Parser for more details +# +# source://psych//lib/psych/handler.rb#13 +class Psych::Handler + # Called when an alias is found to +anchor+. +anchor+ will be the name + # of the anchor found. + # + # === Example + # + # Here we have an example of an array that references itself in YAML: + # + # --- &ponies + # - first element + # - *ponies + # + # &ponies is the anchor, *ponies is the alias. In this case, alias is + # called with "ponies". + # + # source://psych//lib/psych/handler.rb#110 + def alias(anchor); end + + # Called when an empty event happens. (Which, as far as I can tell, is + # never). + # + # source://psych//lib/psych/handler.rb#236 + def empty; end + + # Called with the document ends. +implicit+ is a boolean value indicating + # whether or not the document has an implicit ending. + # + # === Example + # + # Given the following YAML: + # + # --- + # hello world + # + # +implicit+ will be true. Given this YAML: + # + # --- + # hello world + # ... + # + # +implicit+ will be false. + # + # source://psych//lib/psych/handler.rb#93 + def end_document(implicit); end + + # Called when a map ends + # + # source://psych//lib/psych/handler.rb#230 + def end_mapping; end + + # Called when a sequence ends. + # + # source://psych//lib/psych/handler.rb#191 + def end_sequence; end + + # Called when the YAML stream ends + # + # source://psych//lib/psych/handler.rb#241 + def end_stream; end + + # Called before each event with line/column information. + # + # source://psych//lib/psych/handler.rb#246 + def event_location(start_line, start_column, end_line, end_column); end + + # Called when a scalar +value+ is found. The scalar may have an + # +anchor+, a +tag+, be implicitly +plain+ or implicitly +quoted+ + # + # +value+ is the string value of the scalar + # +anchor+ is an associated anchor or nil + # +tag+ is an associated tag or nil + # +plain+ is a boolean value + # +quoted+ is a boolean value + # +style+ is an integer indicating the string style + # + # See the constants in Psych::Nodes::Scalar for the possible values of + # +style+ + # + # === Example + # + # Here is a YAML document that exercises most of the possible ways this + # method can be called: + # + # --- + # - !str "foo" + # - &anchor fun + # - many + # lines + # - | + # many + # newlines + # + # The above YAML document contains a list with four strings. Here are + # the parameters sent to this method in the same order: + # + # # value anchor tag plain quoted style + # ["foo", nil, "!str", false, false, 3 ] + # ["fun", "anchor", nil, true, false, 1 ] + # ["many lines", nil, nil, true, false, 1 ] + # ["many\nnewlines\n", nil, nil, false, true, 4 ] + # + # source://psych//lib/psych/handler.rb#150 + def scalar(value, anchor, tag, plain, quoted, style); end + + # Called when the document starts with the declared +version+, + # +tag_directives+, if the document is +implicit+. + # + # +version+ will be an array of integers indicating the YAML version being + # dealt with, +tag_directives+ is a list of tuples indicating the prefix + # and suffix of each tag, and +implicit+ is a boolean indicating whether + # the document is started implicitly. + # + # === Example + # + # Given the following YAML: + # + # %YAML 1.1 + # %TAG ! tag:tenderlovemaking.com,2009: + # --- !squee + # + # The parameters for start_document must be this: + # + # version # => [1, 1] + # tag_directives # => [["!", "tag:tenderlovemaking.com,2009:"]] + # implicit # => false + # + # source://psych//lib/psych/handler.rb#72 + def start_document(version, tag_directives, implicit); end + + # Called when a map starts. + # + # +anchor+ is the anchor associated with the map or +nil+. + # +tag+ is the tag associated with the map or +nil+. + # +implicit+ is a boolean indicating whether or not the map was implicitly + # started. + # +style+ is an integer indicating the mapping style. + # + # See the constants in Psych::Nodes::Mapping for the possible values of + # +style+. + # + # === Example + # + # Here is a YAML document that exercises most of the possible ways this + # method can be called: + # + # --- + # k: !!map { hello: world } + # v: &pewpew + # hello: world + # + # The above YAML document consists of three maps, an outer map that contains + # two inner maps. Below is a matrix of the parameters sent in order to + # represent these three maps: + # + # # anchor tag implicit style + # [nil, nil, true, 1 ] + # [nil, "tag:yaml.org,2002:map", false, 2 ] + # ["pewpew", nil, true, 1 ] + # + # source://psych//lib/psych/handler.rb#225 + def start_mapping(anchor, tag, implicit, style); end + + # Called when a sequence is started. + # + # +anchor+ is the anchor associated with the sequence or nil. + # +tag+ is the tag associated with the sequence or nil. + # +implicit+ a boolean indicating whether or not the sequence was implicitly + # started. + # +style+ is an integer indicating the list style. + # + # See the constants in Psych::Nodes::Sequence for the possible values of + # +style+. + # + # === Example + # + # Here is a YAML document that exercises most of the possible ways this + # method can be called: + # + # --- + # - !!seq [ + # a + # ] + # - &pewpew + # - b + # + # The above YAML document consists of three lists, an outer list that + # contains two inner lists. Here is a matrix of the parameters sent + # to represent these lists: + # + # # anchor tag implicit style + # [nil, nil, true, 1 ] + # [nil, "tag:yaml.org,2002:seq", false, 2 ] + # ["pewpew", nil, true, 1 ] + # + # source://psych//lib/psych/handler.rb#186 + def start_sequence(anchor, tag, implicit, style); end + + # Called with +encoding+ when the YAML stream starts. This method is + # called once per stream. A stream may contain multiple documents. + # + # See the constants in Psych::Parser for the possible values of +encoding+. + # + # source://psych//lib/psych/handler.rb#47 + def start_stream(encoding); end + + # Is this handler a streaming handler? + # + # @return [Boolean] + # + # source://psych//lib/psych/handler.rb#251 + def streaming?; end +end + +# Configuration options for dumping YAML. +# +# source://psych//lib/psych/handler.rb#16 +class Psych::Handler::DumperOptions + # @return [DumperOptions] a new instance of DumperOptions + # + # source://psych//lib/psych/handler.rb#19 + def initialize; end + + # Returns the value of attribute canonical. + # + # source://psych//lib/psych/handler.rb#17 + def canonical; end + + # Sets the attribute canonical + # + # @param value the value to set the attribute canonical to. + # + # source://psych//lib/psych/handler.rb#17 + def canonical=(_arg0); end + + # Returns the value of attribute indentation. + # + # source://psych//lib/psych/handler.rb#17 + def indentation; end + + # Sets the attribute indentation + # + # @param value the value to set the attribute indentation to. + # + # source://psych//lib/psych/handler.rb#17 + def indentation=(_arg0); end + + # Returns the value of attribute line_width. + # + # source://psych//lib/psych/handler.rb#17 + def line_width; end + + # Sets the attribute line_width + # + # @param value the value to set the attribute line_width to. + # + # source://psych//lib/psych/handler.rb#17 + def line_width=(_arg0); end +end + +# source://psych//lib/psych/json/stream.rb#7 +class Psych::JSON::Stream < ::Psych::Visitors::JSONTree + include ::Psych::Streaming + extend ::Psych::Streaming::ClassMethods +end + +# YAML event parser class. This class parses a YAML document and calls +# events on the handler that is passed to the constructor. The events can +# be used for things such as constructing a YAML AST or deserializing YAML +# documents. It can even be fed back to Psych::Emitter to emit the same +# document that was parsed. +# +# See Psych::Handler for documentation on the events that Psych::Parser emits. +# +# Here is an example that prints out ever scalar found in a YAML document: +# +# # Handler for detecting scalar values +# class ScalarHandler < Psych::Handler +# def scalar value, anchor, tag, plain, quoted, style +# puts value +# end +# end +# +# parser = Psych::Parser.new(ScalarHandler.new) +# parser.parse(yaml_document) +# +# Here is an example that feeds the parser back in to Psych::Emitter. The +# YAML document is read from STDIN and written back out to STDERR: +# +# parser = Psych::Parser.new(Psych::Emitter.new($stderr)) +# parser.parse($stdin) +# +# Psych uses Psych::Parser in combination with Psych::TreeBuilder to +# construct an AST of the parsed YAML document. +# +# source://psych//lib/psych/parser.rb#33 +class Psych::Parser + # Creates a new Psych::Parser instance with +handler+. YAML events will + # be called on +handler+. See Psych::Parser for more details. + # + # @return [Parser] a new instance of Parser + # + # source://psych//lib/psych/parser.rb#47 + def initialize(handler = T.unsafe(nil)); end + + # Set the encoding for this parser to +encoding+ + # + # source://psych//lib/psych/parser.rb#41 + def external_encoding=(_arg0); end + + # The handler on which events will be called + # + # source://psych//lib/psych/parser.rb#38 + def handler; end + + # The handler on which events will be called + # + # source://psych//lib/psych/parser.rb#38 + def handler=(_arg0); end + + # call-seq: + # parser.parse(yaml) + # + # Parse the YAML document contained in +yaml+. Events will be called on + # the handler set on the parser instance. + # + # See Psych::Parser and Psych::Parser#handler + # + # source://psych//lib/psych/parser.rb#61 + def parse(yaml, path = T.unsafe(nil)); end +end + +# Scan scalars for built in types +# +# source://psych//lib/psych/scalar_scanner.rb#6 +class Psych::ScalarScanner + # Create a new scanner + # + # @return [ScalarScanner] a new instance of ScalarScanner + # + # source://psych//lib/psych/scalar_scanner.rb#30 + def initialize(class_loader, strict_integer: T.unsafe(nil)); end + + # Returns the value of attribute class_loader. + # + # source://psych//lib/psych/scalar_scanner.rb#27 + def class_loader; end + + # Parse and return an int from +string+ + # + # source://psych//lib/psych/scalar_scanner.rb#109 + def parse_int(string); end + + # Parse and return a Time from +string+ + # + # source://psych//lib/psych/scalar_scanner.rb#115 + def parse_time(string); end + + # Tokenize +string+ returning the Ruby object + # + # source://psych//lib/psych/scalar_scanner.rb#37 + def tokenize(string); end +end + +# Same as above, but allows commas. +# Not to YML spec, but kept for backwards compatibility +# +# source://psych//lib/psych/scalar_scanner.rb#22 +Psych::ScalarScanner::INTEGER_LEGACY = T.let(T.unsafe(nil), Regexp) + +# Taken from http://yaml.org/type/int.html +# +# source://psych//lib/psych/scalar_scanner.rb#15 +Psych::ScalarScanner::INTEGER_STRICT = T.let(T.unsafe(nil), Regexp) + +# Psych::Stream is a streaming YAML emitter. It will not buffer your YAML, +# but send it straight to an IO. +# +# Here is an example use: +# +# stream = Psych::Stream.new($stdout) +# stream.start +# stream.push({:foo => 'bar'}) +# stream.finish +# +# YAML will be immediately emitted to $stdout with no buffering. +# +# Psych::Stream#start will take a block and ensure that Psych::Stream#finish +# is called, so you can do this form: +# +# stream = Psych::Stream.new($stdout) +# stream.start do |em| +# em.push(:foo => 'bar') +# end +# +# source://psych//lib/psych/stream.rb#24 +class Psych::Stream < ::Psych::Visitors::YAMLTree + include ::Psych::Streaming + extend ::Psych::Streaming::ClassMethods +end + +# source://psych//lib/psych/stream.rb#25 +class Psych::Stream::Emitter < ::Psych::Emitter + # source://psych//lib/psych/stream.rb#26 + def end_document(implicit_end = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://psych//lib/psych/stream.rb#30 + def streaming?; end +end + +# source://psych//lib/psych/streaming.rb#3 +module Psych::Streaming + # Start streaming using +encoding+ + # + # source://psych//lib/psych/streaming.rb#18 + def start(encoding = T.unsafe(nil)); end + + private + + # source://psych//lib/psych/streaming.rb#25 + def register(target, obj); end +end + +# source://psych//lib/psych/streaming.rb#4 +module Psych::Streaming::ClassMethods + # Create a new streaming emitter. Emitter will print to +io+. See + # Psych::Stream for an example. + # + # source://psych//lib/psych/streaming.rb#8 + def new(io); end +end + +# source://psych//lib/psych/syntax_error.rb#5 +class Psych::SyntaxError < ::Psych::Exception + # @return [SyntaxError] a new instance of SyntaxError + # + # source://psych//lib/psych/syntax_error.rb#8 + def initialize(file, line, col, offset, problem, context); end + + # Returns the value of attribute column. + # + # source://psych//lib/psych/syntax_error.rb#6 + def column; end + + # Returns the value of attribute context. + # + # source://psych//lib/psych/syntax_error.rb#6 + def context; end + + # Returns the value of attribute file. + # + # source://psych//lib/psych/syntax_error.rb#6 + def file; end + + # Returns the value of attribute line. + # + # source://psych//lib/psych/syntax_error.rb#6 + def line; end + + # Returns the value of attribute offset. + # + # source://psych//lib/psych/syntax_error.rb#6 + def offset; end + + # Returns the value of attribute problem. + # + # source://psych//lib/psych/syntax_error.rb#6 + def problem; end +end + +# This class works in conjunction with Psych::Parser to build an in-memory +# parse tree that represents a YAML document. +# +# == Example +# +# parser = Psych::Parser.new Psych::TreeBuilder.new +# parser.parse('--- foo') +# tree = parser.handler.root +# +# See Psych::Handler for documentation on the event methods used in this +# class. +# +# source://psych//lib/psych/tree_builder.rb#18 +class Psych::TreeBuilder < ::Psych::Handler + # Create a new TreeBuilder instance + # + # @return [TreeBuilder] a new instance of TreeBuilder + # + # source://psych//lib/psych/tree_builder.rb#22 + def initialize; end + + # source://psych//lib/psych/tree_builder.rb#103 + def alias(anchor); end + + # Handles end_document events with +version+, +tag_directives+, + # and +implicit+ styling. + # + # See Psych::Handler#start_document + # + # source://psych//lib/psych/tree_builder.rb#77 + def end_document(implicit_end = T.unsafe(nil)); end + + # source://psych//lib/psych/tree_builder.rb#52 + def end_mapping; end + + # source://psych//lib/psych/tree_builder.rb#52 + def end_sequence; end + + # source://psych//lib/psych/tree_builder.rb#90 + def end_stream; end + + # source://psych//lib/psych/tree_builder.rb#33 + def event_location(start_line, start_column, end_line, end_column); end + + # Returns the root node for the built tree + # + # source://psych//lib/psych/tree_builder.rb#19 + def root; end + + # source://psych//lib/psych/tree_builder.rb#96 + def scalar(value, anchor, tag, plain, quoted, style); end + + # Handles start_document events with +version+, +tag_directives+, + # and +implicit+ styling. + # + # See Psych::Handler#start_document + # + # source://psych//lib/psych/tree_builder.rb#65 + def start_document(version, tag_directives, implicit); end + + # source://psych//lib/psych/tree_builder.rb#45 + def start_mapping(anchor, tag, implicit, style); end + + # source://psych//lib/psych/tree_builder.rb#45 + def start_sequence(anchor, tag, implicit, style); end + + # source://psych//lib/psych/tree_builder.rb#84 + def start_stream(encoding); end + + private + + # source://psych//lib/psych/tree_builder.rb#116 + def pop; end + + # source://psych//lib/psych/tree_builder.rb#111 + def push(value); end + + # source://psych//lib/psych/tree_builder.rb#132 + def set_end_location(node); end + + # source://psych//lib/psych/tree_builder.rb#122 + def set_location(node); end + + # source://psych//lib/psych/tree_builder.rb#127 + def set_start_location(node); end +end + +# The version of Psych you are using +# +# source://psych//lib/psych/versions.rb#5 +Psych::VERSION = T.let(T.unsafe(nil), String) + +# source://psych//lib/psych/visitors/depth_first.rb#4 +class Psych::Visitors::DepthFirst < ::Psych::Visitors::Visitor + # @return [DepthFirst] a new instance of DepthFirst + # + # source://psych//lib/psych/visitors/depth_first.rb#5 + def initialize(block); end + + private + + # source://psych//lib/psych/visitors/depth_first.rb#11 + def nary(o); end + + # source://psych//lib/psych/visitors/depth_first.rb#20 + def terminal(o); end + + # source://psych//lib/psych/visitors/depth_first.rb#20 + def visit_Psych_Nodes_Alias(o); end + + # source://psych//lib/psych/visitors/depth_first.rb#11 + def visit_Psych_Nodes_Document(o); end + + # source://psych//lib/psych/visitors/depth_first.rb#11 + def visit_Psych_Nodes_Mapping(o); end + + # source://psych//lib/psych/visitors/depth_first.rb#20 + def visit_Psych_Nodes_Scalar(o); end + + # source://psych//lib/psych/visitors/depth_first.rb#11 + def visit_Psych_Nodes_Sequence(o); end + + # source://psych//lib/psych/visitors/depth_first.rb#11 + def visit_Psych_Nodes_Stream(o); end +end + +# source://psych//lib/psych/visitors/yaml_tree.rb#540 +class Psych::Visitors::RestrictedYAMLTree < ::Psych::Visitors::YAMLTree + # @return [RestrictedYAMLTree] a new instance of RestrictedYAMLTree + # + # source://psych//lib/psych/visitors/yaml_tree.rb#552 + def initialize(emitter, ss, options); end + + # source://psych//lib/psych/visitors/yaml_tree.rb#565 + def accept(target); end + + # source://psych//lib/psych/visitors/yaml_tree.rb#577 + def visit_Symbol(sym); end +end + +# source://psych//lib/psych/visitors/yaml_tree.rb#541 +Psych::Visitors::RestrictedYAMLTree::DEFAULT_PERMITTED_CLASSES = T.let(T.unsafe(nil), Hash) + +# This class walks a YAML AST, converting each node to Ruby +# +# source://psych//lib/psych/visitors/to_ruby.rb#14 +class Psych::Visitors::ToRuby < ::Psych::Visitors::Visitor + # @return [ToRuby] a new instance of ToRuby + # + # source://psych//lib/psych/visitors/to_ruby.rb#23 + def initialize(ss, class_loader, symbolize_names: T.unsafe(nil), freeze: T.unsafe(nil)); end + + # source://psych//lib/psych/visitors/to_ruby.rb#34 + def accept(target); end + + # Returns the value of attribute class_loader. + # + # source://psych//lib/psych/visitors/to_ruby.rb#21 + def class_loader; end + + # source://psych//lib/psych/visitors/to_ruby.rb#327 + def visit_Psych_Nodes_Alias(o); end + + # source://psych//lib/psych/visitors/to_ruby.rb#319 + def visit_Psych_Nodes_Document(o); end + + # source://psych//lib/psych/visitors/to_ruby.rb#165 + def visit_Psych_Nodes_Mapping(o); end + + # source://psych//lib/psych/visitors/to_ruby.rb#129 + def visit_Psych_Nodes_Scalar(o); end + + # source://psych//lib/psych/visitors/to_ruby.rb#133 + def visit_Psych_Nodes_Sequence(o); end + + # source://psych//lib/psych/visitors/to_ruby.rb#323 + def visit_Psych_Nodes_Stream(o); end + + private + + # source://psych//lib/psych/visitors/to_ruby.rb#395 + def deduplicate(key); end + + # source://psych//lib/psych/visitors/to_ruby.rb#51 + def deserialize(o); end + + # source://psych//lib/psych/visitors/to_ruby.rb#412 + def init_with(o, h, node); end + + # source://psych//lib/psych/visitors/to_ruby.rb#404 + def merge_key(hash, key, val); end + + # source://psych//lib/psych/visitors/to_ruby.rb#333 + def register(node, object); end + + # source://psych//lib/psych/visitors/to_ruby.rb#338 + def register_empty(object); end + + # Convert +klassname+ to a Class + # + # source://psych//lib/psych/visitors/to_ruby.rb#425 + def resolve_class(klassname); end + + # source://psych//lib/psych/visitors/to_ruby.rb#407 + def revive(klass, node); end + + # source://psych//lib/psych/visitors/to_ruby.rb#344 + def revive_hash(hash, o, tagged = T.unsafe(nil)); end + + class << self + # source://psych//lib/psych/visitors/to_ruby.rb#15 + def create(symbolize_names: T.unsafe(nil), freeze: T.unsafe(nil), strict_integer: T.unsafe(nil)); end + end +end + +# source://psych//lib/psych/visitors/visitor.rb#4 +class Psych::Visitors::Visitor + # source://psych//lib/psych/visitors/visitor.rb#5 + def accept(target); end + + private + + # source://psych//lib/psych/visitors/visitor.rb#19 + def dispatch; end + + # source://psych//lib/psych/visitors/visitor.rb#29 + def visit(target); end + + class << self + # @api private + # + # source://psych//lib/psych/visitors/visitor.rb#12 + def dispatch_cache; end + end +end + +# YAMLTree builds a YAML ast given a Ruby object. For example: +# +# builder = Psych::Visitors::YAMLTree.new +# builder << { :foo => 'bar' } +# builder.tree # => # ['a', 'b', 'c'] # - # source://rake//lib/rake/file_utils.rb#128 + # source://rake//lib/rake/file_utils.rb#126 def split_all(path); end private @@ -75,14 +75,14 @@ module FileUtils # source://rake//lib/rake/file_utils.rb#61 def create_shell_runner(cmd); end - # source://rake//lib/rake/file_utils.rb#86 + # source://rake//lib/rake/file_utils.rb#84 def set_verbose_option(options); end - # source://rake//lib/rake/file_utils.rb#73 + # source://rake//lib/rake/file_utils.rb#71 def sh_show_command(cmd); end end -# source://rake//lib/rake/file_utils.rb#108 +# source://rake//lib/rake/file_utils.rb#106 FileUtils::LN_SUPPORTED = T.let(T.unsafe(nil), Array) # Path to the currently running Ruby program @@ -195,13 +195,13 @@ class Rake::Application # Add a file to the list of files to be imported. # - # source://rake//lib/rake/application.rb#777 + # source://rake//lib/rake/application.rb#801 def add_import(fn); end # Add a loader to handle imported files ending in the extension # +ext+. # - # source://rake//lib/rake/application.rb#139 + # source://rake//lib/rake/application.rb#161 def add_loader(ext, loader); end # Collect the list of tasks on the command line. If no tasks are @@ -213,13 +213,13 @@ class Rake::Application # recognised command-line options, which OptionParser.parse will # have taken care of already. # - # source://rake//lib/rake/application.rb#758 + # source://rake//lib/rake/application.rb#782 def collect_command_line_tasks(args); end # Default task name ("default"). # (May be overridden by subclasses) # - # source://rake//lib/rake/application.rb#772 + # source://rake//lib/rake/application.rb#796 def default_task_name; end # Warn about deprecated usage. @@ -227,75 +227,75 @@ class Rake::Application # Example: # Rake.application.deprecate("import", "Rake.import", caller.first) # - # source://rake//lib/rake/application.rb#258 + # source://rake//lib/rake/application.rb#282 def deprecate(old_usage, new_usage, call_site); end - # source://rake//lib/rake/application.rb#222 + # source://rake//lib/rake/application.rb#244 def display_cause_details(ex); end # Display the error message that caused the exception. # - # source://rake//lib/rake/application.rb#206 + # source://rake//lib/rake/application.rb#228 def display_error_message(ex); end - # source://rake//lib/rake/application.rb#245 + # source://rake//lib/rake/application.rb#269 def display_exception_backtrace(ex); end - # source://rake//lib/rake/application.rb#214 + # source://rake//lib/rake/application.rb#236 def display_exception_details(ex); end - # source://rake//lib/rake/application.rb#229 + # source://rake//lib/rake/application.rb#251 def display_exception_details_seen; end - # source://rake//lib/rake/application.rb#237 + # source://rake//lib/rake/application.rb#259 def display_exception_message_details(ex); end # Display the tasks and prerequisites # - # source://rake//lib/rake/application.rb#381 + # source://rake//lib/rake/application.rb#405 def display_prerequisites; end # Display the tasks and comments. # - # source://rake//lib/rake/application.rb#298 + # source://rake//lib/rake/application.rb#322 def display_tasks_and_comments; end # Calculate the dynamic width of the # - # source://rake//lib/rake/application.rb#349 + # source://rake//lib/rake/application.rb#373 def dynamic_width; end - # source://rake//lib/rake/application.rb#353 + # source://rake//lib/rake/application.rb#377 def dynamic_width_stty; end - # source://rake//lib/rake/application.rb#357 + # source://rake//lib/rake/application.rb#381 def dynamic_width_tput; end # Exit the program because of an unhandled exception. # (may be overridden by subclasses) # - # source://rake//lib/rake/application.rb#201 + # source://rake//lib/rake/application.rb#223 def exit_because_of_exception(ex); end - # source://rake//lib/rake/application.rb#678 + # source://rake//lib/rake/application.rb#702 def find_rakefile_location; end # Read and handle the command line options. Returns the command line # arguments that we didn't understand, which should (in theory) be just # task names and env vars. # - # source://rake//lib/rake/application.rb#644 + # source://rake//lib/rake/application.rb#668 def handle_options(argv); end # @return [Boolean] # - # source://rake//lib/rake/application.rb#233 + # source://rake//lib/rake/application.rb#255 def has_cause?(ex); end # True if one of the files in RAKEFILES is in the current directory. # If a match is found, it is copied into @rakefile. # - # source://rake//lib/rake/application.rb#274 + # source://rake//lib/rake/application.rb#298 def have_rakefile; end # Initialize the command line parameters and app name. @@ -305,17 +305,17 @@ class Rake::Application # Invokes a task with arguments that are extracted from +task_string+ # - # source://rake//lib/rake/application.rb#157 + # source://rake//lib/rake/application.rb#179 def invoke_task(task_string); end # Load the pending list of imported files. # - # source://rake//lib/rake/application.rb#782 + # source://rake//lib/rake/application.rb#806 def load_imports; end # Find the rakefile and then load it and any pending imports. # - # source://rake//lib/rake/application.rb#102 + # source://rake//lib/rake/application.rb#124 def load_rakefile; end # The name of the application (typically 'rake') @@ -325,7 +325,7 @@ class Rake::Application # Application options from the command line # - # source://rake//lib/rake/application.rb#145 + # source://rake//lib/rake/application.rb#167 def options; end # The original directory where rake was invoked. @@ -333,16 +333,16 @@ class Rake::Application # source://rake//lib/rake/application.rb#27 def original_dir; end - # source://rake//lib/rake/application.rb#163 + # source://rake//lib/rake/application.rb#185 def parse_task_string(string); end - # source://rake//lib/rake/application.rb#690 + # source://rake//lib/rake/application.rb#714 def print_rakefile_directory(location); end # Similar to the regular Ruby +require+ command, but will check # for *.rake files in addition to *.rb files. # - # source://rake//lib/rake/application.rb#664 + # source://rake//lib/rake/application.rb#688 def rake_require(file_name, paths = T.unsafe(nil), loaded = T.unsafe(nil)); end # Name of the actual rakefile used. @@ -350,10 +350,10 @@ class Rake::Application # source://rake//lib/rake/application.rb#30 def rakefile; end - # source://rake//lib/rake/application.rb#798 + # source://rake//lib/rake/application.rb#822 def rakefile_location(backtrace = T.unsafe(nil)); end - # source://rake//lib/rake/application.rb#695 + # source://rake//lib/rake/application.rb#719 def raw_load_rakefile; end # Run the Rake application. The run method performs the following @@ -372,26 +372,26 @@ class Rake::Application # Run the given block with the thread startup and shutdown. # - # source://rake//lib/rake/application.rb#122 + # source://rake//lib/rake/application.rb#144 def run_with_threads; end - # source://rake//lib/rake/application.rb#807 + # source://rake//lib/rake/application.rb#831 def set_default_options; end # Provide standard exception handling for the given block. # - # source://rake//lib/rake/application.rb#185 + # source://rake//lib/rake/application.rb#207 def standard_exception_handling; end # A list of all the standard options used in rake, suitable for # passing to OptionParser. # - # source://rake//lib/rake/application.rb#402 + # source://rake//lib/rake/application.rb#426 def standard_rake_options; end # The directory path containing the system wide rakefiles. # - # source://rake//lib/rake/application.rb#727 + # source://rake//lib/rake/application.rb#751 def system_dir; end # Number of columns on the terminal @@ -404,17 +404,17 @@ class Rake::Application # source://rake//lib/rake/application.rb#33 def terminal_columns=(_arg0); end - # source://rake//lib/rake/application.rb#337 + # source://rake//lib/rake/application.rb#361 def terminal_width; end # Return the thread pool used for multithreaded processing. # - # source://rake//lib/rake/application.rb#150 + # source://rake//lib/rake/application.rb#172 def thread_pool; end # Run the top level tasks of a Rake application. # - # source://rake//lib/rake/application.rb#109 + # source://rake//lib/rake/application.rb#131 def top_level; end # List of the top level task names (task names from the command line). @@ -422,10 +422,10 @@ class Rake::Application # source://rake//lib/rake/application.rb#36 def top_level_tasks; end - # source://rake//lib/rake/application.rb#388 + # source://rake//lib/rake/application.rb#412 def trace(*strings); end - # source://rake//lib/rake/application.rb#370 + # source://rake//lib/rake/application.rb#394 def truncate(string, width); end # We will truncate output if we are outputting to a TTY or if we've been @@ -433,7 +433,7 @@ class Rake::Application # # @return [Boolean] # - # source://rake//lib/rake/application.rb#293 + # source://rake//lib/rake/application.rb#317 def truncate_output?; end # Override the detected TTY output state (mostly for testing) @@ -445,41 +445,44 @@ class Rake::Application # # @return [Boolean] # - # source://rake//lib/rake/application.rb#287 + # source://rake//lib/rake/application.rb#311 def tty_output?; end # @return [Boolean] # - # source://rake//lib/rake/application.rb#361 + # source://rake//lib/rake/application.rb#385 def unix?; end # @return [Boolean] # - # source://rake//lib/rake/application.rb#366 + # source://rake//lib/rake/application.rb#390 def windows?; end private - # source://rake//lib/rake/application.rb#721 + # source://rake//lib/rake/application.rb#745 def glob(path, &block); end # Does the exception have a task invocation chain? # # @return [Boolean] # - # source://rake//lib/rake/application.rb#267 + # source://rake//lib/rake/application.rb#291 def has_chain?(exception); end - # source://rake//lib/rake/application.rb#620 + # source://rake//lib/rake/application.rb#102 + def load_debug_at_stop_feature; end + + # source://rake//lib/rake/application.rb#644 def select_tasks_to_show(options, show_tasks, value); end - # source://rake//lib/rake/application.rb#627 + # source://rake//lib/rake/application.rb#651 def select_trace_output(options, trace_option, value); end - # source://rake//lib/rake/application.rb#393 + # source://rake//lib/rake/application.rb#417 def sort_options(options); end - # source://rake//lib/rake/application.rb#744 + # source://rake//lib/rake/application.rb#768 def standard_system_dir; end end @@ -555,43 +558,13 @@ module Rake::DSL private - # source://rake//lib/rake/file_utils_ext.rb#34 - def cd(*args, **options, &block); end - - # source://rake//lib/rake/file_utils_ext.rb#34 - def chdir(*args, **options, &block); end - - # source://rake//lib/rake/file_utils_ext.rb#34 - def chmod(*args, **options, &block); end - - # source://rake//lib/rake/file_utils_ext.rb#34 - def chmod_R(*args, **options, &block); end - - # source://rake//lib/rake/file_utils_ext.rb#34 - def chown(*args, **options, &block); end - - # source://rake//lib/rake/file_utils_ext.rb#34 - def chown_R(*args, **options, &block); end - - # source://rake//lib/rake/file_utils_ext.rb#34 - def copy(*args, **options, &block); end - - # source://rake//lib/rake/file_utils_ext.rb#34 - def cp(*args, **options, &block); end - - # source://rake//lib/rake/file_utils_ext.rb#34 - def cp_lr(*args, **options, &block); end - - # source://rake//lib/rake/file_utils_ext.rb#34 - def cp_r(*args, **options, &block); end - # Describes the next rake task. Duplicate descriptions are discarded. # Descriptions are shown with rake -T (up to the first # sentence) and rake -D (the entire description). # # Example: # desc "Run the Unit Tests" - # task test: [:build] + # task test: [:build] do # # ... run tests # end # @@ -646,39 +619,6 @@ module Rake::DSL # source://rake//lib/rake/dsl_definition.rb#183 def import(*fns); end - # source://rake//lib/rake/file_utils_ext.rb#34 - def install(*args, **options, &block); end - - # source://rake//lib/rake/file_utils_ext.rb#34 - def link(*args, **options, &block); end - - # source://rake//lib/rake/file_utils_ext.rb#34 - def ln(*args, **options, &block); end - - # source://rake//lib/rake/file_utils_ext.rb#34 - def ln_s(*args, **options, &block); end - - # source://rake//lib/rake/file_utils_ext.rb#34 - def ln_sf(*args, **options, &block); end - - # source://rake//lib/rake/file_utils_ext.rb#34 - def ln_sr(*args, **options, &block); end - - # source://rake//lib/rake/file_utils_ext.rb#34 - def makedirs(*args, **options, &block); end - - # source://rake//lib/rake/file_utils_ext.rb#34 - def mkdir(*args, **options, &block); end - - # source://rake//lib/rake/file_utils_ext.rb#34 - def mkdir_p(*args, **options, &block); end - - # source://rake//lib/rake/file_utils_ext.rb#34 - def mkpath(*args, **options, &block); end - - # source://rake//lib/rake/file_utils_ext.rb#34 - def move(*args, **options, &block); end - # Declare a task that performs its prerequisites in # parallel. Multitasks does *not* guarantee that its prerequisites # will execute in any given order (which is obvious when you think @@ -690,9 +630,6 @@ module Rake::DSL # source://rake//lib/rake/dsl_definition.rb#112 def multitask(*args, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 - def mv(*args, **options, &block); end - # Create a new rake namespace and use it for evaluating the given # block. Returns a NameSpace object that can be used to lookup # tasks defined in the namespace. @@ -715,39 +652,6 @@ module Rake::DSL # source://rake//lib/rake/dsl_definition.rb#135 def namespace(name = T.unsafe(nil), &block); end - # source://rake//lib/rake/file_utils_ext.rb#77 - def nowrite(value = T.unsafe(nil)); end - - # source://rake//lib/rake/file_utils_ext.rb#123 - def rake_check_options(options, *optdecl); end - - # source://rake//lib/rake/file_utils_ext.rb#116 - def rake_output_message(message); end - - # source://rake//lib/rake/file_utils_ext.rb#34 - def remove(*args, **options, &block); end - - # source://rake//lib/rake/file_utils_ext.rb#34 - def rm(*args, **options, &block); end - - # source://rake//lib/rake/file_utils_ext.rb#34 - def rm_f(*args, **options, &block); end - - # source://rake//lib/rake/file_utils_ext.rb#34 - def rm_r(*args, **options, &block); end - - # source://rake//lib/rake/file_utils_ext.rb#34 - def rm_rf(*args, **options, &block); end - - # source://rake//lib/rake/file_utils_ext.rb#34 - def rmdir(*args, **options, &block); end - - # source://rake//lib/rake/file_utils_ext.rb#34 - def rmtree(*args, **options, &block); end - - # source://rake//lib/rake/file_utils.rb#100 - def ruby(*args, **options, &block); end - # Declare a rule for auto-tasks. # # Example: @@ -758,21 +662,6 @@ module Rake::DSL # source://rake//lib/rake/dsl_definition.rb#151 def rule(*args, &block); end - # source://rake//lib/rake/file_utils.rb#112 - def safe_ln(*args, **options); end - - # source://rake//lib/rake/file_utils_ext.rb#34 - def safe_unlink(*args, **options, &block); end - - # source://rake//lib/rake/file_utils.rb#43 - def sh(*cmd, &block); end - - # source://rake//lib/rake/file_utils.rb#128 - def split_all(path); end - - # source://rake//lib/rake/file_utils_ext.rb#34 - def symlink(*args, **options, &block); end - # :call-seq: # task(task_name) # task(task_name: dependencies) @@ -806,15 +695,6 @@ module Rake::DSL # # source://rake//lib/rake/dsl_definition.rb#59 def task(*args, &block); end - - # source://rake//lib/rake/file_utils_ext.rb#34 - def touch(*args, **options, &block); end - - # source://rake//lib/rake/file_utils_ext.rb#53 - def verbose(value = T.unsafe(nil)); end - - # source://rake//lib/rake/file_utils_ext.rb#107 - def when_writing(msg = T.unsafe(nil)); end end # Default Rakefile loader used by +import+. @@ -848,13 +728,6 @@ class Rake::EarlyTime # source://rake//lib/rake/early_time.rb#16 def to_s; end - - class << self - private - - def allocate; end - def new(*_arg0); end - end end # A FileCreationTask is a file task that when used as a dependency will be @@ -862,7 +735,7 @@ end # not re-triggered if any of its dependencies are newer, nor does trigger # any rebuilds of tasks that depend on it whenever it is updated. # -# source://rake//lib/rake/file_creation_task.rb#12 +# source://rake//lib/rake/file_creation_task.rb#13 class Rake::FileCreationTask < ::Rake::FileTask # Is this file task needed? Yes if it doesn't exist. # @@ -1580,7 +1453,7 @@ class Rake::FileTask < ::Rake::Task # Time stamp for file task. # - # source://rake//lib/rake/file_task.rb#21 + # source://rake//lib/rake/file_task.rb#25 def timestamp; end private @@ -1589,14 +1462,14 @@ class Rake::FileTask < ::Rake::Task # # @return [Boolean] # - # source://rake//lib/rake/file_task.rb#32 + # source://rake//lib/rake/file_task.rb#36 def out_of_date?(stamp); end class << self # Apply the scope to the task name according to the rules for this kind # of task. File based tasks ignore the scope when creating the name. # - # source://rake//lib/rake/file_task.rb#49 + # source://rake//lib/rake/file_task.rb#53 def scope_name(scope, task_name); end end end @@ -1658,9 +1531,6 @@ module Rake::FileUtilsExt # source://rake//lib/rake/file_utils_ext.rb#34 def ln_sf(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 - def ln_sr(*args, **options, &block); end - # source://rake//lib/rake/file_utils_ext.rb#34 def makedirs(*args, **options, &block); end @@ -1890,13 +1760,6 @@ class Rake::LateTime # source://rake//lib/rake/late_time.rb#12 def to_s; end - - class << self - private - - def allocate; end - def new(*_arg0); end - end end # Polylithic linked list structure used to implement several data @@ -2854,14 +2717,14 @@ class Rake::ThreadHistoryDisplay def threads; end end -# source://rake//lib/rake/thread_pool.rb#7 +# source://rake//lib/rake/thread_pool.rb#8 class Rake::ThreadPool # Creates a ThreadPool object. The +thread_count+ parameter is the size # of the pool. # # @return [ThreadPool] a new instance of ThreadPool # - # source://rake//lib/rake/thread_pool.rb#11 + # source://rake//lib/rake/thread_pool.rb#12 def initialize(thread_count); end # Creates a future executed by the +ThreadPool+. diff --git a/gem/sorbet/rbi/gems/regexp_parser@2.5.0.rbi b/gem/sorbet/rbi/gems/regexp_parser@2.9.0.rbi similarity index 100% rename from gem/sorbet/rbi/gems/regexp_parser@2.5.0.rbi rename to gem/sorbet/rbi/gems/regexp_parser@2.9.0.rbi diff --git a/gem/sorbet/rbi/gems/reline@0.3.2.rbi b/gem/sorbet/rbi/gems/reline@0.4.2.rbi similarity index 100% rename from gem/sorbet/rbi/gems/reline@0.3.2.rbi rename to gem/sorbet/rbi/gems/reline@0.4.2.rbi diff --git a/gem/sorbet/rbi/gems/rexml@3.2.5.rbi b/gem/sorbet/rbi/gems/rexml@3.2.6.rbi similarity index 100% rename from gem/sorbet/rbi/gems/rexml@3.2.5.rbi rename to gem/sorbet/rbi/gems/rexml@3.2.6.rbi diff --git a/gem/sorbet/rbi/gems/rubocop-ast@1.19.1.rbi b/gem/sorbet/rbi/gems/rubocop-ast@1.30.0.rbi similarity index 100% rename from gem/sorbet/rbi/gems/rubocop-ast@1.19.1.rbi rename to gem/sorbet/rbi/gems/rubocop-ast@1.30.0.rbi diff --git a/gem/sorbet/rbi/gems/rubocop-shopify@2.8.0.rbi b/gem/sorbet/rbi/gems/rubocop-shopify@2.14.0.rbi similarity index 100% rename from gem/sorbet/rbi/gems/rubocop-shopify@2.8.0.rbi rename to gem/sorbet/rbi/gems/rubocop-shopify@2.14.0.rbi diff --git a/gem/sorbet/rbi/gems/rubocop-sorbet@0.6.11.rbi b/gem/sorbet/rbi/gems/rubocop-sorbet@0.7.6.rbi similarity index 100% rename from gem/sorbet/rbi/gems/rubocop-sorbet@0.6.11.rbi rename to gem/sorbet/rbi/gems/rubocop-sorbet@0.7.6.rbi diff --git a/gem/sorbet/rbi/gems/rubocop@1.32.0.rbi b/gem/sorbet/rbi/gems/rubocop@1.60.2.rbi similarity index 100% rename from gem/sorbet/rbi/gems/rubocop@1.32.0.rbi rename to gem/sorbet/rbi/gems/rubocop@1.60.2.rbi diff --git a/gem/sorbet/rbi/gems/ruby-progressbar@1.11.0.rbi b/gem/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi similarity index 71% rename from gem/sorbet/rbi/gems/ruby-progressbar@1.11.0.rbi rename to gem/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi index e6285667..598477e5 100644 --- a/gem/sorbet/rbi/gems/ruby-progressbar@1.11.0.rbi +++ b/gem/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi @@ -4,253 +4,271 @@ # This is an autogenerated file for types exported from the `ruby-progressbar` gem. # Please instead update this file by running `bin/tapioca gem ruby-progressbar`. -# source://ruby-progressbar//lib/ruby-progressbar/output.rb#1 +# source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#4 class ProgressBar class << self - # source://ruby-progressbar//lib/ruby-progressbar.rb#19 + # source://ruby-progressbar//lib/ruby-progressbar.rb#9 def create(*args); end end end -# source://ruby-progressbar//lib/ruby-progressbar/base.rb#4 +# source://ruby-progressbar//lib/ruby-progressbar/base.rb#17 class ProgressBar::Base extend ::Forwardable # @return [Base] a new instance of Base # - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#16 + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#45 def initialize(options = T.unsafe(nil)); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def clear(*args, **_arg1, &block); end - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#88 + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#137 def decrement; end - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#44 + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#92 def finish; end # @return [Boolean] # - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#80 + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#129 def finished?; end - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#154 + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#203 def format(other); end - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#154 + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#203 def format=(other); end - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#92 + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#141 def increment; end - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#150 + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#199 def inspect; end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def log(*args, **_arg1, &block); end - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#54 + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#102 def pause; end # @return [Boolean] # - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#74 + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#123 def paused?; end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def progress(*args, **_arg1, &block); end - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#96 + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#145 def progress=(new_progress); end - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#104 + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#153 def progress_mark=(mark); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def refresh(*args, **_arg1, &block); end - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#108 + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#157 def remainder_mark=(mark); end - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#66 + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#114 def reset; end - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#62 + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#110 def resume; end - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#39 + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#87 def start(options = T.unsafe(nil)); end # @return [Boolean] # - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#84 + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#133 def started?; end - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#58 + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#106 def stop; end # @return [Boolean] # - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#74 + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#123 def stopped?; end - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#112 + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#161 def title; end - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#116 + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#165 def title=(title); end - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#127 + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#176 def to_h; end - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#120 + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#169 def to_s(new_format = T.unsafe(nil)); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def total(*args, **_arg1, &block); end - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#100 + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#149 def total=(new_total); end protected # Returns the value of attribute autofinish. # - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#164 + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 def autofinish; end # Sets the attribute autofinish # # @param value the value to set the attribute autofinish to. # - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#164 + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 def autofinish=(_arg0); end # Returns the value of attribute autostart. # - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#164 + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 def autostart; end # Sets the attribute autostart # # @param value the value to set the attribute autostart to. # - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#164 + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 def autostart=(_arg0); end - # Returns the value of attribute bar. + # Returns the value of attribute bar_component. # - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#164 - def bar; end + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def bar_component; end - # Sets the attribute bar + # Sets the attribute bar_component # - # @param value the value to set the attribute bar to. + # @param value the value to set the attribute bar_component to. # - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#164 - def bar=(_arg0); end + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def bar_component=(_arg0); end # Returns the value of attribute finished. # - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#164 + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 def finished; end # Sets the attribute finished # # @param value the value to set the attribute finished to. # - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#164 + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 def finished=(_arg0); end # Returns the value of attribute output. # - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#164 + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 def output; end # Sets the attribute output # # @param value the value to set the attribute output to. # - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#164 + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 def output=(_arg0); end - # Returns the value of attribute percentage. + # Returns the value of attribute percentage_component. # - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#164 - def percentage; end + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def percentage_component; end - # Sets the attribute percentage + # Sets the attribute percentage_component # - # @param value the value to set the attribute percentage to. + # @param value the value to set the attribute percentage_component to. # - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#164 - def percentage=(_arg0); end + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def percentage_component=(_arg0); end # Returns the value of attribute progressable. # - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#164 + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 def progressable; end # Sets the attribute progressable # # @param value the value to set the attribute progressable to. # - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#164 + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 def progressable=(_arg0); end - # Returns the value of attribute rate. + # Returns the value of attribute projector. # - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#164 - def rate; end + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def projector; end - # Sets the attribute rate + # Sets the attribute projector # - # @param value the value to set the attribute rate to. + # @param value the value to set the attribute projector to. # - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#164 - def rate=(_arg0); end + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def projector=(_arg0); end - # Returns the value of attribute time. + # Returns the value of attribute rate_component. # - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#164 - def time; end + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def rate_component; end - # Sets the attribute time + # Sets the attribute rate_component # - # @param value the value to set the attribute time to. + # @param value the value to set the attribute rate_component to. # - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#164 - def time=(_arg0); end + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def rate_component=(_arg0); end + + # Returns the value of attribute time_component. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def time_component; end + + # Sets the attribute time_component + # + # @param value the value to set the attribute time_component to. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def time_component=(_arg0); end # Returns the value of attribute timer. # - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#164 + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 def timer; end # Sets the attribute timer # # @param value the value to set the attribute timer to. # - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#164 + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 def timer=(_arg0); end - # Returns the value of attribute title_comp. + # Returns the value of attribute title_component. # - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#164 - def title_comp; end + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def title_component; end - # Sets the attribute title_comp + # Sets the attribute title_component # - # @param value the value to set the attribute title_comp to. + # @param value the value to set the attribute title_component to. # - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#164 - def title_comp=(_arg0); end + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def title_component=(_arg0); end - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#176 + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#226 def update_progress(*args); end end +# source://ruby-progressbar//lib/ruby-progressbar/base.rb#28 +ProgressBar::Base::RUNNING_AVERAGE_RATE_DEPRECATION_WARNING = T.let(T.unsafe(nil), String) + +# source://ruby-progressbar//lib/ruby-progressbar/base.rb#21 +ProgressBar::Base::SMOOTHING_DEPRECATION_WARNING = T.let(T.unsafe(nil), String) + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#2 module ProgressBar::Calculators; end @@ -309,22 +327,22 @@ class ProgressBar::Calculators::Length private - # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#57 + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#56 def dynamic_width; end - # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#87 + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#85 def dynamic_width_stty; end - # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#91 + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#89 def dynamic_width_tput; end - # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#78 + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#76 def dynamic_width_via_io_object; end - # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#73 + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#71 def dynamic_width_via_output_stream_object; end - # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#83 + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#81 def dynamic_width_via_system_calls; end # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#43 @@ -332,18 +350,10 @@ class ProgressBar::Calculators::Length # @return [Boolean] # - # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#95 + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#93 def unix?; end end -# source://ruby-progressbar//lib/ruby-progressbar/calculators/running_average.rb#3 -class ProgressBar::Calculators::RunningAverage - class << self - # source://ruby-progressbar//lib/ruby-progressbar/calculators/running_average.rb#4 - def calculate(current_average, new_value_to_average, smoothing_factor); end - end -end - # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#5 module ProgressBar::Components; end @@ -354,6 +364,21 @@ class ProgressBar::Components::Bar # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#17 def initialize(options = T.unsafe(nil)); end + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#35 + def bar(length); end + + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#63 + def bar_with_percentage(length); end + + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#41 + def complete_bar(length); end + + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#47 + def complete_bar_with_percentage(length); end + + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#53 + def incomplete_space(length); end + # Returns the value of attribute length. # # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#11 @@ -419,37 +444,22 @@ class ProgressBar::Components::Bar private - # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#51 - def bar(length); end - - # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#85 - def bar_with_percentage(length); end - - # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#57 - def complete_bar(length); end - - # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#63 - def complete_bar_with_percentage(length); end - # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#91 def completed_length; end - # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#75 - def incomplete_space(length); end - - # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#47 + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#81 def incomplete_string; end - # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#37 + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#71 def integrated_percentage_complete_string; end - # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#43 + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#77 def standard_complete_string; end # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#95 def unknown_progress_frame; end - # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#69 + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#85 def unknown_string; end end @@ -469,6 +479,18 @@ class ProgressBar::Components::Percentage # source://ruby-progressbar//lib/ruby-progressbar/components/percentage.rb#6 def initialize(options = T.unsafe(nil)); end + # source://ruby-progressbar//lib/ruby-progressbar/components/percentage.rb#14 + def justified_percentage; end + + # source://ruby-progressbar//lib/ruby-progressbar/components/percentage.rb#22 + def justified_percentage_with_precision; end + + # source://ruby-progressbar//lib/ruby-progressbar/components/percentage.rb#10 + def percentage; end + + # source://ruby-progressbar//lib/ruby-progressbar/components/percentage.rb#18 + def percentage_with_precision; end + # Returns the value of attribute progress. # # source://ruby-progressbar//lib/ruby-progressbar/components/percentage.rb#4 @@ -480,27 +502,13 @@ class ProgressBar::Components::Percentage # # source://ruby-progressbar//lib/ruby-progressbar/components/percentage.rb#4 def progress=(_arg0); end - - private - - # source://ruby-progressbar//lib/ruby-progressbar/components/percentage.rb#16 - def justified_percentage; end - - # source://ruby-progressbar//lib/ruby-progressbar/components/percentage.rb#24 - def justified_percentage_with_precision; end - - # source://ruby-progressbar//lib/ruby-progressbar/components/percentage.rb#12 - def percentage; end - - # source://ruby-progressbar//lib/ruby-progressbar/components/percentage.rb#20 - def percentage_with_precision; end end # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#3 class ProgressBar::Components::Rate # @return [Rate] a new instance of Rate # - # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#10 + # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#8 def initialize(options = T.unsafe(nil)); end # Returns the value of attribute progress. @@ -515,6 +523,12 @@ class ProgressBar::Components::Rate # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#4 def progress=(_arg0); end + # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#14 + def rate_of_change(format_string = T.unsafe(nil)); end + + # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#20 + def rate_of_change_with_precision; end + # Returns the value of attribute rate_scale. # # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#4 @@ -527,30 +541,6 @@ class ProgressBar::Components::Rate # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#4 def rate_scale=(_arg0); end - # Returns the value of attribute started_at. - # - # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#4 - def started_at; end - - # Sets the attribute started_at - # - # @param value the value to set the attribute started_at to. - # - # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#4 - def started_at=(_arg0); end - - # Returns the value of attribute stopped_at. - # - # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#4 - def stopped_at; end - - # Sets the attribute stopped_at - # - # @param value the value to set the attribute stopped_at to. - # - # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#4 - def stopped_at=(_arg0); end - # Returns the value of attribute timer. # # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#4 @@ -565,19 +555,13 @@ class ProgressBar::Components::Rate private - # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#34 + # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#30 def base_rate; end - # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#38 + # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#34 def elapsed_seconds; end - # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#20 - def rate_of_change(format_string = T.unsafe(nil)); end - # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#26 - def rate_of_change_with_precision; end - - # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#30 def scaled_rate; end end @@ -585,71 +569,78 @@ end class ProgressBar::Components::Time # @return [Time] a new instance of Time # - # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#20 + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#21 def initialize(options = T.unsafe(nil)); end - # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#30 + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#31 def elapsed_with_label; end - # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#26 - def estimated_with_label; end - - protected + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#47 + def estimated_wall_clock; end - # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#48 + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#43 def estimated_with_friendly_oob; end - # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#36 + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#27 + def estimated_with_label(out_of_bounds_time_format = T.unsafe(nil)); end + + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#35 def estimated_with_no_oob; end - # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#42 + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#39 def estimated_with_unknown_oob; end - # Returns the value of attribute out_of_bounds_time_format. - # - # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#54 - def out_of_bounds_time_format; end - - # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#58 - def out_of_bounds_time_format=(format); end + protected # Returns the value of attribute progress. # - # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#55 + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#60 def progress; end # Sets the attribute progress # # @param value the value to set the attribute progress to. # - # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#55 + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#60 def progress=(_arg0); end + # Returns the value of attribute projector. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#60 + def projector; end + + # Sets the attribute projector + # + # @param value the value to set the attribute projector to. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#60 + def projector=(_arg0); end + # Returns the value of attribute timer. # - # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#55 + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#60 def timer; end # Sets the attribute timer # # @param value the value to set the attribute timer to. # - # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#55 + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#60 def timer=(_arg0); end private - # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#82 + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#80 def elapsed; end - # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#68 - def estimated; end + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#66 + def estimated(out_of_bounds_time_format); end # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#94 def estimated_seconds_remaining; end - # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#90 - def estimated_with_elapsed_fallback; end + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#88 + def estimated_with_elapsed_fallback(out_of_bounds_time_format); end end # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#14 @@ -667,7 +658,7 @@ ProgressBar::Components::Time::OOB_FRIENDLY_TIME_TEXT = T.let(T.unsafe(nil), Str # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#9 ProgressBar::Components::Time::OOB_LIMIT_IN_HOURS = T.let(T.unsafe(nil), Integer) -# source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#15 +# source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#16 ProgressBar::Components::Time::OOB_TEXT_TO_FORMAT = T.let(T.unsafe(nil), Hash) # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#8 @@ -679,6 +670,9 @@ ProgressBar::Components::Time::OOB_UNKNOWN_TIME_TEXT = T.let(T.unsafe(nil), Stri # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#7 ProgressBar::Components::Time::TIME_FORMAT = T.let(T.unsafe(nil), String) +# source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#15 +ProgressBar::Components::Time::WALL_CLOCK_FORMAT = T.let(T.unsafe(nil), String) + # source://ruby-progressbar//lib/ruby-progressbar/components/title.rb#3 class ProgressBar::Components::Title # @return [Title] a new instance of Title @@ -702,7 +696,7 @@ end # source://ruby-progressbar//lib/ruby-progressbar/components/title.rb#4 ProgressBar::Components::Title::DEFAULT_TITLE = T.let(T.unsafe(nil), String) -# source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#2 +# source://ruby-progressbar//lib/ruby-progressbar/format/formatter.rb#2 module ProgressBar::Format; end # source://ruby-progressbar//lib/ruby-progressbar/format/formatter.rb#3 @@ -717,170 +711,170 @@ end class ProgressBar::Format::Molecule # @return [Molecule] a new instance of Molecule # - # source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#32 + # source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#33 def initialize(letter); end # @return [Boolean] # - # source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#37 + # source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#38 def bar_molecule?; end - # source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#45 + # source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#46 def full_key; end # Returns the value of attribute key. # - # source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#29 + # source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#30 def key; end # Sets the attribute key # # @param value the value to set the attribute key to. # - # source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#29 + # source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#30 def key=(_arg0); end - # source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#49 + # source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#50 def lookup_value(environment, length = T.unsafe(nil)); end # Returns the value of attribute method_name. # - # source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#29 + # source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#30 def method_name; end # Sets the attribute method_name # # @param value the value to set the attribute method_name to. # - # source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#29 + # source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#30 def method_name=(_arg0); end # @return [Boolean] # - # source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#41 + # source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#42 def non_bar_molecule?; end end -# source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#27 +# source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#28 ProgressBar::Format::Molecule::BAR_MOLECULES = T.let(T.unsafe(nil), Array) # source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#4 ProgressBar::Format::Molecule::MOLECULES = T.let(T.unsafe(nil), Hash) -# source://ruby-progressbar//lib/ruby-progressbar/format/string.rb#3 +# source://ruby-progressbar//lib/ruby-progressbar/format/string.rb#5 class ProgressBar::Format::String < ::String - # source://ruby-progressbar//lib/ruby-progressbar/format/string.rb#11 + # source://ruby-progressbar//lib/ruby-progressbar/format/string.rb#13 def bar_molecule_placeholder_length; end - # source://ruby-progressbar//lib/ruby-progressbar/format/string.rb#19 + # source://ruby-progressbar//lib/ruby-progressbar/format/string.rb#21 def bar_molecules; end - # source://ruby-progressbar//lib/ruby-progressbar/format/string.rb#7 + # source://ruby-progressbar//lib/ruby-progressbar/format/string.rb#9 def displayable_length; end - # source://ruby-progressbar//lib/ruby-progressbar/format/string.rb#23 + # source://ruby-progressbar//lib/ruby-progressbar/format/string.rb#25 def molecules; end - # source://ruby-progressbar//lib/ruby-progressbar/format/string.rb#15 + # source://ruby-progressbar//lib/ruby-progressbar/format/string.rb#17 def non_bar_molecules; end end -# source://ruby-progressbar//lib/ruby-progressbar/format/string.rb#5 +# source://ruby-progressbar//lib/ruby-progressbar/format/string.rb#7 ProgressBar::Format::String::ANSI_SGR_PATTERN = T.let(T.unsafe(nil), Regexp) -# source://ruby-progressbar//lib/ruby-progressbar/format/string.rb#4 +# source://ruby-progressbar//lib/ruby-progressbar/format/string.rb#6 ProgressBar::Format::String::MOLECULE_PATTERN = T.let(T.unsafe(nil), Regexp) # source://ruby-progressbar//lib/ruby-progressbar/errors/invalid_progress_error.rb#2 class ProgressBar::InvalidProgressError < ::RuntimeError; end -# source://ruby-progressbar//lib/ruby-progressbar/output.rb#2 +# source://ruby-progressbar//lib/ruby-progressbar/output.rb#5 class ProgressBar::Output # @return [Output] a new instance of Output # - # source://ruby-progressbar//lib/ruby-progressbar/output.rb#7 + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#10 def initialize(options = T.unsafe(nil)); end - # source://ruby-progressbar//lib/ruby-progressbar/output.rb#34 + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#37 def clear_string; end - # source://ruby-progressbar//lib/ruby-progressbar/output.rb#38 + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#41 def length; end - # source://ruby-progressbar//lib/ruby-progressbar/output.rb#27 + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#30 def log(string); end - # source://ruby-progressbar//lib/ruby-progressbar/output.rb#47 + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#50 def refresh(options = T.unsafe(nil)); end # Returns the value of attribute stream. # - # source://ruby-progressbar//lib/ruby-progressbar/output.rb#5 + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#8 def stream; end # Sets the attribute stream # # @param value the value to set the attribute stream to. # - # source://ruby-progressbar//lib/ruby-progressbar/output.rb#5 + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#8 def stream=(_arg0); end - # source://ruby-progressbar//lib/ruby-progressbar/output.rb#42 + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#45 def with_refresh; end protected # Returns the value of attribute bar. # - # source://ruby-progressbar//lib/ruby-progressbar/output.rb#57 + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#60 def bar; end # Sets the attribute bar # # @param value the value to set the attribute bar to. # - # source://ruby-progressbar//lib/ruby-progressbar/output.rb#57 + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#60 def bar=(_arg0); end # Returns the value of attribute length_calculator. # - # source://ruby-progressbar//lib/ruby-progressbar/output.rb#57 + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#60 def length_calculator; end # Sets the attribute length_calculator # # @param value the value to set the attribute length_calculator to. # - # source://ruby-progressbar//lib/ruby-progressbar/output.rb#57 + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#60 def length_calculator=(_arg0); end # Returns the value of attribute throttle. # - # source://ruby-progressbar//lib/ruby-progressbar/output.rb#57 + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#60 def throttle; end # Sets the attribute throttle # # @param value the value to set the attribute throttle to. # - # source://ruby-progressbar//lib/ruby-progressbar/output.rb#57 + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#60 def throttle=(_arg0); end private - # source://ruby-progressbar//lib/ruby-progressbar/output.rb#63 + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#66 def print_and_flush; end class << self - # source://ruby-progressbar//lib/ruby-progressbar/output.rb#17 + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#20 def detect(options = T.unsafe(nil)); end end end -# source://ruby-progressbar//lib/ruby-progressbar/output.rb#3 +# source://ruby-progressbar//lib/ruby-progressbar/output.rb#6 ProgressBar::Output::DEFAULT_OUTPUT_STREAM = T.let(T.unsafe(nil), IO) -# source://ruby-progressbar//lib/ruby-progressbar/outputs/tty.rb#4 +# source://ruby-progressbar//lib/ruby-progressbar/outputs/non_tty.rb#4 module ProgressBar::Outputs; end # source://ruby-progressbar//lib/ruby-progressbar/outputs/non_tty.rb#5 @@ -933,7 +927,7 @@ class ProgressBar::Outputs::Tty < ::ProgressBar::Output # source://ruby-progressbar//lib/ruby-progressbar/outputs/tty.rb#27 def eol; end - # source://ruby-progressbar//lib/ruby-progressbar/output.rb#42 + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#45 def refresh_with_format_change; end # source://ruby-progressbar//lib/ruby-progressbar/outputs/tty.rb#23 @@ -947,119 +941,200 @@ ProgressBar::Outputs::Tty::DEFAULT_FORMAT_STRING = T.let(T.unsafe(nil), String) class ProgressBar::Progress # @return [Progress] a new instance of Progress # - # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#16 + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#12 def initialize(options = T.unsafe(nil)); end - # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#114 + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#104 def absolute; end - # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#47 + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#41 def decrement; end - # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#29 + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#23 def finish; end # @return [Boolean] # - # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#33 + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#27 def finished?; end - # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#37 + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#31 def increment; end # @return [Boolean] # - # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#95 + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#85 def none?; end - # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#83 + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#73 def percentage_completed; end - # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#107 + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#97 def percentage_completed_with_precision; end # Returns the value of attribute progress. # - # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#9 + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#8 def progress; end - # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#61 + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#55 def progress=(new_progress); end - # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#57 + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#51 def reset; end - # Returns the value of attribute running_average. - # - # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#12 - def running_average; end - - # Sets the attribute running_average - # - # @param value the value to set the attribute running_average to. - # - # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#12 - def running_average=(_arg0); end - - # Returns the value of attribute smoothing. - # - # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#12 - def smoothing; end - - # Sets the attribute smoothing - # - # @param value the value to set the attribute smoothing to. - # - # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#12 - def smoothing=(_arg0); end - - # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#23 + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#18 def start(options = T.unsafe(nil)); end # Returns the value of attribute starting_position. # - # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#12 + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#10 def starting_position; end # Sets the attribute starting_position # # @param value the value to set the attribute starting_position to. # - # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#12 + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#10 def starting_position=(_arg0); end # Returns the value of attribute total. # - # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#9 + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#8 def total; end - # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#74 + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#64 def total=(new_total); end - # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#103 + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#93 def total_with_unknown_indicator; end # @return [Boolean] # - # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#99 + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#89 def unknown?; end end # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#6 ProgressBar::Progress::DEFAULT_BEGINNING_POSITION = T.let(T.unsafe(nil), Integer) -# source://ruby-progressbar//lib/ruby-progressbar/progress.rb#7 -ProgressBar::Progress::DEFAULT_SMOOTHING = T.let(T.unsafe(nil), Float) - # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#5 ProgressBar::Progress::DEFAULT_TOTAL = T.let(T.unsafe(nil), Integer) -# source://ruby-progressbar//lib/ruby-progressbar/refinements/enumerator.rb#2 +# source://ruby-progressbar//lib/ruby-progressbar/projector.rb#4 +class ProgressBar::Projector + class << self + # source://ruby-progressbar//lib/ruby-progressbar/projector.rb#10 + def from_type(name); end + end +end + +# source://ruby-progressbar//lib/ruby-progressbar/projector.rb#5 +ProgressBar::Projector::DEFAULT_PROJECTOR = ProgressBar::Projectors::SmoothedAverage + +# source://ruby-progressbar//lib/ruby-progressbar/projector.rb#6 +ProgressBar::Projector::NAME_TO_PROJECTOR_MAP = T.let(T.unsafe(nil), Hash) + +# source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#2 +module ProgressBar::Projectors; end + +# source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#3 +class ProgressBar::Projectors::SmoothedAverage + # @return [SmoothedAverage] a new instance of SmoothedAverage + # + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#11 + def initialize(options = T.unsafe(nil)); end + + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#24 + def decrement; end + + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#28 + def increment; end + + # @return [Boolean] + # + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#52 + def none?; end + + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#32 + def progress; end + + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#42 + def progress=(new_progress); end + + # Returns the value of attribute projection. + # + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#9 + def projection; end + + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#38 + def reset; end + + # Returns the value of attribute samples. + # + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#7 + def samples; end + + # Sets the attribute samples + # + # @param value the value to set the attribute samples to. + # + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#7 + def samples=(_arg0); end + + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#19 + def start(options = T.unsafe(nil)); end + + # Returns the value of attribute strength. + # + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#7 + def strength; end + + # Sets the attribute strength + # + # @param value the value to set the attribute strength to. + # + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#7 + def strength=(_arg0); end + + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#36 + def total=(_new_total); end + + protected + + # Sets the attribute projection + # + # @param value the value to set the attribute projection to. + # + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#62 + def projection=(_arg0); end + + private + + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#66 + def absolute; end + + class << self + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#56 + def calculate(current_projection, new_value, rate); end + end +end + +# source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#5 +ProgressBar::Projectors::SmoothedAverage::DEFAULT_BEGINNING_POSITION = T.let(T.unsafe(nil), Integer) + +# source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#4 +ProgressBar::Projectors::SmoothedAverage::DEFAULT_STRENGTH = T.let(T.unsafe(nil), Float) + +# source://ruby-progressbar//lib/ruby-progressbar/refinements/progress_enumerator.rb#2 module ProgressBar::Refinements; end -# source://ruby-progressbar//lib/ruby-progressbar/refinements/enumerator.rb#3 +# source://ruby-progressbar//lib/ruby-progressbar/refinements/progress_enumerator.rb#3 module ProgressBar::Refinements::Enumerator; end +# source://ruby-progressbar//lib/ruby-progressbar/refinements/progress_enumerator.rb#4 +ProgressBar::Refinements::Enumerator::ARITY_ERROR_MESSAGE = T.let(T.unsafe(nil), String) + # source://ruby-progressbar//lib/ruby-progressbar/throttle.rb#2 class ProgressBar::Throttle # @return [Throttle] a new instance of Throttle @@ -1136,14 +1211,14 @@ class ProgressBar::Time # Returns the value of attribute time. # - # source://ruby-progressbar//lib/ruby-progressbar/time.rb#29 + # source://ruby-progressbar//lib/ruby-progressbar/time.rb#27 def time; end # Sets the attribute time # # @param value the value to set the attribute time to. # - # source://ruby-progressbar//lib/ruby-progressbar/time.rb#29 + # source://ruby-progressbar//lib/ruby-progressbar/time.rb#27 def time=(_arg0); end end @@ -1157,27 +1232,30 @@ class ProgressBar::Timer # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#8 def initialize(options = T.unsafe(nil)); end - # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#61 + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#67 def divide_seconds(seconds); end - # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#53 + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#57 def elapsed_seconds; end - # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#57 + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#63 def elapsed_whole_seconds; end + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#31 + def now; end + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#23 def pause; end - # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#39 + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#43 def reset; end # @return [Boolean] # - # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#44 + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#48 def reset?; end - # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#48 + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#52 def restart; end # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#27 @@ -1188,7 +1266,7 @@ class ProgressBar::Timer # @return [Boolean] # - # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#31 + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#35 def started?; end # Returns the value of attribute started_at. @@ -1208,7 +1286,7 @@ class ProgressBar::Timer # @return [Boolean] # - # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#35 + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#39 def stopped?; end # Returns the value of attribute stopped_at. @@ -1227,13 +1305,13 @@ class ProgressBar::Timer # Returns the value of attribute time. # - # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#70 + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#76 def time; end # Sets the attribute time # # @param value the value to set the attribute time to. # - # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#70 + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#76 def time=(_arg0); end end diff --git a/gem/sorbet/rbi/gems/stringio@3.1.0.rbi b/gem/sorbet/rbi/gems/stringio@3.1.0.rbi new file mode 100644 index 00000000..01a26ea5 --- /dev/null +++ b/gem/sorbet/rbi/gems/stringio@3.1.0.rbi @@ -0,0 +1,8 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `stringio` gem. +# Please instead update this file by running `bin/tapioca gem stringio`. + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/gem/sorbet/rbi/gems/tapioca@0.11.14.rbi b/gem/sorbet/rbi/gems/tapioca@0.12.0.rbi similarity index 97% rename from gem/sorbet/rbi/gems/tapioca@0.11.14.rbi rename to gem/sorbet/rbi/gems/tapioca@0.12.0.rbi index 25bb35ef..6b91425e 100644 --- a/gem/sorbet/rbi/gems/tapioca@0.11.14.rbi +++ b/gem/sorbet/rbi/gems/tapioca@0.12.0.rbi @@ -1,4 +1,4 @@ -# typed: false +# typed: true # DO NOT EDIT MANUALLY # This is an autogenerated file for types exported from the `tapioca` gem. @@ -204,7 +204,7 @@ class RBI::TypedParam < ::T::Struct const :type, ::String class << self - # source://sorbet-runtime/0.5.11158/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11219/lib/types/struct.rb#13 def inherited(s); end end end @@ -216,14 +216,14 @@ module T::Generic # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#13 def [](*types); end - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#53 + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#47 def has_attached_class!(variance = T.unsafe(nil), &bounds_proc); end # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#21 - def type_member(variance = T.unsafe(nil), fixed: T.unsafe(nil), lower: T.unsafe(nil), upper: T.unsafe(nil), &bounds_proc); end + def type_member(variance = T.unsafe(nil), &bounds_proc); end - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#37 - def type_template(variance = T.unsafe(nil), fixed: T.unsafe(nil), lower: T.unsafe(nil), upper: T.unsafe(nil), &bounds_proc); end + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#34 + def type_template(variance = T.unsafe(nil), &bounds_proc); end end # This module intercepts calls to generic type instantiations and type variable definitions. @@ -238,14 +238,14 @@ module T::Generic::TypeStoragePatch # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#13 def [](*types); end - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#53 + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#47 def has_attached_class!(variance = T.unsafe(nil), &bounds_proc); end # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#21 - def type_member(variance = T.unsafe(nil), fixed: T.unsafe(nil), lower: T.unsafe(nil), upper: T.unsafe(nil), &bounds_proc); end + def type_member(variance = T.unsafe(nil), &bounds_proc); end - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#37 - def type_template(variance = T.unsafe(nil), fixed: T.unsafe(nil), lower: T.unsafe(nil), upper: T.unsafe(nil), &bounds_proc); end + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#34 + def type_template(variance = T.unsafe(nil), &bounds_proc); end end # source://tapioca//lib/tapioca/sorbet_ext/proc_bind_patch.rb#28 @@ -329,18 +329,18 @@ end # source://tapioca//lib/tapioca/sorbet_ext/name_patch.rb#6 class T::Types::Simple < ::T::Types::Base - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#79 + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#70 def name; end end -# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#74 +# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#65 module T::Types::Simple::GenericPatch # This method intercepts calls to the `name` method for simple types, so that # it can ask the name to the type if the type is generic, since, by this point, # we've created a clone of that type with the `name` method returning the # appropriate name for that specific concrete type. # - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#79 + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#70 def name; end end @@ -356,17 +356,17 @@ end # source://tapioca//lib/tapioca/sorbet_ext/name_patch.rb#8 T::Types::Simple::NamePatch::NAME_METHOD = T.let(T.unsafe(nil), UnboundMethod) -# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#99 +# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#87 module T::Utils::Private class << self - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#101 + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#89 def coerce_and_check_module_types(val, check_val, check_module_type); end end end -# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#100 +# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#88 module T::Utils::Private::PrivateCoercePatch - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#101 + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#89 def coerce_and_check_module_types(val, check_val, check_module_type); end end @@ -1121,7 +1121,7 @@ class Tapioca::ConfigHelper::ConfigError < ::T::Struct const :message_parts, T::Array[::Tapioca::ConfigHelper::ConfigErrorMessagePart] class << self - # source://sorbet-runtime/0.5.11158/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11219/lib/types/struct.rb#13 def inherited(s); end end end @@ -1132,7 +1132,7 @@ class Tapioca::ConfigHelper::ConfigErrorMessagePart < ::T::Struct const :colors, T::Array[::Symbol] class << self - # source://sorbet-runtime/0.5.11158/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11219/lib/types/struct.rb#13 def inherited(s); end end end @@ -1688,13 +1688,16 @@ end # source://tapioca//lib/tapioca/gem/listeners/sorbet_props.rb#7 class Tapioca::Gem::Listeners::SorbetProps < ::Tapioca::Gem::Listeners::Base + include ::Tapioca::SorbetHelper + include ::Tapioca::RBIHelper + private - # source://tapioca//lib/tapioca/gem/listeners/sorbet_props.rb#32 + # source://tapioca//lib/tapioca/gem/listeners/sorbet_props.rb#33 sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } def ignore?(event); end - # source://tapioca//lib/tapioca/gem/listeners/sorbet_props.rb#13 + # source://tapioca//lib/tapioca/gem/listeners/sorbet_props.rb#14 sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } def on_scope(event); end end @@ -1968,11 +1971,11 @@ class Tapioca::Gem::Pipeline private - # source://tapioca//lib/tapioca/gem/pipeline.rb#441 + # source://tapioca//lib/tapioca/gem/pipeline.rb#440 sig { params(name: ::String).void } def add_to_alias_namespace(name); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#446 + # source://tapioca//lib/tapioca/gem/pipeline.rb#445 sig { params(name: ::String).returns(T::Boolean) } def alias_namespaced?(name); end @@ -1990,7 +1993,7 @@ class Tapioca::Gem::Pipeline sig { params(symbol: ::String, constant: ::Module).void } def compile_foreign_constant(symbol, constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#300 + # source://tapioca//lib/tapioca/gem/pipeline.rb#298 sig { params(name: ::String, constant: ::Module).void } def compile_module(name, constant); end @@ -1998,15 +2001,15 @@ class Tapioca::Gem::Pipeline sig { params(name: ::String, value: ::BasicObject).void } def compile_object(name, value); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#311 + # source://tapioca//lib/tapioca/gem/pipeline.rb#309 sig { params(name: ::String, constant: ::Module).returns(::RBI::Scope) } def compile_scope(name, constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#325 + # source://tapioca//lib/tapioca/gem/pipeline.rb#323 sig { params(constant: T::Class[T.anything]).returns(T.nilable(::String)) } def compile_superclass(constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#422 + # source://tapioca//lib/tapioca/gem/pipeline.rb#421 sig { params(constant: ::Module, strict: T::Boolean).returns(T::Boolean) } def defined_in_gem?(constant, strict: T.unsafe(nil)); end @@ -2016,11 +2019,11 @@ class Tapioca::Gem::Pipeline # Helpers # - # source://tapioca//lib/tapioca/gem/pipeline.rb#465 + # source://tapioca//lib/tapioca/gem/pipeline.rb#464 sig { params(constant: T.all(::Module, ::T::Generic)).returns(::String) } def generic_name_of(constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#434 + # source://tapioca//lib/tapioca/gem/pipeline.rb#433 sig { params(constant: ::Module).returns(T::Set[::String]) } def get_file_candidates(constant); end @@ -2028,7 +2031,7 @@ class Tapioca::Gem::Pipeline sig { params(gem: ::Tapioca::Gemfile::GemSpec).returns(T::Set[::String]) } def load_bootstrap_symbols(gem); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#481 + # source://tapioca//lib/tapioca/gem/pipeline.rb#480 sig { params(constant: ::Module, class_name: T.nilable(::String)).returns(T.nilable(::String)) } def name_of_proxy_target(constant, class_name); end @@ -2050,37 +2053,37 @@ class Tapioca::Gem::Pipeline sig { params(event: ::Tapioca::Gem::SymbolFound).void } def on_symbol(event); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#453 + # source://tapioca//lib/tapioca/gem/pipeline.rb#452 sig { params(name: ::String).void } def seen!(name); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#458 + # source://tapioca//lib/tapioca/gem/pipeline.rb#457 sig { params(name: ::String).returns(T::Boolean) } def seen?(name); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#393 + # source://tapioca//lib/tapioca/gem/pipeline.rb#391 sig { params(name: ::String, constant: ::Module).returns(T::Boolean) } def skip_alias?(name, constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#381 + # source://tapioca//lib/tapioca/gem/pipeline.rb#379 sig { params(name: ::String, constant: T.anything).returns(T::Boolean) } def skip_constant?(name, constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#409 + # source://tapioca//lib/tapioca/gem/pipeline.rb#408 sig { params(name: ::String, constant: ::Module).returns(T::Boolean) } def skip_foreign_constant?(name, constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#414 + # source://tapioca//lib/tapioca/gem/pipeline.rb#413 sig { params(name: ::String, constant: ::Module).returns(T::Boolean) } def skip_module?(name, constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#401 + # source://tapioca//lib/tapioca/gem/pipeline.rb#400 sig { params(name: ::String, constant: ::BasicObject).returns(T::Boolean) } def skip_object?(name, constant); end # Constants and properties filtering # - # source://tapioca//lib/tapioca/gem/pipeline.rb#376 + # source://tapioca//lib/tapioca/gem/pipeline.rb#374 sig { params(name: ::String).returns(T::Boolean) } def skip_symbol?(name); end end @@ -2429,7 +2432,7 @@ class Tapioca::Loaders::Loader # @param engine [T.class_of(Rails::Engine)] # @return [Array] # - # source://sorbet-runtime/0.5.11158/lib/types/private/methods/_methods.rb#254 + # source://sorbet-runtime/0.5.11219/lib/types/private/methods/_methods.rb#252 def eager_load_paths(*args, **_arg1, &blk); end # source://tapioca//lib/tapioca/loaders/loader.rb#198 @@ -2705,7 +2708,7 @@ module Tapioca::Runtime; end # available, it implements finding the attached class of a singleton # class by iterating through ObjectSpace. module Tapioca::Runtime::AttachedClassOf - # source://tapioca//lib/tapioca/runtime/attached_class_of_32.rb#14 + # source://tapioca//lib/tapioca/runtime/attached_class_of_legacy.rb#17 sig { params(singleton_class: ::Class).returns(T.nilable(::Module)) } def attached_class_of(singleton_class); end end @@ -2995,6 +2998,10 @@ module Tapioca::Runtime::Reflection sig { params(parent: ::Module, name: ::String).returns(T.nilable(::Module)) } def child_module_for_parent_with_name(parent, name); end + # source://tapioca//lib/tapioca/runtime/reflection.rb#260 + sig { params(name: ::String).returns(T::Boolean) } + def has_aliased_namespace?(name); end + # source://tapioca//lib/tapioca/runtime/reflection.rb#255 sig { params(method: ::UnboundMethod).returns(T::Boolean) } def method_defined_by_forwardable_module?(method); end @@ -3243,15 +3250,15 @@ Tapioca::SORBET_DIR = T.let(T.unsafe(nil), String) # source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#5 module Tapioca::SorbetHelper - # source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#34 + # source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#32 sig { params(sorbet_args: ::String).returns(::Spoom::ExecResult) } def sorbet(*sorbet_args); end - # source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#39 + # source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#37 sig { returns(::String) } def sorbet_path; end - # source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#46 + # source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#44 sig { params(feature: ::Symbol, version: T.nilable(::Gem::Version)).returns(T::Boolean) } def sorbet_supports?(feature, version: T.unsafe(nil)); end end @@ -3333,7 +3340,7 @@ module Tapioca::Static::SymbolLoader # @return [Array] # - # source://sorbet-runtime/0.5.11158/lib/types/private/methods/_methods.rb#254 + # source://sorbet-runtime/0.5.11219/lib/types/private/methods/_methods.rb#252 def engines(*args, **_arg1, &blk); end # source://tapioca//lib/tapioca/static/symbol_loader.rb#82 @@ -3376,16 +3383,16 @@ Tapioca::TAPIOCA_CONFIG_FILE = T.let(T.unsafe(nil), String) # source://tapioca//lib/tapioca.rb#34 Tapioca::TAPIOCA_DIR = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#137 +# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#108 class Tapioca::TypeVariable < ::T::Types::TypeVariable # @return [TypeVariable] a new instance of TypeVariable # - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#138 + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#109 def initialize(name, variance); end # Returns the value of attribute name. # - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#143 + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#114 def name; end end @@ -3395,60 +3402,50 @@ end # need to do any matching of constants to type variables to bind their names, Ruby will # do that automatically for us and we get the `name` method for free from `Module`. # -# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#151 +# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#122 class Tapioca::TypeVariableModule < ::Module - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#177 + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#146 sig do params( context: ::Module, type: ::Tapioca::TypeVariableModule::Type, variance: ::Symbol, - fixed: T.untyped, - lower: T.untyped, - upper: T.untyped, bounds_proc: T.nilable(T.proc.returns(T::Hash[::Symbol, T.untyped])) ).void end - def initialize(context, type, variance, fixed, lower, upper, bounds_proc); end + def initialize(context, type, variance, bounds_proc); end - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#218 + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#181 sig { returns(::Tapioca::TypeVariable) } def coerce_to_type_variable; end - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#198 + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#161 sig { returns(T::Boolean) } def fixed?; end - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#192 + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#155 sig { returns(T.nilable(::String)) } def name; end - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#203 + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#166 sig { returns(::String) } def serialize; end - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#163 + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#136 sig { returns(::Tapioca::TypeVariableModule::Type) } def type; end private - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#238 + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#188 sig { returns(T::Hash[::Symbol, T.untyped]) } def bounds; end - - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#228 - sig do - params( - fixed: T.untyped, - lower: T.untyped, - upper: T.untyped - ).returns(T.proc.returns(T::Hash[::Symbol, T.untyped])) - end - def build_bounds_proc(fixed, lower, upper); end end -# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#154 +# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#133 +Tapioca::TypeVariableModule::DEFAULT_BOUNDS_PROC = T.let(T.unsafe(nil), Proc) + +# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#125 class Tapioca::TypeVariableModule::Type < ::T::Enum enums do Member = new @@ -3471,14 +3468,12 @@ class URI::Source < ::URI::File sig { params(v: T.nilable(::String)).returns(T::Boolean) } def check_host(v); end - # source://uri/0.12.0/uri/generic.rb#243 def gem_name; end # source://tapioca//lib/tapioca/helpers/source_uri.rb#25 sig { returns(T.nilable(::String)) } def gem_version; end - # source://uri/0.12.0/uri/generic.rb#283 def line_number; end # source://tapioca//lib/tapioca/helpers/source_uri.rb#51 diff --git a/gem/sorbet/rbi/gems/unicode-display_width@2.2.0.rbi b/gem/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi similarity index 100% rename from gem/sorbet/rbi/gems/unicode-display_width@2.2.0.rbi rename to gem/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi diff --git a/gem/test/rbi-central/cli/check_index_test.rb b/gem/test/rbi-central/cli/check_index_test.rb index 2f56c076..cd080e1e 100644 --- a/gem/test/rbi-central/cli/check_index_test.rb +++ b/gem/test/rbi-central/cli/check_index_test.rb @@ -35,7 +35,7 @@ def test_index_with_schema_errors assert_equal(<<~ERR, res.err) ### Checking index... - Error: The property `#/gem1` contains additional properties [\"foo\"] outside of the schema when none are allowed + Error: The property `#/gem1` contains additional properties ["foo"] outside of the schema when none are allowed Some checks failed. See above for details. ERR @@ -68,12 +68,12 @@ def test_index_with_other_errors +++ index.json @@ -1,8 +1,7 @@ { - \"gem1\": { + "gem1": { }, - - \"gem2\": { + - "gem2": { - }, - + \"gem2\": {}, - \"gem3\": { + + "gem2": {}, + "gem3": { } } diff --git a/gem/test/rbi-central/context_test.rb b/gem/test/rbi-central/context_test.rb index 24ff7bdb..c3248463 100644 --- a/gem/test/rbi-central/context_test.rb +++ b/gem/test/rbi-central/context_test.rb @@ -16,7 +16,7 @@ def test_init_gemfile gem = Gem.new(name: "gem") context = DummyContext.new(gem, "#{ANNOTATIONS_PATH}/gem.rbi") assert_equal(<<~GEMFILE, context.read_gemfile) - source \"https://rubygems.org\" + source "https://rubygems.org" gem 'gem' GEMFILE end @@ -25,7 +25,7 @@ def test_init_gemfile_dependencies gem = Gem.new(name: "gem", dependencies: ["dep2", "dep1"]) context = DummyContext.new(gem, "#{ANNOTATIONS_PATH}/gem.rbi") assert_equal(<<~GEMFILE, context.read_gemfile) - source \"https://rubygems.org\" + source "https://rubygems.org" gem 'gem' gem 'dep1' gem 'dep2' @@ -39,7 +39,7 @@ def test_add_gem_dependency context.add_gem_dependency("dep2", version: ">= 1.0.0") context.add_gem_dependency("dep3", github: "Shopify/gem", branch: "feature") assert_equal(<<~GEMFILE, context.read_gemfile) - source \"https://rubygems.org\" + source "https://rubygems.org" gem 'gem' gem 'dep1' gem 'dep2', '>= 1.0.0' diff --git a/gem/test/rbi-central/repo_test.rb b/gem/test/rbi-central/repo_test.rb index 4a64dfd9..39bbb41d 100644 --- a/gem/test/rbi-central/repo_test.rb +++ b/gem/test/rbi-central/repo_test.rb @@ -59,12 +59,15 @@ def test_check_unexpected_annotations_files @repo.write!("#{@repo.annotations_path}/file3.RBI", "") @repo.write!("#{@repo.annotations_path}/dir/file4.rbi", "") - assert_messages([ - "Unexpected RBI annotations file `rbi/annotations/dir/file4.rbi` (must be in `rbi/annotations` root directory)", - "Unexpected RBI annotations file `rbi/annotations/file1` (should have `.rbi` extension)", - "Unexpected RBI annotations file `rbi/annotations/file2.rb` (should have `.rbi` extension)", - "Unexpected RBI annotations file `rbi/annotations/file3.RBI` (should have `.rbi` extension)", - ], @repo.check_unexpected_annotations_files) + assert_messages( + [ + "Unexpected RBI annotations file `rbi/annotations/dir/file4.rbi` (must be in `rbi/annotations` root directory)", # rubocop:disable Layout/LineLength + "Unexpected RBI annotations file `rbi/annotations/file1` (should have `.rbi` extension)", + "Unexpected RBI annotations file `rbi/annotations/file2.rb` (should have `.rbi` extension)", + "Unexpected RBI annotations file `rbi/annotations/file3.RBI` (should have `.rbi` extension)", + ], + @repo.check_unexpected_annotations_files, + ) end def test_check_index_format @@ -111,10 +114,13 @@ def test_check_missing_index_entries @repo.write_annotations_file!("gem1", "") @repo.write_annotations_file!("gem2", "") @repo.write_annotations_file!("gem3", "") - assert_messages([ - "Missing index entry for `rbi/annotations/gem2.rbi` (key `gem2` not found in `index.json`)", - "Missing index entry for `rbi/annotations/gem3.rbi` (key `gem3` not found in `index.json`)", - ], @repo.check_missing_index_entries) + assert_messages( + [ + "Missing index entry for `rbi/annotations/gem2.rbi` (key `gem2` not found in `index.json`)", + "Missing index entry for `rbi/annotations/gem3.rbi` (key `gem3` not found in `index.json`)", + ], + @repo.check_missing_index_entries, + ) end def test_check_missing_annotations_files @@ -126,10 +132,13 @@ def test_check_missing_annotations_files } JSON @repo.write_annotations_file!("gem1", "") - assert_messages([ - "Missing RBI annotations file for `gem2` (file `rbi/annotations/gem2.rbi` not found)", - "Missing RBI annotations file for `gem3` (file `rbi/annotations/gem3.rbi` not found)", - ], @repo.check_missing_annotations_files) + assert_messages( + [ + "Missing RBI annotations file for `gem2` (file `rbi/annotations/gem2.rbi` not found)", + "Missing RBI annotations file for `gem3` (file `rbi/annotations/gem3.rbi` not found)", + ], + @repo.check_missing_annotations_files, + ) end def test_check_rubocop_for_valid @@ -173,7 +182,7 @@ def test_changed_files_not_git end assert_equal( "fatal: not a git repository (or any of the parent directories): .git", - e.message.lines.first.strip + e.message.lines.first.strip, ) end @@ -184,7 +193,7 @@ def test_changed_files_bad_ref end assert_equal( "fatal: bad revision 'bad-ref'", - e.message.lines.first.strip + e.message.lines.first.strip, ) end @@ -217,7 +226,7 @@ def test_changed_files_since_ref @repo.write_annotations_file!("foo", "") assert_equal( ["index.json", "rbi/annotations/bar.rbi", "rbi/annotations/foo.rbi"], - @repo.changed_files(ref: "main") + @repo.changed_files(ref: "main"), ) end diff --git a/gem/test/rbi-central/runtime/context_test.rb b/gem/test/rbi-central/runtime/context_test.rb index 030a3cc1..f12a21b0 100644 --- a/gem/test/rbi-central/runtime/context_test.rb +++ b/gem/test/rbi-central/runtime/context_test.rb @@ -57,10 +57,13 @@ def self.baz; end end RBI visitor.visit(rbi_tree) - assert_messages([ - "Missing runtime method `::Foo#bar` (defined at `-:3:2-3:14`)", - "Missing runtime method `::Foo::Bar.baz` (defined at `-:8:2-8:19`)", - ], context.run!) + assert_messages( + [ + "Missing runtime method `::Foo#bar` (defined at `-:3:2-3:14`)", + "Missing runtime method `::Foo::Bar.baz` (defined at `-:8:2-8:19`)", + ], + context.run!, + ) end def test_annotated_method_missing @@ -81,11 +84,14 @@ def baz; end end RBI visitor.visit(rbi_tree) - assert_messages([ - "Missing runtime method `::Foo#baz` (defined at `-:4:2-4:14`)\n" \ - "Note: `baz` could be delegated to :method_missing but the RBI " \ - "definition isn't annotated with `@method_missing`.", - ], context.run!) + assert_messages( + [ + "Missing runtime method `::Foo#baz` (defined at `-:4:2-4:14`)\n" \ + "Note: `baz` could be delegated to :method_missing but the RBI " \ + "definition isn't annotated with `@method_missing`.", + ], + context.run!, + ) end def test_shim_annotation @@ -114,8 +120,13 @@ def baz; end end RBI visitor.visit(rbi_tree) - assert_messages(["Missing runtime constant `::Baz` (defined at `-:11:0-13:3`)", - "Missing runtime constant `::Baz` (defined at `-:12:2-12:14`)",], context.run!) + assert_messages( + [ + "Missing runtime constant `::Baz` (defined at `-:11:0-13:3`)", + "Missing runtime constant `::Baz` (defined at `-:12:2-12:14`)", + ], + context.run!, + ) end def test_annotated_singleton_method_missing @@ -140,11 +151,14 @@ def baz; end end RBI visitor.visit(rbi_tree) - assert_messages([ - "Missing runtime method `::Foo.baz` (defined at `-:5:4-5:16`)\n" \ - "Note: `baz` could be delegated to :method_missing but the RBI " \ - "definition isn't annotated with `@method_missing`.", - ], context.run!) + assert_messages( + [ + "Missing runtime method `::Foo.baz` (defined at `-:5:4-5:16`)\n" \ + "Note: `baz` could be delegated to :method_missing but the RBI " \ + "definition isn't annotated with `@method_missing`.", + ], + context.run!, + ) end def test_wrong_kind @@ -163,10 +177,13 @@ class Baz; end RBI visitor = Runtime::Visitor.new(context) visitor.visit(rbi_tree) - assert_messages([ - "Runtime constant `::Foo` is not a class (defined at `-:1:0-1:14`)", - "Runtime constant `::Bar` is not a module (defined at `-:2:0-2:15`)", - ], context.run!) + assert_messages( + [ + "Runtime constant `::Foo` is not a class (defined at `-:1:0-1:14`)", + "Runtime constant `::Bar` is not a module (defined at `-:2:0-2:15`)", + ], + context.run!, + ) end def test_wrong_class_parent @@ -187,10 +204,13 @@ class Bar; end RBI visitor = Runtime::Visitor.new(context) visitor.visit(rbi_tree) - assert_messages([ - "Runtime constant `::Foo` is not a subclass of `Integer` found `Object` (defined at `-:1:0-1:24`)", - "Runtime constant `::Bar` is not a subclass of `Integer` found `Foo` (defined at `-:4:0-4:24`)", - ], context.run!) + assert_messages( + [ + "Runtime constant `::Foo` is not a subclass of `Integer` found `Object` (defined at `-:1:0-1:24`)", + "Runtime constant `::Bar` is not a subclass of `Integer` found `Foo` (defined at `-:4:0-4:24`)", + ], + context.run!, + ) end def test_wrong_includes @@ -221,10 +241,13 @@ module Bar RBI visitor = Runtime::Visitor.new(context) visitor.visit(rbi_tree) - assert_messages([ - "Runtime constant `::Foo` does not include `Mixin2` (defined at `-:2:2-2:24`)", - "Runtime constant `::Foo` does not include `Kernel` (defined at `-:3:2-3:16`)", - ], context.run!) + assert_messages( + [ + "Runtime constant `::Foo` does not include `Mixin2` (defined at `-:2:2-2:24`)", + "Runtime constant `::Foo` does not include `Kernel` (defined at `-:3:2-3:16`)", + ], + context.run!, + ) end def test_wrong_extends @@ -255,9 +278,12 @@ module Bar RBI visitor = Runtime::Visitor.new(context) visitor.visit(rbi_tree) - assert_messages([ - "Runtime constant `::Foo` does not extend `Mixin2` (defined at `-:2:2-2:23`)", - ], context.run!) + assert_messages( + [ + "Runtime constant `::Foo` does not extend `Mixin2` (defined at `-:2:2-2:23`)", + ], + context.run!, + ) end def test_can_use_sorbet_runtime diff --git a/gem/test/rbi-central/static/context_test.rb b/gem/test/rbi-central/static/context_test.rb index 1e50b502..80418045 100644 --- a/gem/test/rbi-central/static/context_test.rb +++ b/gem/test/rbi-central/static/context_test.rb @@ -10,7 +10,7 @@ def test_init_gemfile gem = Gem.new(name: "gem") context = Context.new(gem, "#{ANNOTATIONS_PATH}/gem.rbi", color: false) assert_equal(<<~GEMFILE, context.read_gemfile) - source \"https://rubygems.org\" + source "https://rubygems.org" gem 'gem' gem 'sorbet', '>= 0.5.10109' gem 'tapioca', '>= 0.9.2' diff --git a/gem/test/test_helper.rb b/gem/test/test_helper.rb index b8b569c0..822ffcac 100644 --- a/gem/test/test_helper.rb +++ b/gem/test/test_helper.rb @@ -64,7 +64,7 @@ def add_mock_gem(name, version: "0.0.1") github: T.nilable(String), branch: T.nilable(String), ref: T.nilable(String), - path: T.nilable(String) + path: T.nilable(String), ).void end def add_gem_dependency(name, version: nil, github: nil, branch: nil, ref: nil, path: nil) diff --git a/rbi/annotations/graphql.rbi b/rbi/annotations/graphql.rbi index 5c65b241..70368d2a 100644 --- a/rbi/annotations/graphql.rbi +++ b/rbi/annotations/graphql.rbi @@ -2,8 +2,8 @@ module GraphQL class << self - sig { params(graphql_string: String, trace: T.untyped).returns(GraphQL::Language::Nodes::Document) } - def parse(graphql_string, trace: T.unsafe(nil)); end + sig { params(graphql_string: String, trace: T.untyped, filename: T.untyped).returns(GraphQL::Language::Nodes::Document) } + def parse(graphql_string, trace: T.unsafe(nil), filename: T.unsafe(nil)); end end end