diff --git a/.github/ci-filters.yml b/.github/ci-filters.yml index 5ac68039bb8..22e42bac1f4 100644 --- a/.github/ci-filters.yml +++ b/.github/ci-filters.yml @@ -17,6 +17,9 @@ common: composer: - *shared - 'composer/**' +devcontainers: + - *shared + - 'devcontainers/**' docker: - *shared - 'docker/**' diff --git a/.github/labeler.yml b/.github/labeler.yml index bbec4683ed4..42b92f45a3d 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -10,6 +10,10 @@ - changed-files: - any-glob-to-any-file: composer/** +"L: devcontainers": +- changed-files: + - any-glob-to-any-file: devcontainers/** + "L: docker": - changed-files: - any-glob-to-any-file: docker/** diff --git a/.github/smoke-filters.yml b/.github/smoke-filters.yml index aed44a58894..f5f1fce56aa 100644 --- a/.github/smoke-filters.yml +++ b/.github/smoke-filters.yml @@ -16,6 +16,9 @@ cargo: composer: - *common - 'composer/**' +devcontainers: + - *common + - 'devcontainers/**' docker: - *common - 'docker/**' diff --git a/.github/smoke-matrix.json b/.github/smoke-matrix.json index b86f0d5b1bc..25d52e78cb8 100644 --- a/.github/smoke-matrix.json +++ b/.github/smoke-matrix.json @@ -14,6 +14,11 @@ "test": "composer", "ecosystem": "composer" }, + { + "core": "devcontainers", + "test": "devcontainers", + "ecosystem": "devcontainers" + }, { "core": "docker", "test": "docker", diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 63ed91adee5..8a40233d354 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,6 +37,7 @@ jobs: - { path: python, name: python, ecosystem: pip } - { path: python, name: python_slow, ecosystem: pip } - { path: swift, name: swift, ecosystem: swift } + - { path: devcontainers, name: devcontainers, ecosystem: devcontainers } - { path: terraform, name: terraform, ecosystem: terraform } steps: diff --git a/.github/workflows/images-branch.yml b/.github/workflows/images-branch.yml index a3c9df2497f..f3223130cc1 100644 --- a/.github/workflows/images-branch.yml +++ b/.github/workflows/images-branch.yml @@ -67,6 +67,7 @@ jobs: - { name: pub, ecosystem: pub } - { name: python, ecosystem: pip } - { name: swift, ecosystem: swift } + - { name: devcontainers, ecosystem: devcontainers } - { name: terraform, ecosystem: terraform } permissions: contents: read diff --git a/.github/workflows/images-latest.yml b/.github/workflows/images-latest.yml index 4bbafea6d63..63e8d83e21a 100644 --- a/.github/workflows/images-latest.yml +++ b/.github/workflows/images-latest.yml @@ -48,6 +48,7 @@ jobs: - { name: pub, ecosystem: pub } - { name: python, ecosystem: pip } - { name: swift, ecosystem: swift } + - { name: devcontainers, ecosystem: devcontainers } - { name: terraform, ecosystem: terraform } env: COMMIT_SHA: ${{ github.sha }} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 058487b5572..014b37eb142 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -34,20 +34,8 @@ struggling to understand how anything works please don't hesitate to create an i ## Contributing new ecosystems -We are not currently accepting new ecosystems into `dependabot-core`, starting in December 2020. - -### Why have we paused accepting new ecosystems? - -Dependabot has grown dramatically in the last few years since integrating with GitHub. We are now [used by millions of repositories](https://octoverse.github.com/#securing-software) across [16 package managers](https://docs.github.com/en/free-pro-team@latest/github/administering-a-repository/about-dependabot-version-updates#supported-repositories-and-ecosystems). We aim to provide the best user experience -possible for each of these, but we have found we've lacked the capacity – and in some cases the in-house expertise – to support new ecosystems in the last year. We want to be -confident we can support each ecosystem we merge. - -In the immediate future, we want to focus more of our resources on merging improvements to the ecosystems we already support. This does not mean that we are stopping work or investing less in this space - in fact, we're investing more, to make it a great user experience. This tough call means we can also provide a better experience for our contributors, where PRs don't go stale while waiting for a review. - If you are an ecosystem maintainer and are interested in integrating with Dependabot, and are willing to help provide the expertise necessary to build and support it, please open an issue and let us know. -We hope to be able to accept community contributions for ecosystem support again soon. - ### What's next? In `dependabot-core`, each ecosystem implementation is in its own gem so you can use Dependabot for a language diff --git a/Dockerfile.updater-core b/Dockerfile.updater-core index e8070488309..56f0e1c781d 100644 --- a/Dockerfile.updater-core +++ b/Dockerfile.updater-core @@ -83,6 +83,7 @@ COPY --chown=dependabot:dependabot common/lib/dependabot.rb common/lib/dependabo COPY --chown=dependabot:dependabot bundler/.bundle bundler/dependabot-bundler.gemspec bundler/ COPY --chown=dependabot:dependabot cargo/.bundle cargo/dependabot-cargo.gemspec cargo/ COPY --chown=dependabot:dependabot composer/.bundle composer/dependabot-composer.gemspec composer/ +COPY --chown=dependabot:dependabot devcontainers/.bundle devcontainers/dependabot-devcontainers.gemspec devcontainers/ COPY --chown=dependabot:dependabot docker/.bundle docker/dependabot-docker.gemspec docker/ COPY --chown=dependabot:dependabot elm/.bundle elm/dependabot-elm.gemspec elm/ COPY --chown=dependabot:dependabot git_submodules/.bundle git_submodules/dependabot-git_submodules.gemspec git_submodules/ @@ -99,7 +100,7 @@ COPY --chown=dependabot:dependabot swift/.bundle swift/dependabot-swift.gemspec COPY --chown=dependabot:dependabot terraform/.bundle terraform/dependabot-terraform.gemspec terraform/ # prevent having all the source in every ecosystem image -RUN for ecosystem in git_submodules terraform github_actions hex elm docker nuget maven gradle cargo composer go_modules python pub npm_and_yarn bundler swift; do \ +RUN for ecosystem in git_submodules terraform github_actions hex elm docker nuget maven gradle cargo composer go_modules python pub npm_and_yarn bundler swift devcontainers; do \ mkdir -p $ecosystem/lib/dependabot; \ touch $ecosystem/lib/dependabot/$ecosystem.rb; \ done diff --git a/Gemfile b/Gemfile index e8f38a81073..7af3674f3d0 100644 --- a/Gemfile +++ b/Gemfile @@ -2,24 +2,25 @@ source "https://rubygems.org" -gemspec path: "bundler" -gemspec path: "cargo" -gemspec path: "common" -gemspec path: "composer" -gemspec path: "docker" -gemspec path: "elm" -gemspec path: "github_actions" -gemspec path: "git_submodules" -gemspec path: "go_modules" -gemspec path: "gradle" -gemspec path: "hex" -gemspec path: "maven" -gemspec path: "npm_and_yarn" -gemspec path: "nuget" -gemspec path: "pub" -gemspec path: "python" -gemspec path: "swift" -gemspec path: "terraform" +gem "dependabot-bundler", path: "bundler" +gem "dependabot-cargo", path: "cargo" +gem "dependabot-common", path: "common" +gem "dependabot-composer", path: "composer" +gem "dependabot-devcontainers", path: "devcontainers" +gem "dependabot-docker", path: "docker" +gem "dependabot-elm", path: "elm" +gem "dependabot-github_actions", path: "github_actions" +gem "dependabot-git_submodules", path: "git_submodules" +gem "dependabot-go_modules", path: "go_modules" +gem "dependabot-gradle", path: "gradle" +gem "dependabot-hex", path: "hex" +gem "dependabot-maven", path: "maven" +gem "dependabot-npm_and_yarn", path: "npm_and_yarn" +gem "dependabot-nuget", path: "nuget" +gem "dependabot-pub", path: "pub" +gem "dependabot-python", path: "python" +gem "dependabot-swift", path: "swift" +gem "dependabot-terraform", path: "terraform" # Sorbet gem "sorbet", "0.5.11178", group: :development @@ -28,12 +29,17 @@ gem "tapioca", "0.11.14", require: false, group: :development common_gemspec = File.expand_path("common/dependabot-common.gemspec", __dir__) deps_shared_with_common = %w( + debug gpgme rake + rspec-its + rspec-sorbet rubocop rubocop-performance rubocop-sorbet stackprof + turbo_tests + vcr webmock webrick ) diff --git a/Gemfile.lock b/Gemfile.lock index 113c7b1c736..56291cc8324 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,25 +1,25 @@ PATH remote: bundler specs: - dependabot-bundler (0.241.0) - dependabot-common (= 0.241.0) + dependabot-bundler (0.242.0) + dependabot-common (= 0.242.0) PATH remote: cargo specs: - dependabot-cargo (0.241.0) - dependabot-common (= 0.241.0) + dependabot-cargo (0.242.0) + dependabot-common (= 0.242.0) PATH remote: common specs: - dependabot-common (0.241.0) + dependabot-common (0.242.0) aws-sdk-codecommit (~> 1.28) aws-sdk-ecr (~> 1.5) bundler (>= 1.16, < 3.0.0) commonmarker (>= 0.20.1, < 0.24.0) docker_registry2 (~> 1.18.0) - excon (~> 0.96, < 0.105) + excon (~> 0.109) faraday (= 2.7.11) faraday-retry (= 2.2.0) gitlab (= 4.19.0) @@ -35,95 +35,101 @@ PATH PATH remote: composer specs: - dependabot-composer (0.241.0) - dependabot-common (= 0.241.0) + dependabot-composer (0.242.0) + dependabot-common (= 0.242.0) + +PATH + remote: devcontainers + specs: + dependabot-devcontainers (0.242.0) + dependabot-common (= 0.242.0) PATH remote: docker specs: - dependabot-docker (0.241.0) - dependabot-common (= 0.241.0) + dependabot-docker (0.242.0) + dependabot-common (= 0.242.0) PATH remote: elm specs: - dependabot-elm (0.241.0) - dependabot-common (= 0.241.0) + dependabot-elm (0.242.0) + dependabot-common (= 0.242.0) PATH remote: git_submodules specs: - dependabot-git_submodules (0.241.0) - dependabot-common (= 0.241.0) + dependabot-git_submodules (0.242.0) + dependabot-common (= 0.242.0) parseconfig (~> 1.0, < 1.1.0) PATH remote: github_actions specs: - dependabot-github_actions (0.241.0) - dependabot-common (= 0.241.0) + dependabot-github_actions (0.242.0) + dependabot-common (= 0.242.0) PATH remote: go_modules specs: - dependabot-go_modules (0.241.0) - dependabot-common (= 0.241.0) + dependabot-go_modules (0.242.0) + dependabot-common (= 0.242.0) PATH remote: gradle specs: - dependabot-gradle (0.241.0) - dependabot-common (= 0.241.0) - dependabot-maven (= 0.241.0) + dependabot-gradle (0.242.0) + dependabot-common (= 0.242.0) + dependabot-maven (= 0.242.0) PATH remote: hex specs: - dependabot-hex (0.241.0) - dependabot-common (= 0.241.0) + dependabot-hex (0.242.0) + dependabot-common (= 0.242.0) PATH remote: maven specs: - dependabot-maven (0.241.0) - dependabot-common (= 0.241.0) + dependabot-maven (0.242.0) + dependabot-common (= 0.242.0) PATH remote: npm_and_yarn specs: - dependabot-npm_and_yarn (0.241.0) - dependabot-common (= 0.241.0) + dependabot-npm_and_yarn (0.242.0) + dependabot-common (= 0.242.0) PATH remote: nuget specs: - dependabot-nuget (0.241.0) - dependabot-common (= 0.241.0) + dependabot-nuget (0.242.0) + dependabot-common (= 0.242.0) rubyzip (>= 2.3.2, < 3.0) PATH remote: pub specs: - dependabot-pub (0.241.0) - dependabot-common (= 0.241.0) + dependabot-pub (0.242.0) + dependabot-common (= 0.242.0) PATH remote: python specs: - dependabot-python (0.241.0) - dependabot-common (= 0.241.0) + dependabot-python (0.242.0) + dependabot-common (= 0.242.0) PATH remote: swift specs: - dependabot-swift (0.241.0) - dependabot-common (= 0.241.0) + dependabot-swift (0.242.0) + dependabot-common (= 0.242.0) PATH remote: terraform specs: - dependabot-terraform (0.241.0) - dependabot-common (= 0.241.0) + dependabot-terraform (0.242.0) + dependabot-common (= 0.242.0) GEM remote: https://rubygems.org/ @@ -151,11 +157,15 @@ GEM commonmarker (0.23.10) crack (0.4.5) rexml + debug (1.8.0) + irb (>= 1.5.0) + reline (>= 0.3.1) + diff-lcs (1.5.0) docker_registry2 (1.18.0) rest-client (>= 1.8.0) domain_name (0.6.20231109) erubi (1.12.0) - excon (0.104.0) + excon (0.109.0) faraday (2.7.11) base64 faraday-net_http (>= 2.0, < 3.1) @@ -175,6 +185,10 @@ GEM httparty (0.21.0) mini_mime (>= 1.0.0) multi_xml (>= 0.5.2) + io-console (0.7.2) + irb (1.11.1) + rdoc + reline (>= 0.4.2) jmespath (1.6.2) json (2.6.3) language_server-protocol (3.17.0.3) @@ -207,6 +221,8 @@ GEM opentelemetry-semantic_conventions (1.10.0) opentelemetry-api (~> 1.0) parallel (1.24.0) + parallel_tests (4.4.0) + parallel parseconfig (1.0.8) parser (3.3.0.1) ast (~> 2.4.1) @@ -222,13 +238,35 @@ GEM rbi (0.1.6) prism (>= 0.18.0, < 0.20) sorbet-runtime (>= 0.5.9204) + rdoc (6.6.2) + psych (>= 4.0.0) regexp_parser (2.8.3) + reline (0.4.2) + io-console (~> 0.5) rest-client (2.1.0) http-accept (>= 1.7.0, < 2.0) http-cookie (>= 1.0.2, < 2.0) mime-types (>= 1.16, < 4.0) netrc (~> 0.8) rexml (3.2.6) + rspec (3.12.0) + rspec-core (~> 3.12.0) + rspec-expectations (~> 3.12.0) + rspec-mocks (~> 3.12.0) + rspec-core (3.12.2) + rspec-support (~> 3.12.0) + rspec-expectations (3.12.3) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.12.0) + rspec-its (1.3.0) + rspec-core (>= 3.0.0) + rspec-expectations (>= 3.0.0) + rspec-mocks (3.12.6) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.12.0) + rspec-sorbet (1.9.2) + sorbet-runtime + rspec-support (3.12.1) rubocop (1.58.0) json (~> 2.3) language_server-protocol (>= 3.17.0) @@ -284,7 +322,11 @@ GEM thor (1.3.0) toml-rb (2.2.0) citrus (~> 3.0, > 3.0) + turbo_tests (2.2.0) + parallel_tests (>= 3.3.0, < 5) + rspec (>= 3.10) unicode-display_width (2.5.0) + vcr (6.2.0) webmock (3.19.1) addressable (>= 2.8.0) crack (>= 0.3.2) @@ -302,10 +344,12 @@ PLATFORMS x86_64-linux DEPENDENCIES + debug (~> 1.8.0) dependabot-bundler! dependabot-cargo! dependabot-common! dependabot-composer! + dependabot-devcontainers! dependabot-docker! dependabot-elm! dependabot-git_submodules! @@ -322,12 +366,16 @@ DEPENDENCIES dependabot-terraform! gpgme (~> 2.0) rake (~> 13) + rspec-its (~> 1.3) + rspec-sorbet (~> 1.9.2) rubocop (~> 1.58.0) rubocop-performance (~> 1.19.0) rubocop-sorbet (~> 0.7.3) sorbet (= 0.5.11178) stackprof (~> 0.2.16) tapioca (= 0.11.14) + turbo_tests (~> 2.2.0) + vcr (~> 6.1) webmock (~> 3.18) webrick (>= 1.7) diff --git a/Rakefile b/Rakefile index b5c9d01b6ac..a404b8b53f6 100644 --- a/Rakefile +++ b/Rakefile @@ -32,6 +32,7 @@ GEMSPECS = %w( pub/dependabot-pub.gemspec omnibus/dependabot-omnibus.gemspec swift/dependabot-swift.gemspec + devcontainers/dependabot-devcontainers.gemspec ).freeze def run_command(command) diff --git a/bin/docker-dev-shell b/bin/docker-dev-shell index 86a97afc57a..67e8088336a 100755 --- a/bin/docker-dev-shell +++ b/bin/docker-dev-shell @@ -141,6 +141,11 @@ docker run --rm -ti \ -v "$(pwd)/composer/lib:$CODE_DIR/composer/lib" \ -v "$(pwd)/composer/script:$CODE_DIR/composer/script" \ -v "$(pwd)/composer/spec:$CODE_DIR/composer/spec" \ + -v "$(pwd)/devcontainers/.rubocop.yml:$CODE_DIR/devcontainers/.rubocop.yml" \ + -v "$(pwd)/devcontainers/dependabot-devcontainers.gemspec:$CODE_DIR/devcontainers/dependabot-devcontainers.gemspec" \ + -v "$(pwd)/devcontainers/lib:$CODE_DIR/devcontainers/lib" \ + -v "$(pwd)/devcontainers/script:$CODE_DIR/devcontainers/script" \ + -v "$(pwd)/devcontainers/spec:$CODE_DIR/devcontainers/spec" \ -v "$(pwd)/docker/.rubocop.yml:$CODE_DIR/docker/.rubocop.yml" \ -v "$(pwd)/docker/dependabot-docker.gemspec:$CODE_DIR/docker/dependabot-docker.gemspec" \ -v "$(pwd)/docker/lib:$CODE_DIR/docker/lib" \ diff --git a/bin/dry-run.rb b/bin/dry-run.rb index 1b08ce5fb13..9ed9598a23c 100755 --- a/bin/dry-run.rb +++ b/bin/dry-run.rb @@ -35,6 +35,7 @@ # - terraform # - pub # - swift +# - devcontainers # rubocop:disable Style/GlobalVars @@ -52,6 +53,7 @@ $LOAD_PATH << "./cargo/lib" $LOAD_PATH << "./common/lib" $LOAD_PATH << "./composer/lib" +$LOAD_PATH << "./devcontainers/lib" $LOAD_PATH << "./docker/lib" $LOAD_PATH << "./elm/lib" $LOAD_PATH << "./git_submodules/lib" @@ -95,6 +97,7 @@ require "dependabot/bundler" require "dependabot/cargo" require "dependabot/composer" +require "dependabot/devcontainers" require "dependabot/docker" require "dependabot/elm" require "dependabot/git_submodules" diff --git a/common/dependabot-common.gemspec b/common/dependabot-common.gemspec index a815d249d16..b07c2237e65 100644 --- a/common/dependabot-common.gemspec +++ b/common/dependabot-common.gemspec @@ -31,7 +31,7 @@ Gem::Specification.new do |spec| spec.add_dependency "bundler", ">= 1.16", "< 3.0.0" spec.add_dependency "commonmarker", ">= 0.20.1", "< 0.24.0" spec.add_dependency "docker_registry2", "~> 1.18.0" - spec.add_dependency "excon", "~> 0.96", "< 0.105" + spec.add_dependency "excon", "~> 0.109" spec.add_dependency "faraday", "2.7.11" spec.add_dependency "faraday-retry", "2.2.0" spec.add_dependency "gitlab", "4.19.0" diff --git a/common/lib/dependabot.rb b/common/lib/dependabot.rb index a757a931306..f82035d86a2 100644 --- a/common/lib/dependabot.rb +++ b/common/lib/dependabot.rb @@ -2,5 +2,5 @@ # frozen_string_literal: true module Dependabot - VERSION = "0.241.0" + VERSION = "0.242.0" end diff --git a/common/lib/dependabot/config/file.rb b/common/lib/dependabot/config/file.rb index 39e553c4a60..c73777d8c5f 100644 --- a/common/lib/dependabot/config/file.rb +++ b/common/lib/dependabot/config/file.rb @@ -61,6 +61,7 @@ def self.parse(config) "bundler" => "bundler", "cargo" => "cargo", "composer" => "composer", + "devcontainer" => "devcontainers", "docker" => "docker", "elm" => "elm", "github-actions" => "github_actions", diff --git a/common/lib/dependabot/dependency.rb b/common/lib/dependabot/dependency.rb index 655c60c7121..b6d6b57675c 100644 --- a/common/lib/dependabot/dependency.rb +++ b/common/lib/dependabot/dependency.rb @@ -88,15 +88,15 @@ def self.register_name_normaliser(package_manager, name_builder) sig do params( name: String, - requirements: T::Array[T::Hash[String, String]], + requirements: T::Array[T::Hash[T.any(Symbol, String), T.untyped]], package_manager: String, # TODO: Make version a Dependabot::Version everywhere version: T.nilable(T.any(String, Dependabot::Version)), previous_version: T.nilable(String), previous_requirements: T.nilable(T::Array[T::Hash[String, String]]), - subdependency_metadata: T.nilable(T::Array[T::Hash[String, String]]), + subdependency_metadata: T.nilable(T::Array[T::Hash[T.any(Symbol, String), String]]), removed: T::Boolean, - metadata: T.nilable(T::Hash[String, String]) + metadata: T.nilable(T::Hash[T.any(Symbol, String), String]) ).void end def initialize(name:, requirements:, package_manager:, version: nil, @@ -110,7 +110,7 @@ def initialize(name:, requirements:, package_manager:, version: nil, end, T.nilable(String) ) - @requirements = T.let(requirements.map { |req| symbolize_keys(req) }, T::Array[T::Hash[Symbol, String]]) + @requirements = T.let(requirements.map { |req| symbolize_keys(req) }, T::Array[T::Hash[Symbol, T.untyped]]) @previous_version = previous_version @previous_requirements = T.let( previous_requirements&.map { |req| symbolize_keys(req) }, @@ -391,7 +391,7 @@ def check_subdependency_metadata end end - sig { params(hash: T::Hash[String, T.untyped]).returns(T::Hash[Symbol, T.untyped]) } + sig { params(hash: T::Hash[T.any(Symbol, String), T.untyped]).returns(T::Hash[Symbol, T.untyped]) } def symbolize_keys(hash) hash.keys.to_h { |k| [k.to_sym, hash[k]] } end diff --git a/common/lib/dependabot/file_parsers/base/dependency_set.rb b/common/lib/dependabot/file_parsers/base/dependency_set.rb index 37d6e017841..b168b31a6a3 100644 --- a/common/lib/dependabot/file_parsers/base/dependency_set.rb +++ b/common/lib/dependabot/file_parsers/base/dependency_set.rb @@ -1,6 +1,7 @@ -# typed: true +# typed: strong # frozen_string_literal: true +require "sorbet-runtime" require "dependabot/dependency" require "dependabot/file_parsers/base" require "dependabot/utils" @@ -9,28 +10,36 @@ module Dependabot module FileParsers class Base class DependencySet + extend T::Sig + + sig do + params( + dependencies: T::Array[Dependency], + case_sensitive: T::Boolean + ) + .void + end def initialize(dependencies = [], case_sensitive: false) - unless dependencies.is_a?(Array) && - dependencies.all?(Dependency) - raise ArgumentError, "must be an array of Dependency objects" - end - @case_sensitive = case_sensitive - @dependencies = Hash.new { |hsh, key| hsh[key] = DependencySlot.new } + @dependencies = T.let( + Hash.new { |hsh, key| hsh[key] = DependencySlot.new }, + T::Hash[String, DependencySlot] + ) dependencies.each { |dep| self << dep } end + sig { returns(T::Array[Dependency]) } def dependencies @dependencies.values.filter_map(&:combined) end + sig { params(dep: Dependabot::Dependency).returns(T.untyped) } def <<(dep) - raise ArgumentError, "must be a Dependency object" unless dep.is_a?(Dependency) - - @dependencies[key_for_dependency(dep)] << dep + T.must(@dependencies[key_for_dependency(dep)]) << dep self end + sig { params(other: Object).returns(T.self_type) } def +(other) raise ArgumentError, "must be a DependencySet" unless other.is_a?(DependencySet) @@ -43,26 +52,31 @@ def +(other) self end + sig { params(name: String).returns(T::Array[Dependabot::Dependency]) } def all_versions_for_name(name) key = key_for_name(name) - @dependencies.key?(key) ? @dependencies[key].all_versions : [] + @dependencies.key?(key) ? T.must(@dependencies[key]).all_versions : [] end + sig { params(name: String).returns(T.nilable(Dependabot::Dependency)) } def dependency_for_name(name) key = key_for_name(name) - @dependencies.key?(key) ? @dependencies[key].combined : nil + @dependencies.key?(key) ? T.must(@dependencies[key]).combined : nil end private + sig { returns(T::Boolean) } def case_sensitive? @case_sensitive end + sig { params(name: String).returns(String) } def key_for_name(name) case_sensitive? ? name : name.downcase end + sig { params(dep: Dependabot::Dependency).returns(String) } def key_for_dependency(dep) key_for_name(dep.name) end @@ -79,13 +93,21 @@ def key_for_dependency(dep) # `DependencySet#dependency_for_name`. The list of individual versions of the # dependency is accessible via `DependencySet#all_versions_for_name`. class DependencySlot - attr_reader :all_versions, :combined + extend T::Sig + + sig { returns(T::Array[Dependabot::Dependency]) } + attr_reader :all_versions + + sig { returns(T.nilable(Dependabot::Dependency)) } + attr_reader :combined + sig { void } def initialize - @all_versions = [] - @combined = nil + @all_versions = T.let([], T::Array[Dependabot::Dependency]) + @combined = T.let(nil, T.nilable(Dependabot::Dependency)) end + sig { params(dep: Dependabot::Dependency).returns(T.self_type) } def <<(dep) return self if @all_versions.include?(dep) @@ -102,7 +124,7 @@ def <<(dep) @all_versions << dep else same_version = @all_versions[index_of_same_version] - @all_versions[index_of_same_version] = combined_dependency(same_version, dep) + @all_versions[index_of_same_version] = combined_dependency(T.must(same_version), dep) end self @@ -114,6 +136,13 @@ def <<(dep) # `new_dep`. Requirements and subdependency metadata will be combined and deduped. # The version of the combined dependency is determined by the # `#combined_version` method below. + sig do + params( + old_dep: Dependabot::Dependency, + new_dep: Dependabot::Dependency + ) + .returns(Dependabot::Dependency) + end def combined_dependency(old_dep, new_dep) version = combined_version(old_dep, new_dep) requirements = (old_dep.requirements + new_dep.requirements).uniq @@ -132,11 +161,18 @@ def combined_dependency(old_dep, new_dep) ) end + sig do + params( + old_dep: Dependabot::Dependency, + new_dep: Dependabot::Dependency + ) + .returns(T.nilable(String)) + end def combined_version(old_dep, new_dep) if old_dep.version.nil? ^ new_dep.version.nil? - [old_dep, new_dep].find(&:version).version + T.must([old_dep, new_dep].find(&:version)).version elsif old_dep.top_level? ^ new_dep.top_level? # Prefer a direct dependency over a transitive one - [old_dep, new_dep].find(&:top_level?).version + T.must([old_dep, new_dep].find(&:top_level?)).version elsif !version_class.correct?(new_dep.version) old_dep.version elsif !version_class.correct?(old_dep.version) @@ -148,8 +184,12 @@ def combined_version(old_dep, new_dep) end end + sig { returns(T.class_of(Gem::Version)) } def version_class - @version_class ||= @combined.version_class + @version_class ||= T.let( + T.must(@combined).version_class, + T.nilable(T.class_of(Gem::Version)) + ) end end private_constant :DependencySlot diff --git a/common/lib/dependabot/security_advisory.rb b/common/lib/dependabot/security_advisory.rb index a8ae682ff21..544eee6ff4d 100644 --- a/common/lib/dependabot/security_advisory.rb +++ b/common/lib/dependabot/security_advisory.rb @@ -1,31 +1,51 @@ -# typed: true +# typed: strong # frozen_string_literal: true +require "sorbet-runtime" require "dependabot/version" module Dependabot class SecurityAdvisory - attr_reader :dependency_name, :package_manager, - :vulnerable_versions, :safe_versions, - :vulnerable_version_strings + extend T::Sig + sig { returns(String) } + attr_reader :dependency_name + + sig { returns(String) } + attr_reader :package_manager + + sig { returns(T::Array[Dependabot::Requirement]) } + attr_reader :vulnerable_versions + + sig { returns(T::Array[Dependabot::Requirement]) } + attr_reader :safe_versions + + sig { returns(T::Array[T.any(String, Dependabot::Requirement)]) } + attr_reader :vulnerable_version_strings + + sig do + params( + dependency_name: String, + package_manager: String, + vulnerable_versions: T.nilable(T::Array[Dependabot::Requirement]), + safe_versions: T.nilable(T::Array[T.any(String, Dependabot::Requirement)]) + ) + .void + end def initialize(dependency_name:, package_manager:, vulnerable_versions: [], safe_versions: []) @dependency_name = dependency_name @package_manager = package_manager - @vulnerable_version_strings = vulnerable_versions || [] - @vulnerable_versions = [] - @safe_versions = safe_versions || [] + @vulnerable_version_strings = T.let(vulnerable_versions || [], T::Array[T.any(String, Dependabot::Requirement)]) + @vulnerable_versions = T.let([], T::Array[Dependabot::Requirement]) + @safe_versions = T.let([], T::Array[Dependabot::Requirement]) - convert_string_version_requirements + convert_string_version_requirements(vulnerable_version_strings, safe_versions || []) check_version_requirements end + sig { params(version: Gem::Version).returns(T::Boolean) } def vulnerable?(version) - unless version.is_a?(version_class) || version.instance_of?(Gem::Version) - raise ArgumentError, "must be a #{version_class}" - end - in_safe_range = safe_versions .any? { |r| r.satisfied_by?(version) } @@ -50,9 +70,10 @@ def vulnerable?(version) # # @param dependency [Dependabot::Dependency] Updated dependency # @return [Boolean] + sig { params(dependency: Dependabot::Dependency).returns(T::Boolean) } def fixed_by?(dependency) # Handle case mismatch between the security advisory and parsed name - return false unless dependency_name.casecmp(dependency.name).zero? + return false unless dependency_name.casecmp(dependency.name)&.zero? return false unless package_manager == dependency.package_manager # TODO: Support no previous version to the same level as dependency graph # and security alerts. We currently ignore dependency updates without a @@ -61,19 +82,20 @@ def fixed_by?(dependency) return false unless version_class.correct?(dependency.previous_version) # Ignore deps that weren't previously vulnerable - return false unless affects_version?(dependency.previous_version) + return false unless affects_version?(T.must(dependency.previous_version)) # Removing a dependency is a way to fix the vulnerability return true if dependency.removed? # Select deps that are now fixed - !affects_version?(dependency.version) + !affects_version?(T.must(dependency.version)) end # Check if the version is affected by the advisory # # @param version [Dependabot::::Version] version class # @return [Boolean] + sig { params(version: T.any(String, Gem::Version)).returns(T::Boolean) } def affects_version?(version) return false unless version_class.correct?(version) return false unless [*safe_versions, *vulnerable_versions].any? @@ -96,7 +118,14 @@ def affects_version?(version) private - def convert_string_version_requirements + sig do + params( + vulnerable_version_strings: T::Array[T.any(String, Dependabot::Requirement)], + safe_versions: T::Array[T.any(String, Dependabot::Requirement)] + ) + .void + end + def convert_string_version_requirements(vulnerable_version_strings, safe_versions) @vulnerable_versions = vulnerable_version_strings.flat_map do |vuln_str| next vuln_str unless vuln_str.is_a?(String) @@ -110,6 +139,7 @@ def convert_string_version_requirements end end + sig { void } def check_version_requirements unless vulnerable_versions.is_a?(Array) && vulnerable_versions.all? { |i| requirement_class <= i.class } @@ -124,10 +154,12 @@ def check_version_requirements end end + sig { returns(T.class_of(Gem::Version)) } def version_class Utils.version_class_for_package_manager(package_manager) end + sig { returns(T.class_of(Dependabot::Requirement)) } def requirement_class Utils.requirement_class_for_package_manager(package_manager) end diff --git a/common/lib/dependabot/update_checkers/version_filters.rb b/common/lib/dependabot/update_checkers/version_filters.rb index f3921c5108d..d7a127b2da7 100644 --- a/common/lib/dependabot/update_checkers/version_filters.rb +++ b/common/lib/dependabot/update_checkers/version_filters.rb @@ -10,10 +10,10 @@ module VersionFilters sig do params( - versions_array: T::Array[T.any(Gem::Version, T::Hash[Symbol, String])], + versions_array: T::Array[T.any(Gem::Version, T::Hash[Symbol, Gem::Version])], security_advisories: T::Array[SecurityAdvisory] ) - .returns(T::Array[T.any(Gem::Version, T::Hash[Symbol, String])]) + .returns(T::Array[T.any(Gem::Version, T::Hash[Symbol, Gem::Version])]) end def self.filter_vulnerable_versions(versions_array, security_advisories) versions_array.reject do |v| diff --git a/common/spec/dependabot/file_parsers/base/dependency_set_spec.rb b/common/spec/dependabot/file_parsers/base/dependency_set_spec.rb index 16e8d2c1e7c..6c3ed8d389d 100644 --- a/common/spec/dependabot/file_parsers/base/dependency_set_spec.rb +++ b/common/spec/dependabot/file_parsers/base/dependency_set_spec.rb @@ -34,8 +34,8 @@ it "raises a helpful error" do expect { described_class.new(:a) } - .to raise_error(ArgumentError) do |error| - expect(error.message).to include("array of Dependency objects") + .to raise_error(TypeError) do |error| + expect(error.message).to include("Expected type T::Array[Dependabot::Dependency]") end end end @@ -46,8 +46,8 @@ it "raises a helpful error" do expect { described_class.new(:a) } - .to raise_error(ArgumentError) do |error| - expect(error.message).to eq "must be an array of Dependency objects" + .to raise_error(TypeError) do |error| + expect(error.message).to include("Expected type T::Array[Dependabot::Dependency]") end end end @@ -208,8 +208,8 @@ it "raises a helpful error" do expect { dependency_set << dependency } - .to raise_error(ArgumentError) do |error| - expect(error.message).to eq("must be a Dependency object") + .to raise_error(TypeError) do |error| + expect(error.message).to include("Expected type Dependabot::Dependency") end end end diff --git a/devcontainers/.bundle/config b/devcontainers/.bundle/config new file mode 100644 index 00000000000..3faf5cfe5e6 --- /dev/null +++ b/devcontainers/.bundle/config @@ -0,0 +1 @@ +BUNDLE_GEMFILE: "../dependabot-updater/Gemfile" diff --git a/devcontainers/.gitignore b/devcontainers/.gitignore new file mode 100644 index 00000000000..e2070370a1e --- /dev/null +++ b/devcontainers/.gitignore @@ -0,0 +1,5 @@ +/.bundle/ +!.bundle/config +/.env +/tmp +/dependabot-*.gem diff --git a/devcontainers/.rubocop.yml b/devcontainers/.rubocop.yml new file mode 100644 index 00000000000..fc2019d46a3 --- /dev/null +++ b/devcontainers/.rubocop.yml @@ -0,0 +1 @@ +inherit_from: ../.rubocop.yml diff --git a/devcontainers/Dockerfile b/devcontainers/Dockerfile new file mode 100644 index 00000000000..01efde8c73d --- /dev/null +++ b/devcontainers/Dockerfile @@ -0,0 +1,38 @@ +FROM ghcr.io/dependabot/dependabot-updater-core +ARG TARGETARCH + +# OS dependencies +RUN apt-get update \ + && apt-get install -y --no-install-recommends \ + make \ + ca-certificates \ + gnupg \ + build-essential \ + curl \ + && mkdir -p /etc/apt/keyrings \ + && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \ + && NODE_MAJOR=18 \ + && echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list + +RUN apt-get update -y \ + && apt-get install -y nodejs \ + && rm -rf /var/lib/apt/lists/* + +RUN npm install -g @devcontainers/cli + +USER dependabot + +# Needed because tools like dependabot/cli will proxy/MITM the traffic +# to the registry with a cert that (without this change) is not known +# to the dev container process. See: +# * https://github.com/microsoft/vscode-remote-release/issues/6092 +# * https://github.com/devcontainers/cli/blob/2d24543380dfc4d54e76b582536b52226af133c8/src/spec-utils/httpRequest.ts#L130-L162 +# * https://github.com/devcontainers/cli/pull/559 +ENV NODE_EXTRA_CA_CERTS=/etc/ssl/certs/ca-certificates.crt + +# Sanity check +RUN devcontainer --version + +COPY --chown=dependabot:dependabot devcontainers $DEPENDABOT_HOME/devcontainers +COPY --chown=dependabot:dependabot common $DEPENDABOT_HOME/common +COPY --chown=dependabot:dependabot updater $DEPENDABOT_HOME/dependabot-updater diff --git a/devcontainers/README.md b/devcontainers/README.md new file mode 100644 index 00000000000..81dde5647a9 --- /dev/null +++ b/devcontainers/README.md @@ -0,0 +1,18 @@ +## `dependabot-devcontainers` + +Dev Containers support for [`dependabot-core`][core-repo]. + +### Running locally + +1. Start a development shell + + ``` + $ bin/docker-dev-shell devcontainers + ``` + +2. Run tests + ``` + [dependabot-core-dev] ~ $ cd devcontainers && rspec + ``` + +[core-repo]: https://github.com/dependabot/dependabot-core diff --git a/devcontainers/dependabot-devcontainers.gemspec b/devcontainers/dependabot-devcontainers.gemspec new file mode 100644 index 00000000000..a19c7c03f05 --- /dev/null +++ b/devcontainers/dependabot-devcontainers.gemspec @@ -0,0 +1,33 @@ +# frozen_string_literal: true + +Gem::Specification.new do |spec| + common_gemspec = + Bundler.load_gemspec_uncached("../common/dependabot-common.gemspec") + + spec.name = "dependabot-devcontainers" + spec.summary = "Provides Dependabot support for Dev Containers" + spec.description = "Dependabot-Devcontainers provides support for managing dev container versioning via Dependabot." + + spec.author = common_gemspec.author + spec.email = common_gemspec.email + spec.homepage = common_gemspec.homepage + spec.license = common_gemspec.license + + spec.metadata = { + "bug_tracker_uri" => common_gemspec.metadata["bug_tracker_uri"], + "changelog_uri" => common_gemspec.metadata["changelog_uri"] + } + + spec.version = common_gemspec.version + spec.required_ruby_version = common_gemspec.required_ruby_version + spec.required_rubygems_version = common_gemspec.required_ruby_version + + spec.require_path = "lib" + spec.files = Dir["lib/**/*"] + + spec.add_dependency "dependabot-common", Dependabot::VERSION + + common_gemspec.development_dependencies.each do |dep| + spec.add_development_dependency dep.name, *dep.requirement.as_list + end +end diff --git a/devcontainers/lib/dependabot/devcontainers.rb b/devcontainers/lib/dependabot/devcontainers.rb new file mode 100644 index 00000000000..7ac8008532f --- /dev/null +++ b/devcontainers/lib/dependabot/devcontainers.rb @@ -0,0 +1,23 @@ +# typed: strong +# frozen_string_literal: true + +# These all need to be required so the various classes can be registered in a +# lookup table of package manager names to concrete classes. +require "dependabot/devcontainers/file_fetcher" +require "dependabot/devcontainers/file_parser" +require "dependabot/devcontainers/update_checker" +require "dependabot/devcontainers/file_updater" +require "dependabot/devcontainers/metadata_finder" +require "dependabot/devcontainers/requirement" +require "dependabot/devcontainers/version" + +require "dependabot/pull_request_creator/labeler" +Dependabot::PullRequestCreator::Labeler + .register_label_details("devcontainers", name: "devcontainers_package_manager", colour: "2753E3") + +require "dependabot/dependency" +Dependabot::Dependency + .register_production_check("devcontainers", ->(_) { true }) + +require "dependabot/utils" +Dependabot::Utils.register_always_clone("devcontainers") diff --git a/devcontainers/lib/dependabot/devcontainers/file_fetcher.rb b/devcontainers/lib/dependabot/devcontainers/file_fetcher.rb new file mode 100644 index 00000000000..8b419744a81 --- /dev/null +++ b/devcontainers/lib/dependabot/devcontainers/file_fetcher.rb @@ -0,0 +1,84 @@ +# typed: true +# frozen_string_literal: true + +require "dependabot/file_fetchers" +require "dependabot/file_fetchers/base" +require "dependabot/devcontainers/utils" + +module Dependabot + module Devcontainers + class FileFetcher < Dependabot::FileFetchers::Base + def self.required_files_in?(filenames) + # There's several other places a devcontainer.json can be checked into + # See: https://containers.dev/implementors/spec/#devcontainerjson + filenames.any? { |f| f.end_with?("devcontainer.json") } + end + + def self.required_files_message + "Repo must contain a dev container configuration file." + end + + def fetch_files + fetched_files = [] + fetched_files += root_files + fetched_files += scoped_files + fetched_files += custom_directory_files + return fetched_files if fetched_files.any? + + raise Dependabot::DependencyFileNotFound.new( + nil, + "Neither .devcontainer.json nor .devcontainer/devcontainer.json nor " \ + ".devcontainer//devcontainer.json found in #{directory}" + ) + end + + private + + def root_files + fetch_config_and_lockfile_from(".") + end + + def scoped_files + return [] unless devcontainer_directory + + fetch_config_and_lockfile_from(".devcontainer") + end + + def custom_directory_files + return [] unless devcontainer_directory + + custom_directories.flat_map do |directory| + fetch_config_and_lockfile_from(directory.path) + end + end + + def custom_directories + repo_contents(dir: ".devcontainer").select { |f| f.type == "dir" && f.name != ".devcontainer" } + end + + def devcontainer_directory + return @devcontainer_directory if defined?(@devcontainer_directory) + + @devcontainer_directory = repo_contents.find { |f| f.type == "dir" && f.name == ".devcontainer" } + end + + def fetch_config_and_lockfile_from(directory) + files = [] + + config_name = Utils.expected_config_basename(directory) + config_file = fetch_file_if_present(File.join(directory, config_name)) + return files unless config_file + + files << config_file + + lockfile_name = Utils.expected_lockfile_name(File.basename(config_file.name)) + lockfile = fetch_support_file(File.join(directory, lockfile_name)) + files << lockfile if lockfile + + files + end + end + end +end + +Dependabot::FileFetchers.register("devcontainers", Dependabot::Devcontainers::FileFetcher) diff --git a/devcontainers/lib/dependabot/devcontainers/file_parser.rb b/devcontainers/lib/dependabot/devcontainers/file_parser.rb new file mode 100644 index 00000000000..9d2fcc72049 --- /dev/null +++ b/devcontainers/lib/dependabot/devcontainers/file_parser.rb @@ -0,0 +1,51 @@ +# typed: true +# frozen_string_literal: true + +require "dependabot/file_parsers" +require "dependabot/file_parsers/base" +require "dependabot/devcontainers/version" +require "dependabot/devcontainers/file_parser/feature_dependency_parser" + +module Dependabot + module Devcontainers + class FileParser < Dependabot::FileParsers::Base + require "dependabot/file_parsers/base/dependency_set" + + def parse + dependency_set = DependencySet.new + + config_dependency_files.each do |config_dependency_file| + parse_features(config_dependency_file).each do |dep| + dependency_set << dep + end + end + + dependency_set.dependencies + end + + private + + def check_required_files + return if config_dependency_files.any? + + raise "No dev container configuration!" + end + + def parse_features(config_dependency_file) + FeatureDependencyParser.new( + config_dependency_file: config_dependency_file, + repo_contents_path: repo_contents_path, + credentials: credentials + ).parse + end + + def config_dependency_files + @config_dependency_files ||= dependency_files.select do |f| + f.name.end_with?("devcontainer.json") + end + end + end + end +end + +Dependabot::FileParsers.register("devcontainers", Dependabot::Devcontainers::FileParser) diff --git a/devcontainers/lib/dependabot/devcontainers/file_parser/feature_dependency_parser.rb b/devcontainers/lib/dependabot/devcontainers/file_parser/feature_dependency_parser.rb new file mode 100644 index 00000000000..46dc04074d0 --- /dev/null +++ b/devcontainers/lib/dependabot/devcontainers/file_parser/feature_dependency_parser.rb @@ -0,0 +1,97 @@ +# typed: true +# frozen_string_literal: true + +require "dependabot/devcontainers/requirement" +require "dependabot/file_parsers/base" +require "dependabot/shared_helpers" +require "dependabot/dependency" +require "json" +require "uri" + +module Dependabot + module Devcontainers + class FileParser < Dependabot::FileParsers::Base + class FeatureDependencyParser + def initialize(config_dependency_file:, repo_contents_path:, credentials:) + @config_dependency_file = config_dependency_file + @repo_contents_path = repo_contents_path + @credentials = credentials + end + + def parse + SharedHelpers.in_a_temporary_repo_directory(base_dir, repo_contents_path) do + SharedHelpers.with_git_configured(credentials: credentials) do + parse_cli_json(evaluate_with_cli) + end + end + end + + private + + def base_dir + File.dirname(config_dependency_file.path) + end + + def config_name + File.basename(config_dependency_file.path) + end + + def config_contents + config_dependency_file.content + end + + # https://github.com/devcontainers/cli/blob/9444540283b236298c28f397dea879e7ec222ca1/src/spec-node/devContainersSpecCLI.ts#L1072 + def evaluate_with_cli + raise "config_name must be a string" unless config_name.is_a?(String) && !config_name.empty? + + cmd = "devcontainer outdated --workspace-folder . --config #{config_name} --output-format json" + Dependabot.logger.info("Running command: #{cmd}") + + json = SharedHelpers.run_shell_command( + cmd, + stderr_to_stdout: false + ) + + JSON.parse(json) + end + + def parse_cli_json(json) + dependencies = [] + + features = json["features"] + features.each do |feature, versions_object| + name, requirement = feature.split(":") + + # Skip sha pinned tags for now. Ideally the devcontainers CLI would give us updated SHA info + next if name.end_with?("@sha256") + + # Skip deprecated features until `devcontainer features info tag` + # and `devcontainer upgrade` work with them. See https://github.com/devcontainers/cli/issues/712 + next unless name.include?("/") + + current = versions_object["current"] + + dep = Dependency.new( + name: name, + version: current, + package_manager: "devcontainers", + requirements: [ + { + requirement: requirement, + file: config_dependency_file.name, + groups: ["feature"], + source: nil + } + ] + ) + + dependencies << dep + end + dependencies + end + + attr_reader :config_dependency_file, :repo_contents_path, :credentials + end + end + end +end diff --git a/devcontainers/lib/dependabot/devcontainers/file_updater.rb b/devcontainers/lib/dependabot/devcontainers/file_updater.rb new file mode 100644 index 00000000000..30fb765cdf9 --- /dev/null +++ b/devcontainers/lib/dependabot/devcontainers/file_updater.rb @@ -0,0 +1,85 @@ +# typed: true +# frozen_string_literal: true + +require "dependabot/file_updaters" +require "dependabot/file_updaters/base" +require "dependabot/devcontainers/file_updater/config_updater" + +module Dependabot + module Devcontainers + class FileUpdater < Dependabot::FileUpdaters::Base + def self.updated_files_regex + [ + /^\.?devcontainer\.json$/, + /^\.?devcontainer-lock\.json$/ + ] + end + + def updated_dependency_files + updated_files = [] + + manifests.each do |manifest| + requirement = dependency.requirements.find { |req| req[:file] == manifest.name } + next unless requirement + + config_contents, lockfile_contents = update(manifest, requirement) + + updated_files << updated_file(file: manifest, content: config_contents) if file_changed?(manifest) + + lockfile = lockfile_for(manifest) + + updated_files << updated_file(file: lockfile, content: lockfile_contents) if lockfile && lockfile_contents + end + + updated_files + end + + private + + def dependency + # TODO: Handle one dependency at a time + dependencies.first + end + + def check_required_files + return if dependency_files.any? + + raise "No dev container configuration!" + end + + def manifests + @manifests ||= dependency_files.select do |f| + f.name.end_with?("devcontainer.json") + end + end + + def lockfile_for(manifest) + lockfile_name = lockfile_name_for(manifest) + + dependency_files.find do |f| + f.name == lockfile_name + end + end + + def lockfile_name_for(manifest) + basename = File.basename(manifest.name) + lockfile_name = Utils.expected_lockfile_name(basename) + + manifest.name.delete_suffix(basename).concat(lockfile_name) + end + + def update(manifest, requirement) + ConfigUpdater.new( + feature: dependency.name, + requirement: requirement[:requirement], + version: dependency.version, + manifest: manifest, + repo_contents_path: repo_contents_path, + credentials: credentials + ).update + end + end + end +end + +Dependabot::FileUpdaters.register("devcontainers", Dependabot::Devcontainers::FileUpdater) diff --git a/devcontainers/lib/dependabot/devcontainers/file_updater/config_updater.rb b/devcontainers/lib/dependabot/devcontainers/file_updater/config_updater.rb new file mode 100644 index 00000000000..f24f5e7d8b5 --- /dev/null +++ b/devcontainers/lib/dependabot/devcontainers/file_updater/config_updater.rb @@ -0,0 +1,78 @@ +# typed: true +# frozen_string_literal: true + +require "dependabot/file_updaters/base" +require "dependabot/shared_helpers" +require "dependabot/logger" +require "dependabot/devcontainers/utils" + +module Dependabot + module Devcontainers + class FileUpdater < Dependabot::FileUpdaters::Base + class ConfigUpdater + def initialize(feature:, requirement:, version:, manifest:, repo_contents_path:, credentials:) + @feature = feature + @requirement = requirement + @version = version + @manifest = manifest + @repo_contents_path = repo_contents_path + @credentials = credentials + end + + def update + SharedHelpers.in_a_temporary_repo_directory(base_dir, repo_contents_path) do + SharedHelpers.with_git_configured(credentials: credentials) do + update_manifests( + target_requirement: requirement, + target_version: version + ) + + [File.read(manifest_name), File.read(lockfile_name)].compact + end + end + end + + private + + def base_dir + File.dirname(manifest.path) + end + + def manifest_name + File.basename(manifest.path) + end + + def lockfile_name + Utils.expected_lockfile_name(manifest_name) + end + + def update_manifests(target_requirement:, target_version:) + # First force target version to upgrade lockfile. + run_devcontainer_upgrade(target_version) + + # Now replace specific version back with target requirement + force_target_requirement(manifest_name, from: target_version, to: target_requirement) + force_target_requirement(lockfile_name, from: target_version, to: target_requirement) + end + + def force_target_requirement(file_name, from:, to:) + File.write(file_name, File.read(file_name).gsub("#{feature}:#{from}", "#{feature}:#{to}")) + end + + def run_devcontainer_upgrade(target_version) + cmd = "devcontainer upgrade " \ + "--workspace-folder . " \ + "--feature #{feature} " \ + "--config #{manifest_name} " \ + "--target-version #{target_version}" + + Dependabot.logger.info("Running command: `#{cmd}`") + + SharedHelpers.run_shell_command(cmd, stderr_to_stdout: false) + end + + attr_reader :feature, :requirement, :version, :manifest, :repo_contents_path, :credentials + end + end + end +end diff --git a/devcontainers/lib/dependabot/devcontainers/metadata_finder.rb b/devcontainers/lib/dependabot/devcontainers/metadata_finder.rb new file mode 100644 index 00000000000..2cc2b4b21d0 --- /dev/null +++ b/devcontainers/lib/dependabot/devcontainers/metadata_finder.rb @@ -0,0 +1,21 @@ +# typed: true +# frozen_string_literal: true + +require "dependabot/metadata_finders" +require "dependabot/metadata_finders/base" + +module Dependabot + module Devcontainers + class MetadataFinder < Dependabot::MetadataFinders::Base + private + + def look_up_source + # TODO: Make upstream changes to dev container CLI to point to docs. + # Specifically, 'devcontainers features info' can be augmented to expose documentationUrl + nil + end + end + end +end + +Dependabot::MetadataFinders.register("devcontainers", Dependabot::Devcontainers::MetadataFinder) diff --git a/devcontainers/lib/dependabot/devcontainers/requirement.rb b/devcontainers/lib/dependabot/devcontainers/requirement.rb new file mode 100644 index 00000000000..9983d788cdc --- /dev/null +++ b/devcontainers/lib/dependabot/devcontainers/requirement.rb @@ -0,0 +1,35 @@ +# typed: true +# frozen_string_literal: true + +require "sorbet-runtime" + +require "dependabot/requirement" +require "dependabot/utils" + +module Dependabot + module Devcontainers + class Requirement < Dependabot::Requirement + extend T::Sig + + # For consistency with other languages, we define a requirements array. + # Devcontainers don't have an `OR` separator for requirements, so it + # always contains a single element. + sig { override.params(requirement_string: T.nilable(String)).returns(T::Array[Requirement]) } + def self.requirements_array(requirement_string) + [new(requirement_string)] + end + + # Patches Gem::Requirement to make it accept requirement strings like + # "~> 4.2.5, >= 4.2.5.1" without first needing to split them. + def initialize(*requirements) + requirements = requirements.flatten.flat_map do |req_string| + req_string.split(",").map(&:strip) + end + + super(requirements) + end + end + end +end + +Dependabot::Utils.register_requirement_class("devcontainers", Dependabot::Devcontainers::Requirement) diff --git a/devcontainers/lib/dependabot/devcontainers/update_checker.rb b/devcontainers/lib/dependabot/devcontainers/update_checker.rb new file mode 100644 index 00000000000..08a1da621ef --- /dev/null +++ b/devcontainers/lib/dependabot/devcontainers/update_checker.rb @@ -0,0 +1,115 @@ +# typed: true +# frozen_string_literal: true + +require "dependabot/update_checkers" +require "dependabot/update_checkers/base" +require "dependabot/devcontainers/version" +require "dependabot/update_checkers/version_filters" +require "dependabot/devcontainers/requirement" + +module Dependabot + module Devcontainers + class UpdateChecker < Dependabot::UpdateCheckers::Base + def latest_version + @latest_version ||= fetch_latest_version + end + + def latest_resolvable_version + latest_version # TODO + end + + def updated_requirements + dependency.requirements.map do |requirement| + required_version = version_class.new(requirement[:requirement]) + updated_requirement = remove_precision_changes(viable_candidates, required_version).last + + { + file: requirement[:file], + requirement: updated_requirement, + groups: requirement[:groups], + source: requirement[:source] + } + end + end + + def latest_resolvable_version_with_no_unlock + raise NotImplementedError + end + + private + + def viable_candidates + @viable_candidates ||= fetch_viable_candidates + end + + def fetch_viable_candidates + candidates = comparable_versions_from_registry + candidates = filter_ignored(candidates) + candidates.sort + end + + def fetch_latest_version + return current_version unless viable_candidates.any? + + viable_candidates.last + end + + def remove_precision_changes(versions, required_version) + versions.select do |version| + version.same_precision?(required_version) + end + end + + def filter_ignored(versions) + filtered = + versions.reject do |version| + ignore_requirements.any? { |r| version.satisfies?(r) } + end + + if @raise_on_ignored && + filter_lower_versions(filtered).empty? && + filter_lower_versions(versions).any? + raise AllVersionsIgnored + end + + filtered + end + + def comparable_versions_from_registry + tags_from_registry.filter_map do |tag| + version_class.correct?(tag) && version_class.new(tag) + end + end + + def tags_from_registry + @tags_from_registry ||= fetch_tags_from_registry + end + + def fetch_tags_from_registry + cmd = "devcontainer features info tags #{dependency.name} --output-format json" + + Dependabot.logger.info("Running command: `#{cmd}`") + + output = SharedHelpers.run_shell_command(cmd, stderr_to_stdout: false) + + JSON.parse(output).fetch("publishedTags") + end + + def filter_lower_versions(versions) + versions.select do |version| + version > current_version + end + end + + def latest_version_resolvable_with_full_unlock? + false # TODO + end + + def updated_dependencies_after_full_unlock + raise NotImplementedError + end + end + end +end + +Dependabot::UpdateCheckers.register("devcontainers", Dependabot::Devcontainers::UpdateChecker) diff --git a/devcontainers/lib/dependabot/devcontainers/utils.rb b/devcontainers/lib/dependabot/devcontainers/utils.rb new file mode 100644 index 00000000000..d0b5e6a2138 --- /dev/null +++ b/devcontainers/lib/dependabot/devcontainers/utils.rb @@ -0,0 +1,24 @@ +# typed: true +# frozen_string_literal: true + +module Dependabot + module Devcontainers + module Utils + def self.expected_config_basename(directory) + root_directory?(directory) ? ".devcontainer.json" : "devcontainer.json" + end + + def self.root_directory?(directory) + Pathname.new(directory).cleanpath.to_path == Pathname.new(".").cleanpath.to_path + end + + def self.expected_lockfile_name(config_file_name) + if config_file_name.start_with?(".") + ".devcontainer-lock.json" + else + "devcontainer-lock.json" + end + end + end + end +end diff --git a/devcontainers/lib/dependabot/devcontainers/version.rb b/devcontainers/lib/dependabot/devcontainers/version.rb new file mode 100644 index 00000000000..7077ef5bc46 --- /dev/null +++ b/devcontainers/lib/dependabot/devcontainers/version.rb @@ -0,0 +1,35 @@ +# typed: true +# frozen_string_literal: true + +require "dependabot/version" +require "dependabot/utils" + +module Dependabot + module Devcontainers + class Version < Dependabot::Version + def same_precision?(other) + precision == other.precision + end + + def satisfies?(requirement) + requirement.satisfied_by?(self) + end + + def <=>(other) + if self == other + precision <=> other.precision + else + super + end + end + + protected + + def precision + segments.size + end + end + end +end + +Dependabot::Utils.register_version_class("devcontainers", Dependabot::Devcontainers::Version) diff --git a/devcontainers/script/ci-test b/devcontainers/script/ci-test new file mode 100755 index 00000000000..654f259cd2a --- /dev/null +++ b/devcontainers/script/ci-test @@ -0,0 +1,6 @@ +#!/bin/bash + +set -e + +bundle install +bundle exec turbo_tests --verbose diff --git a/devcontainers/spec/dependabot/devcontainers/file_fetcher_spec.rb b/devcontainers/spec/dependabot/devcontainers/file_fetcher_spec.rb new file mode 100644 index 00000000000..e0ffc278958 --- /dev/null +++ b/devcontainers/spec/dependabot/devcontainers/file_fetcher_spec.rb @@ -0,0 +1,77 @@ +# typed: false +# frozen_string_literal: true + +require "spec_helper" +require "dependabot/devcontainers/file_fetcher" +require_common_spec "file_fetchers/shared_examples_for_file_fetchers" + +RSpec.describe Dependabot::Devcontainers::FileFetcher do + it_behaves_like "a dependency file fetcher" + + let(:source) do + Dependabot::Source.new( + provider: "github", + repo: "mona/devcontainers-example", + directory: directory + ) + end + + let(:file_fetcher_instance) do + described_class.new(source: source, credentials: [], repo_contents_path: repo_contents_path) + end + + let(:repo_contents_path) { build_tmp_repo(project_name) } + + context "with a lone .devcontainer.json in repo root" do + let(:project_name) { "config_in_root" } + let(:directory) { "/" } + + it "fetches the correct files" do + expect(file_fetcher_instance.files.map(&:name)) + .to match_array(%w(.devcontainer.json)) + end + end + + context "with a .devcontainer folder" do + let(:project_name) { "config_in_dot_devcontainer_folder" } + let(:directory) { "/" } + + it "fetches the correct files" do + expect(file_fetcher_instance.files.map(&:name)) + .to match_array(%w(.devcontainer/devcontainer.json)) + end + end + + context "with repo that has multiple, valid dev container configs" do + let(:project_name) { "multiple_configs" } + let(:directory) { "/" } + it "fetches the correct files" do + expect(file_fetcher_instance.files.map(&:name)) + .to match_array(%w(.devcontainer.json .devcontainer/devcontainer.json)) + end + end + + context "with devcontainer.json files inside custom directories inside .devcontainer folder" do + let(:project_name) { "custom_configs" } + let(:directory) { "/" } + + it "fetches the correct files" do + expect(file_fetcher_instance.files.map(&:name)) + .to match_array(%w(.devcontainer/foo/devcontainer.json .devcontainer/bar/devcontainer.json)) + end + end + + context "with a directory that doesn't exist" do + let(:project_name) { "multiple_configs" } + let(:directory) { "/.devcontainer/nonexistent" } + + it "raises a helpful error" do + expect { file_fetcher_instance.files } + .to raise_error(Dependabot::DependencyFileNotFound) + .with_message( + "Neither .devcontainer.json nor .devcontainer/devcontainer.json nor " \ + ".devcontainer//devcontainer.json found in /.devcontainer/nonexistent" + ) + end + end +end diff --git a/devcontainers/spec/dependabot/devcontainers/file_parser_spec.rb b/devcontainers/spec/dependabot/devcontainers/file_parser_spec.rb new file mode 100644 index 00000000000..c5ab9204318 --- /dev/null +++ b/devcontainers/spec/dependabot/devcontainers/file_parser_spec.rb @@ -0,0 +1,224 @@ +# typed: false +# frozen_string_literal: true + +require "spec_helper" +require "dependabot/dependency_file" +require "dependabot/source" +require "dependabot/devcontainers/file_parser" +require "dependabot/devcontainers/requirement" +require_common_spec "file_parsers/shared_examples_for_file_parsers" + +RSpec.describe Dependabot::Devcontainers::FileParser do + it_behaves_like "a dependency file parser" + + let(:parser) do + described_class.new(dependency_files: files, source: source, repo_contents_path: repo_contents_path) + end + + let(:source) do + Dependabot::Source.new( + provider: "github", + repo: "mona/Example", + directory: directory + ) + end + + let(:files) do + project_dependency_files(project_name, directory: directory) + end + + let(:repo_contents_path) { build_tmp_repo(project_name, path: "projects") } + + let(:dependencies) { parser.parse } + + shared_examples_for "parse" do + it "parses dependencies fine" do + expect(dependencies.size).to eq(expectations.size) + + expectations.each do |expected| + version = expected[:version] + name = expected[:name] + requirements = expected[:requirements] + metadata = expected[:metadata] + + dependency = dependencies.find { |dep| dep.name == name } + expect(dependency).to have_attributes( + name: name, + version: version, + requirements: requirements, + metadata: metadata + ) + end + end + end + + context "with a .devcontainer.json in repo root" do + let(:project_name) { "config_in_root" } + let(:directory) { "/" } + + let(:expectations) do + [ + { + name: "ghcr.io/codspace/versioning/foo", + version: "1.1.0", + requirements: [ + { + requirement: "1", + file: ".devcontainer.json", + groups: ["feature"], + source: nil + } + ], + metadata: {} + }, + { + name: "ghcr.io/codspace/versioning/bar", + version: "1.0.0", + requirements: [ + { + requirement: "1", + file: ".devcontainer.json", + groups: ["feature"], + source: nil + } + ], + metadata: {} + } + ].freeze + end + + it_behaves_like "parse" + end + + context "with a devcontainer.json in a .devcontainer folder" do + let(:project_name) { "config_in_dot_devcontainer_folder" } + let(:directory) { "/" } + + let(:expectations) do + [ + { + name: "ghcr.io/codspace/versioning/foo", + version: "1.1.0", + requirements: [ + { + requirement: "1", + file: ".devcontainer/devcontainer.json", + groups: ["feature"], + source: nil + } + ], + metadata: {} + }, + { + name: "ghcr.io/codspace/versioning/bar", + version: "1.0.0", + requirements: [ + { + requirement: "1", + file: ".devcontainer/devcontainer.json", + groups: ["feature"], + source: nil + } + ], + metadata: {} + }, + { + name: "ghcr.io/codspace/versioning/baz", + version: "1.0.0", + requirements: [ + { + requirement: "1.0", + file: ".devcontainer/devcontainer.json", + groups: ["feature"], + source: nil + } + ], + metadata: {} + } + ].freeze + end + + it_behaves_like "parse" + end + + context "with multiple, valid devcontainer.json config files in repo" do + let(:project_name) { "multiple_configs" } + let(:directory) { "/" } + + let(:expectations) do + [ + { + name: "ghcr.io/codspace/versioning/foo", + version: "1.1.0", + requirements: [ + { + requirement: "1", + file: ".devcontainer/devcontainer.json", + groups: ["feature"], + source: nil + }, + { + requirement: "1", + file: ".devcontainer.json", + groups: ["feature"], + source: nil + } + ], + metadata: {} + }, + { + name: "ghcr.io/codspace/versioning/bar", + version: "1.0.0", + requirements: [ + { + requirement: "1", + file: ".devcontainer/devcontainer.json", + groups: ["feature"], + source: nil + }, + { + requirement: "1", + file: ".devcontainer.json", + groups: ["feature"], + source: nil + } + ], + metadata: {} + }, + { + name: "ghcr.io/codspace/versioning/baz", + version: "1.0.0", + requirements: [ + { + requirement: "1.0", + file: ".devcontainer/devcontainer.json", + groups: ["feature"], + source: nil + } + ], + metadata: {} + } + ].freeze + end + + it_behaves_like "parse" + end + + context "with SHA-pinned features" do + let(:project_name) { "sha_pinned" } + let(:directory) { "/" } + + it "ignores them" do + expect(dependencies).to be_empty + end + end + + context "with deprecated features" do + let(:project_name) { "deprecated" } + let(:directory) { "/" } + + it "ignores them" do + expect(dependencies).to be_empty + end + end +end diff --git a/devcontainers/spec/dependabot/devcontainers/file_updater_spec.rb b/devcontainers/spec/dependabot/devcontainers/file_updater_spec.rb new file mode 100644 index 00000000000..30ae8d87d29 --- /dev/null +++ b/devcontainers/spec/dependabot/devcontainers/file_updater_spec.rb @@ -0,0 +1,226 @@ +# typed: false +# frozen_string_literal: true + +require "spec_helper" +require "dependabot/dependency" +require "dependabot/dependency_file" +require "dependabot/devcontainers/file_updater" +require "dependabot/devcontainers/requirement" +require_common_spec "file_updaters/shared_examples_for_file_updaters" + +RSpec.describe Dependabot::Devcontainers::FileUpdater do + it_behaves_like "a dependency file updater" + + subject(:updater) do + described_class.new( + dependency_files: files, + dependencies: dependencies, + credentials: credentials, + repo_contents_path: repo_contents_path + ) + end + + let(:repo_contents_path) { build_tmp_repo(project_name) } + + let(:files) { project_dependency_files(project_name, directory: directory) } + let(:directory) { "/" } + + let(:credentials) do + [{ "type" => "git_source", "host" => "github.com", "username" => "x-access-token", "password" => "token" }] + end + + describe "#updated_dependency_files" do + subject { updater.updated_dependency_files } + + let(:dependencies) do + [ + Dependabot::Dependency.new( + name: "ghcr.io/codspace/versioning/foo", + version: "2.11.1", + previous_version: "1.1.0", + requirements: [{ + requirement: "2", + groups: ["feature"], + file: ".devcontainer.json", + source: nil + }], + previous_requirements: [{ + requirement: "1", + groups: ["feature"], + file: ".devcontainer.json", + source: nil + }], + package_manager: "devcontainers" + ) + ] + end + + context "when there's only a devcontainer.json file" do + let(:project_name) { "config_in_root" } + + it "updates the version in .devcontainer.json" do + expect(subject.size).to eq(1) + + config = subject.first + expect(config.name).to eq(".devcontainer.json") + expect(config.content).to include("ghcr.io/codspace/versioning/foo:2\"") + end + end + + context "when there's both manifest and lockfile" do + let(:project_name) { "manifest_and_lockfile" } + + it "updates the version in both files" do + expect(subject.size).to eq(2) + + config = subject.find { |f| f.name == ".devcontainer.json" } + expect(config.content).to include("ghcr.io/codspace/versioning/foo:2\"") + + lockfile = subject.find { |f| f.name == ".devcontainer-lock.json" } + expect(lockfile.content).to include('"version": "2.11.1"') + end + end + + context "when there are multiple manifests, but only one needs updates" do + let(:project_name) { "multiple_configs" } + + let(:dependencies) do + [ + Dependabot::Dependency.new( + name: "ghcr.io/codspace/versioning/baz", + version: "2.0.0", + previous_version: "1.1.0", + requirements: [{ + requirement: "2.0", + groups: ["feature"], + file: ".devcontainer/devcontainer.json", + source: nil + }], + previous_requirements: [{ + requirement: "1.0", + groups: ["feature"], + file: ".devcontainer/devcontainer.json", + source: nil + }], + package_manager: "devcontainers" + ) + ] + end + + it "updates the version in both manifests" do + expect(subject.size).to eq(1) + + config = subject.first + expect(config.name).to eq(".devcontainer/devcontainer.json") + expect(config.content).to include("ghcr.io/codspace/versioning/baz:2.0\"") + end + end + + context "when there's both manifest and lockfile, but only the lockfile needs updates" do + let(:project_name) { "updated_manifest_outdated_lockfile" } + + let(:dependencies) do + [ + Dependabot::Dependency.new( + name: "ghcr.io/codspace/versioning/foo", + version: "2.11.1", + previous_version: "2.11.0", + requirements: [{ + requirement: "2", + groups: ["feature"], + file: ".devcontainer.json", + source: nil + }], + previous_requirements: [{ + requirement: "2", + groups: ["feature"], + file: ".devcontainer.json", + source: nil + }], + package_manager: "devcontainers" + ) + ] + end + + it "updates the version in lockfile" do + expect(subject.size).to eq(1) + + lockfile = subject.first + expect(lockfile.name).to eq(".devcontainer-lock.json") + expect(lockfile.content).to include('"version": "2.11.1"') + end + end + + context "when a custom directory is configured" do + let(:directory) { "src/go" } + let(:project_name) { "multiple_roots" } + + let(:dependencies) do + [ + Dependabot::Dependency.new( + name: "ghcr.io/devcontainers/features/common-utils", + version: "2.4.0", + previous_version: "2.3.2", + requirements: [{ + requirement: "2", + groups: ["feature"], + file: ".devcontainer/devcontainer.json", + source: nil + }], + previous_requirements: [{ + requirement: "2", + groups: ["feature"], + file: ".devcontainer/devcontainer.json", + source: nil + }], + package_manager: "devcontainers" + ) + ] + end + + it "updates the version in lockfile" do + expect(subject.size).to eq(1) + + config = subject.first + expect(config.name).to eq(".devcontainer/devcontainer-lock.json") + expect(config.content).to include("ghcr.io/devcontainers/features/common-utils:2") + expect(config.content).to include('"version": "2.4.0"') + end + end + + context "when target version is not the latest" do + let(:dependencies) do + [ + Dependabot::Dependency.new( + name: "ghcr.io/codspace/versioning/foo", + version: "2.10.0", + previous_version: "1.1.0", + requirements: [{ + requirement: "2", + groups: ["feature"], + file: ".devcontainer.json", + source: nil + }], + previous_requirements: [{ + requirement: "2", + groups: ["feature"], + file: ".devcontainer.json", + source: nil + }], + package_manager: "devcontainers" + ) + ] + end + + let(:project_name) { "updated_manifest_outdated_lockfile" } + + it "does not go past the target version in the lockfile" do + expect(subject.size).to eq(1) + + lockfile = subject.first + expect(lockfile.name).to eq(".devcontainer-lock.json") + expect(lockfile.content).to include('"version": "2.10.0"') + end + end + end +end diff --git a/devcontainers/spec/dependabot/devcontainers/update_checker_spec.rb b/devcontainers/spec/dependabot/devcontainers/update_checker_spec.rb new file mode 100644 index 00000000000..bf5b5d56be6 --- /dev/null +++ b/devcontainers/spec/dependabot/devcontainers/update_checker_spec.rb @@ -0,0 +1,122 @@ +# typed: false +# frozen_string_literal: true + +require "spec_helper" +require "dependabot/dependency" +require "dependabot/devcontainers/file_parser" +require "dependabot/devcontainers/update_checker" +require_common_spec "update_checkers/shared_examples_for_update_checkers" + +RSpec.describe Dependabot::Devcontainers::UpdateChecker do + it_behaves_like "an update checker" + + let(:checker) do + described_class.new( + dependency: dependency, + dependency_files: dependency_files, + repo_contents_path: repo_contents_path, + credentials: github_credentials, + security_advisories: security_advisories, + ignored_versions: ignored_versions, + raise_on_ignored: raise_on_ignored + ) + end + + let(:repo_contents_path) { build_tmp_repo(project_name, path: "projects") } + let(:dependency_files) { project_dependency_files(project_name, directory: directory) } + let(:security_advisories) { [] } + let(:ignored_versions) { [] } + let(:raise_on_ignored) { false } + + let(:dependencies) do + file_parser.parse + end + + let(:file_parser) do + Dependabot::Devcontainers::FileParser.new( + dependency_files: dependency_files, + repo_contents_path: repo_contents_path, + source: nil + ) + end + + let(:dependency) { dependencies.find { |dep| dep.name == name } } + + shared_context "in root" do + let(:project_name) { "config_in_root" } + let(:directory) { "/" } + end + + describe "#up_to_date?" do + subject { checker.up_to_date? } + + context "when feature is out-of-date" do + let(:name) { "ghcr.io/codspace/versioning/foo" } + + context "and config in root" do + include_context "in root" + + it { is_expected.to be_falsey } + end + + context "and config in .devcontainer folder " do + let(:project_name) { "config_in_dot_devcontainer_folder" } + let(:directory) { "/.devcontainer" } + + it { is_expected.to be_falsey } + end + end + + context "when feature is already up-to-date" do + let(:name) { "ghcr.io/codspace/versioning/bar" } + + context "and config in root" do + include_context "in root" + + it { is_expected.to be_truthy } + end + + context "and config in .devcontainer folder " do + let(:project_name) { "config_in_dot_devcontainer_folder" } + let(:directory) { "/.devcontainer" } + + it { is_expected.to be_truthy } + end + end + end + + describe "#latest_version" do + subject { checker.latest_version.to_s } + + let(:name) { "ghcr.io/codspace/versioning/foo" } + let(:current_version) { "1.1.0" } + + include_context "in root" + + context "when all later versions are being ignored" do + let(:ignored_versions) { ["> #{current_version}"] } + + it { is_expected.to eq(current_version) } + + context "raise_on_ignored" do + let(:raise_on_ignored) { true } + + it "raises an error" do + expect { subject }.to raise_error(Dependabot::AllVersionsIgnored) + end + end + end + + context "when some later versions are not ignored" do + let(:ignored_versions) { [">= 2.1.0"] } + + it { is_expected.to eq("2.0.0") } + + context "raise_on_ignored" do + let(:raise_on_ignored) { true } + + it { is_expected.to eq("2.0.0") } + end + end + end +end diff --git a/devcontainers/spec/dependabot/devcontainers_spec.rb b/devcontainers/spec/dependabot/devcontainers_spec.rb new file mode 100644 index 00000000000..702bd4bb34a --- /dev/null +++ b/devcontainers/spec/dependabot/devcontainers_spec.rb @@ -0,0 +1,10 @@ +# typed: false +# frozen_string_literal: true + +require "spec_helper" +require "dependabot/devcontainers" +require_common_spec "shared_examples_for_autoloading" + +RSpec.describe Dependabot::Devcontainers do + it_behaves_like "it registers the required classes", "devcontainers" +end diff --git a/devcontainers/spec/fixtures/projects/config_in_dot_devcontainer_folder/.devcontainer/devcontainer.json b/devcontainers/spec/fixtures/projects/config_in_dot_devcontainer_folder/.devcontainer/devcontainer.json new file mode 100644 index 00000000000..a29477024e7 --- /dev/null +++ b/devcontainers/spec/fixtures/projects/config_in_dot_devcontainer_folder/.devcontainer/devcontainer.json @@ -0,0 +1,8 @@ +{ + "image": "mcr.microsoft.com/devcontainers/typescript-node:18", + "features": { + "ghcr.io/codspace/versioning/foo:1": {}, + "ghcr.io/codspace/versioning/bar:1": {}, + "ghcr.io/codspace/versioning/baz:1.0": {} + } +} \ No newline at end of file diff --git a/devcontainers/spec/fixtures/projects/config_in_root/.devcontainer.json b/devcontainers/spec/fixtures/projects/config_in_root/.devcontainer.json new file mode 100644 index 00000000000..79b80211423 --- /dev/null +++ b/devcontainers/spec/fixtures/projects/config_in_root/.devcontainer.json @@ -0,0 +1,7 @@ +{ + "image": "mcr.microsoft.com/devcontainers/typescript-node:18", + "features": { + "ghcr.io/codspace/versioning/foo:1": {}, + "ghcr.io/codspace/versioning/bar:1": {} + } +} \ No newline at end of file diff --git a/devcontainers/spec/fixtures/projects/custom_configs/.devcontainer/bar/devcontainer.json b/devcontainers/spec/fixtures/projects/custom_configs/.devcontainer/bar/devcontainer.json new file mode 100644 index 00000000000..433688a79d5 --- /dev/null +++ b/devcontainers/spec/fixtures/projects/custom_configs/.devcontainer/bar/devcontainer.json @@ -0,0 +1,6 @@ +{ + "image": "mcr.microsoft.com/devcontainers/typescript-node:18", + "features": { + "ghcr.io/codspace/versioning/bar:1": {} + } +} diff --git a/devcontainers/spec/fixtures/projects/custom_configs/.devcontainer/foo/devcontainer.json b/devcontainers/spec/fixtures/projects/custom_configs/.devcontainer/foo/devcontainer.json new file mode 100644 index 00000000000..8b20a0fc1c3 --- /dev/null +++ b/devcontainers/spec/fixtures/projects/custom_configs/.devcontainer/foo/devcontainer.json @@ -0,0 +1,6 @@ +{ + "image": "mcr.microsoft.com/devcontainers/typescript-node:18", + "features": { + "ghcr.io/codspace/versioning/foo:1": {} + } +} diff --git a/devcontainers/spec/fixtures/projects/deprecated/.devcontainer.json b/devcontainers/spec/fixtures/projects/deprecated/.devcontainer.json new file mode 100644 index 00000000000..4b6ebbb52be --- /dev/null +++ b/devcontainers/spec/fixtures/projects/deprecated/.devcontainer.json @@ -0,0 +1,6 @@ +{ + "name": "docs.github.com", + "features": { + "sshd": "latest" + } +} diff --git a/devcontainers/spec/fixtures/projects/manifest_and_lockfile/.devcontainer-lock.json b/devcontainers/spec/fixtures/projects/manifest_and_lockfile/.devcontainer-lock.json new file mode 100644 index 00000000000..f7dd4b4e749 --- /dev/null +++ b/devcontainers/spec/fixtures/projects/manifest_and_lockfile/.devcontainer-lock.json @@ -0,0 +1,14 @@ +{ + "features": { + "ghcr.io/codspace/versioning/bar:1": { + "version": "1.0.0", + "resolved": "ghcr.io/codspace/versioning/bar@sha256:0eb80a7a45ea6ac6d2057798608be4cacb3d3667d4818118e17acc5037d687d4", + "integrity": "sha256:0eb80a7a45ea6ac6d2057798608be4cacb3d3667d4818118e17acc5037d687d4" + }, + "ghcr.io/codspace/versioning/foo:1": { + "version": "1.1.0", + "resolved": "ghcr.io/codspace/versioning/foo@sha256:80d2d7b58afeaf907451c6f4e24de47b09a327a24a21a2d3323b7abf76d14be5", + "integrity": "sha256:80d2d7b58afeaf907451c6f4e24de47b09a327a24a21a2d3323b7abf76d14be5" + } + } +} \ No newline at end of file diff --git a/devcontainers/spec/fixtures/projects/manifest_and_lockfile/.devcontainer.json b/devcontainers/spec/fixtures/projects/manifest_and_lockfile/.devcontainer.json new file mode 100644 index 00000000000..79b80211423 --- /dev/null +++ b/devcontainers/spec/fixtures/projects/manifest_and_lockfile/.devcontainer.json @@ -0,0 +1,7 @@ +{ + "image": "mcr.microsoft.com/devcontainers/typescript-node:18", + "features": { + "ghcr.io/codspace/versioning/foo:1": {}, + "ghcr.io/codspace/versioning/bar:1": {} + } +} \ No newline at end of file diff --git a/devcontainers/spec/fixtures/projects/multiple_configs/.devcontainer.json b/devcontainers/spec/fixtures/projects/multiple_configs/.devcontainer.json new file mode 100644 index 00000000000..79b80211423 --- /dev/null +++ b/devcontainers/spec/fixtures/projects/multiple_configs/.devcontainer.json @@ -0,0 +1,7 @@ +{ + "image": "mcr.microsoft.com/devcontainers/typescript-node:18", + "features": { + "ghcr.io/codspace/versioning/foo:1": {}, + "ghcr.io/codspace/versioning/bar:1": {} + } +} \ No newline at end of file diff --git a/devcontainers/spec/fixtures/projects/multiple_configs/.devcontainer/devcontainer.json b/devcontainers/spec/fixtures/projects/multiple_configs/.devcontainer/devcontainer.json new file mode 100644 index 00000000000..a29477024e7 --- /dev/null +++ b/devcontainers/spec/fixtures/projects/multiple_configs/.devcontainer/devcontainer.json @@ -0,0 +1,8 @@ +{ + "image": "mcr.microsoft.com/devcontainers/typescript-node:18", + "features": { + "ghcr.io/codspace/versioning/foo:1": {}, + "ghcr.io/codspace/versioning/bar:1": {}, + "ghcr.io/codspace/versioning/baz:1.0": {} + } +} \ No newline at end of file diff --git a/devcontainers/spec/fixtures/projects/multiple_roots/.devcontainer/devcontainer.json b/devcontainers/spec/fixtures/projects/multiple_roots/.devcontainer/devcontainer.json new file mode 100644 index 00000000000..ff4d459b63d --- /dev/null +++ b/devcontainers/spec/fixtures/projects/multiple_roots/.devcontainer/devcontainer.json @@ -0,0 +1,7 @@ +{ + "image": "mcr.microsoft.com/devcontainers/javascript-node:0-18", + "features": { + "ghcr.io/devcontainers/features/docker-in-docker:2": {}, + "ghcr.io/devcontainers/features/azure-cli:1": {} + } +} diff --git a/devcontainers/spec/fixtures/projects/multiple_roots/src/go/.devcontainer/devcontainer-lock.json b/devcontainers/spec/fixtures/projects/multiple_roots/src/go/.devcontainer/devcontainer-lock.json new file mode 100644 index 00000000000..fc241c2fc2a --- /dev/null +++ b/devcontainers/spec/fixtures/projects/multiple_roots/src/go/.devcontainer/devcontainer-lock.json @@ -0,0 +1,9 @@ +{ + "features": { + "ghcr.io/devcontainers/features/common-utils:2": { + "version": "2.4.0", + "resolved": "ghcr.io/devcontainers/features/common-utils@sha256:cd9c4413255c3b71fb716e63ee2df245c81c7262b858cf77406a68c80d09f12e", + "integrity": "sha256:cd9c4413255c3b71fb716e63ee2df245c81c7262b858cf77406a68c80d09f12e" + } + } +} diff --git a/devcontainers/spec/fixtures/projects/multiple_roots/src/go/.devcontainer/devcontainer.json b/devcontainers/spec/fixtures/projects/multiple_roots/src/go/.devcontainer/devcontainer.json new file mode 100644 index 00000000000..619cffd1db3 --- /dev/null +++ b/devcontainers/spec/fixtures/projects/multiple_roots/src/go/.devcontainer/devcontainer.json @@ -0,0 +1,15 @@ +{ + "build": { + "dockerfile": "./Dockerfile", + "context": "." + }, + "features": { + "ghcr.io/devcontainers/features/common-utils:2": { + "installZsh": "true", + "username": "vscode", + "userUid": "1000", + "userGid": "1000", + "upgradePackages": "true" + } + } +} diff --git a/devcontainers/spec/fixtures/projects/sha_pinned/.devcontainer.json b/devcontainers/spec/fixtures/projects/sha_pinned/.devcontainer.json new file mode 100644 index 00000000000..859f5fd69c6 --- /dev/null +++ b/devcontainers/spec/fixtures/projects/sha_pinned/.devcontainer.json @@ -0,0 +1,6 @@ +{ + "image": "mcr.microsoft.com/devcontainers/base:jammy", + "features": { + "ghcr.io/devcontainers/features/aws-cli@sha256:4b67518ec3733df53110c3caf7b9d6007363d1b5aaae2f1fa27f18ad0cc9b2b9": {}, + } +} diff --git a/devcontainers/spec/fixtures/projects/updated_manifest_outdated_lockfile/.devcontainer-lock.json b/devcontainers/spec/fixtures/projects/updated_manifest_outdated_lockfile/.devcontainer-lock.json new file mode 100644 index 00000000000..0520cfd43bc --- /dev/null +++ b/devcontainers/spec/fixtures/projects/updated_manifest_outdated_lockfile/.devcontainer-lock.json @@ -0,0 +1,14 @@ +{ + "features": { + "ghcr.io/codspace/versioning/bar:1": { + "version": "1.0.0", + "resolved": "ghcr.io/codspace/versioning/bar@sha256:0eb80a7a45ea6ac6d2057798608be4cacb3d3667d4818118e17acc5037d687d4", + "integrity": "sha256:0eb80a7a45ea6ac6d2057798608be4cacb3d3667d4818118e17acc5037d687d4" + }, + "ghcr.io/codspace/versioning/foo:2": { + "version": "2.11.0", + "resolved": "ghcr.io/codspace/versioning/foo@sha256:9b5b5f165f7bff54d1b70d7228d63cb8d8a6b9f20fee6db772b520c3391beaa2", + "integrity": "sha256:9b5b5f165f7bff54d1b70d7228d63cb8d8a6b9f20fee6db772b520c3391beaa2" + } + } +} \ No newline at end of file diff --git a/devcontainers/spec/fixtures/projects/updated_manifest_outdated_lockfile/.devcontainer.json b/devcontainers/spec/fixtures/projects/updated_manifest_outdated_lockfile/.devcontainer.json new file mode 100644 index 00000000000..22b38fb4335 --- /dev/null +++ b/devcontainers/spec/fixtures/projects/updated_manifest_outdated_lockfile/.devcontainer.json @@ -0,0 +1,7 @@ +{ + "image": "mcr.microsoft.com/devcontainers/typescript-node:18", + "features": { + "ghcr.io/codspace/versioning/foo:2": {}, + "ghcr.io/codspace/versioning/bar:1": {} + } +} diff --git a/devcontainers/spec/spec_helper.rb b/devcontainers/spec/spec_helper.rb new file mode 100644 index 00000000000..50d7c79d638 --- /dev/null +++ b/devcontainers/spec/spec_helper.rb @@ -0,0 +1,12 @@ +# typed: true +# frozen_string_literal: true + +def common_dir + @common_dir ||= Gem::Specification.find_by_name("dependabot-common").gem_dir +end + +def require_common_spec(path) + require "#{common_dir}/spec/dependabot/#{path}" +end + +require "#{common_dir}/spec/spec_helper.rb" diff --git a/docker/lib/dependabot/docker/file_fetcher.rb b/docker/lib/dependabot/docker/file_fetcher.rb index 79aaf768c49..d5e6c7d33ec 100644 --- a/docker/lib/dependabot/docker/file_fetcher.rb +++ b/docker/lib/dependabot/docker/file_fetcher.rb @@ -12,7 +12,7 @@ class FileFetcher < Dependabot::FileFetchers::Base extend T::Sig extend T::Helpers - YAML_REGEXP = /^[^\.]+\.ya?ml$/i + YAML_REGEXP = /^[^\.].*\.ya?ml$/i DOCKER_REGEXP = /dockerfile/i def self.required_files_in?(filenames) diff --git a/docker/spec/dependabot/docker/file_fetcher_spec.rb b/docker/spec/dependabot/docker/file_fetcher_spec.rb index d82296ab08e..4ecb08183a0 100644 --- a/docker/spec/dependabot/docker/file_fetcher_spec.rb +++ b/docker/spec/dependabot/docker/file_fetcher_spec.rb @@ -272,6 +272,8 @@ context "with a Helm values file" do matching_filenames = [ + "other.values.yml", + "other.values.yaml", "other-values.yml", "other-values.yaml", "other_values.yml", diff --git a/docker/spec/fixtures/github/contents_helm_repo.json b/docker/spec/fixtures/github/contents_helm_repo.json index 6ac7b6f8b95..66424fdfb67 100644 --- a/docker/spec/fixtures/github/contents_helm_repo.json +++ b/docker/spec/fixtures/github/contents_helm_repo.json @@ -95,6 +95,38 @@ "html": "https://github.com/dependabot/dependabot-core/blob/main/CONTRIBUTING.md" } }, + { + "name": "other.values.yml", + "path": "other.values.yml", + "sha": "311f9743315183cc6751313cb251cfeb3de45c1a", + "size": 4927, + "url": "https://api.github.com/repos/dependabot/dependabot-core/contents/Dockerfile?ref=master", + "html_url": "https://github.com/dependabot/dependabot-core/blob/main/Dockerfile", + "git_url": "https://api.github.com/repos/dependabot/dependabot-core/git/blobs/311f9743315183cc6751313cb251cfeb3de45c1a", + "download_url": "https://raw.githubusercontent.com/dependabot/dependabot-core/master/Dockerfile", + "type": "file", + "_links": { + "self": "https://api.github.com/repos/dependabot/dependabot-core/contents/Dockerfile?ref=master", + "git": "https://api.github.com/repos/dependabot/dependabot-core/git/blobs/311f9743315183cc6751313cb251cfeb3de45c1a", + "html": "https://github.com/dependabot/dependabot-core/blob/main/Dockerfile" + } + }, + { + "name": "other.values.yaml", + "path": "other.values.yaml", + "sha": "311f9743315183cc6751313cb251cfeb3de45c1a", + "size": 4927, + "url": "https://api.github.com/repos/dependabot/dependabot-core/contents/Dockerfile?ref=master", + "html_url": "https://github.com/dependabot/dependabot-core/blob/main/Dockerfile", + "git_url": "https://api.github.com/repos/dependabot/dependabot-core/git/blobs/311f9743315183cc6751313cb251cfeb3de45c1a", + "download_url": "https://raw.githubusercontent.com/dependabot/dependabot-core/master/Dockerfile", + "type": "file", + "_links": { + "self": "https://api.github.com/repos/dependabot/dependabot-core/contents/Dockerfile?ref=master", + "git": "https://api.github.com/repos/dependabot/dependabot-core/git/blobs/311f9743315183cc6751313cb251cfeb3de45c1a", + "html": "https://github.com/dependabot/dependabot-core/blob/main/Dockerfile" + } + }, { "name": "other-values.yml", "path": "other-values.yml", diff --git a/github_actions/lib/dependabot/github_actions/file_parser.rb b/github_actions/lib/dependabot/github_actions/file_parser.rb index 2ee5d51285f..ded6d8af90a 100644 --- a/github_actions/lib/dependabot/github_actions/file_parser.rb +++ b/github_actions/lib/dependabot/github_actions/file_parser.rb @@ -1,4 +1,4 @@ -# typed: false +# typed: true # frozen_string_literal: true require "yaml" @@ -82,8 +82,8 @@ def workfile_file_dependencies(file) end def build_github_dependency(file, string) - unless source.hostname == "github.com" - dep = github_dependency(file, string, source.hostname) + unless source&.hostname == "github.com" + dep = github_dependency(file, string, T.must(source).hostname) git_checker = Dependabot::GitCommitChecker.new(dependency: dep, credentials: credentials) return dep if git_checker.git_repo_reachable? end diff --git a/nuget/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Utilities/MSBuildHelperTests.cs b/nuget/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Utilities/MSBuildHelperTests.cs index f36fad2ead2..6bd5d653597 100644 --- a/nuget/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Utilities/MSBuildHelperTests.cs +++ b/nuget/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Utilities/MSBuildHelperTests.cs @@ -171,6 +171,113 @@ public async Task AllPackageDependenciesCanBeTraversed() Assert.Equal(expectedDependencies, actualDependencies); } + [Fact] + public async Task AllPackageDependencies_DoNotTruncateLongDependencyLists() + { + using var temp = new TemporaryDirectory(); + var expectedDependencies = new Dependency[] + { + new("Castle.Core", "4.4.1", DependencyType.Unknown), + new("Microsoft.ApplicationInsights", "2.10.0", DependencyType.Unknown), + new("Microsoft.ApplicationInsights.Agent.Intercept", "2.4.0", DependencyType.Unknown), + new("Microsoft.ApplicationInsights.DependencyCollector", "2.10.0", DependencyType.Unknown), + new("Microsoft.ApplicationInsights.PerfCounterCollector", "2.10.0", DependencyType.Unknown), + new("Microsoft.ApplicationInsights.WindowsServer", "2.10.0", DependencyType.Unknown), + new("Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel", "2.10.0", DependencyType.Unknown), + new("Microsoft.AspNet.TelemetryCorrelation", "1.0.5", DependencyType.Unknown), + new("Microsoft.Bcl.AsyncInterfaces", "7.0.0", DependencyType.Unknown), + new("Microsoft.Extensions.Caching.Abstractions", "1.0.0", DependencyType.Unknown), + new("Microsoft.Extensions.Caching.Memory", "1.0.0", DependencyType.Unknown), + new("Microsoft.Extensions.DependencyInjection", "7.0.0", DependencyType.Unknown), + new("Microsoft.Extensions.DependencyInjection.Abstractions", "7.0.0", DependencyType.Unknown), + new("Microsoft.Extensions.DiagnosticAdapter", "1.1.0", DependencyType.Unknown), + new("Microsoft.Extensions.Http", "7.0.0", DependencyType.Unknown), + new("Microsoft.Extensions.Logging", "7.0.0", DependencyType.Unknown), + new("Microsoft.Extensions.Logging.Abstractions", "7.0.0", DependencyType.Unknown), + new("Microsoft.Extensions.Options", "7.0.0", DependencyType.Unknown), + new("Microsoft.Extensions.PlatformAbstractions", "1.1.0", DependencyType.Unknown), + new("Microsoft.Extensions.Primitives", "7.0.0", DependencyType.Unknown), + new("Moq", "4.16.1", DependencyType.Unknown), + new("MSTest.TestFramework", "2.1.0", DependencyType.Unknown), + new("Newtonsoft.Json", "12.0.1", DependencyType.Unknown), + new("System", "4.1.311.2", DependencyType.Unknown), + new("System.Buffers", "4.5.1", DependencyType.Unknown), + new("System.Collections.Concurrent", "4.3.0", DependencyType.Unknown), + new("System.Collections.Immutable", "1.3.0", DependencyType.Unknown), + new("System.Collections.NonGeneric", "4.3.0", DependencyType.Unknown), + new("System.Collections.Specialized", "4.3.0", DependencyType.Unknown), + new("System.ComponentModel", "4.3.0", DependencyType.Unknown), + new("System.ComponentModel.Annotations", "5.0.0", DependencyType.Unknown), + new("System.ComponentModel.Primitives", "4.3.0", DependencyType.Unknown), + new("System.ComponentModel.TypeConverter", "4.3.0", DependencyType.Unknown), + new("System.Core", "3.5.21022.801", DependencyType.Unknown), + new("System.Data.Common", "4.3.0", DependencyType.Unknown), + new("System.Diagnostics.DiagnosticSource", "7.0.0", DependencyType.Unknown), + new("System.Diagnostics.PerformanceCounter", "4.5.0", DependencyType.Unknown), + new("System.Diagnostics.StackTrace", "4.3.0", DependencyType.Unknown), + new("System.Dynamic.Runtime", "4.3.0", DependencyType.Unknown), + new("System.IO.FileSystem.Primitives", "4.3.0", DependencyType.Unknown), + new("System.Linq", "4.3.0", DependencyType.Unknown), + new("System.Linq.Expressions", "4.3.0", DependencyType.Unknown), + new("System.Memory", "4.5.5", DependencyType.Unknown), + new("System.Net.WebHeaderCollection", "4.3.0", DependencyType.Unknown), + new("System.Numerics.Vectors", "4.4.0", DependencyType.Unknown), + new("System.ObjectModel", "4.3.0", DependencyType.Unknown), + new("System.Private.DataContractSerialization", "4.3.0", DependencyType.Unknown), + new("System.Reflection.Emit", "4.3.0", DependencyType.Unknown), + new("System.Reflection.Emit.ILGeneration", "4.3.0", DependencyType.Unknown), + new("System.Reflection.Emit.Lightweight", "4.3.0", DependencyType.Unknown), + new("System.Reflection.Metadata", "1.4.1", DependencyType.Unknown), + new("System.Reflection.TypeExtensions", "4.3.0", DependencyType.Unknown), + new("System.Runtime.CompilerServices.Unsafe", "6.0.0", DependencyType.Unknown), + new("System.Runtime.InteropServices.RuntimeInformation", "4.3.0", DependencyType.Unknown), + new("System.Runtime.Numerics", "4.3.0", DependencyType.Unknown), + new("System.Runtime.Serialization.Json", "4.3.0", DependencyType.Unknown), + new("System.Runtime.Serialization.Primitives", "4.3.0", DependencyType.Unknown), + new("System.Security.Claims", "4.3.0", DependencyType.Unknown), + new("System.Security.Cryptography.OpenSsl", "4.3.0", DependencyType.Unknown), + new("System.Security.Cryptography.Primitives", "4.3.0", DependencyType.Unknown), + new("System.Security.Principal", "4.3.0", DependencyType.Unknown), + new("System.Text.RegularExpressions", "4.3.0", DependencyType.Unknown), + new("System.Threading", "4.3.0", DependencyType.Unknown), + new("System.Threading.Tasks.Extensions", "4.5.4", DependencyType.Unknown), + new("System.Threading.Thread", "4.3.0", DependencyType.Unknown), + new("System.Threading.ThreadPool", "4.3.0", DependencyType.Unknown), + new("System.Xml.ReaderWriter", "4.3.0", DependencyType.Unknown), + new("System.Xml.XDocument", "4.3.0", DependencyType.Unknown), + new("System.Xml.XmlDocument", "4.3.0", DependencyType.Unknown), + new("System.Xml.XmlSerializer", "4.3.0", DependencyType.Unknown), + new("Microsoft.ApplicationInsights.Web", "2.10.0", DependencyType.Unknown), + new("MSTest.TestAdapter", "2.1.0", DependencyType.Unknown), + new("NETStandard.Library", "2.0.3", DependencyType.Unknown), + }; + var packages = new[] { + new Dependency("System", "4.1.311.2", DependencyType.Unknown), + new Dependency("System.Core", "3.5.21022.801", DependencyType.Unknown), + new Dependency("Moq", "4.16.1", DependencyType.Unknown), + new Dependency("Castle.Core", "4.4.1", DependencyType.Unknown), + new Dependency("MSTest.TestAdapter", "2.1.0", DependencyType.Unknown), + new Dependency("MSTest.TestFramework", "2.1.0", DependencyType.Unknown), + new Dependency("Microsoft.ApplicationInsights", "2.10.0", DependencyType.Unknown), + new Dependency("Microsoft.ApplicationInsights.Agent.Intercept", "2.4.0", DependencyType.Unknown), + new Dependency("Microsoft.ApplicationInsights.DependencyCollector", "2.10.0", DependencyType.Unknown), + new Dependency("Microsoft.ApplicationInsights.PerfCounterCollector", "2.10.0", DependencyType.Unknown), + new Dependency("Microsoft.ApplicationInsights.Web", "2.10.0", DependencyType.Unknown), + new Dependency("Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel", "2.10.0", DependencyType.Unknown), + new Dependency("Microsoft.ApplicationInsights.WindowsServer", "2.10.0", DependencyType.Unknown), + new Dependency("Microsoft.Extensions.Http", "7.0.0", DependencyType.Unknown), + new Dependency("Newtonsoft.Json", "12.0.1", DependencyType.Unknown) + }; + var actualDependencies = await MSBuildHelper.GetAllPackageDependenciesAsync(temp.DirectoryPath, temp.DirectoryPath, "netstandard2.0", packages); + for(int i = 0; i < actualDependencies.Length; i++) + { + var ad = actualDependencies[i]; + var ed = expectedDependencies[i]; + Assert.Equal(ed, ad); + } + Assert.Equal(expectedDependencies, actualDependencies); + } + [Fact] public async Task AllPackageDependencies_DoNotIncludeUpdateOnlyPackages() { diff --git a/nuget/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Utilities/ProcessExtensions.cs b/nuget/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Utilities/ProcessExtensions.cs index 14c64065f58..39fccb0d334 100644 --- a/nuget/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Utilities/ProcessExtensions.cs +++ b/nuget/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Utilities/ProcessExtensions.cs @@ -1,6 +1,7 @@ using System; using System.Diagnostics; using System.Text; +using System.Threading; using System.Threading.Tasks; namespace NuGetUpdater.Core; @@ -11,6 +12,7 @@ public static class ProcessEx { var tcs = new TaskCompletionSource<(int, string, string)>(); + var redirectInitiated = new ManualResetEventSlim(); var process = new Process { StartInfo = @@ -37,8 +39,21 @@ public static class ProcessEx process.Exited += (sender, args) => { - tcs.TrySetResult((process.ExitCode, stdout.ToString(), stderr.ToString())); - process.Dispose(); + // It is necessary to wait until we have invoked 'BeginXReadLine' for our redirected IO. Then, + // we must call WaitForExit to make sure we've received all OutputDataReceived/ErrorDataReceived calls + // or else we'll be returning a list we're still modifying. For paranoia, we'll start a task here rather + // than enter right back into the Process type and start a wait which isn't guaranteed to be safe. + Task.Run(() => + { + redirectInitiated.Wait(); + redirectInitiated.Dispose(); + redirectInitiated = null; + + process.WaitForExit(); + + tcs.TrySetResult((process.ExitCode, stdout.ToString(), stderr.ToString())); + process.Dispose(); + }); }; #if DEBUG @@ -61,6 +76,8 @@ public static class ProcessEx process.BeginOutputReadLine(); process.BeginErrorReadLine(); + redirectInitiated.Set(); + return tcs.Task; } } diff --git a/nuget/lib/dependabot/nuget/file_parser.rb b/nuget/lib/dependabot/nuget/file_parser.rb index 4311ac0f36d..005825f113f 100644 --- a/nuget/lib/dependabot/nuget/file_parser.rb +++ b/nuget/lib/dependabot/nuget/file_parser.rb @@ -1,4 +1,4 @@ -# typed: false +# typed: true # frozen_string_literal: true require "nokogiri" @@ -85,7 +85,7 @@ def project_files def packages_config_files dependency_files.select do |f| - f.name.split("/").last.casecmp("packages.config").zero? + f.name.split("/").last&.casecmp("packages.config")&.zero? end end @@ -103,11 +103,11 @@ def nuget_configs end def global_json - dependency_files.find { |f| f.name.casecmp("global.json").zero? } + dependency_files.find { |f| f.name.casecmp("global.json")&.zero? } end def dotnet_tools_json - dependency_files.find { |f| f.name.casecmp(".config/dotnet-tools.json").zero? } + dependency_files.find { |f| f.name.casecmp(".config/dotnet-tools.json")&.zero? } end def check_required_files diff --git a/nuget/lib/dependabot/nuget/file_parser/project_file_parser.rb b/nuget/lib/dependabot/nuget/file_parser/project_file_parser.rb index 193c02c0023..3eefccc5589 100644 --- a/nuget/lib/dependabot/nuget/file_parser/project_file_parser.rb +++ b/nuget/lib/dependabot/nuget/file_parser/project_file_parser.rb @@ -293,47 +293,8 @@ def dependency_has_search_results?(dependency) end def dependency_url_has_matching_result?(dependency_name, dependency_url) - repository_type = dependency_url.fetch(:repository_type) - if repository_type == "v3" - dependency_url_has_matching_result_v3?(dependency_name, dependency_url) - elsif repository_type == "v2" - dependency_url_has_matching_result_v2?(dependency_name, dependency_url) - else - raise "Unknown repository type: #{repository_type}" - end - end - - def dependency_url_has_matching_result_v3?(dependency_name, dependency_url) - versions = NugetClient.get_package_versions_v3(dependency_name, dependency_url) - - versions != nil - end - - def dependency_url_has_matching_result_v2?(dependency_name, dependency_url) - url = dependency_url.fetch(:versions_url) - auth_header = dependency_url.fetch(:auth_header) - response = execute_search_for_dependency_url(url, auth_header) - return false unless response.status == 200 - - doc = Nokogiri::XML(response.body) - doc.remove_namespaces! - id_nodes = doc.xpath("/feed/entry/properties/Id") - found_matching_result = id_nodes.any? do |id_node| - return false unless id_node.text - - id_node.text.casecmp?(dependency_name) - end - found_matching_result - end - - def execute_search_for_dependency_url(url, auth_header) - cache = ProjectFileParser.dependency_url_search_cache - cache[url] ||= Dependabot::RegistryClient.get( - url: url, - headers: auth_header - ) - - cache[url] + versions = NugetClient.get_package_versions(dependency_name, dependency_url) + versions&.any? end def dependency_name(dependency_node, project_file) diff --git a/nuget/lib/dependabot/nuget/nuget_client.rb b/nuget/lib/dependabot/nuget/nuget_client.rb index f4971cecde3..49fc1db74f1 100644 --- a/nuget/lib/dependabot/nuget/nuget_client.rb +++ b/nuget/lib/dependabot/nuget/nuget_client.rb @@ -7,7 +7,18 @@ module Dependabot module Nuget class NugetClient - def self.get_package_versions_v3(dependency_name, repository_details) + def self.get_package_versions(dependency_name, repository_details) + repository_type = repository_details.fetch(:repository_type) + if repository_type == "v3" + get_package_versions_v3(dependency_name, repository_details) + elsif repository_type == "v2" + get_package_versions_v2(dependency_name, repository_details) + else + raise "Unknown repository type: #{repository_type}" + end + end + + private_class_method def self.get_package_versions_v3(dependency_name, repository_details) # Use the registration URL if possible because it is fast and correct if repository_details[:registration_url] get_versions_from_registration_v3(repository_details) @@ -20,14 +31,32 @@ def self.get_package_versions_v3(dependency_name, repository_details) end end + private_class_method def self.get_package_versions_v2(dependency_name, repository_details) + doc = execute_xml_nuget_request(repository_details.fetch(:versions_url), repository_details) + return unless doc + + id_nodes = doc.xpath("/feed/entry/properties/Id") + matching_versions = Set.new + id_nodes.each do |id_node| + return nil unless id_node.text + + next unless id_node.text.casecmp?(dependency_name) + + version_node = id_node.parent.xpath("Version") + matching_versions << version_node.text if version_node && version_node.text + end + + matching_versions + end + private_class_method def self.get_versions_from_versions_url_v3(repository_details) - body = execute_search_for_dependency_url(repository_details[:versions_url], repository_details) + body = execute_json_nuget_request(repository_details[:versions_url], repository_details) body&.fetch("versions") end private_class_method def self.get_versions_from_registration_v3(repository_details) url = repository_details[:registration_url] - body = execute_search_for_dependency_url(url, repository_details) + body = execute_json_nuget_request(url, repository_details) return unless body @@ -47,7 +76,7 @@ def self.get_package_versions_v3(dependency_name, repository_details) else # paged entries page_url = page["@id"] - page_body = execute_search_for_dependency_url(page_url, repository_details) + page_body = execute_json_nuget_request(page_url, repository_details) items = page_body.fetch("items") items.each do |item| catalog_entry = item.fetch("catalogEntry") @@ -61,7 +90,7 @@ def self.get_package_versions_v3(dependency_name, repository_details) private_class_method def self.get_versions_from_search_url_v3(repository_details, dependency_name) search_url = repository_details[:search_url] - body = execute_search_for_dependency_url(search_url, repository_details) + body = execute_json_nuget_request(search_url, repository_details) body&.fetch("data") &.find { |d| d.fetch("id").casecmp(dependency_name.downcase).zero? } @@ -69,21 +98,55 @@ def self.get_package_versions_v3(dependency_name, repository_details) &.map { |d| d.fetch("version") } end - private_class_method def self.execute_search_for_dependency_url(url, repository_details) - cache = CacheManager.cache("dependency_url_search_cache") - cache[url] ||= Dependabot::RegistryClient.get( + private_class_method def self.execute_xml_nuget_request(url, repository_details) + response = execute_nuget_request_internal( url: url, - headers: repository_details[:auth_header] + auth_header: repository_details[:auth_header], + repository_url: repository_details[:repository_url] ) + return unless response.status == 200 - response = cache[url] + doc = Nokogiri::XML(response.body) + doc.remove_namespaces! + doc + end + private_class_method def self.execute_json_nuget_request(url, repository_details) + response = execute_nuget_request_internal( + url: url, + auth_header: repository_details[:auth_header], + repository_url: repository_details[:repository_url] + ) return unless response.status == 200 body = remove_wrapping_zero_width_chars(response.body) JSON.parse(body) + end + + private_class_method def self.execute_nuget_request_internal( + url: String, + auth_header: String, + repository_url: String + ) + cache = CacheManager.cache("dependency_url_search_cache") + if cache[url].nil? + response = Dependabot::RegistryClient.get( + url: url, + headers: auth_header + ) + + if [401, 402, 403].include?(response.status) + raise Dependabot::PrivateSourceAuthenticationFailure, repository_url + end + + cache[url] = response if !CacheManager.caching_disabled? && response.status == 200 + else + response = cache[url] + end + + response rescue Excon::Error::Timeout, Excon::Error::Socket - repo_url = repository_details[:repository_url] + repo_url = repository_url raise if repo_url == Dependabot::Nuget::UpdateChecker::RepositoryFinder::DEFAULT_REPOSITORY_URL raise PrivateSourceTimedOut, repo_url diff --git a/nuget/lib/dependabot/nuget/update_checker/version_finder.rb b/nuget/lib/dependabot/nuget/update_checker/version_finder.rb index 420900086b5..5ab79a4014f 100644 --- a/nuget/lib/dependabot/nuget/update_checker/version_finder.rb +++ b/nuget/lib/dependabot/nuget/update_checker/version_finder.rb @@ -235,7 +235,7 @@ def v3_nuget_listings dependency_urls .select { |details| details.fetch(:repository_type) == "v3" } .filter_map do |url_details| - versions = versions_for_v3_repository(url_details) + versions = NugetClient.get_package_versions(dependency.name, url_details) next unless versions { "versions" => versions, "listing_details" => url_details } @@ -294,10 +294,6 @@ def fetch_v2_next_link_href(xml_body) nil end - def versions_for_v3_repository(repository_details) - NugetClient.get_package_versions_v3(dependency.name, repository_details) - end - def dependency_urls @dependency_urls ||= RepositoryFinder.new( diff --git a/nuget/spec/dependabot/nuget/file_parser/project_file_parser_spec.rb b/nuget/spec/dependabot/nuget/file_parser/project_file_parser_spec.rb index 58d621ce958..91fb2c38027 100644 --- a/nuget/spec/dependabot/nuget/file_parser/project_file_parser_spec.rb +++ b/nuget/spec/dependabot/nuget/file_parser/project_file_parser_spec.rb @@ -4,6 +4,7 @@ require "spec_helper" require "dependabot/dependency_file" require "dependabot/source" +require "dependabot/nuget/cache_manager" require "dependabot/nuget/file_parser/project_file_parser" module NuGetSearchStubs @@ -903,6 +904,7 @@ def dependencies_from(dep_info) before do stub_no_search_results("this.dependency.does.not.exist") + ENV["DEPENDABOT_NUGET_CACHE_DISABLED"] = "false" end it "has the right details" do @@ -927,6 +929,10 @@ def dependencies_from(dep_info) ENV["DEPENDABOT_NUGET_CACHE_DISABLED"] = "true" Dependabot::Nuget::CacheManager.instance_variable_set(:@cache, nil) end + + after do + ENV["DEPENDABOT_NUGET_CACHE_DISABLED"] = "true" + end end end end @@ -935,7 +941,7 @@ def dependencies_from(dep_info) let(:file_body) { fixture("csproj", "basic.nuproj") } before do - stub_search_results_with_versions_v3("nanoframework.coreextra", []) + stub_search_results_with_versions_v3("nanoframework.coreextra", ["1.0.0"]) end it "gets the right number of dependencies" do diff --git a/omnibus/dependabot-omnibus.gemspec b/omnibus/dependabot-omnibus.gemspec index 3fdda0368e7..7d8121a9da7 100644 --- a/omnibus/dependabot-omnibus.gemspec +++ b/omnibus/dependabot-omnibus.gemspec @@ -30,6 +30,7 @@ Gem::Specification.new do |spec| spec.add_dependency "dependabot-cargo", Dependabot::VERSION spec.add_dependency "dependabot-common", Dependabot::VERSION spec.add_dependency "dependabot-composer", Dependabot::VERSION + spec.add_dependency "dependabot-devcontainers", Dependabot::VERSION spec.add_dependency "dependabot-docker", Dependabot::VERSION spec.add_dependency "dependabot-elm", Dependabot::VERSION spec.add_dependency "dependabot-github_actions", Dependabot::VERSION diff --git a/omnibus/lib/dependabot/omnibus.rb b/omnibus/lib/dependabot/omnibus.rb index 9ae06bb5a2c..4eb0cac87fd 100644 --- a/omnibus/lib/dependabot/omnibus.rb +++ b/omnibus/lib/dependabot/omnibus.rb @@ -18,3 +18,4 @@ require "dependabot/bundler" require "dependabot/pub" require "dependabot/swift" +require "dependabot/devcontainers" diff --git a/python/lib/dependabot/python/file_parser/pyproject_files_parser.rb b/python/lib/dependabot/python/file_parser/pyproject_files_parser.rb index b1841ca856c..b62f9b5e499 100644 --- a/python/lib/dependabot/python/file_parser/pyproject_files_parser.rb +++ b/python/lib/dependabot/python/file_parser/pyproject_files_parser.rb @@ -1,4 +1,4 @@ -# typed: false +# typed: true # frozen_string_literal: true require "toml-rb" diff --git a/script/dependabot b/script/dependabot index 9a75dd1d4ef..eabad82837c 100755 --- a/script/dependabot +++ b/script/dependabot @@ -9,6 +9,7 @@ dependabot \ -v "$(pwd)"/cargo:/home/dependabot/cargo \ -v "$(pwd)"/common:/home/dependabot/common \ -v "$(pwd)"/composer:/home/dependabot/composer \ + -v "$(pwd)"/devcontainers:/home/dependabot/devcontainers \ -v "$(pwd)"/docker:/home/dependabot/docker \ -v "$(pwd)"/elm:/home/dependabot/elm \ -v "$(pwd)"/git_submodules:/home/dependabot/git_submodules \ diff --git a/sorbet/config b/sorbet/config index d6f058f0631..293bd98aa11 100644 --- a/sorbet/config +++ b/sorbet/config @@ -12,6 +12,7 @@ --ignore=cargo/spec/ --ignore=common/spec/ --ignore=composer/spec/ +--ignore=devcontainers/spec/ --ignore=docker/spec/ --ignore=elm/spec/ --ignore=git_submodules/spec/ diff --git a/sorbet/rbi/gems/diff-lcs@1.5.0.rbi b/sorbet/rbi/gems/diff-lcs@1.5.0.rbi new file mode 100644 index 00000000000..120f096380d --- /dev/null +++ b/sorbet/rbi/gems/diff-lcs@1.5.0.rbi @@ -0,0 +1,1083 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `diff-lcs` gem. +# Please instead update this file by running `bin/tapioca gem diff-lcs`. + +# source://diff-lcs//lib/diff/lcs.rb#3 +module Diff; end + +# source://diff-lcs//lib/diff/lcs.rb#51 +module Diff::LCS + # Returns the difference set between +self+ and +other+. See Diff::LCS#diff. + # + # source://diff-lcs//lib/diff/lcs.rb#75 + def diff(other, callbacks = T.unsafe(nil), &block); end + + # Returns an Array containing the longest common subsequence(s) between + # +self+ and +other+. See Diff::LCS#lcs. + # + # lcs = seq1.lcs(seq2) + # + # A note when using objects: Diff::LCS only works properly when each object + # can be used as a key in a Hash, which typically means that the objects must + # implement Object#eql? in a way that two identical values compare + # identically for key purposes. That is: + # + # O.new('a').eql?(O.new('a')) == true + # + # source://diff-lcs//lib/diff/lcs.rb#70 + def lcs(other, &block); end + + # Attempts to patch +self+ with the provided +patchset+. A new sequence based + # on +self+ and the +patchset+ will be created. See Diff::LCS#patch. Attempts + # to autodiscover the direction of the patch. + # + # source://diff-lcs//lib/diff/lcs.rb#101 + def patch(patchset); end + + # Attempts to patch +self+ with the provided +patchset+. A new sequence based + # on +self+ and the +patchset+ will be created. See Diff::LCS#patch. Does no + # patch direction autodiscovery. + # + # source://diff-lcs//lib/diff/lcs.rb#109 + def patch!(patchset); end + + # Attempts to patch +self+ with the provided +patchset+, using #patch!. If + # the sequence this is used on supports #replace, the value of +self+ will be + # replaced. See Diff::LCS#patch. Does no patch direction autodiscovery. + # + # source://diff-lcs//lib/diff/lcs.rb#123 + def patch_me(patchset); end + + # Returns the balanced ("side-by-side") difference set between +self+ and + # +other+. See Diff::LCS#sdiff. + # + # source://diff-lcs//lib/diff/lcs.rb#81 + def sdiff(other, callbacks = T.unsafe(nil), &block); end + + # Traverses the discovered longest common subsequences between +self+ and + # +other+ using the alternate, balanced algorithm. See + # Diff::LCS#traverse_balanced. + # + # source://diff-lcs//lib/diff/lcs.rb#94 + def traverse_balanced(other, callbacks = T.unsafe(nil), &block); end + + # Traverses the discovered longest common subsequences between +self+ and + # +other+. See Diff::LCS#traverse_sequences. + # + # source://diff-lcs//lib/diff/lcs.rb#87 + def traverse_sequences(other, callbacks = T.unsafe(nil), &block); end + + # Attempts to patch +self+ with the provided +patchset+. A new sequence based + # on +self+ and the +patchset+ will be created. See Diff::LCS#patch. Attempts + # to autodiscover the direction of the patch. + # + # source://diff-lcs//lib/diff/lcs.rb#101 + def unpatch(patchset); end + + # Attempts to unpatch +self+ with the provided +patchset+. A new sequence + # based on +self+ and the +patchset+ will be created. See Diff::LCS#unpatch. + # Does no patch direction autodiscovery. + # + # source://diff-lcs//lib/diff/lcs.rb#116 + def unpatch!(patchset); end + + # Attempts to unpatch +self+ with the provided +patchset+, using #unpatch!. + # If the sequence this is used on supports #replace, the value of +self+ will + # be replaced. See Diff::LCS#unpatch. Does no patch direction autodiscovery. + # + # source://diff-lcs//lib/diff/lcs.rb#134 + def unpatch_me(patchset); end + + class << self + # :yields seq1[i] for each matched: + # + # source://diff-lcs//lib/diff/lcs.rb#144 + def LCS(seq1, seq2, &block); end + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#52 + def callbacks_for(callbacks); end + + # #diff computes the smallest set of additions and deletions necessary to + # turn the first sequence into the second, and returns a description of these + # changes. + # + # See Diff::LCS::DiffCallbacks for the default behaviour. An alternate + # behaviour may be implemented with Diff::LCS::ContextDiffCallbacks. If a + # Class argument is provided for +callbacks+, #diff will attempt to + # initialise it. If the +callbacks+ object (possibly initialised) responds to + # #finish, it will be called. + # + # source://diff-lcs//lib/diff/lcs.rb#168 + def diff(seq1, seq2, callbacks = T.unsafe(nil), &block); end + + # :yields seq1[i] for each matched: + # + # source://diff-lcs//lib/diff/lcs.rb#144 + def lcs(seq1, seq2, &block); end + + # Applies a +patchset+ to the sequence +src+ according to the +direction+ + # (:patch or :unpatch), producing a new sequence. + # + # If the +direction+ is not specified, Diff::LCS::patch will attempt to + # discover the direction of the +patchset+. + # + # A +patchset+ can be considered to apply forward (:patch) if the + # following expression is true: + # + # patch(s1, diff(s1, s2)) -> s2 + # + # A +patchset+ can be considered to apply backward (:unpatch) if the + # following expression is true: + # + # patch(s2, diff(s1, s2)) -> s1 + # + # If the +patchset+ contains no changes, the +src+ value will be returned as + # either src.dup or +src+. A +patchset+ can be deemed as having no + # changes if the following predicate returns true: + # + # patchset.empty? or + # patchset.flatten(1).all? { |change| change.unchanged? } + # + # === Patchsets + # + # A +patchset+ is always an enumerable sequence of changes, hunks of changes, + # or a mix of the two. A hunk of changes is an enumerable sequence of + # changes: + # + # [ # patchset + # # change + # [ # hunk + # # change + # ] + # ] + # + # The +patch+ method accepts patchsets that are enumerable sequences + # containing either Diff::LCS::Change objects (or a subclass) or the array + # representations of those objects. Prior to application, array + # representations of Diff::LCS::Change objects will be reified. + # + # source://diff-lcs//lib/diff/lcs.rb#624 + def patch(src, patchset, direction = T.unsafe(nil)); end + + # Given a set of patchset, convert the current version to the next version. + # Does no auto-discovery. + # + # source://diff-lcs//lib/diff/lcs.rb#734 + def patch!(src, patchset); end + + # #sdiff computes all necessary components to show two sequences and their + # minimized differences side by side, just like the Unix utility + # sdiff does: + # + # old < - + # same same + # before | after + # - > new + # + # See Diff::LCS::SDiffCallbacks for the default behaviour. An alternate + # behaviour may be implemented with Diff::LCS::ContextDiffCallbacks. If a + # Class argument is provided for +callbacks+, #diff will attempt to + # initialise it. If the +callbacks+ object (possibly initialised) responds to + # #finish, it will be called. + # + # Each element of a returned array is a Diff::LCS::ContextChange object, + # which can be implicitly converted to an array. + # + # Diff::LCS.sdiff(a, b).each do |action, (old_pos, old_element), (new_pos, new_element)| + # case action + # when '!' + # # replace + # when '-' + # # delete + # when '+' + # # insert + # end + # end + # + # source://diff-lcs//lib/diff/lcs.rb#200 + def sdiff(seq1, seq2, callbacks = T.unsafe(nil), &block); end + + # #traverse_balanced is an alternative to #traverse_sequences. It uses a + # different algorithm to iterate through the entries in the computed longest + # common subsequence. Instead of viewing the changes as insertions or + # deletions from one of the sequences, #traverse_balanced will report + # changes between the sequences. + # + # The arguments to #traverse_balanced are the two sequences to traverse and a + # callback object, like this: + # + # traverse_balanced(seq1, seq2, Diff::LCS::ContextDiffCallbacks.new) + # + # #sdiff is implemented with #traverse_balanced. + # + # == Callback Methods + # + # Optional callback methods are emphasized. + # + # callbacks#match:: Called when +a+ and +b+ are pointing to + # common elements in +A+ and +B+. + # callbacks#discard_a:: Called when +a+ is pointing to an + # element not in +B+. + # callbacks#discard_b:: Called when +b+ is pointing to an + # element not in +A+. + # callbacks#change:: Called when +a+ and +b+ are pointing to + # the same relative position, but + # A[a] and B[b] are not + # the same; a change has + # occurred. + # + # #traverse_balanced might be a bit slower than #traverse_sequences, + # noticable only while processing huge amounts of data. + # + # == Algorithm + # + # a---+ + # v + # A = a b c e h j l m n p + # B = b c d e f j k l m r s t + # ^ + # b---+ + # + # === Matches + # + # If there are two arrows (+a+ and +b+) pointing to elements of sequences +A+ + # and +B+, the arrows will initially point to the first elements of their + # respective sequences. #traverse_sequences will advance the arrows through + # the sequences one element at a time, calling a method on the user-specified + # callback object before each advance. It will advance the arrows in such a + # way that if there are elements A[i] and B[j] which are + # both equal and part of the longest common subsequence, there will be some + # moment during the execution of #traverse_sequences when arrow +a+ is + # pointing to A[i] and arrow +b+ is pointing to B[j]. When + # this happens, #traverse_sequences will call callbacks#match and + # then it will advance both arrows. + # + # === Discards + # + # Otherwise, one of the arrows is pointing to an element of its sequence that + # is not part of the longest common subsequence. #traverse_sequences will + # advance that arrow and will call callbacks#discard_a or + # callbacks#discard_b, depending on which arrow it advanced. + # + # === Changes + # + # If both +a+ and +b+ point to elements that are not part of the longest + # common subsequence, then #traverse_sequences will try to call + # callbacks#change and advance both arrows. If + # callbacks#change is not implemented, then + # callbacks#discard_a and callbacks#discard_b will be + # called in turn. + # + # The methods for callbacks#match, callbacks#discard_a, + # callbacks#discard_b, and callbacks#change are invoked + # with an event comprising the action ("=", "+", "-", or "!", respectively), + # the indicies +i+ and +j+, and the elements A[i] and B[j]. + # Return values are discarded by #traverse_balanced. + # + # === Context + # + # Note that +i+ and +j+ may not be the same index position, even if +a+ and + # +b+ are considered to be pointing to matching or changed elements. + # + # source://diff-lcs//lib/diff/lcs.rb#475 + def traverse_balanced(seq1, seq2, callbacks = T.unsafe(nil)); end + + # #traverse_sequences is the most general facility provided by this module; + # #diff and #lcs are implemented as calls to it. + # + # The arguments to #traverse_sequences are the two sequences to traverse, and + # a callback object, like this: + # + # traverse_sequences(seq1, seq2, Diff::LCS::ContextDiffCallbacks.new) + # + # == Callback Methods + # + # Optional callback methods are emphasized. + # + # callbacks#match:: Called when +a+ and +b+ are pointing to + # common elements in +A+ and +B+. + # callbacks#discard_a:: Called when +a+ is pointing to an + # element not in +B+. + # callbacks#discard_b:: Called when +b+ is pointing to an + # element not in +A+. + # callbacks#finished_a:: Called when +a+ has reached the end of + # sequence +A+. + # callbacks#finished_b:: Called when +b+ has reached the end of + # sequence +B+. + # + # == Algorithm + # + # a---+ + # v + # A = a b c e h j l m n p + # B = b c d e f j k l m r s t + # ^ + # b---+ + # + # If there are two arrows (+a+ and +b+) pointing to elements of sequences +A+ + # and +B+, the arrows will initially point to the first elements of their + # respective sequences. #traverse_sequences will advance the arrows through + # the sequences one element at a time, calling a method on the user-specified + # callback object before each advance. It will advance the arrows in such a + # way that if there are elements A[i] and B[j] which are + # both equal and part of the longest common subsequence, there will be some + # moment during the execution of #traverse_sequences when arrow +a+ is + # pointing to A[i] and arrow +b+ is pointing to B[j]. When + # this happens, #traverse_sequences will call callbacks#match and + # then it will advance both arrows. + # + # Otherwise, one of the arrows is pointing to an element of its sequence that + # is not part of the longest common subsequence. #traverse_sequences will + # advance that arrow and will call callbacks#discard_a or + # callbacks#discard_b, depending on which arrow it advanced. If both + # arrows point to elements that are not part of the longest common + # subsequence, then #traverse_sequences will advance arrow +a+ and call the + # appropriate callback, then it will advance arrow +b+ and call the appropriate + # callback. + # + # The methods for callbacks#match, callbacks#discard_a, and + # callbacks#discard_b are invoked with an event comprising the + # action ("=", "+", or "-", respectively), the indicies +i+ and +j+, and the + # elements A[i] and B[j]. Return values are discarded by + # #traverse_sequences. + # + # === End of Sequences + # + # If arrow +a+ reaches the end of its sequence before arrow +b+ does, + # #traverse_sequence will try to call callbacks#finished_a with the + # last index and element of +A+ (A[-1]) and the current index and + # element of +B+ (B[j]). If callbacks#finished_a does not + # exist, then callbacks#discard_b will be called on each element of + # +B+ until the end of the sequence is reached (the call will be done with + # A[-1] and B[j] for each element). + # + # If +b+ reaches the end of +B+ before +a+ reaches the end of +A+, + # callbacks#finished_b will be called with the current index and + # element of +A+ (A[i]) and the last index and element of +B+ + # (A[-1]). Again, if callbacks#finished_b does not exist on + # the callback object, then callbacks#discard_a will be called on + # each element of +A+ until the end of the sequence is reached (A[i] + # and B[-1]). + # + # There is a chance that one additional callbacks#discard_a or + # callbacks#discard_b will be called after the end of the sequence + # is reached, if +a+ has not yet reached the end of +A+ or +b+ has not yet + # reached the end of +B+. + # + # source://diff-lcs//lib/diff/lcs.rb#285 + def traverse_sequences(seq1, seq2, callbacks = T.unsafe(nil)); end + + # Given a set of patchset, convert the current version to the prior version. + # Does no auto-discovery. + # + # source://diff-lcs//lib/diff/lcs.rb#728 + def unpatch!(src, patchset); end + + private + + # source://diff-lcs//lib/diff/lcs/internals.rb#4 + def diff_traversal(method, seq1, seq2, callbacks, &block); end + end +end + +# An alias for DefaultCallbacks that is used in +# Diff::LCS#traverse_balanced. +# +# Diff::LCS.LCS(seq1, seq2, Diff::LCS::BalancedCallbacks) +# +# source://diff-lcs//lib/diff/lcs/callbacks.rb#50 +Diff::LCS::BalancedCallbacks = Diff::LCS::DefaultCallbacks + +# A block is an operation removing, adding, or changing a group of items. +# Basically, this is just a list of changes, where each change adds or +# deletes a single item. Used by bin/ldiff. +# +# source://diff-lcs//lib/diff/lcs/block.rb#6 +class Diff::LCS::Block + # @return [Block] a new instance of Block + # + # source://diff-lcs//lib/diff/lcs/block.rb#9 + def initialize(chunk); end + + # Returns the value of attribute changes. + # + # source://diff-lcs//lib/diff/lcs/block.rb#7 + def changes; end + + # source://diff-lcs//lib/diff/lcs/block.rb#21 + def diff_size; end + + # Returns the value of attribute insert. + # + # source://diff-lcs//lib/diff/lcs/block.rb#7 + def insert; end + + # source://diff-lcs//lib/diff/lcs/block.rb#25 + def op; end + + # Returns the value of attribute remove. + # + # source://diff-lcs//lib/diff/lcs/block.rb#7 + def remove; end +end + +# Represents a simplistic (non-contextual) change. Represents the removal or +# addition of an element from either the old or the new sequenced +# enumerable. +# +# source://diff-lcs//lib/diff/lcs/change.rb#6 +class Diff::LCS::Change + include ::Comparable + + # @return [Change] a new instance of Change + # + # source://diff-lcs//lib/diff/lcs/change.rb#27 + def initialize(*args); end + + # source://diff-lcs//lib/diff/lcs/change.rb#65 + def <=>(other); end + + # source://diff-lcs//lib/diff/lcs/change.rb#58 + def ==(other); end + + # Returns the action this Change represents. + # + # source://diff-lcs//lib/diff/lcs/change.rb#20 + def action; end + + # @return [Boolean] + # + # source://diff-lcs//lib/diff/lcs/change.rb#72 + def adding?; end + + # @return [Boolean] + # + # source://diff-lcs//lib/diff/lcs/change.rb#84 + def changed?; end + + # @return [Boolean] + # + # source://diff-lcs//lib/diff/lcs/change.rb#76 + def deleting?; end + + # Returns the sequence element of the Change. + # + # source://diff-lcs//lib/diff/lcs/change.rb#25 + def element; end + + # @return [Boolean] + # + # source://diff-lcs//lib/diff/lcs/change.rb#88 + def finished_a?; end + + # @return [Boolean] + # + # source://diff-lcs//lib/diff/lcs/change.rb#92 + def finished_b?; end + + # source://diff-lcs//lib/diff/lcs/change.rb#34 + def inspect(*_args); end + + # Returns the position of the Change. + # + # source://diff-lcs//lib/diff/lcs/change.rb#23 + def position; end + + # source://diff-lcs//lib/diff/lcs/change.rb#38 + def to_a; end + + # source://diff-lcs//lib/diff/lcs/change.rb#38 + def to_ary; end + + # @return [Boolean] + # + # source://diff-lcs//lib/diff/lcs/change.rb#80 + def unchanged?; end + + class << self + # source://diff-lcs//lib/diff/lcs/change.rb#44 + def from_a(arr); end + + # @return [Boolean] + # + # source://diff-lcs//lib/diff/lcs/change.rb#15 + def valid_action?(action); end + end +end + +# source://diff-lcs//lib/diff/lcs/change.rb#7 +Diff::LCS::Change::IntClass = Integer + +# The only actions valid for changes are '+' (add), '-' (delete), '=' +# (no change), '!' (changed), '<' (tail changes from first sequence), or +# '>' (tail changes from second sequence). The last two ('<>') are only +# found with Diff::LCS::diff and Diff::LCS::sdiff. +# +# source://diff-lcs//lib/diff/lcs/change.rb#13 +Diff::LCS::Change::VALID_ACTIONS = T.let(T.unsafe(nil), Array) + +# Represents a contextual change. Contains the position and values of the +# elements in the old and the new sequenced enumerables as well as the action +# taken. +# +# source://diff-lcs//lib/diff/lcs/change.rb#101 +class Diff::LCS::ContextChange < ::Diff::LCS::Change + # @return [ContextChange] a new instance of ContextChange + # + # source://diff-lcs//lib/diff/lcs/change.rb#114 + def initialize(*args); end + + # source://diff-lcs//lib/diff/lcs/change.rb#166 + def <=>(other); end + + # source://diff-lcs//lib/diff/lcs/change.rb#157 + def ==(other); end + + # Returns the new element being changed. + # + # source://diff-lcs//lib/diff/lcs/change.rb#112 + def new_element; end + + # Returns the new position being changed. + # + # source://diff-lcs//lib/diff/lcs/change.rb#108 + def new_position; end + + # Returns the old element being changed. + # + # source://diff-lcs//lib/diff/lcs/change.rb#110 + def old_element; end + + # Returns the old position being changed. + # + # source://diff-lcs//lib/diff/lcs/change.rb#106 + def old_position; end + + # source://diff-lcs//lib/diff/lcs/change.rb#122 + def to_a; end + + # source://diff-lcs//lib/diff/lcs/change.rb#122 + def to_ary; end + + class << self + # source://diff-lcs//lib/diff/lcs/change.rb#132 + def from_a(arr); end + + # Simplifies a context change for use in some diff callbacks. '<' actions + # are converted to '-' and '>' actions are converted to '+'. + # + # source://diff-lcs//lib/diff/lcs/change.rb#138 + def simplify(event); end + end +end + +# This will produce a compound array of contextual diff change objects. Each +# element in the #diffs array is a "hunk" array, where each element in each +# "hunk" array is a single change. Each change is a Diff::LCS::ContextChange +# that contains both the old index and new index values for the change. The +# "hunk" provides the full context for the changes. Both old and new objects +# will be presented for changed objects. +nil+ will be substituted for a +# discarded object. +# +# seq1 = %w(a b c e h j l m n p) +# seq2 = %w(b c d e f j k l m r s t) +# +# diffs = Diff::LCS.diff(seq1, seq2, Diff::LCS::ContextDiffCallbacks) +# # This example shows a simplified array format. +# # [ [ [ '-', [ 0, 'a' ], [ 0, nil ] ] ], # 1 +# # [ [ '+', [ 3, nil ], [ 2, 'd' ] ] ], # 2 +# # [ [ '-', [ 4, 'h' ], [ 4, nil ] ], # 3 +# # [ '+', [ 5, nil ], [ 4, 'f' ] ] ], +# # [ [ '+', [ 6, nil ], [ 6, 'k' ] ] ], # 4 +# # [ [ '-', [ 8, 'n' ], [ 9, nil ] ], # 5 +# # [ '+', [ 9, nil ], [ 9, 'r' ] ], +# # [ '-', [ 9, 'p' ], [ 10, nil ] ], +# # [ '+', [ 10, nil ], [ 10, 's' ] ], +# # [ '+', [ 10, nil ], [ 11, 't' ] ] ] ] +# +# The five hunks shown are comprised of individual changes; if there is a +# related set of changes, they are still shown individually. +# +# This callback can also be used with Diff::LCS#sdiff, which will produce +# results like: +# +# diffs = Diff::LCS.sdiff(seq1, seq2, Diff::LCS::ContextCallbacks) +# # This example shows a simplified array format. +# # [ [ [ "-", [ 0, "a" ], [ 0, nil ] ] ], # 1 +# # [ [ "+", [ 3, nil ], [ 2, "d" ] ] ], # 2 +# # [ [ "!", [ 4, "h" ], [ 4, "f" ] ] ], # 3 +# # [ [ "+", [ 6, nil ], [ 6, "k" ] ] ], # 4 +# # [ [ "!", [ 8, "n" ], [ 9, "r" ] ], # 5 +# # [ "!", [ 9, "p" ], [ 10, "s" ] ], +# # [ "+", [ 10, nil ], [ 11, "t" ] ] ] ] +# +# The five hunks are still present, but are significantly shorter in total +# presentation, because changed items are shown as changes ("!") instead of +# potentially "mismatched" pairs of additions and deletions. +# +# The result of this operation is similar to that of +# Diff::LCS::SDiffCallbacks. They may be compared as: +# +# s = Diff::LCS.sdiff(seq1, seq2).reject { |e| e.action == "=" } +# c = Diff::LCS.sdiff(seq1, seq2, Diff::LCS::ContextDiffCallbacks).flatten(1) +# +# s == c # -> true +# +# === Use +# +# This callback object must be initialised and can be used by the +# Diff::LCS#diff or Diff::LCS#sdiff methods. +# +# cbo = Diff::LCS::ContextDiffCallbacks.new +# Diff::LCS.LCS(seq1, seq2, cbo) +# cbo.finish +# +# Note that the call to #finish is absolutely necessary, or the last set of +# changes will not be visible. Alternatively, can be used as: +# +# cbo = Diff::LCS::ContextDiffCallbacks.new { |tcbo| Diff::LCS.LCS(seq1, seq2, tcbo) } +# +# The necessary #finish call will be made. +# +# === Simplified Array Format +# +# The simplified array format used in the example above can be obtained +# with: +# +# require 'pp' +# pp diffs.map { |e| e.map { |f| f.to_a } } +# +# source://diff-lcs//lib/diff/lcs/callbacks.rb#223 +class Diff::LCS::ContextDiffCallbacks < ::Diff::LCS::DiffCallbacks + # source://diff-lcs//lib/diff/lcs/callbacks.rb#232 + def change(event); end + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#224 + def discard_a(event); end + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#228 + def discard_b(event); end +end + +# This callback object implements the default set of callback events, +# which only returns the event itself. Note that #finished_a and +# #finished_b are not implemented -- I haven't yet figured out where they +# would be useful. +# +# Note that this is intended to be called as is, e.g., +# +# Diff::LCS.LCS(seq1, seq2, Diff::LCS::DefaultCallbacks) +# +# source://diff-lcs//lib/diff/lcs/callbacks.rb#14 +class Diff::LCS::DefaultCallbacks + class << self + # Called when both the old and new values have changed. + # + # source://diff-lcs//lib/diff/lcs/callbacks.rb#32 + def change(event); end + + # Called when the old value is discarded in favour of the new value. + # + # source://diff-lcs//lib/diff/lcs/callbacks.rb#22 + def discard_a(event); end + + # Called when the new value is discarded in favour of the old value. + # + # source://diff-lcs//lib/diff/lcs/callbacks.rb#27 + def discard_b(event); end + + # Called when two items match. + # + # source://diff-lcs//lib/diff/lcs/callbacks.rb#17 + def match(event); end + + private + + def new(*_arg0); end + end +end + +# This will produce a compound array of simple diff change objects. Each +# element in the #diffs array is a +hunk+ or +hunk+ array, where each +# element in each +hunk+ array is a single Change object representing the +# addition or removal of a single element from one of the two tested +# sequences. The +hunk+ provides the full context for the changes. +# +# diffs = Diff::LCS.diff(seq1, seq2) +# # This example shows a simplified array format. +# # [ [ [ '-', 0, 'a' ] ], # 1 +# # [ [ '+', 2, 'd' ] ], # 2 +# # [ [ '-', 4, 'h' ], # 3 +# # [ '+', 4, 'f' ] ], +# # [ [ '+', 6, 'k' ] ], # 4 +# # [ [ '-', 8, 'n' ], # 5 +# # [ '-', 9, 'p' ], +# # [ '+', 9, 'r' ], +# # [ '+', 10, 's' ], +# # [ '+', 11, 't' ] ] ] +# +# There are five hunks here. The first hunk says that the +a+ at position 0 +# of the first sequence should be deleted ('-'). The second hunk +# says that the +d+ at position 2 of the second sequence should be inserted +# ('+'). The third hunk says that the +h+ at position 4 of the +# first sequence should be removed and replaced with the +f+ from position 4 +# of the second sequence. The other two hunks are described similarly. +# +# === Use +# +# This callback object must be initialised and is used by the Diff::LCS#diff +# method. +# +# cbo = Diff::LCS::DiffCallbacks.new +# Diff::LCS.LCS(seq1, seq2, cbo) +# cbo.finish +# +# Note that the call to #finish is absolutely necessary, or the last set of +# changes will not be visible. Alternatively, can be used as: +# +# cbo = Diff::LCS::DiffCallbacks.new { |tcbo| Diff::LCS.LCS(seq1, seq2, tcbo) } +# +# The necessary #finish call will be made. +# +# === Simplified Array Format +# +# The simplified array format used in the example above can be obtained +# with: +# +# require 'pp' +# pp diffs.map { |e| e.map { |f| f.to_a } } +# +# source://diff-lcs//lib/diff/lcs/callbacks.rb#106 +class Diff::LCS::DiffCallbacks + # :yields self: + # + # @return [DiffCallbacks] a new instance of DiffCallbacks + # + # source://diff-lcs//lib/diff/lcs/callbacks.rb#110 + def initialize; end + + # Returns the difference set collected during the diff process. + # + # source://diff-lcs//lib/diff/lcs/callbacks.rb#108 + def diffs; end + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#133 + def discard_a(event); end + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#137 + def discard_b(event); end + + # Finalizes the diff process. If an unprocessed hunk still exists, then it + # is appended to the diff list. + # + # source://diff-lcs//lib/diff/lcs/callbacks.rb#125 + def finish; end + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#129 + def match(_event); end + + private + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#141 + def finish_hunk; end +end + +# A Hunk is a group of Blocks which overlap because of the context surrounding +# each block. (So if we're not using context, every hunk will contain one +# block.) Used in the diff program (bin/ldiff). +# +# source://diff-lcs//lib/diff/lcs/hunk.rb#8 +class Diff::LCS::Hunk + # Create a hunk using references to both the old and new data, as well as the + # piece of data. + # + # @return [Hunk] a new instance of Hunk + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#16 + def initialize(data_old, data_new, piece, flag_context, file_length_difference); end + + # Returns the value of attribute blocks. + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#63 + def blocks; end + + # Returns a diff string based on a format. + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#116 + def diff(format, last = T.unsafe(nil)); end + + # Returns the value of attribute end_new. + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#65 + def end_new; end + + # Returns the value of attribute end_old. + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#65 + def end_old; end + + # Returns the value of attribute file_length_difference. + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#66 + def file_length_difference; end + + # Change the "start" and "end" fields to note that context should be added + # to this hunk. + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#70 + def flag_context; end + + # source://diff-lcs//lib/diff/lcs/hunk.rb#72 + def flag_context=(context); end + + # Merges this hunk and the provided hunk together if they overlap. Returns + # a truthy value so that if there is no overlap, you can know the merge + # was skipped. + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#98 + def merge(hunk); end + + # @return [Boolean] + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#326 + def missing_last_newline?(data); end + + # Determines whether there is an overlap between this hunk and the + # provided hunk. This will be true if the difference between the two hunks + # start or end positions is within one position of each other. + # + # @return [Boolean] + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#110 + def overlaps?(hunk); end + + # Returns the value of attribute start_new. + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#64 + def start_new; end + + # Returns the value of attribute start_old. + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#64 + def start_old; end + + # Merges this hunk and the provided hunk together if they overlap. Returns + # a truthy value so that if there is no overlap, you can know the merge + # was skipped. + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#98 + def unshift(hunk); end + + private + + # source://diff-lcs//lib/diff/lcs/hunk.rb#213 + def context_diff(last = T.unsafe(nil)); end + + # Generate a range of item numbers to print. Only print 1 number if the + # range has only one item in it. Otherwise, it's 'start,end' + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#293 + def context_range(mode, op, last = T.unsafe(nil)); end + + # source://diff-lcs//lib/diff/lcs/hunk.rb#271 + def ed_diff(format, _last = T.unsafe(nil)); end + + # source://diff-lcs//lib/diff/lcs/hunk.rb#339 + def encode(literal, target_encoding = T.unsafe(nil)); end + + # source://diff-lcs//lib/diff/lcs/hunk.rb#343 + def encode_as(string, *args); end + + # Note that an old diff can't have any context. Therefore, we know that + # there's only one block in the hunk. + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#135 + def old_diff(_last = T.unsafe(nil)); end + + # source://diff-lcs//lib/diff/lcs/hunk.rb#160 + def unified_diff(last = T.unsafe(nil)); end + + # Generate a range of item numbers to print for unified diff. Print number + # where block starts, followed by number of lines in the block + # (don't print number of lines if it's 1) + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#311 + def unified_range(mode, last); end +end + +# source://diff-lcs//lib/diff/lcs/hunk.rb#10 +Diff::LCS::Hunk::ED_DIFF_OP_ACTION = T.let(T.unsafe(nil), Hash) + +# source://diff-lcs//lib/diff/lcs/hunk.rb#9 +Diff::LCS::Hunk::OLD_DIFF_OP_ACTION = T.let(T.unsafe(nil), Hash) + +# source://diff-lcs//lib/diff/lcs/internals.rb#29 +module Diff::LCS::Internals + class << self + # This method will analyze the provided patchset to provide a single-pass + # normalization (conversion of the array form of Diff::LCS::Change objects to + # the object form of same) and detection of whether the patchset represents + # changes to be made. + # + # source://diff-lcs//lib/diff/lcs/internals.rb#102 + def analyze_patchset(patchset, depth = T.unsafe(nil)); end + + # Examine the patchset and the source to see in which direction the + # patch should be applied. + # + # WARNING: By default, this examines the whole patch, so this could take + # some time. This also works better with Diff::LCS::ContextChange or + # Diff::LCS::Change as its source, as an array will cause the creation + # of one of the above. + # + # source://diff-lcs//lib/diff/lcs/internals.rb#147 + def intuit_diff_direction(src, patchset, limit = T.unsafe(nil)); end + + # Compute the longest common subsequence between the sequenced + # Enumerables +a+ and +b+. The result is an array whose contents is such + # that + # + # result = Diff::LCS::Internals.lcs(a, b) + # result.each_with_index do |e, i| + # assert_equal(a[i], b[e]) unless e.nil? + # end + # + # source://diff-lcs//lib/diff/lcs/internals.rb#41 + def lcs(a, b); end + + private + + # If +vector+ maps the matching elements of another collection onto this + # Enumerable, compute the inverse of +vector+ that maps this Enumerable + # onto the collection. (Currently unused.) + # + # source://diff-lcs//lib/diff/lcs/internals.rb#286 + def inverse_vector(a, vector); end + + # Returns a hash mapping each element of an Enumerable to the set of + # positions it occupies in the Enumerable, optionally restricted to the + # elements specified in the range of indexes specified by +interval+. + # + # source://diff-lcs//lib/diff/lcs/internals.rb#298 + def position_hash(enum, interval); end + + # Find the place at which +value+ would normally be inserted into the + # Enumerable. If that place is already occupied by +value+, do nothing + # and return +nil+. If the place does not exist (i.e., it is off the end + # of the Enumerable), add it to the end. Otherwise, replace the element + # at that point with +value+. It is assumed that the Enumerable's values + # are numeric. + # + # This operation preserves the sort order. + # + # source://diff-lcs//lib/diff/lcs/internals.rb#252 + def replace_next_larger(enum, value, last_index = T.unsafe(nil)); end + end +end + +# This will produce a simple array of diff change objects. Each element in +# the #diffs array is a single ContextChange. In the set of #diffs provided +# by SDiffCallbacks, both old and new objects will be presented for both +# changed and unchanged objects. +nil+ will be substituted +# for a discarded object. +# +# The diffset produced by this callback, when provided to Diff::LCS#sdiff, +# will compute and display the necessary components to show two sequences +# and their minimized differences side by side, just like the Unix utility +# +sdiff+. +# +# same same +# before | after +# old < - +# - > new +# +# seq1 = %w(a b c e h j l m n p) +# seq2 = %w(b c d e f j k l m r s t) +# +# diffs = Diff::LCS.sdiff(seq1, seq2) +# # This example shows a simplified array format. +# # [ [ "-", [ 0, "a"], [ 0, nil ] ], +# # [ "=", [ 1, "b"], [ 0, "b" ] ], +# # [ "=", [ 2, "c"], [ 1, "c" ] ], +# # [ "+", [ 3, nil], [ 2, "d" ] ], +# # [ "=", [ 3, "e"], [ 3, "e" ] ], +# # [ "!", [ 4, "h"], [ 4, "f" ] ], +# # [ "=", [ 5, "j"], [ 5, "j" ] ], +# # [ "+", [ 6, nil], [ 6, "k" ] ], +# # [ "=", [ 6, "l"], [ 7, "l" ] ], +# # [ "=", [ 7, "m"], [ 8, "m" ] ], +# # [ "!", [ 8, "n"], [ 9, "r" ] ], +# # [ "!", [ 9, "p"], [ 10, "s" ] ], +# # [ "+", [ 10, nil], [ 11, "t" ] ] ] +# +# The result of this operation is similar to that of +# Diff::LCS::ContextDiffCallbacks. They may be compared as: +# +# s = Diff::LCS.sdiff(seq1, seq2).reject { |e| e.action == "=" } +# c = Diff::LCS.sdiff(seq1, seq2, Diff::LCS::ContextDiffCallbacks).flatten(1) +# +# s == c # -> true +# +# === Use +# +# This callback object must be initialised and is used by the Diff::LCS#sdiff +# method. +# +# cbo = Diff::LCS::SDiffCallbacks.new +# Diff::LCS.LCS(seq1, seq2, cbo) +# +# As with the other initialisable callback objects, +# Diff::LCS::SDiffCallbacks can be initialised with a block. As there is no +# "fininishing" to be done, this has no effect on the state of the object. +# +# cbo = Diff::LCS::SDiffCallbacks.new { |tcbo| Diff::LCS.LCS(seq1, seq2, tcbo) } +# +# === Simplified Array Format +# +# The simplified array format used in the example above can be obtained +# with: +# +# require 'pp' +# pp diffs.map { |e| e.to_a } +# +# source://diff-lcs//lib/diff/lcs/callbacks.rb#301 +class Diff::LCS::SDiffCallbacks + # :yields self: + # + # @return [SDiffCallbacks] a new instance of SDiffCallbacks + # @yield [_self] + # @yieldparam _self [Diff::LCS::SDiffCallbacks] the object that the method was called on + # + # source://diff-lcs//lib/diff/lcs/callbacks.rb#305 + def initialize; end + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#322 + def change(event); end + + # Returns the difference set collected during the diff process. + # + # source://diff-lcs//lib/diff/lcs/callbacks.rb#303 + def diffs; end + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#314 + def discard_a(event); end + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#318 + def discard_b(event); end + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#310 + def match(event); end +end + +# An alias for DefaultCallbacks that is used in +# Diff::LCS#traverse_sequences. +# +# Diff::LCS.LCS(seq1, seq2, Diff::LCS::SequenceCallbacks) +# +# source://diff-lcs//lib/diff/lcs/callbacks.rb#44 +Diff::LCS::SequenceCallbacks = Diff::LCS::DefaultCallbacks + +# source://diff-lcs//lib/diff/lcs.rb#52 +Diff::LCS::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/excon@0.104.0.rbi b/sorbet/rbi/gems/excon@0.109.0.rbi similarity index 92% rename from sorbet/rbi/gems/excon@0.104.0.rbi rename to sorbet/rbi/gems/excon@0.109.0.rbi index 9bf658671dc..a1a525c42ea 100644 --- a/sorbet/rbi/gems/excon@0.104.0.rbi +++ b/sorbet/rbi/gems/excon@0.109.0.rbi @@ -170,10 +170,10 @@ class Excon::Connection # # @param pipeline_params [Array] An array of one or more optional params, override defaults set in Connection.new, see #request for details # - # source://excon//lib/excon/connection.rb#351 + # source://excon//lib/excon/connection.rb#358 def batch_requests(pipeline_params, limit = T.unsafe(nil)); end - # source://excon//lib/excon/connection.rb#372 + # source://excon//lib/excon/connection.rb#379 def connect(params = T.unsafe(nil), &block); end # source://excon//lib/excon/connection.rb#10 @@ -187,19 +187,19 @@ class Excon::Connection # source://excon//lib/excon/connection.rb#8 def data; end - # source://excon//lib/excon/connection.rb#372 + # source://excon//lib/excon/connection.rb#379 def delete(params = T.unsafe(nil), &block); end # source://excon//lib/excon/connection.rb#109 def error_call(datum); end - # source://excon//lib/excon/connection.rb#372 + # source://excon//lib/excon/connection.rb#379 def get(params = T.unsafe(nil), &block); end - # source://excon//lib/excon/connection.rb#372 + # source://excon//lib/excon/connection.rb#379 def head(params = T.unsafe(nil), &block); end - # source://excon//lib/excon/connection.rb#388 + # source://excon//lib/excon/connection.rb#395 def inspect; end # source://excon//lib/excon/connection.rb#37 @@ -208,7 +208,7 @@ class Excon::Connection # source://excon//lib/excon/connection.rb#42 def logger=(logger); end - # source://excon//lib/excon/connection.rb#372 + # source://excon//lib/excon/connection.rb#379 def options(params = T.unsafe(nil), &block); end # source://excon//lib/excon/connection.rb#19 @@ -217,10 +217,10 @@ class Excon::Connection # source://excon//lib/excon/connection.rb#23 def params=(new_params); end - # source://excon//lib/excon/connection.rb#372 + # source://excon//lib/excon/connection.rb#379 def patch(params = T.unsafe(nil), &block); end - # source://excon//lib/excon/connection.rb#372 + # source://excon//lib/excon/connection.rb#379 def post(params = T.unsafe(nil), &block); end # source://excon//lib/excon/connection.rb#28 @@ -229,7 +229,7 @@ class Excon::Connection # source://excon//lib/excon/connection.rb#32 def proxy=(new_proxy); end - # source://excon//lib/excon/connection.rb#372 + # source://excon//lib/excon/connection.rb#379 def put(params = T.unsafe(nil), &block); end # Sends the supplied request to the destination host. @@ -251,63 +251,68 @@ class Excon::Connection # # @param pipeline_params [Array] An array of one or more optional params, override defaults set in Connection.new, see #request for details # - # source://excon//lib/excon/connection.rb#324 + # source://excon//lib/excon/connection.rb#331 def requests(pipeline_params); end - # source://excon//lib/excon/connection.rb#362 + # source://excon//lib/excon/connection.rb#369 def reset; end # source://excon//lib/excon/connection.rb#209 def response_call(datum); end - # source://excon//lib/excon/connection.rb#383 + # source://excon//lib/excon/connection.rb#390 def retry_limit; end - # source://excon//lib/excon/connection.rb#378 + # source://excon//lib/excon/connection.rb#385 def retry_limit=(new_retry_limit); end - # source://excon//lib/excon/connection.rb#372 + # source://excon//lib/excon/connection.rb#379 def trace(params = T.unsafe(nil), &block); end - # source://excon//lib/excon/connection.rb#402 + # source://excon//lib/excon/connection.rb#409 def valid_request_keys(middlewares); end private - # source://excon//lib/excon/connection.rb#408 + # source://excon//lib/excon/connection.rb#415 def detect_content_length(body); end - # source://excon//lib/excon/connection.rb#522 + # source://excon//lib/excon/connection.rb#529 def proxy_from_env; end - # source://excon//lib/excon/connection.rb#509 + # source://excon//lib/excon/connection.rb#516 def proxy_match_host_port(host, port); end - # source://excon//lib/excon/connection.rb#501 + # source://excon//lib/excon/connection.rb#508 def raise_socket_error(error); end - # source://excon//lib/excon/connection.rb#459 + # source://excon//lib/excon/connection.rb#466 def response(datum = T.unsafe(nil)); end - # source://excon//lib/excon/connection.rb#550 + # source://excon//lib/excon/connection.rb#557 def setup_proxy; end - # source://excon//lib/excon/connection.rb#470 + # source://excon//lib/excon/connection.rb#477 def socket(datum = T.unsafe(nil)); end - # source://excon//lib/excon/connection.rb#481 + # source://excon//lib/excon/connection.rb#488 def sockets; end - # source://excon//lib/excon/connection.rb#420 + # source://excon//lib/excon/connection.rb#427 def valid_middleware_keys(middlewares); end - # source://excon//lib/excon/connection.rb#433 + # source://excon//lib/excon/connection.rb#440 def validate_params(validation, params, middlewares); end + + class << self + # source://webmock/3.19.1/lib/webmock/http_lib_adapters/excon_adapter.rb#157 + def new(args = T.unsafe(nil)); end + end end # these come last as they rely on the above # -# source://excon//lib/excon/constants.rb#138 +# source://excon//lib/excon/constants.rb#139 Excon::DEFAULTS = T.let(T.unsafe(nil), Hash) # source://excon//lib/excon/constants.rb#6 @@ -327,7 +332,7 @@ Excon::DEFAULT_RETRY_ERRORS = T.let(T.unsafe(nil), Array) # source://excon//lib/excon/constants.rb#17 Excon::DEFAULT_RETRY_LIMIT = T.let(T.unsafe(nil), Integer) -# source://excon//lib/excon/constants.rb#114 +# source://excon//lib/excon/constants.rb#115 Excon::DEPRECATED_VALID_REQUEST_KEYS = T.let(T.unsafe(nil), Hash) # Excon exception classes @@ -1236,7 +1241,7 @@ class Excon::Socket # @return [Socket] a new instance of Socket # - # source://excon//lib/excon/socket.rb#44 + # source://excon//lib/excon/socket.rb#51 def initialize(data = T.unsafe(nil)); end # source://forwardable/1.3.2/forwardable.rb#229 @@ -1254,56 +1259,75 @@ class Excon::Socket # source://excon//lib/excon/socket.rb#10 def data=(_arg0); end - # source://excon//lib/excon/socket.rb#101 + # source://excon//lib/excon/socket.rb#112 def local_address; end - # source://excon//lib/excon/socket.rb#105 + # source://excon//lib/excon/socket.rb#116 def local_port; end - # source://excon//lib/excon/socket.rb#29 + # source://excon//lib/excon/socket.rb#36 def params; end - # source://excon//lib/excon/socket.rb#34 + # source://excon//lib/excon/socket.rb#41 def params=(new_params); end - # source://excon//lib/excon/socket.rb#54 + # source://excon//lib/excon/socket.rb#63 def read(max_length = T.unsafe(nil)); end - # source://excon//lib/excon/socket.rb#64 + # source://excon//lib/excon/socket.rb#73 def readline; end # Returns the value of attribute remote_ip. # - # source://excon//lib/excon/socket.rb#39 + # source://excon//lib/excon/socket.rb#46 def remote_ip; end - # source://excon//lib/excon/socket.rb#93 + # source://excon//lib/excon/socket.rb#104 def write(data); end private - # source://excon//lib/excon/socket.rb#200 - def add_to_read_buffer(str); end - - # source://excon//lib/excon/socket.rb#111 + # source://excon//lib/excon/socket.rb#122 def connect; end - # source://excon//lib/excon/socket.rb#247 + # Consume any bytes remaining in the read buffer before making a system call. + # + # source://excon//lib/excon/socket.rb#212 + def consume_read_buffer; end + + # source://excon//lib/excon/socket.rb#300 def read_block(max_length); end - # source://excon//lib/excon/socket.rb#205 + # source://excon//lib/excon/socket.rb#227 def read_nonblock(max_length); end - # source://excon//lib/excon/socket.rb#306 + # source://excon//lib/excon/socket.rb#296 + def readable_bytes; end + + # Returns the remaining time in seconds until we reach the deadline for the request timeout. + # Raises an exception if we have exceeded the request timeout's deadline. + # + # @raise [Excon::Errors::Timeout] + # + # source://excon//lib/excon/socket.rb#399 + def request_time_remaining; end + + # Rewind the read buffer to just after the given index. + # The offset is moved back to the start of the current chunk and then forward until just after the index. + # + # source://excon//lib/excon/socket.rb#222 + def rewind_read_buffer(chunk, idx); end + + # source://excon//lib/excon/socket.rb#359 def select_with_timeout(socket, type); end - # source://excon//lib/excon/socket.rb#320 + # source://excon//lib/excon/socket.rb#389 def unpacked_sockaddr; end - # source://excon//lib/excon/socket.rb#296 + # source://excon//lib/excon/socket.rb#349 def write_block(data); end - # source://excon//lib/excon/socket.rb#261 + # source://excon//lib/excon/socket.rb#314 def write_nonblock(data); end end @@ -1312,6 +1336,11 @@ end # source://excon//lib/excon/socket.rb#13 Excon::Socket::CONNECT_RETRY_EXCEPTION_CLASSES = T.let(T.unsafe(nil), Array) +# Maps a socket operation to a timeout property. +# +# source://excon//lib/excon/socket.rb#29 +Excon::Socket::OPERATION_TO_TIMEOUT = T.let(T.unsafe(nil), Hash) + # Ruby >= 2.1 # # source://excon//lib/excon/socket.rb#18 @@ -1412,7 +1441,7 @@ Excon::Utils::UNESCAPED = T.let(T.unsafe(nil), Regexp) # source://excon//lib/excon/utils.rb#8 Excon::Utils::UNWISE = T.let(T.unsafe(nil), String) -# source://excon//lib/excon/constants.rb#70 +# source://excon//lib/excon/constants.rb#71 Excon::VALID_CONNECTION_KEYS = T.let(T.unsafe(nil), Array) # source://excon//lib/excon/constants.rb#43 diff --git a/sorbet/rbi/gems/io-console@0.7.2.rbi b/sorbet/rbi/gems/io-console@0.7.2.rbi new file mode 100644 index 00000000000..ffc1f7aa924 --- /dev/null +++ b/sorbet/rbi/gems/io-console@0.7.2.rbi @@ -0,0 +1,8 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `io-console` gem. +# Please instead update this file by running `bin/tapioca gem io-console`. + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/parallel_tests@4.4.0.rbi b/sorbet/rbi/gems/parallel_tests@4.4.0.rbi new file mode 100644 index 00000000000..e7904724bb9 --- /dev/null +++ b/sorbet/rbi/gems/parallel_tests@4.4.0.rbi @@ -0,0 +1,417 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `parallel_tests` gem. +# Please instead update this file by running `bin/tapioca gem parallel_tests`. + +# rake tasks for Rails 3+ +# +# source://parallel_tests//lib/parallel_tests.rb#6 +module ParallelTests + class << self + # copied from http://github.com/carlhuda/bundler Bundler::SharedHelpers#find_gemfile + # + # @return [Boolean] + # + # source://parallel_tests//lib/parallel_tests.rb#50 + def bundler_enabled?; end + + # source://parallel_tests//lib/parallel_tests.rb#95 + def delta; end + + # source://parallel_tests//lib/parallel_tests.rb#16 + def determine_number_of_processes(count); end + + # @return [Boolean] + # + # source://parallel_tests//lib/parallel_tests.rb#66 + def first_process?; end + + # @return [Boolean] + # + # source://parallel_tests//lib/parallel_tests.rb#70 + def last_process?; end + + # source://parallel_tests//lib/parallel_tests.rb#91 + def now; end + + # source://parallel_tests//lib/parallel_tests.rb#87 + def number_of_running_processes; end + + # source://parallel_tests//lib/parallel_tests.rb#41 + def pid_file_path; end + + # source://parallel_tests//lib/parallel_tests.rb#37 + def pids; end + + # source://parallel_tests//lib/parallel_tests.rb#45 + def stop_all_processes; end + + # source://parallel_tests//lib/parallel_tests.rb#82 + def wait_for_other_processes_to_finish; end + + # source://parallel_tests//lib/parallel_tests.rb#24 + def with_pid_file; end + + # source://parallel_tests//lib/parallel_tests.rb#78 + def with_ruby_binary(command); end + end +end + +# source://parallel_tests//lib/parallel_tests/cli.rb#9 +class ParallelTests::CLI + # source://parallel_tests//lib/parallel_tests/cli.rb#10 + def run(argv); end + + private + + # exit with correct status code so rake parallel:test && echo 123 works + # + # @return [Boolean] + # + # source://parallel_tests//lib/parallel_tests/cli.rb#177 + def any_test_failed?(test_results); end + + # source://parallel_tests//lib/parallel_tests/cli.rb#347 + def append_test_options(options, argv); end + + # source://parallel_tests//lib/parallel_tests/cli.rb#388 + def detailed_duration(seconds); end + + # source://parallel_tests//lib/parallel_tests/cli.rb#362 + def execute_command_in_parallel(command, num_processes, options); end + + # source://parallel_tests//lib/parallel_tests/cli.rb#56 + def execute_in_parallel(items, num_processes, options); end + + # source://parallel_tests//lib/parallel_tests/cli.rb#336 + def extract_file_paths(argv); end + + # source://parallel_tests//lib/parallel_tests/cli.rb#342 + def extract_test_options(argv); end + + # source://parallel_tests//lib/parallel_tests/cli.rb#395 + def final_fail_message; end + + # @return [Boolean] + # + # source://parallel_tests//lib/parallel_tests/cli.rb#405 + def first_is_1?; end + + # source://parallel_tests//lib/parallel_tests/cli.rb#31 + def handle_interrupt; end + + # source://parallel_tests//lib/parallel_tests/cli.rb#355 + def load_runner(type); end + + # source://parallel_tests//lib/parallel_tests/cli.rb#126 + def lock(lockfile); end + + # source://parallel_tests//lib/parallel_tests/cli.rb#181 + def parse_options!(argv); end + + # source://parallel_tests//lib/parallel_tests/cli.rb#166 + def pluralize(n, singular); end + + # source://parallel_tests//lib/parallel_tests/cli.rb#144 + def report_failure_rerun_commmand(test_results, options); end + + # source://parallel_tests//lib/parallel_tests/cli.rb#158 + def report_number_of_tests(groups); end + + # source://parallel_tests//lib/parallel_tests/cli.rb#136 + def report_results(test_results, options); end + + # source://parallel_tests//lib/parallel_tests/cli.rb#383 + def report_time_taken(&block); end + + # source://parallel_tests//lib/parallel_tests/cli.rb#118 + def reprint_output(result, lockfile); end + + # source://parallel_tests//lib/parallel_tests/cli.rb#110 + def run_tests(group, process_number, num_processes, options); end + + # source://parallel_tests//lib/parallel_tests/cli.rb#71 + def run_tests_in_parallel(num_processes, options); end + + # CI systems often fail when there is no output for a long time, so simulate some output + # + # source://parallel_tests//lib/parallel_tests/cli.rb#411 + def simulate_output_for_ci(simulate); end + + # @return [Boolean] + # + # source://parallel_tests//lib/parallel_tests/cli.rb#401 + def use_colors?; end +end + +# source://parallel_tests//lib/parallel_tests/grouper.rb#3 +class ParallelTests::Grouper + class << self + # source://parallel_tests//lib/parallel_tests/grouper.rb#10 + def by_scenarios(tests, num_groups, options = T.unsafe(nil)); end + + # source://parallel_tests//lib/parallel_tests/grouper.rb#5 + def by_steps(tests, num_groups, options); end + + # source://parallel_tests//lib/parallel_tests/grouper.rb#15 + def in_even_groups_by_size(items, num_groups, options = T.unsafe(nil)); end + + private + + # source://parallel_tests//lib/parallel_tests/grouper.rb#113 + def add_to_group(group, item, size); end + + # source://parallel_tests//lib/parallel_tests/grouper.rb#118 + def group_by_features_with_steps(tests, options); end + + # source://parallel_tests//lib/parallel_tests/grouper.rb#123 + def group_by_scenarios(tests, options = T.unsafe(nil)); end + + # source://parallel_tests//lib/parallel_tests/grouper.rb#128 + def group_features_by_size(items, groups_to_fill); end + + # source://parallel_tests//lib/parallel_tests/grouper.rb#95 + def isolate_count(options); end + + # source://parallel_tests//lib/parallel_tests/grouper.rb#136 + def items_to_group(items); end + + # source://parallel_tests//lib/parallel_tests/grouper.rb#105 + def largest_first(files); end + + # source://parallel_tests//lib/parallel_tests/grouper.rb#109 + def smallest_group(groups); end + + # source://parallel_tests//lib/parallel_tests/grouper.rb#51 + def specify_groups(items, num_groups, options, groups); end + end +end + +# source://parallel_tests//lib/parallel_tests/pids.rb#5 +class ParallelTests::Pids + # @return [Pids] a new instance of Pids + # + # source://parallel_tests//lib/parallel_tests/pids.rb#8 + def initialize(file_path); end + + # source://parallel_tests//lib/parallel_tests/pids.rb#13 + def add(pid); end + + # source://parallel_tests//lib/parallel_tests/pids.rb#28 + def all; end + + # source://parallel_tests//lib/parallel_tests/pids.rb#23 + def count; end + + # source://parallel_tests//lib/parallel_tests/pids.rb#18 + def delete(pid); end + + # Returns the value of attribute file_path. + # + # source://parallel_tests//lib/parallel_tests/pids.rb#6 + def file_path; end + + # Returns the value of attribute mutex. + # + # source://parallel_tests//lib/parallel_tests/pids.rb#6 + def mutex; end + + private + + # source://parallel_tests//lib/parallel_tests/pids.rb#39 + def clear; end + + # source://parallel_tests//lib/parallel_tests/pids.rb#35 + def pids; end + + # source://parallel_tests//lib/parallel_tests/pids.rb#44 + def read; end + + # source://parallel_tests//lib/parallel_tests/pids.rb#52 + def save; end + + # source://parallel_tests//lib/parallel_tests/pids.rb#56 + def sync(&block); end +end + +# source://parallel_tests//lib/parallel_tests/rspec/runner.rb#5 +module ParallelTests::RSpec; end + +# source://parallel_tests//lib/parallel_tests/rspec/runner.rb#6 +class ParallelTests::RSpec::Runner < ::ParallelTests::Test::Runner + class << self + # remove old seed and add new seed + # --seed 1234 + # --order rand + # --order rand:1234 + # --order random:1234 + # + # source://parallel_tests//lib/parallel_tests/rspec/runner.rb#51 + def command_with_seed(cmd, seed); end + + # source://parallel_tests//lib/parallel_tests/rspec/runner.rb#28 + def default_test_folder; end + + # source://parallel_tests//lib/parallel_tests/rspec/runner.rb#14 + def determine_executable; end + + # @return [Boolean] + # + # source://parallel_tests//lib/parallel_tests/rspec/runner.rb#42 + def line_is_result?(line); end + + # source://parallel_tests//lib/parallel_tests/rspec/runner.rb#9 + def run_tests(test_files, process_number, num_processes, options); end + + # source://parallel_tests//lib/parallel_tests/rspec/runner.rb#24 + def runtime_log; end + + # Summarize results from threads and colorize results based on failure and pending counts. + # + # source://parallel_tests//lib/parallel_tests/rspec/runner.rb#58 + def summarize_results(results); end + + # source://parallel_tests//lib/parallel_tests/rspec/runner.rb#32 + def test_file_name; end + + # used to find all _spec.rb files + # supports also feature files used by rspec turnip extension + # + # source://parallel_tests//lib/parallel_tests/rspec/runner.rb#38 + def test_suffix; end + + private + + # source://parallel_tests//lib/parallel_tests/rspec/runner.rb#75 + def color; end + + # source://parallel_tests//lib/parallel_tests/rspec/runner.rb#79 + def spec_opts; end + end +end + +# source://parallel_tests//lib/parallel_tests/rspec/runner.rb#7 +ParallelTests::RSpec::Runner::DEV_NULL = T.let(T.unsafe(nil), String) + +# source://parallel_tests//lib/parallel_tests.rb#8 +ParallelTests::RUBY_BINARY = T.let(T.unsafe(nil), String) + +# source://parallel_tests//lib/parallel_tests/test/runner.rb#6 +module ParallelTests::Test; end + +# source://parallel_tests//lib/parallel_tests/test/runner.rb#7 +class ParallelTests::Test::Runner + class << self + # remove old seed and add new seed + # + # source://parallel_tests//lib/parallel_tests/test/runner.rb#152 + def command_with_seed(cmd, seed); end + + # source://parallel_tests//lib/parallel_tests/test/runner.rb#21 + def default_test_folder; end + + # source://parallel_tests//lib/parallel_tests/test/runner.rb#88 + def execute_command(cmd, process_number, num_processes, options); end + + # source://parallel_tests//lib/parallel_tests/test/runner.rb#110 + def execute_command_and_capture_output(env, cmd, options); end + + # source://parallel_tests//lib/parallel_tests/test/runner.rb#129 + def find_results(test_output); end + + # ignores other commands runner noise + # + # @return [Boolean] + # + # source://parallel_tests//lib/parallel_tests/test/runner.rb#43 + def line_is_result?(line); end + + # source://parallel_tests//lib/parallel_tests/test/runner.rb#105 + def print_command(command, env); end + + # source://parallel_tests//lib/parallel_tests/test/runner.rb#29 + def run_tests(test_files, process_number, num_processes, options); end + + # --- usually overwritten by other runners + # + # source://parallel_tests//lib/parallel_tests/test/runner.rb#13 + def runtime_log; end + + # source://parallel_tests//lib/parallel_tests/test/runner.rb#146 + def summarize_results(results); end + + # source://parallel_tests//lib/parallel_tests/test/runner.rb#138 + def test_env_number(process_number, options = T.unsafe(nil)); end + + # source://parallel_tests//lib/parallel_tests/test/runner.rb#25 + def test_file_name; end + + # source://parallel_tests//lib/parallel_tests/test/runner.rb#17 + def test_suffix; end + + # finds all tests and partitions them into groups + # + # source://parallel_tests//lib/parallel_tests/test/runner.rb#50 + def tests_in_groups(tests, num_groups, options = T.unsafe(nil)); end + + # source://parallel_tests//lib/parallel_tests/test/runner.rb#55 + def tests_with_size(tests, options); end + + protected + + # read output of the process and print it in chunks + # + # source://parallel_tests//lib/parallel_tests/test/runner.rb#180 + def capture_output(out, env, options = T.unsafe(nil)); end + + # source://parallel_tests//lib/parallel_tests/test/runner.rb#167 + def determine_executable; end + + # source://parallel_tests//lib/parallel_tests/test/runner.rb#159 + def executable; end + + # source://parallel_tests//lib/parallel_tests/test/runner.rb#254 + def files_in_folder(folder, options = T.unsafe(nil)); end + + # source://parallel_tests//lib/parallel_tests/test/runner.rb#237 + def find_tests(tests, options = T.unsafe(nil)); end + + # source://parallel_tests//lib/parallel_tests/test/runner.rb#265 + def remove_command_arguments(command, *args); end + + # source://parallel_tests//lib/parallel_tests/test/runner.rb#222 + def runtimes(tests, options); end + + # source://parallel_tests//lib/parallel_tests/test/runner.rb#232 + def sort_by_filesize(tests); end + + # source://parallel_tests//lib/parallel_tests/test/runner.rb#202 + def sort_by_runtime(tests, runtimes, options = T.unsafe(nil)); end + + # source://parallel_tests//lib/parallel_tests/test/runner.rb#171 + def sum_up_results(results); end + + private + + # @return [Boolean] + # + # source://parallel_tests//lib/parallel_tests/test/runner.rb#292 + def report_process_command?(options); end + + # fill gaps with unknown-runtime if given, average otherwise + # NOTE: an optimization could be doing runtime by average runtime per file size, but would need file checks + # + # source://parallel_tests//lib/parallel_tests/test/runner.rb#284 + def set_unknown_runtime(tests, options); end + end +end + +# source://parallel_tests//lib/parallel_tests/test/runner.rb#8 +class ParallelTests::Test::Runner::RuntimeLogTooSmallError < ::StandardError; end + +# source://parallel_tests//lib/parallel_tests/version.rb#3 +ParallelTests::VERSION = T.let(T.unsafe(nil), String) + +# source://parallel_tests//lib/parallel_tests.rb#7 +ParallelTests::WINDOWS = T.let(T.unsafe(nil), T.untyped) diff --git a/sorbet/rbi/gems/rdoc@6.6.2.rbi b/sorbet/rbi/gems/rdoc@6.6.2.rbi new file mode 100644 index 00000000000..5013c8a9e8a --- /dev/null +++ b/sorbet/rbi/gems/rdoc@6.6.2.rbi @@ -0,0 +1,12694 @@ +# typed: false + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rdoc` gem. +# Please instead update this file by running `bin/tapioca gem rdoc`. + +# RDoc produces documentation for Ruby source files by parsing the source and +# extracting the definition for classes, modules, methods, includes and +# requires. It associates these with optional documentation contained in an +# immediately preceding comment block then renders the result using an output +# formatter. +# +# For a simple introduction to writing or generating documentation using RDoc +# see the README. +# +# == Roadmap +# +# If you think you found a bug in RDoc see CONTRIBUTING@Bugs +# +# If you want to use RDoc to create documentation for your Ruby source files, +# see RDoc::Markup and refer to rdoc --help for command line usage. +# +# If you want to set the default markup format see +# RDoc::Markup@Supported+Formats +# +# If you want to store rdoc configuration in your gem (such as the default +# markup format) see RDoc::Options@Saved+Options +# +# If you want to write documentation for Ruby files see RDoc::Parser::Ruby +# +# If you want to write documentation for extensions written in C see +# RDoc::Parser::C +# +# If you want to generate documentation using rake see RDoc::Task. +# +# If you want to drive RDoc programmatically, see RDoc::RDoc. +# +# If you want to use the library to format text blocks into HTML or other +# formats, look at RDoc::Markup. +# +# If you want to make an RDoc plugin such as a generator or directive handler +# see RDoc::RDoc. +# +# If you want to write your own output generator see RDoc::Generator. +# +# If you want an overview of how RDoc works see CONTRIBUTING +# +# == Credits +# +# RDoc is currently being maintained by Eric Hodel . +# +# Dave Thomas is the original author of RDoc. +# +# * The Ruby parser in rdoc/parse.rb is based heavily on the outstanding +# work of Keiju ISHITSUKA of Nippon Rational Inc, who produced the Ruby +# parser for irb and the rtags package. +# +# source://rdoc//lib/rdoc.rb#58 +module RDoc + class << self + # Seaches and returns the directory for settings. + # + # 1. $HOME/.rdoc directory, if it exists. + # 2. The +rdoc+ directory under the path specified by the + # +XDG_DATA_HOME+ environment variable, if it is set. + # 3. $HOME/.local/share/rdoc directory. + # + # Other than the home directory, the containing directory will be + # created automatically. + # + # source://rdoc//lib/rdoc.rb#134 + def home; end + + # Loads the best available YAML library. + # + # source://rdoc//lib/rdoc.rb#107 + def load_yaml; end + end +end + +# Represent an alias, which is an old_name/new_name pair associated with a +# particular context +# -- +# TODO implement Alias as a proxy to a method/attribute, inheriting from +# MethodAttr +# +# source://rdoc//lib/rdoc/alias.rb#9 +class RDoc::Alias < ::RDoc::CodeObject + # Creates a new Alias with a token stream of +text+ that aliases +old_name+ + # to +new_name+, has +comment+ and is a +singleton+ context. + # + # @return [Alias] a new instance of Alias + # + # source://rdoc//lib/rdoc/alias.rb#37 + def initialize(text, old_name, new_name, comment, singleton = T.unsafe(nil)); end + + # Order by #singleton then #new_name + # + # source://rdoc//lib/rdoc/alias.rb#50 + def <=>(other); end + + # HTML fragment reference for this alias + # + # source://rdoc//lib/rdoc/alias.rb#57 + def aref; end + + # Full old name including namespace + # + # source://rdoc//lib/rdoc/alias.rb#65 + def full_old_name; end + + # HTML id-friendly version of +#new_name+. + # + # source://rdoc//lib/rdoc/alias.rb#72 + def html_name; end + + # source://rdoc//lib/rdoc/alias.rb#76 + def inspect; end + + # Aliased method's name + # + # source://rdoc//lib/rdoc/alias.rb#14 + def name; end + + # '::' for the alias of a singleton method/attribute, '#' for instance-level. + # + # source://rdoc//lib/rdoc/alias.rb#87 + def name_prefix; end + + # Aliased method's name + # + # source://rdoc//lib/rdoc/alias.rb#14 + def new_name; end + + # Aliasee method's name + # + # source://rdoc//lib/rdoc/alias.rb#21 + def old_name; end + + # New name with prefix '::' or '#'. + # + # source://rdoc//lib/rdoc/alias.rb#101 + def pretty_name; end + + # New name with prefix '::' or '#'. + # + # source://rdoc//lib/rdoc/alias.rb#101 + def pretty_new_name; end + + # Old name with prefix '::' or '#'. + # + # source://rdoc//lib/rdoc/alias.rb#94 + def pretty_old_name; end + + # Is this an alias declared in a singleton context? + # + # source://rdoc//lib/rdoc/alias.rb#26 + def singleton; end + + # Is this an alias declared in a singleton context? + # + # source://rdoc//lib/rdoc/alias.rb#26 + def singleton=(_arg0); end + + # Source file token stream + # + # source://rdoc//lib/rdoc/alias.rb#31 + def text; end + + # source://rdoc//lib/rdoc/alias.rb#107 + def to_s; end +end + +# AnyMethod is the base class for objects representing methods +# +# source://rdoc//lib/rdoc/any_method.rb#5 +class RDoc::AnyMethod < ::RDoc::MethodAttr + include ::RDoc::TokenStream + + # Creates a new AnyMethod with a token stream +text+ and +name+ + # + # @return [AnyMethod] a new instance of AnyMethod + # + # source://rdoc//lib/rdoc/any_method.rb#46 + def initialize(text, name); end + + # Adds +an_alias+ as an alias for this method in +context+. + # + # source://rdoc//lib/rdoc/any_method.rb#59 + def add_alias(an_alias, context = T.unsafe(nil)); end + + # Prefix for +aref+ is 'method'. + # + # source://rdoc//lib/rdoc/any_method.rb#76 + def aref_prefix; end + + # The call_seq or the param_seq with method name, if there is no call_seq. + # + # Use this for displaying a method's argument lists. + # + # source://rdoc//lib/rdoc/any_method.rb#85 + def arglists; end + + # The C function that implements this method (if it was defined in a C file) + # + # source://rdoc//lib/rdoc/any_method.rb#27 + def c_function; end + + # The C function that implements this method (if it was defined in a C file) + # + # source://rdoc//lib/rdoc/any_method.rb#27 + def c_function=(_arg0); end + + # Different ways to call this method + # + # source://rdoc//lib/rdoc/any_method.rb#96 + def call_seq; end + + # Sets the different ways you can call this method. If an empty +call_seq+ + # is given nil is assumed. + # + # See also #param_seq + # + # source://rdoc//lib/rdoc/any_method.rb#112 + def call_seq=(call_seq); end + + # If true this method uses +super+ to call a superclass version + # + # source://rdoc//lib/rdoc/any_method.rb#39 + def calls_super; end + + # If true this method uses +super+ to call a superclass version + # + # source://rdoc//lib/rdoc/any_method.rb#39 + def calls_super=(_arg0); end + + # Don't rename \#initialize to \::new + # + # source://rdoc//lib/rdoc/any_method.rb#22 + def dont_rename_initialize; end + + # Don't rename \#initialize to \::new + # + # source://rdoc//lib/rdoc/any_method.rb#22 + def dont_rename_initialize=(_arg0); end + + # Whether the method has a call-seq. + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/any_method.rb#121 + def has_call_seq?; end + + # Loads is_alias_for from the internal name. Returns nil if the alias + # cannot be found. + # + # source://rdoc//lib/rdoc/any_method.rb#129 + def is_alias_for; end + + # Dumps this AnyMethod for use by ri. See also #marshal_load + # + # source://rdoc//lib/rdoc/any_method.rb#147 + def marshal_dump; end + + # Loads this AnyMethod from +array+. For a loaded AnyMethod the following + # methods will return cached values: + # + # * #full_name + # * #parent_name + # + # source://rdoc//lib/rdoc/any_method.rb#184 + def marshal_load(array); end + + # Method name + # + # If the method has no assigned name, it extracts it from #call_seq. + # + # source://rdoc//lib/rdoc/any_method.rb#233 + def name; end + + # A list of this method's method and yield parameters. +call-seq+ params + # are preferred over parsed method and block params. + # + # source://rdoc//lib/rdoc/any_method.rb#246 + def param_list; end + + # Pretty parameter list for this method. If the method's parameters were + # given by +call-seq+ it is preferred over the parsed values. + # + # source://rdoc//lib/rdoc/any_method.rb#278 + def param_seq; end + + # Parameters for this method + # + # source://rdoc//lib/rdoc/any_method.rb#34 + def params; end + + # Parameters for this method + # + # source://rdoc//lib/rdoc/any_method.rb#34 + def params=(_arg0); end + + # The section title of the method (if defined in a C file via +:category:+) + # + # source://rdoc//lib/rdoc/any_method.rb#30 + def section_title; end + + # The section title of the method (if defined in a C file via +:category:+) + # + # source://rdoc//lib/rdoc/any_method.rb#30 + def section_title=(_arg0); end + + # Whether to skip the method description, true for methods that have + # aliases with a call-seq that doesn't include the method name. + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/any_method.rb#310 + def skip_description?; end + + # Sets the store for this method and its referenced code objects. + # + # source://rdoc//lib/rdoc/any_method.rb#317 + def store=(store); end + + # For methods that +super+, find the superclass method that would be called. + # + # source://rdoc//lib/rdoc/any_method.rb#326 + def superclass_method; end + + protected + + # call_seq without deduplication and alias lookup. + # + # source://rdoc//lib/rdoc/any_method.rb#345 + def _call_seq; end + + private + + # call_seq with alias examples information removed, if this + # method is an alias method. + # + # source://rdoc//lib/rdoc/any_method.rb#355 + def deduplicate_call_seq(call_seq); end +end + +# An attribute created by \#attr, \#attr_reader, \#attr_writer or +# \#attr_accessor +# +# source://rdoc//lib/rdoc/attr.rb#6 +class RDoc::Attr < ::RDoc::MethodAttr + # Creates a new Attr with body +text+, +name+, read/write status +rw+ and + # +comment+. +singleton+ marks this as a class attribute. + # + # @return [Attr] a new instance of Attr + # + # source://rdoc//lib/rdoc/attr.rb#25 + def initialize(text, name, rw, comment, singleton = T.unsafe(nil)); end + + # Attributes are equal when their names, singleton and rw are identical + # + # source://rdoc//lib/rdoc/attr.rb#36 + def ==(other); end + + # Add +an_alias+ as an attribute in +context+. + # + # source://rdoc//lib/rdoc/attr.rb#46 + def add_alias(an_alias, context); end + + # The #aref prefix for attributes + # + # source://rdoc//lib/rdoc/attr.rb#61 + def aref_prefix; end + + # Attributes never call super. See RDoc::AnyMethod#calls_super + # + # An RDoc::Attr can show up in the method list in some situations (see + # Gem::ConfigFile) + # + # source://rdoc//lib/rdoc/attr.rb#71 + def calls_super; end + + # Returns attr_reader, attr_writer or attr_accessor as appropriate. + # + # source://rdoc//lib/rdoc/attr.rb#78 + def definition; end + + # source://rdoc//lib/rdoc/attr.rb#86 + def inspect; end + + # Dumps this Attr for use by ri. See also #marshal_load + # + # source://rdoc//lib/rdoc/attr.rb#102 + def marshal_dump; end + + # Loads this Attr from +array+. For a loaded Attr the following + # methods will return cached values: + # + # * #full_name + # * #parent_name + # + # source://rdoc//lib/rdoc/attr.rb#124 + def marshal_load(array); end + + # source://rdoc//lib/rdoc/attr.rb#151 + def pretty_print(q); end + + # Is the attribute readable ('R'), writable ('W') or both ('RW')? + # + # source://rdoc//lib/rdoc/attr.rb#19 + def rw; end + + # Is the attribute readable ('R'), writable ('W') or both ('RW')? + # + # source://rdoc//lib/rdoc/attr.rb#19 + def rw=(_arg0); end + + # source://rdoc//lib/rdoc/attr.rb#162 + def to_s; end + + # Attributes do not have token streams. + # + # An RDoc::Attr can show up in the method list in some situations (see + # Gem::ConfigFile) + # + # source://rdoc//lib/rdoc/attr.rb#172 + def token_stream; end +end + +# ClassModule is the base class for objects representing either a class or a +# module. +# +# source://rdoc//lib/rdoc/class_module.rb#6 +class RDoc::ClassModule < ::RDoc::Context + # Creates a new ClassModule with +name+ with optional +superclass+ + # + # This is a constructor for subclasses, and must never be called directly. + # + # @return [ClassModule] a new instance of ClassModule + # + # source://rdoc//lib/rdoc/class_module.rb#111 + def initialize(name, superclass = T.unsafe(nil)); end + + # Adds +comment+ to this ClassModule's list of comments at +location+. This + # method is preferred over #comment= since it allows ri data to be updated + # across multiple runs. + # + # source://rdoc//lib/rdoc/class_module.rb#127 + def add_comment(comment, location); end + + # source://rdoc//lib/rdoc/class_module.rb#148 + def add_things(my_things, other_things); end + + # Ancestors list for this ClassModule: the list of included modules + # (classes will add their superclass if any). + # + # Returns the included classes or modules, not the includes + # themselves. The returned values are either String or + # RDoc::NormalModule instances (see RDoc::Include#module). + # + # The values are returned in reverse order of their inclusion, + # which is the order suitable for searching methods/attributes + # in the ancestors. The superclass, if any, comes last. + # + # source://rdoc//lib/rdoc/class_module.rb#171 + def ancestors; end + + # HTML fragment reference for this module or class. See + # RDoc::NormalClass#aref and RDoc::NormalModule#aref + # + # source://rdoc//lib/rdoc/class_module.rb#183 + def aref; end + + # @raise [NotImplementedError] + # + # source://rdoc//lib/rdoc/class_module.rb#175 + def aref_prefix; end + + # Clears the comment. Used by the Ruby parser. + # + # source://rdoc//lib/rdoc/class_module.rb#195 + def clear_comment; end + + # This method is deprecated, use #add_comment instead. + # + # Appends +comment+ to the current comment, but separated by a rule. Works + # more like +=. + # + # source://rdoc//lib/rdoc/class_module.rb#205 + def comment=(comment); end + + # Comment and the location it came from. Use #add_comment to add comments + # + # source://rdoc//lib/rdoc/class_module.rb#35 + def comment_location; end + + # Comment and the location it came from. Use #add_comment to add comments + # + # source://rdoc//lib/rdoc/class_module.rb#35 + def comment_location=(_arg0); end + + # Prepares this ClassModule for use by a generator. + # + # See RDoc::Store#complete + # + # source://rdoc//lib/rdoc/class_module.rb#223 + def complete(min_visibility); end + + # Constants that are aliases for this class or module + # + # source://rdoc//lib/rdoc/class_module.rb#30 + def constant_aliases; end + + # Constants that are aliases for this class or module + # + # source://rdoc//lib/rdoc/class_module.rb#30 + def constant_aliases=(_arg0); end + + # Handy wrapper for marking up this class or module's comment + # + # source://rdoc//lib/rdoc/generator/markup.rb#131 + def description; end + + # source://rdoc//lib/rdoc/class_module.rb#37 + def diagram; end + + # source://rdoc//lib/rdoc/class_module.rb#37 + def diagram=(_arg0); end + + # Ancestors list for this ClassModule: the list of included modules + # (classes will add their superclass if any). + # + # Returns the included classes or modules, not the includes + # themselves. The returned values are either String or + # RDoc::NormalModule instances (see RDoc::Include#module). + # + # The values are returned in reverse order of their inclusion, + # which is the order suitable for searching methods/attributes + # in the ancestors. The superclass, if any, comes last. + # + # Ancestors of this class or module only + # + # source://rdoc//lib/rdoc/class_module.rb#171 + def direct_ancestors; end + + # Does this ClassModule or any of its methods have document_self set? + # + # source://rdoc//lib/rdoc/class_module.rb#233 + def document_self_or_methods; end + + # Does this class or module have a comment with content or is + # #received_nodoc true? + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/class_module.rb#241 + def documented?; end + + # Iterates the ancestors of this class or module for which an + # RDoc::ClassModule exists. + # + # source://rdoc//lib/rdoc/class_module.rb#251 + def each_ancestor; end + + # Looks for a symbol in the #ancestors. See Context#find_local_symbol. + # + # source://rdoc//lib/rdoc/class_module.rb#264 + def find_ancestor_local_symbol(symbol); end + + # Finds a class or module with +name+ in this namespace or its descendants + # + # source://rdoc//lib/rdoc/class_module.rb#276 + def find_class_named(name); end + + # Return the fully qualified name of this class or module + # + # source://rdoc//lib/rdoc/class_module.rb#289 + def full_name; end + + # Class or module this constant is an alias for + # + # source://rdoc//lib/rdoc/class_module.rb#42 + def is_alias_for; end + + # Class or module this constant is an alias for + # + # source://rdoc//lib/rdoc/class_module.rb#42 + def is_alias_for=(_arg0); end + + # TODO: filter included items by #display? + # + # source://rdoc//lib/rdoc/class_module.rb#300 + def marshal_dump; end + + # source://rdoc//lib/rdoc/class_module.rb#346 + def marshal_load(array); end + + # Merges +class_module+ into this ClassModule. + # + # The data in +class_module+ is preferred over the receiver. + # + # source://rdoc//lib/rdoc/class_module.rb#435 + def merge(class_module); end + + # Merges collection +mine+ with +other+ preferring other. +other_files+ is + # used to help determine which items should be deleted. + # + # Yields whether the item should be added or removed (true or false) and the + # item to be added or removed. + # + # merge_collections things, other.things, other.in_files do |add, thing| + # if add then + # # add the thing + # else + # # remove the thing + # end + # end + # + # source://rdoc//lib/rdoc/class_module.rb#519 + def merge_collections(mine, other, other_files, &block); end + + # Merges the comments in this ClassModule with the comments in the other + # ClassModule +cm+. + # + # source://rdoc//lib/rdoc/class_module.rb#531 + def merge_sections(cm); end + + # Does this object represent a module? + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/class_module.rb#570 + def module?; end + + # Allows overriding the initial name. + # + # Used for modules and classes that are constant aliases. + # + # source://rdoc//lib/rdoc/class_module.rb#579 + def name=(new_name); end + + # Name to use to generate the url: + # modules and classes that are aliases for another + # module or class return the name of the latter. + # + # source://rdoc//lib/rdoc/class_module.rb#622 + def name_for_path; end + + # Returns the classes and modules that are not constants + # aliasing another class or module. For use by formatters + # only (caches its result). + # + # source://rdoc//lib/rdoc/class_module.rb#631 + def non_aliases; end + + # Parses +comment_location+ into an RDoc::Markup::Document composed of + # multiple RDoc::Markup::Documents with their file set. + # + # source://rdoc//lib/rdoc/class_module.rb#587 + def parse(comment_location); end + + # Path to this class or module for use with HTML generator output. + # + # source://rdoc//lib/rdoc/class_module.rb#613 + def path; end + + # Updates the child modules or classes of class/module +parent+ by + # deleting the ones that have been removed from the documentation. + # + # +parent_hash+ is either parent.modules_hash or + # parent.classes_hash and +all_hash+ is ::all_modules_hash or + # ::all_classes_hash. + # + # source://rdoc//lib/rdoc/class_module.rb#643 + def remove_nodoc_children; end + + # source://rdoc//lib/rdoc/class_module.rb#657 + def remove_things(my_things, other_files); end + + # Search record used by RDoc::Generator::JsonIndex + # + # source://rdoc//lib/rdoc/class_module.rb#672 + def search_record; end + + # Sets the store for this class or module and its contained code objects. + # + # source://rdoc//lib/rdoc/class_module.rb#687 + def store=(store); end + + # Get the superclass of this class. Attempts to retrieve the superclass + # object, returns the name if it is not known. + # + # source://rdoc//lib/rdoc/class_module.rb#701 + def superclass; end + + # Set the superclass of this class to +superclass+ + # + # @raise [NoMethodError] + # + # source://rdoc//lib/rdoc/class_module.rb#708 + def superclass=(superclass); end + + # source://rdoc//lib/rdoc/class_module.rb#713 + def to_s; end + + # 'module' or 'class' + # + # source://rdoc//lib/rdoc/class_module.rb#724 + def type; end + + # Updates the child modules & classes by replacing the ones that are + # aliases through a constant. + # + # The aliased module/class is replaced in the children and in + # RDoc::Store#modules_hash or RDoc::Store#classes_hash + # by a copy that has RDoc::ClassModule#is_alias_for set to + # the aliased module/class, and this copy is added to #aliases + # of the aliased module/class. + # + # Formatters can use the #non_aliases method to retrieve children that + # are not aliases, for instance to list the namespace content, since + # the aliased modules are included in the constants of the class/module, + # that are listed separately. + # + # source://rdoc//lib/rdoc/class_module.rb#743 + def update_aliases; end + + # Deletes from #extends those whose module has been removed from the + # documentation. + # -- + # FIXME: like update_includes, extends are not reliably removed + # + # source://rdoc//lib/rdoc/class_module.rb#791 + def update_extends; end + + # Deletes from #includes those whose module has been removed from the + # documentation. + # -- + # FIXME: includes are not reliably removed, see _possible_bug test case + # + # source://rdoc//lib/rdoc/class_module.rb#776 + def update_includes; end + + class << self + # Return a RDoc::ClassModule of class +class_type+ that is a copy + # of module +module+. Used to promote modules to classes. + # -- + # TODO move to RDoc::NormalClass (I think) + # + # source://rdoc//lib/rdoc/class_module.rb#50 + def from_module(class_type, mod); end + end +end + +# Base class for the RDoc code tree. +# +# We contain the common stuff for contexts (which are containers) and other +# elements (methods, attributes and so on) +# +# Here's the tree of the CodeObject subclasses: +# +# * RDoc::Context +# * RDoc::TopLevel +# * RDoc::ClassModule +# * RDoc::AnonClass (never used so far) +# * RDoc::NormalClass +# * RDoc::NormalModule +# * RDoc::SingleClass +# * RDoc::MethodAttr +# * RDoc::Attr +# * RDoc::AnyMethod +# * RDoc::GhostMethod +# * RDoc::MetaMethod +# * RDoc::Alias +# * RDoc::Constant +# * RDoc::Mixin +# * RDoc::Require +# * RDoc::Include +# +# source://rdoc//lib/rdoc/code_object.rb#28 +class RDoc::CodeObject + include ::RDoc::Text + include ::RDoc::Generator::Markup + + # Creates a new CodeObject that will document itself and its children + # + # @return [CodeObject] a new instance of CodeObject + # + # source://rdoc//lib/rdoc/code_object.rb#102 + def initialize; end + + # Our comment + # + # source://rdoc//lib/rdoc/code_object.rb#35 + def comment; end + + # Replaces our comment with +comment+, unless it is empty. + # + # source://rdoc//lib/rdoc/code_object.rb#135 + def comment=(comment); end + + # Should this CodeObject be displayed in output? + # + # A code object should be displayed if: + # + # * The item didn't have a nodoc or wasn't in a container that had nodoc + # * The item wasn't ignored + # * The item has documentation and was not suppressed + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/code_object.rb#163 + def display?; end + + # Do we document our children? + # + # source://rdoc//lib/rdoc/code_object.rb#40 + def document_children; end + + # Enables or disables documentation of this CodeObject's children unless it + # has been turned off by :enddoc: + # + # source://rdoc//lib/rdoc/code_object.rb#172 + def document_children=(document_children); end + + # Do we document ourselves? + # + # source://rdoc//lib/rdoc/code_object.rb#45 + def document_self; end + + # Enables or disables documentation of this CodeObject unless it has been + # turned off by :enddoc:. If the argument is +nil+ it means the + # + # source://rdoc//lib/rdoc/code_object.rb#183 + def document_self=(document_self); end + + # Does this object have a comment with content or is #received_nodoc true? + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/code_object.rb#194 + def documented?; end + + # Are we done documenting (ie, did we come across a :enddoc:)? + # + # source://rdoc//lib/rdoc/code_object.rb#50 + def done_documenting; end + + # Turns documentation on/off, and turns on/off #document_self + # and #document_children. + # + # Once documentation has been turned off (by +:enddoc:+), + # the object will refuse to turn #document_self or + # will have no effect in the current file. + # + # source://rdoc//lib/rdoc/code_object.rb#207 + def done_documenting=(value); end + + # Yields each parent of this CodeObject. See also + # RDoc::ClassModule#each_ancestor + # + # source://rdoc//lib/rdoc/code_object.rb#218 + def each_parent; end + + # Which file this code object was defined in + # + # source://rdoc//lib/rdoc/code_object.rb#55 + def file; end + + # File name where this CodeObject was found. + # + # See also RDoc::Context#in_files + # + # source://rdoc//lib/rdoc/code_object.rb#233 + def file_name; end + + # Force documentation of this CodeObject + # + # source://rdoc//lib/rdoc/code_object.rb#60 + def force_documentation; end + + # Force the documentation of this object unless documentation + # has been turned off by :enddoc: + # -- + # HACK untested, was assigning to an ivar + # + # source://rdoc//lib/rdoc/code_object.rb#245 + def force_documentation=(value); end + + # Sets the full_name overriding any computed full name. + # + # Set to +nil+ to clear RDoc's cached value + # + # source://rdoc//lib/rdoc/code_object.rb#254 + def full_name=(full_name); end + + # Use this to ignore a CodeObject and all its children until found again + # (#record_location is called). An ignored item will not be displayed in + # documentation. + # + # See github issue #55 + # + # The ignored status is temporary in order to allow implementation details + # to be hidden. At the end of processing a file RDoc allows all classes + # and modules to add new documentation to previously created classes. + # + # If a class was ignored (via stopdoc) then reopened later with additional + # documentation it should be displayed. If a class was ignored and never + # reopened it should not be displayed. The ignore flag allows this to + # occur. + # + # source://rdoc//lib/rdoc/code_object.rb#274 + def ignore; end + + # Has this class been ignored? + # + # See also #ignore + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/code_object.rb#287 + def ignored?; end + + # Initializes state for visibility of this CodeObject and its children. + # + # source://rdoc//lib/rdoc/code_object.rb#121 + def initialize_visibility; end + + # Line in #file where this CodeObject was defined + # + # source://rdoc//lib/rdoc/code_object.rb#65 + def line; end + + # Line in #file where this CodeObject was defined + # + # source://rdoc//lib/rdoc/code_object.rb#65 + def line=(_arg0); end + + # Hash of arbitrary metadata for this CodeObject + # + # source://rdoc//lib/rdoc/code_object.rb#70 + def metadata; end + + # The options instance from the store this CodeObject is attached to, or a + # default options instance if the CodeObject is not attached. + # + # This is used by Text#snippet + # + # source://rdoc//lib/rdoc/code_object.rb#297 + def options; end + + # Our parent CodeObject. The parent may be missing for classes loaded from + # legacy RI data stores. + # + # source://rdoc//lib/rdoc/code_object.rb#309 + def parent; end + + # Sets the parent CodeObject + # + # source://rdoc//lib/rdoc/code_object.rb#75 + def parent=(_arg0); end + + # File name of our parent + # + # source://rdoc//lib/rdoc/code_object.rb#331 + def parent_file_name; end + + # Name of our parent + # + # source://rdoc//lib/rdoc/code_object.rb#338 + def parent_name; end + + # source://rdoc//lib/rdoc/code_object.rb#80 + def received_nodoc; end + + # Records the RDoc::TopLevel (file) where this code object was defined + # + # source://rdoc//lib/rdoc/code_object.rb#345 + def record_location(top_level); end + + # The section this CodeObject is in. Sections allow grouping of constants, + # attributes and methods inside a class or module. + # + # source://rdoc//lib/rdoc/code_object.rb#355 + def section; end + + # Set the section this CodeObject is in + # + # source://rdoc//lib/rdoc/code_object.rb#85 + def section=(_arg0); end + + # Enable capture of documentation unless documentation has been + # turned off by :enddoc: + # + # source://rdoc//lib/rdoc/code_object.rb#365 + def start_doc; end + + # Disable capture of documentation + # + # source://rdoc//lib/rdoc/code_object.rb#377 + def stop_doc; end + + # The RDoc::Store for this object. + # + # source://rdoc//lib/rdoc/code_object.rb#90 + def store; end + + # Sets the +store+ that contains this CodeObject + # + # source://rdoc//lib/rdoc/code_object.rb#387 + def store=(store); end + + # Use this to suppress a CodeObject and all its children until the next file + # it is seen in or documentation is discovered. A suppressed item with + # documentation will be displayed while an ignored item with documentation + # may not be displayed. + # + # source://rdoc//lib/rdoc/code_object.rb#404 + def suppress; end + + # Has this class been suppressed? + # + # See also #suppress + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/code_object.rb#417 + def suppressed?; end + + # We are the model of the code, but we know that at some point we will be + # worked on by viewers. By implementing the Viewable protocol, viewers can + # associated themselves with these objects. + # + # source://rdoc//lib/rdoc/code_object.rb#97 + def viewer; end + + # We are the model of the code, but we know that at some point we will be + # worked on by viewers. By implementing the Viewable protocol, viewers can + # associated themselves with these objects. + # + # source://rdoc//lib/rdoc/code_object.rb#97 + def viewer=(_arg0); end +end + +# source://rdoc//lib/rdoc/comment.rb#12 +class RDoc::Comment + include ::RDoc::Text + + # Creates a new comment with +text+ that is found in the RDoc::TopLevel + # +location+. + # + # @return [Comment] a new instance of Comment + # + # source://rdoc//lib/rdoc/comment.rb#56 + def initialize(text = T.unsafe(nil), location = T.unsafe(nil), language = T.unsafe(nil)); end + + # source://rdoc//lib/rdoc/comment.rb#74 + def ==(other); end + + # Overrides the content returned by #parse. Use when there is no #text + # source for this comment + # + # source://rdoc//lib/rdoc/comment.rb#50 + def document=(_arg0); end + + # A comment is empty if its text String is empty. + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/comment.rb#128 + def empty?; end + + # HACK dubious + # + # source://rdoc//lib/rdoc/comment.rb#135 + def encode!(encoding); end + + # Look for a 'call-seq' in the comment to override the normal parameter + # handling. The :call-seq: is indented from the baseline. All lines of the + # same indentation level and prefix are consumed. + # + # For example, all of the following will be used as the :call-seq: + # + # # :call-seq: + # # ARGF.readlines(sep=$/) -> array + # # ARGF.readlines(limit) -> array + # # ARGF.readlines(sep, limit) -> array + # # + # # ARGF.to_a(sep=$/) -> array + # # ARGF.to_a(limit) -> array + # # ARGF.to_a(sep, limit) -> array + # + # source://rdoc//lib/rdoc/comment.rb#95 + def extract_call_seq(method); end + + # The RDoc::TopLevel this comment was found in + # + # For duck-typing when merging classes at load time + # + # source://rdoc//lib/rdoc/comment.rb#24 + def file; end + + # The format of this comment. Defaults to RDoc::Markup + # + # source://rdoc//lib/rdoc/comment.rb#19 + def format; end + + # Sets the format of this comment and resets any parsed document + # + # source://rdoc//lib/rdoc/comment.rb#143 + def format=(format); end + + # source://rdoc//lib/rdoc/comment.rb#148 + def inspect; end + + # Line where this Comment was written + # + # source://rdoc//lib/rdoc/comment.rb#29 + def line; end + + # Line where this Comment was written + # + # source://rdoc//lib/rdoc/comment.rb#29 + def line=(_arg0); end + + # The RDoc::TopLevel this comment was found in + # + # source://rdoc//lib/rdoc/comment.rb#24 + def location; end + + # The RDoc::TopLevel this comment was found in + # + # source://rdoc//lib/rdoc/comment.rb#24 + def location=(_arg0); end + + # Normalizes the text. See RDoc::Text#normalize_comment for details + # + # source://rdoc//lib/rdoc/comment.rb#157 + def normalize; end + + # Was this text normalized? + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/comment.rb#171 + def normalized?; end + + # Parses the comment into an RDoc::Markup::Document. The parsed document is + # cached until the text is changed. + # + # source://rdoc//lib/rdoc/comment.rb#179 + def parse; end + + # Removes private sections from this comment. Private sections are flush to + # the comment marker and start with -- and end with ++. + # For C-style comments, a private marker may not start at the opening of the + # comment. + # + # /* + # *-- + # * private + # *++ + # * public + # */ + # + # source://rdoc//lib/rdoc/comment.rb#200 + def remove_private; end + + # The text for this comment + # + # source://rdoc//lib/rdoc/comment.rb#39 + def text; end + + # Replaces this comment's text with +text+ and resets the parsed document. + # + # An error is raised if the comment contains a document but no text. + # + # @raise [RDoc::Error] + # + # source://rdoc//lib/rdoc/comment.rb#214 + def text=(text); end + + # The text for this comment + # + # Alias for text + # + # source://rdoc//lib/rdoc/comment.rb#39 + def to_s; end + + # Returns true if this comment is in TomDoc format. + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/comment.rb#225 + def tomdoc?; end + + private + + # -- + # TODO deep copy @document + # + # source://rdoc//lib/rdoc/comment.rb#70 + def initialize_copy(copy); end +end + +# A constant +# +# source://rdoc//lib/rdoc/constant.rb#5 +class RDoc::Constant < ::RDoc::CodeObject + # Creates a new constant with +name+, +value+ and +comment+ + # + # @return [Constant] a new instance of Constant + # + # source://rdoc//lib/rdoc/constant.rb#32 + def initialize(name, value, comment); end + + # Constants are ordered by name + # + # source://rdoc//lib/rdoc/constant.rb#47 + def <=>(other); end + + # Constants are equal when their #parent and #name is the same + # + # source://rdoc//lib/rdoc/constant.rb#56 + def ==(other); end + + # A constant is documented if it has a comment, or is an alias + # for a documented class or module. + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/constant.rb#66 + def documented?; end + + # Full constant name including namespace + # + # source://rdoc//lib/rdoc/constant.rb#81 + def full_name; end + + # source://rdoc//lib/rdoc/constant.rb#99 + def inspect; end + + # The module or class this constant is an alias for + # + # source://rdoc//lib/rdoc/constant.rb#88 + def is_alias_for; end + + # Sets the module or class this is constant is an alias for. + # + # source://rdoc//lib/rdoc/constant.rb#12 + def is_alias_for=(_arg0); end + + # Dumps this Constant for use by ri. See also #marshal_load + # + # source://rdoc//lib/rdoc/constant.rb#109 + def marshal_dump; end + + # Loads this Constant from +array+. For a loaded Constant the following + # methods will return cached values: + # + # * #full_name + # * #parent_name + # + # source://rdoc//lib/rdoc/constant.rb#135 + def marshal_load(array); end + + # The constant's name + # + # source://rdoc//lib/rdoc/constant.rb#17 + def name; end + + # The constant's name + # + # source://rdoc//lib/rdoc/constant.rb#17 + def name=(_arg0); end + + # Path to this constant for use with HTML generator output. + # + # source://rdoc//lib/rdoc/constant.rb#153 + def path; end + + # source://rdoc//lib/rdoc/constant.rb#157 + def pretty_print(q); end + + # Sets the store for this class or module and its contained code objects. + # + # source://rdoc//lib/rdoc/constant.rb#171 + def store=(store); end + + # source://rdoc//lib/rdoc/constant.rb#177 + def to_s; end + + # The constant's value + # + # source://rdoc//lib/rdoc/constant.rb#22 + def value; end + + # The constant's value + # + # source://rdoc//lib/rdoc/constant.rb#22 + def value=(_arg0); end + + # The constant's visibility + # + # source://rdoc//lib/rdoc/constant.rb#27 + def visibility; end + + # The constant's visibility + # + # source://rdoc//lib/rdoc/constant.rb#27 + def visibility=(_arg0); end +end + +# A Context is something that can hold modules, classes, methods, attributes, +# aliases, requires, and includes. Classes, modules, and files are all +# Contexts. +# +# source://rdoc//lib/rdoc/context.rb#7 +class RDoc::Context < ::RDoc::CodeObject + include ::Comparable + + # Creates an unnamed empty context with public current visibility + # + # @return [Context] a new instance of Context + # + # source://rdoc//lib/rdoc/context.rb#123 + def initialize; end + + # Contexts are sorted by full_name + # + # source://rdoc//lib/rdoc/context.rb#171 + def <=>(other); end + + # Adds an item of type +klass+ with the given +name+ and +comment+ to the + # context. + # + # Currently only RDoc::Extend and RDoc::Include are supported. + # + # source://rdoc//lib/rdoc/context.rb#183 + def add(klass, name, comment); end + + # Adds +an_alias+ that is automatically resolved + # + # source://rdoc//lib/rdoc/context.rb#198 + def add_alias(an_alias); end + + # Adds +attribute+ if not already there. If it is (as method(s) or attribute), + # updates the comment if it was empty. + # + # The attribute is registered only if it defines a new method. + # For instance, attr_reader :foo will not be registered + # if method +foo+ exists, but attr_accessor :foo will be registered + # if method +foo+ exists, but foo= does not. + # + # source://rdoc//lib/rdoc/context.rb#225 + def add_attribute(attribute); end + + # Adds a class named +given_name+ with +superclass+. + # + # Both +given_name+ and +superclass+ may contain '::', and are + # interpreted relative to the +self+ context. This allows handling correctly + # examples like these: + # class RDoc::Gauntlet < Gauntlet + # module Mod + # class Object # implies < ::Object + # class SubObject < Object # this is _not_ ::Object + # + # Given class Container::Item RDoc assumes +Container+ is a module + # unless it later sees class Container. +add_class+ automatically + # upgrades +given_name+ to a class in this case. + # + # source://rdoc//lib/rdoc/context.rb#288 + def add_class(class_type, given_name, superclass = T.unsafe(nil)); end + + # Adds the class or module +mod+ to the modules or + # classes Hash +self_hash+, and to +all_hash+ (either + # TopLevel::modules_hash or TopLevel::classes_hash), + # unless #done_documenting is +true+. Sets the #parent of +mod+ + # to +self+, and its #section to #current_section. Returns +mod+. + # + # source://rdoc//lib/rdoc/context.rb#404 + def add_class_or_module(mod, self_hash, all_hash); end + + # Adds +constant+ if not already there. If it is, updates the comment, + # value and/or is_alias_for of the known constant if they were empty/nil. + # + # source://rdoc//lib/rdoc/context.rb#429 + def add_constant(constant); end + + # Adds extension module +ext+ which should be an RDoc::Extend + # + # source://rdoc//lib/rdoc/context.rb#463 + def add_extend(ext); end + + # Adds included module +include+ which should be an RDoc::Include + # + # source://rdoc//lib/rdoc/context.rb#454 + def add_include(include); end + + # Adds +method+ if not already there. If it is (as method or attribute), + # updates the comment if it was empty. + # + # source://rdoc//lib/rdoc/context.rb#473 + def add_method(method); end + + # Adds a module named +name+. If RDoc already knows +name+ is a class then + # that class is returned instead. See also #add_class. + # + # source://rdoc//lib/rdoc/context.rb#506 + def add_module(class_type, name); end + + # Adds an alias from +from+ (a class or module) to +name+ which was defined + # in +file+. + # + # source://rdoc//lib/rdoc/context.rb#527 + def add_module_alias(from, from_name, to, file); end + + # Adds a module by +RDoc::NormalModule+ instance. See also #add_module. + # + # source://rdoc//lib/rdoc/context.rb#519 + def add_module_by_normal_module(mod); end + + # Adds +require+ to this context's top level + # + # source://rdoc//lib/rdoc/context.rb#568 + def add_require(require); end + + # Returns a section with +title+, creating it if it doesn't already exist. + # +comment+ will be appended to the section's comment. + # + # A section with a +title+ of +nil+ will return the default section. + # + # See also RDoc::Context::Section + # + # source://rdoc//lib/rdoc/context.rb#586 + def add_section(title, comment = T.unsafe(nil)); end + + # Adds +thing+ to the collection +array+ + # + # source://rdoc//lib/rdoc/context.rb#600 + def add_to(array, thing); end + + # Class/module aliases + # + # source://rdoc//lib/rdoc/context.rb#25 + def aliases; end + + # Is there any content? + # + # This means any of: comment, aliases, methods, attributes, external + # aliases, require, constant. + # + # Includes and extends are also checked unless includes == false. + # + # source://rdoc//lib/rdoc/context.rb#616 + def any_content(includes = T.unsafe(nil)); end + + # All attr* methods + # + # source://rdoc//lib/rdoc/context.rb#30 + def attributes; end + + # Block params to be used in the next MethodAttr parsed under this context + # + # source://rdoc//lib/rdoc/context.rb#35 + def block_params; end + + # Block params to be used in the next MethodAttr parsed under this context + # + # source://rdoc//lib/rdoc/context.rb#35 + def block_params=(_arg0); end + + # Creates the full name for a child with +name+ + # + # source://rdoc//lib/rdoc/context.rb#632 + def child_name(name); end + + # Class attributes + # + # source://rdoc//lib/rdoc/context.rb#645 + def class_attributes; end + + # Class methods + # + # source://rdoc//lib/rdoc/context.rb#652 + def class_method_list; end + + # Array of classes in this context + # + # source://rdoc//lib/rdoc/context.rb#659 + def classes; end + + # All classes and modules in this namespace + # + # source://rdoc//lib/rdoc/context.rb#666 + def classes_and_modules; end + + # Hash of classes keyed by class name + # + # source://rdoc//lib/rdoc/context.rb#673 + def classes_hash; end + + # Constants defined + # + # source://rdoc//lib/rdoc/context.rb#40 + def constants; end + + # Hash of registered constants. + # + # source://rdoc//lib/rdoc/context.rb#118 + def constants_hash; end + + # Current visibility of this line + # + # source://rdoc//lib/rdoc/context.rb#102 + def current_line_visibility=(_arg0); end + + # The current documentation section that new items will be added to. If + # temporary_section is available it will be used. + # + # source://rdoc//lib/rdoc/context.rb#681 + def current_section; end + + # Sets the current documentation section of documentation + # + # source://rdoc//lib/rdoc/context.rb#45 + def current_section=(_arg0); end + + # Is part of this thing was defined in +file+? + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/context.rb#694 + def defined_in?(file); end + + # source://rdoc//lib/rdoc/context.rb#698 + def display(method_attr); end + + # Iterator for ancestors for duck-typing. Does nothing. See + # RDoc::ClassModule#each_ancestor. + # + # This method exists to make it easy to work with Context subclasses that + # aren't part of RDoc. + # + # source://rdoc//lib/rdoc/context.rb#713 + def each_ancestor; end + + # Iterator for attributes + # + # source://rdoc//lib/rdoc/context.rb#719 + def each_attribute; end + + # Iterator for classes and modules + # + # source://rdoc//lib/rdoc/context.rb#726 + def each_classmodule(&block); end + + # Iterator for constants + # + # source://rdoc//lib/rdoc/context.rb#733 + def each_constant; end + + # Iterator for extension modules + # + # source://rdoc//lib/rdoc/context.rb#747 + def each_extend; end + + # Iterator for included modules + # + # source://rdoc//lib/rdoc/context.rb#740 + def each_include; end + + # Iterator for methods + # + # source://rdoc//lib/rdoc/context.rb#754 + def each_method; end + + # Iterator for each section's contents sorted by title. The +section+, the + # section's +constants+ and the sections +attributes+ are yielded. The + # +constants+ and +attributes+ collections are sorted. + # + # To retrieve methods in a section use #methods_by_type with the optional + # +section+ parameter. + # + # NOTE: Do not edit collections yielded by this method + # + # source://rdoc//lib/rdoc/context.rb#770 + def each_section; end + + # Modules this context is extended with + # + # source://rdoc//lib/rdoc/context.rb#60 + def extends; end + + # Aliases that could not be resolved. + # + # source://rdoc//lib/rdoc/context.rb#92 + def external_aliases; end + + # Finds an attribute +name+ with singleton value +singleton+. + # + # source://rdoc//lib/rdoc/context.rb#787 + def find_attribute(name, singleton); end + + # Finds an attribute with +name+ in this context + # + # source://rdoc//lib/rdoc/context.rb#795 + def find_attribute_named(name); end + + # Finds a class method with +name+ in this context + # + # source://rdoc//lib/rdoc/context.rb#809 + def find_class_method_named(name); end + + # Finds a constant with +name+ in this context + # + # source://rdoc//lib/rdoc/context.rb#816 + def find_constant_named(name); end + + # Find a module at a higher scope + # + # source://rdoc//lib/rdoc/context.rb#825 + def find_enclosing_module_named(name); end + + # Finds an external alias +name+ with singleton value +singleton+. + # + # source://rdoc//lib/rdoc/context.rb#832 + def find_external_alias(name, singleton); end + + # Finds an external alias with +name+ in this context + # + # source://rdoc//lib/rdoc/context.rb#839 + def find_external_alias_named(name); end + + # Finds a file with +name+ in this context + # + # source://rdoc//lib/rdoc/context.rb#853 + def find_file_named(name); end + + # Finds an instance method with +name+ in this context + # + # source://rdoc//lib/rdoc/context.rb#860 + def find_instance_method_named(name); end + + # Finds a method, constant, attribute, external alias, module or file + # named +symbol+ in this context. + # + # source://rdoc//lib/rdoc/context.rb#868 + def find_local_symbol(symbol); end + + # Finds a method named +name+ with singleton value +singleton+. + # + # source://rdoc//lib/rdoc/context.rb#880 + def find_method(name, singleton); end + + # Finds a instance or module method with +name+ in this context + # + # source://rdoc//lib/rdoc/context.rb#893 + def find_method_named(name); end + + # Find a module with +name+ using ruby's scoping rules + # + # source://rdoc//lib/rdoc/context.rb#907 + def find_module_named(name); end + + # Look up +symbol+, first as a module, then as a local symbol. + # + # source://rdoc//lib/rdoc/context.rb#917 + def find_symbol(symbol); end + + # Look up a module named +symbol+. + # + # source://rdoc//lib/rdoc/context.rb#924 + def find_symbol_module(symbol); end + + # The full name for this context. This method is overridden by subclasses. + # + # source://rdoc//lib/rdoc/context.rb#957 + def full_name; end + + # Does this context and its methods and constants all have documentation? + # + # (Yes, fully documented doesn't mean everything.) + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/context.rb#966 + def fully_documented?; end + + # URL for this with a +prefix+ + # + # source://rdoc//lib/rdoc/context.rb#976 + def http_url(prefix); end + + # Files this context is found in + # + # source://rdoc//lib/rdoc/context.rb#50 + def in_files; end + + # Modules this context includes + # + # source://rdoc//lib/rdoc/context.rb#55 + def includes; end + + # Sets the defaults for methods and so-forth + # + # source://rdoc//lib/rdoc/context.rb#145 + def initialize_methods_etc; end + + # Instance attributes + # + # source://rdoc//lib/rdoc/context.rb#987 + def instance_attributes; end + + # Instance methods + # -- + # TODO remove this later + # + # source://rdoc//lib/rdoc/context.rb#1003 + def instance_method_list; end + + # Instance methods + # + # source://rdoc//lib/rdoc/context.rb#994 + def instance_methods; end + + # Methods defined in this context + # + # source://rdoc//lib/rdoc/context.rb#65 + def method_list; end + + # Breaks method_list into a nested hash by type ('class' or + # 'instance') and visibility (+:public+, +:protected+, +:private+). + # + # If +section+ is provided only methods in that RDoc::Context::Section will + # be returned. + # + # source://rdoc//lib/rdoc/context.rb#1015 + def methods_by_type(section = T.unsafe(nil)); end + + # Hash of registered methods. Attributes are also registered here, + # twice if they are RW. + # + # source://rdoc//lib/rdoc/context.rb#108 + def methods_hash; end + + # Yields AnyMethod and Attr entries matching the list of names in +methods+. + # + # source://rdoc//lib/rdoc/context.rb#1038 + def methods_matching(methods, singleton = T.unsafe(nil), &block); end + + # Array of modules in this context + # + # source://rdoc//lib/rdoc/context.rb#1051 + def modules; end + + # Hash of modules keyed by module name + # + # source://rdoc//lib/rdoc/context.rb#1058 + def modules_hash; end + + # Name of this class excluding namespace. See also full_name + # + # source://rdoc//lib/rdoc/context.rb#70 + def name; end + + # Name to use to generate the url. + # #full_name by default. + # + # source://rdoc//lib/rdoc/context.rb#1066 + def name_for_path; end + + # Changes the visibility for new methods to +visibility+ + # + # source://rdoc//lib/rdoc/context.rb#1073 + def ongoing_visibility=(visibility); end + + # Params to be used in the next MethodAttr parsed under this context + # + # source://rdoc//lib/rdoc/context.rb#113 + def params; end + + # Params to be used in the next MethodAttr parsed under this context + # + # source://rdoc//lib/rdoc/context.rb#113 + def params=(_arg0); end + + # Record +top_level+ as a file +self+ is in. + # + # source://rdoc//lib/rdoc/context.rb#1080 + def record_location(top_level); end + + # Should we remove this context from the documentation? + # + # The answer is yes if: + # * #received_nodoc is +true+ + # * #any_content is +false+ (not counting includes) + # * All #includes are modules (not a string), and their module has + # #remove_from_documentation? == true + # * All classes and modules have #remove_from_documentation? == true + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/context.rb#1094 + def remove_from_documentation?; end + + # Removes methods and attributes with a visibility less than +min_visibility+. + # -- + # TODO mark the visibility of attributes in the template (if not public?) + # + # source://rdoc//lib/rdoc/context.rb#1107 + def remove_invisible(min_visibility); end + + # Only called when min_visibility == :public or :private + # + # source://rdoc//lib/rdoc/context.rb#1117 + def remove_invisible_in(array, min_visibility); end + + # Files this context requires + # + # source://rdoc//lib/rdoc/context.rb#75 + def requires; end + + # Tries to resolve unmatched aliases when a method or attribute has just + # been added. + # + # source://rdoc//lib/rdoc/context.rb#1133 + def resolve_aliases(added); end + + # Returns RDoc::Context::Section objects referenced in this context for use + # in a table of contents. + # + # source://rdoc//lib/rdoc/context.rb#1149 + def section_contents; end + + # Sections in this context + # + # source://rdoc//lib/rdoc/context.rb#1173 + def sections; end + + # source://rdoc//lib/rdoc/context.rb#1177 + def sections_hash; end + + # Given an array +names+ of constants, set the visibility of each constant to + # +visibility+ + # + # source://rdoc//lib/rdoc/context.rb#1202 + def set_constant_visibility_for(names, visibility); end + + # Sets the current section to a section with +title+. See also #add_section + # + # source://rdoc//lib/rdoc/context.rb#1184 + def set_current_section(title, comment); end + + # Given an array +methods+ of method names, set the visibility of each to + # +visibility+ + # + # source://rdoc//lib/rdoc/context.rb#1192 + def set_visibility_for(methods, visibility, singleton = T.unsafe(nil)); end + + # Sorts sections alphabetically (default) or in TomDoc fashion (none, + # Public, Internal, Deprecated) + # + # source://rdoc//lib/rdoc/context.rb#1213 + def sort_sections; end + + # Use this section for the next method, attribute or constant added. + # + # source://rdoc//lib/rdoc/context.rb#80 + def temporary_section; end + + # Use this section for the next method, attribute or constant added. + # + # source://rdoc//lib/rdoc/context.rb#80 + def temporary_section=(_arg0); end + + # source://rdoc//lib/rdoc/context.rb#1229 + def to_s; end + + # Return the TopLevel that owns us + # -- + # FIXME we can be 'owned' by several TopLevel (see #record_location & + # #in_files) + # + # source://rdoc//lib/rdoc/context.rb#1239 + def top_level; end + + # Hash old_name => [aliases], for aliases + # that haven't (yet) been resolved to a method/attribute. + # (Not to be confused with the aliases of the context.) + # + # source://rdoc//lib/rdoc/context.rb#87 + def unmatched_alias_lists; end + + # Hash old_name => [aliases], for aliases + # that haven't (yet) been resolved to a method/attribute. + # (Not to be confused with the aliases of the context.) + # + # source://rdoc//lib/rdoc/context.rb#87 + def unmatched_alias_lists=(_arg0); end + + # Upgrades NormalModule +mod+ in +enclosing+ to a +class_type+ + # + # source://rdoc//lib/rdoc/context.rb#1249 + def upgrade_to_class(mod, class_type, enclosing); end + + # Current visibility of this context + # + # source://rdoc//lib/rdoc/context.rb#97 + def visibility; end + + # Current visibility of this context + # + # source://rdoc//lib/rdoc/context.rb#97 + def visibility=(_arg0); end +end + +# A section of documentation like: +# +# # :section: The title +# # The body +# +# Sections can be referenced multiple times and will be collapsed into a +# single section. +# +# source://rdoc//lib/rdoc/context/section.rb#13 +class RDoc::Context::Section + include ::RDoc::Text + include ::RDoc::Generator::Markup + + # Creates a new section with +title+ and +comment+ + # + # @return [Section] a new instance of Section + # + # source://rdoc//lib/rdoc/context/section.rb#42 + def initialize(parent, title, comment); end + + # Sections are equal when they have the same #title + # + # source://rdoc//lib/rdoc/context/section.rb#54 + def ==(other); end + + # Adds +comment+ to this section + # + # source://rdoc//lib/rdoc/context/section.rb#63 + def add_comment(comment); end + + # Anchor reference for linking to this section + # + # source://rdoc//lib/rdoc/context/section.rb#83 + def aref; end + + # Section comment + # + # source://rdoc//lib/rdoc/context/section.rb#22 + def comment; end + + # Section comments + # + # source://rdoc//lib/rdoc/context/section.rb#27 + def comments; end + + # Sections are equal when they have the same #title + # + # source://rdoc//lib/rdoc/context/section.rb#54 + def eql?(other); end + + # Extracts the comment for this section from the original comment block. + # If the first line contains :section:, strip it and use the rest. + # Otherwise remove lines up to the line containing :section:, and look + # for those lines again at the end and remove them. This lets us write + # + # # :section: The title + # # The body + # + # source://rdoc//lib/rdoc/context/section.rb#98 + def extract_comment(comment); end + + # source://rdoc//lib/rdoc/context/section.rb#130 + def hash; end + + # The files comments in this section come from + # + # source://rdoc//lib/rdoc/context/section.rb#137 + def in_files; end + + # source://rdoc//lib/rdoc/context/section.rb#126 + def inspect; end + + # Serializes this Section. The title and parsed comment are saved, but not + # the section parent which must be restored manually. + # + # source://rdoc//lib/rdoc/context/section.rb#158 + def marshal_dump; end + + # De-serializes this Section. The section parent must be restored manually. + # + # source://rdoc//lib/rdoc/context/section.rb#169 + def marshal_load(array); end + + # Context this Section lives in + # + # source://rdoc//lib/rdoc/context/section.rb#32 + def parent; end + + # Parses +comment_location+ into an RDoc::Markup::Document composed of + # multiple RDoc::Markup::Documents with their file set. + # + # source://rdoc//lib/rdoc/context/section.rb#180 + def parse; end + + # The section's title, or 'Top Section' if the title is nil. + # + # This is used by the table of contents template so the name is silly. + # + # source://rdoc//lib/rdoc/context/section.rb#208 + def plain_html; end + + # Removes a comment from this section if it is from the same file as + # +comment+ + # + # source://rdoc//lib/rdoc/context/section.rb#216 + def remove_comment(comment); end + + # Section title + # + # source://rdoc//lib/rdoc/context/section.rb#37 + def title; end +end + +# RDoc::CrossReference is a reusable way to create cross references for names. +# +# source://rdoc//lib/rdoc/cross_reference.rb#8 +class RDoc::CrossReference + # Allows cross-references to be created based on the given +context+ + # (RDoc::Context). + # + # @return [CrossReference] a new instance of CrossReference + # + # source://rdoc//lib/rdoc/cross_reference.rb#127 + def initialize(context); end + + # Returns a reference to +name+. + # + # If the reference is found and +name+ is not documented +text+ will be + # returned. If +name+ is escaped +name+ is returned. If +name+ is not + # found +text+ is returned. + # + # source://rdoc//lib/rdoc/cross_reference.rb#190 + def resolve(name, text); end + + # Returns a method reference to +name+. + # + # source://rdoc//lib/rdoc/cross_reference.rb#137 + def resolve_method(name); end + + # Hash of references that have been looked-up to their replacements + # + # source://rdoc//lib/rdoc/cross_reference.rb#121 + def seen; end + + # Hash of references that have been looked-up to their replacements + # + # source://rdoc//lib/rdoc/cross_reference.rb#121 + def seen=(_arg0); end +end + +# Regular expression to match method arguments. +# +# source://rdoc//lib/rdoc/cross_reference.rb#28 +RDoc::CrossReference::METHOD_ARGS_REGEXP_STR = T.let(T.unsafe(nil), String) + +# Regular expression to match a single method argument. +# +# source://rdoc//lib/rdoc/cross_reference.rb#23 +RDoc::CrossReference::METHOD_ARG_REGEXP_STR = T.let(T.unsafe(nil), String) + +# A subclass of ERB that writes directly to an IO. Credit to Aaron Patterson +# and Masatoshi SEKI. +# +# To use: +# +# erbio = RDoc::ERBIO.new '<%= "hello world" %>', nil, nil +# +# File.open 'hello.txt', 'w' do |io| +# erbio.result binding +# end +# +# Note that binding must enclose the io you wish to output on. +# +# source://rdoc//lib/rdoc/erbio.rb#18 +class RDoc::ERBIO < ::ERB + # Defaults +eoutvar+ to 'io', otherwise is identical to ERB's initialize + # + # @return [ERBIO] a new instance of ERBIO + # + # source://rdoc//lib/rdoc/erbio.rb#23 + def initialize(str, trim_mode: T.unsafe(nil), eoutvar: T.unsafe(nil)); end + + # Instructs +compiler+ how to write to +io_variable+ + # + # source://rdoc//lib/rdoc/erbio.rb#30 + def set_eoutvar(compiler, io_variable); end +end + +# Allows an ERB template to be rendered in the context (binding) of an +# existing ERB template evaluation. +# +# source://rdoc//lib/rdoc/erb_partial.rb#6 +class RDoc::ERBPartial < ::ERB + # Overrides +compiler+ startup to set the +eoutvar+ to an empty string only + # if it isn't already set. + # + # source://rdoc//lib/rdoc/erb_partial.rb#12 + def set_eoutvar(compiler, eoutvar = T.unsafe(nil)); end +end + +# This class is a wrapper around File IO and Encoding that helps RDoc load +# files and convert them to the correct encoding. +# +# source://rdoc//lib/rdoc/encoding.rb#8 +module RDoc::Encoding + class << self + # Changes encoding based on +encoding+ without converting and returns new + # string + # + # source://rdoc//lib/rdoc/encoding.rb#112 + def change_encoding(text, encoding); end + + # Detects the encoding of +string+ based on the magic comment + # + # source://rdoc//lib/rdoc/encoding.rb#92 + def detect_encoding(string); end + + # Reads the contents of +filename+ and handles any encoding directives in + # the file. + # + # The content will be converted to the +encoding+. If the file cannot be + # converted a warning will be printed and nil will be returned. + # + # If +force_transcode+ is true the document will be transcoded and any + # unknown character in the target encoding will be replaced with '?' + # + # source://rdoc//lib/rdoc/encoding.rb#32 + def read_file(filename, encoding, force_transcode = T.unsafe(nil)); end + + # Removes magic comments and shebang + # + # source://rdoc//lib/rdoc/encoding.rb#102 + def remove_magic_comment(string); end + end +end + +# source://rdoc//lib/rdoc/encoding.rb#10 +RDoc::Encoding::HEADER_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://rdoc//lib/rdoc/generator/darkfish.rb#55 +class RDoc::Generator::Darkfish + include ::ERB::Util + + # Initialize a few instance variables before we start + # + # @return [Darkfish] a new instance of Darkfish + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#159 + def initialize(store, options); end + + # Creates a template from its components and the +body_file+. + # + # For backwards compatibility, if +body_file+ contains "--op from the + # options for a full path. + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#102 + def base_dir; end + + # Directory where generated class HTML files live relative to the output + # dir. + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#191 + def class_dir; end + + # Classes and modules to be used by this generator, not necessarily + # displayed. See also #modsort + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#108 + def classes; end + + # Copies static files from the static_path into the output directory + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#265 + def copy_static; end + + # Output progress information if debugging is enabled + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#182 + def debug_msg(*msg); end + + # No files will be written when dry_run is true. + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#113 + def dry_run; end + + # No files will be written when dry_run is true. + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#113 + def dry_run=(_arg0); end + + # Directory where generated class HTML files live relative to the output + # dir. + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#199 + def file_dir; end + + # When false the generate methods return a String instead of writing to a + # file. The default is true. + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#119 + def file_output; end + + # When false the generate methods return a String instead of writing to a + # file. The default is true. + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#119 + def file_output=(_arg0); end + + # Files to be displayed by this generator + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#124 + def files; end + + # Create the directories the generated docs will live in if they don't + # already exist. + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#207 + def gen_sub_directories; end + + # Build the initial indices and output objects based on an array of TopLevel + # objects containing the extracted information. + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#241 + def generate; end + + # Generates a class file for +klass+ + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#337 + def generate_class(klass, template_file = T.unsafe(nil)); end + + # Generate a documentation file for each class and module + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#368 + def generate_class_files; end + + # Generate a documentation file for each file + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#395 + def generate_file_files; end + + # Generate an index page which lists all the classes which are documented. + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#303 + def generate_index; end + + # Generate a page file for +file+ + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#464 + def generate_page(file); end + + # Generates the 404 page for the RDoc servlet + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#493 + def generate_servlet_not_found(message); end + + # Generates the servlet root page for the RDoc servlet + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#526 + def generate_servlet_root(installed); end + + # Generate an index page which lists all the classes which are documented. + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#553 + def generate_table_of_contents; end + + # Return a list of the documented modules sorted by salience first, then + # by name. + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#294 + def get_sorted_module_list(classes); end + + # Try to extract Subversion information out of the first constant whose + # value looks like a subversion Id tag. If no matching constant is found, + # and empty hash is returned. + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#652 + def get_svninfo(klass); end + + # source://rdoc//lib/rdoc/generator/darkfish.rb#584 + def install_rdoc_static_file(source, destination, options); end + + # The JSON index generator for this Darkfish generator + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#129 + def json_index; end + + # Methods to be displayed by this generator + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#134 + def methods; end + + # Sorted list of classes and modules to be displayed by this generator + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#139 + def modsort; end + + # The output directory + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#154 + def outputdir; end + + # Renders the ERb contained in +file_name+ relative to the template + # directory and returns the result based on the current context. + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#699 + def render(file_name); end + + # Load and render the erb template in the given +template_file+ and write + # it out to +out_file+. + # + # Both +template_file+ and +out_file+ should be Pathname-like objects. + # + # An io will be yielded which must be captured by binding in the caller. + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#717 + def render_template(template_file, out_file = T.unsafe(nil)); end + + # Prepares for generation of output from the current directory + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#604 + def setup; end + + # The RDoc::Store that is the source of the generated content + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#144 + def store; end + + # The directory where the template files live + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#149 + def template_dir; end + + # Retrieves a cache template for +file+, if present, or fills the cache. + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#764 + def template_for(file, page = T.unsafe(nil), klass = T.unsafe(nil)); end + + # Creates the result for +template+ with +context+. If an error is raised a + # Pathname +template_file+ will indicate the file where the error occurred. + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#751 + def template_result(template, context, template_file); end + + # Return a string describing the amount of time in the given number of + # seconds in terms a human can understand easily. + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#621 + def time_delta_string(seconds); end + + # Copy over the stylesheet into the appropriate place in the output + # directory. + # + # source://rdoc//lib/rdoc/generator/darkfish.rb#215 + def write_style_sheet; end +end + +# source://rdoc//lib/rdoc/generator/json_index.rb#77 +class RDoc::Generator::JsonIndex + include ::RDoc::Text + + # Creates a new generator. +parent_generator+ is used to determine the + # class_dir and file_dir of links in the output index. + # + # +options+ are the same options passed to the parent generator. + # + # @return [JsonIndex] a new instance of JsonIndex + # + # source://rdoc//lib/rdoc/generator/json_index.rb#94 + def initialize(parent_generator, options); end + + # Builds the JSON index as a Hash. + # + # source://rdoc//lib/rdoc/generator/json_index.rb#110 + def build_index; end + + # The directory classes are written to + # + # source://rdoc//lib/rdoc/generator/json_index.rb#271 + def class_dir; end + + # Output progress information if debugging is enabled + # + # source://rdoc//lib/rdoc/generator/json_index.rb#123 + def debug_msg(*msg); end + + # The directory files are written to + # + # source://rdoc//lib/rdoc/generator/json_index.rb#278 + def file_dir; end + + # Writes the JSON index to disk + # + # source://rdoc//lib/rdoc/generator/json_index.rb#131 + def generate; end + + # Compress the search_index.js file using gzip + # + # source://rdoc//lib/rdoc/generator/json_index.rb#166 + def generate_gzipped; end + + # source://rdoc//lib/rdoc/generator/json_index.rb#86 + def index; end + + # Adds classes and modules to the index + # + # source://rdoc//lib/rdoc/generator/json_index.rb#211 + def index_classes; end + + # Adds methods to the index + # + # source://rdoc//lib/rdoc/generator/json_index.rb#230 + def index_methods; end + + # Adds pages to the index + # + # source://rdoc//lib/rdoc/generator/json_index.rb#251 + def index_pages; end + + # source://rdoc//lib/rdoc/generator/json_index.rb#282 + def reset(files, classes); end + + # Removes whitespace and downcases +string+ + # + # source://rdoc//lib/rdoc/generator/json_index.rb#296 + def search_string(string); end +end + +# Generates a POT file. +# +# Here is a translator work flow with the generator. +# +# == Create .pot +# +# You create .pot file by pot formatter: +# +# % rdoc --format pot +# +# It generates doc/rdoc.pot. +# +# == Create .po +# +# You create .po file from doc/rdoc.pot. This operation is needed only +# the first time. This work flow assumes that you are a translator +# for Japanese. +# +# You create locale/ja/rdoc.po from doc/rdoc.pot. You can use msginit +# provided by GNU gettext or rmsginit provided by gettext gem. This +# work flow uses gettext gem because it is more portable than GNU +# gettext for Rubyists. Gettext gem is implemented by pure Ruby. +# +# % gem install gettext +# % mkdir -p locale/ja +# % rmsginit --input doc/rdoc.pot --output locale/ja/rdoc.po --locale ja +# +# Translate messages in .po +# +# You translate messages in .po by a PO file editor. po-mode.el exists +# for Emacs users. There are some GUI tools such as GTranslator. +# There are some Web services such as POEditor and Tansifex. You can +# edit by your favorite text editor because .po is a text file. +# Generate localized documentation +# +# You can generate localized documentation with locale/ja/rdoc.po: +# +# % rdoc --locale ja +# +# You can find documentation in Japanese in doc/. Yay! +# +# == Update translation +# +# You need to update translation when your application is added or +# modified messages. +# +# You can update .po by the following command lines: +# +# % rdoc --format pot +# % rmsgmerge --update locale/ja/rdoc.po doc/rdoc.pot +# +# You edit locale/ja/rdoc.po to translate new messages. +# +# source://rdoc//lib/rdoc/generator/pot.rb#56 +class RDoc::Generator::POT + # Set up a new .pot generator + # + # @return [POT] a new instance of POT + # + # source://rdoc//lib/rdoc/generator/pot.rb#68 + def initialize(store, options); end + + # source://rdoc//lib/rdoc/generator/pot.rb#85 + def class_dir; end + + # Writes .pot to disk. + # + # source://rdoc//lib/rdoc/generator/pot.rb#76 + def generate; end + + private + + # source://rdoc//lib/rdoc/generator/pot.rb#90 + def extract_messages; end +end + +# Extracts message from RDoc::Store +# +# source://rdoc//lib/rdoc/generator/pot/message_extractor.rb#5 +class RDoc::Generator::POT::MessageExtractor + # Creates a message extractor for +store+. + # + # @return [MessageExtractor] a new instance of MessageExtractor + # + # source://rdoc//lib/rdoc/generator/pot/message_extractor.rb#10 + def initialize(store); end + + # Extracts messages from +store+, stores them into + # RDoc::Generator::POT::PO and returns it. + # + # source://rdoc//lib/rdoc/generator/pot/message_extractor.rb#19 + def extract; end + + private + + # source://rdoc//lib/rdoc/generator/pot/message_extractor.rb#64 + def entry(msgid, options); end + + # source://rdoc//lib/rdoc/generator/pot/message_extractor.rb#28 + def extract_from_klass(klass); end + + # source://rdoc//lib/rdoc/generator/pot/message_extractor.rb#51 + def extract_text(text, comment, location = T.unsafe(nil)); end +end + +# Generates a PO format text +# +# source://rdoc//lib/rdoc/generator/pot/po.rb#5 +class RDoc::Generator::POT::PO + # Creates an object that represents PO format. + # + # @return [PO] a new instance of PO + # + # source://rdoc//lib/rdoc/generator/pot/po.rb#10 + def initialize; end + + # Adds a PO entry to the PO. + # + # source://rdoc//lib/rdoc/generator/pot/po.rb#18 + def add(entry); end + + # Returns PO format text for the PO. + # + # source://rdoc//lib/rdoc/generator/pot/po.rb#29 + def to_s; end + + private + + # source://rdoc//lib/rdoc/generator/pot/po.rb#40 + def add_header; end + + # source://rdoc//lib/rdoc/generator/pot/po.rb#44 + def header_entry; end + + # source://rdoc//lib/rdoc/generator/pot/po.rb#73 + def sort_entries; end +end + +# A PO entry in PO +# +# source://rdoc//lib/rdoc/generator/pot/po_entry.rb#5 +class RDoc::Generator::POT::POEntry + # Creates a PO entry for +msgid+. Other valus can be specified by + # +options+. + # + # @return [POEntry] a new instance of POEntry + # + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#29 + def initialize(msgid, options = T.unsafe(nil)); end + + # The comment content extracted from source file + # + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#17 + def extracted_comment; end + + # The flags of the PO entry + # + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#23 + def flags; end + + # Merges the PO entry with +other_entry+. + # + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#56 + def merge(other_entry); end + + # The msgid content + # + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#8 + def msgid; end + + # The msgstr content + # + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#11 + def msgstr; end + + # The locations where the PO entry is extracted + # + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#20 + def references; end + + # Returns the PO entry in PO format. + # + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#41 + def to_s; end + + # The comment content created by translator (PO editor) + # + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#14 + def translator_comment; end + + private + + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#120 + def escape(string); end + + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#72 + def format_comment(mark, comment); end + + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#88 + def format_extracted_comment; end + + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#102 + def format_flags; end + + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#109 + def format_message(message); end + + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#92 + def format_references; end + + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#84 + def format_translator_comment; end + + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#137 + def merge_array(array1, array2); end + + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#133 + def merge_string(string1, string2); end +end + +# Generates ri data files +# +# source://rdoc//lib/rdoc/generator/ri.rb#5 +class RDoc::Generator::RI + # Set up a new ri generator + # + # @return [RI] a new instance of RI + # + # source://rdoc//lib/rdoc/generator/ri.rb#17 + def initialize(store, options); end + + # Writes the parsed data store to disk for use by ri. + # + # source://rdoc//lib/rdoc/generator/ri.rb#26 + def generate; end +end + +# A message container for a locale. +# +# This object provides the following two features: +# +# * Loads translated messages from .po file. +# * Translates a message into the locale. +# +# source://rdoc//lib/rdoc/i18n/locale.rb#10 +class RDoc::I18n::Locale + # Creates a new locale object for +name+ locale. +name+ must + # follow IETF language tag format. + # + # @return [Locale] a new instance of Locale + # + # source://rdoc//lib/rdoc/i18n/locale.rb#48 + def initialize(name); end + + # Loads translation messages from +locale_directory+/+@name+/rdoc.po + # or +locale_directory+/+@name+.po. The former has high priority. + # + # This method requires gettext gem for parsing .po file. If you + # don't have gettext gem, this method doesn't load .po file. This + # method warns and returns +false+. + # + # Returns +true+ if succeeded, +false+ otherwise. + # + # source://rdoc//lib/rdoc/i18n/locale.rb#63 + def load(locale_directory); end + + # The name of the locale. It uses IETF language tag format + # +[language[_territory][.codeset][@modifier]]+. + # + # See also {BCP 47 - Tags for Identifying + # Languages}[http://tools.ietf.org/rfc/bcp/bcp47.txt]. + # + # source://rdoc//lib/rdoc/i18n/locale.rb#42 + def name; end + + # Translates the +message+ into locale. If there is no translation + # messages for +message+ in locale, +message+ itself is returned. + # + # source://rdoc//lib/rdoc/i18n/locale.rb#98 + def translate(message); end + + class << self + # Returns the locale object for +locale_name+. + # + # source://rdoc//lib/rdoc/i18n/locale.rb#19 + def [](locale_name); end + + # Sets the locale object for +locale_name+. + # + # Normally, this method is not used. This method is useful for + # testing. + # + # source://rdoc//lib/rdoc/i18n/locale.rb#29 + def []=(locale_name, locale); end + end +end + +# An i18n supported text. +# +# This object provides the following two features: +# +# * Extracts translation messages from wrapped raw text. +# * Translates wrapped raw text in specified locale. +# +# Wrapped raw text is one of String, RDoc::Comment or Array of them. +# +# source://rdoc//lib/rdoc/i18n/text.rb#12 +class RDoc::I18n::Text + # Creates a new i18n supported text for +raw+ text. + # + # @return [Text] a new instance of Text + # + # source://rdoc//lib/rdoc/i18n/text.rb#17 + def initialize(raw); end + + # Extracts translation target messages and yields each message. + # + # Each yielded message is a Hash. It consists of the followings: + # + # :type :: :paragraph + # :paragraph :: String (The translation target message itself.) + # :line_no :: Integer (The line number of the :paragraph is started.) + # + # The above content may be added in the future. + # + # source://rdoc//lib/rdoc/i18n/text.rb#32 + def extract_messages; end + + # Translates raw text into +locale+. + # + # source://rdoc//lib/rdoc/i18n/text.rb#44 + def translate(locale); end + + private + + # source://rdoc//lib/rdoc/i18n/text.rb#88 + def each_line(raw, &block); end + + # @yield [part] + # + # source://rdoc//lib/rdoc/i18n/text.rb#101 + def emit_empty_line_event(line, line_no); end + + # source://rdoc//lib/rdoc/i18n/text.rb#110 + def emit_paragraph_event(paragraph, paragraph_start_line, line_no, &block); end + + # source://rdoc//lib/rdoc/i18n/text.rb#60 + def parse(&block); end +end + +# source://rdoc//lib/rdoc/markdown.rb#182 +class RDoc::Markdown + # Creates a new markdown parser that enables the given +extensions+. + # + # @return [Markdown] a new instance of Markdown + # + # source://rdoc//lib/rdoc/markdown.rb#668 + def initialize(extensions = T.unsafe(nil), debug = T.unsafe(nil)); end + + # Alphanumeric = %literals.Alphanumeric + # + # source://rdoc//lib/rdoc/markdown.rb#14705 + def _Alphanumeric; end + + # AlphanumericAscii = %literals.AlphanumericAscii + # + # source://rdoc//lib/rdoc/markdown.rb#14712 + def _AlphanumericAscii; end + + # AtxHeading = AtxStart:s @Sp AtxInline+:a (@Sp /#*/ @Sp)? @Newline { RDoc::Markup::Heading.new(s, a.join) } + # + # source://rdoc//lib/rdoc/markdown.rb#1162 + def _AtxHeading; end + + # AtxInline = !@Newline !(@Sp /#*/ @Sp @Newline) Inline + # + # source://rdoc//lib/rdoc/markdown.rb#1080 + def _AtxInline; end + + # AtxStart = < /\#{1,6}/ > { text.length } + # + # source://rdoc//lib/rdoc/markdown.rb#1136 + def _AtxStart; end + + # AutoLink = (AutoLinkUrl | AutoLinkEmail) + # + # source://rdoc//lib/rdoc/markdown.rb#11574 + def _AutoLink; end + + # AutoLinkEmail = "<" "mailto:"? < /[\w+.\/!%~$-]+/i "@" (!@Newline !">" .)+ > ">" { "mailto:#{text}" } + # + # source://rdoc//lib/rdoc/markdown.rb#11707 + def _AutoLinkEmail; end + + # AutoLinkUrl = "<" < /[A-Za-z]+/ "://" (!@Newline !">" .)+ > ">" { text } + # + # source://rdoc//lib/rdoc/markdown.rb#11592 + def _AutoLinkUrl; end + + # BOM = %literals.BOM + # + # source://rdoc//lib/rdoc/markdown.rb#14719 + def _BOM; end + + # BlankLine = @Sp @Newline { "\n" } + # + # source://rdoc//lib/rdoc/markdown.rb#14148 + def _BlankLine; end + + # Block = @BlankLine* (BlockQuote | Verbatim | CodeFence | Table | Note | Reference | HorizontalRule | Heading | OrderedList | BulletList | DefinitionList | HtmlBlock | StyleBlock | Para | Plain) + # + # source://rdoc//lib/rdoc/markdown.rb#939 + def _Block; end + + # BlockQuote = BlockQuoteRaw:a { RDoc::Markup::BlockQuote.new(*a) } + # + # source://rdoc//lib/rdoc/markdown.rb#1566 + def _BlockQuote; end + + # BlockQuoteRaw = @StartList:a (">" " "? Line:l { a << l } (!">" !@BlankLine Line:c { a << c })* (@BlankLine:n { a << n })*)+ { inner_parse a.join } + # + # source://rdoc//lib/rdoc/markdown.rb#1589 + def _BlockQuoteRaw; end + + # Bullet = !HorizontalRule @NonindentSpace /[+*-]/ @Spacechar+ + # + # source://rdoc//lib/rdoc/markdown.rb#2154 + def _Bullet; end + + # BulletList = &Bullet (ListTight | ListLoose):a { RDoc::Markup::List.new(:BULLET, *a) } + # + # source://rdoc//lib/rdoc/markdown.rb#2198 + def _BulletList; end + + # CharEntity = "&" < /[A-Za-z0-9]+/ > ";" { if entity = HTML_ENTITIES[text] then entity.pack 'U*' else "&#{text};" end } + # + # source://rdoc//lib/rdoc/markdown.rb#14812 + def _CharEntity; end + + # Code = (Ticks1 @Sp < ((!"`" Nonspacechar)+ | !Ticks1 /`+/ | !(@Sp Ticks1) (@Spacechar | @Newline !@BlankLine))+ > @Sp Ticks1 | Ticks2 @Sp < ((!"`" Nonspacechar)+ | !Ticks2 /`+/ | !(@Sp Ticks2) (@Spacechar | @Newline !@BlankLine))+ > @Sp Ticks2 | Ticks3 @Sp < ((!"`" Nonspacechar)+ | !Ticks3 /`+/ | !(@Sp Ticks3) (@Spacechar | @Newline !@BlankLine))+ > @Sp Ticks3 | Ticks4 @Sp < ((!"`" Nonspacechar)+ | !Ticks4 /`+/ | !(@Sp Ticks4) (@Spacechar | @Newline !@BlankLine))+ > @Sp Ticks4 | Ticks5 @Sp < ((!"`" Nonspacechar)+ | !Ticks5 /`+/ | !(@Sp Ticks5) (@Spacechar | @Newline !@BlankLine))+ > @Sp Ticks5) { "#{text}" } + # + # source://rdoc//lib/rdoc/markdown.rb#12511 + def _Code; end + + # CodeFence = &{ github? } Ticks3 (@Sp StrChunk:format)? Spnl < ((!"`" Nonspacechar)+ | !Ticks3 /`+/ | Spacechar | @Newline)+ > Ticks3 @Sp @Newline* { verbatim = RDoc::Markup::Verbatim.new text verbatim.format = format.intern if format.instance_of?(String) verbatim } + # + # source://rdoc//lib/rdoc/markdown.rb#15681 + def _CodeFence; end + + # DecEntity = "&#" < /[0-9]+/ > ";" { [text.to_i].pack 'U' } + # + # source://rdoc//lib/rdoc/markdown.rb#14776 + def _DecEntity; end + + # DefinitionList = &{ definition_lists? } DefinitionListItem+:list { RDoc::Markup::List.new :NOTE, *list.flatten } + # + # source://rdoc//lib/rdoc/markdown.rb#16339 + def _DefinitionList; end + + # DefinitionListDefinition = @NonindentSpace ":" @Space Inlines:a @BlankLine+ { paragraph a } + # + # source://rdoc//lib/rdoc/markdown.rb#16482 + def _DefinitionListDefinition; end + + # DefinitionListItem = DefinitionListLabel+:label DefinitionListDefinition+:defns { list_items = [] list_items << RDoc::Markup::ListItem.new(label, defns.shift) list_items.concat defns.map { |defn| RDoc::Markup::ListItem.new nil, defn } unless list_items.empty? list_items } + # + # source://rdoc//lib/rdoc/markdown.rb#16383 + def _DefinitionListItem; end + + # DefinitionListLabel = StrChunk:label @Sp @Newline { label } + # + # source://rdoc//lib/rdoc/markdown.rb#16449 + def _DefinitionListLabel; end + + # Digit = [0-9] + # + # source://rdoc//lib/rdoc/markdown.rb#14691 + def _Digit; end + + # Doc = BOM? Block*:a { RDoc::Markup::Document.new(*a.compact) } + # + # source://rdoc//lib/rdoc/markdown.rb#899 + def _Doc; end + + # Emph = (EmphStar | EmphUl) + # + # source://rdoc//lib/rdoc/markdown.rb#10283 + def _Emph; end + + # EmphStar = "*" !@Whitespace @StartList:a (!"*" Inline:b { a << b } | StrongStar:b { a << b })+ "*" { emphasis a.join } + # + # source://rdoc//lib/rdoc/markdown.rb#10319 + def _EmphStar; end + + # EmphUl = "_" !@Whitespace @StartList:a (!"_" Inline:b { a << b } | StrongUl:b { a << b })+ "_" { emphasis a.join } + # + # source://rdoc//lib/rdoc/markdown.rb#10477 + def _EmphUl; end + + # EmptyTitle = "" + # + # source://rdoc//lib/rdoc/markdown.rb#12086 + def _EmptyTitle; end + + # Endline = (@LineBreak | @TerminalEndline | @NormalEndline) + # + # source://rdoc//lib/rdoc/markdown.rb#9917 + def _Endline; end + + # Entity = (HexEntity | DecEntity | CharEntity):a { a } + # + # source://rdoc//lib/rdoc/markdown.rb#9880 + def _Entity; end + + # Enumerator = @NonindentSpace [0-9]+ "." @Spacechar+ + # + # source://rdoc//lib/rdoc/markdown.rb#2687 + def _Enumerator; end + + # Eof = !. + # + # source://rdoc//lib/rdoc/markdown.rb#14542 + def _Eof; end + + # EscapedChar = "\\" !@Newline < /[:\\`|*_{}\[\]()#+.!><-]/ > { text } + # + # source://rdoc//lib/rdoc/markdown.rb#9841 + def _EscapedChar; end + + # ExplicitLink = Label:l "(" @Sp Source:s Spnl Title @Sp ")" { "{#{l}}[#{s}]" } + # + # source://rdoc//lib/rdoc/markdown.rb#11147 + def _ExplicitLink; end + + # ExtendedSpecialChar = &{ notes? } "^" + # + # source://rdoc//lib/rdoc/markdown.rb#15184 + def _ExtendedSpecialChar; end + + # Heading = (SetextHeading | AtxHeading) + # + # source://rdoc//lib/rdoc/markdown.rb#1548 + def _Heading; end + + # HexEntity = /&#x/i < /[0-9a-fA-F]+/ > ";" { [text.to_i(16)].pack 'U' } + # + # source://rdoc//lib/rdoc/markdown.rb#14740 + def _HexEntity; end + + # HorizontalRule = @NonindentSpace ("*" @Sp "*" @Sp "*" (@Sp "*")* | "-" @Sp "-" @Sp "-" (@Sp "-")* | "_" @Sp "_" @Sp "_" (@Sp "_")*) @Sp @Newline @BlankLine+ { RDoc::Markup::Rule.new 1 } + # + # source://rdoc//lib/rdoc/markdown.rb#1932 + def _HorizontalRule; end + + # HtmlAnchor = HtmlOpenAnchor (HtmlAnchor | !HtmlCloseAnchor .)* HtmlCloseAnchor + # + # source://rdoc//lib/rdoc/markdown.rb#2971 + def _HtmlAnchor; end + + # HtmlAttribute = (AlphanumericAscii | "-")+ Spnl ("=" Spnl (Quoted | (!">" Nonspacechar)+))? Spnl + # + # source://rdoc//lib/rdoc/markdown.rb#14273 + def _HtmlAttribute; end + + # HtmlBlock = < (HtmlBlockInTags | HtmlComment | HtmlBlockSelfClosing | HtmlUnclosed) > @BlankLine+ { if html? then RDoc::Markup::Raw.new text end } + # + # source://rdoc//lib/rdoc/markdown.rb#8768 + def _HtmlBlock; end + + # HtmlBlockAddress = HtmlBlockOpenAddress (HtmlBlockAddress | !HtmlBlockCloseAddress .)* HtmlBlockCloseAddress + # + # source://rdoc//lib/rdoc/markdown.rb#3137 + def _HtmlBlockAddress; end + + # HtmlBlockBlockquote = HtmlBlockOpenBlockquote (HtmlBlockBlockquote | !HtmlBlockCloseBlockquote .)* HtmlBlockCloseBlockquote + # + # source://rdoc//lib/rdoc/markdown.rb#3303 + def _HtmlBlockBlockquote; end + + # HtmlBlockCenter = HtmlBlockOpenCenter (HtmlBlockCenter | !HtmlBlockCloseCenter .)* HtmlBlockCloseCenter + # + # source://rdoc//lib/rdoc/markdown.rb#3469 + def _HtmlBlockCenter; end + + # HtmlBlockCloseAddress = "<" Spnl "/" ("address" | "ADDRESS") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#3085 + def _HtmlBlockCloseAddress; end + + # HtmlBlockCloseBlockquote = "<" Spnl "/" ("blockquote" | "BLOCKQUOTE") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#3251 + def _HtmlBlockCloseBlockquote; end + + # HtmlBlockCloseCenter = "<" Spnl "/" ("center" | "CENTER") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#3417 + def _HtmlBlockCloseCenter; end + + # HtmlBlockCloseDd = "<" Spnl "/" ("dd" | "DD") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#6737 + def _HtmlBlockCloseDd; end + + # HtmlBlockCloseDir = "<" Spnl "/" ("dir" | "DIR") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#3583 + def _HtmlBlockCloseDir; end + + # HtmlBlockCloseDiv = "<" Spnl "/" ("div" | "DIV") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#3749 + def _HtmlBlockCloseDiv; end + + # HtmlBlockCloseDl = "<" Spnl "/" ("dl" | "DL") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#3915 + def _HtmlBlockCloseDl; end + + # HtmlBlockCloseDt = "<" Spnl "/" ("dt" | "DT") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#6903 + def _HtmlBlockCloseDt; end + + # HtmlBlockCloseFieldset = "<" Spnl "/" ("fieldset" | "FIELDSET") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#4081 + def _HtmlBlockCloseFieldset; end + + # HtmlBlockCloseForm = "<" Spnl "/" ("form" | "FORM") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#4247 + def _HtmlBlockCloseForm; end + + # HtmlBlockCloseFrameset = "<" Spnl "/" ("frameset" | "FRAMESET") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#7069 + def _HtmlBlockCloseFrameset; end + + # HtmlBlockCloseH1 = "<" Spnl "/" ("h1" | "H1") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#4413 + def _HtmlBlockCloseH1; end + + # HtmlBlockCloseH2 = "<" Spnl "/" ("h2" | "H2") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#4579 + def _HtmlBlockCloseH2; end + + # HtmlBlockCloseH3 = "<" Spnl "/" ("h3" | "H3") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#4745 + def _HtmlBlockCloseH3; end + + # HtmlBlockCloseH4 = "<" Spnl "/" ("h4" | "H4") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#4911 + def _HtmlBlockCloseH4; end + + # HtmlBlockCloseH5 = "<" Spnl "/" ("h5" | "H5") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#5077 + def _HtmlBlockCloseH5; end + + # HtmlBlockCloseH6 = "<" Spnl "/" ("h6" | "H6") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#5243 + def _HtmlBlockCloseH6; end + + # HtmlBlockCloseHead = "<" Spnl "/" ("head" | "HEAD") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#8552 + def _HtmlBlockCloseHead; end + + # HtmlBlockCloseLi = "<" Spnl "/" ("li" | "LI") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#7235 + def _HtmlBlockCloseLi; end + + # HtmlBlockCloseMenu = "<" Spnl "/" ("menu" | "MENU") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#5409 + def _HtmlBlockCloseMenu; end + + # HtmlBlockCloseNoframes = "<" Spnl "/" ("noframes" | "NOFRAMES") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#5575 + def _HtmlBlockCloseNoframes; end + + # HtmlBlockCloseNoscript = "<" Spnl "/" ("noscript" | "NOSCRIPT") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#5741 + def _HtmlBlockCloseNoscript; end + + # HtmlBlockCloseOl = "<" Spnl "/" ("ol" | "OL") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#5907 + def _HtmlBlockCloseOl; end + + # HtmlBlockCloseP = "<" Spnl "/" ("p" | "P") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#6073 + def _HtmlBlockCloseP; end + + # HtmlBlockClosePre = "<" Spnl "/" ("pre" | "PRE") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#6239 + def _HtmlBlockClosePre; end + + # HtmlBlockCloseScript = "<" Spnl "/" ("script" | "SCRIPT") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#8397 + def _HtmlBlockCloseScript; end + + # HtmlBlockCloseTable = "<" Spnl "/" ("table" | "TABLE") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#6405 + def _HtmlBlockCloseTable; end + + # HtmlBlockCloseTbody = "<" Spnl "/" ("tbody" | "TBODY") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#7401 + def _HtmlBlockCloseTbody; end + + # HtmlBlockCloseTd = "<" Spnl "/" ("td" | "TD") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#7567 + def _HtmlBlockCloseTd; end + + # HtmlBlockCloseTfoot = "<" Spnl "/" ("tfoot" | "TFOOT") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#7733 + def _HtmlBlockCloseTfoot; end + + # HtmlBlockCloseTh = "<" Spnl "/" ("th" | "TH") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#7899 + def _HtmlBlockCloseTh; end + + # HtmlBlockCloseThead = "<" Spnl "/" ("thead" | "THEAD") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#8065 + def _HtmlBlockCloseThead; end + + # HtmlBlockCloseTr = "<" Spnl "/" ("tr" | "TR") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#8231 + def _HtmlBlockCloseTr; end + + # HtmlBlockCloseUl = "<" Spnl "/" ("ul" | "UL") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#6571 + def _HtmlBlockCloseUl; end + + # HtmlBlockDd = HtmlBlockOpenDd (HtmlBlockDd | !HtmlBlockCloseDd .)* HtmlBlockCloseDd + # + # source://rdoc//lib/rdoc/markdown.rb#6789 + def _HtmlBlockDd; end + + # HtmlBlockDir = HtmlBlockOpenDir (HtmlBlockDir | !HtmlBlockCloseDir .)* HtmlBlockCloseDir + # + # source://rdoc//lib/rdoc/markdown.rb#3635 + def _HtmlBlockDir; end + + # HtmlBlockDiv = HtmlBlockOpenDiv (HtmlBlockDiv | !HtmlBlockCloseDiv .)* HtmlBlockCloseDiv + # + # source://rdoc//lib/rdoc/markdown.rb#3801 + def _HtmlBlockDiv; end + + # HtmlBlockDl = HtmlBlockOpenDl (HtmlBlockDl | !HtmlBlockCloseDl .)* HtmlBlockCloseDl + # + # source://rdoc//lib/rdoc/markdown.rb#3967 + def _HtmlBlockDl; end + + # HtmlBlockDt = HtmlBlockOpenDt (HtmlBlockDt | !HtmlBlockCloseDt .)* HtmlBlockCloseDt + # + # source://rdoc//lib/rdoc/markdown.rb#6955 + def _HtmlBlockDt; end + + # HtmlBlockFieldset = HtmlBlockOpenFieldset (HtmlBlockFieldset | !HtmlBlockCloseFieldset .)* HtmlBlockCloseFieldset + # + # source://rdoc//lib/rdoc/markdown.rb#4133 + def _HtmlBlockFieldset; end + + # HtmlBlockForm = HtmlBlockOpenForm (HtmlBlockForm | !HtmlBlockCloseForm .)* HtmlBlockCloseForm + # + # source://rdoc//lib/rdoc/markdown.rb#4299 + def _HtmlBlockForm; end + + # HtmlBlockFrameset = HtmlBlockOpenFrameset (HtmlBlockFrameset | !HtmlBlockCloseFrameset .)* HtmlBlockCloseFrameset + # + # source://rdoc//lib/rdoc/markdown.rb#7121 + def _HtmlBlockFrameset; end + + # HtmlBlockH1 = HtmlBlockOpenH1 (HtmlBlockH1 | !HtmlBlockCloseH1 .)* HtmlBlockCloseH1 + # + # source://rdoc//lib/rdoc/markdown.rb#4465 + def _HtmlBlockH1; end + + # HtmlBlockH2 = HtmlBlockOpenH2 (HtmlBlockH2 | !HtmlBlockCloseH2 .)* HtmlBlockCloseH2 + # + # source://rdoc//lib/rdoc/markdown.rb#4631 + def _HtmlBlockH2; end + + # HtmlBlockH3 = HtmlBlockOpenH3 (HtmlBlockH3 | !HtmlBlockCloseH3 .)* HtmlBlockCloseH3 + # + # source://rdoc//lib/rdoc/markdown.rb#4797 + def _HtmlBlockH3; end + + # HtmlBlockH4 = HtmlBlockOpenH4 (HtmlBlockH4 | !HtmlBlockCloseH4 .)* HtmlBlockCloseH4 + # + # source://rdoc//lib/rdoc/markdown.rb#4963 + def _HtmlBlockH4; end + + # HtmlBlockH5 = HtmlBlockOpenH5 (HtmlBlockH5 | !HtmlBlockCloseH5 .)* HtmlBlockCloseH5 + # + # source://rdoc//lib/rdoc/markdown.rb#5129 + def _HtmlBlockH5; end + + # HtmlBlockH6 = HtmlBlockOpenH6 (HtmlBlockH6 | !HtmlBlockCloseH6 .)* HtmlBlockCloseH6 + # + # source://rdoc//lib/rdoc/markdown.rb#5295 + def _HtmlBlockH6; end + + # HtmlBlockHead = HtmlBlockOpenHead (!HtmlBlockCloseHead .)* HtmlBlockCloseHead + # + # source://rdoc//lib/rdoc/markdown.rb#8604 + def _HtmlBlockHead; end + + # HtmlBlockInTags = (HtmlAnchor | HtmlBlockAddress | HtmlBlockBlockquote | HtmlBlockCenter | HtmlBlockDir | HtmlBlockDiv | HtmlBlockDl | HtmlBlockFieldset | HtmlBlockForm | HtmlBlockH1 | HtmlBlockH2 | HtmlBlockH3 | HtmlBlockH4 | HtmlBlockH5 | HtmlBlockH6 | HtmlBlockMenu | HtmlBlockNoframes | HtmlBlockNoscript | HtmlBlockOl | HtmlBlockP | HtmlBlockPre | HtmlBlockTable | HtmlBlockUl | HtmlBlockDd | HtmlBlockDt | HtmlBlockFrameset | HtmlBlockLi | HtmlBlockTbody | HtmlBlockTd | HtmlBlockTfoot | HtmlBlockTh | HtmlBlockThead | HtmlBlockTr | HtmlBlockScript | HtmlBlockHead) + # + # source://rdoc//lib/rdoc/markdown.rb#8651 + def _HtmlBlockInTags; end + + # HtmlBlockLi = HtmlBlockOpenLi (HtmlBlockLi | !HtmlBlockCloseLi .)* HtmlBlockCloseLi + # + # source://rdoc//lib/rdoc/markdown.rb#7287 + def _HtmlBlockLi; end + + # HtmlBlockMenu = HtmlBlockOpenMenu (HtmlBlockMenu | !HtmlBlockCloseMenu .)* HtmlBlockCloseMenu + # + # source://rdoc//lib/rdoc/markdown.rb#5461 + def _HtmlBlockMenu; end + + # HtmlBlockNoframes = HtmlBlockOpenNoframes (HtmlBlockNoframes | !HtmlBlockCloseNoframes .)* HtmlBlockCloseNoframes + # + # source://rdoc//lib/rdoc/markdown.rb#5627 + def _HtmlBlockNoframes; end + + # HtmlBlockNoscript = HtmlBlockOpenNoscript (HtmlBlockNoscript | !HtmlBlockCloseNoscript .)* HtmlBlockCloseNoscript + # + # source://rdoc//lib/rdoc/markdown.rb#5793 + def _HtmlBlockNoscript; end + + # HtmlBlockOl = HtmlBlockOpenOl (HtmlBlockOl | !HtmlBlockCloseOl .)* HtmlBlockCloseOl + # + # source://rdoc//lib/rdoc/markdown.rb#5959 + def _HtmlBlockOl; end + + # HtmlBlockOpenAddress = "<" Spnl ("address" | "ADDRESS") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#3029 + def _HtmlBlockOpenAddress; end + + # HtmlBlockOpenBlockquote = "<" Spnl ("blockquote" | "BLOCKQUOTE") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#3195 + def _HtmlBlockOpenBlockquote; end + + # HtmlBlockOpenCenter = "<" Spnl ("center" | "CENTER") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#3361 + def _HtmlBlockOpenCenter; end + + # HtmlBlockOpenDd = "<" Spnl ("dd" | "DD") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#6681 + def _HtmlBlockOpenDd; end + + # HtmlBlockOpenDir = "<" Spnl ("dir" | "DIR") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#3527 + def _HtmlBlockOpenDir; end + + # HtmlBlockOpenDiv = "<" Spnl ("div" | "DIV") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#3693 + def _HtmlBlockOpenDiv; end + + # HtmlBlockOpenDl = "<" Spnl ("dl" | "DL") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#3859 + def _HtmlBlockOpenDl; end + + # HtmlBlockOpenDt = "<" Spnl ("dt" | "DT") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#6847 + def _HtmlBlockOpenDt; end + + # HtmlBlockOpenFieldset = "<" Spnl ("fieldset" | "FIELDSET") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#4025 + def _HtmlBlockOpenFieldset; end + + # HtmlBlockOpenForm = "<" Spnl ("form" | "FORM") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#4191 + def _HtmlBlockOpenForm; end + + # HtmlBlockOpenFrameset = "<" Spnl ("frameset" | "FRAMESET") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#7013 + def _HtmlBlockOpenFrameset; end + + # HtmlBlockOpenH1 = "<" Spnl ("h1" | "H1") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#4357 + def _HtmlBlockOpenH1; end + + # HtmlBlockOpenH2 = "<" Spnl ("h2" | "H2") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#4523 + def _HtmlBlockOpenH2; end + + # HtmlBlockOpenH3 = "<" Spnl ("h3" | "H3") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#4689 + def _HtmlBlockOpenH3; end + + # HtmlBlockOpenH4 = "<" Spnl ("h4" | "H4") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#4855 + def _HtmlBlockOpenH4; end + + # HtmlBlockOpenH5 = "<" Spnl ("h5" | "H5") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#5021 + def _HtmlBlockOpenH5; end + + # HtmlBlockOpenH6 = "<" Spnl ("h6" | "H6") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#5187 + def _HtmlBlockOpenH6; end + + # HtmlBlockOpenHead = "<" Spnl ("head" | "HEAD") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#8496 + def _HtmlBlockOpenHead; end + + # HtmlBlockOpenLi = "<" Spnl ("li" | "LI") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#7179 + def _HtmlBlockOpenLi; end + + # HtmlBlockOpenMenu = "<" Spnl ("menu" | "MENU") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#5353 + def _HtmlBlockOpenMenu; end + + # HtmlBlockOpenNoframes = "<" Spnl ("noframes" | "NOFRAMES") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#5519 + def _HtmlBlockOpenNoframes; end + + # HtmlBlockOpenNoscript = "<" Spnl ("noscript" | "NOSCRIPT") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#5685 + def _HtmlBlockOpenNoscript; end + + # HtmlBlockOpenOl = "<" Spnl ("ol" | "OL") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#5851 + def _HtmlBlockOpenOl; end + + # HtmlBlockOpenP = "<" Spnl ("p" | "P") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#6017 + def _HtmlBlockOpenP; end + + # HtmlBlockOpenPre = "<" Spnl ("pre" | "PRE") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#6183 + def _HtmlBlockOpenPre; end + + # HtmlBlockOpenScript = "<" Spnl ("script" | "SCRIPT") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#8341 + def _HtmlBlockOpenScript; end + + # HtmlBlockOpenTable = "<" Spnl ("table" | "TABLE") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#6349 + def _HtmlBlockOpenTable; end + + # HtmlBlockOpenTbody = "<" Spnl ("tbody" | "TBODY") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#7345 + def _HtmlBlockOpenTbody; end + + # HtmlBlockOpenTd = "<" Spnl ("td" | "TD") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#7511 + def _HtmlBlockOpenTd; end + + # HtmlBlockOpenTfoot = "<" Spnl ("tfoot" | "TFOOT") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#7677 + def _HtmlBlockOpenTfoot; end + + # HtmlBlockOpenTh = "<" Spnl ("th" | "TH") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#7843 + def _HtmlBlockOpenTh; end + + # HtmlBlockOpenThead = "<" Spnl ("thead" | "THEAD") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#8009 + def _HtmlBlockOpenThead; end + + # HtmlBlockOpenTr = "<" Spnl ("tr" | "TR") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#8175 + def _HtmlBlockOpenTr; end + + # HtmlBlockOpenUl = "<" Spnl ("ul" | "UL") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#6515 + def _HtmlBlockOpenUl; end + + # HtmlBlockP = HtmlBlockOpenP (HtmlBlockP | !HtmlBlockCloseP .)* HtmlBlockCloseP + # + # source://rdoc//lib/rdoc/markdown.rb#6125 + def _HtmlBlockP; end + + # HtmlBlockPre = HtmlBlockOpenPre (HtmlBlockPre | !HtmlBlockClosePre .)* HtmlBlockClosePre + # + # source://rdoc//lib/rdoc/markdown.rb#6291 + def _HtmlBlockPre; end + + # HtmlBlockScript = HtmlBlockOpenScript (!HtmlBlockCloseScript .)* HtmlBlockCloseScript + # + # source://rdoc//lib/rdoc/markdown.rb#8449 + def _HtmlBlockScript; end + + # HtmlBlockSelfClosing = "<" Spnl HtmlBlockType Spnl HtmlAttribute* "/" Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#8896 + def _HtmlBlockSelfClosing; end + + # HtmlBlockTable = HtmlBlockOpenTable (HtmlBlockTable | !HtmlBlockCloseTable .)* HtmlBlockCloseTable + # + # source://rdoc//lib/rdoc/markdown.rb#6457 + def _HtmlBlockTable; end + + # HtmlBlockTbody = HtmlBlockOpenTbody (HtmlBlockTbody | !HtmlBlockCloseTbody .)* HtmlBlockCloseTbody + # + # source://rdoc//lib/rdoc/markdown.rb#7453 + def _HtmlBlockTbody; end + + # HtmlBlockTd = HtmlBlockOpenTd (HtmlBlockTd | !HtmlBlockCloseTd .)* HtmlBlockCloseTd + # + # source://rdoc//lib/rdoc/markdown.rb#7619 + def _HtmlBlockTd; end + + # HtmlBlockTfoot = HtmlBlockOpenTfoot (HtmlBlockTfoot | !HtmlBlockCloseTfoot .)* HtmlBlockCloseTfoot + # + # source://rdoc//lib/rdoc/markdown.rb#7785 + def _HtmlBlockTfoot; end + + # HtmlBlockTh = HtmlBlockOpenTh (HtmlBlockTh | !HtmlBlockCloseTh .)* HtmlBlockCloseTh + # + # source://rdoc//lib/rdoc/markdown.rb#7951 + def _HtmlBlockTh; end + + # HtmlBlockThead = HtmlBlockOpenThead (HtmlBlockThead | !HtmlBlockCloseThead .)* HtmlBlockCloseThead + # + # source://rdoc//lib/rdoc/markdown.rb#8117 + def _HtmlBlockThead; end + + # HtmlBlockTr = HtmlBlockOpenTr (HtmlBlockTr | !HtmlBlockCloseTr .)* HtmlBlockCloseTr + # + # source://rdoc//lib/rdoc/markdown.rb#8283 + def _HtmlBlockTr; end + + # HtmlBlockType = ("ADDRESS" | "BLOCKQUOTE" | "CENTER" | "DD" | "DIR" | "DIV" | "DL" | "DT" | "FIELDSET" | "FORM" | "FRAMESET" | "H1" | "H2" | "H3" | "H4" | "H5" | "H6" | "HR" | "ISINDEX" | "LI" | "MENU" | "NOFRAMES" | "NOSCRIPT" | "OL" | "P" | "PRE" | "SCRIPT" | "TABLE" | "TBODY" | "TD" | "TFOOT" | "TH" | "THEAD" | "TR" | "UL" | "address" | "blockquote" | "center" | "dd" | "dir" | "div" | "dl" | "dt" | "fieldset" | "form" | "frameset" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "hr" | "isindex" | "li" | "menu" | "noframes" | "noscript" | "ol" | "p" | "pre" | "script" | "table" | "tbody" | "td" | "tfoot" | "th" | "thead" | "tr" | "ul") + # + # source://rdoc//lib/rdoc/markdown.rb#8951 + def _HtmlBlockType; end + + # HtmlBlockUl = HtmlBlockOpenUl (HtmlBlockUl | !HtmlBlockCloseUl .)* HtmlBlockCloseUl + # + # source://rdoc//lib/rdoc/markdown.rb#6623 + def _HtmlBlockUl; end + + # HtmlCloseAnchor = "<" Spnl "/" ("a" | "A") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#2919 + def _HtmlCloseAnchor; end + + # HtmlComment = "" .)* "-->" + # + # source://rdoc//lib/rdoc/markdown.rb#14415 + def _HtmlComment; end + + # HtmlOpenAnchor = "<" Spnl ("a" | "A") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#2863 + def _HtmlOpenAnchor; end + + # HtmlTag = "<" Spnl "/"? AlphanumericAscii+ Spnl HtmlAttribute* "/"? Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#14462 + def _HtmlTag; end + + # HtmlUnclosed = "<" Spnl HtmlUnclosedType Spnl HtmlAttribute* Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#8828 + def _HtmlUnclosed; end + + # HtmlUnclosedType = ("HR" | "hr") + # + # source://rdoc//lib/rdoc/markdown.rb#8878 + def _HtmlUnclosedType; end + + # Image = "!" (ExplicitLink | ReferenceLink):a { "rdoc-image:#{a[/\[(.*)\]/, 1]}" } + # + # source://rdoc//lib/rdoc/markdown.rb#10972 + def _Image; end + + # InStyleTags = StyleOpen (!StyleClose .)* StyleClose + # + # source://rdoc//lib/rdoc/markdown.rb#9281 + def _InStyleTags; end + + # Indent = /\t| / + # + # source://rdoc//lib/rdoc/markdown.rb#14860 + def _Indent; end + + # IndentedLine = Indent Line + # + # source://rdoc//lib/rdoc/markdown.rb#14867 + def _IndentedLine; end + + # Inline = (Str | @Endline | UlOrStarLine | @Space | Strong | Emph | Strike | Image | Link | NoteReference | InlineNote | Code | RawHtml | Entity | EscapedChar | Symbol) + # + # source://rdoc//lib/rdoc/markdown.rb#9586 + def _Inline; end + + # InlineNote = &{ notes? } "^[" @StartList:a (!"]" Inline:l { a << l })+ "]" { ref = [:inline, @note_order.length] @footnotes[ref] = paragraph a note_for ref } + # + # source://rdoc//lib/rdoc/markdown.rb#15431 + def _InlineNote; end + + # Inlines = (!@Endline Inline:i { i } | @Endline:c !(&{ github? } Ticks3 /[^`\n]*$/) &Inline { c })+:chunks @Endline? { chunks } + # + # source://rdoc//lib/rdoc/markdown.rb#9365 + def _Inlines; end + + # Label = "[" (!"^" &{ notes? } | &. &{ !notes? }) @StartList:a (!"]" Inline:l { a << l })* "]" { a.join.gsub(/\s+/, ' ') } + # + # source://rdoc//lib/rdoc/markdown.rb#11907 + def _Label; end + + # Line = @RawLine:a { a } + # + # source://rdoc//lib/rdoc/markdown.rb#14938 + def _Line; end + + # LineBreak = " " @NormalEndline { RDoc::Markup::HardBreak.new } + # + # source://rdoc//lib/rdoc/markdown.rb#10042 + def _LineBreak; end + + # Link = (ExplicitLink | ReferenceLink | AutoLink) + # + # source://rdoc//lib/rdoc/markdown.rb#11011 + def _Link; end + + # ListBlock = !@BlankLine Line:a ListBlockLine*:c { [a, *c] } + # + # source://rdoc//lib/rdoc/markdown.rb#2548 + def _ListBlock; end + + # ListBlockLine = !@BlankLine !(Indent? (Bullet | Enumerator)) !HorizontalRule OptionallyIndentedLine + # + # source://rdoc//lib/rdoc/markdown.rb#2793 + def _ListBlockLine; end + + # ListContinuationBlock = @StartList:a @BlankLine* { a << "\n" } (Indent ListBlock:b { a.concat b })+ { a } + # + # source://rdoc//lib/rdoc/markdown.rb#2592 + def _ListContinuationBlock; end + + # ListItem = (Bullet | Enumerator) @StartList:a ListBlock:b { a << b } (ListContinuationBlock:c { a.push(*c) })* { list_item_from a } + # + # source://rdoc//lib/rdoc/markdown.rb#2392 + def _ListItem; end + + # ListItemTight = (Bullet | Enumerator) ListBlock:a (!@BlankLine ListContinuationBlock:b { a.push(*b) })* !ListContinuationBlock { list_item_from a } + # + # source://rdoc//lib/rdoc/markdown.rb#2468 + def _ListItemTight; end + + # ListLoose = @StartList:a (ListItem:b @BlankLine* { a << b })+ { a } + # + # source://rdoc//lib/rdoc/markdown.rb#2304 + def _ListLoose; end + + # ListTight = ListItemTight+:a @BlankLine* !(Bullet | Enumerator) { a } + # + # source://rdoc//lib/rdoc/markdown.rb#2239 + def _ListTight; end + + # Newline = %literals.Newline + # + # source://rdoc//lib/rdoc/markdown.rb#14726 + def _Newline; end + + # NonblankIndentedLine = !@BlankLine IndentedLine + # + # source://rdoc//lib/rdoc/markdown.rb#1821 + def _NonblankIndentedLine; end + + # NonindentSpace = / {0,3}/ + # + # source://rdoc//lib/rdoc/markdown.rb#14853 + def _NonindentSpace; end + + # Nonspacechar = !@Spacechar !@Newline . + # + # source://rdoc//lib/rdoc/markdown.rb#14552 + def _Nonspacechar; end + + # NormalChar = !(@SpecialChar | @Spacechar | @Newline) . + # + # source://rdoc//lib/rdoc/markdown.rb#14653 + def _NormalChar; end + + # NormalEndline = @Sp @Newline !@BlankLine !">" !AtxStart !(Line /={1,}|-{1,}/ @Newline) { "\n" } + # + # source://rdoc//lib/rdoc/markdown.rb#9938 + def _NormalEndline; end + + # Note = &{ notes? } @NonindentSpace RawNoteReference:ref ":" @Sp @StartList:a RawNoteBlock:i { a.concat i } (&Indent RawNoteBlock:i { a.concat i })* { @footnotes[ref] = paragraph a nil } + # + # source://rdoc//lib/rdoc/markdown.rb#15333 + def _Note; end + + # NoteReference = &{ notes? } RawNoteReference:ref { note_for ref } + # + # source://rdoc//lib/rdoc/markdown.rb#15207 + def _NoteReference; end + + # Notes = (Note | SkipBlock)* + # + # source://rdoc//lib/rdoc/markdown.rb#15538 + def _Notes; end + + # OptionallyIndentedLine = Indent? Line + # + # source://rdoc//lib/rdoc/markdown.rb#14888 + def _OptionallyIndentedLine; end + + # OrderedList = &Enumerator (ListTight | ListLoose):a { RDoc::Markup::List.new(:NUMBER, *a) } + # + # source://rdoc//lib/rdoc/markdown.rb#2752 + def _OrderedList; end + + # Para = @NonindentSpace Inlines:a @BlankLine+ { paragraph a } + # + # source://rdoc//lib/rdoc/markdown.rb#1014 + def _Para; end + + # Plain = Inlines:a { paragraph a } + # + # source://rdoc//lib/rdoc/markdown.rb#1057 + def _Plain; end + + # Quoted = ("\"" (!"\"" .)* "\"" | "'" (!"'" .)* "'") + # + # source://rdoc//lib/rdoc/markdown.rb#14175 + def _Quoted; end + + # RawHtml = < (HtmlComment | HtmlBlockScript | HtmlTag) > { if html? then text else '' end } + # + # source://rdoc//lib/rdoc/markdown.rb#14108 + def _RawHtml; end + + # RawLine = (< /[^\r\n]*/ @Newline > | < .+ > @Eof) { text } + # + # source://rdoc//lib/rdoc/markdown.rb#14961 + def _RawLine; end + + # RawNoteBlock = @StartList:a (!@BlankLine !RawNoteReference OptionallyIndentedLine:l { a << l })+ < @BlankLine* > { a << text } { a } + # + # source://rdoc//lib/rdoc/markdown.rb#15560 + def _RawNoteBlock; end + + # RawNoteReference = "[^" < (!@Newline !"]" .)+ > "]" { text } + # + # source://rdoc//lib/rdoc/markdown.rb#15237 + def _RawNoteReference; end + + # RefSrc = < Nonspacechar+ > { text } + # + # source://rdoc//lib/rdoc/markdown.rb#12026 + def _RefSrc; end + + # RefTitle = (RefTitleSingle | RefTitleDouble | RefTitleParens | EmptyTitle) + # + # source://rdoc//lib/rdoc/markdown.rb#12062 + def _RefTitle; end + + # RefTitleDouble = Spnl "\"" < (!("\"" @Sp @Newline | @Newline) .)* > "\"" { text } + # + # source://rdoc//lib/rdoc/markdown.rb#12185 + def _RefTitleDouble; end + + # RefTitleParens = Spnl "(" < (!(")" @Sp @Newline | @Newline) .)* > ")" { text } + # + # source://rdoc//lib/rdoc/markdown.rb#12277 + def _RefTitleParens; end + + # RefTitleSingle = Spnl "'" < (!("'" @Sp @Newline | @Newline) .)* > "'" { text } + # + # source://rdoc//lib/rdoc/markdown.rb#12093 + def _RefTitleSingle; end + + # Reference = @NonindentSpace !"[]" Label:label ":" Spnl RefSrc:link RefTitle @BlankLine+ { # TODO use title reference label, link nil } + # + # source://rdoc//lib/rdoc/markdown.rb#11832 + def _Reference; end + + # ReferenceLink = (ReferenceLinkDouble | ReferenceLinkSingle) + # + # source://rdoc//lib/rdoc/markdown.rb#11032 + def _ReferenceLink; end + + # ReferenceLinkDouble = Label:content < Spnl > !"[]" Label:label { link_to content, label, text } + # + # source://rdoc//lib/rdoc/markdown.rb#11050 + def _ReferenceLinkDouble; end + + # ReferenceLinkSingle = Label:content < (Spnl "[]")? > { link_to content, content, text } + # + # source://rdoc//lib/rdoc/markdown.rb#11096 + def _ReferenceLinkSingle; end + + # References = (Reference | SkipBlock)* + # + # source://rdoc//lib/rdoc/markdown.rb#12369 + def _References; end + + # SetextBottom1 = /={1,}/ @Newline + # + # source://rdoc//lib/rdoc/markdown.rb#1262 + def _SetextBottom1; end + + # SetextBottom2 = /-{1,}/ @Newline + # + # source://rdoc//lib/rdoc/markdown.rb#1283 + def _SetextBottom2; end + + # SetextHeading = (SetextHeading1 | SetextHeading2) + # + # source://rdoc//lib/rdoc/markdown.rb#1244 + def _SetextHeading; end + + # SetextHeading1 = &(@RawLine SetextBottom1) @StartList:a (!@Endline Inline:b { a << b })+ @Sp @Newline SetextBottom1 { RDoc::Markup::Heading.new(1, a.join) } + # + # source://rdoc//lib/rdoc/markdown.rb#1304 + def _SetextHeading1; end + + # SetextHeading2 = &(@RawLine SetextBottom2) @StartList:a (!@Endline Inline:b { a << b })+ @Sp @Newline SetextBottom2 { RDoc::Markup::Heading.new(2, a.join) } + # + # source://rdoc//lib/rdoc/markdown.rb#1426 + def _SetextHeading2; end + + # SkipBlock = (HtmlBlock | (!"#" !SetextBottom1 !SetextBottom2 !@BlankLine @RawLine)+ @BlankLine* | @BlankLine+ | @RawLine) + # + # source://rdoc//lib/rdoc/markdown.rb#15040 + def _SkipBlock; end + + # Source = ("<" < SourceContents > ">" | < SourceContents >) { text } + # + # source://rdoc//lib/rdoc/markdown.rb#11206 + def _Source; end + + # SourceContents = ((!"(" !")" !">" Nonspacechar)+ | "(" SourceContents ")")* + # + # source://rdoc//lib/rdoc/markdown.rb#11266 + def _SourceContents; end + + # Sp = @Spacechar* + # + # source://rdoc//lib/rdoc/markdown.rb#14584 + def _Sp; end + + # Space = @Spacechar+ { " " } + # + # source://rdoc//lib/rdoc/markdown.rb#9646 + def _Space; end + + # Spacechar = %literals.Spacechar + # + # source://rdoc//lib/rdoc/markdown.rb#14733 + def _Spacechar; end + + # SpecialChar = (/[~*_`&\[\]() { text } | < @Spacechar /\*+/ &@Spacechar > { text }) + # + # source://rdoc//lib/rdoc/markdown.rb#10129 + def _StarLine; end + + # StartList = &. { [] } + # + # source://rdoc//lib/rdoc/markdown.rb#14914 + def _StartList; end + + # Str = @StartList:a < @NormalChar+ > { a = text } (StrChunk:c { a << c })* { a } + # + # source://rdoc//lib/rdoc/markdown.rb#9678 + def _Str; end + + # StrChunk = < (@NormalChar | /_+/ &Alphanumeric)+ > { text } + # + # source://rdoc//lib/rdoc/markdown.rb#9751 + def _StrChunk; end + + # Strike = &{ strike? } "~~" !@Whitespace @StartList:a (!"~~" Inline:b { a << b })+ "~~" { strike a.join } + # + # source://rdoc//lib/rdoc/markdown.rb#10861 + def _Strike; end + + # Strong = (StrongStar | StrongUl) + # + # source://rdoc//lib/rdoc/markdown.rb#10635 + def _Strong; end + + # StrongStar = "**" !@Whitespace @StartList:a (!"**" Inline:b { a << b })+ "**" { strong a.join } + # + # source://rdoc//lib/rdoc/markdown.rb#10653 + def _StrongStar; end + + # StrongUl = "__" !@Whitespace @StartList:a (!"__" Inline:b { a << b })+ "__" { strong a.join } + # + # source://rdoc//lib/rdoc/markdown.rb#10757 + def _StrongUl; end + + # StyleBlock = < InStyleTags > @BlankLine* { if css? then RDoc::Markup::Raw.new text end } + # + # source://rdoc//lib/rdoc/markdown.rb#9328 + def _StyleBlock; end + + # StyleClose = "<" Spnl "/" ("style" | "STYLE") Spnl ">" + # + # source://rdoc//lib/rdoc/markdown.rb#9229 + def _StyleClose; end + + # StyleOpen = "<" Spnl ("style" | "STYLE") Spnl HtmlAttribute* ">" + # + # source://rdoc//lib/rdoc/markdown.rb#9173 + def _StyleOpen; end + + # Symbol = < @SpecialChar > { text } + # + # source://rdoc//lib/rdoc/markdown.rb#10069 + def _Symbol; end + + # Table = &{ github? } TableHead:header TableLine:line TableRow+:body { table = RDoc::Markup::Table.new(header, line, body) } + # + # source://rdoc//lib/rdoc/markdown.rb#15937 + def _Table; end + + # TableAlign = < /:?-+:?/ > @Sp { text.start_with?(":") ? (text.end_with?(":") ? :center : :left) : (text.end_with?(":") ? :right : nil) } + # + # source://rdoc//lib/rdoc/markdown.rb#16304 + def _TableAlign; end + + # TableAlign2 = "|" @Sp TableAlign + # + # source://rdoc//lib/rdoc/markdown.rb#16278 + def _TableAlign2; end + + # TableHead = TableItem2+:items "|"? @Newline { items } + # + # source://rdoc//lib/rdoc/markdown.rb#15993 + def _TableHead; end + + # TableItem = < /(?:\\.|[^|\n])+/ > { text.strip.gsub(/\\(.)/, '\1') } + # + # source://rdoc//lib/rdoc/markdown.rb#16159 + def _TableItem; end + + # TableItem2 = "|" TableItem + # + # source://rdoc//lib/rdoc/markdown.rb#16138 + def _TableItem2; end + + # TableLine = ((TableAlign:align1 TableAlign2*:aligns {[align1, *aligns] }):line | TableAlign2+:line) "|"? @Newline { line } + # + # source://rdoc//lib/rdoc/markdown.rb#16185 + def _TableLine; end + + # TableRow = ((TableItem:item1 TableItem2*:items { [item1, *items] }):row | TableItem2+:row) "|"? @Newline { row } + # + # source://rdoc//lib/rdoc/markdown.rb#16045 + def _TableRow; end + + # TerminalEndline = @Sp @Newline @Eof + # + # source://rdoc//lib/rdoc/markdown.rb#10016 + def _TerminalEndline; end + + # Ticks1 = "`" !"`" + # + # source://rdoc//lib/rdoc/markdown.rb#12391 + def _Ticks1; end + + # Ticks2 = "``" !"`" + # + # source://rdoc//lib/rdoc/markdown.rb#12415 + def _Ticks2; end + + # Ticks3 = "```" !"`" + # + # source://rdoc//lib/rdoc/markdown.rb#12439 + def _Ticks3; end + + # Ticks4 = "````" !"`" + # + # source://rdoc//lib/rdoc/markdown.rb#12463 + def _Ticks4; end + + # Ticks5 = "`````" !"`" + # + # source://rdoc//lib/rdoc/markdown.rb#12487 + def _Ticks5; end + + # Title = (TitleSingle | TitleDouble | ""):a { a } + # + # source://rdoc//lib/rdoc/markdown.rb#11383 + def _Title; end + + # TitleDouble = "\"" (!("\"" @Sp (")" | @Newline)) .)* "\"" + # + # source://rdoc//lib/rdoc/markdown.rb#11497 + def _TitleDouble; end + + # TitleSingle = "'" (!("'" @Sp (")" | @Newline)) .)* "'" + # + # source://rdoc//lib/rdoc/markdown.rb#11420 + def _TitleSingle; end + + # UlLine = (< /_{4,}/ > { text } | < @Spacechar /_+/ &@Spacechar > { text }) + # + # source://rdoc//lib/rdoc/markdown.rb#10206 + def _UlLine; end + + # UlOrStarLine = (UlLine | StarLine):a { a } + # + # source://rdoc//lib/rdoc/markdown.rb#10095 + def _UlOrStarLine; end + + # Verbatim = VerbatimChunk+:a { RDoc::Markup::Verbatim.new(*a.flatten) } + # + # source://rdoc//lib/rdoc/markdown.rb#1895 + def _Verbatim; end + + # VerbatimChunk = @BlankLine*:a NonblankIndentedLine+:b { a.concat b } + # + # source://rdoc//lib/rdoc/markdown.rb#1845 + def _VerbatimChunk; end + + # Whitespace = (@Spacechar | @Newline) + # + # source://rdoc//lib/rdoc/markdown.rb#10301 + def _Whitespace; end + + # root = Doc + # + # source://rdoc//lib/rdoc/markdown.rb#892 + def _root; end + + # source://rdoc//lib/rdoc/markdown.rb#502 + def apply(rule); end + + # source://rdoc//lib/rdoc/markdown.rb#468 + def apply_with_args(rule, *args); end + + # source://rdoc//lib/rdoc/markdown.rb#610 + def break_on_newline=(enable); end + + # source://rdoc//lib/rdoc/markdown.rb#606 + def break_on_newline?; end + + # source://rdoc//lib/rdoc/markdown.rb#610 + def css=(enable); end + + # source://rdoc//lib/rdoc/markdown.rb#606 + def css?; end + + # source://rdoc//lib/rdoc/markdown.rb#250 + def current_character(target = T.unsafe(nil)); end + + # source://rdoc//lib/rdoc/markdown.rb#211 + def current_column(target = T.unsafe(nil)); end + + # source://rdoc//lib/rdoc/markdown.rb#234 + def current_line(target = T.unsafe(nil)); end + + # source://rdoc//lib/rdoc/markdown.rb#259 + def current_pos_info(target = T.unsafe(nil)); end + + # source://rdoc//lib/rdoc/markdown.rb#610 + def definition_lists=(enable); end + + # source://rdoc//lib/rdoc/markdown.rb#606 + def definition_lists?; end + + # Wraps `text` in emphasis for rdoc inline formatting + # + # source://rdoc//lib/rdoc/markdown.rb#683 + def emphasis(text); end + + # :category: Extensions + # + # Enables or disables the extension with `name` + # + # source://rdoc//lib/rdoc/markdown.rb#705 + def extension(name, enable); end + + # :category: Extensions + # + # Is the extension `name` enabled? + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/markdown.rb#696 + def extension?(name); end + + # source://rdoc//lib/rdoc/markdown.rb#449 + def external_invoke(other, rule, *args); end + + # Returns the value of attribute failed_rule. + # + # source://rdoc//lib/rdoc/markdown.rb#371 + def failed_rule; end + + # Returns the value of attribute failing_rule_offset. + # + # source://rdoc//lib/rdoc/markdown.rb#208 + def failing_rule_offset; end + + # source://rdoc//lib/rdoc/markdown.rb#318 + def failure_caret; end + + # source://rdoc//lib/rdoc/markdown.rb#323 + def failure_character; end + + # source://rdoc//lib/rdoc/markdown.rb#306 + def failure_info; end + + # source://rdoc//lib/rdoc/markdown.rb#327 + def failure_oneline; end + + # source://rdoc//lib/rdoc/markdown.rb#393 + def get_byte; end + + # source://rdoc//lib/rdoc/markdown.rb#271 + def get_line(no); end + + # source://rdoc//lib/rdoc/markdown.rb#285 + def get_text(start); end + + # source://rdoc//lib/rdoc/markdown.rb#610 + def github=(enable); end + + # source://rdoc//lib/rdoc/markdown.rb#606 + def github?; end + + # source://rdoc//lib/rdoc/markdown.rb#535 + def grow_lr(rule, args, start_pos, m); end + + # source://rdoc//lib/rdoc/markdown.rb#610 + def html=(enable); end + + # source://rdoc//lib/rdoc/markdown.rb#606 + def html?; end + + # Parses `text` in a clone of this parser. This is used for handling nested + # lists the same way as markdown_parser. + # + # source://rdoc//lib/rdoc/markdown.rb#717 + def inner_parse(text); end + + # source://rdoc//lib/rdoc/markdown.rb#267 + def lines; end + + # Finds a link reference for `label` and creates a new link to it with + # `content` as the link text. If `label` was not encountered in the + # reference-gathering parser pass the label and content are reconstructed + # with the linking `text` (usually whitespace). + # + # @raise [ParseError] + # + # source://rdoc//lib/rdoc/markdown.rb#737 + def link_to(content, label = T.unsafe(nil), text = T.unsafe(nil)); end + + # Creates an RDoc::Markup::ListItem by parsing the `unparsed` content from + # the first parsing pass. + # + # source://rdoc//lib/rdoc/markdown.rb#754 + def list_item_from(unparsed); end + + # source://rdoc//lib/rdoc/markdown.rb#373 + def match_string(str); end + + # Stores `label` as a note and fills in previously unknown note references. + # + # source://rdoc//lib/rdoc/markdown.rb#762 + def note(label); end + + # Creates a new link for the footnote `reference` and adds the reference to + # the note order list for proper display at the end of the document. + # + # source://rdoc//lib/rdoc/markdown.rb#776 + def note_for(ref); end + + # source://rdoc//lib/rdoc/markdown.rb#610 + def notes=(enable); end + + # source://rdoc//lib/rdoc/markdown.rb#606 + def notes?; end + + # Creates an RDoc::Markup::Paragraph from `parts` and including + # extension-specific behavior + # + # source://rdoc//lib/rdoc/markdown.rb#793 + def paragraph(parts); end + + # Parses `markdown` into an RDoc::Document + # + # source://rdoc//lib/rdoc/markdown.rb#808 + def parse(markdown); end + + # The internal kpeg parse method + # + # source://rdoc//lib/rdoc/markdown.rb#414 + def peg_parse(rule = T.unsafe(nil)); end + + # Returns the value of attribute pos. + # + # source://rdoc//lib/rdoc/markdown.rb#209 + def pos; end + + # Sets the attribute pos + # + # @param value the value to set the attribute pos to. + # + # source://rdoc//lib/rdoc/markdown.rb#209 + def pos=(_arg0); end + + # source://rdoc//lib/rdoc/markdown.rb#221 + def position_line_offsets; end + + # @raise [ParseError] + # + # source://rdoc//lib/rdoc/markdown.rb#341 + def raise_error; end + + # Stores `label` as a reference to `link` and fills in previously unknown + # link references. + # + # source://rdoc//lib/rdoc/markdown.rb#855 + def reference(label, link); end + + # Returns the value of attribute result. + # + # source://rdoc//lib/rdoc/markdown.rb#209 + def result; end + + # Sets the attribute result + # + # @param value the value to set the attribute result to. + # + # source://rdoc//lib/rdoc/markdown.rb#209 + def result=(_arg0); end + + # source://rdoc//lib/rdoc/markdown.rb#383 + def scan(reg); end + + # source://rdoc//lib/rdoc/markdown.rb#364 + def set_failed_rule(name); end + + # Sets the string and current parsing position for the parser. + # + # source://rdoc//lib/rdoc/markdown.rb#290 + def set_string(string, pos); end + + # :stopdoc: + # + # source://rdoc//lib/rdoc/markdown.rb#887 + def setup_foreign_grammar; end + + # Prepares for parsing +str+. If you define a custom initialize you must + # call this method before #parse + # + # source://rdoc//lib/rdoc/markdown.rb#196 + def setup_parser(str, debug = T.unsafe(nil)); end + + # source://rdoc//lib/rdoc/markdown.rb#345 + def show_error(io = T.unsafe(nil)); end + + # source://rdoc//lib/rdoc/markdown.rb#297 + def show_pos; end + + # Wraps `text` in strike markup for rdoc inline formatting + # + # source://rdoc//lib/rdoc/markdown.rb#877 + def strike(text); end + + # source://rdoc//lib/rdoc/markdown.rb#610 + def strike=(enable); end + + # source://rdoc//lib/rdoc/markdown.rb#606 + def strike?; end + + # Returns the value of attribute string. + # + # source://rdoc//lib/rdoc/markdown.rb#207 + def string; end + + # Wraps `text` in strong markup for rdoc inline formatting + # + # source://rdoc//lib/rdoc/markdown.rb#866 + def strong(text); end + + private + + # This is distinct from setup_parser so that a standalone parser + # can redefine #initialize and still have access to the proper + # parser setup code. + # TODO remove when kpeg 0.10 is released + # + # @return [Markdown] a new instance of Markdown + # + # source://rdoc//lib/rdoc/markdown.rb#188 + def orig_initialize(str, debug = T.unsafe(nil)); end + + class << self + # Creates extension methods for the `name` extension to enable and disable + # the extension and to query if they are active. + # + # source://rdoc//lib/rdoc/markdown.rb#603 + def extension(name); end + + # Parses the `markdown` document into an RDoc::Document using the default + # extensions. + # + # source://rdoc//lib/rdoc/markdown.rb#656 + def parse(markdown); end + + # source://rdoc//lib/rdoc/markdown.rb#566 + def rule_info(name, rendered); end + end +end + +# source://rdoc//lib/rdoc/markdown.rb#257 +class RDoc::Markdown::KpegPosInfo < ::Struct + # Returns the value of attribute char + # + # @return [Object] the current value of char + def char; end + + # Sets the attribute char + # + # @param value [Object] the value to set the attribute char to. + # @return [Object] the newly set value + def char=(_); end + + # Returns the value of attribute col + # + # @return [Object] the current value of col + def col; end + + # Sets the attribute col + # + # @param value [Object] the value to set the attribute col to. + # @return [Object] the newly set value + def col=(_); end + + # Returns the value of attribute line + # + # @return [Object] the current value of line + def line; end + + # Sets the attribute line + # + # @param value [Object] the value to set the attribute line to. + # @return [Object] the newly set value + def line=(_); end + + # Returns the value of attribute lno + # + # @return [Object] the current value of lno + def lno; end + + # Sets the attribute lno + # + # @param value [Object] the value to set the attribute lno to. + # @return [Object] the newly set value + def lno=(_); end + + # Returns the value of attribute pos + # + # @return [Object] the current value of pos + def pos; end + + # Sets the attribute pos + # + # @param value [Object] the value to set the attribute pos to. + # @return [Object] the newly set value + def pos=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# This set of literals is for Ruby 1.9 regular expressions and gives full +# unicode support. +# +# Unlike peg-markdown, this set of literals recognizes Unicode alphanumeric +# characters, newlines and spaces. +# +# source://rdoc//lib/rdoc/markdown/literals.rb#11 +class RDoc::Markdown::Literals + # This is distinct from setup_parser so that a standalone parser + # can redefine #initialize and still have access to the proper + # parser setup code. + # + # @return [Literals] a new instance of Literals + # + # source://rdoc//lib/rdoc/markdown/literals.rb#17 + def initialize(str, debug = T.unsafe(nil)); end + + # Alphanumeric = /\p{Word}/ + # + # source://rdoc//lib/rdoc/markdown/literals.rb#405 + def _Alphanumeric; end + + # AlphanumericAscii = /[A-Za-z0-9]/ + # + # source://rdoc//lib/rdoc/markdown/literals.rb#412 + def _AlphanumericAscii; end + + # BOM = "uFEFF" + # + # source://rdoc//lib/rdoc/markdown/literals.rb#419 + def _BOM; end + + # Newline = /\n|\r\n?|\p{Zl}|\p{Zp}/ + # + # source://rdoc//lib/rdoc/markdown/literals.rb#426 + def _Newline; end + + # NonAlphanumeric = /\p{^Word}/ + # + # source://rdoc//lib/rdoc/markdown/literals.rb#433 + def _NonAlphanumeric; end + + # Spacechar = /\t|\p{Zs}/ + # + # source://rdoc//lib/rdoc/markdown/literals.rb#440 + def _Spacechar; end + + # source://rdoc//lib/rdoc/markdown/literals.rb#331 + def apply(rule); end + + # source://rdoc//lib/rdoc/markdown/literals.rb#297 + def apply_with_args(rule, *args); end + + # source://rdoc//lib/rdoc/markdown/literals.rb#79 + def current_character(target = T.unsafe(nil)); end + + # source://rdoc//lib/rdoc/markdown/literals.rb#40 + def current_column(target = T.unsafe(nil)); end + + # source://rdoc//lib/rdoc/markdown/literals.rb#63 + def current_line(target = T.unsafe(nil)); end + + # source://rdoc//lib/rdoc/markdown/literals.rb#88 + def current_pos_info(target = T.unsafe(nil)); end + + # source://rdoc//lib/rdoc/markdown/literals.rb#278 + def external_invoke(other, rule, *args); end + + # Returns the value of attribute failed_rule. + # + # source://rdoc//lib/rdoc/markdown/literals.rb#200 + def failed_rule; end + + # Returns the value of attribute failing_rule_offset. + # + # source://rdoc//lib/rdoc/markdown/literals.rb#37 + def failing_rule_offset; end + + # source://rdoc//lib/rdoc/markdown/literals.rb#147 + def failure_caret; end + + # source://rdoc//lib/rdoc/markdown/literals.rb#152 + def failure_character; end + + # source://rdoc//lib/rdoc/markdown/literals.rb#135 + def failure_info; end + + # source://rdoc//lib/rdoc/markdown/literals.rb#156 + def failure_oneline; end + + # source://rdoc//lib/rdoc/markdown/literals.rb#222 + def get_byte; end + + # source://rdoc//lib/rdoc/markdown/literals.rb#100 + def get_line(no); end + + # source://rdoc//lib/rdoc/markdown/literals.rb#114 + def get_text(start); end + + # source://rdoc//lib/rdoc/markdown/literals.rb#364 + def grow_lr(rule, args, start_pos, m); end + + # source://rdoc//lib/rdoc/markdown/literals.rb#96 + def lines; end + + # source://rdoc//lib/rdoc/markdown/literals.rb#202 + def match_string(str); end + + # source://rdoc//lib/rdoc/markdown/literals.rb#243 + def parse(rule = T.unsafe(nil)); end + + # Returns the value of attribute pos. + # + # source://rdoc//lib/rdoc/markdown/literals.rb#38 + def pos; end + + # Sets the attribute pos + # + # @param value the value to set the attribute pos to. + # + # source://rdoc//lib/rdoc/markdown/literals.rb#38 + def pos=(_arg0); end + + # source://rdoc//lib/rdoc/markdown/literals.rb#50 + def position_line_offsets; end + + # @raise [ParseError] + # + # source://rdoc//lib/rdoc/markdown/literals.rb#170 + def raise_error; end + + # Returns the value of attribute result. + # + # source://rdoc//lib/rdoc/markdown/literals.rb#38 + def result; end + + # Sets the attribute result + # + # @param value the value to set the attribute result to. + # + # source://rdoc//lib/rdoc/markdown/literals.rb#38 + def result=(_arg0); end + + # source://rdoc//lib/rdoc/markdown/literals.rb#212 + def scan(reg); end + + # source://rdoc//lib/rdoc/markdown/literals.rb#193 + def set_failed_rule(name); end + + # Sets the string and current parsing position for the parser. + # + # source://rdoc//lib/rdoc/markdown/literals.rb#119 + def set_string(string, pos); end + + # :startdoc: + # :stopdoc: + # + # source://rdoc//lib/rdoc/markdown/literals.rb#402 + def setup_foreign_grammar; end + + # Prepares for parsing +str+. If you define a custom initialize you must + # call this method before #parse + # + # source://rdoc//lib/rdoc/markdown/literals.rb#25 + def setup_parser(str, debug = T.unsafe(nil)); end + + # source://rdoc//lib/rdoc/markdown/literals.rb#174 + def show_error(io = T.unsafe(nil)); end + + # source://rdoc//lib/rdoc/markdown/literals.rb#126 + def show_pos; end + + # Returns the value of attribute string. + # + # source://rdoc//lib/rdoc/markdown/literals.rb#36 + def string; end + + class << self + # source://rdoc//lib/rdoc/markdown/literals.rb#395 + def rule_info(name, rendered); end + end +end + +# source://rdoc//lib/rdoc/markdown/literals.rb#86 +class RDoc::Markdown::Literals::KpegPosInfo < ::Struct + # Returns the value of attribute char + # + # @return [Object] the current value of char + def char; end + + # Sets the attribute char + # + # @param value [Object] the value to set the attribute char to. + # @return [Object] the newly set value + def char=(_); end + + # Returns the value of attribute col + # + # @return [Object] the current value of col + def col; end + + # Sets the attribute col + # + # @param value [Object] the value to set the attribute col to. + # @return [Object] the newly set value + def col=(_); end + + # Returns the value of attribute line + # + # @return [Object] the current value of line + def line; end + + # Sets the attribute line + # + # @param value [Object] the value to set the attribute line to. + # @return [Object] the newly set value + def line=(_); end + + # Returns the value of attribute lno + # + # @return [Object] the current value of lno + def lno; end + + # Sets the attribute lno + # + # @param value [Object] the value to set the attribute lno to. + # @return [Object] the newly set value + def lno=(_); end + + # Returns the value of attribute pos + # + # @return [Object] the current value of pos + def pos; end + + # Sets the attribute pos + # + # @param value [Object] the value to set the attribute pos to. + # @return [Object] the newly set value + def pos=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://rdoc//lib/rdoc/markdown/literals.rb#257 +class RDoc::Markdown::Literals::MemoEntry + # @return [MemoEntry] a new instance of MemoEntry + # + # source://rdoc//lib/rdoc/markdown/literals.rb#258 + def initialize(ans, pos); end + + # Returns the value of attribute ans. + # + # source://rdoc//lib/rdoc/markdown/literals.rb#266 + def ans; end + + # Returns the value of attribute left_rec. + # + # source://rdoc//lib/rdoc/markdown/literals.rb#267 + def left_rec; end + + # Sets the attribute left_rec + # + # @param value the value to set the attribute left_rec to. + # + # source://rdoc//lib/rdoc/markdown/literals.rb#267 + def left_rec=(_arg0); end + + # source://rdoc//lib/rdoc/markdown/literals.rb#269 + def move!(ans, pos, result); end + + # Returns the value of attribute pos. + # + # source://rdoc//lib/rdoc/markdown/literals.rb#266 + def pos; end + + # Returns the value of attribute result. + # + # source://rdoc//lib/rdoc/markdown/literals.rb#266 + def result; end + + # Returns the value of attribute set. + # + # source://rdoc//lib/rdoc/markdown/literals.rb#266 + def set; end +end + +# source://rdoc//lib/rdoc/markdown/literals.rb#386 +class RDoc::Markdown::Literals::RuleInfo + # @return [RuleInfo] a new instance of RuleInfo + # + # source://rdoc//lib/rdoc/markdown/literals.rb#387 + def initialize(name, rendered); end + + # Returns the value of attribute name. + # + # source://rdoc//lib/rdoc/markdown/literals.rb#392 + def name; end + + # Returns the value of attribute rendered. + # + # source://rdoc//lib/rdoc/markdown/literals.rb#392 + def rendered; end +end + +# source://rdoc//lib/rdoc/markdown.rb#428 +class RDoc::Markdown::MemoEntry + # @return [MemoEntry] a new instance of MemoEntry + # + # source://rdoc//lib/rdoc/markdown.rb#429 + def initialize(ans, pos); end + + # Returns the value of attribute ans. + # + # source://rdoc//lib/rdoc/markdown.rb#437 + def ans; end + + # Returns the value of attribute left_rec. + # + # source://rdoc//lib/rdoc/markdown.rb#438 + def left_rec; end + + # Sets the attribute left_rec + # + # @param value the value to set the attribute left_rec to. + # + # source://rdoc//lib/rdoc/markdown.rb#438 + def left_rec=(_arg0); end + + # source://rdoc//lib/rdoc/markdown.rb#440 + def move!(ans, pos, result); end + + # Returns the value of attribute pos. + # + # source://rdoc//lib/rdoc/markdown.rb#437 + def pos; end + + # Returns the value of attribute result. + # + # source://rdoc//lib/rdoc/markdown.rb#437 + def result; end + + # Returns the value of attribute set. + # + # source://rdoc//lib/rdoc/markdown.rb#437 + def set; end +end + +# source://rdoc//lib/rdoc/markdown.rb#557 +class RDoc::Markdown::RuleInfo + # @return [RuleInfo] a new instance of RuleInfo + # + # source://rdoc//lib/rdoc/markdown.rb#558 + def initialize(name, rendered); end + + # Returns the value of attribute name. + # + # source://rdoc//lib/rdoc/markdown.rb#563 + def name; end + + # Returns the value of attribute rendered. + # + # source://rdoc//lib/rdoc/markdown.rb#563 + def rendered; end +end + +# source://rdoc//lib/rdoc/markup.rb#106 +class RDoc::Markup + # Take a block of text and use various heuristics to determine its + # structure (paragraphs, lists, and so on). Invoke an event handler as we + # identify significant chunks. + # + # @return [Markup] a new instance of Markup + # + # source://rdoc//lib/rdoc/markup.rb#146 + def initialize(attribute_manager = T.unsafe(nil)); end + + # Add to the sequences recognized as general markup. + # + # source://rdoc//lib/rdoc/markup.rb#163 + def add_html(tag, name); end + + # Add to other inline sequences. For example, we could add WikiWords using + # something like: + # + # parser.add_regexp_handling(/\b([A-Z][a-z]+[A-Z]\w+)/, :WIKIWORD) + # + # Each wiki word will be presented to the output formatter. + # + # source://rdoc//lib/rdoc/markup.rb#175 + def add_regexp_handling(pattern, name); end + + # Add to the sequences used to add formatting to an individual word (such + # as *bold*). Matching entries will generate attributes that the output + # formatters can recognize by their +name+. + # + # source://rdoc//lib/rdoc/markup.rb#156 + def add_word_pair(start, stop, name); end + + # An AttributeManager which handles inline markup. + # + # source://rdoc//lib/rdoc/markup.rb#111 + def attribute_manager; end + + # We take +input+, parse it if necessary, then invoke the output +formatter+ + # using a Visitor to render the result. + # + # source://rdoc//lib/rdoc/markup.rb#183 + def convert(input, formatter); end + + class << self + # Parses +str+ into an RDoc::Markup::Document. + # + # source://rdoc//lib/rdoc/markup.rb#116 + def parse(str); end + end +end + +# An AttrChanger records a change in attributes. It contains a bitmap of the +# attributes to turn on, and a bitmap of those to turn off. +# +# source://rdoc//lib/rdoc/markup/attr_changer.rb#4 +class RDoc::Markup::AttrChanger < ::Struct + # source://rdoc//lib/rdoc/markup/attr_changer.rb#18 + def inspect; end + + # source://rdoc//lib/rdoc/markup/attr_changer.rb#14 + def to_s; end +end + +# An array of attributes which parallels the characters in a string. +# +# source://rdoc//lib/rdoc/markup/attr_span.rb#5 +class RDoc::Markup::AttrSpan + # Creates a new AttrSpan for +length+ characters + # + # @return [AttrSpan] a new instance of AttrSpan + # + # source://rdoc//lib/rdoc/markup/attr_span.rb#10 + def initialize(length, exclusive); end + + # Accesses flags for character +n+ + # + # source://rdoc//lib/rdoc/markup/attr_span.rb#31 + def [](n); end + + # Toggles +bits+ from +start+ to +length+ + # + # source://rdoc//lib/rdoc/markup/attr_span.rb#17 + def set_attrs(start, length, bits); end +end + +# Manages changes of attributes in a block of text +# +# source://rdoc//lib/rdoc/markup/attribute_manager.rb#6 +class RDoc::Markup::AttributeManager + # Creates a new attribute manager that understands bold, emphasized and + # teletype text. + # + # @return [AttributeManager] a new instance of AttributeManager + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#80 + def initialize; end + + # Adds a markup class with +name+ for words surrounded by HTML tag +tag+. + # To process emphasis tags: + # + # am.add_html 'em', :EM + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#286 + def add_html(tag, name, exclusive = T.unsafe(nil)); end + + # Adds a regexp handling for +pattern+ with +name+. A simple URL handler + # would be: + # + # @am.add_regexp_handling(/((https?:)\S+\w)/, :HYPERLINK) + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#298 + def add_regexp_handling(pattern, name, exclusive = T.unsafe(nil)); end + + # Adds a markup class with +name+ for words wrapped in the +start+ and + # +stop+ character. To make words wrapped with "*" bold: + # + # am.add_word_pair '*', '*', :BOLD + # + # @raise [ArgumentError] + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#261 + def add_word_pair(start, stop, name, exclusive = T.unsafe(nil)); end + + # Return an attribute object with the given turn_on and turn_off bits set + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#103 + def attribute(turn_on, turn_off); end + + # The attributes enabled for this markup object. + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#40 + def attributes; end + + # Changes the current attribute from +current+ to +new+ + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#110 + def change_attribute(current, new); end + + # Used by the tests to change attributes by name from +current_set+ to + # +new_set+ + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#119 + def changed_attribute_by_name(current_set, new_set); end + + # Map attributes like textto the sequence + # \001\002\001\003, where is a per-attribute specific + # character + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#154 + def convert_attrs(str, attrs, exclusive = T.unsafe(nil)); end + + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#160 + def convert_attrs_matching_word_pairs(str, attrs, exclusive); end + + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#185 + def convert_attrs_word_pair_map(str, attrs, exclusive); end + + # Converts HTML tags to RDoc attributes + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#206 + def convert_html(str, attrs, exclusive = T.unsafe(nil)); end + + # Converts regexp handling sequences to RDoc attributes + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#223 + def convert_regexp_handlings(str, attrs, exclusive = T.unsafe(nil)); end + + # Copies +start_pos+ to +end_pos+ from the current string + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#135 + def copy_string(start_pos, end_pos); end + + # Debug method that prints a string along with its attributes + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#329 + def display_attributes; end + + # @return [Boolean] + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#142 + def exclusive?(attr); end + + # A bits of exclusive maps + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#74 + def exclusive_bitmap; end + + # Processes +str+ converting attributes, HTML and regexp handlings + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#307 + def flow(str); end + + # This maps HTML tags to the corresponding attribute char + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#58 + def html_tags; end + + # Escapes regexp handling sequences of text to prevent conversion to RDoc + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#239 + def mask_protected_sequences; end + + # This maps delimiters that occur around words (such as *bold* or +tt+) + # where the start and end delimiters and the same. This lets us optimize + # the regexp + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#47 + def matching_word_pairs; end + + # A \ in front of a character that would normally be processed turns off + # processing. We do this by turning \< into <#{PROTECT} + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#64 + def protectable; end + + # And this maps _regexp handling_ sequences to a name. A regexp handling + # sequence is something like a WikiWord + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#70 + def regexp_handlings; end + + # Splits the string into chunks by attribute change + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#354 + def split_into_flow; end + + # Unescapes regexp handling sequences of text + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#251 + def unmask_protected_sequences; end + + # And this is used when the delimiters aren't the same. In this case the + # hash maps a pattern to the attribute character + # + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#53 + def word_pair_map; end +end + +# source://rdoc//lib/rdoc/markup/attribute_manager.rb#147 +RDoc::Markup::AttributeManager::NON_PRINTING_END = T.let(T.unsafe(nil), String) + +# source://rdoc//lib/rdoc/markup/attribute_manager.rb#146 +RDoc::Markup::AttributeManager::NON_PRINTING_START = T.let(T.unsafe(nil), String) + +# We manage a set of attributes. Each attribute has a symbol name and a bit +# value. +# +# source://rdoc//lib/rdoc/markup/attributes.rb#6 +class RDoc::Markup::Attributes + # Creates a new attributes set. + # + # @return [Attributes] a new instance of Attributes + # + # source://rdoc//lib/rdoc/markup/attributes.rb#16 + def initialize; end + + # Returns a string representation of +bitmap+ + # + # source://rdoc//lib/rdoc/markup/attributes.rb#46 + def as_string(bitmap); end + + # Returns a unique bit for +name+ + # + # source://rdoc//lib/rdoc/markup/attributes.rb#29 + def bitmap_for(name); end + + # yields each attribute name in +bitmap+ + # + # source://rdoc//lib/rdoc/markup/attributes.rb#60 + def each_name_of(bitmap); end + + # The regexp handling attribute type. See RDoc::Markup#add_regexp_handling + # + # source://rdoc//lib/rdoc/markup/attributes.rb#11 + def regexp_handling; end +end + +# An empty line. This class is a singleton. +# +# source://rdoc//lib/rdoc/markup/blank_line.rb#5 +class RDoc::Markup::BlankLine + # Calls #accept_blank_line on +visitor+ + # + # source://rdoc//lib/rdoc/markup/blank_line.rb#19 + def accept(visitor); end + + # source://rdoc//lib/rdoc/markup/blank_line.rb#23 + def pretty_print(q); end + + class << self + # RDoc::Markup::BlankLine is a singleton + # + # source://rdoc//lib/rdoc/markup/blank_line.rb#12 + def new; end + end +end + +# A quoted section which contains markup items. +# +# source://rdoc//lib/rdoc/markup/block_quote.rb#5 +class RDoc::Markup::BlockQuote < ::RDoc::Markup::Raw + # Calls #accept_block_quote on +visitor+ + # + # source://rdoc//lib/rdoc/markup/block_quote.rb#10 + def accept(visitor); end +end + +# A Document containing lists, headings, paragraphs, etc. +# +# source://rdoc//lib/rdoc/markup/document.rb#5 +class RDoc::Markup::Document + include ::Enumerable + + # Creates a new Document with +parts+ + # + # @return [Document] a new instance of Document + # + # source://rdoc//lib/rdoc/markup/document.rb#29 + def initialize(*parts); end + + # Appends +part+ to the document + # + # source://rdoc//lib/rdoc/markup/document.rb#40 + def <<(part); end + + # source://rdoc//lib/rdoc/markup/document.rb#56 + def ==(other); end + + # Runs this document and all its #items through +visitor+ + # + # source://rdoc//lib/rdoc/markup/document.rb#65 + def accept(visitor); end + + # Concatenates the given +parts+ onto the document + # + # source://rdoc//lib/rdoc/markup/document.rb#76 + def concat(parts); end + + # Enumerator for the parts of this document + # + # source://rdoc//lib/rdoc/markup/document.rb#83 + def each(&block); end + + # Does this document have no parts? + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/markup/document.rb#90 + def empty?; end + + # The file this document was created from. See also + # RDoc::ClassModule#add_comment + # + # source://rdoc//lib/rdoc/markup/document.rb#13 + def file; end + + # The file this Document was created from. + # + # source://rdoc//lib/rdoc/markup/document.rb#97 + def file=(location); end + + # When this is a collection of documents (#file is not set and this document + # contains only other documents as its direct children) #merge replaces + # documents in this class with documents from +other+ when the file matches + # and adds documents from +other+ when the files do not. + # + # The information in +other+ is preferred over the receiver + # + # source://rdoc//lib/rdoc/markup/document.rb#114 + def merge(other); end + + # Does this Document contain other Documents? + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/markup/document.rb#134 + def merged?; end + + # If a heading is below the given level it will be omitted from the + # table_of_contents + # + # source://rdoc//lib/rdoc/markup/document.rb#19 + def omit_headings_below; end + + # If a heading is below the given level it will be omitted from the + # table_of_contents + # + # source://rdoc//lib/rdoc/markup/document.rb#19 + def omit_headings_below=(_arg0); end + + # The parts of the Document + # + # source://rdoc//lib/rdoc/markup/document.rb#24 + def parts; end + + # source://rdoc//lib/rdoc/markup/document.rb#138 + def pretty_print(q); end + + # Appends +parts+ to the document + # + # source://rdoc//lib/rdoc/markup/document.rb#151 + def push(*parts); end + + # Returns an Array of headings in the document. + # + # Require 'rdoc/markup/formatter' before calling this method. + # + # source://rdoc//lib/rdoc/markup/document.rb#160 + def table_of_contents; end +end + +# Base class for RDoc markup formatters +# +# Formatters are a visitor that converts an RDoc::Markup tree (from a comment) +# into some kind of output. RDoc ships with formatters for converting back to +# rdoc, ANSI text, HTML, a Table of Contents and other formats. +# +# If you'd like to write your own Formatter use +# RDoc::Markup::FormatterTestCase. If you're writing a text-output formatter +# use RDoc::Markup::TextFormatterTestCase which provides extra test cases. +# +# source://rdoc//lib/rdoc/markup/formatter.rb#13 +class RDoc::Markup::Formatter + # Creates a new Formatter + # + # @return [Formatter] a new instance of Formatter + # + # source://rdoc//lib/rdoc/markup/formatter.rb#48 + def initialize(options, markup = T.unsafe(nil)); end + + # Adds +document+ to the output + # + # source://rdoc//lib/rdoc/markup/formatter.rb#69 + def accept_document(document); end + + # Adds a regexp handling for links of the form rdoc-...: + # + # source://rdoc//lib/rdoc/markup/formatter.rb#83 + def add_regexp_handling_RDOCLINK; end + + # Adds a regexp handling for links of the form {}[] and + # [] + # + # source://rdoc//lib/rdoc/markup/formatter.rb#91 + def add_regexp_handling_TIDYLINK; end + + # Add a new set of tags for an attribute. We allow separate start and end + # tags for flexibility + # + # source://rdoc//lib/rdoc/markup/formatter.rb#105 + def add_tag(name, start, stop); end + + # Allows +tag+ to be decorated with additional information. + # + # source://rdoc//lib/rdoc/markup/formatter.rb#113 + def annotate(tag); end + + # Marks up +content+ + # + # source://rdoc//lib/rdoc/markup/formatter.rb#120 + def convert(content); end + + # Converts flow items +flow+ + # + # source://rdoc//lib/rdoc/markup/formatter.rb#127 + def convert_flow(flow); end + + # Converts added regexp handlings. See RDoc::Markup#add_regexp_handling + # + # source://rdoc//lib/rdoc/markup/formatter.rb#150 + def convert_regexp_handling(target); end + + # Converts a string to be fancier if desired + # + # source://rdoc//lib/rdoc/markup/formatter.rb#176 + def convert_string(string); end + + # Use ignore in your subclass to ignore the content of a node. + # + # ## + # # We don't support raw nodes in ToNoRaw + # + # alias accept_raw ignore + # + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def ignore(*node); end + + # Are we currently inside tt tags? + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/markup/formatter.rb#194 + def in_tt?; end + + # Turns off tags for +item+ on +res+ + # + # source://rdoc//lib/rdoc/markup/formatter.rb#216 + def off_tags(res, item); end + + # Turns on tags for +item+ on +res+ + # + # source://rdoc//lib/rdoc/markup/formatter.rb#201 + def on_tags(res, item); end + + # Extracts and a scheme, url and an anchor id from +url+ and returns them. + # + # source://rdoc//lib/rdoc/markup/formatter.rb#231 + def parse_url(url); end + + # Is +tag+ a tt tag? + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/markup/formatter.rb#261 + def tt?(tag); end + + class << self + # Converts a target url to one that is relative to a given path + # + # source://rdoc//lib/rdoc/markup/formatter.rb#24 + def gen_relative_url(path, target); end + end +end + +# A hard-break in the middle of a paragraph. +# +# source://rdoc//lib/rdoc/markup/hard_break.rb#5 +class RDoc::Markup::HardBreak + # source://rdoc//lib/rdoc/markup/hard_break.rb#23 + def ==(other); end + + # Calls #accept_hard_break on +visitor+ + # + # source://rdoc//lib/rdoc/markup/hard_break.rb#19 + def accept(visitor); end + + # source://rdoc//lib/rdoc/markup/hard_break.rb#27 + def pretty_print(q); end + + class << self + # RDoc::Markup::HardBreak is a singleton + # + # source://rdoc//lib/rdoc/markup/hard_break.rb#12 + def new; end + end +end + +# source://rdoc//lib/rdoc/markup/heading.rb#6 +class RDoc::Markup::Heading < ::Struct + # source://rdoc//lib/rdoc/markup/heading.rb#40 + def accept(visitor); end + + # source://rdoc//lib/rdoc/markup/heading.rb#47 + def aref; end + + # source://rdoc//lib/rdoc/markup/heading.rb#55 + def label(context = T.unsafe(nil)); end + + # source://rdoc//lib/rdoc/markup/heading.rb#68 + def plain_html; end + + # source://rdoc//lib/rdoc/markup/heading.rb#72 + def pretty_print(q); end + + class << self + # source://rdoc//lib/rdoc/markup/heading.rb#22 + def to_html; end + + # source://rdoc//lib/rdoc/markup/heading.rb#14 + def to_label; end + end +end + +# A file included at generation time. Objects of this class are created by +# RDoc::RD for an extension-less include. +# +# This implementation in incomplete. +# +# source://rdoc//lib/rdoc/markup/include.rb#8 +class RDoc::Markup::Include + # Creates a new include that will import +file+ from +include_path+ + # + # @return [Include] a new instance of Include + # + # source://rdoc//lib/rdoc/markup/include.rb#23 + def initialize(file, include_path); end + + # source://rdoc//lib/rdoc/markup/include.rb#28 + def ==(other); end + + # The filename to be included, without extension + # + # source://rdoc//lib/rdoc/markup/include.rb#13 + def file; end + + # Directories to search for #file + # + # source://rdoc//lib/rdoc/markup/include.rb#18 + def include_path; end + + # source://rdoc//lib/rdoc/markup/include.rb#33 + def pretty_print(q); end +end + +# An Indented Paragraph of text +# +# source://rdoc//lib/rdoc/markup/indented_paragraph.rb#5 +class RDoc::Markup::IndentedParagraph < ::RDoc::Markup::Raw + # Creates a new IndentedParagraph containing +parts+ indented with +indent+ + # spaces + # + # @return [IndentedParagraph] a new instance of IndentedParagraph + # + # source://rdoc//lib/rdoc/markup/indented_paragraph.rb#16 + def initialize(indent, *parts); end + + # source://rdoc//lib/rdoc/markup/indented_paragraph.rb#22 + def ==(other); end + + # Calls #accept_indented_paragraph on +visitor+ + # + # source://rdoc//lib/rdoc/markup/indented_paragraph.rb#29 + def accept(visitor); end + + # The indent in number of spaces + # + # source://rdoc//lib/rdoc/markup/indented_paragraph.rb#10 + def indent; end + + # Joins the raw paragraph text and converts inline HardBreaks to the + # +hard_break+ text followed by the indent. + # + # source://rdoc//lib/rdoc/markup/indented_paragraph.rb#37 + def text(hard_break = T.unsafe(nil)); end +end + +# A List is a homogeneous set of ListItems. +# +# The supported list types include: +# +# :BULLET:: +# An unordered list +# :LABEL:: +# An unordered definition list, but using an alternate RDoc::Markup syntax +# :LALPHA:: +# An ordered list using increasing lowercase English letters +# :NOTE:: +# An unordered definition list +# :NUMBER:: +# An ordered list using increasing Arabic numerals +# :UALPHA:: +# An ordered list using increasing uppercase English letters +# +# Definition lists behave like HTML definition lists. Each list item can +# describe multiple terms. See RDoc::Markup::ListItem for how labels and +# definition are stored as list items. +# +# source://rdoc//lib/rdoc/markup/list.rb#24 +class RDoc::Markup::List + # Creates a new list of +type+ with +items+. Valid list types are: + # +:BULLET+, +:LABEL+, +:LALPHA+, +:NOTE+, +:NUMBER+, +:UALPHA+ + # + # @return [List] a new instance of List + # + # source://rdoc//lib/rdoc/markup/list.rb#40 + def initialize(type = T.unsafe(nil), *items); end + + # Appends +item+ to the list + # + # source://rdoc//lib/rdoc/markup/list.rb#49 + def <<(item); end + + # source://rdoc//lib/rdoc/markup/list.rb#53 + def ==(other); end + + # Runs this list and all its #items through +visitor+ + # + # source://rdoc//lib/rdoc/markup/list.rb#62 + def accept(visitor); end + + # Is the list empty? + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/markup/list.rb#75 + def empty?; end + + # Items in the list + # + # source://rdoc//lib/rdoc/markup/list.rb#34 + def items; end + + # Returns the last item in the list + # + # source://rdoc//lib/rdoc/markup/list.rb#82 + def last; end + + # source://rdoc//lib/rdoc/markup/list.rb#86 + def pretty_print(q); end + + # Appends +items+ to the list + # + # source://rdoc//lib/rdoc/markup/list.rb#97 + def push(*items); end + + # The list's type + # + # source://rdoc//lib/rdoc/markup/list.rb#29 + def type; end + + # The list's type + # + # source://rdoc//lib/rdoc/markup/list.rb#29 + def type=(_arg0); end +end + +# An item within a List that contains paragraphs, headings, etc. +# +# For BULLET, NUMBER, LALPHA and UALPHA lists, the label will always be nil. +# For NOTE and LABEL lists, the list label may contain: +# +# * a single String for a single label +# * an Array of Strings for a list item with multiple terms +# * nil for an extra description attached to a previously labeled list item +# +# source://rdoc//lib/rdoc/markup/list_item.rb#12 +class RDoc::Markup::ListItem + # Creates a new ListItem with an optional +label+ containing +parts+ + # + # @return [ListItem] a new instance of ListItem + # + # source://rdoc//lib/rdoc/markup/list_item.rb#27 + def initialize(label = T.unsafe(nil), *parts); end + + # Appends +part+ to the ListItem + # + # source://rdoc//lib/rdoc/markup/list_item.rb#36 + def <<(part); end + + # source://rdoc//lib/rdoc/markup/list_item.rb#40 + def ==(other); end + + # Runs this list item and all its #parts through +visitor+ + # + # source://rdoc//lib/rdoc/markup/list_item.rb#49 + def accept(visitor); end + + # Is the ListItem empty? + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/markup/list_item.rb#62 + def empty?; end + + # The label for the ListItem + # + # source://rdoc//lib/rdoc/markup/list_item.rb#17 + def label; end + + # The label for the ListItem + # + # source://rdoc//lib/rdoc/markup/list_item.rb#17 + def label=(_arg0); end + + # Length of parts in the ListItem + # + # source://rdoc//lib/rdoc/markup/list_item.rb#69 + def length; end + + # Parts of the ListItem + # + # source://rdoc//lib/rdoc/markup/list_item.rb#22 + def parts; end + + # source://rdoc//lib/rdoc/markup/list_item.rb#73 + def pretty_print(q); end + + # Adds +parts+ to the ListItem + # + # source://rdoc//lib/rdoc/markup/list_item.rb#95 + def push(*parts); end +end + +# A Paragraph of text +# +# source://rdoc//lib/rdoc/markup/paragraph.rb#5 +class RDoc::Markup::Paragraph < ::RDoc::Markup::Raw + # Calls #accept_paragraph on +visitor+ + # + # source://rdoc//lib/rdoc/markup/paragraph.rb#10 + def accept(visitor); end + + # Joins the raw paragraph text and converts inline HardBreaks to the + # +hard_break+ text. + # + # source://rdoc//lib/rdoc/markup/paragraph.rb#18 + def text(hard_break = T.unsafe(nil)); end +end + +# A recursive-descent parser for RDoc markup. +# +# The parser tokenizes an input string then parses the tokens into a Document. +# Documents can be converted into output formats by writing a visitor like +# RDoc::Markup::ToHTML. +# +# The parser only handles the block-level constructs Paragraph, List, +# ListItem, Heading, Verbatim, BlankLine, Rule and BlockQuote. +# Inline markup such as \+blah\+ is handled separately by +# RDoc::Markup::AttributeManager. +# +# To see what markup the Parser implements read RDoc. To see how to use +# RDoc markup to format text in your program read RDoc::Markup. +# +# source://rdoc//lib/rdoc/markup/parser.rb#19 +class RDoc::Markup::Parser + include ::RDoc::Text + + # Creates a new Parser. See also ::parse + # + # @return [Parser] a new instance of Parser + # + # source://rdoc//lib/rdoc/markup/parser.rb#79 + def initialize; end + + # Builds a Heading of +level+ + # + # source://rdoc//lib/rdoc/markup/parser.rb#90 + def build_heading(level); end + + # Builds a List flush to +margin+ + # + # source://rdoc//lib/rdoc/markup/parser.rb#108 + def build_list(margin); end + + # Builds a Paragraph that is flush to +margin+ + # + # source://rdoc//lib/rdoc/markup/parser.rb#208 + def build_paragraph(margin); end + + # Builds a Verbatim that is indented from +margin+. + # + # The verbatim block is shifted left (the least indented lines start in + # column 0). Each part of the verbatim is one line of text, always + # terminated by a newline. Blank lines always consist of a single newline + # character, and there is never a single newline at the end of the verbatim. + # + # source://rdoc//lib/rdoc/markup/parser.rb#243 + def build_verbatim(margin); end + + # Enables display of debugging information + # + # source://rdoc//lib/rdoc/markup/parser.rb#48 + def debug; end + + # Enables display of debugging information + # + # source://rdoc//lib/rdoc/markup/parser.rb#48 + def debug=(_arg0); end + + # Pulls the next token from the stream. + # + # source://rdoc//lib/rdoc/markup/parser.rb#327 + def get; end + + # Parses the tokens into an array of RDoc::Markup::XXX objects, + # and appends them to the passed +parent+ RDoc::Markup::YYY object. + # + # Exits at the end of the token stream, or when it encounters a token + # in a column less than +indent+ (unless it is a NEWLINE). + # + # Returns +parent+. + # + # source://rdoc//lib/rdoc/markup/parser.rb#342 + def parse(parent, indent = T.unsafe(nil)); end + + # Small hook that is overridden by RDoc::TomDoc + # + # source://rdoc//lib/rdoc/markup/parser.rb#406 + def parse_text(parent, indent); end + + # Returns the next token on the stream without modifying the stream + # + # source://rdoc//lib/rdoc/markup/parser.rb#413 + def peek_token; end + + # Creates the StringScanner + # + # source://rdoc//lib/rdoc/markup/parser.rb#468 + def setup_scanner(input); end + + # Skips the next token if its type is +token_type+. + # + # Optionally raises an error if the next token is not of the expected type. + # + # @raise [ParseError] + # + # source://rdoc//lib/rdoc/markup/parser.rb#477 + def skip(token_type, error = T.unsafe(nil)); end + + # Turns text +input+ into a stream of tokens + # + # source://rdoc//lib/rdoc/markup/parser.rb#488 + def tokenize(input); end + + # Token accessor + # + # source://rdoc//lib/rdoc/markup/parser.rb#53 + def tokens; end + + # Returns the current token to the token stream + # + # @raise [Error] + # + # source://rdoc//lib/rdoc/markup/parser.rb#578 + def unget; end + + class << self + # Parses +str+ into a Document. + # + # Use RDoc::Markup#parse instead of this method. + # + # source://rdoc//lib/rdoc/markup/parser.rb#60 + def parse(str); end + + # Returns a token stream for +str+, for testing + # + # source://rdoc//lib/rdoc/markup/parser.rb#70 + def tokenize(str); end + end +end + +# A simple wrapper of StringScanner that is aware of the current column and lineno +# +# source://rdoc//lib/rdoc/markup/parser.rb#422 +class RDoc::Markup::Parser::MyStringScanner + # :stopdoc: + # + # @return [MyStringScanner] a new instance of MyStringScanner + # + # source://rdoc//lib/rdoc/markup/parser.rb#425 + def initialize(input); end + + # source://rdoc//lib/rdoc/markup/parser.rb#458 + def [](i); end + + # @return [Boolean] + # + # source://rdoc//lib/rdoc/markup/parser.rb#450 + def eos?; end + + # source://rdoc//lib/rdoc/markup/parser.rb#454 + def matched; end + + # source://rdoc//lib/rdoc/markup/parser.rb#445 + def newline!; end + + # source://rdoc//lib/rdoc/markup/parser.rb#441 + def pos; end + + # source://rdoc//lib/rdoc/markup/parser.rb#430 + def scan(re); end + + # source://rdoc//lib/rdoc/markup/parser.rb#436 + def unscan(s); end +end + +# Handle common directives that can occur in a block of text: +# +# \:include: filename +# +# Directives can be escaped by preceding them with a backslash. +# +# RDoc plugin authors can register additional directives to be handled by +# using RDoc::Markup::PreProcess::register. +# +# Any directive that is not built-in to RDoc (including those registered via +# plugins) will be stored in the metadata hash on the CodeObject the comment +# is attached to. See RDoc::Markup@Directives for the list of built-in +# directives. +# +# source://rdoc//lib/rdoc/markup/pre_process.rb#17 +class RDoc::Markup::PreProcess + # Creates a new pre-processor for +input_file_name+ that will look for + # included files in +include_path+ + # + # @return [PreProcess] a new instance of PreProcess + # + # source://rdoc//lib/rdoc/markup/pre_process.rb#78 + def initialize(input_file_name, include_path); end + + # Look for the given file in the directory containing the current file, + # and then in each of the directories specified in the RDOC_INCLUDE path + # + # source://rdoc//lib/rdoc/markup/pre_process.rb#288 + def find_include_file(name); end + + # Look for directives in the given +text+. + # + # Options that we don't handle are yielded. If the block returns false the + # directive is restored to the text. If the block returns nil or no block + # was given the directive is handled according to the registered directives. + # If a String was returned the directive is replaced with the string. + # + # If no matching directive was registered the directive is restored to the + # text. + # + # If +code_object+ is given and the directive is unknown then the + # directive's parameter is set as metadata on the +code_object+. See + # RDoc::CodeObject#metadata for details. + # + # source://rdoc//lib/rdoc/markup/pre_process.rb#99 + def handle(text, code_object = T.unsafe(nil), &block); end + + # Performs the actions described by +directive+ and its parameter +param+. + # + # +code_object+ is used for directives that operate on a class or module. + # +prefix+ is used to ensure the replacement for handled directives is + # correct. +encoding+ is used for the include directive. + # + # For a list of directives in RDoc see RDoc::Markup. + # -- + # When 1.8.7 support is ditched prefix can be defaulted to '' + # + # source://rdoc//lib/rdoc/markup/pre_process.rb#150 + def handle_directive(prefix, directive, param, code_object = T.unsafe(nil), encoding = T.unsafe(nil)); end + + # Handles the :include: _filename_ directive. + # + # If the first line of the included file starts with '#', and contains + # an encoding information in the form 'coding:' or 'coding=', it is + # removed. + # + # If all lines in the included file start with a '#', this leading '#' + # is removed before inclusion. The included content is indented like + # the :include: directive. + # -- + # so all content will be verbatim because of the likely space after '#'? + # TODO shift left the whole file content in that case + # TODO comment stop/start #-- and #++ in included file must be processed here + # + # source://rdoc//lib/rdoc/markup/pre_process.rb#262 + def include_file(name, indent, encoding); end + + # An RDoc::Options instance that will be filled in with overrides from + # directives + # + # source://rdoc//lib/rdoc/markup/pre_process.rb#23 + def options; end + + # An RDoc::Options instance that will be filled in with overrides from + # directives + # + # source://rdoc//lib/rdoc/markup/pre_process.rb#23 + def options=(_arg0); end + + class << self + # Adds a post-process handler for directives. The handler will be called + # with the result RDoc::Comment (or text String) and the code object for the + # comment (if any). + # + # source://rdoc//lib/rdoc/markup/pre_process.rb#30 + def post_process(&block); end + + # Registered post-processors + # + # source://rdoc//lib/rdoc/markup/pre_process.rb#37 + def post_processors; end + + # Registers +directive+ as one handled by RDoc. If a block is given the + # directive will be replaced by the result of the block, otherwise the + # directive will be removed from the processed text. + # + # The block will be called with the directive name and the directive + # parameter: + # + # RDoc::Markup::PreProcess.register 'my-directive' do |directive, param| + # # replace text, etc. + # end + # + # source://rdoc//lib/rdoc/markup/pre_process.rb#53 + def register(directive, &block); end + + # Registered directives + # + # source://rdoc//lib/rdoc/markup/pre_process.rb#60 + def registered; end + + # Clears all registered directives and post-processors + # + # source://rdoc//lib/rdoc/markup/pre_process.rb#67 + def reset; end + end +end + +# A section of text that is added to the output document as-is +# +# source://rdoc//lib/rdoc/markup/raw.rb#5 +class RDoc::Markup::Raw + # Creates a new Raw containing +parts+ + # + # @return [Raw] a new instance of Raw + # + # source://rdoc//lib/rdoc/markup/raw.rb#15 + def initialize(*parts); end + + # Appends +text+ + # + # source://rdoc//lib/rdoc/markup/raw.rb#23 + def <<(text); end + + # source://rdoc//lib/rdoc/markup/raw.rb#27 + def ==(other); end + + # Calls #accept_raw+ on +visitor+ + # + # source://rdoc//lib/rdoc/markup/raw.rb#34 + def accept(visitor); end + + # Appends +other+'s parts + # + # source://rdoc//lib/rdoc/markup/raw.rb#41 + def merge(other); end + + # The component parts of the list + # + # source://rdoc//lib/rdoc/markup/raw.rb#10 + def parts; end + + # source://rdoc//lib/rdoc/markup/raw.rb#45 + def pretty_print(q); end + + # Appends +texts+ onto this Paragraph + # + # source://rdoc//lib/rdoc/markup/raw.rb#58 + def push(*texts); end + + # The raw text + # + # source://rdoc//lib/rdoc/markup/raw.rb#65 + def text; end +end + +# Hold details of a regexp handling sequence +# +# source://rdoc//lib/rdoc/markup/regexp_handling.rb#5 +class RDoc::Markup::RegexpHandling + # Creates a new regexp handling sequence of +type+ with +text+ + # + # @return [RegexpHandling] a new instance of RegexpHandling + # + # source://rdoc//lib/rdoc/markup/regexp_handling.rb#20 + def initialize(type, text); end + + # Regexp handlings are equal when the have the same text and type + # + # source://rdoc//lib/rdoc/markup/regexp_handling.rb#27 + def ==(o); end + + # source://rdoc//lib/rdoc/markup/regexp_handling.rb#31 + def inspect; end + + # Regexp handling text + # + # source://rdoc//lib/rdoc/markup/regexp_handling.rb#15 + def text; end + + # Regexp handling text + # + # source://rdoc//lib/rdoc/markup/regexp_handling.rb#15 + def text=(_arg0); end + + # source://rdoc//lib/rdoc/markup/regexp_handling.rb#36 + def to_s; end + + # Regexp handling type + # + # source://rdoc//lib/rdoc/markup/regexp_handling.rb#10 + def type; end +end + +# A horizontal rule with a weight +# +# source://rdoc//lib/rdoc/markup/rule.rb#5 +class RDoc::Markup::Rule < ::Struct + # Calls #accept_rule on +visitor+ + # + # source://rdoc//lib/rdoc/markup/rule.rb#10 + def accept(visitor); end + + # source://rdoc//lib/rdoc/markup/rule.rb#14 + def pretty_print(q); end +end + +# A section of table +# +# source://rdoc//lib/rdoc/markup/table.rb#5 +class RDoc::Markup::Table + # Creates new instance + # + # @return [Table] a new instance of Table + # + # source://rdoc//lib/rdoc/markup/table.rb#16 + def initialize(header, align, body); end + + # :stopdoc: + # + # source://rdoc//lib/rdoc/markup/table.rb#21 + def ==(other); end + + # source://rdoc//lib/rdoc/markup/table.rb#28 + def accept(visitor); end + + # alignments of each column + # + # source://rdoc//lib/rdoc/markup/table.rb#10 + def align; end + + # alignments of each column + # + # source://rdoc//lib/rdoc/markup/table.rb#10 + def align=(_arg0); end + + # body texts of each column + # + # source://rdoc//lib/rdoc/markup/table.rb#13 + def body; end + + # body texts of each column + # + # source://rdoc//lib/rdoc/markup/table.rb#13 + def body=(_arg0); end + + # headers of each column + # + # source://rdoc//lib/rdoc/markup/table.rb#7 + def header; end + + # headers of each column + # + # source://rdoc//lib/rdoc/markup/table.rb#7 + def header=(_arg0); end + + # source://rdoc//lib/rdoc/markup/table.rb#32 + def pretty_print(q); end +end + +# Outputs RDoc markup with vibrant ANSI color! +# +# source://rdoc//lib/rdoc/markup/to_ansi.rb#5 +class RDoc::Markup::ToAnsi < ::RDoc::Markup::ToRdoc + # Creates a new ToAnsi visitor that is ready to output vibrant ANSI color! + # + # @return [ToAnsi] a new instance of ToAnsi + # + # source://rdoc//lib/rdoc/markup/to_ansi.rb#10 + def initialize(markup = T.unsafe(nil)); end + + # Overrides indent width to ensure output lines up correctly. + # + # source://rdoc//lib/rdoc/markup/to_ansi.rb#31 + def accept_list_item_end(list_item); end + + # Adds coloring to note and label list items + # + # source://rdoc//lib/rdoc/markup/to_ansi.rb#55 + def accept_list_item_start(list_item); end + + # Maps attributes to ANSI sequences + # + # source://rdoc//lib/rdoc/markup/to_ansi.rb#22 + def init_tags; end + + # Starts accepting with a reset screen + # + # source://rdoc//lib/rdoc/markup/to_ansi.rb#87 + def start_accepting; end +end + +# Outputs RDoc markup with hot backspace action! You will probably need a +# pager to use this output format. +# +# This formatter won't work on 1.8.6 because it lacks String#chars. +# +# source://rdoc//lib/rdoc/markup/to_bs.rb#8 +class RDoc::Markup::ToBs < ::RDoc::Markup::ToRdoc + # Returns a new ToBs that is ready for hot backspace action! + # + # @return [ToBs] a new instance of ToBs + # + # source://rdoc//lib/rdoc/markup/to_bs.rb#13 + def initialize(markup = T.unsafe(nil)); end + + # Makes heading text bold. + # + # source://rdoc//lib/rdoc/markup/to_bs.rb#33 + def accept_heading(heading); end + + # Turns on or off regexp handling for +convert_string+ + # + # source://rdoc//lib/rdoc/markup/to_bs.rb#46 + def annotate(tag); end + + # Calls convert_string on the result of convert_regexp_handling + # + # source://rdoc//lib/rdoc/markup/to_bs.rb#59 + def convert_regexp_handling(target); end + + # Adds bold or underline mixed with backspaces + # + # source://rdoc//lib/rdoc/markup/to_bs.rb#66 + def convert_string(string); end + + # Sets a flag that is picked up by #annotate to do the right thing in + # #convert_string + # + # source://rdoc//lib/rdoc/markup/to_bs.rb#24 + def init_tags; end +end + +# Outputs RDoc markup as HTML. +# +# source://rdoc//lib/rdoc/markup/to_html.rb#7 +class RDoc::Markup::ToHtml < ::RDoc::Markup::Formatter + include ::RDoc::Text + + # Creates a new formatter that will output HTML + # + # @return [ToHtml] a new instance of ToHtml + # + # source://rdoc//lib/rdoc/markup/to_html.rb#45 + def initialize(options, markup = T.unsafe(nil)); end + + # Adds +blank_line+ to the output + # + # source://rdoc//lib/rdoc/markup/to_html.rb#291 + def accept_blank_line(blank_line); end + + # Adds +block_quote+ to the output + # + # source://rdoc//lib/rdoc/markup/to_html.rb#190 + def accept_block_quote(block_quote); end + + # Adds +heading+ to the output. The headings greater than 6 are trimmed to + # level 6. + # + # source://rdoc//lib/rdoc/markup/to_html.rb#299 + def accept_heading(heading); end + + # Finishes consumption of +list+ + # + # source://rdoc//lib/rdoc/markup/to_html.rb#262 + def accept_list_end(list); end + + # Finishes consumption of +list_item+ + # + # source://rdoc//lib/rdoc/markup/to_html.rb#284 + def accept_list_item_end(list_item); end + + # Prepares the visitor for consuming +list_item+ + # + # source://rdoc//lib/rdoc/markup/to_html.rb#273 + def accept_list_item_start(list_item); end + + # Prepares the visitor for consuming +list+ + # + # source://rdoc//lib/rdoc/markup/to_html.rb#253 + def accept_list_start(list); end + + # Adds +paragraph+ to the output + # + # source://rdoc//lib/rdoc/markup/to_html.rb#203 + def accept_paragraph(paragraph); end + + # Adds +raw+ to the output + # + # source://rdoc//lib/rdoc/markup/to_html.rb#320 + def accept_raw(raw); end + + # Adds +rule+ to the output + # + # source://rdoc//lib/rdoc/markup/to_html.rb#246 + def accept_rule(rule); end + + # Adds +table+ to the output + # + # source://rdoc//lib/rdoc/markup/to_html.rb#327 + def accept_table(header, body, aligns); end + + # Adds +verbatim+ to the output + # + # source://rdoc//lib/rdoc/markup/to_html.rb#216 + def accept_verbatim(verbatim); end + + # The RDoc::CodeObject HTML is being generated for. This is used to + # generate namespaced URI fragments + # + # source://rdoc//lib/rdoc/markup/to_html.rb#33 + def code_object; end + + # The RDoc::CodeObject HTML is being generated for. This is used to + # generate namespaced URI fragments + # + # source://rdoc//lib/rdoc/markup/to_html.rb#33 + def code_object=(_arg0); end + + # CGI-escapes +text+ + # + # source://rdoc//lib/rdoc/markup/to_html.rb#352 + def convert_string(text); end + + # Returns the generated output + # + # source://rdoc//lib/rdoc/markup/to_html.rb#183 + def end_accepting; end + + # Path to this document for relative links + # + # source://rdoc//lib/rdoc/markup/to_html.rb#38 + def from_path; end + + # Path to this document for relative links + # + # source://rdoc//lib/rdoc/markup/to_html.rb#38 + def from_path=(_arg0); end + + # Generate a link to +url+ with content +text+. Handles the special cases + # for img: and link: described under handle_regexp_HYPERLINK + # + # source://rdoc//lib/rdoc/markup/to_html.rb#360 + def gen_url(url, text); end + + # source://rdoc//lib/rdoc/markup/to_html.rb#85 + def handle_RDOCLINK(url); end + + # +target+ is a
+ # + # source://rdoc//lib/rdoc/markup/to_html.rb#110 + def handle_regexp_HARD_BREAK(target); end + + # +target+ is a potential link. The following schemes are handled: + # + # mailto::: + # Inserted as-is. + # http::: + # Links are checked to see if they reference an image. If so, that image + # gets inserted using an tag. Otherwise a conventional + # is used. + # link::: + # Reference to a local file relative to the output directory. + # + # source://rdoc//lib/rdoc/markup/to_html.rb#126 + def handle_regexp_HYPERLINK(target); end + + # +target+ is an rdoc-schemed link that will be converted into a hyperlink. + # + # For the +rdoc-ref+ scheme the named reference will be returned without + # creating a link. + # + # For the +rdoc-label+ scheme the footnote and label prefixes are stripped + # when creating a link. All other contents will be linked verbatim. + # + # source://rdoc//lib/rdoc/markup/to_html.rb#141 + def handle_regexp_RDOCLINK(target); end + + # This +target+ is a link where the label is different from the URL + # label[url] or {long label}[url] + # + # source://rdoc//lib/rdoc/markup/to_html.rb#149 + def handle_regexp_TIDYLINK(target); end + + # Determines the HTML list element for +list_type+ and +open_tag+ + # + # @raise [RDoc::Error] + # + # source://rdoc//lib/rdoc/markup/to_html.rb#385 + def html_list_name(list_type, open_tag); end + + # source://rdoc//lib/rdoc/markup/to_html.rb#26 + def in_list_entry; end + + # Adds regexp handlings about link notations. + # + # source://rdoc//lib/rdoc/markup/to_html.rb#80 + def init_link_notation_regexp_handlings; end + + # Adds regexp handlings. + # + # source://rdoc//lib/rdoc/markup/to_html.rb#70 + def init_regexp_handlings; end + + # Maps attributes to HTML tags + # + # source://rdoc//lib/rdoc/markup/to_html.rb#394 + def init_tags; end + + # source://rdoc//lib/rdoc/markup/to_html.rb#27 + def list; end + + # Returns the HTML end-tag for +list_type+ + # + # source://rdoc//lib/rdoc/markup/to_html.rb#420 + def list_end_for(list_type); end + + # Returns the HTML tag for +list_type+, possible using a label from + # +list_item+ + # + # source://rdoc//lib/rdoc/markup/to_html.rb#404 + def list_item_start(list_item, list_type); end + + # Returns true if text is valid ruby syntax + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/markup/to_html.rb#434 + def parseable?(text); end + + # source://rdoc//lib/rdoc/markup/to_html.rb#25 + def res; end + + # Prepares the visitor for HTML generation + # + # source://rdoc//lib/rdoc/markup/to_html.rb#174 + def start_accepting; end + + # Converts +item+ to HTML using RDoc::Text#to_html + # + # source://rdoc//lib/rdoc/markup/to_html.rb#448 + def to_html(item); end +end + +# source://rdoc//lib/rdoc/markup/to_html.rb#65 +RDoc::Markup::ToHtml::URL_CHARACTERS_REGEXP_STR = T.let(T.unsafe(nil), String) + +# Subclass of the RDoc::Markup::ToHtml class that supports looking up method +# names, classes, etc to create links. RDoc::CrossReference is used to +# generate those links based on the current context. +# +# source://rdoc//lib/rdoc/markup/to_html_crossref.rb#7 +class RDoc::Markup::ToHtmlCrossref < ::RDoc::Markup::ToHtml + # Creates a new crossref resolver that generates links relative to +context+ + # which lives at +from_path+ in the generated files. '#' characters on + # references are removed unless +show_hash+ is true. Only method names + # preceded by '#' or '::' are linked, unless +hyperlink_all+ is true. + # + # @raise [ArgumentError] + # @return [ToHtmlCrossref] a new instance of ToHtmlCrossref + # + # source://rdoc//lib/rdoc/markup/to_html_crossref.rb#32 + def initialize(options, from_path, context, markup = T.unsafe(nil)); end + + # RDoc::CodeObject for generating references + # + # source://rdoc//lib/rdoc/markup/to_html_crossref.rb#19 + def context; end + + # RDoc::CodeObject for generating references + # + # source://rdoc//lib/rdoc/markup/to_html_crossref.rb#19 + def context=(_arg0); end + + # Creates a link to the reference +name+ if the name exists. If +text+ is + # given it is used as the link text, otherwise +name+ is used. + # + # source://rdoc//lib/rdoc/markup/to_html_crossref.rb#61 + def cross_reference(name, text = T.unsafe(nil), code = T.unsafe(nil)); end + + # Generates links for rdoc-ref: scheme URLs and allows + # RDoc::Markup::ToHtml to handle other schemes. + # + # source://rdoc//lib/rdoc/markup/to_html_crossref.rb#131 + def gen_url(url, text); end + + # We're invoked when any text matches the CROSSREF pattern. If we find the + # corresponding reference, generate a link. If the name we're looking for + # contains no punctuation, we look for it up the module/class chain. For + # example, ToHtml is found, even without the RDoc::Markup:: prefix, + # because we look for it in module Markup first. + # + # source://rdoc//lib/rdoc/markup/to_html_crossref.rb#83 + def handle_regexp_CROSSREF(target); end + + # Handles rdoc-ref: scheme links and allows RDoc::Markup::ToHtml to + # handle other schemes. + # + # source://rdoc//lib/rdoc/markup/to_html_crossref.rb#102 + def handle_regexp_HYPERLINK(target); end + + # +target+ is an rdoc-schemed link that will be converted into a hyperlink. + # For the rdoc-ref scheme the cross-reference will be looked up and the + # given name will be used. + # + # All other contents are handled by + # {the superclass}[rdoc-ref:RDoc::Markup::ToHtml#handle_regexp_RDOCLINK] + # + # source://rdoc//lib/rdoc/markup/to_html_crossref.rb#116 + def handle_regexp_RDOCLINK(target); end + + # source://rdoc//lib/rdoc/markup/to_html_crossref.rb#46 + def init_link_notation_regexp_handlings; end + + # Creates an HTML link to +name+ with the given +text+. + # + # source://rdoc//lib/rdoc/markup/to_html_crossref.rb#141 + def link(name, text, code = T.unsafe(nil)); end + + # Should we show '#' characters on method references? + # + # source://rdoc//lib/rdoc/markup/to_html_crossref.rb#24 + def show_hash; end + + # Should we show '#' characters on method references? + # + # source://rdoc//lib/rdoc/markup/to_html_crossref.rb#24 + def show_hash=(_arg0); end +end + +# Outputs RDoc markup as paragraphs with inline markup only. +# +# source://rdoc//lib/rdoc/markup/to_html_snippet.rb#5 +class RDoc::Markup::ToHtmlSnippet < ::RDoc::Markup::ToHtml + # Creates a new ToHtmlSnippet formatter that will cut off the input on the + # next word boundary after the given number of +characters+ or +paragraphs+ + # of text have been encountered. + # + # @return [ToHtmlSnippet] a new instance of ToHtmlSnippet + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#37 + def initialize(options, characters = T.unsafe(nil), paragraphs = T.unsafe(nil), markup = T.unsafe(nil)); end + + # Adds +heading+ to the output as a paragraph + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#53 + def accept_heading(heading); end + + # Finishes consumption of +list_item+ + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#85 + def accept_list_item_end(list_item); end + + # Prepares the visitor for consuming +list_item+ + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#91 + def accept_list_item_start(list_item); end + + # Prepares the visitor for consuming +list+ + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#98 + def accept_list_start(list); end + + # Adds +paragraph+ to the output + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#72 + def accept_paragraph(paragraph); end + + # Raw sections are untrusted and ignored + # + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_raw(*node); end + + # Rules are ignored + # + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_rule(*node); end + + # Adds +verbatim+ to the output + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#107 + def accept_verbatim(verbatim); end + + # Throws +:done+ when paragraph_limit paragraphs have been encountered + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#198 + def add_paragraph; end + + # After this many characters the input will be cut off. + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#10 + def character_limit; end + + # The number of characters seen so far. + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#15 + def characters; end + + # Marks up +content+ + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#207 + def convert(content); end + + # Converts flow items +flow+ + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#218 + def convert_flow(flow); end + + # Returns just the text of +link+, +url+ is only used to determine the link + # type. + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#171 + def gen_url(url, text); end + + # Removes escaping from the cross-references in +target+ + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#131 + def handle_regexp_CROSSREF(target); end + + # +target+ is a
+ # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#138 + def handle_regexp_HARD_BREAK(target); end + + # In snippets, there are no lists + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#191 + def html_list_name(list_type, open_tag); end + + # Lists are paragraphs, but notes and labels have a separator + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#146 + def list_item_start(list_item, list_type); end + + # The attribute bitmask + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#20 + def mask; end + + # Maintains a bitmask to allow HTML elements to be closed properly. See + # RDoc::Markup::Formatter. + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#264 + def off_tags(res, item); end + + # Maintains a bitmask to allow HTML elements to be closed properly. See + # RDoc::Markup::Formatter. + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#254 + def on_tags(res, item); end + + # After this many paragraphs the input will be cut off. + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#25 + def paragraph_limit; end + + # Count of paragraphs found + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#30 + def paragraphs; end + + # Prepares the visitor for HTML snippet generation + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#122 + def start_accepting; end + + # Truncates +text+ at the end of the first word after the character_limit. + # + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#273 + def truncate(text); end +end + +# Joins the parts of an RDoc::Markup::Paragraph into a single String. +# +# This allows for easier maintenance and testing of Markdown support. +# +# This formatter only works on Paragraph instances. Attempting to process +# other markup syntax items will not work. +# +# source://rdoc//lib/rdoc/markup/to_joined_paragraph.rb#10 +class RDoc::Markup::ToJoinedParagraph < ::RDoc::Markup::Formatter + # @return [ToJoinedParagraph] a new instance of ToJoinedParagraph + # + # source://rdoc//lib/rdoc/markup/to_joined_paragraph.rb#12 + def initialize; end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_block_quote(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_heading(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_list_end(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_list_item_end(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_list_item_start(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_list_start(*node); end + + # Converts the parts of +paragraph+ to a single entry. + # + # source://rdoc//lib/rdoc/markup/to_joined_paragraph.rb#25 + def accept_paragraph(paragraph); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_raw(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_rule(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_table(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_verbatim(*node); end + + # source://rdoc//lib/rdoc/markup/to_joined_paragraph.rb#19 + def end_accepting; end + + # source://rdoc//lib/rdoc/markup/to_joined_paragraph.rb#16 + def start_accepting; end +end + +# Creates HTML-safe labels suitable for use in id attributes. Tidylinks are +# converted to their link part and cross-reference links have the suppression +# marks removed (\\SomeClass is converted to SomeClass). +# +# source://rdoc//lib/rdoc/markup/to_label.rb#9 +class RDoc::Markup::ToLabel < ::RDoc::Markup::Formatter + # Creates a new formatter that will output HTML-safe labels + # + # @return [ToLabel] a new instance of ToLabel + # + # source://rdoc//lib/rdoc/markup/to_label.rb#16 + def initialize(markup = T.unsafe(nil)); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_blank_line(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_block_quote(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_heading(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_list_end(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_list_item_end(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_list_item_start(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_list_start(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_paragraph(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_raw(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_rule(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_verbatim(*node); end + + # Converts +text+ to an HTML-safe label + # + # source://rdoc//lib/rdoc/markup/to_label.rb#32 + def convert(text); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def end_accepting(*node); end + + # Converts the CROSSREF +target+ to plain text, removing the suppression + # marker, if any + # + # source://rdoc//lib/rdoc/markup/to_label.rb#42 + def handle_regexp_CROSSREF(target); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def handle_regexp_HARD_BREAK(*node); end + + # Converts the TIDYLINK +target+ to just the text part + # + # source://rdoc//lib/rdoc/markup/to_label.rb#51 + def handle_regexp_TIDYLINK(target); end + + # source://rdoc//lib/rdoc/markup/to_label.rb#11 + def res; end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def start_accepting(*node); end +end + +# Outputs parsed markup as Markdown +# +# source://rdoc//lib/rdoc/markup/to_markdown.rb#7 +class RDoc::Markup::ToMarkdown < ::RDoc::Markup::ToRdoc + # Creates a new formatter that will output Markdown format text + # + # @return [ToMarkdown] a new instance of ToMarkdown + # + # source://rdoc//lib/rdoc/markup/to_markdown.rb#12 + def initialize(markup = T.unsafe(nil)); end + + # Finishes consumption of `list` + # + # source://rdoc//lib/rdoc/markup/to_markdown.rb#47 + def accept_list_end(list); end + + # Finishes consumption of `list_item` + # + # source://rdoc//lib/rdoc/markup/to_markdown.rb#56 + def accept_list_item_end(list_item); end + + # Prepares the visitor for consuming `list_item` + # + # source://rdoc//lib/rdoc/markup/to_markdown.rb#75 + def accept_list_item_start(list_item); end + + # Prepares the visitor for consuming `list` + # + # source://rdoc//lib/rdoc/markup/to_markdown.rb#100 + def accept_list_start(list); end + + # Adds `rule` to the output + # + # source://rdoc//lib/rdoc/markup/to_markdown.rb#117 + def accept_rule(rule); end + + # Outputs `verbatim` indented 4 columns + # + # source://rdoc//lib/rdoc/markup/to_markdown.rb#126 + def accept_verbatim(verbatim); end + + # Creates a Markdown-style URL from +url+ with +text+. + # + # source://rdoc//lib/rdoc/markup/to_markdown.rb#140 + def gen_url(url, text); end + + # Handles rdoc- type links for footnotes. + # + # source://rdoc//lib/rdoc/markup/to_markdown.rb#149 + def handle_rdoc_link(url); end + + # Adds a newline to the output + # + # source://rdoc//lib/rdoc/markup/to_markdown.rb#40 + def handle_regexp_HARD_BREAK(target); end + + # Converts the rdoc-...: links into a Markdown.style links. + # + # source://rdoc//lib/rdoc/markup/to_markdown.rb#187 + def handle_regexp_RDOCLINK(target); end + + # Converts the RDoc markup tidylink into a Markdown.style link. + # + # source://rdoc//lib/rdoc/markup/to_markdown.rb#169 + def handle_regexp_TIDYLINK(target); end + + # Maps attributes to HTML sequences + # + # source://rdoc//lib/rdoc/markup/to_markdown.rb#31 + def init_tags; end +end + +# Outputs RDoc markup as RDoc markup! (mostly) +# +# source://rdoc//lib/rdoc/markup/to_rdoc.rb#5 +class RDoc::Markup::ToRdoc < ::RDoc::Markup::Formatter + # Creates a new formatter that will output (mostly) \RDoc markup + # + # @return [ToRdoc] a new instance of ToRdoc + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#45 + def initialize(markup = T.unsafe(nil)); end + + # Adds +blank_line+ to the output + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#77 + def accept_blank_line(blank_line); end + + # Adds +paragraph+ to the output + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#84 + def accept_block_quote(block_quote); end + + # Adds +heading+ to the output + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#99 + def accept_heading(heading); end + + # Adds +paragraph+ to the output + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#203 + def accept_indented_paragraph(paragraph); end + + # Finishes consumption of +list+ + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#110 + def accept_list_end(list); end + + # Finishes consumption of +list_item+ + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#119 + def accept_list_item_end(list_item); end + + # Prepares the visitor for consuming +list_item+ + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#143 + def accept_list_item_start(list_item); end + + # Prepares the visitor for consuming +list+ + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#168 + def accept_list_start(list); end + + # Adds +paragraph+ to the output + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#195 + def accept_paragraph(paragraph); end + + # Adds +raw+ to the output + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#213 + def accept_raw(raw); end + + # Adds +rule+ to the output + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#220 + def accept_rule(rule); end + + # Adds +table+ to the output + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#243 + def accept_table(header, body, aligns); end + + # Outputs +verbatim+ indented 2 columns + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#229 + def accept_verbatim(verbatim); end + + # Applies attribute-specific markup to +text+ using RDoc::AttributeManager + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#271 + def attributes(text); end + + # Returns the generated output + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#279 + def end_accepting; end + + # Adds a newline to the output + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#295 + def handle_regexp_HARD_BREAK(target); end + + # Removes preceding \\ from the suppressed crossref +target+ + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#286 + def handle_regexp_SUPPRESSED_CROSSREF(target); end + + # Current indent amount for output in characters + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#10 + def indent; end + + # Current indent amount for output in characters + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#10 + def indent=(_arg0); end + + # Maps attributes to HTML sequences + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#68 + def init_tags; end + + # Stack of current list indexes for alphabetic and numeric lists + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#20 + def list_index; end + + # Stack of list types + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#25 + def list_type; end + + # Stack of list widths for indentation + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#30 + def list_width; end + + # Prefix for the next list item. See #use_prefix + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#35 + def prefix; end + + # Output accumulator + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#40 + def res; end + + # Prepares the visitor for text generation + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#302 + def start_accepting; end + + # Adds the stored #prefix to the output and clears it. Lists generate a + # prefix for later consumption. + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#316 + def use_prefix; end + + # Output width in characters + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#15 + def width; end + + # Output width in characters + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#15 + def width=(_arg0); end + + # Wraps +text+ to #width + # + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#326 + def wrap(text); end +end + +# Extracts just the RDoc::Markup::Heading elements from a +# RDoc::Markup::Document to help build a table of contents +# +# source://rdoc//lib/rdoc/markup/to_table_of_contents.rb#6 +class RDoc::Markup::ToTableOfContents < ::RDoc::Markup::Formatter + # @return [ToTableOfContents] a new instance of ToTableOfContents + # + # source://rdoc//lib/rdoc/markup/to_table_of_contents.rb#27 + def initialize; end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_blank_line(*node); end + + # :stopdoc: + # + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_block_quote(*node); end + + # Adds +document+ to the output, using its heading cutoff if present + # + # source://rdoc//lib/rdoc/markup/to_table_of_contents.rb#36 + def accept_document(document); end + + # Adds +heading+ to the table of contents + # + # source://rdoc//lib/rdoc/markup/to_table_of_contents.rb#45 + def accept_heading(heading); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_list_end(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_list_end_bullet(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_list_item_end(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_list_item_start(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_list_start(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_paragraph(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_raw(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_rule(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_table(*node); end + + # source://rdoc//lib/rdoc/markup/formatter.rb#188 + def accept_verbatim(*node); end + + # Returns the table of contents + # + # source://rdoc//lib/rdoc/markup/to_table_of_contents.rb#52 + def end_accepting; end + + # Omits headings with a level less than the given level. + # + # source://rdoc//lib/rdoc/markup/to_table_of_contents.rb#25 + def omit_headings_below; end + + # Omits headings with a level less than the given level. + # + # source://rdoc//lib/rdoc/markup/to_table_of_contents.rb#25 + def omit_headings_below=(_arg0); end + + # Output accumulator + # + # source://rdoc//lib/rdoc/markup/to_table_of_contents.rb#20 + def res; end + + # Prepares the visitor for text generation + # + # source://rdoc//lib/rdoc/markup/to_table_of_contents.rb#59 + def start_accepting; end + + # Returns true if +heading+ is below the display threshold + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/markup/to_table_of_contents.rb#67 + def suppressed?(heading); end + + class << self + # Singleton for table-of-contents generation + # + # source://rdoc//lib/rdoc/markup/to_table_of_contents.rb#13 + def to_toc; end + end +end + +# This Markup outputter is used for testing purposes. +# +# source://rdoc//lib/rdoc/markup/to_test.rb#5 +class RDoc::Markup::ToTest < ::RDoc::Markup::Formatter + # source://rdoc//lib/rdoc/markup/to_test.rb#55 + def accept_blank_line(blank_line); end + + # source://rdoc//lib/rdoc/markup/to_test.rb#59 + def accept_heading(heading); end + + # source://rdoc//lib/rdoc/markup/to_test.rb#44 + def accept_list_end(list); end + + # source://rdoc//lib/rdoc/markup/to_test.rb#52 + def accept_list_item_end(list_item); end + + # source://rdoc//lib/rdoc/markup/to_test.rb#48 + def accept_list_item_start(list_item); end + + # source://rdoc//lib/rdoc/markup/to_test.rb#33 + def accept_list_start(list); end + + # source://rdoc//lib/rdoc/markup/to_test.rb#21 + def accept_paragraph(paragraph); end + + # source://rdoc//lib/rdoc/markup/to_test.rb#25 + def accept_raw(raw); end + + # source://rdoc//lib/rdoc/markup/to_test.rb#63 + def accept_rule(rule); end + + # source://rdoc//lib/rdoc/markup/to_test.rb#29 + def accept_verbatim(verbatim); end + + # source://rdoc//lib/rdoc/markup/to_test.rb#17 + def end_accepting; end + + # :section: Visitor + # + # source://rdoc//lib/rdoc/markup/to_test.rb#12 + def start_accepting; end +end + +# Extracts sections of text enclosed in plus, tt or code. Used to discover +# undocumented parameters. +# +# source://rdoc//lib/rdoc/markup/to_tt_only.rb#6 +class RDoc::Markup::ToTtOnly < ::RDoc::Markup::Formatter + # Creates a new tt-only formatter. + # + # @return [ToTtOnly] a new instance of ToTtOnly + # + # source://rdoc//lib/rdoc/markup/to_tt_only.rb#21 + def initialize(markup = T.unsafe(nil)); end + + # Does nothing to +markup_item+ because it doesn't have any user-built + # content + # + # source://rdoc//lib/rdoc/markup/to_tt_only.rb#71 + def accept_blank_line(markup_item); end + + # Adds tts from +block_quote+ to the output + # + # source://rdoc//lib/rdoc/markup/to_tt_only.rb#30 + def accept_block_quote(block_quote); end + + # Does nothing to +markup_item+ because it doesn't have any user-built + # content + # + # source://rdoc//lib/rdoc/markup/to_tt_only.rb#71 + def accept_heading(markup_item); end + + # Pops the list type for +list+ from #list_type + # + # source://rdoc//lib/rdoc/markup/to_tt_only.rb#37 + def accept_list_end(list); end + + # Does nothing to +markup_item+ because it doesn't have any user-built + # content + # + # source://rdoc//lib/rdoc/markup/to_tt_only.rb#71 + def accept_list_item_end(markup_item); end + + # Prepares the visitor for consuming +list_item+ + # + # source://rdoc//lib/rdoc/markup/to_tt_only.rb#51 + def accept_list_item_start(list_item); end + + # Pushes the list type for +list+ onto #list_type + # + # source://rdoc//lib/rdoc/markup/to_tt_only.rb#44 + def accept_list_start(list); end + + # Adds +paragraph+ to the output + # + # source://rdoc//lib/rdoc/markup/to_tt_only.rb#63 + def accept_paragraph(paragraph); end + + # Does nothing to +markup_item+ because it doesn't have any user-built + # content + # + # source://rdoc//lib/rdoc/markup/to_tt_only.rb#71 + def accept_raw(markup_item); end + + # Does nothing to +markup_item+ because it doesn't have any user-built + # content + # + # source://rdoc//lib/rdoc/markup/to_tt_only.rb#71 + def accept_rule(markup_item); end + + # Does nothing to +markup_item+ because it doesn't have any user-built + # content + # + # source://rdoc//lib/rdoc/markup/to_tt_only.rb#71 + def accept_verbatim(markup_item); end + + # Does nothing to +markup_item+ because it doesn't have any user-built + # content + # + # source://rdoc//lib/rdoc/markup/to_tt_only.rb#71 + def do_nothing(markup_item); end + + # Returns an Array of items that were wrapped in plus, tt or code. + # + # source://rdoc//lib/rdoc/markup/to_tt_only.rb#107 + def end_accepting; end + + # Stack of list types + # + # source://rdoc//lib/rdoc/markup/to_tt_only.rb#11 + def list_type; end + + # Output accumulator + # + # source://rdoc//lib/rdoc/markup/to_tt_only.rb#16 + def res; end + + # Prepares the visitor for gathering tt sections + # + # source://rdoc//lib/rdoc/markup/to_tt_only.rb#114 + def start_accepting; end + + # Extracts tt sections from +text+ + # + # source://rdoc//lib/rdoc/markup/to_tt_only.rb#84 + def tt_sections(text); end +end + +# A section of verbatim text +# +# source://rdoc//lib/rdoc/markup/verbatim.rb#5 +class RDoc::Markup::Verbatim < ::RDoc::Markup::Raw + # @return [Verbatim] a new instance of Verbatim + # + # source://rdoc//lib/rdoc/markup/verbatim.rb#12 + def initialize(*parts); end + + # source://rdoc//lib/rdoc/markup/verbatim.rb#18 + def ==(other); end + + # Calls #accept_verbatim on +visitor+ + # + # source://rdoc//lib/rdoc/markup/verbatim.rb#25 + def accept(visitor); end + + # Format of this verbatim section + # + # source://rdoc//lib/rdoc/markup/verbatim.rb#10 + def format; end + + # Format of this verbatim section + # + # source://rdoc//lib/rdoc/markup/verbatim.rb#10 + def format=(_arg0); end + + # Collapses 3+ newlines into two newlines + # + # source://rdoc//lib/rdoc/markup/verbatim.rb#32 + def normalize; end + + # source://rdoc//lib/rdoc/markup/verbatim.rb#53 + def pretty_print(q); end + + # Is this verbatim section Ruby code? + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/markup/verbatim.rb#71 + def ruby?; end + + # The text of the section + # + # source://rdoc//lib/rdoc/markup/verbatim.rb#79 + def text; end +end + +# Abstract class representing either a method or an attribute. +# +# source://rdoc//lib/rdoc/method_attr.rb#5 +class RDoc::MethodAttr < ::RDoc::CodeObject + include ::Comparable + + # Creates a new MethodAttr from token stream +text+ and method or attribute + # name +name+. + # + # Usually this is called by super from a subclass. + # + # @return [MethodAttr] a new instance of MethodAttr + # + # source://rdoc//lib/rdoc/method_attr.rb#78 + def initialize(text, name); end + + # Order by #singleton then #name + # + # source://rdoc//lib/rdoc/method_attr.rb#113 + def <=>(other); end + + # source://rdoc//lib/rdoc/method_attr.rb#121 + def ==(other); end + + # Abstract method. Contexts in their building phase call this + # to register a new alias for this known method/attribute. + # + # - creates a new AnyMethod/Attribute named an_alias.new_name; + # - adds +self+ as an alias for the new method or attribute + # - adds the method or attribute to #aliases + # - adds the method or attribute to +context+. + # + # @raise [NotImplementedError] + # + # source://rdoc//lib/rdoc/method_attr.rb#209 + def add_alias(an_alias, context); end + + # Prepend +src+ with line numbers. Relies on the first line of a source + # code listing having: + # + # # File xxxxx, line dddd + # + # If it has this comment then line numbers are added to +src+ and the , + # line dddd portion of the comment is removed. + # + # source://rdoc//lib/rdoc/generator/markup.rb#77 + def add_line_numbers(src); end + + # Array of other names for this method/attribute + # + # source://rdoc//lib/rdoc/method_attr.rb#32 + def aliases; end + + # HTML fragment reference for this method + # + # source://rdoc//lib/rdoc/method_attr.rb#216 + def aref; end + + # Prefix for +aref+, defined by subclasses. + # + # @raise [NotImplementedError] + # + # source://rdoc//lib/rdoc/method_attr.rb#225 + def aref_prefix; end + + # The call_seq or the param_seq with method name, if there is no call_seq. + # + # source://rdoc//lib/rdoc/method_attr.rb#64 + def arglists; end + + # Parameters yielded by the called block + # + # source://rdoc//lib/rdoc/method_attr.rb#49 + def block_params; end + + # Attempts to sanitize the content passed by the Ruby parser: + # remove outer parentheses, etc. + # + # source://rdoc//lib/rdoc/method_attr.rb#233 + def block_params=(value); end + + # Different ways to call this method + # + # source://rdoc//lib/rdoc/method_attr.rb#59 + def call_seq; end + + # Different ways to call this method + # + # source://rdoc//lib/rdoc/method_attr.rb#59 + def call_seq=(_arg0); end + + # A method/attribute is documented if any of the following is true: + # - it has a comment; + # - it is an alias for a documented method; + # - it has a +#see+ method that is documented. + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/method_attr.rb#132 + def documented?; end + + # source://rdoc//lib/rdoc/method_attr.rb#178 + def find_method_or_attribute(name); end + + # source://rdoc//lib/rdoc/method_attr.rb#166 + def find_see; end + + # Full method/attribute name including namespace + # + # source://rdoc//lib/rdoc/method_attr.rb#300 + def full_name; end + + # HTML id-friendly method/attribute name + # + # source://rdoc//lib/rdoc/method_attr.rb#291 + def html_name; end + + # source://rdoc//lib/rdoc/method_attr.rb#105 + def initialize_visibility; end + + # source://rdoc//lib/rdoc/method_attr.rb#304 + def inspect; end + + # The method/attribute we're aliasing + # + # source://rdoc//lib/rdoc/method_attr.rb#37 + def is_alias_for; end + + # The method/attribute we're aliasing + # + # source://rdoc//lib/rdoc/method_attr.rb#37 + def is_alias_for=(_arg0); end + + # Turns the method's token stream into HTML. + # + # Prepends line numbers if +options.line_numbers+ is true. + # + # source://rdoc//lib/rdoc/generator/markup.rb#101 + def markup_code; end + + # Name of this method/attribute. + # + # source://rdoc//lib/rdoc/method_attr.rb#12 + def name; end + + # Name of this method/attribute. + # + # source://rdoc//lib/rdoc/method_attr.rb#12 + def name=(_arg0); end + + # '::' for a class method/attribute, '#' for an instance method. + # + # source://rdoc//lib/rdoc/method_attr.rb#319 + def name_prefix; end + + # Name for output to HTML. For class methods the full name with a "." is + # used like +SomeClass.method_name+. For instance methods the class name is + # used if +context+ does not match the parent. + # + # This is to help prevent people from using :: to call class methods. + # + # source://rdoc//lib/rdoc/method_attr.rb#330 + def output_name(context); end + + # Pretty parameter list for this method + # + # source://rdoc//lib/rdoc/method_attr.rb#69 + def param_seq; end + + # Parameters for this method + # + # source://rdoc//lib/rdoc/method_attr.rb#54 + def params; end + + # Parameters for this method + # + # source://rdoc//lib/rdoc/method_attr.rb#54 + def params=(_arg0); end + + # Name of our parent with special handling for un-marshaled methods + # + # source://rdoc//lib/rdoc/method_attr.rb#360 + def parent_name; end + + # Path to this method for use with HTML generator output. + # + # source://rdoc//lib/rdoc/method_attr.rb#353 + def path; end + + # Method/attribute name with class/instance indicator + # + # source://rdoc//lib/rdoc/method_attr.rb#339 + def pretty_name; end + + # source://rdoc//lib/rdoc/method_attr.rb#364 + def pretty_print(q); end + + # Used by RDoc::Generator::JsonIndex to create a record for the search + # engine. + # + # source://rdoc//lib/rdoc/method_attr.rb#398 + def search_record; end + + # A method/attribute to look at, + # in particular if this method/attribute has no documentation. + # + # It can be a method/attribute of the superclass or of an included module, + # including the Kernel module, which is always appended to the included + # modules. + # + # Returns +nil+ if there is no such method/attribute. + # The +#is_alias_for+ method/attribute, if any, is not included. + # + # Templates may generate a "see also ..." if this method/attribute + # has documentation, and "see ..." if it does not. + # + # source://rdoc//lib/rdoc/method_attr.rb#152 + def see; end + + # Is this a singleton method/attribute? + # + # source://rdoc//lib/rdoc/method_attr.rb#22 + def singleton; end + + # Is this a singleton method/attribute? + # + # source://rdoc//lib/rdoc/method_attr.rb#22 + def singleton=(_arg0); end + + # Sets the store for this class or module and its contained code objects. + # + # source://rdoc//lib/rdoc/method_attr.rb#160 + def store=(store); end + + # Source file token stream + # + # source://rdoc//lib/rdoc/method_attr.rb#27 + def text; end + + # source://rdoc//lib/rdoc/method_attr.rb#410 + def to_s; end + + # Type of method/attribute (class or instance) + # + # source://rdoc//lib/rdoc/method_attr.rb#346 + def type; end + + # public, protected, private + # + # source://rdoc//lib/rdoc/method_attr.rb#17 + def visibility; end + + # public, protected, private + # + # source://rdoc//lib/rdoc/method_attr.rb#17 + def visibility=(_arg0); end + + private + + # Resets cached data for the object so it can be rebuilt by accessor methods + # + # source://rdoc//lib/rdoc/method_attr.rb#101 + def initialize_copy(other); end +end + +# A Mixin adds features from a module into another context. RDoc::Include and +# RDoc::Extend are both mixins. +# +# source://rdoc//lib/rdoc/mixin.rb#6 +class RDoc::Mixin < ::RDoc::CodeObject + # Creates a new Mixin for +name+ with +comment+ + # + # @return [Mixin] a new instance of Mixin + # + # source://rdoc//lib/rdoc/mixin.rb#16 + def initialize(name, comment); end + + # Mixins are sorted by name + # + # source://rdoc//lib/rdoc/mixin.rb#26 + def <=>(other); end + + # source://rdoc//lib/rdoc/mixin.rb#32 + def ==(other); end + + # source://rdoc//lib/rdoc/mixin.rb#32 + def eql?(other); end + + # Full name based on #module + # + # source://rdoc//lib/rdoc/mixin.rb#41 + def full_name; end + + # source://rdoc//lib/rdoc/mixin.rb#46 + def hash; end + + # source://rdoc//lib/rdoc/mixin.rb#50 + def inspect; end + + # Attempts to locate the included module object. Returns the name if not + # known. + # + # The scoping rules of Ruby to resolve the name of an included module are: + # - first look into the children of the current context; + # - if not found, look into the children of included modules, + # in reverse inclusion order; + # - if still not found, go up the hierarchy of names. + # + # This method has O(n!) behavior when the module calling + # include is referencing nonexistent modules. Avoid calling #module until + # after all the files are parsed. This behavior is due to ruby's constant + # lookup behavior. + # + # As of the beginning of October, 2011, no gem includes nonexistent modules. + # + # source://rdoc//lib/rdoc/mixin.rb#75 + def module; end + + # Name of included module + # + # source://rdoc//lib/rdoc/mixin.rb#11 + def name; end + + # Name of included module + # + # source://rdoc//lib/rdoc/mixin.rb#11 + def name=(_arg0); end + + # Sets the store for this class or module and its contained code objects. + # + # source://rdoc//lib/rdoc/mixin.rb#110 + def store=(store); end + + # source://rdoc//lib/rdoc/mixin.rb#116 + def to_s; end +end + +# A normal class, neither singleton nor anonymous +# +# source://rdoc//lib/rdoc/normal_class.rb#5 +class RDoc::NormalClass < ::RDoc::ClassModule + # The ancestors of this class including modules. Unlike Module#ancestors, + # this class is not included in the result. The result will contain both + # RDoc::ClassModules and Strings. + # + # source://rdoc//lib/rdoc/normal_class.rb#12 + def ancestors; end + + # source://rdoc//lib/rdoc/normal_class.rb#24 + def aref_prefix; end + + # The definition of this class, class MyClassName + # + # source://rdoc//lib/rdoc/normal_class.rb#31 + def definition; end + + # source://rdoc//lib/rdoc/normal_class.rb#35 + def direct_ancestors; end + + # source://rdoc//lib/rdoc/normal_class.rb#39 + def inspect; end + + # source://rdoc//lib/rdoc/normal_class.rb#56 + def pretty_print(q); end + + # source://rdoc//lib/rdoc/normal_class.rb#47 + def to_s; end +end + +# A normal module, like NormalClass +# +# source://rdoc//lib/rdoc/normal_module.rb#5 +class RDoc::NormalModule < ::RDoc::ClassModule + # source://rdoc//lib/rdoc/normal_module.rb#7 + def aref_prefix; end + + # The definition of this module, module MyModuleName + # + # source://rdoc//lib/rdoc/normal_module.rb#21 + def definition; end + + # source://rdoc//lib/rdoc/normal_module.rb#11 + def inspect; end + + # This is a module, returns true + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/normal_module.rb#28 + def module?; end + + # source://rdoc//lib/rdoc/normal_module.rb#32 + def pretty_print(q); end + + # Modules don't have one, raises NoMethodError + # + # @raise [NoMethodError] + # + # source://rdoc//lib/rdoc/normal_module.rb#69 + def superclass; end +end + +# RDoc::Options handles the parsing and storage of options +# +# == Saved Options +# +# You can save some options like the markup format in the +# .rdoc_options file in your gem. The easiest way to do this is: +# +# rdoc --markup tomdoc --write-options +# +# Which will automatically create the file and fill it with the options you +# specified. +# +# The following options will not be saved since they interfere with the user's +# preferences or with the normal operation of RDoc: +# +# * +--coverage-report+ +# * +--dry-run+ +# * +--encoding+ +# * +--force-update+ +# * +--format+ +# * +--pipe+ +# * +--quiet+ +# * +--template+ +# * +--verbose+ +# +# == Custom Options +# +# Generators can hook into RDoc::Options to add generator-specific command +# line options. +# +# When --format is encountered in ARGV, RDoc calls ::setup_options on +# the generator class to add extra options to the option parser. Options for +# custom generators must occur after --format. rdoc --help +# will list options for all installed generators. +# +# Example: +# +# class RDoc::Generator::Spellcheck +# RDoc::RDoc.add_generator self +# +# def self.setup_options rdoc_options +# op = rdoc_options.option_parser +# +# op.on('--spell-dictionary DICTIONARY', +# RDoc::Options::Path) do |dictionary| +# rdoc_options.spell_dictionary = dictionary +# end +# end +# end +# +# Of course, RDoc::Options does not respond to +spell_dictionary+ by default +# so you will need to add it: +# +# class RDoc::Options +# +# ## +# # The spell dictionary used by the spell-checking plugin. +# +# attr_accessor :spell_dictionary +# +# end +# +# == Option Validators +# +# OptionParser validators will validate and cast user input values. In +# addition to the validators that ship with OptionParser (String, Integer, +# Float, TrueClass, FalseClass, Array, Regexp, Date, Time, URI, etc.), +# RDoc::Options adds Path, PathArray and Template. +# +# source://rdoc//lib/rdoc/options.rb#75 +class RDoc::Options + # @return [Options] a new instance of Options + # + # source://rdoc//lib/rdoc/options.rb#346 + def initialize(loaded_options = T.unsafe(nil)); end + + # source://rdoc//lib/rdoc/options.rb#459 + def ==(other); end + + # Character-set for HTML output. #encoding is preferred over #charset + # + # source://rdoc//lib/rdoc/options.rb#151 + def charset; end + + # Character-set for HTML output. #encoding is preferred over #charset + # + # source://rdoc//lib/rdoc/options.rb#151 + def charset=(_arg0); end + + # Check that the files on the command line exist + # + # source://rdoc//lib/rdoc/options.rb#483 + def check_files; end + + # Ensure only one generator is loaded + # + # source://rdoc//lib/rdoc/options.rb#504 + def check_generator; end + + # If true, only report on undocumented files + # + # source://rdoc//lib/rdoc/options.rb#243 + def coverage_report; end + + # If true, only report on undocumented files + # + # source://rdoc//lib/rdoc/options.rb#243 + def coverage_report=(_arg0); end + + # Set the title, but only if not already set. Used to set the title + # from a source file, so that a title set from the command line + # will have the priority. + # + # source://rdoc//lib/rdoc/options.rb#516 + def default_title=(string); end + + # If true, RDoc will not write any files. + # + # source://rdoc//lib/rdoc/options.rb#156 + def dry_run; end + + # If true, RDoc will not write any files. + # + # source://rdoc//lib/rdoc/options.rb#156 + def dry_run=(_arg0); end + + # The output encoding. All input files will be transcoded to this encoding. + # + # The default encoding is UTF-8. This is set via --encoding. + # + # source://rdoc//lib/rdoc/options.rb#163 + def encoding; end + + # The output encoding. All input files will be transcoded to this encoding. + # + # The default encoding is UTF-8. This is set via --encoding. + # + # source://rdoc//lib/rdoc/options.rb#163 + def encoding=(_arg0); end + + # Create a regexp for #exclude + # + # source://rdoc//lib/rdoc/options.rb#544 + def exclude; end + + # Files matching this pattern will be excluded + # + # source://rdoc//lib/rdoc/options.rb#168 + def exclude=(_arg0); end + + # The list of files to be processed + # + # source://rdoc//lib/rdoc/options.rb#173 + def files; end + + # The list of files to be processed + # + # source://rdoc//lib/rdoc/options.rb#173 + def files=(_arg0); end + + # Completes any unfinished option setup business such as filtering for + # existent files, creating a regexp for #exclude and setting a default + # #template. + # + # source://rdoc//lib/rdoc/options.rb#560 + def finish; end + + # Fixes the page_dir to be relative to the root_dir and adds the page_dir to + # the files list. + # + # source://rdoc//lib/rdoc/options.rb#601 + def finish_page_dir; end + + # Create the output even if the output directory does not look + # like an rdoc output directory + # + # source://rdoc//lib/rdoc/options.rb#179 + def force_output; end + + # Create the output even if the output directory does not look + # like an rdoc output directory + # + # source://rdoc//lib/rdoc/options.rb#179 + def force_output=(_arg0); end + + # Scan newer sources than the flag file if true. + # + # source://rdoc//lib/rdoc/options.rb#184 + def force_update; end + + # Scan newer sources than the flag file if true. + # + # source://rdoc//lib/rdoc/options.rb#184 + def force_update=(_arg0); end + + # Formatter to mark up text with + # + # source://rdoc//lib/rdoc/options.rb#189 + def formatter; end + + # Formatter to mark up text with + # + # source://rdoc//lib/rdoc/options.rb#189 + def formatter=(_arg0); end + + # Description of the output generator (set with the --format option) + # + # source://rdoc//lib/rdoc/options.rb#194 + def generator; end + + # Description of the output generator (set with the --format option) + # + # source://rdoc//lib/rdoc/options.rb#194 + def generator=(_arg0); end + + # Returns a properly-space list of generators and their descriptions. + # + # source://rdoc//lib/rdoc/options.rb#620 + def generator_descriptions; end + + # For #== + # + # source://rdoc//lib/rdoc/options.rb#199 + def generator_name; end + + # Loaded generator options. Used to prevent --help from loading the same + # options multiple times. + # + # source://rdoc//lib/rdoc/options.rb#205 + def generator_options; end + + # Loaded generator options. Used to prevent --help from loading the same + # options multiple times. + # + # source://rdoc//lib/rdoc/options.rb#205 + def generator_options=(_arg0); end + + # Old rdoc behavior: hyperlink all words that match a method name, + # even if not preceded by '#' or '::' + # + # source://rdoc//lib/rdoc/options.rb#211 + def hyperlink_all; end + + # Old rdoc behavior: hyperlink all words that match a method name, + # even if not preceded by '#' or '::' + # + # source://rdoc//lib/rdoc/options.rb#211 + def hyperlink_all=(_arg0); end + + # source://rdoc//lib/rdoc/options.rb#351 + def init_ivars; end + + # source://rdoc//lib/rdoc/options.rb#396 + def init_with(map); end + + # Include line numbers in the source code + # + # source://rdoc//lib/rdoc/options.rb#216 + def line_numbers; end + + # Include line numbers in the source code + # + # source://rdoc//lib/rdoc/options.rb#216 + def line_numbers=(_arg0); end + + # The output locale. + # + # source://rdoc//lib/rdoc/options.rb#221 + def locale; end + + # The output locale. + # + # source://rdoc//lib/rdoc/options.rb#221 + def locale=(_arg0); end + + # The directory where locale data live. + # + # source://rdoc//lib/rdoc/options.rb#226 + def locale_dir; end + + # The directory where locale data live. + # + # source://rdoc//lib/rdoc/options.rb#226 + def locale_dir=(_arg0); end + + # Name of the file, class or module to display in the initial index page (if + # not specified the first file we encounter is used) + # + # source://rdoc//lib/rdoc/options.rb#232 + def main_page; end + + # Name of the file, class or module to display in the initial index page (if + # not specified the first file we encounter is used) + # + # source://rdoc//lib/rdoc/options.rb#232 + def main_page=(_arg0); end + + # The default markup format. The default is 'rdoc'. 'markdown', 'tomdoc' + # and 'rd' are also built-in. + # + # source://rdoc//lib/rdoc/options.rb#238 + def markup; end + + # The default markup format. The default is 'rdoc'. 'markdown', 'tomdoc' + # and 'rd' are also built-in. + # + # source://rdoc//lib/rdoc/options.rb#238 + def markup=(_arg0); end + + # The name of the output directory + # + # source://rdoc//lib/rdoc/options.rb#248 + def op_dir; end + + # The name of the output directory + # + # source://rdoc//lib/rdoc/options.rb#248 + def op_dir=(_arg0); end + + # The OptionParser for this instance + # + # source://rdoc//lib/rdoc/options.rb#253 + def option_parser; end + + # The OptionParser for this instance + # + # source://rdoc//lib/rdoc/options.rb#253 + def option_parser=(_arg0); end + + # Output heading decorations? + # + # source://rdoc//lib/rdoc/options.rb#257 + def output_decoration; end + + # Output heading decorations? + # + # source://rdoc//lib/rdoc/options.rb#257 + def output_decoration=(_arg0); end + + # source://rdoc//lib/rdoc/options.rb#427 + def override(map); end + + # Directory where guides, FAQ, and other pages not associated with a class + # live. You may leave this unset if these are at the root of your project. + # + # source://rdoc//lib/rdoc/options.rb#263 + def page_dir; end + + # Directory where guides, FAQ, and other pages not associated with a class + # live. You may leave this unset if these are at the root of your project. + # + # source://rdoc//lib/rdoc/options.rb#263 + def page_dir=(_arg0); end + + # Parses command line options. + # + # source://rdoc//lib/rdoc/options.rb#646 + def parse(argv); end + + # Is RDoc in pipe mode? + # + # source://rdoc//lib/rdoc/options.rb#268 + def pipe; end + + # Is RDoc in pipe mode? + # + # source://rdoc//lib/rdoc/options.rb#268 + def pipe=(_arg0); end + + # Don't display progress as we process the files + # + # source://rdoc//lib/rdoc/options.rb#1191 + def quiet; end + + # Set quietness to +bool+ + # + # source://rdoc//lib/rdoc/options.rb#1198 + def quiet=(bool); end + + # Array of directories to search for files to satisfy an :include: + # + # source://rdoc//lib/rdoc/options.rb#273 + def rdoc_include; end + + # Array of directories to search for files to satisfy an :include: + # + # source://rdoc//lib/rdoc/options.rb#273 + def rdoc_include=(_arg0); end + + # Root of the source documentation will be generated for. Set this when + # building documentation outside the source directory. Defaults to the + # current directory. + # + # source://rdoc//lib/rdoc/options.rb#280 + def root; end + + # Root of the source documentation will be generated for. Set this when + # building documentation outside the source directory. Defaults to the + # current directory. + # + # source://rdoc//lib/rdoc/options.rb#280 + def root=(_arg0); end + + # Removes directories from +path+ that are outside the current directory + # + # source://rdoc//lib/rdoc/options.rb#1205 + def sanitize_path(path); end + + # Set up an output generator for the named +generator_name+. + # + # If the found generator responds to :setup_options it will be called with + # the options instance. This allows generators to add custom options or set + # default options. + # + # source://rdoc//lib/rdoc/options.rb#1232 + def setup_generator(generator_name = T.unsafe(nil)); end + + # Include the '#' at the front of hyperlinked instance method names + # + # source://rdoc//lib/rdoc/options.rb#285 + def show_hash; end + + # Include the '#' at the front of hyperlinked instance method names + # + # source://rdoc//lib/rdoc/options.rb#285 + def show_hash=(_arg0); end + + # Indicates if files of test suites should be skipped + # + # source://rdoc//lib/rdoc/options.rb#344 + def skip_tests; end + + # Indicates if files of test suites should be skipped + # + # source://rdoc//lib/rdoc/options.rb#344 + def skip_tests=(_arg0); end + + # Directory to copy static files from + # + # source://rdoc//lib/rdoc/options.rb#290 + def static_path; end + + # Directory to copy static files from + # + # source://rdoc//lib/rdoc/options.rb#290 + def static_path=(_arg0); end + + # The number of columns in a tab + # + # source://rdoc//lib/rdoc/options.rb#295 + def tab_width; end + + # The number of columns in a tab + # + # source://rdoc//lib/rdoc/options.rb#295 + def tab_width=(_arg0); end + + # Template to be used when generating output + # + # source://rdoc//lib/rdoc/options.rb#300 + def template; end + + # Template to be used when generating output + # + # source://rdoc//lib/rdoc/options.rb#300 + def template=(_arg0); end + + # Directory the template lives in + # + # source://rdoc//lib/rdoc/options.rb#305 + def template_dir; end + + # Directory the template lives in + # + # source://rdoc//lib/rdoc/options.rb#305 + def template_dir=(_arg0); end + + # Finds the template dir for +template+ + # + # source://rdoc//lib/rdoc/options.rb#1254 + def template_dir_for(template); end + + # Additional template stylesheets + # + # source://rdoc//lib/rdoc/options.rb#310 + def template_stylesheets; end + + # Additional template stylesheets + # + # source://rdoc//lib/rdoc/options.rb#310 + def template_stylesheets=(_arg0); end + + # Documentation title + # + # source://rdoc//lib/rdoc/options.rb#315 + def title; end + + # Documentation title + # + # source://rdoc//lib/rdoc/options.rb#315 + def title=(_arg0); end + + # For dumping YAML + # + # source://rdoc//lib/rdoc/options.rb#523 + def to_yaml(*options); end + + # Should RDoc update the timestamps in the output dir? + # + # source://rdoc//lib/rdoc/options.rb#320 + def update_output_dir; end + + # Should RDoc update the timestamps in the output dir? + # + # source://rdoc//lib/rdoc/options.rb#320 + def update_output_dir=(_arg0); end + + # Verbosity, zero means quiet + # + # source://rdoc//lib/rdoc/options.rb#325 + def verbosity; end + + # Verbosity, zero means quiet + # + # source://rdoc//lib/rdoc/options.rb#325 + def verbosity=(_arg0); end + + # Minimum visibility of a documented method. One of +:public+, +:protected+, + # +:private+ or +:nodoc+. + # + # The +:nodoc+ visibility ignores all directives related to visibility. The + # directive. + # + # source://rdoc//lib/rdoc/options.rb#340 + def visibility; end + + # Sets the minimum visibility of a documented method. + # + # Accepts +:public+, +:protected+, +:private+, +:nodoc+, or +:all+. + # + # When +:all+ is passed, visibility is set to +:private+, similarly to + # RDOCOPT="--all", see #visibility for more information. + # + # source://rdoc//lib/rdoc/options.rb#1271 + def visibility=(visibility); end + + # Displays a warning using Kernel#warn if we're being verbose + # + # source://rdoc//lib/rdoc/options.rb#1283 + def warn(message); end + + # URL of web cvs frontend + # + # source://rdoc//lib/rdoc/options.rb#330 + def webcvs; end + + # URL of web cvs frontend + # + # source://rdoc//lib/rdoc/options.rb#330 + def webcvs=(_arg0); end + + # Writes the YAML file .rdoc_options to the current directory containing the + # parsed options. + # + # source://rdoc//lib/rdoc/options.rb#1291 + def write_options; end + + # source://rdoc//lib/rdoc/options.rb#423 + def yaml_initialize(tag, map); end + + class << self + # Loads options from .rdoc_options if the file exists, otherwise creates a + # new RDoc::Options instance. + # + # @raise [RDoc::Error] + # + # source://rdoc//lib/rdoc/options.rb#1305 + def load_options; end + end +end + +# A parser is simple a class that subclasses RDoc::Parser and implements #scan +# to fill in an RDoc::TopLevel with parsed data. +# +# The initialize method takes an RDoc::TopLevel to fill with parsed content, +# the name of the file to be parsed, the content of the file, an RDoc::Options +# object and an RDoc::Stats object to inform the user of parsed items. The +# scan method is then called to parse the file and must return the +# RDoc::TopLevel object. By calling super these items will be set for you. +# +# In order to be used by RDoc the parser needs to register the file extensions +# it can parse. Use ::parse_files_matching to register extensions. +# +# require 'rdoc' +# +# class RDoc::Parser::Xyz < RDoc::Parser +# parse_files_matching /\.xyz$/ +# +# def initialize top_level, file_name, content, options, stats +# super +# +# # extra initialization if needed +# end +# +# def scan +# # parse file and fill in @top_level +# end +# end +# +# source://rdoc//lib/rdoc/parser.rb#33 +class RDoc::Parser + # Creates a new Parser storing +top_level+, +file_name+, +content+, + # +options+ and +stats+ in instance variables. In +@preprocess+ an + # RDoc::Markup::PreProcess object is created which allows processing of + # directives. + # + # @return [Parser] a new instance of Parser + # + # source://rdoc//lib/rdoc/parser.rb#252 + def initialize(top_level, file_name, content, options, stats); end + + # The name of the file being parsed + # + # source://rdoc//lib/rdoc/parser.rb#52 + def file_name; end + + # Normalizes tabs in +body+ + # + # source://rdoc//lib/rdoc/parser.rb#272 + def handle_tab_width(body); end + + class << self + # Alias an extension to another extension. After this call, files ending + # "new_ext" will be parsed using the same parser as "old_ext" + # + # source://rdoc//lib/rdoc/parser.rb#58 + def alias_extension(old_ext, new_ext); end + + # Determines if the file is a "binary" file which basically means it has + # content that an RDoc parser shouldn't try to consume. + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/parser.rb#74 + def binary?(file); end + + # Return a parser that can handle a particular extension + # + # source://rdoc//lib/rdoc/parser.rb#107 + def can_parse(file_name); end + + # Returns a parser that can handle the extension for +file_name+. This does + # not depend upon the file being readable. + # + # source://rdoc//lib/rdoc/parser.rb#120 + def can_parse_by_name(file_name); end + + # Returns the file type from the modeline in +file_name+ + # + # source://rdoc//lib/rdoc/parser.rb#141 + def check_modeline(file_name); end + + # Finds and instantiates the correct parser for the given +file_name+ and + # +content+. + # + # source://rdoc//lib/rdoc/parser.rb#167 + def for(top_level, file_name, content, options, stats); end + + # Record which file types this parser can understand. + # + # It is ok to call this multiple times. + # + # source://rdoc//lib/rdoc/parser.rb#201 + def parse_files_matching(regexp); end + + # An Array of arrays that maps file extension (or name) regular + # expressions to parser classes that will parse matching filenames. + # + # Use parse_files_matching to register a parser's file extensions. + # + # source://rdoc//lib/rdoc/parser.rb#45 + def parsers; end + + # Removes an emacs-style modeline from the first line of the document + # + # source://rdoc//lib/rdoc/parser.rb#208 + def remove_modeline(content); end + + # If there is a markup: parser_name comment at the front of the + # file, use it to determine the parser. For example: + # + # # markup: rdoc + # # Class comment can go here + # + # class C + # end + # + # The comment should appear as the first line of the +content+. + # + # If the content contains a shebang or editor modeline the comment may + # appear on the second or third line. + # + # Any comment style may be used to hide the markup comment. + # + # source://rdoc//lib/rdoc/parser.rb#229 + def use_markup(content); end + + # Checks if +file+ is a zip file in disguise. Signatures from + # http://www.garykessler.net/library/file_sigs.html + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/parser.rb#94 + def zip?(file); end + end +end + +# RDoc::Parser::C attempts to parse C extension files. It looks for +# the standard patterns that you find in extensions: +rb_define_class+, +# +rb_define_method+ and so on. It tries to find the corresponding +# C source for the methods and extract comments, but if we fail +# we don't worry too much. +# +# The comments associated with a Ruby method are extracted from the C +# comment block associated with the routine that _implements_ that +# method, that is to say the method whose name is given in the +# +rb_define_method+ call. For example, you might write: +# +# /* +# * Returns a new array that is a one-dimensional flattening of this +# * array (recursively). That is, for every element that is an array, +# * extract its elements into the new array. +# * +# * s = [ 1, 2, 3 ] #=> [1, 2, 3] +# * t = [ 4, 5, 6, [7, 8] ] #=> [4, 5, 6, [7, 8]] +# * a = [ s, t, 9, 10 ] #=> [[1, 2, 3], [4, 5, 6, [7, 8]], 9, 10] +# * a.flatten #=> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] +# */ +# static VALUE +# rb_ary_flatten(VALUE ary) +# { +# ary = rb_obj_dup(ary); +# rb_ary_flatten_bang(ary); +# return ary; +# } +# +# ... +# +# void +# Init_Array(void) +# { +# ... +# rb_define_method(rb_cArray, "flatten", rb_ary_flatten, 0); +# +# Here RDoc will determine from the +rb_define_method+ line that there's a +# method called "flatten" in class Array, and will look for the implementation +# in the method +rb_ary_flatten+. It will then use the comment from that +# method in the HTML output. This method must be in the same source file +# as the +rb_define_method+. +# +# The comment blocks may include special directives: +# +# [Document-class: +name+] +# Documentation for the named class. +# +# [Document-module: +name+] +# Documentation for the named module. +# +# [Document-const: +name+] +# Documentation for the named +rb_define_const+. +# +# Constant values can be supplied on the first line of the comment like so: +# +# /* 300: The highest possible score in bowling */ +# rb_define_const(cFoo, "PERFECT", INT2FIX(300)); +# +# The value can contain internal colons so long as they are escaped with a \ +# +# [Document-global: +name+] +# Documentation for the named +rb_define_global_const+ +# +# [Document-variable: +name+] +# Documentation for the named +rb_define_variable+ +# +# [Document-method\: +method_name+] +# Documentation for the named method. Use this when the method name is +# unambiguous. +# +# [Document-method\: ClassName::method_name] +# Documentation for a singleton method in the given class. Use this when +# the method name alone is ambiguous. +# +# [Document-method\: ClassName#method_name] +# Documentation for a instance method in the given class. Use this when the +# method name alone is ambiguous. +# +# [Document-attr: +name+] +# Documentation for the named attribute. +# +# [call-seq: text up to an empty line] +# Because C source doesn't give descriptive names to Ruby-level parameters, +# you need to document the calling sequence explicitly +# +# In addition, RDoc assumes by default that the C method implementing a +# Ruby function is in the same source file as the rb_define_method call. +# If this isn't the case, add the comment: +# +# rb_define_method(....); // in filename +# +# As an example, we might have an extension that defines multiple classes +# in its Init_xxx method. We could document them using +# +# /* +# * Document-class: MyClass +# * +# * Encapsulate the writing and reading of the configuration +# * file. ... +# */ +# +# /* +# * Document-method: read_value +# * +# * call-seq: +# * cfg.read_value(key) -> value +# * cfg.read_value(key} { |key| } -> value +# * +# * Return the value corresponding to +key+ from the configuration. +# * In the second form, if the key isn't found, invoke the +# * block and return its value. +# */ +# +# source://rdoc//lib/rdoc/parser/c.rb#119 +class RDoc::Parser::C < ::RDoc::Parser + include ::RDoc::Text + + # Prepares for parsing a C file. See RDoc::Parser#initialize for details on + # the arguments. + # + # @return [C] a new instance of C + # + # source://rdoc//lib/rdoc/parser/c.rb#171 + def initialize(top_level, file_name, content, options, stats); end + + # Add alias, either from a direct alias definition, or from two + # method that reference the same function. + # + # source://rdoc//lib/rdoc/parser/c.rb#250 + def add_alias(var_name, class_obj, old_name, new_name, comment); end + + # Maps C variable names to names of Ruby classes or modules + # + # source://rdoc//lib/rdoc/parser/c.rb#133 + def classes; end + + # C file the parser is parsing + # + # source://rdoc//lib/rdoc/parser/c.rb#138 + def content; end + + # C file the parser is parsing + # + # source://rdoc//lib/rdoc/parser/c.rb#138 + def content=(_arg0); end + + # Scans #content for rb_define_alias + # + # source://rdoc//lib/rdoc/parser/c.rb#222 + def do_aliases; end + + # Scans #content for rb_attr and rb_define_attr + # + # source://rdoc//lib/rdoc/parser/c.rb#263 + def do_attrs; end + + # Scans #content for boot_defclass + # + # source://rdoc//lib/rdoc/parser/c.rb#286 + def do_boot_defclass; end + + # Scans #content for rb_define_class, boot_defclass, rb_define_class_under + # and rb_singleton_class + # + # source://rdoc//lib/rdoc/parser/c.rb#298 + def do_classes_and_modules; end + + # Scans #content for rb_define_variable, rb_define_readonly_variable, + # rb_define_const and rb_define_global_const + # + # source://rdoc//lib/rdoc/parser/c.rb#396 + def do_constants; end + + # Scans #content for rb_include_module + # + # source://rdoc//lib/rdoc/parser/c.rb#442 + def do_includes; end + + # Scans #content for rb_define_method, rb_define_singleton_method, + # rb_define_module_function, rb_define_private_method, + # rb_define_global_function and define_filetest_function + # + # source://rdoc//lib/rdoc/parser/c.rb#458 + def do_methods; end + + # Creates classes and module that were missing were defined due to the file + # order being different than the declaration order. + # + # source://rdoc//lib/rdoc/parser/c.rb#507 + def do_missing; end + + # Dependencies from a missing enclosing class to the classes in + # missing_dependencies that depend upon it. + # + # source://rdoc//lib/rdoc/parser/c.rb#144 + def enclosure_dependencies; end + + # Finds the comment for an alias on +class_name+ from +new_name+ to + # +old_name+ + # + # source://rdoc//lib/rdoc/parser/c.rb#523 + def find_alias_comment(class_name, new_name, old_name); end + + # Finds a comment for rb_define_attr, rb_attr or Document-attr. + # + # +var_name+ is the C class variable the attribute is defined on. + # +attr_name+ is the attribute's name. + # + # +read+ and +write+ are the read/write flags ('1' or '0'). Either both or + # neither must be provided. + # + # source://rdoc//lib/rdoc/parser/c.rb#541 + def find_attr_comment(var_name, attr_name, read = T.unsafe(nil), write = T.unsafe(nil)); end + + # Find the C code corresponding to a Ruby method + # + # source://rdoc//lib/rdoc/parser/c.rb#598 + def find_body(class_name, meth_name, meth_obj, file_content, quiet = T.unsafe(nil)); end + + # Finds a RDoc::NormalClass or RDoc::NormalModule for +raw_name+ + # + # source://rdoc//lib/rdoc/parser/c.rb#682 + def find_class(raw_name, name, base_name = T.unsafe(nil)); end + + # Look for class or module documentation above Init_+class_name+(void), + # in a Document-class +class_name+ (or module) comment or above an + # rb_define_class (or module). If a comment is supplied above a matching + # Init_ and a rb_define_class the Init_ comment is used. + # + # /* + # * This is a comment for Foo + # */ + # Init_Foo(void) { + # VALUE cFoo = rb_define_class("Foo", rb_cObject); + # } + # + # /* + # * Document-class: Foo + # * This is a comment for Foo + # */ + # Init_foo(void) { + # VALUE cFoo = rb_define_class("Foo", rb_cObject); + # } + # + # /* + # * This is a comment for Foo + # */ + # VALUE cFoo = rb_define_class("Foo", rb_cObject); + # + # source://rdoc//lib/rdoc/parser/c.rb#723 + def find_class_comment(class_name, class_mod); end + + # Finds a comment matching +type+ and +const_name+ either above the + # comment or in the matching Document- section. + # + # source://rdoc//lib/rdoc/parser/c.rb#779 + def find_const_comment(type, const_name, class_name = T.unsafe(nil)); end + + # Handles modifiers in +comment+ and updates +meth_obj+ as appropriate. + # + # source://rdoc//lib/rdoc/parser/c.rb#796 + def find_modifiers(comment, meth_obj); end + + # Finds a Document-method override for +meth_obj+ on +class_name+ + # + # source://rdoc//lib/rdoc/parser/c.rb#806 + def find_override_comment(class_name, meth_obj); end + + # Generate a Ruby-method table + # + # source://rdoc//lib/rdoc/parser/c.rb#574 + def gen_body_table(file_content); end + + # Generate a const table + # + # source://rdoc//lib/rdoc/parser/c.rb#756 + def gen_const_table(file_content); end + + # Creates a new RDoc::Attr +attr_name+ on class +var_name+ that is either + # +read+, +write+ or both + # + # source://rdoc//lib/rdoc/parser/c.rb#828 + def handle_attr(var_name, attr_name, read, write); end + + # Creates a new RDoc::NormalClass or RDoc::NormalModule based on +type+ + # named +class_name+ in +parent+ which was assigned to the C +var_name+. + # + # source://rdoc//lib/rdoc/parser/c.rb#857 + def handle_class_module(var_name, type, class_name, parent, in_module); end + + # Adds constants. By providing some_value: at the start of the comment you + # can override the C value of the comment to give a friendly definition. + # + # /* 300: The perfect score in bowling */ + # rb_define_const(cFoo, "PERFECT", INT2FIX(300)); + # + # Will override INT2FIX(300) with the value +300+ in the output + # RDoc. Values may include quotes and escaped colons (\:). + # + # source://rdoc//lib/rdoc/parser/c.rb#922 + def handle_constants(type, var_name, const_name, definition); end + + # Removes #ifdefs that would otherwise confuse us + # + # source://rdoc//lib/rdoc/parser/c.rb#972 + def handle_ifdefs_in(body); end + + # Adds an RDoc::AnyMethod +meth_name+ defined on a class or module assigned + # to +var_name+. +type+ is the type of method definition function used. + # +singleton_method+ and +module_function+ create a singleton method. + # + # source://rdoc//lib/rdoc/parser/c.rb#981 + def handle_method(type, var_name, meth_name, function, param_count, source_file = T.unsafe(nil)); end + + # Registers a singleton class +sclass_var+ as a singleton of +class_var+ + # + # source://rdoc//lib/rdoc/parser/c.rb#1051 + def handle_singleton(sclass_var, class_var); end + + # Maps C variable names to names of Ruby classes (and singleton classes) + # + # source://rdoc//lib/rdoc/parser/c.rb#149 + def known_classes; end + + # Loads the variable map with the given +name+ from the RDoc::Store, if + # present. + # + # source://rdoc//lib/rdoc/parser/c.rb#1062 + def load_variable_map(map_name); end + + # Look for directives in a normal comment block: + # + # /* + # * :title: My Awesome Project + # */ + # + # This method modifies the +comment+ + # + # source://rdoc//lib/rdoc/parser/c.rb#1091 + def look_for_directives_in(context, comment); end + + # Classes found while parsing the C file that were not yet registered due to + # a missing enclosing class. These are processed by do_missing + # + # source://rdoc//lib/rdoc/parser/c.rb#155 + def missing_dependencies; end + + # Creates a RDoc::Comment instance. + # + # source://rdoc//lib/rdoc/parser/c.rb#1221 + def new_comment(text = T.unsafe(nil), location = T.unsafe(nil), language = T.unsafe(nil)); end + + # Extracts parameters from the +method_body+ and returns a method + # parameter string. Follows 1.9.3dev's scan-arg-spec, see README.EXT + # + # source://rdoc//lib/rdoc/parser/c.rb#1110 + def rb_scan_args(method_body); end + + # Removes lines that are commented out that might otherwise get picked up + # when scanning for classes and methods + # + # source://rdoc//lib/rdoc/parser/c.rb#1193 + def remove_commented_out_lines; end + + # Extracts the classes, modules, methods, attributes, constants and aliases + # from a C file and returns an RDoc::TopLevel for this file + # + # source://rdoc//lib/rdoc/parser/c.rb#1201 + def scan; end + + # Maps C variable names to names of Ruby singleton classes + # + # source://rdoc//lib/rdoc/parser/c.rb#160 + def singleton_classes; end + + # The TopLevel items in the parsed file belong to + # + # source://rdoc//lib/rdoc/parser/c.rb#165 + def top_level; end +end + +# :stopdoc: +# +# source://rdoc//lib/rdoc/parser/c.rb#126 +RDoc::Parser::C::BOOL_ARG_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://rdoc//lib/rdoc/parser/c.rb#127 +RDoc::Parser::C::TRUE_VALUES = T.let(T.unsafe(nil), Array) + +# A ChangeLog file parser. +# +# This parser converts a ChangeLog into an RDoc::Markup::Document. When +# viewed as HTML a ChangeLog page will have an entry for each day's entries in +# the sidebar table of contents. +# +# This parser is meant to parse the MRI ChangeLog, but can be used to parse any +# {GNU style Change +# Log}[http://www.gnu.org/prep/standards/html_node/Style-of-Change-Logs.html]. +# +# source://rdoc//lib/rdoc/parser/changelog.rb#14 +class RDoc::Parser::ChangeLog < ::RDoc::Parser + include ::RDoc::Parser::Text + + # Attaches the +continuation+ of the previous line to the +entry_body+. + # + # Continued function listings are joined together as a single entry. + # Continued descriptions are joined to make a single paragraph. + # + # source://rdoc//lib/rdoc/parser/changelog.rb#26 + def continue_entry_body(entry_body, continuation); end + + # Creates an RDoc::Markup::Document given the +groups+ of ChangeLog entries. + # + # source://rdoc//lib/rdoc/parser/changelog.rb#44 + def create_document(groups); end + + # Returns a list of ChangeLog entries an RDoc::Markup nodes for the given + # +entries+. + # + # source://rdoc//lib/rdoc/parser/changelog.rb#66 + def create_entries(entries); end + + # Returns an RDoc::Markup::List containing the given +items+ in the + # ChangeLog + # + # source://rdoc//lib/rdoc/parser/changelog.rb#83 + def create_items(items); end + + # Groups +entries+ by date. + # + # source://rdoc//lib/rdoc/parser/changelog.rb#103 + def group_entries(entries); end + + # Parse date in ISO-8601, RFC-2822, or default of Git + # + # source://rdoc//lib/rdoc/parser/changelog.rb#119 + def parse_date(date); end + + # Parses the entries in the ChangeLog. + # + # Returns an Array of each ChangeLog entry in order of parsing. + # + # A ChangeLog entry is an Array containing the ChangeLog title (date and + # committer) and an Array of ChangeLog items (file and function changed with + # description). + # + # An example result would be: + # + # [ 'Tue Dec 4 08:33:46 2012 Eric Hodel ', + # [ 'README.EXT: Converted to RDoc format', + # 'README.EXT.ja: ditto']] + # + # source://rdoc//lib/rdoc/parser/changelog.rb#149 + def parse_entries; end + + # Converts the ChangeLog into an RDoc::Markup::Document + # + # source://rdoc//lib/rdoc/parser/changelog.rb#206 + def scan; end +end + +# The extension for Git commit log +# +# source://rdoc//lib/rdoc/parser/changelog.rb#222 +module RDoc::Parser::ChangeLog::Git + # Returns a list of ChangeLog entries as + # RDoc::Parser::ChangeLog::Git::LogEntry list for the given + # +entries+. + # + # source://rdoc//lib/rdoc/parser/changelog.rb#262 + def create_entries(entries); end + + # Parses the entries in the Git commit logs + # + # source://rdoc//lib/rdoc/parser/changelog.rb#235 + def parse_entries; end + + # Parses auxiliary info. Currentry `base-url` to expand + # references is effective. + # + # source://rdoc//lib/rdoc/parser/changelog.rb#227 + def parse_info(info); end +end + +# source://rdoc//lib/rdoc/parser/changelog.rb#271 +RDoc::Parser::ChangeLog::Git::HEADING_LEVEL = T.let(T.unsafe(nil), Integer) + +# source://rdoc//lib/rdoc/parser/changelog.rb#270 +class RDoc::Parser::ChangeLog::Git::LogEntry < ::Struct + # @return [LogEntry] a new instance of LogEntry + # + # source://rdoc//lib/rdoc/parser/changelog.rb#273 + def initialize(base, commit, author, email, date, contents); end + + # source://rdoc//lib/rdoc/parser/changelog.rb#313 + def accept(visitor); end + + # source://rdoc//lib/rdoc/parser/changelog.rb#294 + def aref; end + + # Returns the value of attribute author + # + # @return [Object] the current value of author + def author; end + + # Sets the attribute author + # + # @param value [Object] the value to set the attribute author to. + # @return [Object] the newly set value + def author=(_); end + + # Returns the value of attribute base + # + # @return [Object] the current value of base + def base; end + + # Sets the attribute base + # + # @param value [Object] the value to set the attribute base to. + # @return [Object] the newly set value + def base=(_); end + + # Returns the value of attribute commit + # + # @return [Object] the current value of commit + def commit; end + + # Sets the attribute commit + # + # @param value [Object] the value to set the attribute commit to. + # @return [Object] the newly set value + def commit=(_); end + + # Returns the value of attribute contents + # + # @return [Object] the current value of contents + def contents; end + + # Sets the attribute contents + # + # @param value [Object] the value to set the attribute contents to. + # @return [Object] the newly set value + def contents=(_); end + + # Returns the value of attribute date + # + # @return [Object] the current value of date + def date; end + + # Sets the attribute date + # + # @param value [Object] the value to set the attribute date to. + # @return [Object] the newly set value + def date=(_); end + + # Returns the value of attribute email + # + # @return [Object] the current value of email + def email; end + + # Sets the attribute email + # + # @param value [Object] the value to set the attribute email to. + # @return [Object] the newly set value + def email=(_); end + + # source://rdoc//lib/rdoc/parser/changelog.rb#298 + def label(context = T.unsafe(nil)); end + + # source://rdoc//lib/rdoc/parser/changelog.rb#290 + def level; end + + # source://rdoc//lib/rdoc/parser/changelog.rb#330 + def pretty_print(q); end + + # source://rdoc//lib/rdoc/parser/changelog.rb#302 + def text; end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# Parse a Markdown format file. The parsed RDoc::Markup::Document is attached +# as a file comment. +# +# source://rdoc//lib/rdoc/parser/markdown.rb#6 +class RDoc::Parser::Markdown < ::RDoc::Parser + include ::RDoc::Parser::Text + + # Creates an Markdown-format TopLevel for the given file. + # + # source://rdoc//lib/rdoc/parser/markdown.rb#15 + def scan; end +end + +# Parse a RD format file. The parsed RDoc::Markup::Document is attached as a +# file comment. +# +# source://rdoc//lib/rdoc/parser/rd.rb#6 +class RDoc::Parser::RD < ::RDoc::Parser + include ::RDoc::Parser::Text + + # Creates an rd-format TopLevel for the given file. + # + # source://rdoc//lib/rdoc/parser/rd.rb#15 + def scan; end +end + +# Wrapper for Ripper lex states +# +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#7 +class RDoc::Parser::RipperStateLex + # New lexer for +code+. + # + # @return [RipperStateLex] a new instance of RipperStateLex + # + # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#576 + def initialize(code); end + + # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#322 + def get_squashed_tk; end + + private + + # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#465 + def get_embdoc_tk(tk); end + + # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#474 + def get_heredoc_tk(heredoc_name, indent); end + + # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#549 + def get_op_tk(tk); end + + # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#447 + def get_regexp_tk(tk); end + + # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#420 + def get_string_tk(tk); end + + # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#373 + def get_symbol_tk(tk); end + + # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#511 + def get_words_tk(tk); end + + # @return [Boolean] + # + # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#499 + def heredoc_end?(name, indent, tk); end + + # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#493 + def retrieve_heredoc_info(tk); end + + class << self + # Returns +true+ if lex state will be +END+ after +token+. + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#597 + def end?(token); end + + # Returns tokens parsed from +code+. + # + # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#584 + def parse(code); end + end +end + +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#20 +RDoc::Parser::RipperStateLex::EXPR_ARG = T.let(T.unsafe(nil), Integer) + +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#31 +RDoc::Parser::RipperStateLex::EXPR_ARG_ANY = T.let(T.unsafe(nil), Integer) + +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#16 +RDoc::Parser::RipperStateLex::EXPR_BEG = T.let(T.unsafe(nil), Integer) + +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#30 +RDoc::Parser::RipperStateLex::EXPR_BEG_ANY = T.let(T.unsafe(nil), Integer) + +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#25 +RDoc::Parser::RipperStateLex::EXPR_CLASS = T.let(T.unsafe(nil), Integer) + +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#21 +RDoc::Parser::RipperStateLex::EXPR_CMDARG = T.let(T.unsafe(nil), Integer) + +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#24 +RDoc::Parser::RipperStateLex::EXPR_DOT = T.let(T.unsafe(nil), Integer) + +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#17 +RDoc::Parser::RipperStateLex::EXPR_END = T.let(T.unsafe(nil), Integer) + +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#18 +RDoc::Parser::RipperStateLex::EXPR_ENDARG = T.let(T.unsafe(nil), Integer) + +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#19 +RDoc::Parser::RipperStateLex::EXPR_ENDFN = T.let(T.unsafe(nil), Integer) + +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#32 +RDoc::Parser::RipperStateLex::EXPR_END_ANY = T.let(T.unsafe(nil), Integer) + +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#28 +RDoc::Parser::RipperStateLex::EXPR_FITEM = T.let(T.unsafe(nil), Integer) + +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#23 +RDoc::Parser::RipperStateLex::EXPR_FNAME = T.let(T.unsafe(nil), Integer) + +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#26 +RDoc::Parser::RipperStateLex::EXPR_LABEL = T.let(T.unsafe(nil), Integer) + +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#27 +RDoc::Parser::RipperStateLex::EXPR_LABELED = T.let(T.unsafe(nil), Integer) + +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#22 +RDoc::Parser::RipperStateLex::EXPR_MID = T.let(T.unsafe(nil), Integer) + +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#15 +RDoc::Parser::RipperStateLex::EXPR_NONE = T.let(T.unsafe(nil), Integer) + +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#29 +RDoc::Parser::RipperStateLex::EXPR_VALUE = T.let(T.unsafe(nil), Integer) + +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#312 +class RDoc::Parser::RipperStateLex::InnerStateLex < ::Ripper::Filter + # @return [InnerStateLex] a new instance of InnerStateLex + # + # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#313 + def initialize(code); end + + # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#317 + def on_default(event, tok, data); end +end + +# TODO: Remove this constants after Ruby 2.4 EOL +# +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#11 +RDoc::Parser::RipperStateLex::RIPPER_HAS_LEX_STATE = T.let(T.unsafe(nil), TrueClass) + +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#13 +class RDoc::Parser::RipperStateLex::Token < ::Struct + # Returns the value of attribute char_no + # + # @return [Object] the current value of char_no + def char_no; end + + # Sets the attribute char_no + # + # @param value [Object] the value to set the attribute char_no to. + # @return [Object] the newly set value + def char_no=(_); end + + # Returns the value of attribute kind + # + # @return [Object] the current value of kind + def kind; end + + # Sets the attribute kind + # + # @param value [Object] the value to set the attribute kind to. + # @return [Object] the newly set value + def kind=(_); end + + # Returns the value of attribute line_no + # + # @return [Object] the current value of line_no + def line_no; end + + # Sets the attribute line_no + # + # @param value [Object] the value to set the attribute line_no to. + # @return [Object] the newly set value + def line_no=(_); end + + # Returns the value of attribute state + # + # @return [Object] the current value of state + def state; end + + # Sets the attribute state + # + # @param value [Object] the value to set the attribute state to. + # @return [Object] the newly set value + def state=(_); end + + # Returns the value of attribute text + # + # @return [Object] the current value of text + def text; end + + # Sets the attribute text + # + # @param value [Object] the value to set the attribute text to. + # @return [Object] the newly set value + def text=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# Extracts code elements from a source file returning a TopLevel object +# containing the constituent file elements. +# +# This file is based on rtags +# +# RubyParser understands how to document: +# * classes +# * modules +# * methods +# * constants +# * aliases +# * private, public, protected +# * private_class_function, public_class_function +# * private_constant, public_constant +# * module_function +# * attr, attr_reader, attr_writer, attr_accessor +# * extra accessors given on the command line +# * metaprogrammed methods +# * require +# * include +# +# == Method Arguments +# +# -- +# NOTE: I don't think this works, needs tests, remove the paragraph following +# this block when known to work +# +# The parser extracts the arguments from the method definition. You can +# override this with a custom argument definition using the :args: directive: +# +# ## +# # This method tries over and over until it is tired +# +# def go_go_go(thing_to_try, tries = 10) # :args: thing_to_try +# puts thing_to_try +# go_go_go thing_to_try, tries - 1 +# end +# +# If you have a more-complex set of overrides you can use the :call-seq: +# directive: +# ++ +# +# The parser extracts the arguments from the method definition. You can +# override this with a custom argument definition using the :call-seq: +# directive: +# +# ## +# # This method can be called with a range or an offset and length +# # +# # :call-seq: +# # my_method(Range) +# # my_method(offset, length) +# +# def my_method(*args) +# end +# +# The parser extracts +yield+ expressions from method bodies to gather the +# yielded argument names. If your method manually calls a block instead of +# yielding or you want to override the discovered argument names use +# the :yields: directive: +# +# ## +# # My method is awesome +# +# def my_method(&block) # :yields: happy, times +# block.call 1, 2 +# end +# +# == Metaprogrammed Methods +# +# To pick up a metaprogrammed method, the parser looks for a comment starting +# with '##' before an identifier: +# +# ## +# # This is a meta-programmed method! +# +# add_my_method :meta_method, :arg1, :arg2 +# +# The parser looks at the token after the identifier to determine the name, in +# this example, :meta_method. If a name cannot be found, a warning is printed +# and 'unknown is used. +# +# You can force the name of a method using the :method: directive: +# +# ## +# # :method: some_method! +# +# By default, meta-methods are instance methods. To indicate that a method is +# a singleton method instead use the :singleton-method: directive: +# +# ## +# # :singleton-method: +# +# You can also use the :singleton-method: directive with a name: +# +# ## +# # :singleton-method: some_method! +# +# You can define arguments for metaprogrammed methods via either the +# :call-seq:, :arg: or :args: directives. +# +# Additionally you can mark a method as an attribute by +# using :attr:, :attr_reader:, :attr_writer: or :attr_accessor:. Just like +# for :method:, the name is optional. +# +# ## +# # :attr_reader: my_attr_name +# +# == Hidden methods and attributes +# +# You can provide documentation for methods that don't appear using +# the :method:, :singleton-method: and :attr: directives: +# +# ## +# # :attr_writer: ghost_writer +# # There is an attribute here, but you can't see it! +# +# ## +# # :method: ghost_method +# # There is a method here, but you can't see it! +# +# ## +# # this is a comment for a regular method +# +# def regular_method() end +# +# Note that by default, the :method: directive will be ignored if there is a +# standard rdocable item following it. +# +# source://rdoc//lib/rdoc/parser/ruby.rb#144 +class RDoc::Parser::Ruby < ::RDoc::Parser + include ::RDoc::TokenStream + include ::RDoc::Parser::RubyTools + + # Creates a new Ruby parser. + # + # @return [Ruby] a new instance of Ruby + # + # source://rdoc//lib/rdoc/parser/ruby.rb#164 + def initialize(top_level, file_name, content, options, stats); end + + # Look for the first comment in a file that isn't a shebang line. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#236 + def collect_first_comment; end + + # Consumes trailing whitespace from the token stream + # + # source://rdoc//lib/rdoc/parser/ruby.rb#279 + def consume_trailing_spaces; end + + # Creates a new attribute in +container+ with +name+. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#286 + def create_attr(container, single, name, rw, comment); end + + # Creates a module alias in +container+ at +rhs_name+ (or at the top-level + # for "::") with the name from +constant+. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#300 + def create_module_alias(container, constant, rhs_name); end + + # Aborts with +msg+ + # + # source://rdoc//lib/rdoc/parser/ruby.rb#313 + def error(msg); end + + # Looks for a true or false token. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#322 + def get_bool; end + + # Look for the name of a class of module (optionally with a leading :: or + # with :: separated named) and return the ultimate name, the associated + # container, and the given name (with the ::). + # + # source://rdoc//lib/rdoc/parser/ruby.rb#340 + def get_class_or_module(container, ignore_constants = T.unsafe(nil)); end + + # Return a superclass, which can be either a constant of an expression + # + # source://rdoc//lib/rdoc/parser/ruby.rb#423 + def get_class_specification; end + + # Parse a constant, which might be qualified by one or more class or module + # names + # + # source://rdoc//lib/rdoc/parser/ruby.rb#456 + def get_constant; end + + # Little hack going on here. In the statement: + # + # f = 2*(1+yield) + # + # We see the RPAREN as the next token, so we need to exit early. This still + # won't catch all cases (such as "a = yield + 1" + # + # source://rdoc//lib/rdoc/parser/ruby.rb#558 + def get_end_token(tk); end + + # Get an included module that may be surrounded by parens + # + # source://rdoc//lib/rdoc/parser/ruby.rb#473 + def get_included_module_with_optional_parens; end + + # Retrieves the method container for a singleton method. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#578 + def get_method_container(container, name_t); end + + # Extracts a name or symbol from the token stream. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#621 + def get_symbol_or_name; end + + # Retrieves the read token stream and replaces +pattern+ with +replacement+ + # using gsub. If the result is only a ";" returns an empty string. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#194 + def get_tkread_clean(pattern, replacement); end + + # Extracts the visibility information for the visibility token +tk+ + # and +single+ class type identifier. + # + # Returns the visibility type (a string), the visibility (a symbol) and + # +singleton+ if the methods following should be converted to singleton + # methods. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#208 + def get_visibility_information(tk, single); end + + # Look for directives in a normal comment block: + # + # # :stopdoc: + # # Don't display comment from this point forward + # + # This routine modifies its +comment+ parameter. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#661 + def look_for_directives_in(container, comment); end + + # Adds useful info about the parser to +message+ + # + # source://rdoc//lib/rdoc/parser/ruby.rb#681 + def make_message(message); end + + # Creates a comment with the correct format + # + # source://rdoc//lib/rdoc/parser/ruby.rb#693 + def new_comment(comment, line_no = T.unsafe(nil)); end + + # Parses an +alias+ in +context+ with +comment+ + # + # source://rdoc//lib/rdoc/parser/ruby.rb#762 + def parse_alias(context, single, tk, comment); end + + # Creates an RDoc::Attr for the name following +tk+, setting the comment to + # +comment+. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#704 + def parse_attr(context, single, tk, comment); end + + # Creates an RDoc::Attr for each attribute listed after +tk+, setting the + # comment for each to +comment+. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#733 + def parse_attr_accessor(context, single, tk, comment); end + + # Extracts call parameters from the token stream. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#801 + def parse_call_parameters(tk); end + + # Parses a class in +context+ with +comment+ + # + # source://rdoc//lib/rdoc/parser/ruby.rb#844 + def parse_class(container, single, tk, comment); end + + # Parses and creates a regular class + # + # source://rdoc//lib/rdoc/parser/ruby.rb#878 + def parse_class_regular(container, declaration_context, single, name_t, given_name, comment); end + + # Parses a singleton class in +container+ with the given +name+ and + # +comment+. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#918 + def parse_class_singleton(container, name, comment); end + + # Generates an RDoc::Method or RDoc::Attr from +comment+ by looking for + # :method: or :attr: directives in +comment+. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1083 + def parse_comment(container, tk, comment); end + + # Parse a comment that is describing an attribute in +container+ with the + # given +name+ and +comment+. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1111 + def parse_comment_attr(container, type, name, comment); end + + # source://rdoc//lib/rdoc/parser/ruby.rb#1123 + def parse_comment_ghost(container, text, name, column, line_no, comment); end + + # Creates an RDoc::Method on +container+ from +comment+ if there is a + # Signature section in the comment + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1162 + def parse_comment_tomdoc(container, tk, comment); end + + # Parses a constant in +context+ with +comment+. If +ignore_constants+ is + # true, no found constants will be added to RDoc. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#957 + def parse_constant(container, tk, comment, ignore_constants = T.unsafe(nil)); end + + # source://rdoc//lib/rdoc/parser/ruby.rb#1024 + def parse_constant_body(container, constant, is_array_or_hash); end + + # Parses a Module#private_constant or Module#public_constant call from +tk+. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#2094 + def parse_constant_visibility(container, single, tk); end + + # Parses an +include+ or +extend+, indicated by the +klass+ and adds it to + # +container+ # with +comment+ + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1197 + def parse_extend_or_include(klass, container, comment); end + + # Parses identifiers that can create new methods or change visibility. + # + # Returns true if the comment was not consumed. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1235 + def parse_identifier(container, single, tk, comment); end + + # Parses an +included+ with a block feature of ActiveSupport::Concern. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1217 + def parse_included_with_activesupport_concern(container, comment); end + + # Parses a meta-programmed attribute and creates an RDoc::Attr. + # + # To create foo and bar attributes on class C with comment "My attributes": + # + # class C + # + # ## + # # :attr: + # # + # # My attributes + # + # my_attr :foo, :bar + # + # end + # + # To create a foo attribute on class C with comment "My attribute": + # + # class C + # + # ## + # # :attr: foo + # # + # # My attribute + # + # my_attr :foo, :bar + # + # end + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1299 + def parse_meta_attr(context, single, tk, comment); end + + # Parses a meta-programmed method + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1333 + def parse_meta_method(container, single, tk, comment); end + + # Parses the name of a metaprogrammed method. +comment+ is used to + # determine the name while +tk+ is used in an error message if the name + # cannot be determined. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1379 + def parse_meta_method_name(comment, tk); end + + # Parses the parameters and block for a meta-programmed method. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1403 + def parse_meta_method_params(container, single, meth, tk, comment); end + + # Parses a normal method defined by +def+ + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1435 + def parse_method(container, single, tk, comment); end + + # Parses a method that needs to be ignored. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1514 + def parse_method_dummy(container); end + + # Parses the name of a method in +container+. + # + # Returns the method name, the container it is in (for def Foo.name) and if + # it is a singleton or regular method. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1527 + def parse_method_name(container); end + + # For the given +container+ and initial name token +name_t+ the method name + # is parsed from the token stream for a regular method. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1554 + def parse_method_name_regular(container, name_t); end + + # For the given +container+ and initial name token +name_t+ the method name + # and the new +container+ (if necessary) are parsed from the token stream + # for a singleton method. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1572 + def parse_method_name_singleton(container, name_t); end + + # Extracts +yield+ parameters from +method+ + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1616 + def parse_method_or_yield_parameters(method = T.unsafe(nil), modifiers = T.unsafe(nil)); end + + # Capture the method's parameters. Along the way, look for a comment + # containing: + # + # # yields: .... + # + # and add this as the block_params for the method + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1683 + def parse_method_parameters(method); end + + # Parses the parameters and body of +meth+ + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1484 + def parse_method_params_and_body(container, single, meth, added_container); end + + # Parses an RDoc::NormalModule in +container+ with +comment+ + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1698 + def parse_module(container, single, tk, comment); end + + # Parses an RDoc::Require in +context+ containing +comment+ + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1720 + def parse_require(context, comment); end + + # Parses a rescue + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1741 + def parse_rescue; end + + # The core of the Ruby parser. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1772 + def parse_statements(container, single = T.unsafe(nil), current_method = T.unsafe(nil), comment = T.unsafe(nil)); end + + # Parse up to +no+ symbol arguments + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1962 + def parse_symbol_arg(no = T.unsafe(nil)); end + + # Parses up to +no+ symbol arguments surrounded by () and places them in + # +args+. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1977 + def parse_symbol_arg_paren(no); end + + # Parses up to +no+ symbol arguments separated by spaces and places them in + # +args+. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#2005 + def parse_symbol_arg_space(no, tk); end + + # Returns symbol text from the next token + # + # source://rdoc//lib/rdoc/parser/ruby.rb#2036 + def parse_symbol_in_arg; end + + # Parses statements in the top-level +container+ + # + # source://rdoc//lib/rdoc/parser/ruby.rb#2053 + def parse_top_level_statements(container); end + + # Determines the visibility in +container+ from +tk+ + # + # source://rdoc//lib/rdoc/parser/ruby.rb#2071 + def parse_visibility(container, single, tk); end + + # Determines the block parameter for +context+ + # + # source://rdoc//lib/rdoc/parser/ruby.rb#2110 + def parse_yield(context, single, tk, method); end + + # Directives are modifier comments that can appear after class, module, or + # method names. For example: + # + # def fred # :yields: a, b + # + # or: + # + # + # We return the directive name and any parameters as a two element array if + # the name is in +allowed+. A directive can be found anywhere up to the end + # of the current line. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#2131 + def read_directive(allowed); end + + # Handles directives following the definition for +context+ (any + # RDoc::CodeObject) if the directives are +allowed+ at this point. + # + # See also RDoc::Markup::PreProcess#handle_directive + # + # source://rdoc//lib/rdoc/parser/ruby.rb#2163 + def read_documentation_modifiers(context, allowed); end + + # Records the location of this +container+ in the file for this parser and + # adds it to the list of classes and modules in the file. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#2182 + def record_location(container); end + + # Retrieve comment body without =begin/=end + # + # source://rdoc//lib/rdoc/parser/ruby.rb#1761 + def retrieve_comment_body(tk); end + + # Scans this Ruby file for Ruby constructs + # + # source://rdoc//lib/rdoc/parser/ruby.rb#2194 + def scan; end + + # skip the var [in] part of a 'for' statement + # + # source://rdoc//lib/rdoc/parser/ruby.rb#2282 + def skip_for_variable; end + + # Skips the next method in +container+ + # + # source://rdoc//lib/rdoc/parser/ruby.rb#2293 + def skip_method(container); end + + # while, until, and for have an optional do + # + # source://rdoc//lib/rdoc/parser/ruby.rb#2241 + def skip_optional_do_after_expression; end + + # Skip opening parentheses and yield the block. + # Skip closing parentheses too when exists. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#401 + def skip_parentheses(&block); end + + # Skip spaces until a comment is found + # + # source://rdoc//lib/rdoc/parser/ruby.rb#2302 + def skip_tkspace_comment(skip_nl = T.unsafe(nil)); end + + # Marks containers between +container+ and +ancestor+ as ignored + # + # source://rdoc//lib/rdoc/parser/ruby.rb#646 + def suppress_parents(container, ancestor); end + + # Return +true+ if +tk+ is a newline. + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/parser/ruby.rb#186 + def tk_nl?(tk); end + + # Updates visibility in +container+ from +vis_type+ and +vis+. + # + # source://rdoc//lib/rdoc/parser/ruby.rb#2314 + def update_visibility(container, vis_type, vis, singleton); end + + # Prints +message+ to +$stderr+ unless we're being quiet + # + # source://rdoc//lib/rdoc/parser/ruby.rb#2359 + def warn(message); end +end + +# Collection of methods for writing parsers +# +# source://rdoc//lib/rdoc/parser/ruby_tools.rb#5 +module RDoc::Parser::RubyTools + # Adds a token listener +obj+, but you should probably use token_listener + # + # source://rdoc//lib/rdoc/parser/ruby_tools.rb#10 + def add_token_listener(obj); end + + # Fetches the next token from the scanner + # + # source://rdoc//lib/rdoc/parser/ruby_tools.rb#18 + def get_tk; end + + # Reads and returns all tokens up to one of +tokens+. Leaves the matched + # token in the token list. + # + # source://rdoc//lib/rdoc/parser/ruby_tools.rb#52 + def get_tk_until(*tokens); end + + # Retrieves a String representation of the read tokens + # + # source://rdoc//lib/rdoc/parser/ruby_tools.rb#73 + def get_tkread; end + + # Peek equivalent for get_tkread + # + # source://rdoc//lib/rdoc/parser/ruby_tools.rb#82 + def peek_read; end + + # Peek at the next token, but don't remove it from the stream + # + # source://rdoc//lib/rdoc/parser/ruby_tools.rb#89 + def peek_tk; end + + # Removes the token listener +obj+ + # + # source://rdoc//lib/rdoc/parser/ruby_tools.rb#97 + def remove_token_listener(obj); end + + # Resets the tools + # + # source://rdoc//lib/rdoc/parser/ruby_tools.rb#104 + def reset; end + + # Skips whitespace tokens including newlines + # + # source://rdoc//lib/rdoc/parser/ruby_tools.rb#115 + def skip_tkspace; end + + # Skips whitespace tokens excluding newlines + # + # source://rdoc//lib/rdoc/parser/ruby_tools.rb#129 + def skip_tkspace_without_nl; end + + # Has +obj+ listen to tokens + # + # source://rdoc//lib/rdoc/parser/ruby_tools.rb#143 + def token_listener(obj); end + + # Returns +tk+ to the scanner + # + # source://rdoc//lib/rdoc/parser/ruby_tools.rb#153 + def unget_tk(tk); end +end + +# Parse a non-source file. We basically take the whole thing as one big +# comment. +# +# source://rdoc//lib/rdoc/parser/simple.rb#6 +class RDoc::Parser::Simple < ::RDoc::Parser + include ::RDoc::Parser::Text + + # Prepare to parse a plain file + # + # @return [Simple] a new instance of Simple + # + # source://rdoc//lib/rdoc/parser/simple.rb#17 + def initialize(top_level, file_name, content, options, stats); end + + # source://rdoc//lib/rdoc/parser/simple.rb#12 + def content; end + + # Removes the encoding magic comment from +text+ + # + # source://rdoc//lib/rdoc/parser/simple.rb#41 + def remove_coding_comment(text); end + + # Removes private comments. + # + # Unlike RDoc::Comment#remove_private this implementation only looks for two + # dashes at the beginning of the line. Three or more dashes are considered + # to be a rule and ignored. + # + # source://rdoc//lib/rdoc/parser/simple.rb#52 + def remove_private_comment(comment); end + + # Extract the file contents and attach them to the TopLevel as a comment + # + # source://rdoc//lib/rdoc/parser/simple.rb#28 + def scan; end +end + +# source://rdoc//lib/rdoc/rd.rb#72 +class RDoc::RD + class << self + # Parses +rd+ source and returns an RDoc::Markup::Document. If the + # =begin or =end lines are missing they will be added. + # + # source://rdoc//lib/rdoc/rd.rb#78 + def parse(rd); end + end +end + +# RD format parser for headings, paragraphs, lists, verbatim sections that +# exist as blocks. +# +# source://rdoc//lib/rdoc/rd/block_parser.rb#664 +class RDoc::RD::BlockParser < ::Racc::Parser + # Creates a new RDoc::RD::BlockParser. Use #parse to parse an rd-format + # document. + # + # @return [BlockParser] a new instance of BlockParser + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#699 + def initialize; end + + # reduce 0 omitted + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#1334 + def _reduce_1(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1376 + def _reduce_10(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1381 + def _reduce_11(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1386 + def _reduce_12(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1394 + def _reduce_13(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1400 + def _reduce_14(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1407 + def _reduce_15(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1412 + def _reduce_16(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1417 + def _reduce_17(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1428 + def _reduce_18(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1439 + def _reduce_19(val, _values, result); end + + # @raise [ParseError] + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#1339 + def _reduce_2(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1445 + def _reduce_20(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1451 + def _reduce_21(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1457 + def _reduce_22(val, _values, result); end + + # reduce 26 omitted + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#1473 + def _reduce_27(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1479 + def _reduce_28(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1485 + def _reduce_29(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1344 + def _reduce_3(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1491 + def _reduce_30(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1496 + def _reduce_31(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1501 + def _reduce_32(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1507 + def _reduce_33(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1512 + def _reduce_34(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1517 + def _reduce_35(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1523 + def _reduce_36(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1529 + def _reduce_37(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1534 + def _reduce_38(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1539 + def _reduce_39(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1349 + def _reduce_4(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1545 + def _reduce_40(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1551 + def _reduce_41(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1556 + def _reduce_42(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1561 + def _reduce_43(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1569 + def _reduce_44(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1575 + def _reduce_45(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1580 + def _reduce_46(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1585 + def _reduce_47(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1591 + def _reduce_48(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1597 + def _reduce_49(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1354 + def _reduce_5(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1603 + def _reduce_50(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1609 + def _reduce_51(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1615 + def _reduce_52(val, _values, result); end + + # reduce 53 omitted + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#1622 + def _reduce_54(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1627 + def _reduce_55(val, _values, result); end + + # reduce 56 omitted + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#1634 + def _reduce_57(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1359 + def _reduce_6(val, _values, result); end + + # reduce 61 omitted + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#1647 + def _reduce_62(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1653 + def _reduce_63(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1659 + def _reduce_64(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1665 + def _reduce_65(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1671 + def _reduce_66(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1677 + def _reduce_67(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1682 + def _reduce_68(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1687 + def _reduce_69(val, _values, result); end + + # reduce 70 omitted + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#1694 + def _reduce_71(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1699 + def _reduce_72(val, _values, result); end + + # reduce 7 omitted + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#1366 + def _reduce_8(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1371 + def _reduce_9(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#1704 + def _reduce_none(val, _values, result); end + + # Adds footnote +content+ to the document + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#1049 + def add_footnote(content); end + + # Adds label +label+ to the document + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#1063 + def add_label(label); end + + # Retrieves the content of +values+ as a single String + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#1032 + def content(values); end + + # Footnotes for this document + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#683 + def footnotes; end + + # Path to find included files in + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#693 + def include_path; end + + # Path to find included files in + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#693 + def include_path=(_arg0); end + + # Labels for items in this document + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#688 + def labels; end + + # Current line number + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#987 + def line_index; end + + # Returns the next token from the document + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#755 + def next_token; end + + # Raises a ParseError when invalid formatting is found + # + # @raise [ParseError] + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#971 + def on_error(et, ev, _values); end + + # Creates a paragraph for +value+ + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#1039 + def paragraph(value); end + + # Parses +src+ and returns an RDoc::Markup::Document. + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#711 + def parse(src); end + + private + + # Cuts off excess whitespace in +src+ + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#935 + def cut_off(src); end + + # Formats line numbers +line_numbers+ prettily + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#1023 + def format_line_num(*line_numbers); end + + # Retrieves the content for +file+ from the include_path + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#1004 + def get_included(file); end + + # Yields to the given block if +indent+ matches the current indent, otherwise + # an indentation token is processed. + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#917 + def if_current_indent_equal(indent); end + + # Parses subtree +src+ + # + # source://rdoc//lib/rdoc/rd/block_parser.rb#994 + def parse_subtree(src); end + + # source://rdoc//lib/rdoc/rd/block_parser.rb#962 + def set_term_to_element(parent, term); end +end + +# source://rdoc//lib/rdoc/rd/block_parser.rb#1328 +RDoc::RD::BlockParser::Racc_debug_parser = T.let(T.unsafe(nil), FalseClass) + +# Inline keeps track of markup and labels to create proper links. +# +# source://rdoc//lib/rdoc/rd/inline.rb#5 +class RDoc::RD::Inline + # Initializes the Inline with +rdoc+ and +inline+ + # + # @return [Inline] a new instance of Inline + # + # source://rdoc//lib/rdoc/rd/inline.rb#34 + def initialize(rdoc, reference); end + + # source://rdoc//lib/rdoc/rd/inline.rb#42 + def ==(other); end + + # Appends +more+ to this inline. +more+ may be a String or another Inline. + # + # source://rdoc//lib/rdoc/rd/inline.rb#50 + def append(more); end + + # source://rdoc//lib/rdoc/rd/inline.rb#65 + def inspect; end + + # The markup of this reference in RDoc format + # + # source://rdoc//lib/rdoc/rd/inline.rb#15 + def rdoc; end + + # The text of the reference + # + # source://rdoc//lib/rdoc/rd/inline.rb#10 + def reference; end + + # The markup of this reference in RDoc format + # + # source://rdoc//lib/rdoc/rd/inline.rb#15 + def to_s; end + + class << self + # Creates a new Inline for +rdoc+ and +reference+. + # + # +rdoc+ may be another Inline or a String. If +reference+ is not given it + # will use the text from +rdoc+. + # + # source://rdoc//lib/rdoc/rd/inline.rb#23 + def new(rdoc, reference = T.unsafe(nil)); end + end +end + +# RD format parser for inline markup such as emphasis, links, footnotes, etc. +# +# source://rdoc//lib/rdoc/rd/inline_parser.rb#665 +class RDoc::RD::InlineParser < ::Racc::Parser + # Creates a new parser for inline markup in the rd format. The +block_parser+ + # is used to for footnotes and labels in the inline text. + # + # @return [InlineParser] a new instance of InlineParser + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#738 + def initialize(block_parser); end + + # reduce 100 omitted + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1750 + def _reduce_101(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1757 + def _reduce_102(val, _values, result); end + + # reduce 108 omitted + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1775 + def _reduce_109(val, _values, result); end + + # reduce 110 omitted + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1782 + def _reduce_111(val, _values, result); end + + # reduce 112 omitted + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1790 + def _reduce_113(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1795 + def _reduce_114(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1800 + def _reduce_115(val, _values, result); end + + # reduce 12 omitted + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1413 + def _reduce_13(val, _values, result); end + + # reduce 135 omitted + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1845 + def _reduce_136(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1420 + def _reduce_14(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1427 + def _reduce_15(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1434 + def _reduce_16(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1441 + def _reduce_17(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1449 + def _reduce_18(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1455 + def _reduce_19(val, _values, result); end + + # reduce 1 omitted + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1385 + def _reduce_2(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1463 + def _reduce_20(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1469 + def _reduce_21(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1478 + def _reduce_22(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1484 + def _reduce_23(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1490 + def _reduce_24(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1496 + def _reduce_25(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1505 + def _reduce_26(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1511 + def _reduce_27(val, _values, result); end + + # reduce 28 omitted + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1520 + def _reduce_29(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1390 + def _reduce_3(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1525 + def _reduce_30(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1530 + def _reduce_31(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1536 + def _reduce_32(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1542 + def _reduce_33(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1548 + def _reduce_34(val, _values, result); end + + # reduce 35 omitted + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1556 + def _reduce_36(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1561 + def _reduce_37(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1566 + def _reduce_38(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1572 + def _reduce_39(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1578 + def _reduce_40(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1584 + def _reduce_41(val, _values, result); end + + # reduce 42 omitted + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1592 + def _reduce_43(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1598 + def _reduce_44(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1604 + def _reduce_45(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1610 + def _reduce_46(val, _values, result); end + + # reduce 56 omitted + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1636 + def _reduce_57(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1642 + def _reduce_58(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1648 + def _reduce_59(val, _values, result); end + + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1654 + def _reduce_60(val, _values, result); end + + # reduce 61 omitted + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1661 + def _reduce_62(val, _values, result); end + + # reduce 63 omitted + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1669 + def _reduce_64(val, _values, result); end + + # reduce 77 omitted + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1701 + def _reduce_78(val, _values, result); end + + # reduce 137 omitted + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1852 + def _reduce_none(val, _values, result); end + + # Creates a new RDoc::RD::Inline for the +rdoc+ markup and the raw +reference+ + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#887 + def inline(rdoc, reference = T.unsafe(nil)); end + + # Returns the next token from the inline text + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#756 + def next_token; end + + # Returns words following an error + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#876 + def next_words_on_error; end + + # Raises a ParseError when invalid formatting is found + # + # @raise [ParseError] + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#836 + def on_error(et, ev, values); end + + # Parses the +inline+ text from RD format into RDoc format. + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#745 + def parse(inline); end + + # Returns words before the error + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#853 + def prev_words_on_error(ev); end + + private + + # Returns the last line of +src+ + # + # source://rdoc//lib/rdoc/rd/inline_parser.rb#864 + def last_line(src); end +end + +# source://rdoc//lib/rdoc/rd/inline_parser.rb#1377 +RDoc::RD::InlineParser::Racc_debug_parser = T.let(T.unsafe(nil), FalseClass) + +# This is the driver for generating RDoc output. It handles file parsing and +# generation of output. +# +# To use this class to generate RDoc output via the API, the recommended way +# is: +# +# rdoc = RDoc::RDoc.new +# options = RDoc::Options.load_options # returns an RDoc::Options instance +# # set extra options +# rdoc.document options +# +# You can also generate output like the +rdoc+ executable: +# +# rdoc = RDoc::RDoc.new +# rdoc.document argv +# +# Where +argv+ is an array of strings, each corresponding to an argument you'd +# give rdoc on the command line. See rdoc --help for details. +# +# source://rdoc//lib/rdoc/rdoc.rb#29 +class RDoc::RDoc + # Creates a new RDoc::RDoc instance. Call #document to parse files and + # generate documentation. + # + # @return [RDoc] a new instance of RDoc + # + # source://rdoc//lib/rdoc/rdoc.rb#100 + def initialize; end + + # Generates documentation or a coverage report depending upon the settings + # in +options+. + # + # +options+ can be either an RDoc::Options instance or an array of strings + # equivalent to the strings that would be passed on the command line like + # %w[-q -o doc -t My\ Doc\ Title]. #document will automatically + # call RDoc::Options#finish if an options instance was given. + # + # For a list of options, see either RDoc::Options or rdoc --help. + # + # By default, output will be stored in a directory called "doc" below the + # current directory, so make sure you're somewhere writable before invoking. + # + # source://rdoc//lib/rdoc/rdoc.rb#450 + def document(options); end + + # Report an error message and exit + # + # @raise [RDoc::Error] + # + # source://rdoc//lib/rdoc/rdoc.rb#113 + def error(msg); end + + # Gathers a set of parseable files from the files and directories listed in + # +files+. + # + # source://rdoc//lib/rdoc/rdoc.rb#121 + def gather_files(files); end + + # Generates documentation for +file_info+ (from #parse_files) into the + # output dir using the generator selected + # by the RDoc options + # + # source://rdoc//lib/rdoc/rdoc.rb#515 + def generate; end + + # Generator instance used for creating output + # + # source://rdoc//lib/rdoc/rdoc.rb#52 + def generator; end + + # Generator instance used for creating output + # + # source://rdoc//lib/rdoc/rdoc.rb#52 + def generator=(_arg0); end + + # Turns RDoc from stdin into HTML + # + # source://rdoc//lib/rdoc/rdoc.rb#142 + def handle_pipe; end + + # Installs a siginfo handler that prints the current filename. + # + # source://rdoc//lib/rdoc/rdoc.rb#157 + def install_siginfo_handler; end + + # Hash of files and their last modified times. + # + # source://rdoc//lib/rdoc/rdoc.rb#57 + def last_modified; end + + # Return a list of the files to be processed in a directory. We know that + # this directory doesn't have a .document file, so we're looking for real + # files. However we may well contain subdirectories which must be tested + # for .document files. + # + # source://rdoc//lib/rdoc/rdoc.rb#323 + def list_files_in_directory(dir); end + + # Given a list of files and directories, create a list of all the Ruby + # files they contain. + # + # If +force_doc+ is true we always add the given files, if false, only + # add files that we guarantee we can parse. It is true when looking at + # files given on the command line, false when recursing through + # subdirectories. + # + # The effect of this is that if you want a file with a non-standard + # extension parsed, you must name it explicitly. + # + # source://rdoc//lib/rdoc/rdoc.rb#275 + def normalized_file_list(relative_files, force_doc = T.unsafe(nil), exclude_pattern = T.unsafe(nil)); end + + # RDoc options + # + # source://rdoc//lib/rdoc/rdoc.rb#62 + def options; end + + # RDoc options + # + # source://rdoc//lib/rdoc/rdoc.rb#62 + def options=(_arg0); end + + # Return the path name of the flag file in an output directory. + # + # source://rdoc//lib/rdoc/rdoc.rb#240 + def output_flag_file(op_dir); end + + # The .document file contains a list of file and directory name patterns, + # representing candidates for documentation. It may also contain comments + # (starting with '#') + # + # source://rdoc//lib/rdoc/rdoc.rb#249 + def parse_dot_doc_file(in_dir, filename); end + + # Parses +filename+ and returns an RDoc::TopLevel + # + # source://rdoc//lib/rdoc/rdoc.rb#332 + def parse_file(filename); end + + # Parse each file on the command line, recursively entering directories. + # + # source://rdoc//lib/rdoc/rdoc.rb#404 + def parse_files(files); end + + # Removes a siginfo handler and replaces the previous + # + # source://rdoc//lib/rdoc/rdoc.rb#534 + def remove_siginfo_handler; end + + # Removes file extensions known to be unparseable from +files+ and TAGS + # files for emacs and vim. + # + # source://rdoc//lib/rdoc/rdoc.rb#428 + def remove_unparseable(files); end + + # Create an output dir if it doesn't exist. If it does exist, but doesn't + # contain the flag file created.rid then we refuse to use it, as + # we may clobber some manually generated documentation + # + # source://rdoc//lib/rdoc/rdoc.rb#170 + def setup_output_dir(dir, force); end + + # Accessor for statistics. Available after each call to parse_files + # + # source://rdoc//lib/rdoc/rdoc.rb#67 + def stats; end + + # The current documentation store + # + # source://rdoc//lib/rdoc/rdoc.rb#72 + def store; end + + # Sets the current documentation tree to +store+ and sets the store's rdoc + # driver to this instance. + # + # source://rdoc//lib/rdoc/rdoc.rb#215 + def store=(store); end + + # Update the flag file in an output directory. + # + # source://rdoc//lib/rdoc/rdoc.rb#223 + def update_output_dir(op_dir, time, last = T.unsafe(nil)); end + + class << self + # Add +klass+ that can generate output after parsing + # + # source://rdoc//lib/rdoc/rdoc.rb#77 + def add_generator(klass); end + + # Active RDoc::RDoc instance + # + # source://rdoc//lib/rdoc/rdoc.rb#85 + def current; end + + # Sets the active RDoc::RDoc instance + # + # source://rdoc//lib/rdoc/rdoc.rb#92 + def current=(rdoc); end + end +end + +# List of directory names skipped if test suites should be skipped +# +# source://rdoc//lib/rdoc/rdoc.rb#46 +RDoc::RDoc::TEST_SUITE_DIRECTORY_NAMES = T.let(T.unsafe(nil), Array) + +# List of directory names always skipped +# +# source://rdoc//lib/rdoc/rdoc.rb#41 +RDoc::RDoc::UNCONDITIONALLY_SKIPPED_DIRECTORIES = T.let(T.unsafe(nil), Array) + +# The RI driver implements the command-line ri tool. +# +# The driver supports: +# * loading RI data from: +# * Ruby's standard library +# * RubyGems +# * ~/.rdoc +# * A user-supplied directory +# * Paging output (uses RI_PAGER environment variable, PAGER environment +# variable or the less, more and pager programs) +# * Interactive mode with tab-completion +# * Abbreviated names (ri Zl shows Zlib documentation) +# * Colorized output +# * Merging output from multiple RI data sources +# +# source://rdoc//lib/rdoc/ri/driver.rb#25 +class RDoc::RI::Driver + # Creates a new driver using +initial_options+ from ::process_args + # + # @return [Driver] a new instance of Driver + # + # source://rdoc//lib/rdoc/ri/driver.rb#391 + def initialize(initial_options = T.unsafe(nil)); end + + # Adds paths for undocumented classes +also_in+ to +out+ + # + # source://rdoc//lib/rdoc/ri/driver.rb#429 + def add_also_in(out, also_in); end + + # Adds a class header to +out+ for class +name+ which is described in + # +classes+. + # + # source://rdoc//lib/rdoc/ri/driver.rb#446 + def add_class(out, name, classes); end + + # Adds +extends+ to +out+ + # + # source://rdoc//lib/rdoc/ri/driver.rb#473 + def add_extends(out, extends); end + + # Adds a list of +extensions+ to this module of the given +type+ to +out+. + # add_includes and add_extends call this, so you should use those directly. + # + # source://rdoc//lib/rdoc/ri/driver.rb#481 + def add_extension_modules(out, type, extensions); end + + # Renders multiple included +modules+ from +store+ to +out+. + # + # source://rdoc//lib/rdoc/ri/driver.rb#499 + def add_extension_modules_multiple(out, store, modules); end + + # Adds a single extension module +include+ from +store+ to +out+ + # + # source://rdoc//lib/rdoc/ri/driver.rb#526 + def add_extension_modules_single(out, store, include); end + + # Adds "(from ...)" to +out+ for +store+ + # + # source://rdoc//lib/rdoc/ri/driver.rb#466 + def add_from(out, store); end + + # Adds +includes+ to +out+ + # + # source://rdoc//lib/rdoc/ri/driver.rb#540 + def add_includes(out, includes); end + + # Looks up the method +name+ and adds it to +out+ + # + # source://rdoc//lib/rdoc/ri/driver.rb#547 + def add_method(out, name); end + + # Adds documentation for all methods in +klass+ to +out+ + # + # source://rdoc//lib/rdoc/ri/driver.rb#558 + def add_method_documentation(out, klass); end + + # Adds a list of +methods+ to +out+ with a heading of +name+ + # + # source://rdoc//lib/rdoc/ri/driver.rb#571 + def add_method_list(out, methods, name); end + + # Returns ancestor classes of +klass+ + # + # source://rdoc//lib/rdoc/ri/driver.rb#591 + def ancestors_of(klass); end + + # source://rdoc//lib/rdoc/ri/driver.rb#926 + def check_did_you_mean; end + + # For RubyGems backwards compatibility + # + # source://rdoc//lib/rdoc/ri/driver.rb#622 + def class_cache; end + + # Builds a RDoc::Markup::Document from +found+, +klasess+ and +includes+ + # + # source://rdoc//lib/rdoc/ri/driver.rb#628 + def class_document(name, found, klasses, includes, extends); end + + # Adds the class +comment+ to +out+. + # + # source://rdoc//lib/rdoc/ri/driver.rb#650 + def class_document_comment(out, comment); end + + # Adds the constants from +klass+ to the Document +out+. + # + # source://rdoc//lib/rdoc/ri/driver.rb#670 + def class_document_constants(out, klass); end + + # Hash mapping a known class or module to the stores it can be loaded from + # + # source://rdoc//lib/rdoc/ri/driver.rb#694 + def classes; end + + # Returns the stores wherein +name+ is found along with the classes, + # extends and includes that match it + # + # source://rdoc//lib/rdoc/ri/driver.rb#714 + def classes_and_includes_and_extends_for(name); end + + # Completes +name+ based on the caches. For Readline + # + # source://rdoc//lib/rdoc/ri/driver.rb#739 + def complete(name); end + + # source://rdoc//lib/rdoc/ri/driver.rb#750 + def complete_klass(name, klass, selector, method, completions); end + + # source://rdoc//lib/rdoc/ri/driver.rb#769 + def complete_method(name, klass, selector, completions); end + + # Converts +document+ to text and writes it to the pager + # + # source://rdoc//lib/rdoc/ri/driver.rb#789 + def display(document); end + + # Outputs formatted RI data for class +name+. Groups undocumented classes + # + # source://rdoc//lib/rdoc/ri/driver.rb#802 + def display_class(name); end + + # Outputs formatted RI data for method +name+ + # + # source://rdoc//lib/rdoc/ri/driver.rb#818 + def display_method(name); end + + # Outputs formatted RI data for the class or method +name+. + # + # Returns true if +name+ was found, false if it was not an alternative could + # be guessed, raises an error if +name+ couldn't be guessed. + # + # source://rdoc//lib/rdoc/ri/driver.rb#832 + def display_name(name); end + + # Displays each name in +name+ + # + # source://rdoc//lib/rdoc/ri/driver.rb#861 + def display_names(names); end + + # Outputs formatted RI data for page +name+. + # + # source://rdoc//lib/rdoc/ri/driver.rb#872 + def display_page(name); end + + # Outputs a formatted RI page list for the pages in +store+. + # + # source://rdoc//lib/rdoc/ri/driver.rb#903 + def display_page_list(store, pages = T.unsafe(nil), search = T.unsafe(nil)); end + + # Expands abbreviated klass +klass+ into a fully-qualified class. "Zl::Da" + # will be expanded to Zlib::DataError. + # + # source://rdoc//lib/rdoc/ri/driver.rb#947 + def expand_class(klass); end + + # Expands the class portion of +name+ into a fully-qualified class. See + # #expand_class. + # + # source://rdoc//lib/rdoc/ri/driver.rb#965 + def expand_name(name); end + + # Filters the methods in +found+ trying to find a match for +name+. + # + # source://rdoc//lib/rdoc/ri/driver.rb#981 + def filter_methods(found, name); end + + # Yields items matching +name+ including the store they were found in, the + # class being searched for, the class they were found in (an ancestor) the + # types of methods to look up (from #method_type), and the method name being + # searched for + # + # source://rdoc//lib/rdoc/ri/driver.rb#999 + def find_methods(name); end + + # Finds a store that matches +name+ which can be the name of a gem, "ruby", + # "home" or "site". + # + # See also RDoc::Store#source + # + # @raise [RDoc::RI::Driver::NotFoundError] + # + # source://rdoc//lib/rdoc/ri/driver.rb#1045 + def find_store(name); end + + # Creates a new RDoc::Markup::Formatter. If a formatter is given with -f, + # use it. If we're outputting to a pager, use bs, otherwise ansi. + # + # source://rdoc//lib/rdoc/ri/driver.rb#1062 + def formatter(io); end + + # Runs ri interactively using Readline if it is available. + # + # source://rdoc//lib/rdoc/ri/driver.rb#1075 + def interactive; end + + # Lists classes known to ri starting with +names+. If +names+ is empty all + # known classes are shown. + # + # source://rdoc//lib/rdoc/ri/driver.rb#1114 + def list_known_classes(names = T.unsafe(nil)); end + + # Returns an Array of methods matching +name+ + # + # source://rdoc//lib/rdoc/ri/driver.rb#1146 + def list_methods_matching(name); end + + # Loads RI data for method +name+ on +klass+ from +store+. +type+ and + # +cache+ indicate if it is a class or instance method. + # + # source://rdoc//lib/rdoc/ri/driver.rb#1185 + def load_method(store, cache, klass, type, name); end + + # Returns an Array of RI data for methods matching +name+ + # + # source://rdoc//lib/rdoc/ri/driver.rb#1208 + def load_methods_matching(name); end + + # Returns a filtered list of methods matching +name+ + # + # source://rdoc//lib/rdoc/ri/driver.rb#1229 + def lookup_method(name); end + + # Builds a RDoc::Markup::Document from +found+, +klasses+ and +includes+ + # + # source://rdoc//lib/rdoc/ri/driver.rb#1254 + def method_document(name, filtered); end + + # Returns the type of method (:both, :instance, :class) for +selector+ + # + # source://rdoc//lib/rdoc/ri/driver.rb#1272 + def method_type(selector); end + + # Returns a regular expression for +name+ that will match an + # RDoc::AnyMethod's name. + # + # source://rdoc//lib/rdoc/ri/driver.rb#1284 + def name_regexp(name); end + + # Paginates output through a pager program. + # + # source://rdoc//lib/rdoc/ri/driver.rb#1298 + def page; end + + # Are we using a pager? + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/ri/driver.rb#1316 + def paging?; end + + # Extracts the class, selector and method name parts from +name+ like + # Foo::Bar#baz. + # + # NOTE: Given Foo::Bar, Bar is considered a class even though it may be a + # method + # + # source://rdoc//lib/rdoc/ri/driver.rb#1327 + def parse_name(name); end + + # Renders the +klass+ from +store+ to +out+. If the klass has no + # documentable items the class is added to +also_in+ instead. + # + # source://rdoc//lib/rdoc/ri/driver.rb#1359 + def render_class(out, store, klass, also_in); end + + # source://rdoc//lib/rdoc/ri/driver.rb#1389 + def render_method(out, store, method, name); end + + # source://rdoc//lib/rdoc/ri/driver.rb#1409 + def render_method_arguments(out, arglists); end + + # source://rdoc//lib/rdoc/ri/driver.rb#1418 + def render_method_comment(out, method, alias_for = T.unsafe(nil)); end + + # source://rdoc//lib/rdoc/ri/driver.rb#1436 + def render_method_superclass(out, method); end + + # Looks up and displays ri data according to the options given. + # + # source://rdoc//lib/rdoc/ri/driver.rb#1448 + def run; end + + # Sets up a pager program to pass output through. Tries the RI_PAGER and + # PAGER environment variables followed by pager, less then more. + # + # source://rdoc//lib/rdoc/ri/driver.rb#1468 + def setup_pager; end + + # Show all method documentation following a class or module + # + # source://rdoc//lib/rdoc/ri/driver.rb#62 + def show_all; end + + # Show all method documentation following a class or module + # + # source://rdoc//lib/rdoc/ri/driver.rb#62 + def show_all=(_arg0); end + + # Starts a WEBrick server for ri. + # + # source://rdoc//lib/rdoc/ri/driver.rb#1494 + def start_server; end + + # An RDoc::RI::Store for each entry in the RI path + # + # source://rdoc//lib/rdoc/ri/driver.rb#67 + def stores; end + + # An RDoc::RI::Store for each entry in the RI path + # + # source://rdoc//lib/rdoc/ri/driver.rb#67 + def stores=(_arg0); end + + # Controls the user of the pager vs $stdout + # + # source://rdoc//lib/rdoc/ri/driver.rb#72 + def use_stdout; end + + # Controls the user of the pager vs $stdout + # + # source://rdoc//lib/rdoc/ri/driver.rb#72 + def use_stdout=(_arg0); end + + class << self + # Default options for ri + # + # source://rdoc//lib/rdoc/ri/driver.rb#77 + def default_options; end + + # Dump +data_path+ using pp + # + # source://rdoc//lib/rdoc/ri/driver.rb#98 + def dump(data_path); end + + # Parses +argv+ and returns a Hash of options + # + # source://rdoc//lib/rdoc/ri/driver.rb#109 + def process_args(argv); end + + # Runs the ri command line executable using +argv+ + # + # source://rdoc//lib/rdoc/ri/driver.rb#376 + def run(argv = T.unsafe(nil)); end + end +end + +# Raised when a name isn't found in the ri data stores +# +# source://rdoc//lib/rdoc/ri/driver.rb#35 +class RDoc::RI::Driver::NotFoundError < ::RDoc::RI::Driver::Error + # @return [NotFoundError] a new instance of NotFoundError + # + # source://rdoc//lib/rdoc/ri/driver.rb#37 + def initialize(klass, suggestion_proc = T.unsafe(nil)); end + + # source://rdoc//lib/rdoc/ri/driver.rb#49 + def message; end + + # Name that wasn't found + # + # source://rdoc//lib/rdoc/ri/driver.rb#45 + def name; end +end + +# For RubyGems backwards compatibility +# +# source://rdoc//lib/rdoc/ri/formatter.rb#5 +module RDoc::RI::Formatter; end + +# source://rdoc//lib/rdoc/ri/store.rb#4 +RDoc::RI::Store = RDoc::Store + +# A file loaded by \#require +# +# source://rdoc//lib/rdoc/require.rb#5 +class RDoc::Require < ::RDoc::CodeObject + # Creates a new Require that loads +name+ with +comment+ + # + # @return [Require] a new instance of Require + # + # source://rdoc//lib/rdoc/require.rb#15 + def initialize(name, comment); end + + # source://rdoc//lib/rdoc/require.rb#22 + def inspect; end + + # Name of the required file + # + # source://rdoc//lib/rdoc/require.rb#10 + def name; end + + # Name of the required file + # + # source://rdoc//lib/rdoc/require.rb#10 + def name=(_arg0); end + + # source://rdoc//lib/rdoc/require.rb#31 + def to_s; end + + # The RDoc::TopLevel corresponding to this require, or +nil+ if not found. + # + # source://rdoc//lib/rdoc/require.rb#38 + def top_level; end +end + +# This is a WEBrick servlet that allows you to browse ri documentation. +# +# You can show documentation through either `ri --server` or, with RubyGems +# 2.0 or newer, `gem server`. For ri, the server runs on port 8214 by +# default. For RubyGems the server runs on port 8808 by default. +# +# You can use this servlet in your own project by mounting it on a WEBrick +# server: +# +# require 'webrick' +# +# server = WEBrick::HTTPServer.new Port: 8000 +# +# server.mount '/', RDoc::Servlet +# +# If you want to mount the servlet some other place than the root, provide the +# base path when mounting: +# +# server.mount '/rdoc', RDoc::Servlet, '/rdoc' +# +# source://rdoc//lib/rdoc/servlet.rb#34 +class RDoc::Servlet < ::WEBrick::HTTPServlet::AbstractServlet + # Creates a new WEBrick servlet. + # + # Use +mount_path+ when mounting the servlet somewhere other than /. + # + # Use +extra_doc_dirs+ for additional documentation directories. + # + # +server+ is provided automatically by WEBrick when mounting. +stores+ and + # +cache+ are provided automatically by the servlet. + # + # @return [Servlet] a new instance of Servlet + # + # source://rdoc//lib/rdoc/servlet.rb#69 + def initialize(server, stores, cache, mount_path = T.unsafe(nil), extra_doc_dirs = T.unsafe(nil)); end + + # Serves the asset at the path in +req+ for +generator_name+ via +res+. + # + # source://rdoc//lib/rdoc/servlet.rb#100 + def asset(generator_name, req, res); end + + # Maps an asset type to its path on the filesystem + # + # source://rdoc//lib/rdoc/servlet.rb#42 + def asset_dirs; end + + # GET request entry point. Fills in +res+ for the path, etc. in +req+. + # + # source://rdoc//lib/rdoc/servlet.rb#119 + def do_GET(req, res); end + + # Fills in +res+ with the class, module or page for +req+ from +store+. + # + # +path+ is relative to the mount_path and is used to determine the class, + # module or page name (/RDoc/Servlet.html becomes RDoc::Servlet). + # +generator+ is used to create the page. + # + # source://rdoc//lib/rdoc/servlet.rb#152 + def documentation_page(store, generator, path, req, res); end + + # Creates the JSON search index on +res+ for the given +store+. +generator+ + # must respond to \#json_index to build. +req+ is ignored. + # + # source://rdoc//lib/rdoc/servlet.rb#171 + def documentation_search(store, generator, req, res); end + + # Returns the RDoc::Store and path relative to +mount_path+ for + # documentation at +path+. + # + # source://rdoc//lib/rdoc/servlet.rb#185 + def documentation_source(path); end + + # Generates an error page for the +exception+ while handling +req+ on +res+. + # + # source://rdoc//lib/rdoc/servlet.rb#203 + def error(exception, req, res); end + + # Instantiates a Darkfish generator for +store+ + # + # source://rdoc//lib/rdoc/servlet.rb#246 + def generator_for(store); end + + # Handles the If-Modified-Since HTTP header on +req+ for +path+. If the + # file has not been modified a Not Modified response is returned. If the + # file has been modified a Last-Modified header is added to +res+. + # + # source://rdoc//lib/rdoc/servlet.rb#267 + def if_modified_since(req, res, path = T.unsafe(nil)); end + + # Returns an Array of installed documentation. + # + # Each entry contains the documentation name (gem name, 'Ruby + # Documentation', etc.), the path relative to the mount point, whether the + # documentation exists, the type of documentation (See RDoc::RI::Paths#each) + # and the filesystem to the RDoc::Store for the documentation. + # + # source://rdoc//lib/rdoc/servlet.rb#290 + def installed_docs; end + + # Returns a 404 page built by +generator+ for +req+ on +res+. + # + # source://rdoc//lib/rdoc/servlet.rb#318 + def not_found(generator, req, res, message = T.unsafe(nil)); end + + # An RDoc::Options instance used for rendering options + # + # source://rdoc//lib/rdoc/servlet.rb#47 + def options; end + + # Enumerates the ri paths. See RDoc::RI::Paths#each + # + # source://rdoc//lib/rdoc/servlet.rb#327 + def ri_paths(&block); end + + # Generates the root page on +res+. +req+ is ignored. + # + # source://rdoc//lib/rdoc/servlet.rb#334 + def root(req, res); end + + # Generates a search index for the root page on +res+. +req+ is ignored. + # + # source://rdoc//lib/rdoc/servlet.rb#345 + def root_search(req, res); end + + # Displays documentation for +req+ on +res+, whether that be HTML or some + # asset. + # + # source://rdoc//lib/rdoc/servlet.rb#395 + def show_documentation(req, res); end + + # Returns an RDoc::Store for the given +source_name+ ('ruby' or a gem name). + # + # source://rdoc//lib/rdoc/servlet.rb#419 + def store_for(source_name); end + + class << self + # Creates an instance of this servlet that shares cached data between + # requests. + # + # source://rdoc//lib/rdoc/servlet.rb#53 + def get_instance(server, *options); end + end +end + +# A singleton class +# +# source://rdoc//lib/rdoc/single_class.rb#5 +class RDoc::SingleClass < ::RDoc::ClassModule + # Adds the superclass to the included modules. + # + # source://rdoc//lib/rdoc/single_class.rb#10 + def ancestors; end + + # source://rdoc//lib/rdoc/single_class.rb#14 + def aref_prefix; end + + # The definition of this singleton class, class << MyClassName + # + # source://rdoc//lib/rdoc/single_class.rb#21 + def definition; end + + # source://rdoc//lib/rdoc/single_class.rb#25 + def pretty_print(q); end +end + +# RDoc statistics collector which prints a summary and report of a project's +# documentation totals. +# +# source://rdoc//lib/rdoc/stats.rb#6 +class RDoc::Stats + include ::RDoc::Text + + # Creates a new Stats that will have +num_files+. +verbosity+ defaults to 1 + # which will create an RDoc::Stats::Normal outputter. + # + # @return [Stats] a new instance of Stats + # + # source://rdoc//lib/rdoc/stats.rb#29 + def initialize(store, num_files, verbosity = T.unsafe(nil)); end + + # Records the parsing of an alias +as+. + # + # source://rdoc//lib/rdoc/stats.rb#52 + def add_alias(as); end + + # Records the parsing of an attribute +attribute+ + # + # source://rdoc//lib/rdoc/stats.rb#59 + def add_attribute(attribute); end + + # Records the parsing of a class +klass+ + # + # source://rdoc//lib/rdoc/stats.rb#66 + def add_class(klass); end + + # Records the parsing of +constant+ + # + # source://rdoc//lib/rdoc/stats.rb#73 + def add_constant(constant); end + + # Records the parsing of +file+ + # + # source://rdoc//lib/rdoc/stats.rb#80 + def add_file(file); end + + # Records the parsing of +method+ + # + # source://rdoc//lib/rdoc/stats.rb#88 + def add_method(method); end + + # Records the parsing of a module +mod+ + # + # source://rdoc//lib/rdoc/stats.rb#95 + def add_module(mod); end + + # Call this to mark the beginning of parsing for display purposes + # + # source://rdoc//lib/rdoc/stats.rb#102 + def begin_adding; end + + # Calculates documentation totals and percentages for classes, modules, + # constants, attributes and methods. + # + # source://rdoc//lib/rdoc/stats.rb#110 + def calculate; end + + # Output level for the coverage report + # + # source://rdoc//lib/rdoc/stats.rb#13 + def coverage_level; end + + # Sets coverage report level. Accepted values are: + # + # false or nil:: No report + # 0:: Classes, modules, constants, attributes, methods + # 1:: Level 0 + method parameters + # + # source://rdoc//lib/rdoc/stats.rb#158 + def coverage_level=(level); end + + # Returns the length and number of undocumented items in +collection+. + # + # source://rdoc//lib/rdoc/stats.rb#167 + def doc_stats(collection); end + + # Call this to mark the end of parsing for display purposes + # + # source://rdoc//lib/rdoc/stats.rb#175 + def done_adding; end + + # Count of files parsed during parsing + # + # source://rdoc//lib/rdoc/stats.rb#18 + def files_so_far; end + + # The documentation status of this project. +true+ when 100%, +false+ when + # less than 100% and +nil+ when unknown. + # + # Set by calling #calculate + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/stats.rb#185 + def fully_documented?; end + + # A report that says you did a great job! + # + # source://rdoc//lib/rdoc/stats.rb#192 + def great_job; end + + # Total number of files found + # + # source://rdoc//lib/rdoc/stats.rb#23 + def num_files; end + + # Calculates the percentage of items documented. + # + # source://rdoc//lib/rdoc/stats.rb#204 + def percent_doc; end + + # Returns a report on which items are not documented + # + # source://rdoc//lib/rdoc/stats.rb#218 + def report; end + + # Returns a report on undocumented attributes in ClassModule +cm+ + # + # source://rdoc//lib/rdoc/stats.rb#259 + def report_attributes(cm); end + + # Returns a report on undocumented items in ClassModule +cm+ + # + # source://rdoc//lib/rdoc/stats.rb#277 + def report_class_module(cm); end + + # Returns a report on undocumented constants in ClassModule +cm+ + # + # source://rdoc//lib/rdoc/stats.rb#329 + def report_constants(cm); end + + # Returns a report on undocumented methods in ClassModule +cm+ + # + # source://rdoc//lib/rdoc/stats.rb#351 + def report_methods(cm); end + + # Returns a summary of the collected statistics. + # + # source://rdoc//lib/rdoc/stats.rb#389 + def summary; end + + # Determines which parameters in +method+ were not documented. Returns a + # total parameter count and an Array of undocumented methods. + # + # source://rdoc//lib/rdoc/stats.rb#439 + def undoc_params(method); end +end + +# Stats printer that prints just the files being documented with a progress +# bar +# +# source://rdoc//lib/rdoc/stats/normal.rb#13 +class RDoc::Stats::Normal < ::RDoc::Stats::Quiet + # source://rdoc//lib/rdoc/stats/normal.rb#15 + def begin_adding; end + + # source://rdoc//lib/rdoc/stats/normal.rb#54 + def done_adding; end + + # Prints a file with a progress bar + # + # source://rdoc//lib/rdoc/stats/normal.rb#23 + def print_file(files_so_far, filename); end +end + +# Stats printer that prints nothing +# +# source://rdoc//lib/rdoc/stats/quiet.rb#5 +class RDoc::Stats::Quiet + # Creates a new Quiet that will print nothing + # + # @return [Quiet] a new instance of Quiet + # + # source://rdoc//lib/rdoc/stats/quiet.rb#10 + def initialize(num_files); end + + # Prints a message at the beginning of parsing + # + # source://rdoc//lib/rdoc/stats/quiet.rb#17 + def begin_adding(*_arg0); end + + # Prints when RDoc is done + # + # source://rdoc//lib/rdoc/stats/quiet.rb#57 + def done_adding(*_arg0); end + + # Prints when an alias is added + # + # source://rdoc//lib/rdoc/stats/quiet.rb#22 + def print_alias(*_arg0); end + + # Prints when an attribute is added + # + # source://rdoc//lib/rdoc/stats/quiet.rb#27 + def print_attribute(*_arg0); end + + # Prints when a class is added + # + # source://rdoc//lib/rdoc/stats/quiet.rb#32 + def print_class(*_arg0); end + + # Prints when a constant is added + # + # source://rdoc//lib/rdoc/stats/quiet.rb#37 + def print_constant(*_arg0); end + + # Prints when a file is added + # + # source://rdoc//lib/rdoc/stats/quiet.rb#42 + def print_file(*_arg0); end + + # Prints when a method is added + # + # source://rdoc//lib/rdoc/stats/quiet.rb#47 + def print_method(*_arg0); end + + # Prints when a module is added + # + # source://rdoc//lib/rdoc/stats/quiet.rb#52 + def print_module(*_arg0); end +end + +# Stats printer that prints everything documented, including the documented +# status +# +# source://rdoc//lib/rdoc/stats/verbose.rb#6 +class RDoc::Stats::Verbose < ::RDoc::Stats::Normal + # Returns a marker for RDoc::CodeObject +co+ being undocumented + # + # source://rdoc//lib/rdoc/stats/verbose.rb#11 + def nodoc(co); end + + # source://rdoc//lib/rdoc/stats/verbose.rb#15 + def print_alias(as); end + + # source://rdoc//lib/rdoc/stats/verbose.rb#19 + def print_attribute(attribute); end + + # source://rdoc//lib/rdoc/stats/verbose.rb#23 + def print_class(klass); end + + # source://rdoc//lib/rdoc/stats/verbose.rb#27 + def print_constant(constant); end + + # source://rdoc//lib/rdoc/stats/verbose.rb#31 + def print_file(files_so_far, file); end + + # source://rdoc//lib/rdoc/stats/verbose.rb#36 + def print_method(method); end + + # source://rdoc//lib/rdoc/stats/verbose.rb#40 + def print_module(mod); end +end + +# A set of rdoc data for a single project (gem, path, etc.). +# +# The store manages reading and writing ri data for a project and maintains a +# cache of methods, classes and ancestors in the store. +# +# The store maintains a #cache of its contents for faster lookup. After +# adding items to the store it must be flushed using #save_cache. The cache +# contains the following structures: +# +# @cache = { +# :ancestors => {}, # class name => ancestor names +# :attributes => {}, # class name => attributes +# :class_methods => {}, # class name => class methods +# :instance_methods => {}, # class name => instance methods +# :modules => [], # classes and modules in this store +# :pages => [], # page names +# } +# -- +# TODO need to prune classes +# +# source://rdoc//lib/rdoc/store.rb#25 +class RDoc::Store + # Creates a new Store of +type+ that will load or save to +path+ + # + # @return [Store] a new instance of Store + # + # source://rdoc//lib/rdoc/store.rb#127 + def initialize(path = T.unsafe(nil), type = T.unsafe(nil)); end + + # Adds +module+ as an enclosure (namespace) for the given +variable+ for C + # files. + # + # source://rdoc//lib/rdoc/store.rb#169 + def add_c_enclosure(variable, namespace); end + + # Adds C variables from an RDoc::Parser::C + # + # source://rdoc//lib/rdoc/store.rb#176 + def add_c_variables(c_parser); end + + # Adds the file with +name+ as an RDoc::TopLevel to the store. Returns the + # created RDoc::TopLevel. + # + # source://rdoc//lib/rdoc/store.rb#188 + def add_file(absolute_name, relative_name: T.unsafe(nil), parser: T.unsafe(nil)); end + + # Returns all classes discovered by RDoc + # + # source://rdoc//lib/rdoc/store.rb#212 + def all_classes; end + + # Returns all classes and modules discovered by RDoc + # + # source://rdoc//lib/rdoc/store.rb#219 + def all_classes_and_modules; end + + # All TopLevels known to RDoc + # + # source://rdoc//lib/rdoc/store.rb#226 + def all_files; end + + # Returns all modules discovered by RDoc + # + # source://rdoc//lib/rdoc/store.rb#233 + def all_modules; end + + # Ancestors cache accessor. Maps a klass name to an Array of its ancestors + # in this store. If Foo in this store inherits from Object, Kernel won't be + # listed (it will be included from ruby's ri store). + # + # source://rdoc//lib/rdoc/store.rb#242 + def ancestors; end + + # Attributes cache accessor. Maps a class to an Array of its attributes. + # + # source://rdoc//lib/rdoc/store.rb#249 + def attributes; end + + # Maps C variables to class or module names for each parsed C file. + # + # source://rdoc//lib/rdoc/store.rb#80 + def c_class_variables; end + + # Stores the name of the C variable a class belongs to. This helps wire up + # classes defined from C across files. + # + # source://rdoc//lib/rdoc/store.rb#73 + def c_enclosure_classes; end + + # source://rdoc//lib/rdoc/store.rb#75 + def c_enclosure_names; end + + # Maps C variables to singleton class names for each parsed C file. + # + # source://rdoc//lib/rdoc/store.rb#85 + def c_singleton_class_variables; end + + # The contents of the Store + # + # source://rdoc//lib/rdoc/store.rb#112 + def cache; end + + # Path to the cache file + # + # source://rdoc//lib/rdoc/store.rb#256 + def cache_path; end + + # Path to the ri data for +klass_name+ + # + # source://rdoc//lib/rdoc/store.rb#263 + def class_file(klass_name); end + + # Class methods cache accessor. Maps a class to an Array of its class + # methods (not full name). + # + # source://rdoc//lib/rdoc/store.rb#272 + def class_methods; end + + # Path where data for +klass_name+ will be stored (methods or class data) + # + # source://rdoc//lib/rdoc/store.rb#279 + def class_path(klass_name); end + + # Hash of all classes known to RDoc + # + # source://rdoc//lib/rdoc/store.rb#286 + def classes_hash; end + + # Removes empty items and ensures item in each collection are unique and + # sorted + # + # source://rdoc//lib/rdoc/store.rb#294 + def clean_cache_collection(collection); end + + # Prepares the RDoc code object tree for use by a generator. + # + # It finds unique classes/modules defined, and replaces classes/modules that + # are aliases for another one by a copy with RDoc::ClassModule#is_alias_for + # set. + # + # It updates the RDoc::ClassModule#constant_aliases attribute of "real" + # classes or modules. + # + # It also completely removes the classes and modules that should be removed + # from the documentation and the methods that have a visibility below + # +min_visibility+, which is the --visibility option. + # + # See also RDoc::Context#remove_from_documentation? + # + # source://rdoc//lib/rdoc/store.rb#322 + def complete(min_visibility); end + + # If true this Store will not write any files + # + # source://rdoc//lib/rdoc/store.rb#90 + def dry_run; end + + # If true this Store will not write any files + # + # source://rdoc//lib/rdoc/store.rb#90 + def dry_run=(_arg0); end + + # The encoding of the contents in the Store + # + # source://rdoc//lib/rdoc/store.rb#117 + def encoding; end + + # The encoding of the contents in the Store + # + # source://rdoc//lib/rdoc/store.rb#117 + def encoding=(_arg0); end + + # Hash of all files known to RDoc + # + # source://rdoc//lib/rdoc/store.rb#362 + def files_hash; end + + # Finds the enclosure (namespace) for the given C +variable+. + # + # source://rdoc//lib/rdoc/store.rb#369 + def find_c_enclosure(variable); end + + # Finds the class with +name+ in all discovered classes + # + # source://rdoc//lib/rdoc/store.rb#394 + def find_class_named(name); end + + # Finds the class with +name+ starting in namespace +from+ + # + # source://rdoc//lib/rdoc/store.rb#401 + def find_class_named_from(name, from); end + + # Finds the class or module with +name+ + # + # source://rdoc//lib/rdoc/store.rb#419 + def find_class_or_module(name); end + + # Finds the file with +name+ in all discovered files + # + # source://rdoc//lib/rdoc/store.rb#427 + def find_file_named(name); end + + # Finds the module with +name+ in all discovered modules + # + # source://rdoc//lib/rdoc/store.rb#434 + def find_module_named(name); end + + # Returns the RDoc::TopLevel that is a text file and has the given + # +file_name+ + # + # source://rdoc//lib/rdoc/store.rb#442 + def find_text_page(file_name); end + + # Finds unique classes/modules defined in +all_hash+, + # and returns them as an array. Performs the alias + # updates in +all_hash+: see ::complete. + # -- + # TODO aliases should be registered by Context#add_module_alias + # + # source://rdoc//lib/rdoc/store.rb#455 + def find_unique(all_hash); end + + # Fixes the erroneous BasicObject < Object in 1.9. + # + # Because we assumed all classes without a stated superclass + # inherit from Object, we have the above wrong inheritance. + # + # We fix BasicObject right away if we are running in a Ruby + # version >= 1.9. + # + # source://rdoc//lib/rdoc/store.rb#474 + def fix_basic_object_inheritance; end + + # Friendly rendition of #path + # + # source://rdoc//lib/rdoc/store.rb#483 + def friendly_path; end + + # source://rdoc//lib/rdoc/store.rb#495 + def inspect; end + + # Instance methods cache accessor. Maps a class to an Array of its + # instance methods (not full name). + # + # source://rdoc//lib/rdoc/store.rb#503 + def instance_methods; end + + # Loads all items from this store into memory. This recreates a + # documentation tree for use by a generator + # + # source://rdoc//lib/rdoc/store.rb#511 + def load_all; end + + # Loads cache file for this store + # + # source://rdoc//lib/rdoc/store.rb#559 + def load_cache; end + + # Loads ri data for +klass_name+ and hooks it up to this store. + # + # source://rdoc//lib/rdoc/store.rb#600 + def load_class(klass_name); end + + # Loads ri data for +klass_name+ + # + # source://rdoc//lib/rdoc/store.rb#618 + def load_class_data(klass_name); end + + # Loads ri data for +method_name+ in +klass_name+ + # + # source://rdoc//lib/rdoc/store.rb#633 + def load_method(klass_name, method_name); end + + # Loads ri data for +page_name+ + # + # source://rdoc//lib/rdoc/store.rb#653 + def load_page(page_name); end + + # Gets the main page for this RDoc store. This page is used as the root of + # the RDoc server. + # + # source://rdoc//lib/rdoc/store.rb#671 + def main; end + + # Sets the main page for this RDoc store. + # + # source://rdoc//lib/rdoc/store.rb#678 + def main=(page); end + + # Converts the variable => ClassModule map +variables+ from a C parser into + # a variable => class name map. + # + # source://rdoc//lib/rdoc/store.rb#686 + def make_variable_map(variables); end + + # Path to the ri data for +method_name+ in +klass_name+ + # + # source://rdoc//lib/rdoc/store.rb#699 + def method_file(klass_name, method_name); end + + # Modules cache accessor. An Array of all the module (and class) names in + # the store. + # + # source://rdoc//lib/rdoc/store.rb#713 + def module_names; end + + # Hash of all modules known to RDoc + # + # source://rdoc//lib/rdoc/store.rb#720 + def modules_hash; end + + # Returns the RDoc::TopLevel that is a text file and has the given +name+ + # + # source://rdoc//lib/rdoc/store.rb#727 + def page(name); end + + # Path to the ri data for +page_name+ + # + # source://rdoc//lib/rdoc/store.rb#736 + def page_file(page_name); end + + # Path this store reads or writes + # + # source://rdoc//lib/rdoc/store.rb#95 + def path; end + + # Path this store reads or writes + # + # source://rdoc//lib/rdoc/store.rb#95 + def path=(_arg0); end + + # The RDoc::RDoc driver for this parse tree. This allows classes consulting + # the documentation tree to access user-set options, for example. + # + # source://rdoc//lib/rdoc/store.rb#101 + def rdoc; end + + # The RDoc::RDoc driver for this parse tree. This allows classes consulting + # the documentation tree to access user-set options, for example. + # + # source://rdoc//lib/rdoc/store.rb#101 + def rdoc=(_arg0); end + + # Removes from +all_hash+ the contexts that are nodoc or have no content. + # + # See RDoc::Context#remove_from_documentation? + # + # source://rdoc//lib/rdoc/store.rb#747 + def remove_nodoc(all_hash); end + + # Saves all entries in the store + # + # source://rdoc//lib/rdoc/store.rb#757 + def save; end + + # Writes the cache file for this store + # + # source://rdoc//lib/rdoc/store.rb#782 + def save_cache; end + + # Writes the ri data for +klass+ (or module) + # + # source://rdoc//lib/rdoc/store.rb#809 + def save_class(klass); end + + # Writes the ri data for +method+ on +klass+ + # + # source://rdoc//lib/rdoc/store.rb#883 + def save_method(klass, method); end + + # Writes the ri data for +page+ + # + # source://rdoc//lib/rdoc/store.rb#906 + def save_page(page); end + + # Source of the contents of this store. + # + # For a store from a gem the source is the gem name. For a store from the + # home directory the source is "home". For system ri store (the standard + # library documentation) the source is"ruby". For a store from the site + # ri directory the store is "site". For other stores the source is the + # #path. + # + # source://rdoc//lib/rdoc/store.rb#932 + def source; end + + # Gets the title for this RDoc store. This is used as the title in each + # page on the RDoc server + # + # source://rdoc//lib/rdoc/store.rb#946 + def title; end + + # Sets the title page for this RDoc store. + # + # source://rdoc//lib/rdoc/store.rb#953 + def title=(title); end + + # Type of ri datastore this was loaded from. See RDoc::RI::Driver, + # RDoc::RI::Paths. + # + # source://rdoc//lib/rdoc/store.rb#107 + def type; end + + # Type of ri datastore this was loaded from. See RDoc::RI::Driver, + # RDoc::RI::Paths. + # + # source://rdoc//lib/rdoc/store.rb#107 + def type=(_arg0); end + + # Returns the unique classes discovered by RDoc. + # + # ::complete must have been called prior to using this method. + # + # source://rdoc//lib/rdoc/store.rb#962 + def unique_classes; end + + # Returns the unique classes and modules discovered by RDoc. + # ::complete must have been called prior to using this method. + # + # source://rdoc//lib/rdoc/store.rb#970 + def unique_classes_and_modules; end + + # Returns the unique modules discovered by RDoc. + # ::complete must have been called prior to using this method. + # + # source://rdoc//lib/rdoc/store.rb#978 + def unique_modules; end + + # The lazy constants alias will be discovered in passing + # + # source://rdoc//lib/rdoc/store.rb#122 + def unmatched_constant_alias; end + + # Sets the parser of +absolute_name+, unless it from a source code file. + # + # source://rdoc//lib/rdoc/store.rb#203 + def update_parser_of_file(absolute_name, parser); end +end + +# Raised when a stored file for a class, module, page or method is missing. +# +# source://rdoc//lib/rdoc/store.rb#36 +class RDoc::Store::MissingFileError < ::RDoc::Store::Error + # Creates a new MissingFileError for the missing +file+ for the given + # +name+ that should have been in the +store+. + # + # @return [MissingFileError] a new instance of MissingFileError + # + # source://rdoc//lib/rdoc/store.rb#57 + def initialize(store, file, name); end + + # The file the #name should be saved as + # + # source://rdoc//lib/rdoc/store.rb#46 + def file; end + + # source://rdoc//lib/rdoc/store.rb#63 + def message; end + + # The name of the object the #file would be loaded from + # + # source://rdoc//lib/rdoc/store.rb#51 + def name; end + + # The store the file should exist in + # + # source://rdoc//lib/rdoc/store.rb#41 + def store; end +end + +# RDoc::Task creates the following rake tasks to generate and clean up RDoc +# output: +# +# [rdoc] +# Main task for this RDoc task. +# +# [clobber_rdoc] +# Delete all the rdoc files. This target is automatically added to the main +# clobber target. +# +# [rerdoc] +# Rebuild the rdoc files from scratch, even if they are not out of date. +# +# [rdoc:coverage] +# Print RDoc coverage report for all rdoc files. +# +# Simple Example: +# +# require 'rdoc/task' +# +# RDoc::Task.new do |rdoc| +# rdoc.main = "README.rdoc" +# rdoc.rdoc_files.include("README.rdoc", "lib/**/*.rb") +# end +# +# The +rdoc+ object passed to the block is an RDoc::Task object. See the +# attributes list for the RDoc::Task class for available customization options. +# +# == Specifying different task names +# +# You may wish to give the task a different name, such as if you are +# generating two sets of documentation. For instance, if you want to have a +# development set of documentation including private methods: +# +# require 'rdoc/task' +# +# RDoc::Task.new :rdoc_dev do |rdoc| +# rdoc.main = "README.rdoc" +# rdoc.rdoc_files.include("README.rdoc", "lib/**/*.rb") +# rdoc.options << "--all" +# end +# +# The tasks would then be named :rdoc_dev, +# :clobber_rdoc_dev, and :rerdoc_dev. +# +# If you wish to have completely different task names, then pass a Hash as +# first argument. With the :rdoc, :clobber_rdoc and +# :rerdoc options, you can customize the task names to your liking. +# +# For example: +# +# require 'rdoc/task' +# +# RDoc::Task.new(:rdoc => "rdoc", :clobber_rdoc => "rdoc:clean", +# :rerdoc => "rdoc:force") +# +# This will create the tasks :rdoc, :rdoc:clean, +# :rdoc:force, and :rdoc:coverage. +# +# source://rdoc//lib/rdoc/task.rb#99 +class RDoc::Task < ::Rake::TaskLib + # Create an RDoc task with the given name. See the RDoc::Task class overview + # for documentation. + # + # @return [Task] a new instance of Task + # @yield [_self] + # @yieldparam _self [RDoc::Task] the object that the method was called on + # + # source://rdoc//lib/rdoc/task.rb#158 + def initialize(name = T.unsafe(nil)); end + + # The block passed to this method will be called just before running the + # RDoc generator. It is allowed to modify RDoc::Task attributes inside the + # block. + # + # source://rdoc//lib/rdoc/task.rb#288 + def before_running_rdoc(&block); end + + # Ensures that +names+ only includes names for the :rdoc, :clobber_rdoc and + # :rerdoc. If other names are given an ArgumentError is raised. + # + # source://rdoc//lib/rdoc/task.rb#174 + def check_names(names); end + + # Task description for the clobber rdoc task or its renamed equivalent + # + # source://rdoc//lib/rdoc/task.rb#188 + def clobber_task_description; end + + # Task description for the coverage task or its renamed description + # + # source://rdoc//lib/rdoc/task.rb#309 + def coverage_task_description; end + + # Sets default task values + # + # source://rdoc//lib/rdoc/task.rb#195 + def defaults; end + + # Create the tasks defined by this task lib. + # + # source://rdoc//lib/rdoc/task.rb#224 + def define; end + + # Whether to run the rdoc process as an external shell (default is false) + # + # source://rdoc//lib/rdoc/task.rb#152 + def external; end + + # Whether to run the rdoc process as an external shell (default is false) + # + # source://rdoc//lib/rdoc/task.rb#152 + def external=(_arg0); end + + # Name of format generator (--format) used by rdoc. (defaults to + # rdoc's default) + # + # source://rdoc//lib/rdoc/task.rb#137 + def generator; end + + # Name of format generator (--format) used by rdoc. (defaults to + # rdoc's default) + # + # source://rdoc//lib/rdoc/task.rb#137 + def generator=(_arg0); end + + # All source is inline now. This method is deprecated + # + # source://rdoc//lib/rdoc/task.rb#209 + def inline_source; end + + # All source is inline now. This method is deprecated + # + # source://rdoc//lib/rdoc/task.rb#217 + def inline_source=(value); end + + # Name of file to be used as the main, top level file of the RDoc. (default + # is none) + # + # source://rdoc//lib/rdoc/task.rb#126 + def main; end + + # Name of file to be used as the main, top level file of the RDoc. (default + # is none) + # + # source://rdoc//lib/rdoc/task.rb#126 + def main=(_arg0); end + + # Comment markup format. rdoc, rd and tomdoc are supported. (default is + # 'rdoc') + # + # source://rdoc//lib/rdoc/task.rb#110 + def markup; end + + # Comment markup format. rdoc, rd and tomdoc are supported. (default is + # 'rdoc') + # + # source://rdoc//lib/rdoc/task.rb#110 + def markup=(_arg0); end + + # Name of the main, top level task. (default is :rdoc) + # + # source://rdoc//lib/rdoc/task.rb#104 + def name; end + + # Name of the main, top level task. (default is :rdoc) + # + # source://rdoc//lib/rdoc/task.rb#104 + def name=(_arg0); end + + # List of options that will be supplied to RDoc + # + # source://rdoc//lib/rdoc/task.rb#272 + def option_list; end + + # Additional list of options to be passed rdoc. (default is []) + # + # source://rdoc//lib/rdoc/task.rb#147 + def options; end + + # Additional list of options to be passed rdoc. (default is []) + # + # source://rdoc//lib/rdoc/task.rb#147 + def options=(_arg0); end + + # Name of directory to receive the html output files. (default is "html") + # + # source://rdoc//lib/rdoc/task.rb#115 + def rdoc_dir; end + + # Name of directory to receive the html output files. (default is "html") + # + # source://rdoc//lib/rdoc/task.rb#115 + def rdoc_dir=(_arg0); end + + # List of files to be included in the rdoc generation. (default is []) + # + # source://rdoc//lib/rdoc/task.rb#142 + def rdoc_files; end + + # List of files to be included in the rdoc generation. (default is []) + # + # source://rdoc//lib/rdoc/task.rb#142 + def rdoc_files=(_arg0); end + + # Task description for the rdoc task or its renamed equivalent + # + # source://rdoc//lib/rdoc/task.rb#295 + def rdoc_task_description; end + + # Task description for the rerdoc task or its renamed description + # + # source://rdoc//lib/rdoc/task.rb#302 + def rerdoc_task_description; end + + # Name of template to be used by rdoc. (defaults to rdoc's default) + # + # source://rdoc//lib/rdoc/task.rb#131 + def template; end + + # Name of template to be used by rdoc. (defaults to rdoc's default) + # + # source://rdoc//lib/rdoc/task.rb#131 + def template=(_arg0); end + + # Title of RDoc documentation. (defaults to rdoc's default) + # + # source://rdoc//lib/rdoc/task.rb#120 + def title; end + + # Title of RDoc documentation. (defaults to rdoc's default) + # + # source://rdoc//lib/rdoc/task.rb#120 + def title=(_arg0); end + + private + + # source://rdoc//lib/rdoc/task.rb#326 + def clobber_task_name; end + + # source://rdoc//lib/rdoc/task.rb#340 + def coverage_task_name; end + + # source://rdoc//lib/rdoc/task.rb#315 + def rdoc_target; end + + # source://rdoc//lib/rdoc/task.rb#319 + def rdoc_task_name; end + + # source://rdoc//lib/rdoc/task.rb#333 + def rerdoc_task_name; end +end + +# Methods for manipulating comment text +# +# source://rdoc//lib/rdoc/text.rb#11 +module RDoc::Text + # Expands tab characters in +text+ to eight spaces + # + # source://rdoc//lib/rdoc/text.rb#63 + def expand_tabs(text); end + + # Flush +text+ left based on the shortest line + # + # source://rdoc//lib/rdoc/text.rb#82 + def flush_left(text); end + + # The language for this text. This affects stripping comments + # markers. + # + # source://rdoc//lib/rdoc/text.rb#17 + def language; end + + # The language for this text. This affects stripping comments + # markers. + # + # source://rdoc//lib/rdoc/text.rb#17 + def language=(_arg0); end + + # Convert a string in markup format into HTML. + # + # Requires the including class to implement #formatter + # + # source://rdoc//lib/rdoc/text.rb#101 + def markup(text); end + + # Strips hashes, expands tabs then flushes +text+ to the left + # + # source://rdoc//lib/rdoc/text.rb#117 + def normalize_comment(text); end + + # Normalizes +text+ then builds a RDoc::Markup::Document from it + # + # source://rdoc//lib/rdoc/text.rb#135 + def parse(text, format = T.unsafe(nil)); end + + # The first +limit+ characters of +text+ as HTML + # + # source://rdoc//lib/rdoc/text.rb#149 + def snippet(text, limit = T.unsafe(nil)); end + + # Strips leading # characters from +text+ + # + # source://rdoc//lib/rdoc/text.rb#158 + def strip_hashes(text); end + + # Strips leading and trailing \n characters from +text+ + # + # source://rdoc//lib/rdoc/text.rb#170 + def strip_newlines(text); end + + # Strips /* */ style comments + # + # source://rdoc//lib/rdoc/text.rb#177 + def strip_stars(text); end + + # source://rdoc//lib/rdoc/text.rb#200 + def to_html(text); end + + # Wraps +txt+ to +line_len+ + # + # source://rdoc//lib/rdoc/text.rb#287 + def wrap(txt, line_len = T.unsafe(nil)); end + + class << self + # Transcodes +character+ to +encoding+ with a +fallback+ character. + # + # source://rdoc//lib/rdoc/text.rb#55 + def encode_fallback(character, encoding, fallback); end + end +end + +# Character class to be separated by a space when concatenating +# lines. +# +# source://rdoc//lib/rdoc/text.rb#320 +RDoc::Text::SPACE_SEPARATED_LETTER_CLASS = T.let(T.unsafe(nil), Regexp) + +# A TokenStream is a list of tokens, gathered during the parse of some entity +# (say a method). Entities populate these streams by being registered with the +# lexer. Any class can collect tokens by including TokenStream. From the +# outside, you use such an object by calling the start_collecting_tokens +# method, followed by calls to add_token and pop_token. +# +# source://rdoc//lib/rdoc/token_stream.rb#9 +module RDoc::TokenStream + # Adds one +token+ to the collected tokens + # + # source://rdoc//lib/rdoc/token_stream.rb#84 + def add_token(token); end + + # Adds +tokens+ to the collected tokens + # + # source://rdoc//lib/rdoc/token_stream.rb#77 + def add_tokens(tokens); end + + # Starts collecting tokens + # + # source://rdoc//lib/rdoc/token_stream.rb#91 + def collect_tokens; end + + # Remove the last token from the collected tokens + # + # source://rdoc//lib/rdoc/token_stream.rb#100 + def pop_token; end + + # Starts collecting tokens + # + # source://rdoc//lib/rdoc/token_stream.rb#91 + def start_collecting_tokens; end + + # Current token stream + # + # source://rdoc//lib/rdoc/token_stream.rb#107 + def token_stream; end + + # Returns a string representation of the token stream + # + # source://rdoc//lib/rdoc/token_stream.rb#114 + def tokens_to_s; end + + class << self + # Converts +token_stream+ to HTML wrapping various tokens with + # elements. Some tokens types are wrapped in spans + # with the given class names. Other token types are not wrapped in spans. + # + # source://rdoc//lib/rdoc/token_stream.rb#16 + def to_html(token_stream); end + end +end + +# A parser for TomDoc based on TomDoc 1.0.0-rc1 (02adef9b5a) +# +# The TomDoc specification can be found at: +# +# http://tomdoc.org +# +# The latest version of the TomDoc specification can be found at: +# +# https://github.com/mojombo/tomdoc/blob/master/tomdoc.md +# +# To choose TomDoc as your only default format see RDoc::Options@Saved+Options +# for instructions on setting up a .rdoc_options file to store +# your project default. +# +# There are a few differences between this parser and the specification. A +# best-effort was made to follow the specification as closely as possible but +# some choices to deviate were made. +# +# A future version of RDoc will warn when a MUST or MUST NOT is violated and +# may warn when a SHOULD or SHOULD NOT is violated. RDoc will always try +# to emit documentation even if given invalid TomDoc. +# +# Here are some implementation choices this parser currently makes: +# +# This parser allows rdoc-style inline markup but you should not depended on +# it. +# +# This parser allows a space between the comment and the method body. +# +# This parser does not require the default value to be described for an +# optional argument. +# +# This parser does not examine the order of sections. An Examples section may +# precede the Arguments section. +# +# This class is documented in TomDoc format. Since this is a subclass of the +# RDoc markup parser there isn't much to see here, unfortunately. +# +# source://rdoc//lib/rdoc/tom_doc.rb#42 +class RDoc::TomDoc < ::RDoc::Markup::Parser + # Public: Creates a new TomDoc parser. See also RDoc::Markup::parse + # + # @return [TomDoc] a new instance of TomDoc + # + # source://rdoc//lib/rdoc/tom_doc.rb#130 + def initialize; end + + # Internal: Builds a heading from the token stream + # + # level - The level of heading to create + # + # Returns an RDoc::Markup::Heading + # + # source://rdoc//lib/rdoc/tom_doc.rb#143 + def build_heading(level); end + + # Internal: Builds a paragraph from the token stream + # + # margin - Unused + # + # Returns an RDoc::Markup::Paragraph. + # + # source://rdoc//lib/rdoc/tom_doc.rb#173 + def build_paragraph(margin); end + + # Internal: Builds a verbatim from the token stream. A verbatim in the + # Examples section will be marked as in Ruby format. + # + # margin - The indentation from the margin for lines that belong to this + # verbatim section. + # + # Returns an RDoc::Markup::Verbatim + # + # source://rdoc//lib/rdoc/tom_doc.rb#159 + def build_verbatim(margin); end + + # Detects a section change to "Returns" and adds a heading + # + # source://rdoc//lib/rdoc/tom_doc.rb#213 + def parse_text(parent, indent); end + + # Internal: Turns text into an Array of tokens + # + # text - A String containing TomDoc-format text. + # + # Returns self. + # + # source://rdoc//lib/rdoc/tom_doc.rb#231 + def tokenize(text); end + + # Internal: Token accessor + # + # source://rdoc//lib/rdoc/tom_doc.rb#46 + def tokens; end + + class << self + # Internal: Adds a post-processor which sets the RDoc section based on the + # comment's status. + # + # Returns nothing. + # + # source://rdoc//lib/rdoc/tom_doc.rb#53 + def add_post_processor; end + + # Public: Parses TomDoc from text + # + # text - A String containing TomDoc-format text. + # + # Examples + # + # RDoc::TomDoc.parse <<-TOMDOC + # This method does some things + # + # Returns nothing. + # TOMDOC + # # => # + # + # Returns an RDoc::Markup::Document representing the TomDoc format. + # + # source://rdoc//lib/rdoc/tom_doc.rb#84 + def parse(text); end + + # Internal: Extracts the Signature section's method signature + # + # comment - An RDoc::Comment that will be parsed and have the signature + # extracted + # + # Returns a String containing the signature and nil if not + # + # source://rdoc//lib/rdoc/tom_doc.rb#100 + def signature(comment); end + end +end + +# A TopLevel context is a representation of the contents of a single file +# +# source://rdoc//lib/rdoc/top_level.rb#5 +class RDoc::TopLevel < ::RDoc::Context + # Creates a new TopLevel for the file at +absolute_name+. If documentation + # is being generated outside the source dir +relative_name+ is relative to + # the source directory. + # + # @return [TopLevel] a new instance of TopLevel + # + # source://rdoc//lib/rdoc/top_level.rb#43 + def initialize(absolute_name, relative_name = T.unsafe(nil)); end + + # An RDoc::TopLevel is equal to another with the same relative_name + # + # source://rdoc//lib/rdoc/top_level.rb#67 + def ==(other); end + + # Absolute name of this file + # + # source://rdoc//lib/rdoc/top_level.rb#22 + def absolute_name; end + + # Absolute name of this file + # + # source://rdoc//lib/rdoc/top_level.rb#22 + def absolute_name=(_arg0); end + + # Adds +an_alias+ to +Object+ instead of +self+. + # + # source://rdoc//lib/rdoc/top_level.rb#76 + def add_alias(an_alias); end + + # Adds +constant+ to +Object+ instead of +self+. + # + # source://rdoc//lib/rdoc/top_level.rb#85 + def add_constant(constant); end + + # Adds +include+ to +Object+ instead of +self+. + # + # source://rdoc//lib/rdoc/top_level.rb#94 + def add_include(include); end + + # Adds +method+ to +Object+ instead of +self+. + # + # source://rdoc//lib/rdoc/top_level.rb#103 + def add_method(method); end + + # Adds class or module +mod+. Used in the building phase + # by the Ruby parser. + # + # source://rdoc//lib/rdoc/top_level.rb#113 + def add_to_classes_or_modules(mod); end + + # Base name of this file + # + # source://rdoc//lib/rdoc/top_level.rb#120 + def base_name; end + + # All the classes or modules that were declared in + # this file. These are assigned to either +#classes_hash+ + # or +#modules_hash+ once we know what they really are. + # + # source://rdoc//lib/rdoc/top_level.rb#29 + def classes_or_modules; end + + # Returns a URL for this source file on some web repository. Use the -W + # command line option to set. + # + # source://rdoc//lib/rdoc/generator/markup.rb#149 + def cvs_url; end + + # source://rdoc//lib/rdoc/top_level.rb#31 + def diagram; end + + # source://rdoc//lib/rdoc/top_level.rb#31 + def diagram=(_arg0); end + + # Only a TopLevel that contains text file) will be displayed. See also + # RDoc::CodeObject#display? + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/top_level.rb#130 + def display?; end + + # An RDoc::TopLevel is equal to another with the same relative_name + # + # source://rdoc//lib/rdoc/top_level.rb#67 + def eql?(other); end + + # This TopLevel's File::Stat struct + # + # source://rdoc//lib/rdoc/top_level.rb#12 + def file_stat; end + + # This TopLevel's File::Stat struct + # + # source://rdoc//lib/rdoc/top_level.rb#12 + def file_stat=(_arg0); end + + # See RDoc::TopLevel::find_class_or_module + # -- + # TODO Why do we search through all classes/modules found, not just the + # ones of this instance? + # + # source://rdoc//lib/rdoc/top_level.rb#140 + def find_class_or_module(name); end + + # Finds a class or module named +symbol+ + # + # source://rdoc//lib/rdoc/top_level.rb#147 + def find_local_symbol(symbol); end + + # Finds a module or class with +name+ + # + # source://rdoc//lib/rdoc/top_level.rb#154 + def find_module_named(name); end + + # Returns the relative name of this file + # + # source://rdoc//lib/rdoc/top_level.rb#161 + def full_name; end + + # An RDoc::TopLevel has the same hash as another with the same + # relative_name + # + # source://rdoc//lib/rdoc/top_level.rb#169 + def hash; end + + # URL for this with a +prefix+ + # + # source://rdoc//lib/rdoc/top_level.rb#176 + def http_url(prefix); end + + # source://rdoc//lib/rdoc/top_level.rb#182 + def inspect; end + + # Time this file was last modified, if known + # + # source://rdoc//lib/rdoc/top_level.rb#194 + def last_modified; end + + # Dumps this TopLevel for use by ri. See also #marshal_load + # + # source://rdoc//lib/rdoc/top_level.rb#201 + def marshal_dump; end + + # Loads this TopLevel from +array+. + # + # source://rdoc//lib/rdoc/top_level.rb#213 + def marshal_load(array); end + + # Base name of this file + # + # source://rdoc//lib/rdoc/top_level.rb#120 + def name; end + + # Returns the NormalClass "Object", creating it if not found. + # + # Records +self+ as a location in "Object". + # + # source://rdoc//lib/rdoc/top_level.rb#227 + def object_class; end + + # Base name of this file without the extension + # + # source://rdoc//lib/rdoc/top_level.rb#238 + def page_name; end + + # The parser class that processed this file + # + # source://rdoc//lib/rdoc/top_level.rb#36 + def parser; end + + # Sets the parser for this toplevel context, also the store. + # + # source://rdoc//lib/rdoc/top_level.rb#58 + def parser=(val); end + + # Path to this file for use with HTML generator output. + # + # source://rdoc//lib/rdoc/top_level.rb#248 + def path; end + + # source://rdoc//lib/rdoc/top_level.rb#252 + def pretty_print(q); end + + # Relative name of this file + # + # source://rdoc//lib/rdoc/top_level.rb#17 + def relative_name; end + + # Relative name of this file + # + # source://rdoc//lib/rdoc/top_level.rb#17 + def relative_name=(_arg0); end + + # Search record used by RDoc::Generator::JsonIndex + # + # source://rdoc//lib/rdoc/top_level.rb#266 + def search_record; end + + # Is this TopLevel from a text file instead of a source code file? + # + # @return [Boolean] + # + # source://rdoc//lib/rdoc/top_level.rb#283 + def text?; end + + # source://rdoc//lib/rdoc/top_level.rb#287 + def to_s; end +end + +# :stopdoc: +# +# source://rdoc//lib/rdoc/task.rb#347 +module Rake + extend ::FileUtils::StreamUtils_ + extend ::FileUtils +end + +# For backwards compatibility +# +# source://rdoc//lib/rdoc/task.rb#352 +Rake::RDocTask = RDoc::Task diff --git a/sorbet/rbi/gems/reline@0.4.2.rbi b/sorbet/rbi/gems/reline@0.4.2.rbi new file mode 100644 index 00000000000..b8c01d40ef3 --- /dev/null +++ b/sorbet/rbi/gems/reline@0.4.2.rbi @@ -0,0 +1,8 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `reline` gem. +# Please instead update this file by running `bin/tapioca gem reline`. + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/rspec-core@3.12.2.rbi b/sorbet/rbi/gems/rspec-core@3.12.2.rbi new file mode 100644 index 00000000000..c36e8c3c710 --- /dev/null +++ b/sorbet/rbi/gems/rspec-core@3.12.2.rbi @@ -0,0 +1,10793 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rspec-core` gem. +# Please instead update this file by running `bin/tapioca gem rspec-core`. + +# Namespace for all core RSpec code. +# +# source://rspec-core//lib/rspec/core/version.rb#1 +module RSpec + extend ::RSpec::Core::Warnings + + class << self + # Used to ensure examples get reloaded between multiple runs in the same + # process and ensures user configuration is persisted. + # + # Users must invoke this if they want to clear all examples but preserve + # current configuration when they use the runner multiple times within the + # same process. + # + # source://rspec-core//lib/rspec/core.rb#70 + def clear_examples; end + + # Returns the global [Configuration](RSpec/Core/Configuration) object. While + # you _can_ use this method to access the configuration, the more common + # convention is to use [RSpec.configure](RSpec#configure-class_method). + # + # @example + # RSpec.configuration.drb_port = 1234 + # @see RSpec.configure + # @see Core::Configuration + # + # source://rspec-core//lib/rspec/core.rb#85 + def configuration; end + + # Setters for shared global objects + # + # @api private + # + # source://rspec-core//lib/rspec/core.rb#49 + def configuration=(_arg0); end + + # Yields the global configuration to a block. + # + # @example + # RSpec.configure do |config| + # config.add_formatter 'documentation' + # end + # @see Core::Configuration + # @yield [Configuration] global configuration + # + # source://rspec-core//lib/rspec/core.rb#97 + def configure; end + + # @private + # + # source://rspec-core//lib/rspec/core.rb#194 + def const_missing(name); end + + # source://rspec-core//lib/rspec/core/dsl.rb#42 + def context(*args, &example_group_block); end + + # The example being executed. + # + # The primary audience for this method is library authors who need access + # to the example currently being executed and also want to support all + # versions of RSpec 2 and 3. + # + # @example + # + # RSpec.configure do |c| + # # context.example is deprecated, but RSpec.current_example is not + # # available until RSpec 3.0. + # fetch_current_example = RSpec.respond_to?(:current_example) ? + # proc { RSpec.current_example } : proc { |context| context.example } + # + # c.before(:example) do + # example = fetch_current_example.call(self) + # + # # ... + # end + # end + # + # source://rspec-core//lib/rspec/core.rb#122 + def current_example; end + + # Set the current example being executed. + # + # @api private + # + # source://rspec-core//lib/rspec/core.rb#128 + def current_example=(example); end + + # Get the current RSpec execution scope + # + # Returns (in order of lifecycle): + # * `:suite` as an initial value, this is outside of the test lifecycle. + # * `:before_suite_hook` during `before(:suite)` hooks. + # * `:before_context_hook` during `before(:context)` hooks. + # * `:before_example_hook` during `before(:example)` hooks and `around(:example)` before `example.run`. + # * `:example` within the example run. + # * `:after_example_hook` during `after(:example)` hooks and `around(:example)` after `example.run`. + # * `:after_context_hook` during `after(:context)` hooks. + # * `:after_suite_hook` during `after(:suite)` hooks. + # * `:suite` as a final value, again this is outside of the test lifecycle. + # + # Reminder, `:context` hooks have `:all` alias and `:example` hooks have `:each` alias. + # + # @return [Symbol] + # + # source://rspec-core//lib/rspec/core.rb#154 + def current_scope; end + + # Set the current scope rspec is executing in + # + # @api private + # + # source://rspec-core//lib/rspec/core.rb#134 + def current_scope=(scope); end + + # source://rspec-core//lib/rspec/core/dsl.rb#42 + def describe(*args, &example_group_block); end + + # source://rspec-core//lib/rspec/core/dsl.rb#42 + def example_group(*args, &example_group_block); end + + # source://rspec-core//lib/rspec/core/dsl.rb#42 + def fcontext(*args, &example_group_block); end + + # source://rspec-core//lib/rspec/core/dsl.rb#42 + def fdescribe(*args, &example_group_block); end + + # Used to ensure examples get reloaded and user configuration gets reset to + # defaults between multiple runs in the same process. + # + # Users must invoke this if they want to have the configuration reset when + # they use the runner multiple times within the same process. Users must deal + # themselves with re-configuration of RSpec before run. + # + # source://rspec-core//lib/rspec/core.rb#58 + def reset; end + + # source://rspec-core//lib/rspec/core/shared_example_group.rb#110 + def shared_context(name, *args, &block); end + + # source://rspec-core//lib/rspec/core/shared_example_group.rb#110 + def shared_examples(name, *args, &block); end + + # source://rspec-core//lib/rspec/core/shared_example_group.rb#110 + def shared_examples_for(name, *args, &block); end + + # Internal container for global non-configuration data. + # + # @private + # + # source://rspec-core//lib/rspec/core.rb#160 + def world; end + + # Setters for shared global objects + # + # @api private + # + # source://rspec-core//lib/rspec/core.rb#49 + def world=(_arg0); end + + # source://rspec-core//lib/rspec/core/dsl.rb#42 + def xcontext(*args, &example_group_block); end + + # source://rspec-core//lib/rspec/core/dsl.rb#42 + def xdescribe(*args, &example_group_block); end + end +end + +# Namespace for the rspec-core code. +# +# source://rspec-core//lib/rspec/core/version.rb#2 +module RSpec::Core + class << self + # @private path to executable file. + # + # source://rspec-core//lib/rspec/core.rb#181 + def path_to_executable; end + end +end + +# Unnamed example group used by `SuiteHookContext`. +# +# @private +# +# source://rspec-core//lib/rspec/core/example_group.rb#775 +class RSpec::Core::AnonymousExampleGroup < ::RSpec::Core::ExampleGroup + class << self + # source://rspec-core//lib/rspec/core/example_group.rb#776 + def metadata; end + end +end + +# @private +# +# source://rspec-core//lib/rspec/core/backtrace_formatter.rb#4 +class RSpec::Core::BacktraceFormatter + # @return [BacktraceFormatter] a new instance of BacktraceFormatter + # + # source://rspec-core//lib/rspec/core/backtrace_formatter.rb#8 + def initialize; end + + # source://rspec-core//lib/rspec/core/backtrace_formatter.rb#49 + def backtrace_line(line); end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/backtrace_formatter.rb#53 + def exclude?(line); end + + # @private + # + # source://rspec-core//lib/rspec/core/backtrace_formatter.rb#6 + def exclusion_patterns; end + + # @private + # + # source://rspec-core//lib/rspec/core/backtrace_formatter.rb#6 + def exclusion_patterns=(_arg0); end + + # source://rspec-core//lib/rspec/core/backtrace_formatter.rb#28 + def filter_gem(gem_name); end + + # source://rspec-core//lib/rspec/core/backtrace_formatter.rb#33 + def format_backtrace(backtrace, options = T.unsafe(nil)); end + + # Sets the attribute full_backtrace + # + # @param value the value to set the attribute full_backtrace to. + # + # source://rspec-core//lib/rspec/core/backtrace_formatter.rb#22 + def full_backtrace=(_arg0); end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/backtrace_formatter.rb#24 + def full_backtrace?; end + + # @private + # + # source://rspec-core//lib/rspec/core/backtrace_formatter.rb#6 + def inclusion_patterns; end + + # @private + # + # source://rspec-core//lib/rspec/core/backtrace_formatter.rb#6 + def inclusion_patterns=(_arg0); end + + private + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/backtrace_formatter.rb#60 + def matches?(patterns, line); end +end + +# @private +# +# source://rspec-core//lib/rspec/core/bisect/utilities.rb#3 +module RSpec::Core::Bisect; end + +# @private +# +# source://rspec-core//lib/rspec/core/bisect/utilities.rb#8 +class RSpec::Core::Bisect::BisectFailedError < ::StandardError + class << self + # source://rspec-core//lib/rspec/core/bisect/utilities.rb#9 + def for_failed_spec_run(spec_output); end + end +end + +# Wraps a pipe to support sending objects between a child and +# parent process. Where supported, encoding is explicitly +# set to ensure binary data is able to pass from child to +# parent. +# +# @private +# +# source://rspec-core//lib/rspec/core/bisect/utilities.rb#36 +class RSpec::Core::Bisect::Channel + # @return [Channel] a new instance of Channel + # + # source://rspec-core//lib/rspec/core/bisect/utilities.rb#41 + def initialize; end + + # source://rspec-core//lib/rspec/core/bisect/utilities.rb#62 + def close; end + + # source://rspec-core//lib/rspec/core/bisect/utilities.rb#56 + def receive; end + + # source://rspec-core//lib/rspec/core/bisect/utilities.rb#50 + def send(message); end +end + +# source://rspec-core//lib/rspec/core/bisect/utilities.rb#38 +RSpec::Core::Bisect::Channel::MARSHAL_DUMP_ENCODING = T.let(T.unsafe(nil), Encoding) + +# @private +# +# source://rspec-core//lib/rspec/core/bisect/utilities.rb#5 +class RSpec::Core::Bisect::ExampleSetDescriptor < ::Struct + # Returns the value of attribute all_example_ids + # + # @return [Object] the current value of all_example_ids + def all_example_ids; end + + # Sets the attribute all_example_ids + # + # @param value [Object] the value to set the attribute all_example_ids to. + # @return [Object] the newly set value + def all_example_ids=(_); end + + # Returns the value of attribute failed_example_ids + # + # @return [Object] the current value of failed_example_ids + def failed_example_ids; end + + # Sets the attribute failed_example_ids + # + # @param value [Object] the value to set the attribute failed_example_ids to. + # @return [Object] the newly set value + def failed_example_ids=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# Wraps a `formatter` providing a simple means to notify it in place +# of an `RSpec::Core::Reporter`, without involving configuration in +# any way. +# +# @private +# +# source://rspec-core//lib/rspec/core/bisect/utilities.rb#19 +class RSpec::Core::Bisect::Notifier + # @return [Notifier] a new instance of Notifier + # + # source://rspec-core//lib/rspec/core/bisect/utilities.rb#20 + def initialize(formatter); end + + # source://rspec-core//lib/rspec/core/bisect/utilities.rb#24 + def publish(event, *args); end +end + +# Stores runtime configuration information. +# +# Configuration options are loaded from multiple files and joined together +# with command-line switches and the `SPEC_OPTS` environment variable. +# +# Precedence order (where later entries overwrite earlier entries on +# conflicts): +# +# * Global (`$XDG_CONFIG_HOME/rspec/options`, or `~/.rspec` if it does +# not exist) +# * Project-specific (`./.rspec`) +# * Local (`./.rspec-local`) +# * Command-line options +# * `SPEC_OPTS` +# +# For example, an option set in the local file will override an option set +# in your global file. +# +# The global, project-specific and local files can all be overridden with a +# separate custom file using the --options command-line parameter. +# +# @example Standard settings +# RSpec.configure do |c| +# c.drb = true +# c.drb_port = 1234 +# c.default_path = 'behavior' +# end +# @example Hooks +# RSpec.configure do |c| +# c.before(:suite) { establish_connection } +# c.before(:example) { log_in_as :authorized } +# c.around(:example) { |ex| Database.transaction(&ex) } +# end +# @see RSpec.configure +# @see Hooks +# +# source://rspec-core//lib/rspec/core/configuration.rb#47 +class RSpec::Core::Configuration + include ::RSpec::Core::Hooks + include ::RSpec::Core::Configuration::Readers + + # Build an object to store runtime configuration options and set defaults + # + # @return [Configuration] a new instance of Configuration + # + # source://rspec-core//lib/rspec/core/configuration.rb#509 + def initialize; end + + # Adds a formatter to the set RSpec will use for this run. + # + # @overload add_formatter + # @overload add_formatter + # @param formatter [Class, String, Object] formatter to use. Can be any of the + # string values supported from the CLI (`p`/`progress`, + # `d`/`doc`/`documentation`, `h`/`html`, or `j`/`json`), any + # class that implements the formatter protocol and has registered + # itself with RSpec as a formatter, or a formatter instance. + # @param output [String, IO] where the formatter will write its output. + # Can be an IO object or a string path to a file. If not provided, + # the configured `output_stream` (`$stdout`, by default) will be used. + # @see RSpec::Core::Formatters::Protocol + # + # source://rspec-core//lib/rspec/core/configuration.rb#975 + def add_formatter(formatter, output = T.unsafe(nil)); end + + # Adds a custom setting to the RSpec.configuration object. + # + # RSpec.configuration.add_setting :foo + # + # Used internally and by extension frameworks like rspec-rails, so they + # can add config settings that are domain specific. For example: + # + # RSpec.configure do |c| + # c.add_setting :use_transactional_fixtures, + # :default => true, + # :alias_with => :use_transactional_examples + # end + # + # `add_setting` creates three methods on the configuration object, a + # setter, a getter, and a predicate: + # + # RSpec.configuration.foo=(value) + # RSpec.configuration.foo + # RSpec.configuration.foo? # Returns true if foo returns anything but nil or false. + # + # @option opts + # @option opts + # @overload add_setting + # @overload add_setting + # @param opts [Hash] a customizable set of options + # + # source://rspec-core//lib/rspec/core/configuration.rb#638 + def add_setting(name, opts = T.unsafe(nil)); end + + # Defines a `after` hook. See {Hooks#after} for full docs. + # + # This method differs from {Hooks#after} in only one way: it supports + # the `:suite` scope. Hooks with the `:suite` scope will be run once after + # the last example of the entire suite is executed. Conditions passed along + # with `:suite` are effectively ignored. + # + # @see #append_after + # @see #before + # @see #prepend_before + # + # source://rspec-core//lib/rspec/core/configuration.rb#2004 + def after(scope = T.unsafe(nil), *meta, &block); end + + # Creates a method that defines an example group with the provided + # metadata. Can be used to define example group/metadata shortcuts. + # + # @example + # RSpec.configure do |config| + # config.alias_example_group_to :describe_model, :type => :model + # end + # + # shared_context_for "model tests", :type => :model do + # # define common model test helper methods, `let` declarations, etc + # end + # + # # This lets you do this: + # + # RSpec.describe_model User do + # end + # + # # ... which is the equivalent of + # + # RSpec.describe User, :type => :model do + # end + # @note The defined aliased will also be added to the top level + # (e.g. `main` and from within modules) if + # `expose_dsl_globally` is set to true. + # @see #alias_example_to + # @see #expose_dsl_globally= + # + # source://rspec-core//lib/rspec/core/configuration.rb#1188 + def alias_example_group_to(new_name, *args); end + + # Creates a method that delegates to `example` including the submitted + # `args`. Used internally to add variants of `example` like `pending`: + # + # @example + # RSpec.configure do |config| + # config.alias_example_to :pending, :pending => true + # end + # + # # This lets you do this: + # + # RSpec.describe Thing do + # pending "does something" do + # thing = Thing.new + # end + # end + # + # # ... which is the equivalent of + # + # RSpec.describe Thing do + # it "does something", :pending => true do + # thing = Thing.new + # end + # end + # @note The specific example alias below (`pending`) is already + # defined for you. + # @note Use with caution. This extends the language used in your + # specs, but does not add any additional documentation. We use this + # in RSpec to define methods like `focus` and `xit`, but we also add + # docs for those methods. + # @param name [String] example name alias + # @param args [Array, Hash] metadata for the generated example + # + # source://rspec-core//lib/rspec/core/configuration.rb#1156 + def alias_example_to(name, *args); end + + # Define an alias for it_should_behave_like that allows different + # language (like "it_has_behavior" or "it_behaves_like") to be + # employed when including shared examples. + # + # @example + # RSpec.configure do |config| + # config.alias_it_behaves_like_to(:it_has_behavior, 'has behavior:') + # end + # + # # allows the user to include a shared example group like: + # + # RSpec.describe Entity do + # it_has_behavior 'sortability' do + # let(:sortable) { Entity.new } + # end + # end + # + # # which is reported in the output as: + # # Entity + # # has behavior: sortability + # # ...sortability examples here + # @note Use with caution. This extends the language used in your + # specs, but does not add any additional documentation. We use this + # in RSpec to define `it_should_behave_like` (for backward + # compatibility), but we also add docs for that method. + # + # source://rspec-core//lib/rspec/core/configuration.rb#1219 + def alias_it_behaves_like_to(new_name, report_label = T.unsafe(nil)); end + + # Define an alias for it_should_behave_like that allows different + # language (like "it_has_behavior" or "it_behaves_like") to be + # employed when including shared examples. + # + # @example + # RSpec.configure do |config| + # config.alias_it_behaves_like_to(:it_has_behavior, 'has behavior:') + # end + # + # # allows the user to include a shared example group like: + # + # RSpec.describe Entity do + # it_has_behavior 'sortability' do + # let(:sortable) { Entity.new } + # end + # end + # + # # which is reported in the output as: + # # Entity + # # has behavior: sortability + # # ...sortability examples here + # @note Use with caution. This extends the language used in your + # specs, but does not add any additional documentation. We use this + # in RSpec to define `it_should_behave_like` (for backward + # compatibility), but we also add docs for that method. + # + # source://rspec-core//lib/rspec/core/configuration.rb#1219 + def alias_it_should_behave_like_to(new_name, report_label = T.unsafe(nil)); end + + # Adds `block` to the end of the list of `after` blocks in the same + # scope (`:example`, `:context`, or `:suite`), in contrast to {#after}, + # which adds the hook to the start of the list. + # + # See {Hooks#after} for full `after` hook docs. + # + # This method differs from {Hooks#append_after} in only one way: it supports + # the `:suite` scope. Hooks with the `:suite` scope will be run once after + # the last example of the entire suite is executed. Conditions passed along + # with `:suite` are effectively ignored. + # + # @see #append_after + # @see #before + # @see #prepend_before + # + # source://rspec-core//lib/rspec/core/configuration.rb#2034 + def append_after(scope = T.unsafe(nil), *meta, &block); end + + # Defines a `before` hook. See {Hooks#before} for full docs. + # + # This method differs from {Hooks#before} in only one way: it supports + # the `:suite` scope. Hooks with the `:suite` scope will be run once before + # the first example of the entire suite is executed. Conditions passed along + # with `:suite` are effectively ignored. + # + # @see #prepend_before + # @see #after + # @see #append_after + # + # source://rspec-core//lib/rspec/core/configuration.rb#1949 + def append_before(scope = T.unsafe(nil), *meta, &block); end + + # @private + # @raise [SystemStackError] + # + # source://rspec-core//lib/rspec/core/configuration.rb#1914 + def apply_derived_metadata_to(metadata); end + + # Registers `block` as an `around` hook. + # + # See {Hooks#around} for full `around` hook docs. + # + # source://rspec-core//lib/rspec/core/configuration.rb#2052 + def around(scope = T.unsafe(nil), *meta, &block); end + + # Regexps used to exclude lines from backtraces. + # + # Excludes lines from ruby (and jruby) source, installed gems, anything + # in any "bin" directory, and any of the RSpec libs (outside gem + # installs) by default. + # + # You can modify the list via the getter, or replace it with the setter. + # + # To override this behaviour and display a full backtrace, use + # `--backtrace` on the command line, in a `.rspec` file, or in the + # `rspec_options` attribute of RSpec's rake task. + # + # @return [Array] + # + # source://rspec-core//lib/rspec/core/configuration.rb#676 + def backtrace_exclusion_patterns; end + + # Set regular expressions used to exclude lines in backtrace. + # + # @param patterns [Array] set backtrace_formatter exclusion_patterns + # + # source://rspec-core//lib/rspec/core/configuration.rb#682 + def backtrace_exclusion_patterns=(patterns); end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#503 + def backtrace_formatter; end + + # Regexps used to include lines in backtraces. + # + # Defaults to [Regexp.new Dir.getwd]. + # + # Lines that match an exclusion _and_ an inclusion pattern + # will be included. + # + # You can modify the list via the getter, or replace it with the setter. + # + # @return [Array] + # + # source://rspec-core//lib/rspec/core/configuration.rb#695 + def backtrace_inclusion_patterns; end + + # Set regular expressions used to include lines in backtrace. + # + # @attr patterns [Array] set backtrace_formatter inclusion_patterns + # + # source://rspec-core//lib/rspec/core/configuration.rb#701 + def backtrace_inclusion_patterns=(patterns); end + + # Defines a `before` hook. See {Hooks#before} for full docs. + # + # This method differs from {Hooks#before} in only one way: it supports + # the `:suite` scope. Hooks with the `:suite` scope will be run once before + # the first example of the entire suite is executed. Conditions passed along + # with `:suite` are effectively ignored. + # + # @see #prepend_before + # @see #after + # @see #append_after + # + # source://rspec-core//lib/rspec/core/configuration.rb#1949 + def before(scope = T.unsafe(nil), *meta, &block); end + + # Determines which bisect runner implementation gets used to run subsets + # of the suite during a bisection. Your choices are: + # + # - `:shell`: Performs a spec run by shelling out, booting RSpec and your + # application environment each time. This runner is the most widely + # compatible runner, but is not as fast. On platforms that do not + # support forking, this is the default. + # - `:fork`: Pre-boots RSpec and your application environment in a parent + # process, and then forks a child process for each spec run. This runner + # tends to be significantly faster than the `:shell` runner but cannot + # be used in some situations. On platforms that support forking, this + # is the default. If you use this runner, you should ensure that all + # of your one-time setup logic goes in a `before(:suite)` hook instead + # of getting run at the top-level of a file loaded by `--require`. + # + # @note This option will only be used by `--bisect` if you set it in a file + # loaded via `--require`. + # @return [Symbol] + # + # source://rspec-core//lib/rspec/core/configuration.rb#480 + def bisect_runner; end + + # source://rspec-core//lib/rspec/core/configuration.rb#481 + def bisect_runner=(value); end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#2098 + def bisect_runner_class; end + + # Enables color output if the output is a TTY. As of RSpec 3.6, this is + # the default behavior and this option is retained only for backwards + # compatibility. + # + # @deprecated No longer recommended because of complex behavior. Instead, + # rely on the fact that TTYs will display color by default, or set + # {#color_mode} to :on to display color on a non-TTY output. + # @return [Boolean] + # @see color_mode + # @see color_enabled? + # + # source://rspec-core//lib/rspec/core/configuration.rb#901 + def color; end + + # Toggle output color. + # + # @deprecated No longer recommended because of complex behavior. Instead, + # rely on the fact that TTYs will display color by default, or set + # {:color_mode} to :on to display color on a non-TTY output. + # + # source://rspec-core//lib/rspec/core/configuration.rb#939 + def color=(_arg0); end + + # Check if color is enabled for a particular output. + # + # @param output [IO] an output stream to use, defaults to the current + # `output_stream` + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/configuration.rb#922 + def color_enabled?(output = T.unsafe(nil)); end + + # The mode for determining whether to display output in color. One of: + # + # - :automatic - the output will be in color if the output is a TTY (the + # default) + # - :on - the output will be in color, whether or not the output is a TTY + # - :off - the output will not be in color + # + # @return [Boolean] + # @see color_enabled? + # + # source://rspec-core//lib/rspec/core/configuration.rb#914 + def color_mode; end + + # Set the color mode. + # + # source://rspec-core//lib/rspec/core/configuration.rb#932 + def color_mode=(_arg0); end + + # Used internally to extend the singleton class of a single example's + # example group instance with modules using `include` and/or `extend`. + # + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#1556 + def configure_example(example, example_hooks); end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#1596 + def configure_expectation_framework; end + + # Used internally to extend a group with modules using `include`, `prepend` and/or + # `extend`. + # + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#1544 + def configure_group(group); end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#1590 + def configure_mock_framework; end + + # The default output color. Defaults to `:white` but can be set to one of + # the following: `[:black, :white, :red, :green, :yellow, :blue, + # :magenta, :cyan]` + # + # @return [Symbol] + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def default_color; end + + # The default output color. Defaults to `:white` but can be set to one of + # the following: `[:black, :white, :red, :green, :yellow, :blue, + # :magenta, :cyan]` + # + # @return [Symbol] + # + # source://rspec-core//lib/rspec/core/configuration.rb#89 + def default_color=(_arg0); end + + # source://rspec-core//lib/rspec/core/configuration.rb#78 + def default_color?; end + + # The formatter that will be used if no formatter has been set. + # Defaults to 'progress'. + # + # source://rspec-core//lib/rspec/core/configuration.rb#982 + def default_formatter; end + + # Sets a fallback formatter to use if none other has been set. + # + # @example + # + # RSpec.configure do |rspec| + # rspec.default_formatter = 'doc' + # end + # + # source://rspec-core//lib/rspec/core/configuration.rb#993 + def default_formatter=(value); end + + # Path to use if no path is provided to the `rspec` command (default: + # `"spec"`). Allows you to just type `rspec` instead of `rspec spec` to + # run all the examples in the `spec` directory. + # + # @note Other scripts invoking `rspec` indirectly will ignore this + # setting. + # @return [String] + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def default_path; end + + # Path to use if no path is provided to the `rspec` command (default: + # `"spec"`). Allows you to just type `rspec` instead of `rspec spec` to + # run all the examples in the `spec` directory. + # + # @note Other scripts invoking `rspec` indirectly will ignore this + # setting. + # @return [String] + # + # source://rspec-core//lib/rspec/core/configuration.rb#121 + def default_path=(path); end + + # source://rspec-core//lib/rspec/core/configuration.rb#78 + def default_path?; end + + # Defines a callback that can assign derived metadata values. + # + # @example + # RSpec.configure do |config| + # # Tag all groups and examples in the spec/unit directory with + # # :type => :unit + # config.define_derived_metadata(:file_path => %r{/spec/unit/}) do |metadata| + # metadata[:type] = :unit + # end + # end + # @param filters [Array, Hash] metadata filters that determine + # which example or group metadata hashes the callback will be triggered + # for. If none are given, the callback will be run against the metadata + # hashes of all groups and examples. + # @yieldparam metadata [Hash] original metadata hash from an example or + # group. Mutate this in your block as needed. + # + # source://rspec-core//lib/rspec/core/configuration.rb#1873 + def define_derived_metadata(*filters, &block); end + + # Determines where deprecation warnings are printed. + # Defaults to `$stderr`. + # + # @return [IO, String] IO or filename to write to + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def deprecation_stream; end + + # Determines where deprecation warnings are printed. + # + # @param value [IO, String] IO to write to or filename to write to + # + # source://rspec-core//lib/rspec/core/configuration.rb#168 + def deprecation_stream=(value); end + + # Color used to print details. Defaults to `:cyan` but can be set to one + # of the following: `[:black, :white, :red, :green, :yellow, :blue, + # :magenta, :cyan]` + # + # @return [Symbol] + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def detail_color; end + + # Color used to print details. Defaults to `:cyan` but can be set to one + # of the following: `[:black, :white, :red, :green, :yellow, :blue, + # :magenta, :cyan]` + # + # @return [Symbol] + # + # source://rspec-core//lib/rspec/core/configuration.rb#89 + def detail_color=(_arg0); end + + # source://rspec-core//lib/rspec/core/configuration.rb#78 + def detail_color?; end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#1854 + def disable_monkey_patching; end + + # Enables zero monkey patching mode for RSpec. It removes monkey + # patching of the top-level DSL methods (`describe`, + # `shared_examples_for`, etc) onto `main` and `Module`, instead + # requiring you to prefix these methods with `RSpec.`. It enables + # expect-only syntax for rspec-mocks and rspec-expectations. It + # simply disables monkey patching on whatever pieces of RSpec + # the user is using. + # + # @example + # + # # It disables all monkey patching. + # RSpec.configure do |config| + # config.disable_monkey_patching! + # end + # + # # Is an equivalent to + # RSpec.configure do |config| + # config.expose_dsl_globally = false + # + # config.mock_with :rspec do |mocks| + # mocks.syntax = :expect + # mocks.patch_marshal_to_support_partial_doubles = false + # end + # + # config.expect_with :rspec do |expectations| + # expectations.syntax = :expect + # end + # end + # @note It configures rspec-mocks and rspec-expectations only + # if the user is using those (either explicitly or implicitly + # by not setting `mock_with` or `expect_with` to anything else). + # @note If the user uses this options with `mock_with :mocha` + # (or similar) they will still have monkey patching active + # in their test environment from mocha. + # + # source://rspec-core//lib/rspec/core/configuration.rb#1846 + def disable_monkey_patching!; end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#1854 + def disable_monkey_patching=(_arg0); end + + # Run examples over DRb (default: `false`). RSpec doesn't supply the DRb + # server, but you can use tools like spork. + # + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def drb; end + + # Run examples over DRb (default: `false`). RSpec doesn't supply the DRb + # server, but you can use tools like spork. + # + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/configuration.rb#89 + def drb=(_arg0); end + + # source://rspec-core//lib/rspec/core/configuration.rb#78 + def drb?; end + + # The drb_port (default: nil). + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def drb_port; end + + # The drb_port (default: nil). + # + # source://rspec-core//lib/rspec/core/configuration.rb#89 + def drb_port=(_arg0); end + + # source://rspec-core//lib/rspec/core/configuration.rb#78 + def drb_port?; end + + # Prints the formatter output of your suite without running any + # examples or hooks. + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def dry_run; end + + # Prints the formatter output of your suite without running any + # examples or hooks. + # + # source://rspec-core//lib/rspec/core/configuration.rb#89 + def dry_run=(_arg0); end + + # source://rspec-core//lib/rspec/core/configuration.rb#78 + def dry_run?; end + + # The exit code to return if there are any errors outside examples (default: failure_exit_code) + # + # @return [Integer] + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def error_exit_code; end + + # The exit code to return if there are any errors outside examples (default: failure_exit_code) + # + # @return [Integer] + # + # source://rspec-core//lib/rspec/core/configuration.rb#89 + def error_exit_code=(_arg0); end + + # source://rspec-core//lib/rspec/core/configuration.rb#78 + def error_exit_code?; end + + # Default: `$stderr`. + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def error_stream; end + + # Default: `$stderr`. + # + # source://rspec-core//lib/rspec/core/configuration.rb#89 + def error_stream=(_arg0); end + + # source://rspec-core//lib/rspec/core/configuration.rb#78 + def error_stream?; end + + # The file path to use for persisting example statuses. Necessary for the + # `--only-failures` and `--next-failure` CLI options. + # + # @overload example_status_persistence_file_path + # @overload example_status_persistence_file_path= + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def example_status_persistence_file_path; end + + # Sets the file path to use for persisting example statuses. Necessary for the + # `--only-failures` and `--next-failure` CLI options. + # + # source://rspec-core//lib/rspec/core/configuration.rb#192 + def example_status_persistence_file_path=(value); end + + # Exclude files matching this pattern. + # + # @return [String] + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def exclude_pattern; end + + # Set pattern to match files to exclude. + # + # @attr value [String] the filename pattern to exclude spec files by + # + # source://rspec-core//lib/rspec/core/configuration.rb#304 + def exclude_pattern=(value); end + + # Returns the `exclusion_filter`. If none has been set, returns an empty + # hash. + # + # source://rspec-core//lib/rspec/core/configuration.rb#1348 + def exclusion_filter; end + + # Clears and reassigns the `exclusion_filter`. Set to `nil` if you don't + # want any exclusion filter at all. + # + # ### Warning + # + # This overrides any exclusion filters/tags set on the command line or in + # configuration files. + # + # source://rspec-core//lib/rspec/core/configuration.rb#1341 + def exclusion_filter=(filter); end + + # Sets the expectation framework module(s) to be included in each example + # group. + # + # `frameworks` can be `:rspec`, `:test_unit`, `:minitest`, a custom + # module, or any combination thereof: + # + # config.expect_with :rspec + # config.expect_with :test_unit + # config.expect_with :minitest + # config.expect_with :rspec, :minitest + # config.expect_with OtherExpectationFramework + # + # RSpec will translate `:rspec`, `:minitest`, and `:test_unit` into the + # appropriate modules. + # + # ## Configuration + # + # If the module responds to `configuration`, `expect_with` will + # yield the `configuration` object if given a block: + # + # config.expect_with OtherExpectationFramework do |custom_config| + # custom_config.custom_setting = true + # end + # + # source://rspec-core//lib/rspec/core/configuration.rb#837 + def expect_with(*frameworks); end + + # Delegates to expect_with(framework). + # + # source://rspec-core//lib/rspec/core/configuration.rb#810 + def expectation_framework=(framework); end + + # Returns the configured expectation framework adapter module(s) + # + # source://rspec-core//lib/rspec/core/configuration.rb#798 + def expectation_frameworks; end + + # Exposes the current running example via the named + # helper method. RSpec 2.x exposed this via `example`, + # but in RSpec 3.0, the example is instead exposed via + # an arg yielded to `it`, `before`, `let`, etc. However, + # some extension gems (such as Capybara) depend on the + # RSpec 2.x's `example` method, so this config option + # can be used to maintain compatibility. + # + # @example + # + # RSpec.configure do |rspec| + # rspec.expose_current_running_example_as :example + # end + # + # RSpec.describe MyClass do + # before do + # # `example` can be used here because of the above config. + # do_something if example.metadata[:type] == "foo" + # end + # end + # @param method_name [Symbol] the name of the helper method + # + # source://rspec-core//lib/rspec/core/configuration.rb#1784 + def expose_current_running_example_as(method_name); end + + # Use this to expose the core RSpec DSL via `Module` and the `main` + # object. It will be set automatically but you can override it to + # remove the DSL. + # Default: true + # + # source://rspec-core//lib/rspec/core/configuration.rb#151 + def expose_dsl_globally=(value); end + + # Indicates if the DSL has been exposed off of modules and `main`. + # Default: true + # + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/configuration.rb#143 + def expose_dsl_globally?; end + + # Tells RSpec to extend example groups with `mod`. Methods defined in + # `mod` are exposed to example groups (not examples). Use `filters` to + # constrain the groups to extend. + # + # Similar to `include`, but behavior is added to example groups, which + # are classes, rather than the examples, which are instances of those + # classes. + # + # @example + # + # module UiHelpers + # def run_in_browser + # # ... + # end + # end + # + # module PermissionHelpers + # def define_permissions + # # ... + # end + # end + # + # RSpec.configure do |config| + # config.extend(UiHelpers, :type => :request) + # config.extend(PermissionHelpers, :with_permissions, :type => :request) + # end + # + # describe "edit profile", :with_permissions, :type => :request do + # run_in_browser + # define_permissions + # + # it "does stuff in the client" do + # # ... + # end + # end + # @see #include + # @see #prepend + # + # source://rspec-core//lib/rspec/core/configuration.rb#1494 + def extend(mod, *filters); end + + # If specified, indicates the number of failures required before cleaning + # up and exit (default: `nil`). Can also be `true` to fail and exit on first + # failure + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def fail_fast; end + + # @see fail_fast + # + # source://rspec-core//lib/rspec/core/configuration.rb#214 + def fail_fast=(value); end + + # Whether or not to fail when there are no RSpec examples (default: false). + # + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def fail_if_no_examples; end + + # Whether or not to fail when there are no RSpec examples (default: false). + # + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/configuration.rb#89 + def fail_if_no_examples=(_arg0); end + + # source://rspec-core//lib/rspec/core/configuration.rb#78 + def fail_if_no_examples?; end + + # Color to use to indicate failure. Defaults to `:red` but can be set to + # one of the following: `[:black, :white, :red, :green, :yellow, :blue, + # :magenta, :cyan]` + # + # @return [Symbol] + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def failure_color; end + + # Color to use to indicate failure. Defaults to `:red` but can be set to + # one of the following: `[:black, :white, :red, :green, :yellow, :blue, + # :magenta, :cyan]` + # + # @return [Symbol] + # + # source://rspec-core//lib/rspec/core/configuration.rb#89 + def failure_color=(_arg0); end + + # source://rspec-core//lib/rspec/core/configuration.rb#78 + def failure_color?; end + + # The exit code to return if there are any failures (default: 1). + # + # @return [Integer] + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def failure_exit_code; end + + # The exit code to return if there are any failures (default: 1). + # + # @return [Integer] + # + # source://rspec-core//lib/rspec/core/configuration.rb#89 + def failure_exit_code=(_arg0); end + + # source://rspec-core//lib/rspec/core/configuration.rb#78 + def failure_exit_code?; end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#1062 + def files_or_directories_to_run=(*files); end + + # The spec files RSpec will run. + # + # @return [Array] specified files about to run + # + # source://rspec-core//lib/rspec/core/configuration.rb#1075 + def files_to_run; end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#497 + def files_to_run=(_arg0); end + + # Returns the `inclusion_filter`. If none has been set, returns an empty + # hash. + # + # source://rspec-core//lib/rspec/core/configuration.rb#1292 + def filter; end + + # Clears and reassigns the `inclusion_filter`. Set to `nil` if you don't + # want any inclusion filter at all. + # + # ### Warning + # + # This overrides any inclusion filters/tags set on the command line or in + # configuration files. + # + # source://rspec-core//lib/rspec/core/configuration.rb#1283 + def filter=(filter); end + + # Adds {#backtrace_exclusion_patterns} that will filter lines from + # the named gems from backtraces. + # + # @example + # RSpec.configure do |config| + # config.filter_gems_from_backtrace "rack", "rake" + # end + # @note The patterns this adds will match the named gems in their common + # locations (e.g. system gems, vendored with bundler, installed as a + # :git dependency with bundler, etc) but is not guaranteed to work for + # all possible gem locations. For example, if you have the gem source + # in a directory with a completely unrelated name, and use bundler's + # :path option, this will not filter it. + # @param gem_names [Array] Names of the gems to filter + # + # source://rspec-core//lib/rspec/core/configuration.rb#721 + def filter_gems_from_backtrace(*gem_names); end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#499 + def filter_manager; end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#499 + def filter_manager=(_arg0); end + + # Adds key/value pairs to the `inclusion_filter`. If `args` + # includes any symbols that are not part of the hash, each symbol + # is treated as a key in the hash with the value `true`. + # + # ### Note + # + # Filters set using this method can be overridden from the command line + # or config files (e.g. `.rspec`). + # + # @example + # # Given this declaration. + # describe "something", :foo => 'bar' do + # # ... + # end + # + # # Any of the following will include that group. + # config.filter_run_including :foo => 'bar' + # config.filter_run_including :foo => /^ba/ + # config.filter_run_including :foo => lambda {|v| v == 'bar'} + # config.filter_run_including :foo => lambda {|v,m| m[:foo] == 'bar'} + # + # # Given a proc with an arity of 1, the lambda is passed the value + # # related to the key, e.g. + # config.filter_run_including :foo => lambda {|v| v == 'bar'} + # + # # Given a proc with an arity of 2, the lambda is passed the value + # # related to the key, and the metadata itself e.g. + # config.filter_run_including :foo => lambda {|v,m| m[:foo] == 'bar'} + # + # filter_run_including :foo # same as filter_run_including :foo => true + # + # source://rspec-core//lib/rspec/core/configuration.rb#1254 + def filter_run(*args); end + + # Adds key/value pairs to the `exclusion_filter`. If `args` + # includes any symbols that are not part of the hash, each symbol + # is treated as a key in the hash with the value `true`. + # + # ### Note + # + # Filters set using this method can be overridden from the command line + # or config files (e.g. `.rspec`). + # + # @example + # # Given this declaration. + # describe "something", :foo => 'bar' do + # # ... + # end + # + # # Any of the following will exclude that group. + # config.filter_run_excluding :foo => 'bar' + # config.filter_run_excluding :foo => /^ba/ + # config.filter_run_excluding :foo => lambda {|v| v == 'bar'} + # config.filter_run_excluding :foo => lambda {|v,m| m[:foo] == 'bar'} + # + # # Given a proc with an arity of 1, the lambda is passed the value + # # related to the key, e.g. + # config.filter_run_excluding :foo => lambda {|v| v == 'bar'} + # + # # Given a proc with an arity of 2, the lambda is passed the value + # # related to the key, and the metadata itself e.g. + # config.filter_run_excluding :foo => lambda {|v,m| m[:foo] == 'bar'} + # + # filter_run_excluding :foo # same as filter_run_excluding :foo => true + # + # source://rspec-core//lib/rspec/core/configuration.rb#1328 + def filter_run_excluding(*args); end + + # Adds key/value pairs to the `inclusion_filter`. If `args` + # includes any symbols that are not part of the hash, each symbol + # is treated as a key in the hash with the value `true`. + # + # ### Note + # + # Filters set using this method can be overridden from the command line + # or config files (e.g. `.rspec`). + # + # @example + # # Given this declaration. + # describe "something", :foo => 'bar' do + # # ... + # end + # + # # Any of the following will include that group. + # config.filter_run_including :foo => 'bar' + # config.filter_run_including :foo => /^ba/ + # config.filter_run_including :foo => lambda {|v| v == 'bar'} + # config.filter_run_including :foo => lambda {|v,m| m[:foo] == 'bar'} + # + # # Given a proc with an arity of 1, the lambda is passed the value + # # related to the key, e.g. + # config.filter_run_including :foo => lambda {|v| v == 'bar'} + # + # # Given a proc with an arity of 2, the lambda is passed the value + # # related to the key, and the metadata itself e.g. + # config.filter_run_including :foo => lambda {|v,m| m[:foo] == 'bar'} + # + # filter_run_including :foo # same as filter_run_including :foo => true + # + # source://rspec-core//lib/rspec/core/configuration.rb#1254 + def filter_run_including(*args); end + + # Applies the provided filter only if any of examples match, in constrast + # to {#filter_run}, which always applies even if no examples match, in + # which case no examples will be run. This allows you to leave configured + # filters in place that are intended only for temporary use. The most common + # example is focus filtering: `config.filter_run_when_matching :focus`. + # With that configured, you can temporarily focus an example or group + # by tagging it with `:focus` metadata, or prefixing it with an `f` + # (as in `fdescribe`, `fcontext` and `fit`) since those are aliases for + # `describe`/`context`/`it` with `:focus` metadata. + # + # source://rspec-core//lib/rspec/core/configuration.rb#1270 + def filter_run_when_matching(*args); end + + # Color used when a pending example is fixed. Defaults to `:blue` but can + # be set to one of the following: `[:black, :white, :red, :green, + # :yellow, :blue, :magenta, :cyan]` + # + # @return [Symbol] + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def fixed_color; end + + # Color used when a pending example is fixed. Defaults to `:blue` but can + # be set to one of the following: `[:black, :white, :red, :green, + # :yellow, :blue, :magenta, :cyan]` + # + # @return [Symbol] + # + # source://rspec-core//lib/rspec/core/configuration.rb#89 + def fixed_color=(_arg0); end + + # source://rspec-core//lib/rspec/core/configuration.rb#78 + def fixed_color?; end + + # Used to set higher priority option values from the command line. + # + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#571 + def force(hash); end + + # Formats the docstring output using the block provided. + # + # @example + # # This will strip the descriptions of both examples and example + # # groups. + # RSpec.configure do |config| + # config.format_docstrings { |s| s.strip } + # end + # + # source://rspec-core//lib/rspec/core/configuration.rb#1635 + def format_docstrings(&block); end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#1640 + def format_docstrings_block; end + + # Adds a formatter to the set RSpec will use for this run. + # + # @overload add_formatter + # @overload add_formatter + # @param formatter [Class, String, Object] formatter to use. Can be any of the + # string values supported from the CLI (`p`/`progress`, + # `d`/`doc`/`documentation`, `h`/`html`, or `j`/`json`), any + # class that implements the formatter protocol and has registered + # itself with RSpec as a formatter, or a formatter instance. + # @param output [String, IO] where the formatter will write its output. + # Can be an IO object or a string path to a file. If not provided, + # the configured `output_stream` (`$stdout`, by default) will be used. + # @see RSpec::Core::Formatters::Protocol + # + # source://rspec-core//lib/rspec/core/configuration.rb#975 + def formatter=(formatter, output = T.unsafe(nil)); end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#1008 + def formatter_loader; end + + # Returns a duplicate of the formatters currently loaded in + # the `FormatterLoader` for introspection. + # + # Note as this is a duplicate, any mutations will be disregarded. + # + # @return [Array] the formatters currently loaded + # + # source://rspec-core//lib/rspec/core/configuration.rb#1003 + def formatters; end + + # Toggle full backtrace. + # + # @attr true_or_false [Boolean] toggle full backtrace display + # + # source://rspec-core//lib/rspec/core/configuration.rb#887 + def full_backtrace=(true_or_false); end + + # Check if full backtrace is enabled. + # + # @return [Boolean] is full backtrace enabled + # + # source://rspec-core//lib/rspec/core/configuration.rb#881 + def full_backtrace?; end + + # @return [Array] full description filter + # + # source://rspec-core//lib/rspec/core/configuration.rb#956 + def full_description; end + + # Run examples matching on `description` in all files to run. + # + # @param description [String, Regexp] the pattern to filter on + # + # source://rspec-core//lib/rspec/core/configuration.rb#951 + def full_description=(description); end + + # Holds the various registered hooks. Here we use a FilterableItemRepository + # implementation that is specifically optimized for the read/write patterns + # of the config object. + # + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#2082 + def hooks; end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#1581 + def in_project_source_dir_regex; end + + # Tells RSpec to include `mod` in example groups. Methods defined in + # `mod` are exposed to examples (not example groups). Use `filters` to + # constrain the groups or examples in which to include the module. + # + # @example + # + # module AuthenticationHelpers + # def login_as(user) + # # ... + # end + # end + # + # module PreferencesHelpers + # def preferences(user, preferences = {}) + # # ... + # end + # end + # + # module UserHelpers + # def users(username) + # # ... + # end + # end + # + # RSpec.configure do |config| + # config.include(UserHelpers) # included in all groups + # + # # included in examples with `:preferences` metadata + # config.include(PreferenceHelpers, :preferences) + # + # # included in examples with `:type => :request` metadata + # config.include(AuthenticationHelpers, :type => :request) + # end + # + # describe "edit profile", :preferences, :type => :request do + # it "can be viewed by owning user" do + # login_as preferences(users(:jdoe), :lang => 'es') + # get "/profiles/jdoe" + # assert_select ".username", :text => 'jdoe' + # end + # end + # @note Filtered module inclusions can also be applied to + # individual examples that have matching metadata. Just like + # Ruby's object model is that every object has a singleton class + # which has only a single instance, RSpec's model is that every + # example has a singleton example group containing just the one + # example. + # @see #include_context + # @see #extend + # @see #prepend + # + # source://rspec-core//lib/rspec/core/configuration.rb#1404 + def include(mod, *filters); end + + # Tells RSpec to include the named shared example group in example groups. + # Use `filters` to constrain the groups or examples in which to include + # the example group. + # + # @example + # + # RSpec.shared_context "example admin user" do + # let(:admin_user) { create_user(:admin) } + # end + # + # RSpec.shared_context "example guest user" do + # let(:guest_user) { create_user(:guest) } + # end + # + # RSpec.configure do |config| + # config.include_context "example guest user", :type => :request + # config.include_context "example admin user", :admin, :type => :request + # end + # + # RSpec.describe "The admin page", :type => :request do + # it "can be viewed by admins", :admin do + # login_with admin_user + # get "/admin" + # expect(response).to be_ok + # end + # + # it "cannot be viewed by guests" do + # login_with guest_user + # get "/admin" + # expect(response).to be_forbidden + # end + # end + # @note Filtered context inclusions can also be applied to + # individual examples that have matching metadata. Just like + # Ruby's object model is that every object has a singleton class + # which has only a single instance, RSpec's model is that every + # example has a singleton example group containing just the one + # example. + # @see #include + # + # source://rspec-core//lib/rspec/core/configuration.rb#1451 + def include_context(shared_group_name, *filters); end + + # Returns the `inclusion_filter`. If none has been set, returns an empty + # hash. + # + # source://rspec-core//lib/rspec/core/configuration.rb#1292 + def inclusion_filter; end + + # Clears and reassigns the `inclusion_filter`. Set to `nil` if you don't + # want any inclusion filter at all. + # + # ### Warning + # + # This overrides any inclusion filters/tags set on the command line or in + # configuration files. + # + # source://rspec-core//lib/rspec/core/configuration.rb#1283 + def inclusion_filter=(filter); end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#1080 + def last_run_statuses; end + + # Returns dirs that have been prepended to the load path by the `-I` + # command line option. + # + # @return [Array] + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def libs; end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#942 + def libs=(libs); end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#1604 + def load_spec_files; end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#503 + def loaded_spec_files; end + + # Maximum count of failed source lines to display in the failure reports. + # (default `10`). + # return [Integer] + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def max_displayed_failure_line_count; end + + # Maximum count of failed source lines to display in the failure reports. + # (default `10`). + # return [Integer] + # + # source://rspec-core//lib/rspec/core/configuration.rb#89 + def max_displayed_failure_line_count=(_arg0); end + + # source://rspec-core//lib/rspec/core/configuration.rb#78 + def max_displayed_failure_line_count?; end + + # Returns the configured mock framework adapter module. + # + # @return [Symbol] + # + # source://rspec-core//lib/rspec/core/configuration.rb#648 + def mock_framework; end + + # Delegates to mock_framework=(framework). + # + # source://rspec-core//lib/rspec/core/configuration.rb#660 + def mock_framework=(framework); end + + # Sets the mock framework adapter module. + # + # `framework` can be a Symbol or a Module. + # + # Given any of `:rspec`, `:mocha`, `:flexmock`, or `:rr`, configures the + # named framework. + # + # Given `:nothing`, configures no framework. Use this if you don't use + # any mocking framework to save a little bit of overhead. + # + # Given a Module, includes that module in every example group. The module + # should adhere to RSpec's mock framework adapter API: + # + # setup_mocks_for_rspec + # - called before each example + # + # verify_mocks_for_rspec + # - called after each example if the example hasn't yet failed. + # Framework should raise an exception when expectations fail + # + # teardown_mocks_for_rspec + # - called after verify_mocks_for_rspec (even if there are errors) + # + # If the module responds to `configuration` and `mock_with` receives a + # block, it will yield the configuration object to the block e.g. + # + # config.mock_with OtherMockFrameworkAdapter do |mod_config| + # mod_config.custom_setting = true + # end + # + # source://rspec-core//lib/rspec/core/configuration.rb#765 + def mock_with(framework); end + + # Invokes block before defining an example group + # + # source://rspec-core//lib/rspec/core/configuration.rb#2087 + def on_example_group_definition(&block); end + + # Returns an array of blocks to call before defining an example group + # + # @api private + # + # source://rspec-core//lib/rspec/core/configuration.rb#2093 + def on_example_group_definition_callbacks; end + + # Indicates if the `--only-failures` (or `--next-failure`) flag is being used. + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def only_failures; end + + # Indicates if the `--only-failures` (or `--next-failure`) flag is being used. + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def only_failures?; end + + # @private + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/configuration.rb#203 + def only_failures_but_not_configured?; end + + # Sets the default global ordering strategy. By default this can be one + # of `:defined`, `:random`, but is customizable through the + # `register_ordering` API. If order is set to `'rand:'`, + # the seed will also be set. + # + # @see #register_ordering + # + # source://rspec-core//lib/rspec/core/configuration.rb#1647 + def order=(*args, &block); end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#503 + def ordering_manager; end + + # source://rspec-core//lib/rspec/core/configuration.rb#1647 + def ordering_registry(*args, &block); end + + # Determines where RSpec will send its output. + # Default: `$stdout`. + # + # @return [IO, String] + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def output_stream; end + + # Set the output stream for reporter. + # + # @attr value [IO, String] IO to write to or filename to write to, defaults to $stdout + # + # source://rspec-core//lib/rspec/core/configuration.rb#274 + def output_stream=(value); end + + # Load files matching this pattern (default: `'**{,/*/**}/*_spec.rb'`). + # + # @return [String] + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def pattern; end + + # Set pattern to match files to load. + # + # @attr value [String] the filename pattern to filter spec files by + # + # source://rspec-core//lib/rspec/core/configuration.rb#293 + def pattern=(value); end + + # Color to use to print pending examples. Defaults to `:yellow` but can + # be set to one of the following: `[:black, :white, :red, :green, + # :yellow, :blue, :magenta, :cyan]` + # + # @return [Symbol] + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def pending_color; end + + # Color to use to print pending examples. Defaults to `:yellow` but can + # be set to one of the following: `[:black, :white, :red, :green, + # :yellow, :blue, :magenta, :cyan]` + # + # @return [Symbol] + # + # source://rspec-core//lib/rspec/core/configuration.rb#89 + def pending_color=(_arg0); end + + # source://rspec-core//lib/rspec/core/configuration.rb#78 + def pending_color?; end + + # Tells RSpec to prepend example groups with `mod`. Methods defined in + # `mod` are exposed to examples (not example groups). Use `filters` to + # constrain the groups in which to prepend the module. + # + # Similar to `include`, but module is included before the example group's class + # in the ancestor chain. + # + # @example + # + # module OverrideMod + # def override_me + # "overridden" + # end + # end + # + # RSpec.configure do |config| + # config.prepend(OverrideMod, :method => :prepend) + # end + # + # describe "overriding example's class", :method => :prepend do + # it "finds the user" do + # self.class.class_eval do + # def override_me + # end + # end + # override_me # => "overridden" + # # ... + # end + # end + # @see #include + # @see #extend + # + # source://rspec-core//lib/rspec/core/configuration.rb#1533 + def prepend(mod, *filters); end + + # Defines a `after` hook. See {Hooks#after} for full docs. + # + # This method differs from {Hooks#after} in only one way: it supports + # the `:suite` scope. Hooks with the `:suite` scope will be run once after + # the last example of the entire suite is executed. Conditions passed along + # with `:suite` are effectively ignored. + # + # @see #append_after + # @see #before + # @see #prepend_before + # + # source://rspec-core//lib/rspec/core/configuration.rb#2004 + def prepend_after(scope = T.unsafe(nil), *meta, &block); end + + # Adds `block` to the start of the list of `before` blocks in the same + # scope (`:example`, `:context`, or `:suite`), in contrast to {#before}, + # which adds the hook to the end of the list. + # + # See {Hooks#before} for full `before` hook docs. + # + # This method differs from {Hooks#prepend_before} in only one way: it supports + # the `:suite` scope. Hooks with the `:suite` scope will be run once before + # the first example of the entire suite is executed. Conditions passed along + # with `:suite` are effectively ignored. + # + # @see #before + # @see #after + # @see #append_after + # + # source://rspec-core//lib/rspec/core/configuration.rb#1979 + def prepend_before(scope = T.unsafe(nil), *meta, &block); end + + # Defaults `profile_examples` to 10 examples when `@profile_examples` is + # `true`. + # + # @api private + # + # source://rspec-core//lib/rspec/core/configuration.rb#1052 + def profile_examples; end + + # Report the times for the slowest examples (default: `false`). + # Use this to specify the number of examples to include in the profile. + # + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/configuration.rb#322 + def profile_examples=(_arg0); end + + # source://rspec-core//lib/rspec/core/configuration.rb#78 + def profile_examples?; end + + # Specifies which directories contain the source code for your project. + # When a failure occurs, RSpec looks through the backtrace to find a + # a line of source to print. It first looks for a line coming from + # one of the project source directories so that, for example, it prints + # the expectation or assertion call rather than the source code from + # the expectation or assertion framework. + # + # @return [Array] + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def project_source_dirs; end + + # Specifies which directories contain the source code for your project. + # When a failure occurs, RSpec looks through the backtrace to find a + # a line of source to print. It first looks for a line coming from + # one of the project source directories so that, for example, it prints + # the expectation or assertion call rather than the source code from + # the expectation or assertion framework. + # + # @return [Array] + # + # source://rspec-core//lib/rspec/core/configuration.rb#89 + def project_source_dirs=(_arg0); end + + # source://rspec-core//lib/rspec/core/configuration.rb#78 + def project_source_dirs?; end + + # Turns deprecation warnings into errors, in order to surface + # the full backtrace of the call site. This can be useful when + # you need more context to address a deprecation than the + # single-line call site normally provided. + # + # @example + # + # RSpec.configure do |rspec| + # rspec.raise_errors_for_deprecations! + # end + # + # source://rspec-core//lib/rspec/core/configuration.rb#1806 + def raise_errors_for_deprecations!; end + + # Turns warnings into errors. This can be useful when + # you want RSpec to run in a 'strict' no warning situation. + # + # @example + # + # RSpec.configure do |rspec| + # rspec.raise_on_warning = true + # end + # + # source://rspec-core//lib/rspec/core/configuration.rb#1754 + def raise_on_warning=(value); end + + # Registers a named ordering strategy that can later be + # used to order an example group's subgroups by adding + # `:order => ` metadata to the example group. + # + # @example + # RSpec.configure do |rspec| + # rspec.register_ordering :reverse do |list| + # list.reverse + # end + # end + # + # RSpec.describe 'MyClass', :order => :reverse do + # # ... + # end + # @example + # RSpec.configure do |rspec| + # rspec.register_ordering :global do |examples| + # acceptance, other = examples.partition do |example| + # example.metadata[:type] == :acceptance + # end + # other + acceptance + # end + # end + # + # RSpec.describe 'MyClass', :type => :acceptance do + # # will run last + # end + # + # RSpec.describe 'MyClass' do + # # will run first + # end + # @note Pass the symbol `:global` to set the ordering strategy that + # will be used to order the top-level example groups and any example + # groups that do not have declared `:order` metadata. + # @param name [Symbol] The name of the ordering. + # @yield Block that will order the given examples or example groups + # @yieldparam list [Array, Array] The examples or groups to order + # @yieldreturn [Array, Array] The re-ordered examples or groups + # + # source://rspec-core//lib/rspec/core/configuration.rb#1647 + def register_ordering(*args, &block); end + + # @return [RSpec::Core::Reporter] the currently configured reporter + # + # source://rspec-core//lib/rspec/core/configuration.rb#1035 + def reporter; end + + # Indicates files configured to be required. + # + # @return [Array] + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def requires; end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#1573 + def requires=(paths); end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#580 + def reset; end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#593 + def reset_filters; end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#586 + def reset_reporter; end + + # Run all examples if none match the configured filters + # (default: `false`). + # + # @deprecated Use {#filter_run_when_matching} instead for the specific + # filters that you want to be ignored if none match. + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def run_all_when_everything_filtered; end + + # Run all examples if none match the configured filters + # (default: `false`). + # + # @deprecated Use {#filter_run_when_matching} instead for the specific + # filters that you want to be ignored if none match. + # + # source://rspec-core//lib/rspec/core/configuration.rb#89 + def run_all_when_everything_filtered=(_arg0); end + + # source://rspec-core//lib/rspec/core/configuration.rb#78 + def run_all_when_everything_filtered?; end + + # Seed for random ordering (default: generated randomly each run). + # + # When you run specs with `--order random`, RSpec generates a random seed + # for the randomization and prints it to the `output_stream` (assuming + # you're using RSpec's built-in formatters). If you discover an ordering + # dependency (i.e. examples fail intermittently depending on order), set + # this (on Configuration or on the command line with `--seed`) to run + # using the same seed while you debug the issue. + # + # We recommend, actually, that you use the command line approach so you + # don't accidentally leave the seed encoded. + # + # source://rspec-core//lib/rspec/core/configuration.rb#1647 + def seed(*args, &block); end + + # Sets the seed value and sets the default global ordering to random. + # + # source://rspec-core//lib/rspec/core/configuration.rb#1647 + def seed=(*args, &block); end + + # source://rspec-core//lib/rspec/core/configuration.rb#1647 + def seed_used?(*args, &block); end + + # Configures how RSpec treats metadata passed as part of a shared example + # group definition. For example, given this shared example group definition: + # + # RSpec.shared_context "uses DB", :db => true do + # around(:example) do |ex| + # MyORM.transaction(:rollback => true, &ex) + # end + # end + # + # ...there are two ways RSpec can treat the `:db => true` metadata, each + # of which has a corresponding config option: + # + # 1. `:trigger_inclusion`: this shared context will be implicitly included + # in any groups (or examples) that have `:db => true` metadata. + # 2. `:apply_to_host_groups`: the metadata will be inherited by the metadata + # hash of all host groups and examples. + # + # `:trigger_inclusion` is the legacy behavior from before RSpec 3.5 but should + # be considered deprecated. Instead, you can explicitly include a group with + # `include_context`: + # + # RSpec.describe "My model" do + # include_context "uses DB" + # end + # + # ...or you can configure RSpec to include the context based on matching metadata + # using an API that mirrors configured module inclusion: + # + # RSpec.configure do |rspec| + # rspec.include_context "uses DB", :db => true + # end + # + # `:apply_to_host_groups` is a new feature of RSpec 3.5 and will be the only + # supported behavior in RSpec 4. + # + # @overload shared_context_metadata_behavior + # @overload shared_context_metadata_behavior= + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def shared_context_metadata_behavior; end + + # @see shared_context_metadata_behavior + # + # source://rspec-core//lib/rspec/core/configuration.rb#434 + def shared_context_metadata_behavior=(value); end + + # Don't print filter info i.e. "Run options: include {:focus=>true}" + # (default `false`). + # return [Boolean] + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def silence_filter_announcements; end + + # Don't print filter info i.e. "Run options: include {:focus=>true}" + # (default `false`). + # return [Boolean] + # + # source://rspec-core//lib/rspec/core/configuration.rb#89 + def silence_filter_announcements=(_arg0); end + + # source://rspec-core//lib/rspec/core/configuration.rb#78 + def silence_filter_announcements?; end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#1117 + def spec_files_with_failures; end + + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def start_time; end + + # source://rspec-core//lib/rspec/core/configuration.rb#89 + def start_time=(_arg0); end + + # source://rspec-core//lib/rspec/core/configuration.rb#78 + def start_time?; end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#501 + def static_config_filter_manager; end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#501 + def static_config_filter_manager=(_arg0); end + + # Color to use to indicate success. Defaults to `:green` but can be set + # to one of the following: `[:black, :white, :red, :green, :yellow, + # :blue, :magenta, :cyan]` + # + # @return [Symbol] + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def success_color; end + + # Color to use to indicate success. Defaults to `:green` but can be set + # to one of the following: `[:black, :white, :red, :green, :yellow, + # :blue, :magenta, :cyan]` + # + # @return [Symbol] + # + # source://rspec-core//lib/rspec/core/configuration.rb#89 + def success_color=(_arg0); end + + # source://rspec-core//lib/rspec/core/configuration.rb#78 + def success_color?; end + + # Use threadsafe options where available. + # Currently this will place a mutex around memoized values such as let blocks. + # return [Boolean] + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def threadsafe; end + + # Use threadsafe options where available. + # Currently this will place a mutex around memoized values such as let blocks. + # return [Boolean] + # + # source://rspec-core//lib/rspec/core/configuration.rb#89 + def threadsafe=(_arg0); end + + # source://rspec-core//lib/rspec/core/configuration.rb#78 + def threadsafe?; end + + # @deprecated This config option was added in RSpec 2 to pave the way + # for this being the default behavior in RSpec 3. Now this option is + # a no-op. + # + # source://rspec-core//lib/rspec/core/configuration.rb#383 + def treat_symbols_as_metadata_keys_with_true_values=(_value); end + + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def tty; end + + # source://rspec-core//lib/rspec/core/configuration.rb#89 + def tty=(_arg0); end + + # source://rspec-core//lib/rspec/core/configuration.rb#78 + def tty?; end + + # Set Ruby warnings on or off. + # + # source://rspec-core//lib/rspec/core/configuration.rb#1734 + def warnings=(value); end + + # @return [Boolean] Whether or not ruby warnings are enabled. + # + # source://rspec-core//lib/rspec/core/configuration.rb#1739 + def warnings?; end + + # Defines a callback that runs after the first example with matching + # metadata is defined. If no examples are defined with matching metadata, + # it will not get called at all. + # + # This can be used to ensure some setup is performed (such as bootstrapping + # a DB or loading a specific file that adds significantly to the boot time) + # if needed (as indicated by the presence of an example with matching metadata) + # but avoided otherwise. + # + # @example + # RSpec.configure do |config| + # config.when_first_matching_example_defined(:db) do + # # Load a support file that does some heavyweight setup, + # # including bootstrapping the DB, but only if we have loaded + # # any examples tagged with `:db`. + # require 'support/db' + # end + # end + # + # source://rspec-core//lib/rspec/core/configuration.rb#1896 + def when_first_matching_example_defined(*filters); end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#2064 + def with_suite_hooks; end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#499 + def world; end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#499 + def world=(_arg0); end + + private + + # :nocov: + # + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/configuration.rb#2220 + def absolute_pattern?(pattern); end + + # source://rspec-core//lib/rspec/core/configuration.rb#2321 + def add_hook_to_existing_matching_groups(meta, scope, &block); end + + # @raise [MustBeConfiguredBeforeExampleGroupsError] + # + # source://rspec-core//lib/rspec/core/configuration.rb#2260 + def assert_no_example_groups_defined(config_option); end + + # source://rspec-core//lib/rspec/core/configuration.rb#2310 + def clear_values_derived_from_example_status_persistence_file_path; end + + # source://rspec-core//lib/rspec/core/configuration.rb#2242 + def command; end + + # source://rspec-core//lib/rspec/core/configuration.rb#2286 + def conditionally_disable_expectations_monkey_patching; end + + # source://rspec-core//lib/rspec/core/configuration.rb#2277 + def conditionally_disable_mocks_monkey_patching; end + + # source://rspec-core//lib/rspec/core/configuration.rb#2315 + def configure_group_with(group, module_list, application_method); end + + # source://rspec-core//lib/rspec/core/configuration.rb#2250 + def define_built_in_hooks; end + + # source://rspec-core//lib/rspec/core/configuration.rb#2373 + def define_mixed_in_module(mod, filters, mod_list, config_method, &block); end + + # source://rspec-core//lib/rspec/core/configuration.rb#2225 + def extract_location(path); end + + # source://rspec-core//lib/rspec/core/configuration.rb#2202 + def file_glob_from(path, pattern); end + + # source://rspec-core//lib/rspec/core/configuration.rb#2191 + def gather_directories(path); end + + # source://rspec-core//lib/rspec/core/configuration.rb#2170 + def get_files_to_run(paths); end + + # source://rspec-core//lib/rspec/core/configuration.rb#2197 + def get_matching_files(path, pattern); end + + # source://rspec-core//lib/rspec/core/configuration.rb#2137 + def handle_suite_hook(scope, meta); end + + # source://rspec-core//lib/rspec/core/configuration.rb#2116 + def load_file_handling_errors(method, file); end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/configuration.rb#2343 + def metadata_applies_to_group?(meta, group); end + + # source://rspec-core//lib/rspec/core/configuration.rb#2335 + def on_existing_matching_groups(meta); end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/configuration.rb#2273 + def output_to_tty?(output = T.unsafe(nil)); end + + # source://rspec-core//lib/rspec/core/configuration.rb#2269 + def output_wrapper; end + + # source://rspec-core//lib/rspec/core/configuration.rb#2182 + def paths_to_check(paths); end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/configuration.rb#2187 + def pattern_might_load_specs_from_vendored_dirs?; end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/configuration.rb#2296 + def rspec_expectations_loaded?; end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/configuration.rb#2292 + def rspec_mocks_loaded?; end + + # source://rspec-core//lib/rspec/core/configuration.rb#2152 + def run_suite_hooks(hook_description, hooks); end + + # source://rspec-core//lib/rspec/core/configuration.rb#2358 + def safe_extend(mod, host); end + + # :nocov: + # + # source://rspec-core//lib/rspec/core/configuration.rb#2354 + def safe_include(mod, host); end + + # source://rspec-core//lib/rspec/core/configuration.rb#2348 + def safe_prepend(mod, host); end + + # source://rspec-core//lib/rspec/core/configuration.rb#2300 + def update_pattern_attr(name, value); end + + # source://rspec-core//lib/rspec/core/configuration.rb#2246 + def value_for(key); end + + class << self + # As `add_setting` but only add the reader. + # + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#100 + def add_read_only_setting(name, opts = T.unsafe(nil)); end + + # Invoked by the `add_setting` instance method. Use that method on a + # `Configuration` instance rather than this class method. + # + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#87 + def add_setting(name, opts = T.unsafe(nil)); end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#70 + def define_alias(name, alias_name); end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#77 + def define_predicate(name); end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#60 + def define_reader(name); end + + # @private + # + # source://rspec-core//lib/rspec/core/configuration.rb#1645 + def delegate_to_ordering_manager(*methods); end + end +end + +# @private +# +# source://rspec-core//lib/rspec/core/configuration.rb#1625 +RSpec::Core::Configuration::DEFAULT_FORMATTER = T.let(T.unsafe(nil), Proc) + +# This buffer is used to capture all messages sent to the reporter during +# reporter initialization. It can then replay those messages after the +# formatter is correctly initialized. Otherwise, deprecation warnings +# during formatter initialization can cause an infinite loop. +# +# @private +# +# source://rspec-core//lib/rspec/core/configuration.rb#1018 +class RSpec::Core::Configuration::DeprecationReporterBuffer + # @return [DeprecationReporterBuffer] a new instance of DeprecationReporterBuffer + # + # source://rspec-core//lib/rspec/core/configuration.rb#1019 + def initialize; end + + # source://rspec-core//lib/rspec/core/configuration.rb#1023 + def deprecation(*args); end + + # source://rspec-core//lib/rspec/core/configuration.rb#1027 + def play_onto(reporter); end +end + +# @private +# +# source://rspec-core//lib/rspec/core/configuration.rb#1794 +module RSpec::Core::Configuration::ExposeCurrentExample; end + +# @private +# +# source://rspec-core//lib/rspec/core/configuration.rb#1105 +RSpec::Core::Configuration::FAILED_STATUS = T.let(T.unsafe(nil), String) + +# @private +# +# source://rspec-core//lib/rspec/core/configuration.rb#728 +RSpec::Core::Configuration::MOCKING_ADAPTERS = T.let(T.unsafe(nil), Hash) + +# @private +# +# source://rspec-core//lib/rspec/core/configuration.rb#57 +class RSpec::Core::Configuration::MustBeConfiguredBeforeExampleGroupsError < ::StandardError; end + +# @private +# +# source://rspec-core//lib/rspec/core/configuration.rb#1108 +RSpec::Core::Configuration::PASSED_STATUS = T.let(T.unsafe(nil), String) + +# @private +# +# source://rspec-core//lib/rspec/core/configuration.rb#1111 +RSpec::Core::Configuration::PENDING_STATUS = T.let(T.unsafe(nil), String) + +# @private +# +# source://rspec-core//lib/rspec/core/configuration.rb#1744 +RSpec::Core::Configuration::RAISE_ERROR_WARNING_NOTIFIER = T.let(T.unsafe(nil), Proc) + +# Module that holds `attr_reader` declarations. It's in a separate +# module to allow us to override those methods and use `super`. +# +# @private +# +# source://rspec-core//lib/rspec/core/configuration.rb#53 +module RSpec::Core::Configuration::Readers + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def default_color; end + + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def default_path; end + + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def deprecation_stream; end + + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def detail_color; end + + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def drb; end + + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def drb_port; end + + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def dry_run; end + + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def error_exit_code; end + + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def error_stream; end + + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def example_status_persistence_file_path; end + + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def exclude_pattern; end + + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def fail_fast; end + + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def fail_if_no_examples; end + + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def failure_color; end + + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def failure_exit_code; end + + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def fixed_color; end + + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def libs; end + + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def max_displayed_failure_line_count; end + + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def only_failures; end + + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def output_stream; end + + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def pattern; end + + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def pending_color; end + + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def project_source_dirs; end + + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def requires; end + + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def run_all_when_everything_filtered; end + + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def shared_context_metadata_behavior; end + + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def silence_filter_announcements; end + + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def start_time; end + + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def success_color; end + + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def threadsafe; end + + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def tty; end +end + +# @private +# +# source://rspec-core//lib/rspec/core/configuration.rb#1102 +RSpec::Core::Configuration::UNKNOWN_STATUS = T.let(T.unsafe(nil), String) + +# @private +# +# source://rspec-core//lib/rspec/core/configuration.rb#1114 +RSpec::Core::Configuration::VALID_STATUSES = T.let(T.unsafe(nil), Array) + +# Responsible for utilizing externally provided configuration options, +# whether via the command line, `.rspec`, `~/.rspec`, +# `$XDG_CONFIG_HOME/rspec/options`, `.rspec-local` or a custom options +# file. +# +# source://rspec-core//lib/rspec/core/configuration_options.rb#10 +class RSpec::Core::ConfigurationOptions + # @param args [Array] command line arguments + # @return [ConfigurationOptions] a new instance of ConfigurationOptions + # + # source://rspec-core//lib/rspec/core/configuration_options.rb#12 + def initialize(args); end + + # @return [Array] the original command-line arguments + # + # source://rspec-core//lib/rspec/core/configuration_options.rb#40 + def args; end + + # Updates the provided {Configuration} instance based on the provided + # external configuration options. + # + # @param config [Configuration] the configuration instance to update + # + # source://rspec-core//lib/rspec/core/configuration_options.rb#21 + def configure(config); end + + # Updates the provided {FilterManager} based on the filter options. + # + # @api private + # @param filter_manager [FilterManager] instance to update + # + # source://rspec-core//lib/rspec/core/configuration_options.rb#30 + def configure_filter_manager(filter_manager); end + + # @return [Hash] the final merged options, drawn from all external sources + # + # source://rspec-core//lib/rspec/core/configuration_options.rb#37 + def options; end + + private + + # source://rspec-core//lib/rspec/core/configuration_options.rb#169 + def args_from_options_file(path); end + + # source://rspec-core//lib/rspec/core/configuration_options.rb#138 + def command_line_options; end + + # source://rspec-core//lib/rspec/core/configuration_options.rb#142 + def custom_options; end + + # source://rspec-core//lib/rspec/core/configuration_options.rb#183 + def custom_options_file; end + + # source://rspec-core//lib/rspec/core/configuration_options.rb#129 + def env_options; end + + # source://rspec-core//lib/rspec/core/configuration_options.rb#121 + def file_options; end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/configuration_options.rb#66 + def force?(key); end + + # source://rspec-core//lib/rspec/core/configuration_options.rb#154 + def global_options; end + + # source://rspec-core//lib/rspec/core/configuration_options.rb#195 + def global_options_file; end + + # source://rspec-core//lib/rspec/core/configuration_options.rb#206 + def home_options_file_path; end + + # source://rspec-core//lib/rspec/core/configuration_options.rb#117 + def load_formatters_into(config); end + + # source://rspec-core//lib/rspec/core/configuration_options.rb#146 + def local_options; end + + # source://rspec-core//lib/rspec/core/configuration_options.rb#191 + def local_options_file; end + + # source://rspec-core//lib/rspec/core/configuration_options.rb#175 + def options_file_as_erb_string(path); end + + # source://rspec-core//lib/rspec/core/configuration_options.rb#158 + def options_from(path); end + + # source://rspec-core//lib/rspec/core/configuration_options.rb#70 + def order(keys); end + + # source://rspec-core//lib/rspec/core/configuration_options.rb#44 + def organize_options; end + + # source://rspec-core//lib/rspec/core/configuration_options.rb#163 + def parse_args_ignoring_files_or_dirs_to_run(args, source); end + + # source://rspec-core//lib/rspec/core/configuration_options.rb#109 + def process_options_into(config); end + + # source://rspec-core//lib/rspec/core/configuration_options.rb#150 + def project_options; end + + # source://rspec-core//lib/rspec/core/configuration_options.rb#187 + def project_options_file; end + + # source://rspec-core//lib/rspec/core/configuration_options.rb#222 + def resolve_xdg_config_home; end + + # source://rspec-core//lib/rspec/core/configuration_options.rb#199 + def xdg_options_file_if_exists; end + + # source://rspec-core//lib/rspec/core/configuration_options.rb#215 + def xdg_options_file_path; end +end + +# source://rspec-core//lib/rspec/core/configuration_options.rb#77 +RSpec::Core::ConfigurationOptions::OPTIONS_ORDER = T.let(T.unsafe(nil), Array) + +# source://rspec-core//lib/rspec/core/configuration_options.rb#59 +RSpec::Core::ConfigurationOptions::UNFORCED_OPTIONS = T.let(T.unsafe(nil), RSpec::Core::Set) + +# source://rspec-core//lib/rspec/core/configuration_options.rb#64 +RSpec::Core::ConfigurationOptions::UNPROCESSABLE_OPTIONS = T.let(T.unsafe(nil), RSpec::Core::Set) + +# DSL defines methods to group examples, most notably `describe`, +# and exposes them as class methods of {RSpec}. They can also be +# exposed globally (on `main` and instances of `Module`) through +# the {Configuration} option `expose_dsl_globally`. +# +# By default the methods `describe`, `context` and `example_group` +# are exposed. These methods define a named context for one or +# more examples. The given block is evaluated in the context of +# a generated subclass of {RSpec::Core::ExampleGroup}. +# +# ## Examples: +# +# RSpec.describe "something" do +# context "when something is a certain way" do +# it "does something" do +# # example code goes here +# end +# end +# end +# +# @see ExampleGroup +# @see ExampleGroup.example_group +# +# source://rspec-core//lib/rspec/core/dsl.rb#25 +module RSpec::Core::DSL + class << self + # @private + # + # source://rspec-core//lib/rspec/core/dsl.rb#89 + def change_global_dsl(&changes); end + + # @private + # + # source://rspec-core//lib/rspec/core/dsl.rb#27 + def example_group_aliases; end + + # @private + # + # source://rspec-core//lib/rspec/core/dsl.rb#37 + def expose_example_group_alias(name); end + + # @private + # + # source://rspec-core//lib/rspec/core/dsl.rb#81 + def expose_example_group_alias_globally(method_name); end + + # Adds the describe method to Module and the top level binding. + # + # @api private + # + # source://rspec-core//lib/rspec/core/dsl.rb#58 + def expose_globally!; end + + # @private + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/dsl.rb#32 + def exposed_globally?; end + + # Removes the describe method from Module and the top level binding. + # + # @api private + # + # source://rspec-core//lib/rspec/core/dsl.rb#70 + def remove_globally!; end + + # @private + # + # source://rspec-core//lib/rspec/core/dsl.rb#53 + def top_level; end + + # @private + # + # source://rspec-core//lib/rspec/core/dsl.rb#53 + def top_level=(_arg0); end + end +end + +# Deprecation Error. +# +# source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#221 +class RSpec::Core::DeprecationError < ::StandardError; end + +# Wrapper around Ruby's `DidYouMean::SpellChecker` when available to provide file name suggestions. +# +# @private +# +# source://rspec-core//lib/rspec/core/did_you_mean.rb#5 +class RSpec::Core::DidYouMean + # @return [DidYouMean] a new instance of DidYouMean + # + # source://rspec-core//lib/rspec/core/did_you_mean.rb#8 + def initialize(relative_file_name); end + + # return a hint if API for ::DidYouMean::SpellChecker not supported + # + # source://rspec-core//lib/rspec/core/did_you_mean.rb#14 + def call; end + + # Returns the value of attribute relative_file_name. + # + # source://rspec-core//lib/rspec/core/did_you_mean.rb#6 + def relative_file_name; end + + private + + # source://rspec-core//lib/rspec/core/did_you_mean.rb#30 + def formats(probables); end + + # source://rspec-core//lib/rspec/core/did_you_mean.rb#40 + def red_font(mytext); end + + # source://rspec-core//lib/rspec/core/did_you_mean.rb#35 + def top_and_tail(rspec_format); end +end + +# Wrapper for an instance of a subclass of {ExampleGroup}. An instance of +# `RSpec::Core::Example` is returned by example definition methods +# such as {ExampleGroup.it it} and is yielded to the {ExampleGroup.it it}, +# {Hooks#before before}, {Hooks#after after}, {Hooks#around around}, +# {MemoizedHelpers::ClassMethods#let let} and +# {MemoizedHelpers::ClassMethods#subject subject} blocks. +# +# This allows us to provide rich metadata about each individual +# example without adding tons of methods directly to the ExampleGroup +# that users may inadvertently redefine. +# +# Useful for configuring logging and/or taking some action based +# on the state of an example's metadata. +# +# @example +# +# RSpec.configure do |config| +# config.before do |example| +# log example.description +# end +# +# config.after do |example| +# log example.description +# end +# +# config.around do |example| +# log example.description +# example.run +# end +# end +# +# shared_examples "auditable" do +# it "does something" do +# log "#{example.full_description}: #{auditable.inspect}" +# auditable.should do_something +# end +# end +# @note Example blocks are evaluated in the context of an instance +# of an `ExampleGroup`, not in the context of an instance of `Example`. +# @see ExampleGroup +# +# source://rspec-core//lib/rspec/core/example.rb#44 +class RSpec::Core::Example + # Creates a new instance of Example. + # + # @api private + # @param example_group_class [Class] the subclass of ExampleGroup in which + # this Example is declared + # @param description [String] the String passed to the `it` method (or + # alias) + # @param user_metadata [Hash] additional args passed to `it` to be used as + # metadata + # @param example_block [Proc] the block of code that represents the + # example + # @return [Example] a new instance of Example + # + # source://rspec-core//lib/rspec/core/example.rb#186 + def initialize(example_group_class, description, user_metadata, example_block = T.unsafe(nil)); end + + # @attr + # @private + # + # source://rspec-core//lib/rspec/core/example.rb#174 + def clock; end + + # @attr + # @private + # + # source://rspec-core//lib/rspec/core/example.rb#174 + def clock=(_arg0); end + + # Returns the string submitted to `example` or its aliases (e.g. + # `specify`, `it`, etc). If no string is submitted (e.g. + # `it { is_expected.to do_something }`) it returns the message generated + # by the matcher if there is one, otherwise returns a message including + # the location of the example. + # + # source://rspec-core//lib/rspec/core/example.rb#76 + def description; end + + # The exception that will be displayed to the user -- either the failure of + # the example or the `pending_exception` if the example is pending. + # + # @private + # + # source://rspec-core//lib/rspec/core/example.rb#388 + def display_exception; end + + # Assigns the exception that will be displayed to the user -- either the failure of + # the example or the `pending_exception` if the example is pending. + # + # @private + # + # source://rspec-core//lib/rspec/core/example.rb#396 + def display_exception=(ex); end + + # Duplicates the example and overrides metadata with the provided + # hash. + # + # @param metadata_overrides [Hash] the hash to override the example metadata + # @return [Example] a duplicate of the example with modified metadata + # + # source://rspec-core//lib/rspec/core/example.rb#132 + def duplicate_with(metadata_overrides = T.unsafe(nil)); end + + # Returns the example group class that provides the context for running + # this example. + # + # source://rspec-core//lib/rspec/core/example.rb#230 + def example_group; end + + # Returns the example_group_instance that provides the context for + # running this example. + # + # @attr_reader + # @private + # + # source://rspec-core//lib/rspec/core/example.rb#170 + def example_group_instance; end + + # Returns the first exception raised in the context of running this + # example (nil if no exception is raised). + # + # @attr_reader + # + # source://rspec-core//lib/rspec/core/example.rb#158 + def exception; end + + # @return [ExecutionResult] represents the result of running this example. + # + # source://rspec-core//lib/rspec/core/example.rb#49 + def execution_result; end + + # Used internally to set an exception and fail without actually executing + # the example when an exception is raised in before(:context). + # + # @private + # + # source://rspec-core//lib/rspec/core/example.rb#439 + def fail_with_exception(reporter, exception); end + + # @return [String] the relative path to the file where this example was + # defined. + # + # source://rspec-core//lib/rspec/core/example.rb#49 + def file_path; end + + # @return [String] the full description (including the docstrings of + # all parent example groups). + # + # source://rspec-core//lib/rspec/core/example.rb#49 + def full_description; end + + # @return [String] the unique id of this example. Pass + # this at the command line to re-run this exact example. + # + # source://rspec-core//lib/rspec/core/example.rb#117 + def id; end + + # Provide a human-readable representation of this class + # + # source://rspec-core//lib/rspec/core/example.rb#220 + def inspect; end + + # Returns a description of the example that always includes the location. + # + # source://rspec-core//lib/rspec/core/example.rb#87 + def inspect_output; end + + # @private + # + # source://rspec-core//lib/rspec/core/example.rb#456 + def instance_exec(*args, &block); end + + # @return [String] the exact source location of this example in a form + # like `./path/to/spec.rb:17` + # + # source://rspec-core//lib/rspec/core/example.rb#49 + def location; end + + # Returns the location-based argument that can be passed to the `rspec` command to rerun this example. + # + # source://rspec-core//lib/rspec/core/example.rb#96 + def location_rerun_argument; end + + # Returns the metadata object associated with this example. + # + # @attr_reader + # + # source://rspec-core//lib/rspec/core/example.rb#163 + def metadata; end + + # @return [Boolean] flag that indicates that the example is not expected + # to pass. It will be run and will either have a pending result (if a + # failure occurs) or a failed result (if no failure occurs). + # + # source://rspec-core//lib/rspec/core/example.rb#49 + def pending; end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/example.rb#234 + def pending?; end + + # @return [RSpec::Core::Reporter] the current reporter for the example + # + # source://rspec-core//lib/rspec/core/example.rb#226 + def reporter; end + + # Returns the location-based argument that can be passed to the `rspec` command to rerun this example. + # + # @deprecated Use {#location_rerun_argument} instead. + # @note If there are multiple examples identified by this location, they will use {#id} + # to rerun instead, but this method will still return the location (that's why it is deprecated!). + # + # source://rspec-core//lib/rspec/core/example.rb#111 + def rerun_argument; end + + # instance_execs the block passed to the constructor in the context of + # the instance of {ExampleGroup}. + # + # @api private + # @param example_group_instance the instance of an ExampleGroup subclass + # + # source://rspec-core//lib/rspec/core/example.rb#246 + def run(example_group_instance, reporter); end + + # Used to set the exception when `aggregate_failures` fails. + # + # @private + # + # source://rspec-core//lib/rspec/core/example.rb#425 + def set_aggregate_failures_exception(exception); end + + # Used internally to set an exception in an after hook, which + # captures the exception but doesn't raise it. + # + # @private + # + # source://rspec-core//lib/rspec/core/example.rb#412 + def set_exception(exception); end + + # @return [Boolean] flag that will cause the example to not run. + # The {ExecutionResult} status will be `:pending`. + # + # source://rspec-core//lib/rspec/core/example.rb#49 + def skip; end + + # Used internally to skip without actually executing the example when + # skip is used in before(:context). + # + # @private + # + # source://rspec-core//lib/rspec/core/example.rb#449 + def skip_with_exception(reporter, exception); end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/example.rb#238 + def skipped?; end + + # Provide a human-readable representation of this class + # + # source://rspec-core//lib/rspec/core/example.rb#220 + def to_s; end + + # @private + # + # source://rspec-core//lib/rspec/core/example.rb#148 + def update_inherited_metadata(updates); end + + private + + # source://rspec-core//lib/rspec/core/example.rb#534 + def assign_generated_description; end + + # source://rspec-core//lib/rspec/core/example.rb#478 + def finish(reporter); end + + # source://rspec-core//lib/rspec/core/example.rb#543 + def generate_description; end + + # source://rspec-core//lib/rspec/core/example.rb#462 + def hooks; end + + # source://rspec-core//lib/rspec/core/example.rb#550 + def location_description; end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/example.rb#530 + def mocks_need_verification?; end + + # source://rspec-core//lib/rspec/core/example.rb#498 + def record_finished(status, reporter); end + + # source://rspec-core//lib/rspec/core/example.rb#516 + def run_after_example; end + + # source://rspec-core//lib/rspec/core/example.rb#503 + def run_before_example; end + + # source://rspec-core//lib/rspec/core/example.rb#473 + def start(reporter); end + + # source://rspec-core//lib/rspec/core/example.rb#524 + def verify_mocks; end + + # source://rspec-core//lib/rspec/core/example.rb#508 + def with_around_and_singleton_context_hooks; end + + # source://rspec-core//lib/rspec/core/example.rb#466 + def with_around_example_hooks; end + + class << self + # Used to define methods that delegate to this example's metadata. + # + # @private + # + # source://rspec-core//lib/rspec/core/example.rb#48 + def delegate_to_metadata(key); end + + # @private + # + # source://rspec-core//lib/rspec/core/example.rb#122 + def parse_id(id); end + end +end + +# @private +# +# source://rspec-core//lib/rspec/core/example.rb#310 +RSpec::Core::Example::AllExceptionsExcludingDangerousOnesOnRubiesThatAllowIt = RSpec::Support::AllExceptionsExceptOnesWeMustNotRescue + +# Represents the result of executing an example. +# Behaves like a hash for backwards compatibility. +# +# source://rspec-core//lib/rspec/core/example.rb#556 +class RSpec::Core::Example::ExecutionResult + include ::RSpec::Core::HashImitatable + extend ::RSpec::Core::HashImitatable::ClassMethods + + # Populates finished_at and run_time if it has not yet been set + # + # @api private + # + # source://rspec-core//lib/rspec/core/example.rb#610 + def ensure_timing_set(clock); end + + # @return [Boolean] Indicates if the example was completely skipped + # (typically done via `:skip` metadata or the `skip` method). Skipped examples + # will have a `:pending` result. A `:pending` result can also come from examples + # that were marked as `:pending`, which causes them to be run, and produces a + # `:failed` result if the example passes. + # + # source://rspec-core//lib/rspec/core/example.rb#597 + def example_skipped?; end + + # @return [Exception, nil] The failure, if there was one. + # + # source://rspec-core//lib/rspec/core/metadata.rb#442 + def exception; end + + # @return [Exception, nil] The failure, if there was one. + # + # source://rspec-core//lib/rspec/core/metadata.rb#442 + def exception=(_arg0); end + + # @return [Time] When the example finished. + # + # source://rspec-core//lib/rspec/core/metadata.rb#442 + def finished_at; end + + # @return [Time] When the example finished. + # + # source://rspec-core//lib/rspec/core/metadata.rb#442 + def finished_at=(_arg0); end + + # @return [Exception, nil] The exception triggered while + # executing the pending example. If no exception was triggered + # it would no longer get a status of `:pending` unless it was + # tagged with `:skip`. + # + # source://rspec-core//lib/rspec/core/metadata.rb#442 + def pending_exception; end + + # @return [Exception, nil] The exception triggered while + # executing the pending example. If no exception was triggered + # it would no longer get a status of `:pending` unless it was + # tagged with `:skip`. + # + # source://rspec-core//lib/rspec/core/metadata.rb#442 + def pending_exception=(_arg0); end + + # @return [Boolean] For examples tagged with `:pending`, + # this indicates whether or not it now passes. + # + # source://rspec-core//lib/rspec/core/metadata.rb#442 + def pending_fixed; end + + # @return [Boolean] For examples tagged with `:pending`, + # this indicates whether or not it now passes. + # + # source://rspec-core//lib/rspec/core/metadata.rb#442 + def pending_fixed=(_arg0); end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/example.rb#588 + def pending_fixed?; end + + # @return [String, nil] The reason the example was pending, + # or nil if the example was not pending. + # + # source://rspec-core//lib/rspec/core/metadata.rb#442 + def pending_message; end + + # @return [String, nil] The reason the example was pending, + # or nil if the example was not pending. + # + # source://rspec-core//lib/rspec/core/metadata.rb#442 + def pending_message=(_arg0); end + + # Records the finished status of the example. + # + # @api private + # + # source://rspec-core//lib/rspec/core/example.rb#603 + def record_finished(status, finished_at); end + + # @return [Float] How long the example took in seconds. + # + # source://rspec-core//lib/rspec/core/metadata.rb#442 + def run_time; end + + # @return [Float] How long the example took in seconds. + # + # source://rspec-core//lib/rspec/core/metadata.rb#442 + def run_time=(_arg0); end + + # @return [Time] When the example started. + # + # source://rspec-core//lib/rspec/core/metadata.rb#442 + def started_at; end + + # @return [Time] When the example started. + # + # source://rspec-core//lib/rspec/core/metadata.rb#442 + def started_at=(_arg0); end + + # @return [Symbol] `:passed`, `:failed` or `:pending`. + # + # source://rspec-core//lib/rspec/core/metadata.rb#442 + def status; end + + # @return [Symbol] `:passed`, `:failed` or `:pending`. + # + # source://rspec-core//lib/rspec/core/metadata.rb#442 + def status=(_arg0); end + + private + + # source://rspec-core//lib/rspec/core/example.rb#616 + def calculate_run_time(finished_at); end + + # source://rspec-core//lib/rspec/core/example.rb#634 + def get_value(name); end + + # For backwards compatibility we present `status` as a string + # when presenting the legacy hash interface. + # + # source://rspec-core//lib/rspec/core/example.rb#623 + def hash_for_delegation; end + + # source://rspec-core//lib/rspec/core/example.rb#642 + def issue_deprecation(_method_name, *_args); end + + # source://rspec-core//lib/rspec/core/example.rb#629 + def set_value(name, value); end +end + +# Wraps both a `Proc` and an {Example} for use in {Hooks#around +# around} hooks. In around hooks we need to yield this special +# kind of object (rather than the raw {Example}) because when +# there are multiple `around` hooks we have to wrap them recursively. +# +# @example +# +# RSpec.configure do |c| +# c.around do |ex| # Procsy which wraps the example +# if ex.metadata[:key] == :some_value && some_global_condition +# raise "some message" +# end +# ex.run # run delegates to ex.call. +# end +# end +# @note This class also exposes the instance methods of {Example}, +# proxying them through to the wrapped {Example} instance. +# +# source://rspec-core//lib/rspec/core/example.rb#331 +class RSpec::Core::Example::Procsy + # @return [Procsy] a new instance of Procsy + # + # source://rspec-core//lib/rspec/core/example.rb#362 + def initialize(example, &block); end + + # source://rspec-core//lib/rspec/core/example.rb#346 + def <<(*a, &b); end + + # source://rspec-core//lib/rspec/core/example.rb#346 + def ==(*a, &b); end + + # source://rspec-core//lib/rspec/core/example.rb#346 + def ===(*a, &b); end + + # source://rspec-core//lib/rspec/core/example.rb#346 + def >>(*a, &b); end + + # source://rspec-core//lib/rspec/core/example.rb#346 + def [](*a, &b); end + + # source://rspec-core//lib/rspec/core/example.rb#346 + def arity(*a, &b); end + + # source://rspec-core//lib/rspec/core/example.rb#346 + def binding(*a, &b); end + + # Calls the proc and notes that the example has been executed. + # + # source://rspec-core//lib/rspec/core/example.rb#350 + def call(*args, &block); end + + # source://rspec-core//lib/rspec/core/example.rb#339 + def clock(*a, &b); end + + # source://rspec-core//lib/rspec/core/example.rb#339 + def clock=(*a, &b); end + + # source://rspec-core//lib/rspec/core/example.rb#346 + def clone(*a, &b); end + + # source://rspec-core//lib/rspec/core/example.rb#346 + def curry(*a, &b); end + + # source://rspec-core//lib/rspec/core/example.rb#339 + def description(*a, &b); end + + # source://rspec-core//lib/rspec/core/example.rb#346 + def dup(*a, &b); end + + # source://rspec-core//lib/rspec/core/example.rb#339 + def duplicate_with(*a, &b); end + + # source://rspec-core//lib/rspec/core/example.rb#346 + def eql?(*a, &b); end + + # The {Example} instance. + # + # source://rspec-core//lib/rspec/core/example.rb#333 + def example; end + + # source://rspec-core//lib/rspec/core/example.rb#339 + def example_group(*a, &b); end + + # source://rspec-core//lib/rspec/core/example.rb#339 + def example_group_instance(*a, &b); end + + # source://rspec-core//lib/rspec/core/example.rb#339 + def exception(*a, &b); end + + # Indicates whether or not the around hook has executed the example. + # + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/example.rb#374 + def executed?; end + + # source://rspec-core//lib/rspec/core/example.rb#339 + def execution_result(*a, &b); end + + # source://rspec-core//lib/rspec/core/example.rb#339 + def file_path(*a, &b); end + + # source://rspec-core//lib/rspec/core/example.rb#339 + def full_description(*a, &b); end + + # source://rspec-core//lib/rspec/core/example.rb#346 + def hash(*a, &b); end + + # source://rspec-core//lib/rspec/core/example.rb#339 + def id(*a, &b); end + + # @private + # + # source://rspec-core//lib/rspec/core/example.rb#379 + def inspect; end + + # source://rspec-core//lib/rspec/core/example.rb#339 + def inspect_output(*a, &b); end + + # source://rspec-core//lib/rspec/core/example.rb#346 + def lambda?(*a, &b); end + + # source://rspec-core//lib/rspec/core/example.rb#339 + def location(*a, &b); end + + # source://rspec-core//lib/rspec/core/example.rb#339 + def location_rerun_argument(*a, &b); end + + # source://rspec-core//lib/rspec/core/example.rb#339 + def metadata(*a, &b); end + + # source://rspec-core//lib/rspec/core/example.rb#346 + def parameters(*a, &b); end + + # source://rspec-core//lib/rspec/core/example.rb#339 + def pending(*a, &b); end + + # source://rspec-core//lib/rspec/core/example.rb#339 + def pending?(*a, &b); end + + # source://rspec-core//lib/rspec/core/example.rb#339 + def reporter(*a, &b); end + + # source://rspec-core//lib/rspec/core/example.rb#339 + def rerun_argument(*a, &b); end + + # source://rspec-core//lib/rspec/core/example.rb#346 + def ruby2_keywords(*a, &b); end + + # Calls the proc and notes that the example has been executed. + # + # source://rspec-core//lib/rspec/core/example.rb#350 + def run(*args, &block); end + + # source://rspec-core//lib/rspec/core/example.rb#339 + def skip(*a, &b); end + + # source://rspec-core//lib/rspec/core/example.rb#339 + def skipped?(*a, &b); end + + # source://rspec-core//lib/rspec/core/example.rb#346 + def source_location(*a, &b); end + + # Provides a wrapped proc that will update our `executed?` state when + # executed. + # + # source://rspec-core//lib/rspec/core/example.rb#358 + def to_proc; end + + # source://rspec-core//lib/rspec/core/example.rb#339 + def update_inherited_metadata(*a, &b); end + + # @private + # + # source://rspec-core//lib/rspec/core/example.rb#369 + def wrap(&block); end + + # source://rspec-core//lib/rspec/core/example.rb#346 + def yield(*a, &b); end +end + +# ExampleGroup and {Example} are the main structural elements of +# rspec-core. Consider this example: +# +# RSpec.describe Thing do +# it "does something" do +# end +# end +# +# The object returned by `describe Thing` is a subclass of ExampleGroup. +# The object returned by `it "does something"` is an instance of Example, +# which serves as a wrapper for an instance of the ExampleGroup in which it +# is declared. +# +# Example group bodies (e.g. `describe` or `context` blocks) are evaluated +# in the context of a new subclass of ExampleGroup. Individual examples are +# evaluated in the context of an instance of the specific ExampleGroup +# subclass to which they belong. +# +# Besides the class methods defined here, there are other interesting macros +# defined in {Hooks}, {MemoizedHelpers::ClassMethods} and +# {SharedExampleGroup}. There are additional instance methods available to +# your examples defined in {MemoizedHelpers} and {Pending}. +# +# source://rspec-core//lib/rspec/core/example_group.rb#29 +class RSpec::Core::ExampleGroup + include ::RSpec::Core::MemoizedHelpers + include ::RSpec::Core::Pending + extend ::RSpec::Core::Hooks + extend ::RSpec::Core::MemoizedHelpers::ClassMethods + extend ::RSpec::Core::SharedExampleGroup + + # source://rspec-core//lib/rspec/core/example_group.rb#707 + def initialize(inspect_output = T.unsafe(nil)); end + + # Returns the class or module passed to the `describe` method (or alias). + # Returns nil if the subject is not a class or module. + # + # @example + # RSpec.describe Thing do + # it "does something" do + # described_class == Thing + # end + # end + # + # source://rspec-core//lib/rspec/core/example_group.rb#99 + def described_class; end + + # source://rspec-core//lib/rspec/core/example_group.rb#713 + def inspect; end + + private + + # source://rspec-core//lib/rspec/core/example_group.rb#758 + def method_missing(name, *args, **_arg2); end + + class << self + # Adds an example to the example group + # + # source://rspec-core//lib/rspec/core/example_group.rb#367 + def add_example(example); end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#529 + def before_context_ivars; end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#466 + def children; end + + # source://rspec-core//lib/rspec/core/example_group.rb#247 + def context(*args, &example_group_block); end + + # Returns true if a `before(:context)` or `after(:context)` + # hook is currently executing. + # + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/example_group.rb#542 + def currently_executing_a_context_hook?; end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#667 + def declaration_locations; end + + # @private + # @see DSL#describe + # + # source://rspec-core//lib/rspec/core/example_group.rb#246 + def define_example_group_method(name, metadata = T.unsafe(nil)); end + + # @example + # $1 "does something", :slow, :load_factor => 100 do + # end + # + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#145 + def define_example_method(name, extra_options = T.unsafe(nil)); end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#317 + def define_nested_shared_group_method(new_name, report_label = T.unsafe(nil)); end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#76 + def delegate_to_metadata(*names); end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#460 + def descendant_filtered_examples; end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#503 + def descendants; end + + # source://rspec-core//lib/rspec/core/example_group.rb#247 + def describe(*args, &example_group_block); end + + # source://rspec-core//lib/rspec/core/example_group.rb#78 + def described_class; end + + # @return [String] the current example group description + # + # source://rspec-core//lib/rspec/core/example_group.rb#85 + def description; end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#700 + def each_instance_variable_for_example(group); end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#518 + def ensure_example_groups_are_configured; end + + # Defines an example within a group. + # + # @example + # example do + # end + # + # example "does something" do + # end + # + # example "does something", :slow, :uses_js do + # end + # + # example "does something", :with => 'additional metadata' do + # end + # + # example "does something" do |ex| + # # ex is the Example object that contains metadata about the example + # end + # @overload example + # @overload example + # @overload example + # @overload example + # @yield [Example] the example object + # + # source://rspec-core//lib/rspec/core/example_group.rb#146 + def example(*all_args, &block); end + + # source://rspec-core//lib/rspec/core/example_group.rb#247 + def example_group(*args, &example_group_block); end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#450 + def examples; end + + # source://rspec-core//lib/rspec/core/example_group.rb#247 + def fcontext(*args, &example_group_block); end + + # source://rspec-core//lib/rspec/core/example_group.rb#247 + def fdescribe(*args, &example_group_block); end + + # Shortcut to define an example with `:focus => true`. + # + # @example + # fexample do + # end + # + # fexample "does something" do + # end + # + # fexample "does something", :slow, :uses_js do + # end + # + # fexample "does something", :with => 'additional metadata' do + # end + # + # fexample "does something" do |ex| + # # ex is the Example object that contains metadata about the example + # end + # @overload fexample + # @overload fexample + # @overload fexample + # @overload fexample + # @see example + # @yield [Example] the example object + # + # source://rspec-core//lib/rspec/core/example_group.rb#146 + def fexample(*all_args, &block); end + + # source://rspec-core//lib/rspec/core/example_group.rb#78 + def file_path; end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#455 + def filtered_examples; end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#379 + def find_and_eval_shared(label, name, inclusion_location, *args, &customization_block); end + + # Shortcut to define an example with `:focus => true`. + # + # @example + # fit do + # end + # + # fit "does something" do + # end + # + # fit "does something", :slow, :uses_js do + # end + # + # fit "does something", :with => 'additional metadata' do + # end + # + # fit "does something" do |ex| + # # ex is the Example object that contains metadata about the example + # end + # @overload fit + # @overload fit + # @overload fit + # @overload fit + # @see example + # @yield [Example] the example object + # + # source://rspec-core//lib/rspec/core/example_group.rb#146 + def fit(*all_args, &block); end + + # Shortcut to define an example with `:focus => true`. + # + # @example + # focus do + # end + # + # focus "does something" do + # end + # + # focus "does something", :slow, :uses_js do + # end + # + # focus "does something", :with => 'additional metadata' do + # end + # + # focus "does something" do |ex| + # # ex is the Example object that contains metadata about the example + # end + # @overload focus + # @overload focus + # @overload focus + # @overload focus + # @see example + # @yield [Example] the example object + # + # source://rspec-core//lib/rspec/core/example_group.rb#146 + def focus(*all_args, &block); end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#655 + def for_filtered_examples(reporter, &block); end + + # Shortcut to define an example with `:focus => true`. + # + # @example + # fspecify do + # end + # + # fspecify "does something" do + # end + # + # fspecify "does something", :slow, :uses_js do + # end + # + # fspecify "does something", :with => 'additional metadata' do + # end + # + # fspecify "does something" do |ex| + # # ex is the Example object that contains metadata about the example + # end + # @overload fspecify + # @overload fspecify + # @overload fspecify + # @overload fspecify + # @see example + # @yield [Example] the example object + # + # source://rspec-core//lib/rspec/core/example_group.rb#146 + def fspecify(*all_args, &block); end + + # @return [String] the unique id of this example group. Pass + # this at the command line to re-run this exact example group. + # + # source://rspec-core//lib/rspec/core/example_group.rb#675 + def id; end + + # Define a singleton method for the singleton class (remove the method if + # it's already been defined). + # + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#40 + def idempotently_define_singleton_method(name, &definition); end + + # Includes shared content mapped to `name` directly in the group in which + # it is declared, as opposed to `it_behaves_like`, which creates a nested + # group. If given a block, that block is also eval'd in the current + # context. + # + # @see SharedExampleGroup + # + # source://rspec-core//lib/rspec/core/example_group.rb#343 + def include_context(name, *args, &block); end + + # Includes shared content mapped to `name` directly in the group in which + # it is declared, as opposed to `it_behaves_like`, which creates a nested + # group. If given a block, that block is also eval'd in the current + # context. + # + # @see SharedExampleGroup + # + # source://rspec-core//lib/rspec/core/example_group.rb#353 + def include_examples(name, *args, &block); end + + # Defines an example within a group. + # This is the primary API to define a code example. + # + # @example + # it do + # end + # + # it "does something" do + # end + # + # it "does something", :slow, :uses_js do + # end + # + # it "does something", :with => 'additional metadata' do + # end + # + # it "does something" do |ex| + # # ex is the Example object that contains metadata about the example + # end + # @overload it + # @overload it + # @overload it + # @overload it + # @yield [Example] the example object + # + # source://rspec-core//lib/rspec/core/example_group.rb#146 + def it(*all_args, &block); end + + # source://rspec-core//lib/rspec/core/example_group.rb#318 + def it_behaves_like(name, *args, &customization_block); end + + # source://rspec-core//lib/rspec/core/example_group.rb#318 + def it_should_behave_like(name, *args, &customization_block); end + + # source://rspec-core//lib/rspec/core/example_group.rb#78 + def location; end + + # The [Metadata](Metadata) object associated with this group. + # + # @see Metadata + # + # source://rspec-core//lib/rspec/core/example_group.rb#51 + def metadata; end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#485 + def next_runnable_index_for(file); end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#625 + def ordering_strategy; end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#508 + def parent_groups; end + + # Shortcut to define an example with `:pending => true` + # + # @example + # pending do + # end + # + # pending "does something" do + # end + # + # pending "does something", :slow, :uses_js do + # end + # + # pending "does something", :with => 'additional metadata' do + # end + # + # pending "does something" do |ex| + # # ex is the Example object that contains metadata about the example + # end + # @overload pending + # @overload pending + # @overload pending + # @overload pending + # @see example + # @yield [Example] the example object + # + # source://rspec-core//lib/rspec/core/example_group.rb#146 + def pending(*all_args, &block); end + + # Removes an example from the example group + # + # source://rspec-core//lib/rspec/core/example_group.rb#373 + def remove_example(example); end + + # Clear memoized values when adding/removing examples + # + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#359 + def reset_memoized; end + + # Runs all the examples in this group. + # + # source://rspec-core//lib/rspec/core/example_group.rb#599 + def run(reporter = T.unsafe(nil)); end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#585 + def run_after_context_hooks(example_group_instance); end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#547 + def run_before_context_hooks(example_group_instance); end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#641 + def run_examples(reporter); end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#410 + def set_it_up(description, args, registration_collection, &example_group_block); end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#685 + def set_ivars(instance, ivars); end + + # Shortcut to define an example with `:skip => true` + # + # @example + # skip do + # end + # + # skip "does something" do + # end + # + # skip "does something", :slow, :uses_js do + # end + # + # skip "does something", :with => 'additional metadata' do + # end + # + # skip "does something" do |ex| + # # ex is the Example object that contains metadata about the example + # end + # @overload skip + # @overload skip + # @overload skip + # @overload skip + # @see example + # @yield [Example] the example object + # + # source://rspec-core//lib/rspec/core/example_group.rb#146 + def skip(*all_args, &block); end + + # Defines an example within a group. + # Useful for when your docstring does not read well off of `it`. + # + # @example + # RSpec.describe MyClass do + # specify "#do_something is deprecated" do + # # ... + # end + # end + # @example + # specify do + # end + # + # specify "does something" do + # end + # + # specify "does something", :slow, :uses_js do + # end + # + # specify "does something", :with => 'additional metadata' do + # end + # + # specify "does something" do |ex| + # # ex is the Example object that contains metadata about the example + # end + # @overload specify + # @overload specify + # @overload specify + # @overload specify + # @yield [Example] the example object + # + # source://rspec-core//lib/rspec/core/example_group.rb#146 + def specify(*all_args, &block); end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#534 + def store_before_context_ivars(example_group_instance); end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#395 + def subclass(parent, description, args, registration_collection, &example_group_block); end + + # :nocov: + # + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#562 + def superclass_before_context_ivars; end + + # @private + # @return [Metadata] belonging to the parent of a nested {ExampleGroup} + # + # source://rspec-core//lib/rspec/core/example_group.rb#71 + def superclass_metadata; end + + # @private + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/example_group.rb#513 + def top_level?; end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#680 + def top_level_description; end + + # Traverses the tree of groups, starting with `self`, then the children, recursively. + # Halts the traversal of a branch of the tree as soon as the passed block returns true. + # Note that siblings groups and their sub-trees will continue to be explored. + # This is intended to make it easy to find the top-most group that satisfies some + # condition. + # + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#476 + def traverse_tree_until(&block); end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#727 + def update_inherited_metadata(updates); end + + # Temporarily replace the provided metadata. + # Intended primarily to allow an example group's singleton class + # to return the metadata of the example that it exists for. This + # is necessary for shared example group inclusion to work properly + # with singleton example groups. + # + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#61 + def with_replaced_metadata(meta); end + + # source://rspec-core//lib/rspec/core/example_group.rb#247 + def xcontext(*args, &example_group_block); end + + # source://rspec-core//lib/rspec/core/example_group.rb#247 + def xdescribe(*args, &example_group_block); end + + # Shortcut to define an example with `:skip => 'Temporarily skipped with xexample'`. + # + # @example + # xexample do + # end + # + # xexample "does something" do + # end + # + # xexample "does something", :slow, :uses_js do + # end + # + # xexample "does something", :with => 'additional metadata' do + # end + # + # xexample "does something" do |ex| + # # ex is the Example object that contains metadata about the example + # end + # @overload xexample + # @overload xexample + # @overload xexample + # @overload xexample + # @see example + # @yield [Example] the example object + # + # source://rspec-core//lib/rspec/core/example_group.rb#146 + def xexample(*all_args, &block); end + + # Shortcut to define an example with `:skip => 'Temporarily skipped with xit'`. + # + # @example + # xit do + # end + # + # xit "does something" do + # end + # + # xit "does something", :slow, :uses_js do + # end + # + # xit "does something", :with => 'additional metadata' do + # end + # + # xit "does something" do |ex| + # # ex is the Example object that contains metadata about the example + # end + # @overload xit + # @overload xit + # @overload xit + # @overload xit + # @see example + # @yield [Example] the example object + # + # source://rspec-core//lib/rspec/core/example_group.rb#146 + def xit(*all_args, &block); end + + # Shortcut to define an example with `:skip => 'Temporarily skipped with xspecify'`. + # + # @example + # xspecify do + # end + # + # xspecify "does something" do + # end + # + # xspecify "does something", :slow, :uses_js do + # end + # + # xspecify "does something", :with => 'additional metadata' do + # end + # + # xspecify "does something" do |ex| + # # ex is the Example object that contains metadata about the example + # end + # @overload xspecify + # @overload xspecify + # @overload xspecify + # @overload xspecify + # @see example + # @yield [Example] the example object + # + # source://rspec-core//lib/rspec/core/example_group.rb#146 + def xspecify(*all_args, &block); end + + private + + # source://rspec-core//lib/rspec/core/example_group.rb#742 + def method_missing(name, *args); end + end +end + +# @private +# +# source://rspec-core//lib/rspec/core/example_group.rb#696 +RSpec::Core::ExampleGroup::INSTANCE_VARIABLE_TO_IGNORE = T.let(T.unsafe(nil), Symbol) + +# Raised when an RSpec API is called in the wrong scope, such as `before` +# being called from within an example rather than from within an example +# group block. +# +# source://rspec-core//lib/rspec/core/example_group.rb#740 +class RSpec::Core::ExampleGroup::WrongScopeError < ::NoMethodError; end + +# Dumps a list of hashes in a pretty, human readable format +# for later parsing. The hashes are expected to have symbol +# keys and string values, and each hash should have the same +# set of keys. +# +# @private +# +# source://rspec-core//lib/rspec/core/example_status_persister.rb#143 +class RSpec::Core::ExampleStatusDumper + # @return [ExampleStatusDumper] a new instance of ExampleStatusDumper + # + # source://rspec-core//lib/rspec/core/example_status_persister.rb#148 + def initialize(examples); end + + # source://rspec-core//lib/rspec/core/example_status_persister.rb#152 + def dump; end + + private + + # source://rspec-core//lib/rspec/core/example_status_persister.rb#188 + def column_widths; end + + # source://rspec-core//lib/rspec/core/example_status_persister.rb#159 + def formatted_header_rows; end + + # source://rspec-core//lib/rspec/core/example_status_persister.rb#176 + def formatted_row_from(row_values); end + + # source://rspec-core//lib/rspec/core/example_status_persister.rb#166 + def formatted_value_rows; end + + # source://rspec-core//lib/rspec/core/example_status_persister.rb#184 + def headers; end + + # source://rspec-core//lib/rspec/core/example_status_persister.rb#172 + def rows; end + + class << self + # source://rspec-core//lib/rspec/core/example_status_persister.rb#144 + def dump(examples); end + end +end + +# Merges together a list of example statuses from this run +# and a list from previous runs (presumably loaded from disk). +# Each example status object is expected to be a hash with +# at least an `:example_id` and a `:status` key. Examples that +# were loaded but not executed (due to filtering, `--fail-fast` +# or whatever) should have a `:status` of `UNKNOWN_STATUS`. +# +# This will produce a new list that: +# - Will be missing examples from previous runs that we know for sure +# no longer exist. +# - Will have the latest known status for any examples that either +# definitively do exist or may still exist. +# - Is sorted by file name and example definition order, so that +# the saved file is easily scannable if users want to inspect it. +# +# @private +# +# source://rspec-core//lib/rspec/core/example_status_persister.rb#74 +class RSpec::Core::ExampleStatusMerger + # @return [ExampleStatusMerger] a new instance of ExampleStatusMerger + # + # source://rspec-core//lib/rspec/core/example_status_persister.rb#79 + def initialize(this_run, from_previous_runs); end + + # source://rspec-core//lib/rspec/core/example_status_persister.rb#85 + def merge; end + + private + + # source://rspec-core//lib/rspec/core/example_status_persister.rb#102 + def delete_previous_examples_that_no_longer_exist; end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/example_status_persister.rb#108 + def example_must_no_longer_exist?(ex_id); end + + # source://rspec-core//lib/rspec/core/example_status_persister.rb#95 + def hash_from(example_list); end + + # source://rspec-core//lib/rspec/core/example_status_persister.rb#124 + def loaded_spec_files; end + + # source://rspec-core//lib/rspec/core/example_status_persister.rb#132 + def sort_value_from(example); end + + # source://rspec-core//lib/rspec/core/example_status_persister.rb#128 + def spec_file_from(ex_id); end + + class << self + # source://rspec-core//lib/rspec/core/example_status_persister.rb#75 + def merge(this_run, from_previous_runs); end + end +end + +# Parses a string that has been previously dumped by ExampleStatusDumper. +# Note that this parser is a bit naive in that it does a simple split on +# "\n" and " | ", with no concern for handling escaping. For now, that's +# OK because the values we plan to persist (example id, status, and perhaps +# example duration) are highly unlikely to contain "\n" or " | " -- after +# all, who puts those in file names? +# +# @private +# +# source://rspec-core//lib/rspec/core/example_status_persister.rb#207 +class RSpec::Core::ExampleStatusParser + # @return [ExampleStatusParser] a new instance of ExampleStatusParser + # + # source://rspec-core//lib/rspec/core/example_status_persister.rb#212 + def initialize(string); end + + # source://rspec-core//lib/rspec/core/example_status_persister.rb#216 + def parse; end + + private + + # source://rspec-core//lib/rspec/core/example_status_persister.rb#226 + def headers; end + + # source://rspec-core//lib/rspec/core/example_status_persister.rb#222 + def parse_row(line); end + + # source://rspec-core//lib/rspec/core/example_status_persister.rb#230 + def split_line(line); end + + class << self + # source://rspec-core//lib/rspec/core/example_status_persister.rb#208 + def parse(string); end + end +end + +# Persists example ids and their statuses so that we can filter +# to just the ones that failed the last time they ran. +# +# @private +# +# source://rspec-core//lib/rspec/core/example_status_persister.rb#8 +class RSpec::Core::ExampleStatusPersister + # @return [ExampleStatusPersister] a new instance of ExampleStatusPersister + # + # source://rspec-core//lib/rspec/core/example_status_persister.rb#18 + def initialize(examples, file_name); end + + # source://rspec-core//lib/rspec/core/example_status_persister.rb#23 + def persist; end + + private + + # source://rspec-core//lib/rspec/core/example_status_persister.rb#40 + def dump_statuses(unparsed_previous_runs); end + + # source://rspec-core//lib/rspec/core/example_status_persister.rb#46 + def statuses_from_this_run; end + + class << self + # source://rspec-core//lib/rspec/core/example_status_persister.rb#9 + def load_from(file_name); end + + # source://rspec-core//lib/rspec/core/example_status_persister.rb#14 + def persist(examples, file_name); end + end +end + +# @private +# +# source://rspec-core//lib/rspec/core/filter_manager.rb#183 +RSpec::Core::ExclusionRules = RSpec::Core::FilterRules + +# @private +# +# source://rspec-core//lib/rspec/core/filter_manager.rb#4 +class RSpec::Core::FilterManager + # @return [FilterManager] a new instance of FilterManager + # + # source://rspec-core//lib/rspec/core/filter_manager.rb#7 + def initialize; end + + # source://rspec-core//lib/rspec/core/filter_manager.rb#22 + def add_ids(rerun_path, scoped_ids); end + + # @api private + # @param file_path [String] + # @param line_numbers [Array] + # + # source://rspec-core//lib/rspec/core/filter_manager.rb#15 + def add_location(file_path, line_numbers); end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/filter_manager.rb#30 + def empty?; end + + # source://rspec-core//lib/rspec/core/filter_manager.rb#57 + def exclude(*args); end + + # source://rspec-core//lib/rspec/core/filter_manager.rb#61 + def exclude_only(*args); end + + # source://rspec-core//lib/rspec/core/filter_manager.rb#65 + def exclude_with_low_priority(*args); end + + # Returns the value of attribute exclusions. + # + # source://rspec-core//lib/rspec/core/filter_manager.rb#5 + def exclusions; end + + # source://rspec-core//lib/rspec/core/filter_manager.rb#69 + def include(*args); end + + # source://rspec-core//lib/rspec/core/filter_manager.rb#73 + def include_only(*args); end + + # source://rspec-core//lib/rspec/core/filter_manager.rb#77 + def include_with_low_priority(*args); end + + # Returns the value of attribute inclusions. + # + # source://rspec-core//lib/rspec/core/filter_manager.rb#5 + def inclusions; end + + # source://rspec-core//lib/rspec/core/filter_manager.rb#34 + def prune(examples); end + + private + + # source://rspec-core//lib/rspec/core/filter_manager.rb#83 + def add_path_to_arrays_filter(filter_key, path, values); end + + # When a user specifies a particular spec location, that takes priority + # over any exclusion filters (such as if the spec is tagged with `:slow` + # and there is a `:slow => true` exclusion filter), but only for specs + # defined in the same file as the location filters. Excluded specs in + # other files should still be excluded. + # + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/filter_manager.rb#101 + def file_scoped_include?(ex_metadata, ids, locations); end + + # source://rspec-core//lib/rspec/core/filter_manager.rb#89 + def prune_conditionally_filtered_examples(examples); end +end + +# @private +# +# source://rspec-core//lib/rspec/core/filter_manager.rb#115 +class RSpec::Core::FilterRules + # @return [FilterRules] a new instance of FilterRules + # + # source://rspec-core//lib/rspec/core/filter_manager.rb#130 + def initialize(rules = T.unsafe(nil)); end + + # source://rspec-core//lib/rspec/core/filter_manager.rb#161 + def [](key); end + + # source://rspec-core//lib/rspec/core/filter_manager.rb#134 + def add(updated); end + + # source://rspec-core//lib/rspec/core/filter_manager.rb#138 + def add_with_low_priority(updated); end + + # source://rspec-core//lib/rspec/core/filter_manager.rb#149 + def clear; end + + # source://rspec-core//lib/rspec/core/filter_manager.rb#153 + def delete(key); end + + # source://rspec-core//lib/rspec/core/filter_manager.rb#173 + def description; end + + # source://rspec-core//lib/rspec/core/filter_manager.rb#169 + def each_pair(&block); end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/filter_manager.rb#165 + def empty?; end + + # source://rspec-core//lib/rspec/core/filter_manager.rb#157 + def fetch(*args, &block); end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/filter_manager.rb#177 + def include_example?(example); end + + # Returns the value of attribute opposite. + # + # source://rspec-core//lib/rspec/core/filter_manager.rb#119 + def opposite; end + + # Sets the attribute opposite + # + # @param value the value to set the attribute opposite to. + # + # source://rspec-core//lib/rspec/core/filter_manager.rb#119 + def opposite=(_arg0); end + + # Returns the value of attribute rules. + # + # source://rspec-core//lib/rspec/core/filter_manager.rb#120 + def rules; end + + # source://rspec-core//lib/rspec/core/filter_manager.rb#144 + def use_only(updated); end + + class << self + # source://rspec-core//lib/rspec/core/filter_manager.rb#122 + def build; end + end +end + +# source://rspec-core//lib/rspec/core/filter_manager.rb#116 +RSpec::Core::FilterRules::PROC_HEX_NUMBER = T.let(T.unsafe(nil), Regexp) + +# source://rspec-core//lib/rspec/core/filter_manager.rb#117 +RSpec::Core::FilterRules::PROJECT_DIR = T.let(T.unsafe(nil), String) + +# Tracks a collection of filterable items (e.g. modules, hooks, etc) +# and provides an optimized API to get the applicable items for the +# metadata of an example or example group. +# +# There are two implementations, optimized for different uses. +# +# @private +# +# source://rspec-core//lib/rspec/core/metadata_filter.rb#87 +module RSpec::Core::FilterableItemRepository; end + +# This implementation is much more complex, and is optimized for +# rare (or hopefully no) updates once the queries start. Updates +# incur a cost as it has to clear the memoization and keep track +# of applicable keys. Queries will be O(N) the first time an item +# is provided with a given set of applicable metadata; subsequent +# queries with items with the same set of applicable metadata will +# be O(1) due to internal memoization. +# +# This is ideal for use by config, where filterable items (e.g. hooks) +# are typically added at the start of the process (e.g. in `spec_helper`) +# and then repeatedly queried as example groups and examples are defined. +# +# @private +# +# source://rspec-core//lib/rspec/core/metadata_filter.rb#151 +class RSpec::Core::FilterableItemRepository::QueryOptimized < ::RSpec::Core::FilterableItemRepository::UpdateOptimized + # @return [QueryOptimized] a new instance of QueryOptimized + # + # source://rspec-core//lib/rspec/core/metadata_filter.rb#155 + def initialize(applies_predicate); end + + # source://rspec-core//lib/rspec/core/metadata_filter.rb#164 + def append(item, metadata); end + + # source://rspec-core//lib/rspec/core/metadata_filter.rb#174 + def delete(item, metadata); end + + # source://rspec-core//lib/rspec/core/metadata_filter.rb#179 + def items_for(metadata); end + + # source://rspec-core//lib/rspec/core/metadata_filter.rb#169 + def prepend(item, metadata); end + + private + + # source://rspec-core//lib/rspec/core/metadata_filter.rb#217 + def applicable_metadata_from(metadata); end + + # source://rspec-core//lib/rspec/core/metadata_filter.rb#118 + def find_items_for(request_meta); end + + # source://rspec-core//lib/rspec/core/metadata_filter.rb#211 + def handle_mutation(metadata); end + + # source://rspec-core//lib/rspec/core/metadata_filter.rb#235 + def proc_keys_from(metadata); end + + # source://rspec-core//lib/rspec/core/metadata_filter.rb#203 + def reconstruct_caches; end +end + +# This implementation is simple, and is optimized for frequent +# updates but rare queries. `append` and `prepend` do no extra +# processing, and no internal memoization is done, since this +# is not optimized for queries. +# +# This is ideal for use by a example or example group, which may +# be updated multiple times with globally configured hooks, etc, +# but will not be queried frequently by other examples or example +# groups. +# +# @private +# +# source://rspec-core//lib/rspec/core/metadata_filter.rb#98 +class RSpec::Core::FilterableItemRepository::UpdateOptimized + # @return [UpdateOptimized] a new instance of UpdateOptimized + # + # source://rspec-core//lib/rspec/core/metadata_filter.rb#101 + def initialize(applies_predicate); end + + # source://rspec-core//lib/rspec/core/metadata_filter.rb#106 + def append(item, metadata); end + + # source://rspec-core//lib/rspec/core/metadata_filter.rb#114 + def delete(item, metadata); end + + # Returns the value of attribute items_and_filters. + # + # source://rspec-core//lib/rspec/core/metadata_filter.rb#99 + def items_and_filters; end + + # source://rspec-core//lib/rspec/core/metadata_filter.rb#118 + def items_for(request_meta); end + + # source://rspec-core//lib/rspec/core/metadata_filter.rb#110 + def prepend(item, metadata); end +end + +# @private +# +# source://rspec-core//lib/rspec/core/flat_map.rb#4 +module RSpec::Core::FlatMap + private + + # :nocov: + # + # source://rspec-core//lib/rspec/core/flat_map.rb#6 + def flat_map(array, &block); end + + class << self + # :nocov: + # + # source://rspec-core//lib/rspec/core/flat_map.rb#6 + def flat_map(array, &block); end + end +end + +# ## Built-in Formatters +# +# * progress (default) - Prints dots for passing examples, `F` for failures, `*` +# for pending. +# * documentation - Prints the docstrings passed to `describe` and `it` methods +# (and their aliases). +# * html +# * json - Useful for archiving data for subsequent analysis. +# +# The progress formatter is the default, but you can choose any one or more of +# the other formatters by passing with the `--format` (or `-f` for short) +# command-line option, e.g. +# +# rspec --format documentation +# +# You can also send the output of multiple formatters to different streams, e.g. +# +# rspec --format documentation --format html --out results.html +# +# This example sends the output of the documentation formatter to `$stdout`, and +# the output of the html formatter to results.html. +# +# ## Custom Formatters +# +# You can tell RSpec to use a custom formatter by passing its path and name to +# the `rspec` command. For example, if you define MyCustomFormatter in +# path/to/my_custom_formatter.rb, you would type this command: +# +# rspec --require path/to/my_custom_formatter.rb --format MyCustomFormatter +# +# The reporter calls every formatter with this protocol: +# +# * To start +# * `start(StartNotification)` +# * Once per example group +# * `example_group_started(GroupNotification)` +# * Once per example +# * `example_started(ExampleNotification)` +# * One of these per example, depending on outcome +# * `example_passed(ExampleNotification)` +# * `example_failed(FailedExampleNotification)` +# * `example_pending(ExampleNotification)` +# * Optionally at any time +# * `message(MessageNotification)` +# * At the end of the suite +# * `stop(ExamplesNotification)` +# * `start_dump(NullNotification)` +# * `dump_pending(ExamplesNotification)` +# * `dump_failures(ExamplesNotification)` +# * `dump_summary(SummaryNotification)` +# * `seed(SeedNotification)` +# * `close(NullNotification)` +# +# Only the notifications to which you subscribe your formatter will be called +# on your formatter. To subscribe your formatter use: +# `RSpec::Core::Formatters#register` e.g. +# +# `RSpec::Core::Formatters.register FormatterClassName, :example_passed, :example_failed` +# +# We recommend you implement the methods yourself; for simplicity we provide the +# default formatter output via our notification objects but if you prefer you +# can subclass `RSpec::Core::Formatters::BaseTextFormatter` and override the +# methods you wish to enhance. +# +# @see RSpec::Core::Formatters::BaseTextFormatter +# @see RSpec::Core::Reporter +# +# source://rspec-core//lib/rspec/core/formatters/console_codes.rb#3 +module RSpec::Core::Formatters + class << self + # Register the formatter class + # + # @param formatter_class [Class] formatter class to register + # @param notifications [Array] one or more notifications to be + # registered to the specified formatter + # @see RSpec::Core::Formatters::BaseFormatter + # + # source://rspec-core//lib/rspec/core/formatters.rb#86 + def register(formatter_class, *notifications); end + end +end + +# Contains common logic for formatters used by `--bisect` to communicate results +# back to the bisect runner. +# +# Subclasses must define a `notify_results(all_example_ids, failed_example_ids)` +# method. +# +# @private +# +# source://rspec-core//lib/rspec/core/formatters/base_bisect_formatter.rb#12 +class RSpec::Core::Formatters::BaseBisectFormatter + # @return [BaseBisectFormatter] a new instance of BaseBisectFormatter + # + # source://rspec-core//lib/rspec/core/formatters/base_bisect_formatter.rb#17 + def initialize(expected_failures); end + + # source://rspec-core//lib/rspec/core/formatters/base_bisect_formatter.rb#23 + def example_failed(notification); end + + # source://rspec-core//lib/rspec/core/formatters/base_bisect_formatter.rb#27 + def example_finished(notification); end + + # source://rspec-core//lib/rspec/core/formatters/base_bisect_formatter.rb#37 + def start_dump(_notification); end + + class << self + # @private + # + # source://rspec-core//lib/rspec/core/formatters/base_bisect_formatter.rb#13 + def inherited(formatter); end + end +end + +# RSpec's built-in formatters are all subclasses of +# RSpec::Core::Formatters::BaseFormatter. +# +# @see RSpec::Core::Formatters::BaseTextFormatter +# @see RSpec::Core::Reporter +# @see RSpec::Core::Formatters::Protocol +# +# source://rspec-core//lib/rspec/core/formatters/base_formatter.rb#13 +class RSpec::Core::Formatters::BaseFormatter + # @api public + # @param output [IO] the formatter output + # @return [BaseFormatter] a new instance of BaseFormatter + # @see RSpec::Core::Formatters::Protocol#initialize + # + # source://rspec-core//lib/rspec/core/formatters/base_formatter.rb#23 + def initialize(output); end + + # @api public + # @param _notification [NullNotification] (Ignored) + # @see RSpec::Core::Formatters::Protocol#close + # + # source://rspec-core//lib/rspec/core/formatters/base_formatter.rb#50 + def close(_notification); end + + # Returns the value of attribute example_group. + # + # source://rspec-core//lib/rspec/core/formatters/base_formatter.rb#17 + def example_group; end + + # Sets the attribute example_group + # + # @param value the value to set the attribute example_group to. + # + # source://rspec-core//lib/rspec/core/formatters/base_formatter.rb#17 + def example_group=(_arg0); end + + # @api public + # @param notification [GroupNotification] containing example_group + # subclass of `RSpec::Core::ExampleGroup` + # @see RSpec::Core::Formatters::Protocol#example_group_started + # + # source://rspec-core//lib/rspec/core/formatters/base_formatter.rb#42 + def example_group_started(notification); end + + # Returns the value of attribute output. + # + # source://rspec-core//lib/rspec/core/formatters/base_formatter.rb#18 + def output; end + + # @api public + # @param notification [StartNotification] + # @see RSpec::Core::Formatters::Protocol#start + # + # source://rspec-core//lib/rspec/core/formatters/base_formatter.rb#32 + def start(notification); end + + private + + # source://rspec-core//lib/rspec/core/formatters/base_formatter.rb#64 + def output_supports_sync; end + + # source://rspec-core//lib/rspec/core/formatters/base_formatter.rb#60 + def restore_sync_output; end + + # source://rspec-core//lib/rspec/core/formatters/base_formatter.rb#56 + def start_sync_output; end +end + +# Base for all of RSpec's built-in formatters. See +# RSpec::Core::Formatters::BaseFormatter to learn more about all of the +# methods called by the reporter. +# +# @see RSpec::Core::Formatters::BaseFormatter +# @see RSpec::Core::Reporter +# +# source://rspec-core//lib/rspec/core/formatters/base_text_formatter.rb#12 +class RSpec::Core::Formatters::BaseTextFormatter < ::RSpec::Core::Formatters::BaseFormatter + # Invoked at the end of a suite run. Allows the formatter to do any + # tidying up, but be aware that formatter output streams may be used + # elsewhere so don't actually close them. + # + # @api public + # @param _notification [NullNotification] (Ignored) + # + # source://rspec-core//lib/rspec/core/formatters/base_text_formatter.rb#65 + def close(_notification); end + + # Dumps detailed information about each example failure. + # + # @api public + # @param notification [NullNotification] + # + # source://rspec-core//lib/rspec/core/formatters/base_text_formatter.rb#30 + def dump_failures(notification); end + + # @private + # + # source://rspec-core//lib/rspec/core/formatters/base_text_formatter.rb#47 + def dump_pending(notification); end + + # This method is invoked after the dumping of examples and failures. + # Each parameter is assigned to a corresponding attribute. + # + # @api public + # @param summary [SummaryNotification] containing duration, + # example_count, failure_count and pending_count + # + # source://rspec-core//lib/rspec/core/formatters/base_text_formatter.rb#42 + def dump_summary(summary); end + + # Used by the reporter to send messages to the output stream. + # + # @api public + # @param notification [MessageNotification] containing message + # + # source://rspec-core//lib/rspec/core/formatters/base_text_formatter.rb#21 + def message(notification); end + + # @private + # + # source://rspec-core//lib/rspec/core/formatters/base_text_formatter.rb#53 + def seed(notification); end +end + +# Used by `--bisect`. When it shells out and runs a portion of the suite, it uses +# this formatter as a means to have the status reported back to it, via DRb. +# +# Note that since DRb calls carry considerable overhead compared to normal +# method calls, we try to minimize the number of DRb calls for perf reasons, +# opting to communicate only at the start and the end of the run, rather than +# after each example. +# +# @private +# +# source://rspec-core//lib/rspec/core/formatters/bisect_drb_formatter.rb#15 +class RSpec::Core::Formatters::BisectDRbFormatter < ::RSpec::Core::Formatters::BaseBisectFormatter + # @return [BisectDRbFormatter] a new instance of BisectDRbFormatter + # + # source://rspec-core//lib/rspec/core/formatters/bisect_drb_formatter.rb#16 + def initialize(_output); end + + # source://rspec-core//lib/rspec/core/formatters/bisect_drb_formatter.rb#23 + def notify_results(results); end +end + +# ConsoleCodes provides helpers for formatting console output +# with ANSI codes, e.g. color's and bold. +# +# source://rspec-core//lib/rspec/core/formatters/console_codes.rb#6 +module RSpec::Core::Formatters::ConsoleCodes + private + + # @private + # + # source://rspec-core//lib/rspec/core/formatters/console_codes.rb#34 + def config_colors_to_methods; end + + # Fetches the correct code for the supplied symbol, or checks + # that a code is valid. Defaults to white (37). + # + # @param code_or_symbol [Symbol, Fixnum] Symbol or code to check + # @return [Fixnum] a console code + # + # source://rspec-core//lib/rspec/core/formatters/console_codes.rb#47 + def console_code_for(code_or_symbol); end + + # Wraps a piece of text in ANSI codes with the supplied code. Will + # only apply the control code if `RSpec.configuration.color_enabled?` + # returns true. + # + # @param text [String] the text to wrap + # @param code_or_symbol [Symbol, Fixnum] the desired control code + # @return [String] the wrapped text + # + # source://rspec-core//lib/rspec/core/formatters/console_codes.rb#66 + def wrap(text, code_or_symbol); end + + class << self + # @private + # + # source://rspec-core//lib/rspec/core/formatters/console_codes.rb#34 + def config_colors_to_methods; end + + # Fetches the correct code for the supplied symbol, or checks + # that a code is valid. Defaults to white (37). + # + # @param code_or_symbol [Symbol, Fixnum] Symbol or code to check + # @return [Fixnum] a console code + # + # source://rspec-core//lib/rspec/core/formatters/console_codes.rb#47 + def console_code_for(code_or_symbol); end + + # Wraps a piece of text in ANSI codes with the supplied code. Will + # only apply the control code if `RSpec.configuration.color_enabled?` + # returns true. + # + # @param text [String] the text to wrap + # @param code_or_symbol [Symbol, Fixnum] the desired control code + # @return [String] the wrapped text + # + # source://rspec-core//lib/rspec/core/formatters/console_codes.rb#66 + def wrap(text, code_or_symbol); end + end +end + +# @private +# +# source://rspec-core//lib/rspec/core/formatters/console_codes.rb#8 +RSpec::Core::Formatters::ConsoleCodes::VT100_CODES = T.let(T.unsafe(nil), Hash) + +# @private +# +# source://rspec-core//lib/rspec/core/formatters/console_codes.rb#29 +RSpec::Core::Formatters::ConsoleCodes::VT100_CODE_VALUES = T.let(T.unsafe(nil), Hash) + +# @private +# +# source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#7 +class RSpec::Core::Formatters::DeprecationFormatter + # @return [DeprecationFormatter] a new instance of DeprecationFormatter + # + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#12 + def initialize(deprecation_stream, summary_stream); end + + # Returns the value of attribute count. + # + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#10 + def count; end + + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#32 + def deprecation(notification); end + + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#44 + def deprecation_message_for(data); end + + # Returns the value of attribute deprecation_stream. + # + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#10 + def deprecation_stream; end + + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#40 + def deprecation_summary(_notification); end + + # Returns the value of attribute deprecation_stream. + # + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#10 + def output; end + + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#20 + def printer; end + + # Returns the value of attribute summary_stream. + # + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#10 + def summary_stream; end +end + +# source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#60 +RSpec::Core::Formatters::DeprecationFormatter::DEPRECATION_STREAM_NOTICE = T.let(T.unsafe(nil), String) + +# @private +# +# source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#135 +class RSpec::Core::Formatters::DeprecationFormatter::DelayedPrinter + # @return [DelayedPrinter] a new instance of DelayedPrinter + # + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#140 + def initialize(deprecation_stream, summary_stream, deprecation_formatter); end + + # Returns the value of attribute deprecation_formatter. + # + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#138 + def deprecation_formatter; end + + # Returns the value of attribute deprecation_stream. + # + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#138 + def deprecation_stream; end + + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#163 + def deprecation_summary; end + + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#172 + def print_deferred_deprecation_warnings; end + + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#148 + def print_deprecation_message(data); end + + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#155 + def stash_deprecation_message(deprecation_message); end + + # Returns the value of attribute summary_stream. + # + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#138 + def summary_stream; end +end + +# source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#136 +RSpec::Core::Formatters::DeprecationFormatter::DelayedPrinter::TOO_MANY_USES_LIMIT = T.let(T.unsafe(nil), Integer) + +# Wraps a File object and provides file-specific operations. +# +# @private +# +# source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#196 +class RSpec::Core::Formatters::DeprecationFormatter::FileStream + # @return [FileStream] a new instance of FileStream + # + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#197 + def initialize(file); end + + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#207 + def puts(*args); end + + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#211 + def summarize(summary_stream, deprecation_count); end +end + +# @private +# +# source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#94 +class RSpec::Core::Formatters::DeprecationFormatter::GeneratedDeprecationMessage < ::Struct + # @return [GeneratedDeprecationMessage] a new instance of GeneratedDeprecationMessage + # + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#95 + def initialize(data); end + + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#100 + def to_s; end + + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#107 + def too_many_warnings_message; end + + # Returns the value of attribute type + # + # @return [Object] the current value of type + def type; end + + # Sets the attribute type + # + # @param value [Object] the value to set the attribute type to. + # @return [Object] the newly set value + def type=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# @private +# +# source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#113 +class RSpec::Core::Formatters::DeprecationFormatter::ImmediatePrinter + # @return [ImmediatePrinter] a new instance of ImmediatePrinter + # + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#116 + def initialize(deprecation_stream, summary_stream, deprecation_formatter); end + + # Returns the value of attribute deprecation_formatter. + # + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#114 + def deprecation_formatter; end + + # Returns the value of attribute deprecation_stream. + # + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#114 + def deprecation_stream; end + + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#128 + def deprecation_summary; end + + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#123 + def print_deprecation_message(data); end + + # Returns the value of attribute summary_stream. + # + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#114 + def summary_stream; end +end + +# source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#52 +RSpec::Core::Formatters::DeprecationFormatter::RAISE_ERROR_CONFIG_NOTICE = T.let(T.unsafe(nil), String) + +# Not really a stream, but is usable in place of one. +# +# @private +# +# source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#184 +class RSpec::Core::Formatters::DeprecationFormatter::RaiseErrorStream + # @raise [DeprecationError] + # + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#185 + def puts(message); end + + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#189 + def summarize(summary_stream, deprecation_count); end +end + +# @private +# +# source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#66 +class RSpec::Core::Formatters::DeprecationFormatter::SpecifiedDeprecationMessage < ::Struct + # @return [SpecifiedDeprecationMessage] a new instance of SpecifiedDeprecationMessage + # + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#67 + def initialize(data); end + + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#72 + def to_s; end + + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#76 + def too_many_warnings_message; end + + # Returns the value of attribute type + # + # @return [Object] the current value of type + def type; end + + # Sets the attribute type + # + # @param value [Object] the value to set the attribute type to. + # @return [Object] the newly set value + def type=(_); end + + private + + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#88 + def deprecation_type_for(data); end + + # source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#82 + def output_formatted(str); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://rspec-core//lib/rspec/core/formatters/deprecation_formatter.rb#62 +RSpec::Core::Formatters::DeprecationFormatter::TOO_MANY_WARNINGS_NOTICE = T.let(T.unsafe(nil), String) + +# @private +# +# source://rspec-core//lib/rspec/core/formatters/documentation_formatter.rb#8 +class RSpec::Core::Formatters::DocumentationFormatter < ::RSpec::Core::Formatters::BaseTextFormatter + # @return [DocumentationFormatter] a new instance of DocumentationFormatter + # + # source://rspec-core//lib/rspec/core/formatters/documentation_formatter.rb#12 + def initialize(output); end + + # source://rspec-core//lib/rspec/core/formatters/documentation_formatter.rb#50 + def example_failed(failure); end + + # source://rspec-core//lib/rspec/core/formatters/documentation_formatter.rb#31 + def example_group_finished(_notification); end + + # source://rspec-core//lib/rspec/core/formatters/documentation_formatter.rb#24 + def example_group_started(notification); end + + # source://rspec-core//lib/rspec/core/formatters/documentation_formatter.rb#35 + def example_passed(passed); end + + # source://rspec-core//lib/rspec/core/formatters/documentation_formatter.rb#42 + def example_pending(pending); end + + # source://rspec-core//lib/rspec/core/formatters/documentation_formatter.rb#20 + def example_started(_notification); end + + # source://rspec-core//lib/rspec/core/formatters/documentation_formatter.rb#57 + def message(notification); end + + private + + # source://rspec-core//lib/rspec/core/formatters/documentation_formatter.rb#96 + def current_indentation(offset = T.unsafe(nil)); end + + # source://rspec-core//lib/rspec/core/formatters/documentation_formatter.rb#85 + def failure_output(example); end + + # source://rspec-core//lib/rspec/core/formatters/documentation_formatter.rb#67 + def flush_messages; end + + # source://rspec-core//lib/rspec/core/formatters/documentation_formatter.rb#91 + def next_failure_index; end + + # source://rspec-core//lib/rspec/core/formatters/documentation_formatter.rb#75 + def passed_output(example); end + + # source://rspec-core//lib/rspec/core/formatters/documentation_formatter.rb#79 + def pending_output(example, message); end +end + +# @private +# +# source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#11 +class RSpec::Core::Formatters::ExceptionPresenter + # @return [ExceptionPresenter] a new instance of ExceptionPresenter + # + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#16 + def initialize(exception, example, options = T.unsafe(nil)); end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#73 + def colorized_formatted_backtrace(colorizer = T.unsafe(nil)); end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#33 + def colorized_message_lines(colorizer = T.unsafe(nil)); end + + # Returns the value of attribute description. + # + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#12 + def description; end + + # Returns the value of attribute example. + # + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#12 + def example; end + + # Returns the value of attribute exception. + # + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#12 + def exception; end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#39 + def formatted_backtrace(exception = T.unsafe(nil)); end + + # :nocov: + # + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#45 + def formatted_cause(exception); end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#79 + def fully_formatted(failure_number, colorizer = T.unsafe(nil)); end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#84 + def fully_formatted_lines(failure_number, colorizer); end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#29 + def message_lines; end + + private + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#207 + def add_shared_group_lines(lines, colorizer); end + + # Returns the value of attribute backtrace_formatter. + # + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#12 + def backtrace_formatter; end + + # Returns the value of attribute detail_formatter. + # + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#12 + def detail_formatter; end + + # for 1.8.7 + # + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#265 + def encoded_description(description); end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#115 + def encoded_string(string); end + + # :nocov: + # + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#111 + def encoding_of(string); end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#275 + def exception_backtrace; end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#145 + def exception_class_name(exception = T.unsafe(nil)); end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#185 + def exception_lines; end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#178 + def exception_message_string(exception); end + + # Returns the value of attribute extra_detail_formatter. + # + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#12 + def extra_detail_formatter; end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#196 + def extra_failure_lines; end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#151 + def failure_lines; end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#165 + def failure_slash_error_lines; end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#99 + def final_exception(exception, previous = T.unsafe(nil)); end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#241 + def find_failed_line; end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#256 + def formatted_message_and_backtrace(colorizer); end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#129 + def indent_lines(lines, failure_number); end + + # Returns the value of attribute message_color. + # + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#12 + def message_color; end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#217 + def read_failed_lines; end +end + +# Configuring the `ExceptionPresenter` with the right set of options to handle +# pending vs failed vs skipped and aggregated (or not) failures is not simple. +# This class takes care of building an appropriate `ExceptionPresenter` for the +# provided example. +# +# @private +# +# source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#284 +class RSpec::Core::Formatters::ExceptionPresenter::Factory + # @return [Factory] a new instance of Factory + # + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#291 + def initialize(example); end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#285 + def build; end + + private + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#342 + def multiple_exception_summarizer(exception, prior_detail_formatter, color); end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#338 + def multiple_exceptions_error?(exception); end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#301 + def options; end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#305 + def pending_options; end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#363 + def sub_failure_list_formatter(exception, message_color); end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#322 + def with_multiple_error_options_as_needed(exception, options); end +end + +# @private +# +# source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#396 +class RSpec::Core::Formatters::ExceptionPresenter::Factory::CommonBacktraceTruncater + # @return [CommonBacktraceTruncater] a new instance of CommonBacktraceTruncater + # + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#397 + def initialize(parent); end + + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#401 + def with_truncated_backtrace(child); end +end + +# Used to prevent a confusing backtrace from showing up from the `aggregate_failures` +# block declared for `:aggregate_failures` metadata. +# +# @private +# +# source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#389 +module RSpec::Core::Formatters::ExceptionPresenter::Factory::EmptyBacktraceFormatter + class << self + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#390 + def format_backtrace(*_arg0); end + end +end + +# @private +# +# source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#421 +RSpec::Core::Formatters::ExceptionPresenter::PENDING_DETAIL_FORMATTER = T.let(T.unsafe(nil), Proc) + +# @private +# +# source://rspec-core//lib/rspec/core/formatters/failure_list_formatter.rb#7 +class RSpec::Core::Formatters::FailureListFormatter < ::RSpec::Core::Formatters::BaseFormatter + # Discard profile and messages + # + # These outputs are not really relevant in the context of this failure + # list formatter. + # + # source://rspec-core//lib/rspec/core/formatters/failure_list_formatter.rb#18 + def dump_profile(_profile); end + + # source://rspec-core//lib/rspec/core/formatters/failure_list_formatter.rb#10 + def example_failed(failure); end + + # source://rspec-core//lib/rspec/core/formatters/failure_list_formatter.rb#19 + def message(_message); end +end + +# Formatter for providing message output as a fallback when no other +# profiler implements #message +# +# @api private +# +# source://rspec-core//lib/rspec/core/formatters/fallback_message_formatter.rb#7 +class RSpec::Core::Formatters::FallbackMessageFormatter + # @api private + # @return [FallbackMessageFormatter] a new instance of FallbackMessageFormatter + # + # source://rspec-core//lib/rspec/core/formatters/fallback_message_formatter.rb#10 + def initialize(output); end + + # Used by the reporter to send messages to the output stream. + # + # @api public + # @param notification [MessageNotification] containing message + # + # source://rspec-core//lib/rspec/core/formatters/fallback_message_formatter.rb#22 + def message(notification); end + + # @api private + # @private + # + # source://rspec-core//lib/rspec/core/formatters/fallback_message_formatter.rb#15 + def output; end +end + +# Formatters helpers. +# +# source://rspec-core//lib/rspec/core/formatters/helpers.rb#7 +module RSpec::Core::Formatters::Helpers + class << self + # Formats seconds into a human-readable string. + # + # @api private + # @example + # format_duration(1) #=> "1 minute 1 second" + # format_duration(135.14) #=> "2 minutes 15.14 seconds" + # @param duration [Float, Fixnum] in seconds + # @return [String] human-readable time + # + # source://rspec-core//lib/rspec/core/formatters/helpers.rb#24 + def format_duration(duration); end + + # Formats seconds to have 5 digits of precision with trailing zeros + # removed if the number is less than 1 or with 2 digits of precision if + # the number is greater than zero. + # + # The precision used is set in {Helpers::SUB_SECOND_PRECISION} and + # {Helpers::DEFAULT_PRECISION}. + # + # @api private + # @example + # format_seconds(0.000006) #=> "0.00001" + # format_seconds(0.020000) #=> "0.02" + # format_seconds(1.00000000001) #=> "1" + # @param float [Float] + # @return [String] formatted float + # @see #strip_trailing_zeroes + # + # source://rspec-core//lib/rspec/core/formatters/helpers.rb#60 + def format_seconds(float, precision = T.unsafe(nil)); end + + # Given a list of example ids, organizes them into a compact, ordered list. + # + # @api private + # + # source://rspec-core//lib/rspec/core/formatters/helpers.rb#102 + def organize_ids(ids); end + + # Pluralize a word based on a count. + # + # @api private + # @param count [Fixnum] number of objects + # @param string [String] word to be pluralized + # @return [String] pluralized word + # + # source://rspec-core//lib/rspec/core/formatters/helpers.rb#88 + def pluralize(count, string); end + + private + + # Remove trailing zeros from a string. + # + # Only remove trailing zeros after a decimal place. + # see: http://rubular.com/r/ojtTydOgpn + # + # @api private + # @param string [String] string with trailing zeros + # @return [String] string with trailing zeros removed + # + # source://rspec-core//lib/rspec/core/formatters/helpers.rb#76 + def strip_trailing_zeroes(string); end + end +end + +# @private +# +# source://rspec-core//lib/rspec/core/formatters/helpers.rb#12 +RSpec::Core::Formatters::Helpers::DEFAULT_PRECISION = T.let(T.unsafe(nil), Integer) + +# @private +# +# source://rspec-core//lib/rspec/core/formatters/helpers.rb#9 +RSpec::Core::Formatters::Helpers::SUB_SECOND_PRECISION = T.let(T.unsafe(nil), Integer) + +# @private +# +# source://rspec-core//lib/rspec/core/formatters/html_formatter.rb#8 +class RSpec::Core::Formatters::HtmlFormatter < ::RSpec::Core::Formatters::BaseFormatter + # @return [HtmlFormatter] a new instance of HtmlFormatter + # + # source://rspec-core//lib/rspec/core/formatters/html_formatter.rb#13 + def initialize(output); end + + # source://rspec-core//lib/rspec/core/formatters/html_formatter.rb#103 + def dump_summary(summary); end + + # source://rspec-core//lib/rspec/core/formatters/html_formatter.rb#55 + def example_failed(failure); end + + # source://rspec-core//lib/rspec/core/formatters/html_formatter.rb#28 + def example_group_started(notification); end + + # source://rspec-core//lib/rspec/core/formatters/html_formatter.rb#49 + def example_passed(passed); end + + # source://rspec-core//lib/rspec/core/formatters/html_formatter.rb#93 + def example_pending(pending); end + + # source://rspec-core//lib/rspec/core/formatters/html_formatter.rb#45 + def example_started(_notification); end + + # source://rspec-core//lib/rspec/core/formatters/html_formatter.rb#22 + def start(notification); end + + # source://rspec-core//lib/rspec/core/formatters/html_formatter.rb#40 + def start_dump(_notification); end + + private + + # The number of the currently running example_group. + # + # source://rspec-core//lib/rspec/core/formatters/html_formatter.rb#120 + def example_group_number; end + + # The number of the currently running example (a global counter). + # + # source://rspec-core//lib/rspec/core/formatters/html_formatter.rb#125 + def example_number; end + + # Override this method if you wish to output extra HTML for a failed + # spec. For example, you could output links to images or other files + # produced during the specs. + # + # source://rspec-core//lib/rspec/core/formatters/html_formatter.rb#141 + def extra_failure_content(failure); end + + # source://rspec-core//lib/rspec/core/formatters/html_formatter.rb#130 + def percent_done; end +end + +# @private +# +# source://rspec-core//lib/rspec/core/formatters/html_printer.rb#7 +class RSpec::Core::Formatters::HtmlPrinter + include ::ERB::Util + + # @return [HtmlPrinter] a new instance of HtmlPrinter + # + # source://rspec-core//lib/rspec/core/formatters/html_printer.rb#9 + def initialize(output); end + + # source://rspec-core//lib/rspec/core/formatters/html_printer.rb#79 + def flush; end + + # source://rspec-core//lib/rspec/core/formatters/html_printer.rb#96 + def make_example_group_header_red(group_id); end + + # source://rspec-core//lib/rspec/core/formatters/html_printer.rb#103 + def make_example_group_header_yellow(group_id); end + + # source://rspec-core//lib/rspec/core/formatters/html_printer.rb#88 + def make_header_red; end + + # source://rspec-core//lib/rspec/core/formatters/html_printer.rb#92 + def make_header_yellow; end + + # source://rspec-core//lib/rspec/core/formatters/html_printer.rb#83 + def move_progress(percent_done); end + + # source://rspec-core//lib/rspec/core/formatters/html_printer.rb#36 + def print_example_failed(pending_fixed, description, run_time, failure_id, exception, extra_content); end + + # source://rspec-core//lib/rspec/core/formatters/html_printer.rb#18 + def print_example_group_end; end + + # source://rspec-core//lib/rspec/core/formatters/html_printer.rb#23 + def print_example_group_start(group_id, description, number_of_parents); end + + # source://rspec-core//lib/rspec/core/formatters/html_printer.rb#29 + def print_example_passed(description, run_time); end + + # source://rspec-core//lib/rspec/core/formatters/html_printer.rb#53 + def print_example_pending(description, pending_message); end + + # source://rspec-core//lib/rspec/core/formatters/html_printer.rb#13 + def print_html_start; end + + # source://rspec-core//lib/rspec/core/formatters/html_printer.rb#59 + def print_summary(duration, example_count, failure_count, pending_count); end + + private + + # source://rspec-core//lib/rspec/core/formatters/html_printer.rb#112 + def indentation_style(number_of_parents); end +end + +# source://rspec-core//lib/rspec/core/formatters/html_printer.rb#140 +RSpec::Core::Formatters::HtmlPrinter::GLOBAL_SCRIPTS = T.let(T.unsafe(nil), String) + +# source://rspec-core//lib/rspec/core/formatters/html_printer.rb#218 +RSpec::Core::Formatters::HtmlPrinter::GLOBAL_STYLES = T.let(T.unsafe(nil), String) + +# source://rspec-core//lib/rspec/core/formatters/html_printer.rb#382 +RSpec::Core::Formatters::HtmlPrinter::HTML_HEADER = T.let(T.unsafe(nil), String) + +# source://rspec-core//lib/rspec/core/formatters/html_printer.rb#116 +RSpec::Core::Formatters::HtmlPrinter::REPORT_HEADER = T.let(T.unsafe(nil), String) + +# @private +# +# source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#8 +class RSpec::Core::Formatters::JsonFormatter < ::RSpec::Core::Formatters::BaseFormatter + # @return [JsonFormatter] a new instance of JsonFormatter + # + # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#13 + def initialize(output); end + + # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#55 + def close(_notification); end + + # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#59 + def dump_profile(profile); end + + # @api private + # + # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#78 + def dump_profile_slowest_example_groups(profile); end + + # @api private + # + # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#66 + def dump_profile_slowest_examples(profile); end + + # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#24 + def dump_summary(summary); end + + # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#20 + def message(notification); end + + # Returns the value of attribute output_hash. + # + # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#11 + def output_hash; end + + # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#50 + def seed(notification); end + + # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#35 + def stop(notification); end + + private + + # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#87 + def format_example(example); end +end + +# `RSpec::Core::Formatters::Loader` is an internal class for +# managing formatters used by a particular configuration. It is +# not expected to be used directly, but only through the configuration +# interface. +# +# @api private +# +# source://rspec-core//lib/rspec/core/formatters.rb#96 +class RSpec::Core::Formatters::Loader + # @api private + # @return [Loader] a new instance of Loader + # + # source://rspec-core//lib/rspec/core/formatters.rb#105 + def initialize(reporter); end + + # @api private + # @private + # + # source://rspec-core//lib/rspec/core/formatters.rb#144 + def add(formatter_to_use, *paths); end + + # @api private + # @return [String] the default formatter to setup, defaults to `progress` + # + # source://rspec-core//lib/rspec/core/formatters.rb#118 + def default_formatter; end + + # @api private + # @return [String] the default formatter to setup, defaults to `progress` + # + # source://rspec-core//lib/rspec/core/formatters.rb#118 + def default_formatter=(_arg0); end + + # @api private + # @return [Array] the loaded formatters + # + # source://rspec-core//lib/rspec/core/formatters.rb#112 + def formatters; end + + # @api private + # @private + # + # source://rspec-core//lib/rspec/core/formatters.rb#121 + def prepare_default(output_stream, deprecation_stream); end + + # @api private + # @return [Reporter] the reporter + # + # source://rspec-core//lib/rspec/core/formatters.rb#115 + def reporter; end + + # @api private + # @private + # + # source://rspec-core//lib/rspec/core/formatters.rb#126 + def setup_default(output_stream, deprecation_stream); end + + private + + # @api private + # + # source://rspec-core//lib/rspec/core/formatters.rb#211 + def built_in_formatter(key); end + + # @api private + # + # source://rspec-core//lib/rspec/core/formatters.rb#234 + def custom_formatter(formatter_ref); end + + # @api private + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/formatters.rb#195 + def duplicate_formatter_exists?(new_formatter); end + + # @api private + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/formatters.rb#207 + def existing_formatter_implements?(notification); end + + # @api private + # + # source://rspec-core//lib/rspec/core/formatters.rb#181 + def find_formatter(formatter_to_use); end + + # @api private + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/formatters.rb#202 + def has_matching_output?(formatter, new_formatter); end + + # @api private + # + # source://rspec-core//lib/rspec/core/formatters.rb#228 + def notifications_for(formatter_class); end + + # @api private + # + # source://rspec-core//lib/rspec/core/formatters.rb#269 + def open_stream(path_or_wrapper); end + + # @api private + # + # source://rspec-core//lib/rspec/core/formatters.rb#250 + def path_for(const_ref); end + + # @api private + # + # source://rspec-core//lib/rspec/core/formatters.rb#188 + def register(formatter, notifications); end + + # @api private + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/formatters.rb#246 + def string_const?(str); end + + # activesupport/lib/active_support/inflector/methods.rb, line 48 + # + # @api private + # + # source://rspec-core//lib/rspec/core/formatters.rb#259 + def underscore(camel_cased_word); end + + # @api private + # + # source://rspec-core//lib/rspec/core/formatters.rb#254 + def underscore_with_fix_for_non_standard_rspec_naming(string); end + + class << self + # Internal formatters are stored here when loaded. + # + # @api private + # + # source://rspec-core//lib/rspec/core/formatters.rb#100 + def formatters; end + end +end + +# Formatter for providing profile output. +# +# @api private +# +# source://rspec-core//lib/rspec/core/formatters/profile_formatter.rb#8 +class RSpec::Core::Formatters::ProfileFormatter + # @api private + # @return [ProfileFormatter] a new instance of ProfileFormatter + # + # source://rspec-core//lib/rspec/core/formatters/profile_formatter.rb#11 + def initialize(output); end + + # This method is invoked after the dumping the summary if profiling is + # enabled. + # + # @api public + # @param profile [ProfileNotification] containing duration, + # slowest_examples and slowest_example_groups + # + # source://rspec-core//lib/rspec/core/formatters/profile_formatter.rb#25 + def dump_profile(profile); end + + # @api private + # @private + # + # source://rspec-core//lib/rspec/core/formatters/profile_formatter.rb#16 + def output; end + + private + + # @api private + # + # source://rspec-core//lib/rspec/core/formatters/profile_formatter.rb#62 + def bold(text); end + + # @api private + # + # source://rspec-core//lib/rspec/core/formatters/profile_formatter.rb#44 + def dump_profile_slowest_example_groups(profile); end + + # @api private + # + # source://rspec-core//lib/rspec/core/formatters/profile_formatter.rb#32 + def dump_profile_slowest_examples(profile); end + + # @api private + # + # source://rspec-core//lib/rspec/core/formatters/profile_formatter.rb#57 + def format_caller(caller_info); end +end + +# @private +# +# source://rspec-core//lib/rspec/core/formatters/progress_formatter.rb#8 +class RSpec::Core::Formatters::ProgressFormatter < ::RSpec::Core::Formatters::BaseTextFormatter + # source://rspec-core//lib/rspec/core/formatters/progress_formatter.rb#19 + def example_failed(_notification); end + + # source://rspec-core//lib/rspec/core/formatters/progress_formatter.rb#11 + def example_passed(_notification); end + + # source://rspec-core//lib/rspec/core/formatters/progress_formatter.rb#15 + def example_pending(_notification); end + + # source://rspec-core//lib/rspec/core/formatters/progress_formatter.rb#23 + def start_dump(_notification); end +end + +# @private +# +# source://rspec-core//lib/rspec/core/formatters/snippet_extractor.rb#5 +class RSpec::Core::Formatters::SnippetExtractor + # @return [SnippetExtractor] a new instance of SnippetExtractor + # + # source://rspec-core//lib/rspec/core/formatters/snippet_extractor.rb#35 + def initialize(source, beginning_line_number, max_line_count = T.unsafe(nil)); end + + # Returns the value of attribute beginning_line_number. + # + # source://rspec-core//lib/rspec/core/formatters/snippet_extractor.rb#24 + def beginning_line_number; end + + # source://rspec-core//lib/rspec/core/formatters/snippet_extractor.rb#41 + def expression_lines; end + + # Returns the value of attribute max_line_count. + # + # source://rspec-core//lib/rspec/core/formatters/snippet_extractor.rb#24 + def max_line_count; end + + # Returns the value of attribute source. + # + # source://rspec-core//lib/rspec/core/formatters/snippet_extractor.rb#24 + def source; end + + private + + # @raise [NoExpressionAtLineError] + # + # source://rspec-core//lib/rspec/core/formatters/snippet_extractor.rb#95 + def expression_node; end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/formatters/snippet_extractor.rb#107 + def expression_outmost_node?(node); end + + # source://rspec-core//lib/rspec/core/formatters/snippet_extractor.rb#55 + def line_range_of_expression; end + + # source://rspec-core//lib/rspec/core/formatters/snippet_extractor.rb#87 + def line_range_of_location_nodes_in_expression; end + + # source://rspec-core//lib/rspec/core/formatters/snippet_extractor.rb#117 + def location_nodes_at_beginning_line; end + + # source://rspec-core//lib/rspec/core/formatters/snippet_extractor.rb#70 + def unclosed_tokens_in_line_range(line_range); end + + class << self + # :nocov: + # + # source://rspec-core//lib/rspec/core/formatters/snippet_extractor.rb#26 + def extract_expression_lines_at(file_path, beginning_line_number, max_line_count = T.unsafe(nil)); end + + # @raise [NoSuchLineError] + # + # source://rspec-core//lib/rspec/core/formatters/snippet_extractor.rb#9 + def extract_line_at(file_path, line_number); end + + # source://rspec-core//lib/rspec/core/formatters/snippet_extractor.rb#128 + def least_indentation_from(lines); end + + # @raise [NoSuchFileError] + # + # source://rspec-core//lib/rspec/core/formatters/snippet_extractor.rb#16 + def source_from_file(path); end + end +end + +# source://rspec-core//lib/rspec/core/formatters/snippet_extractor.rb#22 +class RSpec::Core::Formatters::SnippetExtractor::NoExpressionAtLineError < ::StandardError; end + +# source://rspec-core//lib/rspec/core/formatters/snippet_extractor.rb#6 +class RSpec::Core::Formatters::SnippetExtractor::NoSuchFileError < ::StandardError; end + +# source://rspec-core//lib/rspec/core/formatters/snippet_extractor.rb#7 +class RSpec::Core::Formatters::SnippetExtractor::NoSuchLineError < ::StandardError; end + +# Provides terminal syntax highlighting of code snippets +# when coderay is available. +# +# @private +# +# source://rspec-core//lib/rspec/core/formatters/syntax_highlighter.rb#7 +class RSpec::Core::Formatters::SyntaxHighlighter + # @return [SyntaxHighlighter] a new instance of SyntaxHighlighter + # + # source://rspec-core//lib/rspec/core/formatters/syntax_highlighter.rb#8 + def initialize(configuration); end + + # source://rspec-core//lib/rspec/core/formatters/syntax_highlighter.rb#12 + def highlight(lines); end + + private + + # source://rspec-core//lib/rspec/core/formatters/syntax_highlighter.rb#50 + def color_enabled_implementation; end + + # :nocov: + # + # source://rspec-core//lib/rspec/core/formatters/syntax_highlighter.rb#44 + def implementation; end + + class << self + # source://rspec-core//lib/rspec/core/formatters/syntax_highlighter.rb#18 + def attempt_to_add_rspec_terms_to_coderay_keywords; end + end +end + +# @private +# +# source://rspec-core//lib/rspec/core/formatters/syntax_highlighter.rb#61 +module RSpec::Core::Formatters::SyntaxHighlighter::CodeRayImplementation + class << self + # source://rspec-core//lib/rspec/core/formatters/syntax_highlighter.rb#64 + def highlight_syntax(lines); end + end +end + +# source://rspec-core//lib/rspec/core/formatters/syntax_highlighter.rb#62 +RSpec::Core::Formatters::SyntaxHighlighter::CodeRayImplementation::RESET_CODE = T.let(T.unsafe(nil), String) + +# @private +# +# source://rspec-core//lib/rspec/core/formatters/syntax_highlighter.rb#78 +module RSpec::Core::Formatters::SyntaxHighlighter::NoSyntaxHighlightingImplementation + class << self + # source://rspec-core//lib/rspec/core/formatters/syntax_highlighter.rb#79 + def highlight_syntax(lines); end + end +end + +# Not sure why, but our code above (and/or coderay itself) does not work +# on Windows, so we disable the feature on Windows. +# +# @private +# +# source://rspec-core//lib/rspec/core/formatters/syntax_highlighter.rb#87 +RSpec::Core::Formatters::SyntaxHighlighter::WindowsImplementation = RSpec::Core::Formatters::SyntaxHighlighter::NoSyntaxHighlightingImplementation + +# Mixin that makes the including class imitate a hash for backwards +# compatibility. The including class should use `attr_accessor` to +# declare attributes. +# +# @private +# +# source://rspec-core//lib/rspec/core/metadata.rb#349 +module RSpec::Core::HashImitatable + mixes_in_class_methods ::RSpec::Core::HashImitatable::ClassMethods + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def <(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def <=(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def >(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def >=(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#388 + def [](key); end + + # source://rspec-core//lib/rspec/core/metadata.rb#398 + def []=(key, value); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def all?(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def any?(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def assoc(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def chain(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def chunk(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def chunk_while(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def clear(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def collect(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def collect_concat(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def compact(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def compact!(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def compare_by_identity(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def compare_by_identity?(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def count(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def cycle(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def deconstruct_keys(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def default(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def default=(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def default_proc(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def default_proc=(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def delete(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def delete_if(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def detect(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def dig(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def drop(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def drop_while(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def each(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def each_cons(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def each_entry(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def each_key(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def each_pair(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def each_slice(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def each_value(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def each_with_index(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def each_with_object(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def empty?(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def entries(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def except(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def fetch(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def fetch_values(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def filter(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def filter!(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def filter_map(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def find(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def find_all(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def find_index(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def first(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def flat_map(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def flatten(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def grep(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def grep_v(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def group_by(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def has_key?(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def has_value?(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def include?(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def inject(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def invert(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def keep_if(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def key(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def key?(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def keys(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def lazy(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def length(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def map(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def max(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def max_by(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def member?(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def merge(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def merge!(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def min(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def min_by(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def minmax(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def minmax_by(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def none?(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def one?(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def partition(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def rassoc(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def reduce(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def rehash(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def reject(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def reject!(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def replace(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def reverse_each(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def select(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def select!(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def shift(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def size(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def slice(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def slice_after(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def slice_before(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def slice_when(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def sort(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def sort_by(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def store(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def sum(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def take(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def take_while(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def tally(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def to_a(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#354 + def to_h; end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def to_hash(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def to_proc(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def to_set(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def transform_keys(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def transform_keys!(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def transform_values(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def transform_values!(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def uniq(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def update(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def value?(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def values(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def values_at(*args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#367 + def zip(*args, &block); end + + private + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/metadata.rb#414 + def directly_supports_attribute?(name); end + + # source://rspec-core//lib/rspec/core/metadata.rb#410 + def extra_hash_attributes; end + + # source://rspec-core//lib/rspec/core/metadata.rb#418 + def get_value(name); end + + # source://rspec-core//lib/rspec/core/metadata.rb#426 + def hash_for_delegation; end + + # source://rspec-core//lib/rspec/core/metadata.rb#430 + def issue_deprecation(_method_name, *_args); end + + # source://rspec-core//lib/rspec/core/metadata.rb#422 + def set_value(name, value); end + + class << self + # @private + # + # source://rspec-core//lib/rspec/core/metadata.rb#350 + def included(klass); end + end +end + +# @private +# +# source://rspec-core//lib/rspec/core/metadata.rb#435 +module RSpec::Core::HashImitatable::ClassMethods + # source://rspec-core//lib/rspec/core/metadata.rb#440 + def attr_accessor(*names); end + + # source://rspec-core//lib/rspec/core/metadata.rb#436 + def hash_attribute_names; end +end + +# Provides `before`, `after` and `around` hooks as a means of +# supporting common setup and teardown. This module is extended +# onto {ExampleGroup}, making the methods available from any `describe` +# or `context` block and included in {Configuration}, making them +# available off of the configuration object to define global setup +# or teardown logic. +# +# source://rspec-core//lib/rspec/core/hooks.rb#9 +module RSpec::Core::Hooks + # Declare a block of code to be run after each example (using `:example`) + # or once after all examples n the context (using `:context`). See + # {#before} for more information about ordering. + # + # ### Exceptions + # + # `after` hooks are guaranteed to run even when there are exceptions in + # `before` hooks or examples. When an exception is raised in an after + # block, the exception is captured for later reporting, and subsequent + # `after` blocks are run. + # + # ### Order + # + # `after` hooks are stored in three scopes, which are run in order: + # `:example`, `:context`, and `:suite`. They can also be declared in + # several different places: `RSpec.configure`, a parent group, the current + # group. They are run in the following order: + # + # after(:example) # Declared in the current group. + # after(:example) # Declared in a parent group. + # after(:example) # Declared in RSpec.configure. + # after(:context) # Declared in the current group. + # after(:context) # Declared in a parent group. + # after(:context) # Declared in RSpec.configure. + # after(:suite) # Declared in RSpec.configure. + # + # This is the reverse of the order in which `before` hooks are run. + # Similarly, if more than one `after` is declared within any example + # group, they are run in reverse order of that in which they are declared. + # Also `around` hooks will run after any `after` example hooks are + # invoked but before any `after` context hooks. + # + # @api public + # @note The `:example` and `:context` scopes are also available as + # `:each` and `:all`, respectively. Use whichever you prefer. + # @note The `:suite` scope is only supported for hooks registered on + # `RSpec.configuration` since they exist independently of any + # example or example group. + # @overload after + # @overload after + # @overload after + # @overload after + # @see #before + # @see #around + # @see ExampleGroup + # @see SharedContext + # @see SharedExampleGroup + # @see Configuration + # + # source://rspec-core//lib/rspec/core/hooks.rb#277 + def after(*args, &block); end + + # Adds `block` to the back of the list of `after` blocks in the same + # scope (`:example`, `:context`, or `:suite`). + # + # See {#after} for scoping semantics. + # + # source://rspec-core//lib/rspec/core/hooks.rb#287 + def append_after(*args, &block); end + + # Declare a block of code to be run before each example (using `:example`) + # or once before any example (using `:context`). These are usually + # declared directly in the {ExampleGroup} to which they apply, but they + # can also be shared across multiple groups. + # + # You can also use `before(:suite)` to run a block of code before any + # example groups are run. This should be declared in {RSpec.configure}. + # + # Instance variables declared in `before(:example)` or `before(:context)` + # are accessible within each example. + # + # ### Order + # + # `before` hooks are stored in three scopes, which are run in order: + # `:suite`, `:context`, and `:example`. They can also be declared in + # several different places: `RSpec.configure`, a parent group, the current + # group. They are run in the following order: + # + # before(:suite) # Declared in RSpec.configure. + # before(:context) # Declared in RSpec.configure. + # before(:context) # Declared in a parent group. + # before(:context) # Declared in the current group. + # before(:example) # Declared in RSpec.configure. + # before(:example) # Declared in a parent group. + # before(:example) # Declared in the current group. + # + # If more than one `before` is declared within any one example group, they + # are run in the order in which they are declared. Any `around` hooks will + # execute after `before` context hooks but before any `before` example + # hook regardless of where they are declared. + # + # ### Conditions + # + # When you add a conditions hash to `before(:example)` or + # `before(:context)`, RSpec will only apply that hook to groups or + # examples that match the conditions. e.g. + # + # RSpec.configure do |config| + # config.before(:example, :authorized => true) do + # log_in_as :authorized_user + # end + # end + # + # RSpec.describe Something, :authorized => true do + # # The before hook will run in before each example in this group. + # end + # + # RSpec.describe SomethingElse do + # it "does something", :authorized => true do + # # The before hook will run before this example. + # end + # + # it "does something else" do + # # The hook will not run before this example. + # end + # end + # + # Note that filtered config `:context` hooks can still be applied + # to individual examples that have matching metadata. Just like + # Ruby's object model is that every object has a singleton class + # which has only a single instance, RSpec's model is that every + # example has a singleton example group containing just the one + # example. + # + # ### Warning: `before(:suite, :with => :conditions)` + # + # The conditions hash is used to match against specific examples. Since + # `before(:suite)` is not run in relation to any specific example or + # group, conditions passed along with `:suite` are effectively ignored. + # + # ### Exceptions + # + # When an exception is raised in a `before` block, RSpec skips any + # subsequent `before` blocks and the example, but runs all of the + # `after(:example)` and `after(:context)` hooks. + # + # ### Warning: implicit before blocks + # + # `before` hooks can also be declared in shared contexts which get + # included implicitly either by you or by extension libraries. Since + # RSpec runs these in the order in which they are declared within each + # scope, load order matters, and can lead to confusing results when one + # before block depends on state that is prepared in another before block + # that gets run later. + # + # ### Warning: `before(:context)` + # + # It is very tempting to use `before(:context)` to speed things up, but we + # recommend that you avoid this as there are a number of gotchas, as well + # as things that simply don't work. + # + # #### Context + # + # `before(:context)` is run in an example that is generated to provide + # group context for the block. + # + # #### Instance variables + # + # Instance variables declared in `before(:context)` are shared across all + # the examples in the group. This means that each example can change the + # state of a shared object, resulting in an ordering dependency that can + # make it difficult to reason about failures. + # + # #### Unsupported RSpec constructs + # + # RSpec has several constructs that reset state between each example + # automatically. These are not intended for use from within + # `before(:context)`: + # + # * `let` declarations + # * `subject` declarations + # * Any mocking, stubbing or test double declaration + # + # ### other frameworks + # + # Mock object frameworks and database transaction managers (like + # ActiveRecord) are typically designed around the idea of setting up + # before an example, running that one example, and then tearing down. This + # means that mocks and stubs can (sometimes) be declared in + # `before(:context)`, but get torn down before the first real example is + # ever run. + # + # You _can_ create database-backed model objects in a `before(:context)` + # in rspec-rails, but it will not be wrapped in a transaction for you, so + # you are on your own to clean up in an `after(:context)` block. + # + # @api public + # @example before(:example) declared in an {ExampleGroup} + # RSpec.describe Thing do + # before(:example) do + # @thing = Thing.new + # end + # + # it "does something" do + # # Here you can access @thing. + # end + # end + # @example before(:context) declared in an {ExampleGroup} + # RSpec.describe Parser do + # before(:context) do + # File.open(file_to_parse, 'w') do |f| + # f.write <<-CONTENT + # stuff in the file + # CONTENT + # end + # end + # + # it "parses the file" do + # Parser.parse(file_to_parse) + # end + # + # after(:context) do + # File.delete(file_to_parse) + # end + # end + # @note The `:example` and `:context` scopes are also available as + # `:each` and `:all`, respectively. Use whichever you prefer. + # @note The `:suite` scope is only supported for hooks registered on + # `RSpec.configuration` since they exist independently of any + # example or example group. + # @overload before + # @overload before + # @overload before + # @overload before + # @see #after + # @see #around + # @see ExampleGroup + # @see SharedContext + # @see SharedExampleGroup + # @see Configuration + # + # source://rspec-core//lib/rspec/core/hooks.rb#200 + def append_before(*args, &block); end + + # Declare a block of code, parts of which will be run before and parts + # after the example. It is your responsibility to run the example: + # + # around(:example) do |ex| + # # Do some stuff before. + # ex.run + # # Do some stuff after. + # end + # + # The yielded example aliases `run` with `call`, which lets you treat it + # like a `Proc`. This is especially handy when working with libraries + # that manage their own setup and teardown using a block or proc syntax, + # e.g. + # + # around(:example) {|ex| Database.transaction(&ex)} + # around(:example) {|ex| FakeFS(&ex)} + # + # ### Order + # + # The `around` hooks execute surrounding an example and its hooks. + # + # This means after any `before` context hooks, but before any `before` + # example hooks, and similarly after any `after` example hooks but before + # any `after` context hooks. + # + # They are not a synonym for `before`/`after`. + # + # @api public + # @note the syntax of `around` is similar to that of `before` and `after` + # but the semantics are quite different. `before` and `after` hooks are + # run in the context of the examples with which they are associated, + # whereas `around` hooks are actually responsible for running the + # examples. Consequently, `around` hooks do not have direct access to + # resources that are made available within the examples and their + # associated `before` and `after` hooks. + # @note `:example`/`:each` is the only supported scope. + # @overload around + # @overload around + # @overload around + # @overload around + # @yield [Example] the example to run + # + # source://rspec-core//lib/rspec/core/hooks.rb#349 + def around(*args, &block); end + + # Declare a block of code to be run before each example (using `:example`) + # or once before any example (using `:context`). These are usually + # declared directly in the {ExampleGroup} to which they apply, but they + # can also be shared across multiple groups. + # + # You can also use `before(:suite)` to run a block of code before any + # example groups are run. This should be declared in {RSpec.configure}. + # + # Instance variables declared in `before(:example)` or `before(:context)` + # are accessible within each example. + # + # ### Order + # + # `before` hooks are stored in three scopes, which are run in order: + # `:suite`, `:context`, and `:example`. They can also be declared in + # several different places: `RSpec.configure`, a parent group, the current + # group. They are run in the following order: + # + # before(:suite) # Declared in RSpec.configure. + # before(:context) # Declared in RSpec.configure. + # before(:context) # Declared in a parent group. + # before(:context) # Declared in the current group. + # before(:example) # Declared in RSpec.configure. + # before(:example) # Declared in a parent group. + # before(:example) # Declared in the current group. + # + # If more than one `before` is declared within any one example group, they + # are run in the order in which they are declared. Any `around` hooks will + # execute after `before` context hooks but before any `before` example + # hook regardless of where they are declared. + # + # ### Conditions + # + # When you add a conditions hash to `before(:example)` or + # `before(:context)`, RSpec will only apply that hook to groups or + # examples that match the conditions. e.g. + # + # RSpec.configure do |config| + # config.before(:example, :authorized => true) do + # log_in_as :authorized_user + # end + # end + # + # RSpec.describe Something, :authorized => true do + # # The before hook will run in before each example in this group. + # end + # + # RSpec.describe SomethingElse do + # it "does something", :authorized => true do + # # The before hook will run before this example. + # end + # + # it "does something else" do + # # The hook will not run before this example. + # end + # end + # + # Note that filtered config `:context` hooks can still be applied + # to individual examples that have matching metadata. Just like + # Ruby's object model is that every object has a singleton class + # which has only a single instance, RSpec's model is that every + # example has a singleton example group containing just the one + # example. + # + # ### Warning: `before(:suite, :with => :conditions)` + # + # The conditions hash is used to match against specific examples. Since + # `before(:suite)` is not run in relation to any specific example or + # group, conditions passed along with `:suite` are effectively ignored. + # + # ### Exceptions + # + # When an exception is raised in a `before` block, RSpec skips any + # subsequent `before` blocks and the example, but runs all of the + # `after(:example)` and `after(:context)` hooks. + # + # ### Warning: implicit before blocks + # + # `before` hooks can also be declared in shared contexts which get + # included implicitly either by you or by extension libraries. Since + # RSpec runs these in the order in which they are declared within each + # scope, load order matters, and can lead to confusing results when one + # before block depends on state that is prepared in another before block + # that gets run later. + # + # ### Warning: `before(:context)` + # + # It is very tempting to use `before(:context)` to speed things up, but we + # recommend that you avoid this as there are a number of gotchas, as well + # as things that simply don't work. + # + # #### Context + # + # `before(:context)` is run in an example that is generated to provide + # group context for the block. + # + # #### Instance variables + # + # Instance variables declared in `before(:context)` are shared across all + # the examples in the group. This means that each example can change the + # state of a shared object, resulting in an ordering dependency that can + # make it difficult to reason about failures. + # + # #### Unsupported RSpec constructs + # + # RSpec has several constructs that reset state between each example + # automatically. These are not intended for use from within + # `before(:context)`: + # + # * `let` declarations + # * `subject` declarations + # * Any mocking, stubbing or test double declaration + # + # ### other frameworks + # + # Mock object frameworks and database transaction managers (like + # ActiveRecord) are typically designed around the idea of setting up + # before an example, running that one example, and then tearing down. This + # means that mocks and stubs can (sometimes) be declared in + # `before(:context)`, but get torn down before the first real example is + # ever run. + # + # You _can_ create database-backed model objects in a `before(:context)` + # in rspec-rails, but it will not be wrapped in a transaction for you, so + # you are on your own to clean up in an `after(:context)` block. + # + # @api public + # @example before(:example) declared in an {ExampleGroup} + # + # RSpec.describe Thing do + # before(:example) do + # @thing = Thing.new + # end + # + # it "does something" do + # # Here you can access @thing. + # end + # end + # @example before(:context) declared in an {ExampleGroup} + # + # RSpec.describe Parser do + # before(:context) do + # File.open(file_to_parse, 'w') do |f| + # f.write <<-CONTENT + # stuff in the file + # CONTENT + # end + # end + # + # it "parses the file" do + # Parser.parse(file_to_parse) + # end + # + # after(:context) do + # File.delete(file_to_parse) + # end + # end + # @note The `:example` and `:context` scopes are also available as + # `:each` and `:all`, respectively. Use whichever you prefer. + # @note The `:suite` scope is only supported for hooks registered on + # `RSpec.configuration` since they exist independently of any + # example or example group. + # @overload before + # @overload before + # @overload before + # @overload before + # @see #after + # @see #around + # @see ExampleGroup + # @see SharedContext + # @see SharedExampleGroup + # @see Configuration + # + # source://rspec-core//lib/rspec/core/hooks.rb#200 + def before(*args, &block); end + + # Holds the various registered hooks. + # + # @private + # + # source://rspec-core//lib/rspec/core/hooks.rb#355 + def hooks; end + + # Declare a block of code to be run after each example (using `:example`) + # or once after all examples n the context (using `:context`). See + # {#before} for more information about ordering. + # + # ### Exceptions + # + # `after` hooks are guaranteed to run even when there are exceptions in + # `before` hooks or examples. When an exception is raised in an after + # block, the exception is captured for later reporting, and subsequent + # `after` blocks are run. + # + # ### Order + # + # `after` hooks are stored in three scopes, which are run in order: + # `:example`, `:context`, and `:suite`. They can also be declared in + # several different places: `RSpec.configure`, a parent group, the current + # group. They are run in the following order: + # + # after(:example) # Declared in the current group. + # after(:example) # Declared in a parent group. + # after(:example) # Declared in RSpec.configure. + # after(:context) # Declared in the current group. + # after(:context) # Declared in a parent group. + # after(:context) # Declared in RSpec.configure. + # after(:suite) # Declared in RSpec.configure. + # + # This is the reverse of the order in which `before` hooks are run. + # Similarly, if more than one `after` is declared within any example + # group, they are run in reverse order of that in which they are declared. + # Also `around` hooks will run after any `after` example hooks are + # invoked but before any `after` context hooks. + # + # @api public + # @note The `:example` and `:context` scopes are also available as + # `:each` and `:all`, respectively. Use whichever you prefer. + # @note The `:suite` scope is only supported for hooks registered on + # `RSpec.configuration` since they exist independently of any + # example or example group. + # @overload after + # @overload after + # @overload after + # @overload after + # @see #before + # @see #around + # @see ExampleGroup + # @see SharedContext + # @see SharedExampleGroup + # @see Configuration + # + # source://rspec-core//lib/rspec/core/hooks.rb#277 + def prepend_after(*args, &block); end + + # Adds `block` to the front of the list of `before` blocks in the same + # scope (`:example`, `:context`, or `:suite`). + # + # See {#before} for scoping semantics. + # + # source://rspec-core//lib/rspec/core/hooks.rb#210 + def prepend_before(*args, &block); end +end + +# @private +# +# source://rspec-core//lib/rspec/core/hooks.rb#379 +class RSpec::Core::Hooks::AfterContextHook < ::RSpec::Core::Hooks::Hook + # source://rspec-core//lib/rspec/core/hooks.rb#380 + def run(example); end +end + +# @private +# +# source://rspec-core//lib/rspec/core/hooks.rb#370 +class RSpec::Core::Hooks::AfterHook < ::RSpec::Core::Hooks::Hook + # source://rspec-core//lib/rspec/core/hooks.rb#371 + def run(example); end +end + +# @private +# +# source://rspec-core//lib/rspec/core/hooks.rb#388 +class RSpec::Core::Hooks::AroundHook < ::RSpec::Core::Hooks::Hook + # source://rspec-core//lib/rspec/core/hooks.rb#389 + def execute_with(example, procsy); end + + # :nocov: + # + # source://rspec-core//lib/rspec/core/hooks.rb#397 + def hook_description; end +end + +# @private +# +# source://rspec-core//lib/rspec/core/hooks.rb#363 +class RSpec::Core::Hooks::BeforeHook < ::RSpec::Core::Hooks::Hook + # source://rspec-core//lib/rspec/core/hooks.rb#364 + def run(example); end +end + +# @private +# +# source://rspec-core//lib/rspec/core/hooks.rb#360 +class RSpec::Core::Hooks::Hook < ::Struct + # Returns the value of attribute block + # + # @return [Object] the current value of block + def block; end + + # Sets the attribute block + # + # @param value [Object] the value to set the attribute block to. + # @return [Object] the newly set value + def block=(_); end + + # Returns the value of attribute options + # + # @return [Object] the current value of options + def options; end + + # Sets the attribute options + # + # @param value [Object] the value to set the attribute options to. + # @return [Object] the newly set value + def options=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# This provides the primary API used by other parts of rspec-core. By hiding all +# implementation details behind this facade, it's allowed us to heavily optimize +# this, so that, for example, hook collection objects are only instantiated when +# a hook is added. This allows us to avoid many object allocations for the common +# case of a group having no hooks. +# +# This is only possible because this interface provides a "tell, don't ask"-style +# API, so that callers _tell_ this class what to do with the hooks, rather than +# asking this class for a list of hooks, and then doing something with them. +# +# @private +# +# source://rspec-core//lib/rspec/core/hooks.rb#420 +class RSpec::Core::Hooks::HookCollections + # @return [HookCollections] a new instance of HookCollections + # + # source://rspec-core//lib/rspec/core/hooks.rb#421 + def initialize(owner, filterable_item_repo_class); end + + # source://rspec-core//lib/rspec/core/hooks.rb#449 + def register(prepend_or_append, position, *args, &block); end + + # source://rspec-core//lib/rspec/core/hooks.rb#442 + def register_global_singleton_context_hooks(example, globals); end + + # source://rspec-core//lib/rspec/core/hooks.rb#431 + def register_globals(host, globals); end + + # Runs all of the blocks stored with the hook in the context of the + # example. If no example is provided, just calls the hook directly. + # + # @private + # + # source://rspec-core//lib/rspec/core/hooks.rb#475 + def run(position, scope, example_or_group); end + + protected + + # source://rspec-core//lib/rspec/core/hooks.rb#523 + def all_hooks_for(position, scope); end + + # source://rspec-core//lib/rspec/core/hooks.rb#507 + def matching_hooks_for(position, scope, example_or_group); end + + # source://rspec-core//lib/rspec/core/hooks.rb#533 + def processable_hooks_for(position, scope, host); end + + # source://rspec-core//lib/rspec/core/hooks.rb#527 + def run_owned_hooks_for(position, scope, example_or_group); end + + private + + # source://rspec-core//lib/rspec/core/hooks.rb#553 + def ensure_hooks_initialized_for(position, scope); end + + # source://rspec-core//lib/rspec/core/hooks.rb#591 + def extract_scope_from(args); end + + # source://rspec-core//lib/rspec/core/hooks.rb#543 + def hooks_for(position, scope); end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/hooks.rb#605 + def known_scope?(scope); end + + # source://rspec-core//lib/rspec/core/hooks.rb#609 + def normalized_scope_for(scope); end + + # :nocov: + # + # source://rspec-core//lib/rspec/core/hooks.rb#633 + def owner_parent_groups; end + + # source://rspec-core//lib/rspec/core/hooks.rb#571 + def process(host, parent_groups, globals, position, scope); end + + # source://rspec-core//lib/rspec/core/hooks.rb#619 + def run_around_example_hooks_for(example); end + + # source://rspec-core//lib/rspec/core/hooks.rb#613 + def run_example_hooks_for(example, position, each_method); end + + # source://rspec-core//lib/rspec/core/hooks.rb#584 + def scope_and_options_from(*args); end +end + +# source://rspec-core//lib/rspec/core/hooks.rb#505 +RSpec::Core::Hooks::HookCollections::EMPTY_HOOK_ARRAY = T.let(T.unsafe(nil), Array) + +# source://rspec-core//lib/rspec/core/hooks.rb#495 +RSpec::Core::Hooks::HookCollections::HOOK_TYPES = T.let(T.unsafe(nil), Hash) + +# source://rspec-core//lib/rspec/core/hooks.rb#491 +RSpec::Core::Hooks::HookCollections::SCOPES = T.let(T.unsafe(nil), Array) + +# source://rspec-core//lib/rspec/core/hooks.rb#493 +RSpec::Core::Hooks::HookCollections::SCOPE_ALIASES = T.let(T.unsafe(nil), Hash) + +# @private +# +# source://rspec-core//lib/rspec/core/filter_manager.rb#186 +class RSpec::Core::InclusionRules < ::RSpec::Core::FilterRules + # source://rspec-core//lib/rspec/core/filter_manager.rb#187 + def add(*args); end + + # source://rspec-core//lib/rspec/core/filter_manager.rb#191 + def add_with_low_priority(*args); end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/filter_manager.rb#195 + def include_example?(example); end + + # source://rspec-core//lib/rspec/core/filter_manager.rb#203 + def split_file_scoped_rules; end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/filter_manager.rb#199 + def standalone?; end + + private + + # source://rspec-core//lib/rspec/core/filter_manager.rb#213 + def apply_standalone_filter(updated); end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/filter_manager.rb#226 + def is_standalone_filter?(rules); end + + # source://rspec-core//lib/rspec/core/filter_manager.rb#221 + def replace_filters(new_rules); end +end + +# @private +# +# source://rspec-core//lib/rspec/core/invocations.rb#4 +module RSpec::Core::Invocations; end + +# @private +# +# source://rspec-core//lib/rspec/core/invocations.rb#28 +class RSpec::Core::Invocations::Bisect + # source://rspec-core//lib/rspec/core/invocations.rb#29 + def call(options, err, out); end + + private + + # source://rspec-core//lib/rspec/core/invocations.rb#45 + def bisect_formatter_klass_for(argument); end +end + +# @private +# +# source://rspec-core//lib/rspec/core/invocations.rb#15 +class RSpec::Core::Invocations::DRbWithFallback + # source://rspec-core//lib/rspec/core/invocations.rb#16 + def call(options, err, out); end +end + +# @private +# +# source://rspec-core//lib/rspec/core/invocations.rb#6 +class RSpec::Core::Invocations::InitializeProject + # source://rspec-core//lib/rspec/core/invocations.rb#7 + def call(*_args); end +end + +# @private +# +# source://rspec-core//lib/rspec/core/invocations.rb#78 +class RSpec::Core::Invocations::PrintHelp < ::Struct + # source://rspec-core//lib/rspec/core/invocations.rb#79 + def call(_options, _err, out); end + + # Returns the value of attribute hidden_options + # + # @return [Object] the current value of hidden_options + def hidden_options; end + + # Sets the attribute hidden_options + # + # @param value [Object] the value to set the attribute hidden_options to. + # @return [Object] the newly set value + def hidden_options=(_); end + + # Returns the value of attribute parser + # + # @return [Object] the current value of parser + def parser; end + + # Sets the attribute parser + # + # @param value [Object] the value to set the attribute parser to. + # @return [Object] the newly set value + def parser=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# @private +# +# source://rspec-core//lib/rspec/core/invocations.rb#52 +class RSpec::Core::Invocations::PrintVersion + # source://rspec-core//lib/rspec/core/invocations.rb#53 + def call(_options, _err, out); end +end + +# Together with the example group metadata hash default block, +# provides backwards compatibility for the old `:example_group` +# key. In RSpec 2.x, the computed keys of a group's metadata +# were exposed from a nested subhash keyed by `[:example_group]`, and +# then the parent group's metadata was exposed by sub-subhash +# keyed by `[:example_group][:example_group]`. +# +# In RSpec 3, we reorganized this to that the computed keys are +# exposed directly of the group metadata hash (no nesting), and +# `:parent_example_group` returns the parent group's metadata. +# +# Maintaining backwards compatibility was difficult: we wanted +# `:example_group` to return an object that: +# +# * Exposes the top-level metadata keys that used to be nested +# under `:example_group`. +# * Supports mutation (rspec-rails, for example, assigns +# `metadata[:example_group][:described_class]` when you use +# anonymous controller specs) such that changes are written +# back to the top-level metadata hash. +# * Exposes the parent group metadata as +# `[:example_group][:example_group]`. +# +# @private +# +# source://rspec-core//lib/rspec/core/metadata.rb#470 +class RSpec::Core::LegacyExampleGroupHash + include ::RSpec::Core::HashImitatable + extend ::RSpec::Core::HashImitatable::ClassMethods + + # @return [LegacyExampleGroupHash] a new instance of LegacyExampleGroupHash + # + # source://rspec-core//lib/rspec/core/metadata.rb#473 + def initialize(metadata); end + + # source://rspec-core//lib/rspec/core/metadata.rb#479 + def to_h; end + + private + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/metadata.rb#485 + def directly_supports_attribute?(name); end + + # source://rspec-core//lib/rspec/core/metadata.rb#489 + def get_value(name); end + + # source://rspec-core//lib/rspec/core/metadata.rb#493 + def set_value(name, value); end +end + +# This module is included in {ExampleGroup}, making the methods +# available to be called from within example blocks. +# +# @see ClassMethods +# +# source://rspec-core//lib/rspec/core/memoized_helpers.rb#9 +module RSpec::Core::MemoizedHelpers + # @private + # + # source://rspec-core//lib/rspec/core/memoized_helpers.rb#135 + def initialize(*_arg0); end + + # Wraps the `subject` in `expect` to make it the target of an expectation. + # Designed to read nicely for one-liners. + # + # @example + # + # describe [1, 2, 3] do + # it { is_expected.to be_an Array } + # it { is_expected.not_to include 4 } + # end + # @note This only works if you are using rspec-expectations. + # @see #subject + # @see #should + # @see #should_not + # + # source://rspec-core//lib/rspec/core/memoized_helpers.rb#120 + def is_expected; end + + # When `should` is called with no explicit receiver, the call is + # delegated to the object returned by `subject`. Combined with an + # implicit subject this supports very concise expressions. + # + # @example + # + # RSpec.describe Person do + # it { should be_eligible_to_vote } + # end + # @note This only works if you are using rspec-expectations. + # @note If you are using RSpec's newer expect-based syntax you may + # want to use `is_expected.to` instead of `should`. + # @see #subject + # @see #is_expected + # + # source://rspec-core//lib/rspec/core/memoized_helpers.rb#80 + def should(matcher = T.unsafe(nil), message = T.unsafe(nil)); end + + # Just like `should`, `should_not` delegates to the subject (implicit or + # explicit) of the example group. + # + # @example + # + # RSpec.describe Person do + # it { should_not be_eligible_to_vote } + # end + # @note This only works if you are using rspec-expectations. + # @note If you are using RSpec's newer expect-based syntax you may + # want to use `is_expected.to_not` instead of `should_not`. + # @see #subject + # @see #is_expected + # + # source://rspec-core//lib/rspec/core/memoized_helpers.rb#100 + def should_not(matcher = T.unsafe(nil), message = T.unsafe(nil)); end + + # @example + # + # # Explicit declaration of subject. + # RSpec.describe Person do + # subject { Person.new(:birthdate => 19.years.ago) } + # it "should be eligible to vote" do + # subject.should be_eligible_to_vote + # # ^ ^ explicit reference to subject not recommended + # end + # end + # + # # Implicit subject => { Person.new }. + # RSpec.describe Person do + # it "should be eligible to vote" do + # subject.should be_eligible_to_vote + # # ^ ^ explicit reference to subject not recommended + # end + # end + # + # # One-liner syntax - expectation is set on the subject. + # RSpec.describe Person do + # it { is_expected.to be_eligible_to_vote } + # # or + # it { should be_eligible_to_vote } + # end + # @note `subject` was contributed by Joe Ferris to support the one-liner + # syntax embraced by shoulda matchers: + # + # RSpec.describe Widget do + # it { is_expected.to validate_presence_of(:name) } + # # or + # it { should validate_presence_of(:name) } + # end + # + # While the examples below demonstrate how to use `subject` + # explicitly in examples, we recommend that you define a method with + # an intention revealing name instead. + # @note Because `subject` is designed to create state that is reset + # between each example, and `before(:context)` is designed to setup + # state that is shared across _all_ examples in an example group, + # `subject` is _not_ intended to be used in a `before(:context)` hook. + # @see #should + # @see #should_not + # @see #is_expected + # + # source://rspec-core//lib/rspec/core/memoized_helpers.rb#57 + def subject; end + + private + + # @private + # + # source://rspec-core//lib/rspec/core/memoized_helpers.rb#141 + def __init_memoized; end + + # should just be placed in private section, + # but Ruby issues warnings on private attributes. + # and expanding it to the equivalent method upsets Rubocop, + # b/c it should obviously be a reader + # + # @private + # + # source://rspec-core//lib/rspec/core/memoized_helpers.rb#129 + def __memoized; end + + # @private + # + # source://rspec-core//lib/rspec/core/memoized_helpers.rb#150 + def enforce_value_expectation(matcher, method_name); end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/memoized_helpers.rb#163 + def matcher_supports_value_expectations?(matcher); end + + class << self + # @private + # + # source://rspec-core//lib/rspec/core/memoized_helpers.rb#542 + def define_helpers_on(example_group); end + + # Gets the named constant or yields. + # On 1.9, const_defined? / const_get take into account the + # the inheritance by default, and accept an argument to + # disable this behavior. It's important that we don't + # consider inheritance here; each example group level that + # uses a `let` should get its own `LetDefinitions` module. + # + # @private + # + # source://rspec-core//lib/rspec/core/memoized_helpers.rb#570 + def get_constant_or_yield(example_group, name); end + + # Gets the LetDefinitions module. The module is mixed into + # the example group and is used to hold all let definitions. + # This is done so that the block passed to `let` can be + # forwarded directly on to `define_method`, so that all method + # constructs (including `super` and `return`) can be used in + # a `let` block. + # + # The memoization is provided by a method definition on the + # example group that supers to the LetDefinitions definition + # in order to get the value to memoize. + # + # @private + # + # source://rspec-core//lib/rspec/core/memoized_helpers.rb#528 + def module_for(example_group); end + end +end + +# This module is extended onto {ExampleGroup}, making the methods +# available to be called from within example group blocks. +# You can think of them as being analagous to class macros. +# +# source://rspec-core//lib/rspec/core/memoized_helpers.rb#274 +module RSpec::Core::MemoizedHelpers::ClassMethods + # Generates a method whose return value is memoized after the first + # call. Useful for reducing duplication between examples that assign + # values to the same local variable. + # + # @example + # + # RSpec.describe Thing do + # let(:thing) { Thing.new } + # + # it "does something" do + # # First invocation, executes block, memoizes and returns result. + # thing.do_something + # + # # Second invocation, returns the memoized value. + # thing.should be_something + # end + # end + # @note `let` _can_ enhance readability when used sparingly (1,2, or + # maybe 3 declarations) in any given example group, but that can + # quickly degrade with overuse. YMMV. + # @note `let` can be configured to be threadsafe or not. + # If it is threadsafe, it will take longer to access the value. + # If it is not threadsafe, it may behave in surprising ways in examples + # that spawn separate threads. Specify this on `RSpec.configure` + # @note Because `let` is designed to create state that is reset between + # each example, and `before(:context)` is designed to setup state that + # is shared across _all_ examples in an example group, `let` is _not_ + # intended to be used in a `before(:context)` hook. + # + # source://rspec-core//lib/rspec/core/memoized_helpers.rb#306 + def let(name, &block); end + + # Just like `let`, except the block is invoked by an implicit `before` + # hook. This serves a dual purpose of setting up state and providing a + # memoized reference to that state. + # + # @example + # + # class Thing + # def self.count + # @count ||= 0 + # end + # + # def self.count=(val) + # @count += val + # end + # + # def self.reset_count + # @count = 0 + # end + # + # def initialize + # self.class.count += 1 + # end + # end + # + # RSpec.describe Thing do + # after(:example) { Thing.reset_count } + # + # context "using let" do + # let(:thing) { Thing.new } + # + # it "is not invoked implicitly" do + # Thing.count.should eq(0) + # end + # + # it "can be invoked explicitly" do + # thing + # Thing.count.should eq(1) + # end + # end + # + # context "using let!" do + # let!(:thing) { Thing.new } + # + # it "is invoked implicitly" do + # Thing.count.should eq(1) + # end + # + # it "returns memoized version on first invocation" do + # thing + # Thing.count.should eq(1) + # end + # end + # end + # + # source://rspec-core//lib/rspec/core/memoized_helpers.rb#400 + def let!(name, &block); end + + # Declares a `subject` for an example group which can then be wrapped + # with `expect` using `is_expected` to make it the target of an + # expectation in a concise, one-line example. + # + # Given a `name`, defines a method with that name which returns the + # `subject`. This lets you declare the subject once and access it + # implicitly in one-liners and explicitly using an intention revealing + # name. + # + # When given a `name`, calling `super` in the block is not supported. + # + # @example + # + # RSpec.describe CheckingAccount, "with $50" do + # subject { CheckingAccount.new(Money.new(50, :USD)) } + # it { is_expected.to have_a_balance_of(Money.new(50, :USD)) } + # it { is_expected.not_to be_overdrawn } + # end + # + # RSpec.describe CheckingAccount, "with a non-zero starting balance" do + # subject(:account) { CheckingAccount.new(Money.new(50, :USD)) } + # it { is_expected.not_to be_overdrawn } + # it "has a balance equal to the starting balance" do + # account.balance.should eq(Money.new(50, :USD)) + # end + # end + # @note `subject` can be configured to be threadsafe or not. + # If it is threadsafe, it will take longer to access the value. + # If it is not threadsafe, it may behave in surprising ways in examples + # that spawn separate threads. Specify this on `RSpec.configure` + # @param name [String, Symbol] used to define an accessor with an + # intention revealing name + # @param block defines the value to be returned by `subject` in examples + # @see MemoizedHelpers#should + # @see MemoizedHelpers#should_not + # @see MemoizedHelpers#is_expected + # + # source://rspec-core//lib/rspec/core/memoized_helpers.rb#444 + def subject(name = T.unsafe(nil), &block); end + + # Just like `subject`, except the block is invoked by an implicit + # `before` hook. This serves a dual purpose of setting up state and + # providing a memoized reference to that state. + # + # @example + # + # class Thing + # def self.count + # @count ||= 0 + # end + # + # def self.count=(val) + # @count += val + # end + # + # def self.reset_count + # @count = 0 + # end + # + # def initialize + # self.class.count += 1 + # end + # end + # + # RSpec.describe Thing do + # after(:example) { Thing.reset_count } + # + # context "using subject" do + # subject { Thing.new } + # + # it "is not invoked implicitly" do + # Thing.count.should eq(0) + # end + # + # it "can be invoked explicitly" do + # subject + # Thing.count.should eq(1) + # end + # end + # + # context "using subject!" do + # subject!(:thing) { Thing.new } + # + # it "is invoked implicitly" do + # Thing.count.should eq(1) + # end + # + # it "returns memoized version on first invocation" do + # subject + # Thing.count.should eq(1) + # end + # end + # end + # + # source://rspec-core//lib/rspec/core/memoized_helpers.rb#510 + def subject!(name = T.unsafe(nil), &block); end +end + +# Used internally to customize the behavior of the +# memoized hash when used in a `before(:context)` hook. +# +# @private +# +# source://rspec-core//lib/rspec/core/memoized_helpers.rb#200 +class RSpec::Core::MemoizedHelpers::ContextHookMemoized + class << self + # source://rspec-core//lib/rspec/core/memoized_helpers.rb#222 + def fetch_or_store(key, &_block); end + + # source://rspec-core//lib/rspec/core/memoized_helpers.rb#201 + def isolate_for_context_hook(example_group_instance); end + end +end + +# @private +# +# source://rspec-core//lib/rspec/core/memoized_helpers.rb#256 +class RSpec::Core::MemoizedHelpers::ContextHookMemoized::After < ::RSpec::Core::MemoizedHelpers::ContextHookMemoized + class << self + # source://rspec-core//lib/rspec/core/memoized_helpers.rb#261 + def article; end + + # source://rspec-core//lib/rspec/core/memoized_helpers.rb#257 + def hook_expression; end + + # source://rspec-core//lib/rspec/core/memoized_helpers.rb#265 + def hook_intention; end + end +end + +# @private +# +# source://rspec-core//lib/rspec/core/memoized_helpers.rb#241 +class RSpec::Core::MemoizedHelpers::ContextHookMemoized::Before < ::RSpec::Core::MemoizedHelpers::ContextHookMemoized + class << self + # source://rspec-core//lib/rspec/core/memoized_helpers.rb#246 + def article; end + + # source://rspec-core//lib/rspec/core/memoized_helpers.rb#242 + def hook_expression; end + + # source://rspec-core//lib/rspec/core/memoized_helpers.rb#250 + def hook_intention; end + end +end + +# @private +# +# source://rspec-core//lib/rspec/core/memoized_helpers.rb#186 +class RSpec::Core::MemoizedHelpers::NonThreadSafeMemoized + # @return [NonThreadSafeMemoized] a new instance of NonThreadSafeMemoized + # + # source://rspec-core//lib/rspec/core/memoized_helpers.rb#187 + def initialize; end + + # source://rspec-core//lib/rspec/core/memoized_helpers.rb#191 + def fetch_or_store(key); end +end + +# @private +# +# source://rspec-core//lib/rspec/core/memoized_helpers.rb#170 +class RSpec::Core::MemoizedHelpers::ThreadsafeMemoized + # @return [ThreadsafeMemoized] a new instance of ThreadsafeMemoized + # + # source://rspec-core//lib/rspec/core/memoized_helpers.rb#171 + def initialize; end + + # source://rspec-core//lib/rspec/core/memoized_helpers.rb#176 + def fetch_or_store(key); end +end + +# Each ExampleGroup class and Example instance owns an instance of +# Metadata, which is Hash extended to support lazy evaluation of values +# associated with keys that may or may not be used by any example or group. +# +# In addition to metadata that is used internally, this also stores +# user-supplied metadata, e.g. +# +# RSpec.describe Something, :type => :ui do +# it "does something", :slow => true do +# # ... +# end +# end +# +# `:type => :ui` is stored in the Metadata owned by the example group, and +# `:slow => true` is stored in the Metadata owned by the example. These can +# then be used to select which examples are run using the `--tag` option on +# the command line, or several methods on `Configuration` used to filter a +# run (e.g. `filter_run_including`, `filter_run_excluding`, etc). +# +# @see Example#metadata +# @see ExampleGroup.metadata +# @see FilterManager +# @see Configuration#filter_run_including +# @see Configuration#filter_run_excluding +# +# source://rspec-core//lib/rspec/core/metadata.rb#27 +module RSpec::Core::Metadata + class << self + # Returns an enumerator that iteratively walks up the given metadata through all + # example group ancestors, yielding each metadata hash along the way. + # + # @private + # + # source://rspec-core//lib/rspec/core/metadata.rb#71 + def ascend(metadata); end + + # Iteratively walks up from the given metadata through all + # example group ancestors, yielding each metadata hash along the way. + # + # @private + # @yield [metadata] + # + # source://rspec-core//lib/rspec/core/metadata.rb#58 + def ascending(metadata); end + + # Used internally to build a hash from an args array. + # Symbols are converted into hash keys with a value of `true`. + # This is done to support simple tagging using a symbol, rather + # than needing to do `:symbol => true`. + # + # @private + # + # source://rspec-core//lib/rspec/core/metadata.rb#80 + def build_hash_from(args, warn_about_example_group_filtering = T.unsafe(nil)); end + + # @private + # + # source://rspec-core//lib/rspec/core/metadata.rb#94 + def deep_hash_dup(object); end + + # @private + # + # source://rspec-core//lib/rspec/core/metadata.rb#105 + def id_from(metadata); end + + # @private + # + # source://rspec-core//lib/rspec/core/metadata.rb#110 + def location_tuple_from(metadata); end + + # @api private + # @param line [String] current code line + # @return [String] relative path to line + # + # source://rspec-core//lib/rspec/core/metadata.rb#44 + def relative_path(line); end + + # Matches strings either at the beginning of the input or prefixed with a + # whitespace, containing the current path, either postfixed with the + # separator, or at the end of the string. Match groups are the character + # before and the character after the string if any. + # + # http://rubular.com/r/fT0gmX6VJX + # http://rubular.com/r/duOrD4i3wb + # http://rubular.com/r/sbAMHFrOx1 + # + # source://rspec-core//lib/rspec/core/metadata.rb#36 + def relative_path_regex; end + end +end + +# @private +# +# source://rspec-core//lib/rspec/core/metadata.rb#247 +class RSpec::Core::Metadata::ExampleGroupHash < ::RSpec::Core::Metadata::HashPopulator + private + + # source://rspec-core//lib/rspec/core/metadata.rb#304 + def described_class; end + + # source://rspec-core//lib/rspec/core/metadata.rb#311 + def full_description; end + + class << self + # source://rspec-core//lib/rspec/core/metadata.rb#265 + def backwards_compatibility_default_proc(&example_group_selector); end + + # source://rspec-core//lib/rspec/core/metadata.rb#248 + def create(parent_group_metadata, user_metadata, example_group_index, *args, &block); end + + # source://rspec-core//lib/rspec/core/metadata.rb#261 + def hash_with_backwards_compatibility_default_proc; end + end +end + +# @private +# +# source://rspec-core//lib/rspec/core/metadata.rb#213 +class RSpec::Core::Metadata::ExampleHash < ::RSpec::Core::Metadata::HashPopulator + private + + # source://rspec-core//lib/rspec/core/metadata.rb#234 + def described_class; end + + # source://rspec-core//lib/rspec/core/metadata.rb#238 + def full_description; end + + class << self + # source://rspec-core//lib/rspec/core/metadata.rb#214 + def create(group_metadata, user_metadata, index_provider, description, block); end + end +end + +# Used internally to populate metadata hashes with computed keys +# managed by RSpec. +# +# @private +# +# source://rspec-core//lib/rspec/core/metadata.rb#117 +class RSpec::Core::Metadata::HashPopulator + # @return [HashPopulator] a new instance of HashPopulator + # + # source://rspec-core//lib/rspec/core/metadata.rb#120 + def initialize(metadata, user_metadata, index_provider, description_args, block); end + + # Returns the value of attribute block. + # + # source://rspec-core//lib/rspec/core/metadata.rb#118 + def block; end + + # Returns the value of attribute description_args. + # + # source://rspec-core//lib/rspec/core/metadata.rb#118 + def description_args; end + + # Returns the value of attribute metadata. + # + # source://rspec-core//lib/rspec/core/metadata.rb#118 + def metadata; end + + # source://rspec-core//lib/rspec/core/metadata.rb#128 + def populate; end + + # Returns the value of attribute user_metadata. + # + # source://rspec-core//lib/rspec/core/metadata.rb#118 + def user_metadata; end + + private + + # source://rspec-core//lib/rspec/core/metadata.rb#178 + def build_description_from(parent_description = T.unsafe(nil), my_description = T.unsafe(nil)); end + + # source://rspec-core//lib/rspec/core/metadata.rb#185 + def build_scoped_id_for(file_path); end + + # source://rspec-core//lib/rspec/core/metadata.rb#170 + def description_separator(parent_part, child_part); end + + # source://rspec-core//lib/rspec/core/metadata.rb#191 + def ensure_valid_user_keys; end + + # source://rspec-core//lib/rspec/core/metadata.rb#164 + def file_path_and_line_number_from(backtrace); end + + # source://rspec-core//lib/rspec/core/metadata.rb#143 + def populate_location_attributes; end +end + +# @private +# +# source://rspec-core//lib/rspec/core/metadata.rb#325 +RSpec::Core::Metadata::RESERVED_KEYS = T.let(T.unsafe(nil), Array) + +# Contains metadata filtering logic. This has been extracted from +# the metadata classes because it operates ON a metadata hash but +# does not manage any of the state in the hash. We're moving towards +# having metadata be a raw hash (not a custom subclass), so externalizing +# this filtering logic helps us move in that direction. +# +# source://rspec-core//lib/rspec/core/metadata_filter.rb#8 +module RSpec::Core::MetadataFilter + class << self + # @private + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/metadata_filter.rb#11 + def apply?(predicate, filters, metadata); end + + # @private + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/metadata_filter.rb#16 + def filter_applies?(key, filter_value, metadata); end + + # @private + # + # source://rspec-core//lib/rspec/core/metadata_filter.rb#33 + def silence_metadata_example_group_deprecations; end + + private + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/metadata_filter.rb#42 + def filter_applies_to_any_value?(key, value, metadata); end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/metadata_filter.rb#73 + def filters_apply?(key, value, metadata); end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/metadata_filter.rb#46 + def id_filter_applies?(rerun_paths_to_scoped_ids, metadata); end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/metadata_filter.rb#54 + def location_filter_applies?(locations, metadata); end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/metadata_filter.rb#65 + def proc_filter_applies?(key, proc, metadata); end + end +end + +# Provides a single exception instance that provides access to +# multiple sub-exceptions. This is used in situations where a single +# individual spec has multiple exceptions, such as one in the `it` block +# and one in an `after` block. +# +# source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#436 +class RSpec::Core::MultipleExceptionError < ::StandardError + include ::RSpec::Core::MultipleExceptionError::InterfaceTag + + # @param exceptions [Array] The initial list of exceptions. + # @return [MultipleExceptionError] a new instance of MultipleExceptionError + # + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#492 + def initialize(*exceptions); end + + # @return [nil] Provided only for interface compatibility with + # `RSpec::Expectations::MultipleExpectationsNotMetError`. + # + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#489 + def aggregation_block_label; end + + # @return [Hash] Metadata used by RSpec for formatting purposes. + # + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#485 + def aggregation_metadata; end + + # @return [Array] The list of failures and other exceptions, combined. + # + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#482 + def all_exceptions; end + + # return [String] A description of the failure/error counts. + # + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#517 + def exception_count_description; end + + # @return [Array] The list of failures. + # + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#476 + def failures; end + + # @note RSpec does not actually use this -- instead it formats each exception + # individually. + # @return [String] Combines all the exception messages into a single string. + # + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#507 + def message; end + + # @return [Array] The list of other errors. + # + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#479 + def other_errors; end + + # @return [String] A summary of the failure, including the block label and a count of failures. + # + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#512 + def summary; end +end + +# Used so there is a common module in the ancestor chain of this class +# and `RSpec::Expectations::MultipleExpectationsNotMetError`, which allows +# code to detect exceptions that are instances of either, without first +# checking to see if rspec-expectations is loaded. +# +# @private +# +# source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#437 +module RSpec::Core::MultipleExceptionError::InterfaceTag + # Appends the provided exception to the list. + # + # @param exception [Exception] Exception to append to the list. + # @private + # + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#441 + def add(exception); end + + class << self + # Provides a way to force `ex` to be something that satisfies the multiple + # exception error interface. If it already satisfies it, it will be returned; + # otherwise it will wrap it in a `MultipleExceptionError`. + # + # @private + # + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#467 + def for(ex); end + end +end + +# Notifications are value objects passed to formatters to provide them +# with information about a particular event of interest. +# +# source://rspec-core//lib/rspec/core/notifications.rb#9 +module RSpec::Core::Notifications; end + +# `CustomNotification` is used when sending custom events to formatters / +# other registered listeners, it creates attributes based on supplied hash +# of options. +# +# source://rspec-core//lib/rspec/core/notifications.rb#514 +class RSpec::Core::Notifications::CustomNotification < ::Struct + class << self + # Build a custom notification based on the supplied option key / values. + # + # @param options [Hash] A hash of method / value pairs to create on this notification + # @return [CustomNotification] + # + # source://rspec-core//lib/rspec/core/notifications.rb#515 + def for(options = T.unsafe(nil)); end + end +end + +# The `DeprecationNotification` is issued by the reporter when a deprecated +# part of RSpec is encountered. It represents information about the +# deprecated call site. +# +# @attr message [String] A custom message about the deprecation +# @attr deprecated [String] A custom message about the deprecation (alias of +# message) +# @attr replacement [String] An optional replacement for the deprecation +# @attr call_site [String] An optional call site from which the deprecation +# was issued +# +# source://rspec-core//lib/rspec/core/notifications.rb#491 +class RSpec::Core::Notifications::DeprecationNotification < ::Struct + # An optional call site from which the deprecation + # was issued + # + # @return [String] the current value of call_site + def call_site; end + + # An optional call site from which the deprecation + # was issued + # + # @param value [String] the value to set the attribute call_site to. + # @return [String] the newly set value + def call_site=(_); end + + # A custom message about the deprecation (alias of + # message) + # + # @return [String] the current value of deprecated + def deprecated; end + + # A custom message about the deprecation (alias of + # message) + # + # @param value [String] the value to set the attribute deprecated to. + # @return [String] the newly set value + def deprecated=(_); end + + # A custom message about the deprecation + # + # @return [String] the current value of message + def message; end + + # A custom message about the deprecation + # + # @param value [String] the value to set the attribute message to. + # @return [String] the newly set value + def message=(_); end + + # An optional replacement for the deprecation + # + # @return [String] the current value of replacement + def replacement; end + + # An optional replacement for the deprecation + # + # @param value [String] the value to set the attribute replacement to. + # @return [String] the newly set value + def replacement=(_); end + + class << self + def [](*_arg0); end + + # Convenience way to initialize the notification + # + # @api + # + # source://rspec-core//lib/rspec/core/notifications.rb#497 + def from_hash(data); end + + def inspect; end + def keyword_init?; end + def members; end + + private + + def new(*_arg0); end + end +end + +# The `ExampleNotification` represents notifications sent by the reporter +# which contain information about the current (or soon to be) example. +# It is used by formatters to access information about that example. +# +# @attr example [RSpec::Core::Example] the current example +# @example +# def example_started(notification) +# puts "Hey I started #{notification.example.description}" +# end +# +# source://rspec-core//lib/rspec/core/notifications.rb#38 +class RSpec::Core::Notifications::ExampleNotification < ::Struct + # the current example + # + # @return [RSpec::Core::Example] the current value of example + def example; end + + # the current example + # + # @param value [RSpec::Core::Example] the value to set the attribute example to. + # @return [RSpec::Core::Example] the newly set value + def example=(_); end + + class << self + def [](*_arg0); end + + # @private + # + # source://rspec-core//lib/rspec/core/notifications.rb#41 + def for(example); end + + def inspect; end + def keyword_init?; end + def members; end + + private + + def new(*_arg0); end + end +end + +# The `ExamplesNotification` represents notifications sent by the reporter +# which contain information about the suites examples. +# +# @example +# def stop(notification) +# puts "Hey I ran #{notification.examples.size}" +# end +# +# source://rspec-core//lib/rspec/core/notifications.rb#69 +class RSpec::Core::Notifications::ExamplesNotification + # @return [ExamplesNotification] a new instance of ExamplesNotification + # + # source://rspec-core//lib/rspec/core/notifications.rb#70 + def initialize(reporter); end + + # @return [Array] list of examples + # + # source://rspec-core//lib/rspec/core/notifications.rb#75 + def examples; end + + # @return [Array] list of failed examples + # + # source://rspec-core//lib/rspec/core/notifications.rb#80 + def failed_examples; end + + # @return [Array] returns failed examples as notifications + # + # source://rspec-core//lib/rspec/core/notifications.rb#97 + def failure_notifications; end + + # @return [String] The list of failed examples, fully formatted in the way + # that RSpec's built-in formatters emit. + # + # source://rspec-core//lib/rspec/core/notifications.rb#110 + def fully_formatted_failed_examples(colorizer = T.unsafe(nil)); end + + # @return [String] The list of pending examples, fully formatted in the + # way that RSpec's built-in formatters emit. + # + # source://rspec-core//lib/rspec/core/notifications.rb#122 + def fully_formatted_pending_examples(colorizer = T.unsafe(nil)); end + + # @return [Array] returns examples as notifications + # + # source://rspec-core//lib/rspec/core/notifications.rb#91 + def notifications; end + + # @return [Array] list of pending examples + # + # source://rspec-core//lib/rspec/core/notifications.rb#85 + def pending_examples; end + + # returns pending examples as notifications + # + # @return [Array] + # + # source://rspec-core//lib/rspec/core/notifications.rb#104 + def pending_notifications; end + + private + + # source://rspec-core//lib/rspec/core/notifications.rb#134 + def format_examples(examples); end +end + +# The `FailedExampleNotification` extends `ExampleNotification` with +# things useful for examples that have failure info -- typically a +# failed or pending spec. +# +# @attr example [RSpec::Core::Example] the current example +# @example +# def example_failed(notification) +# puts "Hey I failed :(" +# puts "Here's my stack trace" +# puts notification.exception.backtrace.join("\n") +# end +# @see ExampleNotification +# +# source://rspec-core//lib/rspec/core/notifications.rb#154 +class RSpec::Core::Notifications::FailedExampleNotification < ::RSpec::Core::Notifications::ExampleNotification + # @return [FailedExampleNotification] a new instance of FailedExampleNotification + # + # source://rspec-core//lib/rspec/core/notifications.rb#211 + def initialize(example, exception_presenter = T.unsafe(nil)); end + + # Returns the failures colorized formatted backtrace. + # + # @param colorizer [#wrap] An object to colorize the message_lines by + # @return [Array] the examples colorized backtrace lines + # + # source://rspec-core//lib/rspec/core/notifications.rb#193 + def colorized_formatted_backtrace(colorizer = T.unsafe(nil)); end + + # Returns the message generated for this failure colorized line by line. + # + # @param colorizer [#wrap] An object to colorize the message_lines by + # @return [Array] The example failure message colorized + # + # source://rspec-core//lib/rspec/core/notifications.rb#178 + def colorized_message_lines(colorizer = T.unsafe(nil)); end + + # @return [String] The example description + # + # source://rspec-core//lib/rspec/core/notifications.rb#163 + def description; end + + # @return [Exception] The example failure + # + # source://rspec-core//lib/rspec/core/notifications.rb#158 + def exception; end + + # Returns the failures formatted backtrace. + # + # @return [Array] the examples backtrace lines + # + # source://rspec-core//lib/rspec/core/notifications.rb#185 + def formatted_backtrace; end + + # @return [String] The failure information fully formatted in the way that + # RSpec's built-in formatters emit. + # + # source://rspec-core//lib/rspec/core/notifications.rb#199 + def fully_formatted(failure_number, colorizer = T.unsafe(nil)); end + + # @return [Array] The failure information fully formatted in the way that + # RSpec's built-in formatters emit, split by line. + # + # source://rspec-core//lib/rspec/core/notifications.rb#205 + def fully_formatted_lines(failure_number, colorizer = T.unsafe(nil)); end + + # Returns the message generated for this failure line by line. + # + # @return [Array] The example failure message + # + # source://rspec-core//lib/rspec/core/notifications.rb#170 + def message_lines; end + + class << self + def new(*_arg0); end + end +end + +# The `GroupNotification` represents notifications sent by the reporter +# which contain information about the currently running (or soon to be) +# example group. It is used by formatters to access information about that +# group. +# +# @attr group [RSpec::Core::ExampleGroup] the current group +# @example +# def example_group_started(notification) +# puts "Hey I started #{notification.group.description}" +# end +# +# source://rspec-core//lib/rspec/core/notifications.rb#256 +class RSpec::Core::Notifications::GroupNotification < ::Struct + # the current group + # + # @return [RSpec::Core::ExampleGroup] the current value of group + def group; end + + # the current group + # + # @param value [RSpec::Core::ExampleGroup] the value to set the attribute group to. + # @return [RSpec::Core::ExampleGroup] the newly set value + def group=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# The `MessageNotification` encapsulates generic messages that the reporter +# sends to formatters. +# +# @attr message [String] the message +# +# source://rspec-core//lib/rspec/core/notifications.rb#262 +class RSpec::Core::Notifications::MessageNotification < ::Struct + # the message + # + # @return [String] the current value of message + def message; end + + # the message + # + # @param value [String] the value to set the attribute message to. + # @return [String] the newly set value + def message=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# @private +# +# source://rspec-core//lib/rspec/core/notifications.rb#11 +module RSpec::Core::Notifications::NullColorizer + private + + # source://rspec-core//lib/rspec/core/notifications.rb#14 + def wrap(line, _code_or_symbol); end + + class << self + # source://rspec-core//lib/rspec/core/notifications.rb#14 + def wrap(line, _code_or_symbol); end + end +end + +# `NullNotification` represents a placeholder value for notifications that +# currently require no information, but we may wish to extend in future. +# +# source://rspec-core//lib/rspec/core/notifications.rb#504 +class RSpec::Core::Notifications::NullNotification; end + +# @deprecated Use {FailedExampleNotification} instead. +# +# source://rspec-core//lib/rspec/core/notifications.rb#221 +class RSpec::Core::Notifications::PendingExampleFailedAsExpectedNotification < ::RSpec::Core::Notifications::FailedExampleNotification; end + +# @deprecated Use {FailedExampleNotification} instead. +# +# source://rspec-core//lib/rspec/core/notifications.rb#218 +class RSpec::Core::Notifications::PendingExampleFixedNotification < ::RSpec::Core::Notifications::FailedExampleNotification; end + +# The `ProfileNotification` holds information about the results of running a +# test suite when profiling is enabled. It is used by formatters to provide +# information at the end of the test run for profiling information. +# +# @attr duration [Float] the time taken (in seconds) to run the suite +# @attr examples [Array] the examples run +# @attr number_of_examples [Fixnum] the number of examples to profile +# @attr example_groups [Array] example groups run +# +# source://rspec-core//lib/rspec/core/notifications.rb#427 +class RSpec::Core::Notifications::ProfileNotification + # @return [ProfileNotification] a new instance of ProfileNotification + # + # source://rspec-core//lib/rspec/core/notifications.rb#428 + def initialize(duration, examples, number_of_examples, example_groups); end + + # the time taken (in seconds) to run the suite + # + # @return [Float] the current value of duration + # + # source://rspec-core//lib/rspec/core/notifications.rb#434 + def duration; end + + # the examples run + # + # @return [Array] the current value of examples + # + # source://rspec-core//lib/rspec/core/notifications.rb#434 + def examples; end + + # the number of examples to profile + # + # @return [Fixnum] the current value of number_of_examples + # + # source://rspec-core//lib/rspec/core/notifications.rb#434 + def number_of_examples; end + + # @return [String] the percentage of total time taken + # + # source://rspec-core//lib/rspec/core/notifications.rb#453 + def percentage; end + + # @return [Float] the time taken (in seconds) to run the slowest examples + # + # source://rspec-core//lib/rspec/core/notifications.rb#445 + def slow_duration; end + + # @return [Array] the slowest examples + # + # source://rspec-core//lib/rspec/core/notifications.rb#437 + def slowest_examples; end + + # @return [Array] the slowest example groups + # + # source://rspec-core//lib/rspec/core/notifications.rb#462 + def slowest_groups; end + + private + + # source://rspec-core//lib/rspec/core/notifications.rb#468 + def calculate_slowest_groups; end +end + +# The `SeedNotification` holds the seed used to randomize examples and +# whether that seed has been used or not. +# +# @attr seed [Fixnum] the seed used to randomize ordering +# @attr used [Boolean] whether the seed has been used or not +# +# source://rspec-core//lib/rspec/core/notifications.rb#269 +class RSpec::Core::Notifications::SeedNotification < ::Struct + # @return [String] The seed information fully formatted in the way that + # RSpec's built-in formatters emit. + # + # source://rspec-core//lib/rspec/core/notifications.rb#280 + def fully_formatted; end + + # the seed used to randomize ordering + # + # @return [Fixnum] the current value of seed + def seed; end + + # the seed used to randomize ordering + # + # @param value [Fixnum] the value to set the attribute seed to. + # @return [Fixnum] the newly set value + def seed=(_); end + + # @api + # @return [Boolean] has the seed been used? + # + # source://rspec-core//lib/rspec/core/notifications.rb#273 + def seed_used?; end + + # whether the seed has been used or not + # + # @param value [Boolean] the value to set the attribute used to. + # @return [Boolean] the newly set value + def used=(_); end + + private + + # whether the seed has been used or not + # + # @return [Boolean] the current value of used + def used; end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# The `SkippedExampleNotification` extends `ExampleNotification` with +# things useful for specs that are skipped. +# +# @attr example [RSpec::Core::Example] the current example +# @see ExampleNotification +# +# source://rspec-core//lib/rspec/core/notifications.rb#228 +class RSpec::Core::Notifications::SkippedExampleNotification < ::RSpec::Core::Notifications::ExampleNotification + # @return [String] The pending detail fully formatted in the way that + # RSpec's built-in formatters emit. + # + # source://rspec-core//lib/rspec/core/notifications.rb#233 + def fully_formatted(pending_number, colorizer = T.unsafe(nil)); end + + class << self + def new(*_arg0); end + end +end + +# The `StartNotification` represents a notification sent by the reporter +# when the suite is started. It contains the expected amount of examples +# to be executed, and the load time of RSpec. +# +# @attr count [Fixnum] the number counted +# @attr load_time [Float] the number of seconds taken to boot RSpec +# and load the spec files +# +# source://rspec-core//lib/rspec/core/notifications.rb#26 +class RSpec::Core::Notifications::StartNotification < ::Struct + # the number counted + # + # @return [Fixnum] the current value of count + def count; end + + # the number counted + # + # @param value [Fixnum] the value to set the attribute count to. + # @return [Fixnum] the newly set value + def count=(_); end + + # the number of seconds taken to boot RSpec + # and load the spec files + # + # @return [Float] the current value of load_time + def load_time; end + + # the number of seconds taken to boot RSpec + # and load the spec files + # + # @param value [Float] the value to set the attribute load_time to. + # @return [Float] the newly set value + def load_time=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# The `SummaryNotification` holds information about the results of running +# a test suite. It is used by formatters to provide information at the end +# of the test run. +# +# @attr duration [Float] the time taken (in seconds) to run the suite +# @attr examples [Array] the examples run +# @attr failed_examples [Array] the failed examples +# @attr pending_examples [Array] the pending examples +# @attr load_time [Float] the number of seconds taken to boot RSpec +# and load the spec files +# @attr errors_outside_of_examples_count [Integer] the number of errors that +# have occurred processing +# the spec suite +# +# source://rspec-core//lib/rspec/core/notifications.rb#298 +class RSpec::Core::Notifications::SummaryNotification < ::Struct + include ::RSpec::Core::ShellEscape + + # Formats failures into a rerunable command format. + # + # @api public + # @param colorizer [#wrap] An object which supports wrapping text with + # specific colors. + # @return [String] A colorized summary line. + # + # source://rspec-core//lib/rspec/core/notifications.rb#362 + def colorized_rerun_commands(colorizer = T.unsafe(nil)); end + + # Wraps the results line with colors based on the configured + # colors for failure, pending, and success. Defaults to red, + # yellow, green accordingly. + # + # @api public + # @param colorizer [#wrap] An object which supports wrapping text with + # specific colors. + # @return [String] A colorized results line. + # + # source://rspec-core//lib/rspec/core/notifications.rb#345 + def colorized_totals_line(colorizer = T.unsafe(nil)); end + + # the time taken (in seconds) to run the suite + # + # @return [Float] the current value of duration + def duration; end + + # the time taken (in seconds) to run the suite + # + # @param value [Float] the value to set the attribute duration to. + # @return [Float] the newly set value + def duration=(_); end + + # the number of errors that + # have occurred processing + # the spec suite + # + # @return [Integer] the current value of errors_outside_of_examples_count + def errors_outside_of_examples_count; end + + # the number of errors that + # have occurred processing + # the spec suite + # + # @param value [Integer] the value to set the attribute errors_outside_of_examples_count to. + # @return [Integer] the newly set value + def errors_outside_of_examples_count=(_); end + + # @api + # @return [Fixnum] the number of examples run + # + # source://rspec-core//lib/rspec/core/notifications.rb#304 + def example_count; end + + # the examples run + # + # @return [Array] the current value of examples + def examples; end + + # the examples run + # + # @param value [Array] the value to set the attribute examples to. + # @return [Array] the newly set value + def examples=(_); end + + # the failed examples + # + # @return [Array] the current value of failed_examples + def failed_examples; end + + # the failed examples + # + # @param value [Array] the value to set the attribute failed_examples to. + # @return [Array] the newly set value + def failed_examples=(_); end + + # @api + # @return [Fixnum] the number of failed examples + # + # source://rspec-core//lib/rspec/core/notifications.rb#310 + def failure_count; end + + # @return [String] a formatted version of the time it took to run the + # suite + # + # source://rspec-core//lib/rspec/core/notifications.rb#372 + def formatted_duration; end + + # @return [String] a formatted version of the time it took to boot RSpec + # and load the spec files + # + # source://rspec-core//lib/rspec/core/notifications.rb#378 + def formatted_load_time; end + + # @return [String] The summary information fully formatted in the way that + # RSpec's built-in formatters emit. + # + # source://rspec-core//lib/rspec/core/notifications.rb#384 + def fully_formatted(colorizer = T.unsafe(nil)); end + + # the number of seconds taken to boot RSpec + # and load the spec files + # + # @return [Float] the current value of load_time + def load_time; end + + # the number of seconds taken to boot RSpec + # and load the spec files + # + # @param value [Float] the value to set the attribute load_time to. + # @return [Float] the newly set value + def load_time=(_); end + + # @api + # @return [Fixnum] the number of pending examples + # + # source://rspec-core//lib/rspec/core/notifications.rb#316 + def pending_count; end + + # the pending examples + # + # @return [Array] the current value of pending_examples + def pending_examples; end + + # the pending examples + # + # @param value [Array] the value to set the attribute pending_examples to. + # @return [Array] the newly set value + def pending_examples=(_); end + + # @api + # @return [String] A line summarising the result totals of the spec run. + # + # source://rspec-core//lib/rspec/core/notifications.rb#322 + def totals_line; end + + private + + # source://rspec-core//lib/rspec/core/notifications.rb#406 + def duplicate_rerun_locations; end + + # source://rspec-core//lib/rspec/core/notifications.rb#400 + def rerun_argument_for(example); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# # Used in place of a {Reporter} for situations where we don't want reporting output. +# +# @private +# +# source://rspec-core//lib/rspec/core/reporter.rb#259 +class RSpec::Core::NullReporter + class << self + private + + # source://rspec-core//lib/rspec/core/reporter.rb#260 + def method_missing(*_arg0); end + end +end + +# @private +# +# source://rspec-core//lib/rspec/core/ordering.rb#4 +module RSpec::Core::Ordering; end + +# Manages ordering configuration. +# +# @note This is not intended to be used externally. Use +# the APIs provided by `RSpec::Core::Configuration` instead. +# @private +# +# source://rspec-core//lib/rspec/core/ordering.rb#116 +class RSpec::Core::Ordering::ConfigurationManager + # @return [ConfigurationManager] a new instance of ConfigurationManager + # + # source://rspec-core//lib/rspec/core/ordering.rb#119 + def initialize; end + + # source://rspec-core//lib/rspec/core/ordering.rb#151 + def force(hash); end + + # source://rspec-core//lib/rspec/core/ordering.rb#136 + def order=(type); end + + # Returns the value of attribute ordering_registry. + # + # source://rspec-core//lib/rspec/core/ordering.rb#117 + def ordering_registry; end + + # source://rspec-core//lib/rspec/core/ordering.rb#162 + def register_ordering(name, strategy = T.unsafe(nil)); end + + # Returns the value of attribute seed. + # + # source://rspec-core//lib/rspec/core/ordering.rb#117 + def seed; end + + # source://rspec-core//lib/rspec/core/ordering.rb#130 + def seed=(seed); end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/ordering.rb#126 + def seed_used?; end +end + +# Orders items based on a custom block. +# +# @private +# +# source://rspec-core//lib/rspec/core/ordering.rb#71 +class RSpec::Core::Ordering::Custom + # @return [Custom] a new instance of Custom + # + # source://rspec-core//lib/rspec/core/ordering.rb#72 + def initialize(callable); end + + # source://rspec-core//lib/rspec/core/ordering.rb#76 + def order(list); end +end + +# The default global ordering (defined order). +# +# @private +# +# source://rspec-core//lib/rspec/core/ordering.rb#7 +class RSpec::Core::Ordering::Identity + # source://rspec-core//lib/rspec/core/ordering.rb#8 + def order(items); end +end + +# Orders items randomly. +# +# @private +# +# source://rspec-core//lib/rspec/core/ordering.rb#15 +class RSpec::Core::Ordering::Random + # @return [Random] a new instance of Random + # + # source://rspec-core//lib/rspec/core/ordering.rb#16 + def initialize(configuration); end + + # source://rspec-core//lib/rspec/core/ordering.rb#25 + def order(items); end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/ordering.rb#21 + def used?; end + + private + + # http://en.wikipedia.org/wiki/Jenkins_hash_function + # Jenkins provides a good distribution and is simpler than MD5. + # It's a bit slower than MD5 (primarily because `Digest::MD5` is + # implemented in C) but has the advantage of not requiring us + # to load another part of stdlib, which we try to minimize. + # + # source://rspec-core//lib/rspec/core/ordering.rb#39 + def jenkins_hash_digest(string); end +end + +# source://rspec-core//lib/rspec/core/ordering.rb#58 +RSpec::Core::Ordering::Random::MAX_32_BIT = T.let(T.unsafe(nil), Integer) + +# Orders items by modification time (most recent modified first). +# +# @private +# +# source://rspec-core//lib/rspec/core/ordering.rb#63 +class RSpec::Core::Ordering::RecentlyModified + # source://rspec-core//lib/rspec/core/ordering.rb#64 + def order(list); end +end + +# Stores the different ordering strategies. +# +# @private +# +# source://rspec-core//lib/rspec/core/ordering.rb#83 +class RSpec::Core::Ordering::Registry + # @return [Registry] a new instance of Registry + # + # source://rspec-core//lib/rspec/core/ordering.rb#84 + def initialize(configuration); end + + # source://rspec-core//lib/rspec/core/ordering.rb#98 + def fetch(name, &fallback); end + + # source://rspec-core//lib/rspec/core/ordering.rb#102 + def register(sym, strategy); end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/ordering.rb#106 + def used_random_seed?; end +end + +# @private +# +# source://rspec-core//lib/rspec/core/output_wrapper.rb#4 +class RSpec::Core::OutputWrapper + # @private + # @return [OutputWrapper] a new instance of OutputWrapper + # + # source://rspec-core//lib/rspec/core/output_wrapper.rb#9 + def initialize(output); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def <<(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def advise(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def autoclose=(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def autoclose?(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def binmode(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def binmode?(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def close(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def close_on_exec=(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def close_on_exec?(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def close_read(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def close_write(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def closed?(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def each(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def each_byte(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def each_char(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def each_codepoint(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def each_line(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def eof(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def eof?(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def external_encoding(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def fcntl(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def fdatasync(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def fileno(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def flush(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def fsync(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def getbyte(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def getc(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def gets(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def inspect(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def internal_encoding(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def ioctl(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def isatty(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def lineno(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def lineno=(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#17 + def method_missing(name, *args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def nonblock(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def nonblock=(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def nonblock?(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def nread(*args, &block); end + + # @private + # + # source://rspec-core//lib/rspec/core/output_wrapper.rb#6 + def output; end + + # @private + # + # source://rspec-core//lib/rspec/core/output_wrapper.rb#6 + def output=(_arg0); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def pathconf(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def pid(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def pos(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def pos=(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def pread(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def print(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def printf(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def putc(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def puts(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def pwrite(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def read(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def read_nonblock(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def readbyte(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def readchar(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def readline(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def readlines(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def readpartial(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def ready?(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def reopen(*args, &block); end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/output_wrapper.rb#13 + def respond_to?(name, priv = T.unsafe(nil)); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def rewind(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def seek(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def set_encoding(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def set_encoding_by_bom(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def stat(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def sync(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def sync=(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def sysread(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def sysseek(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def syswrite(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def tell(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def to_i(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def to_io(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def tty?(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def ungetbyte(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def ungetc(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def wait(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def wait_priority(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def wait_readable(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def wait_writable(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def write(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def write_nonblock(*args, &block); end +end + +# @private +# +# source://rspec-core//lib/rspec/core/option_parser.rb#6 +class RSpec::Core::Parser + # @return [Parser] a new instance of Parser + # + # source://rspec-core//lib/rspec/core/option_parser.rb#13 + def initialize(original_args); end + + # Returns the value of attribute original_args. + # + # source://rspec-core//lib/rspec/core/option_parser.rb#11 + def original_args; end + + # source://rspec-core//lib/rspec/core/option_parser.rb#17 + def parse(source = T.unsafe(nil)); end + + private + + # source://rspec-core//lib/rspec/core/option_parser.rb#310 + def add_tag_filter(options, filter_type, tag_name, value = T.unsafe(nil)); end + + # source://rspec-core//lib/rspec/core/option_parser.rb#318 + def configure_only_failures(options); end + + # source://rspec-core//lib/rspec/core/option_parser.rb#39 + def parser(options); end + + # source://rspec-core//lib/rspec/core/option_parser.rb#314 + def set_fail_fast(options, value); end + + class << self + # source://rspec-core//lib/rspec/core/option_parser.rb#7 + def parse(args, source = T.unsafe(nil)); end + end +end + +# Provides methods to mark examples as pending. These methods are available +# to be called from within any example or hook. +# +# source://rspec-core//lib/rspec/core/pending.rb#5 +module RSpec::Core::Pending + # Marks an example as pending. The rest of the example will still be + # executed, and if it passes the example will fail to indicate that the + # pending can be removed. + # + # @example + # describe "some behaviour" do + # # reported as "Pending: no reason given" + # it "is pending with no message" do + # pending + # raise "broken" + # end + # + # # reported as "Pending: something else getting finished" + # it "is pending with a custom message" do + # pending("something else getting finished") + # raise "broken" + # end + # end + # @note When using `pending` inside an example body using this method + # hooks, such as `before(:example)`, have already be run. This means that + # a failure from the code in the `before` hook will prevent the example + # from being considered pending, as the example body would not be + # executed. If you need to consider hooks as pending as well you can use + # the pending metadata as an alternative, e.g. + # `it "does something", pending: "message"`. + # @overload pending + # @overload pending + # @param message [String] optional message to add to the summary report. + # + # source://rspec-core//lib/rspec/core/pending.rb#62 + def pending(message = T.unsafe(nil)); end + + # Marks an example as pending and skips execution. + # + # @example + # describe "an example" do + # # reported as "Pending: no reason given" + # it "is skipped with no message" do + # skip + # end + # + # # reported as "Pending: something else getting finished" + # it "is skipped with a custom message" do + # skip "something else getting finished" + # end + # end + # @overload skip + # @overload skip + # @param message [String] optional message to add to the summary report. + # @raise [SkipDeclaredInExample] + # + # source://rspec-core//lib/rspec/core/pending.rb#110 + def skip(message = T.unsafe(nil)); end + + class << self + # Mark example as fixed. + # + # @param example [RSpec::Core::Example] the example to mark as fixed + # @private + # + # source://rspec-core//lib/rspec/core/pending.rb#152 + def mark_fixed!(example); end + + # Mark example as pending. + # + # @param example [RSpec::Core::Example] the example to mark as pending + # @param message_or_bool [Boolean, String] the message to use, or true + # @private + # + # source://rspec-core//lib/rspec/core/pending.rb#135 + def mark_pending!(example, message_or_bool); end + + # Mark example as skipped. + # + # @param example [RSpec::Core::Example] the example to mark as skipped + # @param message_or_bool [Boolean, String] the message to use, or true + # @private + # + # source://rspec-core//lib/rspec/core/pending.rb#124 + def mark_skipped!(example, message_or_bool); end + end +end + +# @private +# +# source://rspec-core//lib/rspec/core/pending.rb#29 +RSpec::Core::Pending::NOT_YET_IMPLEMENTED = T.let(T.unsafe(nil), String) + +# @private +# +# source://rspec-core//lib/rspec/core/pending.rb#26 +RSpec::Core::Pending::NO_REASON_GIVEN = T.let(T.unsafe(nil), String) + +# source://rspec-core//lib/rspec/core/pending.rb#22 +class RSpec::Core::Pending::PendingExampleFixedError < ::StandardError; end + +# Raised in the middle of an example to indicate that it should be marked +# as skipped. +# +# source://rspec-core//lib/rspec/core/pending.rb#8 +class RSpec::Core::Pending::SkipDeclaredInExample < ::StandardError + # @return [SkipDeclaredInExample] a new instance of SkipDeclaredInExample + # + # source://rspec-core//lib/rspec/core/pending.rb#11 + def initialize(argument); end + + # Returns the value of attribute argument. + # + # source://rspec-core//lib/rspec/core/pending.rb#9 + def argument; end +end + +# @private +# +# source://rspec-core//lib/rspec/core/profiler.rb#4 +class RSpec::Core::Profiler + # @return [Profiler] a new instance of Profiler + # + # source://rspec-core//lib/rspec/core/profiler.rb#7 + def initialize; end + + # source://rspec-core//lib/rspec/core/profiler.rb#20 + def example_group_finished(notification); end + + # source://rspec-core//lib/rspec/core/profiler.rb#13 + def example_group_started(notification); end + + # Returns the value of attribute example_groups. + # + # source://rspec-core//lib/rspec/core/profiler.rb#11 + def example_groups; end + + # source://rspec-core//lib/rspec/core/profiler.rb#28 + def example_started(notification); end +end + +# source://rspec-core//lib/rspec/core/profiler.rb#5 +RSpec::Core::Profiler::NOTIFICATIONS = T.let(T.unsafe(nil), Array) + +# A reporter will send notifications to listeners, usually formatters for the +# spec suite run. +# +# source://rspec-core//lib/rspec/core/reporter.rb#4 +class RSpec::Core::Reporter + # @return [Reporter] a new instance of Reporter + # + # source://rspec-core//lib/rspec/core/reporter.rb#14 + def initialize(configuration); end + + # @private + # + # source://rspec-core//lib/rspec/core/reporter.rb#214 + def abort_with(msg, exit_status); end + + # @private + # + # source://rspec-core//lib/rspec/core/reporter.rb#193 + def close_after; end + + # @private + # + # source://rspec-core//lib/rspec/core/reporter.rb#155 + def deprecation(hash); end + + # @private + # + # source://rspec-core//lib/rspec/core/reporter.rb#143 + def example_failed(example); end + + # @private + # + # source://rspec-core//lib/rspec/core/reporter.rb#133 + def example_finished(example); end + + # @private + # + # source://rspec-core//lib/rspec/core/reporter.rb#122 + def example_group_finished(group); end + + # @private + # + # source://rspec-core//lib/rspec/core/reporter.rb#117 + def example_group_started(group); end + + # @private + # + # source://rspec-core//lib/rspec/core/reporter.rb#138 + def example_passed(example); end + + # @private + # + # source://rspec-core//lib/rspec/core/reporter.rb#149 + def example_pending(example); end + + # @private + # + # source://rspec-core//lib/rspec/core/reporter.rb#127 + def example_started(example); end + + # @private + # + # source://rspec-core//lib/rspec/core/reporter.rb#28 + def examples; end + + # Reports a run that exited early without having run any examples. + # + # @param exit_code [Integer] the exit_code to be return by the reporter + # + # source://rspec-core//lib/rspec/core/reporter.rb#84 + def exit_early(exit_code); end + + # @private + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/reporter.rb#221 + def fail_fast_limit_met?; end + + # @private + # + # source://rspec-core//lib/rspec/core/reporter.rb#28 + def failed_examples; end + + # @private + # + # source://rspec-core//lib/rspec/core/reporter.rb#173 + def finish; end + + # Send a custom message to supporting formatters. + # + # @param message [#to_s] A message object to send to formatters + # + # source://rspec-core//lib/rspec/core/reporter.rb#99 + def message(message); end + + # @private + # + # source://rspec-core//lib/rspec/core/reporter.rb#206 + def notify(event, notification); end + + # Provides a way to notify of an exception that is not tied to any + # particular example (such as an exception encountered in a :suite hook). + # Exceptions will be formatted the same way they normally are. + # + # @private + # + # source://rspec-core//lib/rspec/core/reporter.rb#163 + def notify_non_example_exception(exception, context_description); end + + # @private + # + # source://rspec-core//lib/rspec/core/reporter.rb#28 + def pending_examples; end + + # @private + # + # source://rspec-core//lib/rspec/core/reporter.rb#45 + def prepare_default(loader, output_stream, deprecation_stream); end + + # Publish a custom event to supporting registered formatters. + # + # @param event [Symbol] Name of the custom event to trigger on formatters + # @param options [Hash] Hash of arguments to provide via `CustomNotification` + # @see RSpec::Core::Notifications::CustomNotification + # + # source://rspec-core//lib/rspec/core/reporter.rb#108 + def publish(event, options = T.unsafe(nil)); end + + # Registers a listener to a list of notifications. The reporter will send + # notification of events to all registered listeners. + # + # @param listener [Object] An object that wishes to be notified of reporter + # events + # @param notifications [Array] Array of symbols represents the events a + # listener wishes to subscribe too + # + # source://rspec-core//lib/rspec/core/reporter.rb#37 + def register_listener(listener, *notifications); end + + # @private + # + # source://rspec-core//lib/rspec/core/reporter.rb#52 + def registered_listeners(notification); end + + # Initializes the report run and yields itself for further reporting. The + # block is required, so that the reporter can manage cleaning up after the + # run. + # + # @example + # + # reporter.report(group.examples.size) do |r| + # example_groups.map {|g| g.run(r) } + # end + # @overload report + # @overload report + # @param expected_example_count [Integer] the number of examples being run + # @yield [Block] block yields itself for further reporting. + # + # source://rspec-core//lib/rspec/core/reporter.rb#71 + def report(expected_example_count); end + + # @private + # + # source://rspec-core//lib/rspec/core/reporter.rb#89 + def start(expected_example_count, time = T.unsafe(nil)); end + + # @private + # + # source://rspec-core//lib/rspec/core/reporter.rb#200 + def stop; end + + private + + # source://rspec-core//lib/rspec/core/reporter.rb#242 + def close; end + + # source://rspec-core//lib/rspec/core/reporter.rb#233 + def ensure_listeners_ready; end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/reporter.rb#246 + def mute_profile_output?; end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/reporter.rb#252 + def seed_used?; end +end + +# @private +# +# source://rspec-core//lib/rspec/core/reporter.rb#6 +RSpec::Core::Reporter::RSPEC_NOTIFICATIONS = T.let(T.unsafe(nil), RSpec::Core::Set) + +# @private +# +# source://rspec-core//lib/rspec/core/ruby_project.rb#7 +module RSpec::Core::RubyProject + private + + # source://rspec-core//lib/rspec/core/ruby_project.rb#12 + def add_dir_to_load_path(dir); end + + # source://rspec-core//lib/rspec/core/ruby_project.rb#8 + def add_to_load_path(*dirs); end + + # source://rspec-core//lib/rspec/core/ruby_project.rb#28 + def ascend_until; end + + # source://rspec-core//lib/rspec/core/ruby_project.rb#20 + def determine_root; end + + # source://rspec-core//lib/rspec/core/ruby_project.rb#24 + def find_first_parent_containing(dir); end + + # source://rspec-core//lib/rspec/core/ruby_project.rb#16 + def root; end + + class << self + # source://rspec-core//lib/rspec/core/ruby_project.rb#12 + def add_dir_to_load_path(dir); end + + # source://rspec-core//lib/rspec/core/ruby_project.rb#8 + def add_to_load_path(*dirs); end + + # source://rspec-core//lib/rspec/core/ruby_project.rb#28 + def ascend_until; end + + # source://rspec-core//lib/rspec/core/ruby_project.rb#20 + def determine_root; end + + # source://rspec-core//lib/rspec/core/ruby_project.rb#24 + def find_first_parent_containing(dir); end + + # source://rspec-core//lib/rspec/core/ruby_project.rb#16 + def root; end + end +end + +# Provides the main entry point to run a suite of RSpec examples. +# +# source://rspec-core//lib/rspec/core/runner.rb#4 +class RSpec::Core::Runner + extend ::RSpecExt + + # @return [Runner] a new instance of Runner + # + # source://rspec-core//lib/rspec/core/runner.rb#75 + def initialize(options, configuration = T.unsafe(nil), world = T.unsafe(nil)); end + + # @attr_reader + # @private + # + # source://rspec-core//lib/rspec/core/runner.rb#7 + def configuration; end + + # @private + # + # source://rspec-core//lib/rspec/core/runner.rb#129 + def configure(err, out); end + + # @private + # + # source://rspec-core//lib/rspec/core/runner.rb#190 + def exit_code(examples_passed = T.unsafe(nil)); end + + # @attr_reader + # @private + # + # source://rspec-core//lib/rspec/core/runner.rb#7 + def options; end + + # Configures and runs a spec suite. + # + # @param err [IO] error stream + # @param out [IO] output stream + # + # source://rspec-core//lib/rspec/core/runner.rb#85 + def run(err, out); end + + # Runs the provided example groups. + # + # @param example_groups [Array] groups to run + # @return [Fixnum] exit status code. 0 if all specs passed, + # or the configured failure exit code (1 by default) if specs + # failed. + # + # source://rspec-core//lib/rspec/core/runner.rb#113 + def run_specs(example_groups); end + + # Wires together the various configuration objects and state holders. + # + # @param err [IO] error stream + # @param out [IO] output stream + # + # source://rspec-core//lib/rspec/core/runner.rb#98 + def setup(err, out); end + + # @attr_reader + # @private + # + # source://rspec-core//lib/rspec/core/runner.rb#7 + def world; end + + private + + # source://rspec-core//lib/rspec/core/runner.rb#199 + def persist_example_statuses; end + + class << self + # Register an `at_exit` hook that runs the suite when the process exits. + # + # @note This is not generally needed. The `rspec` command takes care + # of running examples for you without involving an `at_exit` + # hook. This is only needed if you are running specs using + # the `ruby` command, and even then, the normal way to invoke + # this is by requiring `rspec/autorun`. + # + # source://rspec-core//lib/rspec/core/runner.rb#16 + def autorun; end + + # @private + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/runner.rb#141 + def autorun_disabled?; end + + # @private + # + # source://rspec-core//lib/rspec/core/runner.rb#136 + def disable_autorun!; end + + # @private + # + # source://turbo_tests/2.2.0/lib/turbo_tests/json_rows_formatter.rb#9 + def handle_interrupt; end + + # @private + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/runner.rb#146 + def installed_at_exit?; end + + # Runs the suite of specs and exits the process with an appropriate exit + # code. + # + # source://rspec-core//lib/rspec/core/runner.rb#43 + def invoke; end + + # @private + # + # source://rspec-core//lib/rspec/core/runner.rb#29 + def perform_at_exit; end + + # Run a suite of RSpec examples. Does not exit. + # + # This is used internally by RSpec to run a suite, but is available + # for use by any other automation tool. + # + # If you want to run this multiple times in the same process, and you + # want files like `spec_helper.rb` to be reloaded, be sure to load `load` + # instead of `require`. + # + # @param args [Array] command-line-supported arguments + # @param err [IO] error stream + # @param out [IO] output stream + # @return [Fixnum] exit status code. 0 if all specs passed, + # or the configured failure exit code (1 by default) if specs + # failed. + # + # source://rspec-core//lib/rspec/core/runner.rb#64 + def run(args, err = T.unsafe(nil), out = T.unsafe(nil)); end + + # @private + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/runner.rb#151 + def running_in_drb?; end + + # @private + # + # source://rspec-core//lib/rspec/core/runner.rb#175 + def trap_interrupt; end + end +end + +# We use this to replace `::Set` so we can have the advantage of +# constant time key lookups for unique arrays but without the +# potential to pollute a developers environment with an extra +# piece of the stdlib. This helps to prevent false positive +# builds. +# +# @private +# +# source://rspec-core//lib/rspec/core/set.rb#11 +class RSpec::Core::Set + include ::Enumerable + + # @return [Set] a new instance of Set + # + # source://rspec-core//lib/rspec/core/set.rb#14 + def initialize(array = T.unsafe(nil)); end + + # source://rspec-core//lib/rspec/core/set.rb#23 + def <<(key); end + + # source://rspec-core//lib/rspec/core/set.rb#48 + def clear; end + + # source://rspec-core//lib/rspec/core/set.rb#28 + def delete(key); end + + # source://rspec-core//lib/rspec/core/set.rb#32 + def each(&block); end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/set.rb#19 + def empty?; end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/set.rb#37 + def include?(key); end + + # source://rspec-core//lib/rspec/core/set.rb#41 + def merge(values); end +end + +# Exposes {ExampleGroup}-level methods to a module, so you can include that +# module in an {ExampleGroup}. +# +# @example +# +# module LoggedInAsAdmin +# extend RSpec::Core::SharedContext +# before(:example) do +# log_in_as :admin +# end +# end +# +# describe "admin section" do +# include LoggedInAsAdmin +# # ... +# end +# +# source://rspec-core//lib/rspec/core/shared_context.rb#19 +module RSpec::Core::SharedContext + # @private + # + # source://rspec-core//lib/rspec/core/shared_context.rb#28 + def __shared_context_recordings; end + + # source://rspec-core//lib/rspec/core/shared_context.rb#42 + def after(*args, &block); end + + # source://rspec-core//lib/rspec/core/shared_context.rb#42 + def append_after(*args, &block); end + + # source://rspec-core//lib/rspec/core/shared_context.rb#42 + def append_before(*args, &block); end + + # source://rspec-core//lib/rspec/core/shared_context.rb#42 + def around(*args, &block); end + + # source://rspec-core//lib/rspec/core/shared_context.rb#42 + def before(*args, &block); end + + # source://rspec-core//lib/rspec/core/shared_context.rb#42 + def context(*args, &block); end + + # source://rspec-core//lib/rspec/core/shared_context.rb#42 + def describe(*args, &block); end + + # source://rspec-core//lib/rspec/core/shared_context.rb#42 + def hooks(*args, &block); end + + # @private + # + # source://rspec-core//lib/rspec/core/shared_context.rb#21 + def included(group); end + + # source://rspec-core//lib/rspec/core/shared_context.rb#42 + def let(*args, &block); end + + # source://rspec-core//lib/rspec/core/shared_context.rb#42 + def let!(*args, &block); end + + # source://rspec-core//lib/rspec/core/shared_context.rb#42 + def prepend_after(*args, &block); end + + # source://rspec-core//lib/rspec/core/shared_context.rb#42 + def prepend_before(*args, &block); end + + # source://rspec-core//lib/rspec/core/shared_context.rb#42 + def subject(*args, &block); end + + # source://rspec-core//lib/rspec/core/shared_context.rb#42 + def subject!(*args, &block); end + + class << self + # @private + # + # source://rspec-core//lib/rspec/core/shared_context.rb#40 + def record(methods); end + end +end + +# @private +# +# source://rspec-core//lib/rspec/core/shared_context.rb#33 +class RSpec::Core::SharedContext::Recording < ::Struct + # Returns the value of attribute args + # + # @return [Object] the current value of args + def args; end + + # Sets the attribute args + # + # @param value [Object] the value to set the attribute args to. + # @return [Object] the newly set value + def args=(_); end + + # Returns the value of attribute block + # + # @return [Object] the current value of block + def block; end + + # Sets the attribute block + # + # @param value [Object] the value to set the attribute block to. + # @return [Object] the newly set value + def block=(_); end + + # Returns the value of attribute method_name + # + # @return [Object] the current value of method_name + def method_name; end + + # Sets the attribute method_name + # + # @param value [Object] the value to set the attribute method_name to. + # @return [Object] the newly set value + def method_name=(_); end + + # source://rspec-core//lib/rspec/core/shared_context.rb#34 + def playback_onto(group); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# Shared example groups let you define common context and/or common +# examples that you wish to use in multiple example groups. +# +# When defined, the shared group block is stored for later evaluation. +# It can later be included in an example group either explicitly +# (using `include_examples`, `include_context` or `it_behaves_like`) +# or implicitly (via matching metadata). +# +# Named shared example groups are scoped based on where they are +# defined. Shared groups defined in an example group are available +# for inclusion in that example group or any child example groups, +# but not in any parent or sibling example groups. Shared example +# groups defined at the top level can be included from any example group. +# +# source://rspec-core//lib/rspec/core/shared_example_group.rb#57 +module RSpec::Core::SharedExampleGroup + # Stores the block for later use. The block will be evaluated + # in the context of an example group via `include_examples`, + # `include_context`, or `it_behaves_like`. + # + # @example + # shared_examples "auditable" do + # it "stores an audit record on save!" do + # expect { auditable.save! }.to change(Audit, :count).by(1) + # end + # end + # + # RSpec.describe Account do + # it_behaves_like "auditable" do + # let(:auditable) { Account.new } + # end + # end + # @overload shared_examples + # @overload shared_examples + # @see ExampleGroup.it_behaves_like + # @see ExampleGroup.include_examples + # @see ExampleGroup.include_context + # + # source://rspec-core//lib/rspec/core/shared_example_group.rb#90 + def shared_context(name, *args, &block); end + + # Stores the block for later use. The block will be evaluated + # in the context of an example group via `include_examples`, + # `include_context`, or `it_behaves_like`. + # + # @example + # shared_examples "auditable" do + # it "stores an audit record on save!" do + # expect { auditable.save! }.to change(Audit, :count).by(1) + # end + # end + # + # RSpec.describe Account do + # it_behaves_like "auditable" do + # let(:auditable) { Account.new } + # end + # end + # @overload shared_examples + # @overload shared_examples + # @see ExampleGroup.it_behaves_like + # @see ExampleGroup.include_examples + # @see ExampleGroup.include_context + # + # source://rspec-core//lib/rspec/core/shared_example_group.rb#90 + def shared_examples(name, *args, &block); end + + # Stores the block for later use. The block will be evaluated + # in the context of an example group via `include_examples`, + # `include_context`, or `it_behaves_like`. + # + # @example + # shared_examples "auditable" do + # it "stores an audit record on save!" do + # expect { auditable.save! }.to change(Audit, :count).by(1) + # end + # end + # + # RSpec.describe Account do + # it_behaves_like "auditable" do + # let(:auditable) { Account.new } + # end + # end + # @overload shared_examples + # @overload shared_examples + # @see ExampleGroup.it_behaves_like + # @see ExampleGroup.include_examples + # @see ExampleGroup.include_context + # + # source://rspec-core//lib/rspec/core/shared_example_group.rb#90 + def shared_examples_for(name, *args, &block); end +end + +# @private +# +# source://rspec-core//lib/rspec/core/shared_example_group.rb#149 +class RSpec::Core::SharedExampleGroup::Registry + # source://rspec-core//lib/rspec/core/shared_example_group.rb#150 + def add(context, name, *metadata_args, &block); end + + # source://rspec-core//lib/rspec/core/shared_example_group.rb#174 + def find(lookup_contexts, name); end + + private + + # :nocov: + # + # source://rspec-core//lib/rspec/core/shared_example_group.rb#257 + def ensure_block_has_source_location(_block); end + + # :nocov: + # + # source://rspec-core//lib/rspec/core/shared_example_group.rb#245 + def formatted_location(block); end + + # TODO: remove this in RSpec 4. This exists only to support + # `config.shared_context_metadata_behavior == :trigger_inclusion`, + # the legacy behavior of shared context metadata, which we do + # not want to support in RSpec 4. + # + # source://rspec-core//lib/rspec/core/shared_example_group.rb#189 + def legacy_add(context, name, *metadata_args, &block); end + + # source://rspec-core//lib/rspec/core/shared_example_group.rb#204 + def shared_example_groups; end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/shared_example_group.rb#208 + def valid_name?(candidate); end + + # source://rspec-core//lib/rspec/core/shared_example_group.rb#215 + def warn_if_key_taken(context, key, new_block); end +end + +# Shared examples top level DSL. +# +# @api private +# +# source://rspec-core//lib/rspec/core/shared_example_group.rb#106 +module RSpec::Core::SharedExampleGroup::TopLevelDSL + class << self + # @api private + # @private + # + # source://rspec-core//lib/rspec/core/shared_example_group.rb#108 + def definitions; end + + # Adds the top level DSL methods to Module and the top level binding. + # + # @api private + # + # source://rspec-core//lib/rspec/core/shared_example_group.rb#126 + def expose_globally!; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/shared_example_group.rb#119 + def exposed_globally?; end + + # Removes the top level DSL methods to Module and the top level binding. + # + # @api private + # + # source://rspec-core//lib/rspec/core/shared_example_group.rb#135 + def remove_globally!; end + end +end + +# Contains information about the inclusion site of a shared example group. +# +# source://rspec-core//lib/rspec/core/example_group.rb#782 +class RSpec::Core::SharedExampleGroupInclusionStackFrame + # @private + # @return [SharedExampleGroupInclusionStackFrame] a new instance of SharedExampleGroupInclusionStackFrame + # + # source://rspec-core//lib/rspec/core/example_group.rb#789 + def initialize(shared_group_name, inclusion_location); end + + # @return [String] Description of this stack frame, in the form used by + # RSpec's built-in formatters. + # + # source://rspec-core//lib/rspec/core/example_group.rb#805 + def description; end + + # @return [String] The {#inclusion_location}, formatted for display by a formatter. + # + # source://rspec-core//lib/rspec/core/example_group.rb#795 + def formatted_inclusion_location; end + + # @return [String] the location where the shared example was included + # + # source://rspec-core//lib/rspec/core/example_group.rb#786 + def inclusion_location; end + + # @return [String] the name of the shared example group + # + # source://rspec-core//lib/rspec/core/example_group.rb#784 + def shared_group_name; end + + class << self + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#811 + def current_backtrace; end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#829 + def shared_example_group_inclusions; end + + # @private + # + # source://rspec-core//lib/rspec/core/example_group.rb#816 + def with_frame(name, location); end + end +end + +# Represents some functionality that is shared with multiple example groups. +# The functionality is defined by the provided block, which is lazily +# eval'd when the `SharedExampleGroupModule` instance is included in an example +# group. +# +# source://rspec-core//lib/rspec/core/shared_example_group.rb#10 +class RSpec::Core::SharedExampleGroupModule < ::Module + # @return [SharedExampleGroupModule] a new instance of SharedExampleGroupModule + # + # source://rspec-core//lib/rspec/core/shared_example_group.rb#13 + def initialize(description, definition, metadata); end + + # @private + # + # source://rspec-core//lib/rspec/core/shared_example_group.rb#11 + def definition; end + + # @private + # + # source://rspec-core//lib/rspec/core/shared_example_group.rb#34 + def include_in(klass, inclusion_line, args, customization_block); end + + # Ruby callback for when a module is included in another module is class. + # Our definition evaluates the shared group block in the context of the + # including example group. + # + # source://rspec-core//lib/rspec/core/shared_example_group.rb#28 + def included(klass); end + + # Provides a human-readable representation of this module. + # + # source://rspec-core//lib/rspec/core/shared_example_group.rb#20 + def inspect; end + + # Provides a human-readable representation of this module. + # + # source://rspec-core//lib/rspec/core/shared_example_group.rb#20 + def to_s; end +end + +# Deals with the fact that `shellwords` only works on POSIX systems. +# +# @private +# +# source://rspec-core//lib/rspec/core/shell_escape.rb#5 +module RSpec::Core::ShellEscape + private + + # source://rspec-core//lib/rspec/core/shell_escape.rb#32 + def conditionally_quote(id); end + + # :nocov: + # + # source://rspec-core//lib/rspec/core/shell_escape.rb#19 + def escape(shell_command); end + + # source://rspec-core//lib/rspec/core/shell_escape.rb#8 + def quote(argument); end + + # source://rspec-core//lib/rspec/core/shell_escape.rb#37 + def shell_allows_unquoted_ids?; end + + class << self + # source://rspec-core//lib/rspec/core/shell_escape.rb#32 + def conditionally_quote(id); end + + # source://rspec-core//lib/rspec/core/shell_escape.rb#19 + def escape(shell_command); end + + # source://rspec-core//lib/rspec/core/shell_escape.rb#8 + def quote(argument); end + + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/shell_escape.rb#37 + def shell_allows_unquoted_ids?; end + end +end + +# Known shells that require quoting: zsh, csh, tcsh. +# +# Feel free to add other shells to this list that are known to +# allow `rspec ./some_spec.rb[1:1]` syntax without quoting the id. +# +# @private +# +# source://rspec-core//lib/rspec/core/shell_escape.rb#30 +RSpec::Core::ShellEscape::SHELLS_ALLOWING_UNQUOTED_IDS = T.let(T.unsafe(nil), Array) + +# Provides an execution context for before/after :suite hooks. +# +# @private +# +# source://rspec-core//lib/rspec/core/example.rb#651 +class RSpec::Core::SuiteHookContext < ::RSpec::Core::Example + # @return [SuiteHookContext] a new instance of SuiteHookContext + # + # source://rspec-core//lib/rspec/core/example.rb#652 + def initialize(hook_description, reporter); end + + # source://rspec-core//lib/rspec/core/example.rb#659 + def set_exception(exception); end +end + +# This avoids issues with reporting time caused by examples that +# change the value/meaning of Time.now without properly restoring +# it. +# +# @private +# +# source://rspec-core//lib/rspec/core.rb#174 +class RSpec::Core::Time + class << self + def now(in: T.unsafe(nil)); end + end +end + +# Version information for RSpec Core. +# +# source://rspec-core//lib/rspec/core/version.rb#4 +module RSpec::Core::Version; end + +# Current version of RSpec Core, in semantic versioning format. +# +# source://rspec-core//lib/rspec/core/version.rb#6 +RSpec::Core::Version::STRING = T.let(T.unsafe(nil), String) + +# @private +# +# source://rspec-core//lib/rspec/core/warnings.rb#6 +module RSpec::Core::Warnings + # Used internally to print deprecation warnings. + # + # @private + # + # source://rspec-core//lib/rspec/core/warnings.rb#10 + def deprecate(deprecated, data = T.unsafe(nil)); end + + # Used internally to print deprecation warnings. + # + # @private + # + # source://rspec-core//lib/rspec/core/warnings.rb#22 + def warn_deprecation(message, opts = T.unsafe(nil)); end + + # @private + # + # source://rspec-core//lib/rspec/core/warnings.rb#27 + def warn_with(message, options = T.unsafe(nil)); end +end + +# Internal container for global non-configuration data. +# +# @api private +# +# source://rspec-core//lib/rspec/core/world.rb#6 +class RSpec::Core::World + # @api private + # @return [World] a new instance of World + # + # source://rspec-core//lib/rspec/core/world.rb#26 + def initialize(configuration = T.unsafe(nil)); end + + # @api private + # @private + # + # source://rspec-core//lib/rspec/core/world.rb#115 + def all_example_groups; end + + # @api private + # @private + # + # source://rspec-core//lib/rspec/core/world.rb#120 + def all_examples; end + + # Add exclusion filters to announcement message. + # + # @api private + # + # source://rspec-core//lib/rspec/core/world.rb#226 + def announce_exclusion_filter(announcements); end + + # Notify reporter of filters. + # + # @api private + # + # source://rspec-core//lib/rspec/core/world.rb#171 + def announce_filters; end + + # Add inclusion filters to announcement message. + # + # @api private + # + # source://rspec-core//lib/rspec/core/world.rb#217 + def announce_inclusion_filter(announcements); end + + # @api private + # @private + # + # source://rspec-core//lib/rspec/core/world.rb#210 + def everything_filtered_message; end + + # Get count of examples to be run. + # + # @api private + # + # source://rspec-core//lib/rspec/core/world.rb#109 + def example_count(groups = T.unsafe(nil)); end + + # @api private + # @private + # + # source://rspec-core//lib/rspec/core/world.rb#8 + def example_group_counts_by_spec_file; end + + # @api private + # @private + # + # source://rspec-core//lib/rspec/core/world.rb#8 + def example_groups; end + + # @api private + # @private + # + # source://rspec-core//lib/rspec/core/world.rb#102 + def exclusion_filter; end + + # @api private + # @private + # + # source://rspec-core//lib/rspec/core/world.rb#69 + def filter_manager; end + + # @api private + # @private + # + # source://rspec-core//lib/rspec/core/world.rb#8 + def filtered_examples; end + + # @api private + # @private + # + # source://rspec-core//lib/rspec/core/world.rb#97 + def inclusion_filter; end + + # Used internally to signal that a failure outside of an example + # has occurred, and that therefore the exit status should indicate + # the run failed. + # + # @api private + # @private + # + # source://rspec-core//lib/rspec/core/world.rb#24 + def non_example_failure; end + + # Used internally to signal that a failure outside of an example + # has occurred, and that therefore the exit status should indicate + # the run failed. + # + # @api private + # @private + # + # source://rspec-core//lib/rspec/core/world.rb#24 + def non_example_failure=(_arg0); end + + # @api private + # @private + # + # source://rspec-core//lib/rspec/core/world.rb#87 + def num_example_groups_defined_in(file); end + + # Apply ordering strategy from configuration to example groups. + # + # @api private + # + # source://rspec-core//lib/rspec/core/world.rb#52 + def ordered_example_groups; end + + # Find line number of previous declaration. + # + # @api private + # + # source://rspec-core//lib/rspec/core/world.rb#140 + def preceding_declaration_line(absolute_file_name, filter_line); end + + # Prepares filters so that they apply to example groups when they run. + # + # This is a separate method so that filters can be modified/replaced and + # examples refiltered during a process's lifetime, which can be useful for + # a custom runner. + # + # @api public + # + # source://rspec-core//lib/rspec/core/world.rb#43 + def prepare_example_filtering; end + + # Records an example group. + # + # @api private + # + # source://rspec-core//lib/rspec/core/world.rb#81 + def record(example_group); end + + # @api private + # @private + # + # source://rspec-core//lib/rspec/core/world.rb#74 + def registered_example_group_files; end + + # @api private + # @private + # + # source://rspec-core//lib/rspec/core/world.rb#205 + def report_filter_message(message); end + + # @api private + # @private + # + # source://rspec-core//lib/rspec/core/world.rb#149 + def reporter; end + + # Reset world to 'scratch' before running suite. + # + # @api private + # + # source://rspec-core//lib/rspec/core/world.rb#60 + def reset; end + + # Used internally to signify that a SystemExit occurred in + # `Configuration#load_file_handling_errors`, and thus examples cannot + # be counted accurately. Specifically, we cannot accurately report + # "No examples found". + # + # @api private + # @private + # + # source://rspec-core//lib/rspec/core/world.rb#18 + def rspec_is_quitting; end + + # Used internally to signify that a SystemExit occurred in + # `Configuration#load_file_handling_errors`, and thus examples cannot + # be counted accurately. Specifically, we cannot accurately report + # "No examples found". + # + # @api private + # @private + # + # source://rspec-core//lib/rspec/core/world.rb#18 + def rspec_is_quitting=(_arg0); end + + # @api private + # @private + # + # source://rspec-core//lib/rspec/core/world.rb#92 + def shared_example_group_registry; end + + # @api private + # @private + # + # source://rspec-core//lib/rspec/core/world.rb#154 + def source_from_file(path); end + + # @api private + # @private + # + # source://rspec-core//lib/rspec/core/world.rb#164 + def syntax_highlighter; end + + # Traverses the tree of each top level group. + # For each it yields the group, then the children, recursively. + # Halts the traversal of a branch of the tree as soon as the passed block returns true. + # Note that siblings groups and their sub-trees will continue to be explored. + # This is intended to make it easy to find the top-most group that satisfies some + # condition. + # + # @api private + # @private + # + # source://rspec-core//lib/rspec/core/world.rb#131 + def traverse_example_group_trees_until(&block); end + + # Used internally to determine what to do when a SIGINT is received. + # + # @api private + # + # source://rspec-core//lib/rspec/core/world.rb#11 + def wants_to_quit; end + + # Used internally to determine what to do when a SIGINT is received. + # + # @api private + # + # source://rspec-core//lib/rspec/core/world.rb#11 + def wants_to_quit=(_arg0); end + + private + + # @api private + # + # source://rspec-core//lib/rspec/core/world.rb#234 + def descending_declaration_line_numbers_by_file; end + + # @api private + # + # source://rspec-core//lib/rspec/core/world.rb#252 + def fail_if_config_and_cli_options_invalid; end +end + +# Provides a null implementation for initial use by configuration. +# +# @api private +# @private +# +# source://rspec-core//lib/rspec/core/world.rb#264 +module RSpec::Core::World::Null + class << self + # @api private + # + # source://rspec-core//lib/rspec/core/world.rb#280 + def all_example_groups; end + + # :nocov: + # + # @api private + # + # source://rspec-core//lib/rspec/core/world.rb#276 + def example_groups; end + + # @api private + # + # source://rspec-core//lib/rspec/core/world.rb#265 + def non_example_failure; end + + # @api private + # + # source://rspec-core//lib/rspec/core/world.rb#266 + def non_example_failure=(_); end + + # @api private + # + # source://rspec-core//lib/rspec/core/world.rb#268 + def registered_example_group_files; end + + # @api private + # + # source://rspec-core//lib/rspec/core/world.rb#272 + def traverse_example_group_trees_until; end + end +end + +# Namespace for the example group subclasses generated by top-level +# `describe`. +# +# @private +# +# source://rspec-core//lib/rspec/core/example_group.rb#839 +module RSpec::ExampleGroups + extend ::RSpec::Support::RecursiveConstMethods + + class << self + # source://rspec-core//lib/rspec/core/example_group.rb#842 + def assign_const(group); end + + # source://rspec-core//lib/rspec/core/example_group.rb#862 + def base_name_for(group); end + + # source://rspec-core//lib/rspec/core/example_group.rb#850 + def constant_scope_for(group); end + + # source://rspec-core//lib/rspec/core/example_group.rb#895 + def disambiguate(name, const_scope); end + + # source://rspec-core//lib/rspec/core/example_group.rb#856 + def remove_all_constants; end + end +end + +# @private +# +# source://rspec-core//lib/rspec/core.rb#187 +RSpec::MODULES_TO_AUTOLOAD = T.let(T.unsafe(nil), Hash) + +# @private +# +# source://rspec-core//lib/rspec/core/shared_context.rb#54 +RSpec::SharedContext = RSpec::Core::SharedContext diff --git a/sorbet/rbi/gems/rspec-expectations@3.12.3.rbi b/sorbet/rbi/gems/rspec-expectations@3.12.3.rbi new file mode 100644 index 00000000000..85dc1881b81 --- /dev/null +++ b/sorbet/rbi/gems/rspec-expectations@3.12.3.rbi @@ -0,0 +1,8100 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rspec-expectations` gem. +# Please instead update this file by running `bin/tapioca gem rspec-expectations`. + +# RSpec's top level namespace. All of rspec-expectations is contained +# in the `RSpec::Expectations` and `RSpec::Matchers` namespaces. +# +# source://rspec-expectations//lib/rspec/matchers/english_phrasing.rb#1 +module RSpec + class << self + # source://rspec-core/3.12.2/lib/rspec/core.rb#70 + def clear_examples; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#85 + def configuration; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#49 + def configuration=(_arg0); end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#97 + def configure; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#194 + def const_missing(name); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def context(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#122 + def current_example; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#128 + def current_example=(example); end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#154 + def current_scope; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#134 + def current_scope=(scope); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def describe(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def example_group(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def fcontext(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def fdescribe(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#58 + def reset; end + + # source://rspec-core/3.12.2/lib/rspec/core/shared_example_group.rb#110 + def shared_context(name, *args, &block); end + + # source://rspec-core/3.12.2/lib/rspec/core/shared_example_group.rb#110 + def shared_examples(name, *args, &block); end + + # source://rspec-core/3.12.2/lib/rspec/core/shared_example_group.rb#110 + def shared_examples_for(name, *args, &block); end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#160 + def world; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#49 + def world=(_arg0); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def xcontext(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def xdescribe(*args, &example_group_block); end + end +end + +# RSpec::Expectations provides a simple, readable API to express +# the expected outcomes in a code example. To express an expected +# outcome, wrap an object or block in `expect`, call `to` or `to_not` +# (aliased as `not_to`) and pass it a matcher object: +# +# expect(order.total).to eq(Money.new(5.55, :USD)) +# expect(list).to include(user) +# expect(message).not_to match(/foo/) +# expect { do_something }.to raise_error +# +# The last form (the block form) is needed to match against ruby constructs +# that are not objects, but can only be observed when executing a block +# of code. This includes raising errors, throwing symbols, yielding, +# and changing values. +# +# When `expect(...).to` is invoked with a matcher, it turns around +# and calls `matcher.matches?()`. For example, +# in the expression: +# +# expect(order.total).to eq(Money.new(5.55, :USD)) +# +# ...`eq(Money.new(5.55, :USD))` returns a matcher object, and it results +# in the equivalent of `eq.matches?(order.total)`. If `matches?` returns +# `true`, the expectation is met and execution continues. If `false`, then +# the spec fails with the message returned by `eq.failure_message`. +# +# Given the expression: +# +# expect(order.entries).not_to include(entry) +# +# ...the `not_to` method (also available as `to_not`) invokes the equivalent of +# `include.matches?(order.entries)`, but it interprets `false` as success, and +# `true` as a failure, using the message generated by +# `include.failure_message_when_negated`. +# +# rspec-expectations ships with a standard set of useful matchers, and writing +# your own matchers is quite simple. +# +# See [RSpec::Matchers](../RSpec/Matchers) for more information about the +# built-in matchers that ship with rspec-expectations, and how to write your +# own custom matchers. +# +# source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#2 +module RSpec::Expectations + class << self + # The configuration object. + # + # @return [RSpec::Expectations::Configuration] the configuration object + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#223 + def configuration; end + + # @private + # + # source://rspec-expectations//lib/rspec/expectations/fail_with.rb#13 + def differ; end + + # Raises an RSpec::Expectations::ExpectationNotMetError with message. + # Adds a diff to the failure message when `expected` and `actual` are + # both present. + # + # @param message [String] + # @param expected [Object] + # @param actual [Object] + # + # source://rspec-expectations//lib/rspec/expectations/fail_with.rb#27 + def fail_with(message, expected = T.unsafe(nil), actual = T.unsafe(nil)); end + end +end + +# Validates the provided matcher to ensure it supports block +# expectations, in order to avoid user confusion when they +# use a block thinking the expectation will be on the return +# value of the block rather than the block itself. +# +# @private +# +# source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#136 +class RSpec::Expectations::BlockExpectationTarget < ::RSpec::Expectations::ExpectationTarget + # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#142 + def not_to(matcher, message = T.unsafe(nil), &block); end + + # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#137 + def to(matcher, message = T.unsafe(nil), &block); end + + # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#142 + def to_not(matcher, message = T.unsafe(nil), &block); end + + private + + # @raise [ExpectationNotMetError] + # + # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#150 + def enforce_block_expectation(matcher); end + + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#158 + def supports_block_expectations?(matcher); end +end + +# @private +# +# source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#4 +class RSpec::Expectations::BlockSnippetExtractor + # @return [BlockSnippetExtractor] a new instance of BlockSnippetExtractor + # + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#17 + def initialize(proc, method_name); end + + # Ideally we should properly handle indentations of multiline snippet, + # but it's not implemented yet since because we use result of this method only when it's a + # single line and implementing the logic introduces additional complexity. + # + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#25 + def body_content_lines; end + + # rubocop should properly handle `Struct.new {}` as an inner class definition. + # + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#7 + def method_name; end + + # rubocop should properly handle `Struct.new {}` as an inner class definition. + # + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#7 + def proc; end + + private + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#60 + def beginning_line_number; end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#39 + def block_token_extractor; end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#56 + def file_path; end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#31 + def raw_body_lines; end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#35 + def raw_body_snippet; end + + # @raise [TargetNotFoundError] + # + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#44 + def source; end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#64 + def source_location; end + + class << self + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#9 + def try_extracting_single_line_body_of(proc, method_name); end + end +end + +# source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#70 +class RSpec::Expectations::BlockSnippetExtractor::AmbiguousTargetError < ::RSpec::Expectations::BlockSnippetExtractor::Error; end + +# Locates target block with node information (semantics), which tokens don't have. +# +# @private +# +# source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#198 +class RSpec::Expectations::BlockSnippetExtractor::BlockLocator < ::Struct + # Returns the value of attribute beginning_line_number + # + # @return [Object] the current value of beginning_line_number + def beginning_line_number; end + + # Sets the attribute beginning_line_number + # + # @param value [Object] the value to set the attribute beginning_line_number to. + # @return [Object] the newly set value + def beginning_line_number=(_); end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#203 + def body_content_locations; end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#199 + def method_call_location; end + + # Returns the value of attribute method_name + # + # @return [Object] the current value of method_name + def method_name; end + + # Sets the attribute method_name + # + # @param value [Object] the value to set the attribute method_name to. + # @return [Object] the newly set value + def method_name=(_); end + + # Returns the value of attribute source + # + # @return [Object] the current value of source + def source; end + + # Sets the attribute source + # + # @param value [Object] the value to set the attribute source to. + # @return [Object] the newly set value + def source=(_); end + + private + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#216 + def block_body_node; end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#221 + def block_wrapper_node; end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#232 + def candidate_block_wrapper_nodes; end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#241 + def candidate_method_ident_nodes; end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#209 + def method_ident_node; end + + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#247 + def method_ident_node?(node); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# Performs extraction of block body snippet using tokens, +# which cannot be done with node information. +# +# @private +# +# source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#75 +class RSpec::Expectations::BlockSnippetExtractor::BlockTokenExtractor < ::Struct + # @return [BlockTokenExtractor] a new instance of BlockTokenExtractor + # + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#78 + def initialize(*_arg0); end + + # Returns the value of attribute beginning_line_number + # + # @return [Object] the current value of beginning_line_number + def beginning_line_number; end + + # Sets the attribute beginning_line_number + # + # @param value [Object] the value to set the attribute beginning_line_number to. + # @return [Object] the newly set value + def beginning_line_number=(_); end + + # Returns the value of attribute body_tokens. + # + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#76 + def body_tokens; end + + # Returns the value of attribute method_name + # + # @return [Object] the current value of method_name + def method_name; end + + # Sets the attribute method_name + # + # @param value [Object] the value to set the attribute method_name to. + # @return [Object] the newly set value + def method_name=(_); end + + # Returns the value of attribute source + # + # @return [Object] the current value of source + def source; end + + # Sets the attribute source + # + # @param value [Object] the value to set the attribute source to. + # @return [Object] the newly set value + def source=(_); end + + # Returns the value of attribute state. + # + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#76 + def state; end + + private + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#124 + def after_beginning_of_args_state(token); end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#128 + def after_beginning_of_body_state(token); end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#107 + def after_method_call_state(token); end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#111 + def after_opener_state(token); end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#191 + def block_locator; end + + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#185 + def correct_block?(body_tokens); end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#141 + def finalize_pending_tokens!; end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#95 + def finish!; end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#147 + def finish_or_find_next_block_if_incorrect!; end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#168 + def handle_closer_token(token); end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#158 + def handle_opener_token(token); end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#103 + def initial_state(token); end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#99 + def invoke_state_handler(token); end + + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#164 + def opener_token?(token); end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#177 + def opener_token_stack; end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#85 + def parse!; end + + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#137 + def pending_tokens; end + + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#181 + def pipe_token?(token); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#68 +class RSpec::Expectations::BlockSnippetExtractor::Error < ::StandardError; end + +# source://rspec-expectations//lib/rspec/expectations/block_snippet_extractor.rb#69 +class RSpec::Expectations::BlockSnippetExtractor::TargetNotFoundError < ::RSpec::Expectations::BlockSnippetExtractor::Error; end + +# Provides configuration options for rspec-expectations. +# If you are using rspec-core, you can access this via a +# block passed to `RSpec::Core::Configuration#expect_with`. +# Otherwise, you can access it via RSpec::Expectations.configuration. +# +# @example +# RSpec.configure do |rspec| +# rspec.expect_with :rspec do |c| +# # c is the config object +# end +# end +# +# # or +# +# RSpec::Expectations.configuration +# +# source://rspec-expectations//lib/rspec/expectations/configuration.rb#20 +class RSpec::Expectations::Configuration + # @return [Configuration] a new instance of Configuration + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#29 + def initialize; end + + # Adds `should` and `should_not` to the given classes + # or modules. This can be used to ensure `should` works + # properly on things like proxy objects (particular + # `Delegator`-subclassed objects on 1.8). + # + # @param modules [Array] the list of classes or modules + # to add `should` and `should_not` to. + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#112 + def add_should_and_should_not_to(*modules); end + + # Sets or gets the backtrace formatter. The backtrace formatter should + # implement `#format_backtrace(Array)`. This is used + # to format backtraces of errors handled by the `raise_error` + # matcher. + # + # If you are using rspec-core, rspec-core's backtrace formatting + # will be used (including respecting the presence or absence of + # the `--backtrace` option). + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#129 + def backtrace_formatter; end + + # Sets or gets the backtrace formatter. The backtrace formatter should + # implement `#format_backtrace(Array)`. This is used + # to format backtraces of errors handled by the `raise_error` + # matcher. + # + # If you are using rspec-core, rspec-core's backtrace formatting + # will be used (including respecting the presence or absence of + # the `--backtrace` option). + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#128 + def backtrace_formatter=(_arg0); end + + # Indicates whether or not diffs should be colored. + # Delegates to rspec-core's color option if rspec-core + # is loaded; otherwise you can set it here. + # + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#88 + def color?; end + + # @private + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#216 + def false_positives_handler; end + + # Sets if custom matcher descriptions and failure messages + # should include clauses from methods defined using `chain`. + # + # @param value [Boolean] + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#140 + def include_chain_clauses_in_custom_matcher_descriptions=(_arg0); end + + # Indicates whether or not custom matcher descriptions and failure messages + # should include clauses from methods defined using `chain`. It is + # false by default for backwards compatibility. + # + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#145 + def include_chain_clauses_in_custom_matcher_descriptions?; end + + # Configures the maximum character length that RSpec will print while + # formatting an object. You can set length to nil to prevent RSpec from + # doing truncation. + # + # @example + # RSpec.configure do |rspec| + # rspec.expect_with :rspec do |c| + # c.max_formatted_output_length = 200 + # end + # end + # @param length [Fixnum] the number of characters to limit the formatted output to. + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#70 + def max_formatted_output_length=(length); end + + # Indicates what RSpec will do about matcher use which will + # potentially cause false positives in tests, generally you want to + # avoid such scenarios so this defaults to `true`. + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#206 + def on_potential_false_positives; end + + # Configures what RSpec will do about matcher use which will + # potentially cause false positives in tests. + # + # @param behavior [Symbol] can be set to :warn, :raise or :nothing + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#182 + def on_potential_false_positives=(behavior); end + + # @private + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#150 + def reset_syntaxes_to_default; end + + # Returns the value of attribute strict_predicate_matchers. + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#197 + def strict_predicate_matchers; end + + # Configures RSpec to check predicate matchers to `be(true)` / `be(false)` (strict), + # or `be_truthy` / `be_falsey` (not strict). + # Historically, the default was `false`, but `true` is recommended. + # + # @raise [ArgumentError] + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#192 + def strict_predicate_matchers=(flag); end + + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#199 + def strict_predicate_matchers?; end + + # The list of configured syntaxes. + # + # @example + # unless RSpec::Matchers.configuration.syntax.include?(:expect) + # raise "this RSpec extension gem requires the rspec-expectations `:expect` syntax" + # end + # @return [Array] the list of configured syntaxes. + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#80 + def syntax; end + + # Configures the supported syntax. + # + # @example + # RSpec.configure do |rspec| + # rspec.expect_with :rspec do |c| + # c.syntax = :should + # # or + # c.syntax = :expect + # # or + # c.syntax = [:should, :expect] + # end + # end + # @param values [Array, Symbol] the syntaxes to enable + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#46 + def syntax=(values); end + + # Configures whether RSpec will warn about matcher use which will + # potentially cause false positives in tests. + # + # @param boolean [Boolean] + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#168 + def warn_about_potential_false_positives=(boolean); end + + # Indicates whether RSpec will warn about matcher use which will + # potentially cause false positives in tests, generally you want to + # avoid such scenarios so this defaults to `true`. + # + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#211 + def warn_about_potential_false_positives?; end +end + +# @private +# +# source://rspec-expectations//lib/rspec/expectations/configuration.rb#22 +RSpec::Expectations::Configuration::FALSE_POSITIVE_BEHAVIOURS = T.let(T.unsafe(nil), Hash) + +# Null implementation of a backtrace formatter used by default +# when rspec-core is not loaded. Does no filtering. +# +# @api private +# +# source://rspec-expectations//lib/rspec/expectations/configuration.rb#158 +module RSpec::Expectations::Configuration::NullBacktraceFormatter + class << self + # source://rspec-expectations//lib/rspec/expectations/configuration.rb#159 + def format_backtrace(backtrace); end + end +end + +# @private +# +# source://rspec-expectations//lib/rspec/expectations/handler.rb#4 +module RSpec::Expectations::ExpectationHelper + class << self + # source://rspec-expectations//lib/rspec/expectations/handler.rb#5 + def check_message(msg); end + + # source://rspec-expectations//lib/rspec/expectations/handler.rb#33 + def handle_failure(matcher, message, failure_message_method); end + + # Returns an RSpec-3+ compatible matcher, wrapping a legacy one + # in an adapter if necessary. + # + # @private + # + # source://rspec-expectations//lib/rspec/expectations/handler.rb#19 + def modern_matcher_from(matcher); end + + # source://rspec-expectations//lib/rspec/expectations/handler.rb#24 + def with_matcher(handler, matcher, message); end + end +end + +# Exception raised when an expectation fails. +# +# the user sets an expectation, it can't be caught in their +# code by a bare `rescue`. +# +# @api public +# @note We subclass Exception so that in a stub implementation if +# +# source://rspec-expectations//lib/rspec/expectations.rb#67 +class RSpec::Expectations::ExpectationNotMetError < ::Exception; end + +# Wraps the target of an expectation. +# +# @example +# expect(something) # => ExpectationTarget wrapping something +# expect { do_something } # => ExpectationTarget wrapping the block +# +# # used with `to` +# expect(actual).to eq(3) +# +# # with `not_to` +# expect(actual).not_to eq(3) +# @note `ExpectationTarget` is not intended to be instantiated +# directly by users. Use `expect` instead. +# +# source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#17 +class RSpec::Expectations::ExpectationTarget + include ::RSpec::Expectations::ExpectationTarget::InstanceMethods + + # @api private + # @return [ExpectationTarget] a new instance of ExpectationTarget + # + # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#31 + def initialize(value); end + + # @note this name aligns with `Minitest::Expectation` so that our + # {InstanceMethods} module can be included in that class when + # used in a Minitest context. + # @return [Object] the target of the expectation + # + # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#28 + def target; end + + class << self + # @private + # + # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#36 + def for(value, block); end + end +end + +# Defines instance {ExpectationTarget} instance methods. These are defined +# in a module so we can include it in `Minitest::Expectation` when +# `rspec/expectations/minitest_integration` is loaded in order to +# support usage with Minitest. +# +# source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#53 +module RSpec::Expectations::ExpectationTarget::InstanceMethods + # Runs the given expectation, passing if `matcher` returns false. + # + # @example + # expect(value).not_to eq(5) + # @param matcher [Matcher] + # @param message [String, Proc] optional message to display when the expectation fails + # @return [Boolean] false if the negative expectation succeeds (else raises) + # @see RSpec::Matchers + # + # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#76 + def not_to(matcher = T.unsafe(nil), message = T.unsafe(nil), &block); end + + # Runs the given expectation, passing if `matcher` returns true. + # + # @example + # expect(value).to eq(5) + # expect { perform }.to raise_error + # @param matcher [Matcher] + # @param message [String, Proc] optional message to display when the expectation fails + # @return [Boolean] true if the expectation succeeds (else raises) + # @see RSpec::Matchers + # + # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#63 + def to(matcher = T.unsafe(nil), message = T.unsafe(nil), &block); end + + # Runs the given expectation, passing if `matcher` returns false. + # + # @example + # expect(value).not_to eq(5) + # @param matcher [Matcher] + # @param message [String, Proc] optional message to display when the expectation fails + # @return [Boolean] false if the negative expectation succeeds (else raises) + # @see RSpec::Matchers + # + # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#76 + def to_not(matcher = T.unsafe(nil), message = T.unsafe(nil), &block); end + + private + + # @raise [ArgumentError] + # + # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#84 + def prevent_operator_matchers(verb); end +end + +# Used as a sentinel value to be able to tell when the user +# did not pass an argument. We can't use `nil` for that because +# `nil` is a valid value to pass. +# +# @private +# +# source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#22 +module RSpec::Expectations::ExpectationTarget::UndefinedValue; end + +# @private +# +# source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#4 +class RSpec::Expectations::FailureAggregator + # @return [FailureAggregator] a new instance of FailureAggregator + # + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#90 + def initialize(block_label, metadata); end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#22 + def aggregate; end + + # Returns the value of attribute block_label. + # + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#5 + def block_label; end + + # This method is defined to satisfy the callable interface + # expected by `RSpec::Support.with_failure_notifier`. + # + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#59 + def call(failure, options); end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#49 + def failures; end + + # Returns the value of attribute metadata. + # + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#5 + def metadata; end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#53 + def other_errors; end + + private + + # Using `caller` performs better (and is simpler) than `raise` on most Rubies. + # + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#85 + def assign_backtrace(failure); end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#96 + def notify_aggregated_failures; end +end + +# source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#20 +RSpec::Expectations::FailureAggregator::AGGREGATED_FAILURE = T.let(T.unsafe(nil), RSpec::Expectations::FailureAggregator::AggregatedFailure) + +# @private +# +# source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#8 +class RSpec::Expectations::FailureAggregator::AggregatedFailure + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#15 + def inspect; end +end + +# @private +# +# source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#10 +RSpec::Expectations::FailureAggregator::AggregatedFailure::MESSAGE = T.let(T.unsafe(nil), String) + +# RSpec 3.0 was released with the class name misspelled. For SemVer compatibility, +# we will provide this misspelled alias until 4.0. +# +# @deprecated Use LegacyMatcherAdapter instead. +# @private +# +# source://rspec-expectations//lib/rspec/expectations/handler.rb#180 +RSpec::Expectations::LegacyMacherAdapter = RSpec::Expectations::LegacyMatcherAdapter + +# Wraps a matcher written against one of the legacy protocols in +# order to present the current protocol. +# +# @private +# +# source://rspec-expectations//lib/rspec/expectations/handler.rb#113 +class RSpec::Expectations::LegacyMatcherAdapter < ::RSpec::Matchers::MatcherDelegator + # @return [LegacyMatcherAdapter] a new instance of LegacyMatcherAdapter + # + # source://rspec-expectations//lib/rspec/expectations/handler.rb#114 + def initialize(matcher); end + + class << self + # source://rspec-expectations//lib/rspec/expectations/handler.rb#124 + def wrap(matcher); end + end +end + +# Before RSpec 1.2, the failure message protocol was: +# * `failure_message` +# * `negative_failure_message` +# +# @private +# +# source://rspec-expectations//lib/rspec/expectations/handler.rb#157 +class RSpec::Expectations::LegacyMatcherAdapter::RSpec1 < ::RSpec::Expectations::LegacyMatcherAdapter + # source://rspec-expectations//lib/rspec/expectations/handler.rb#158 + def failure_message; end + + # source://rspec-expectations//lib/rspec/expectations/handler.rb#162 + def failure_message_when_negated; end + + class << self + # Note: `failure_message` is part of the RSpec 3 protocol + # (paired with `failure_message_when_negated`), so we don't check + # for `failure_message` here. + # + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/expectations/handler.rb#169 + def interface_matches?(matcher); end + end +end + +# Starting in RSpec 1.2 (and continuing through all 2.x releases), +# the failure message protocol was: +# * `failure_message_for_should` +# * `failure_message_for_should_not` +# +# @private +# +# source://rspec-expectations//lib/rspec/expectations/handler.rb#133 +class RSpec::Expectations::LegacyMatcherAdapter::RSpec2 < ::RSpec::Expectations::LegacyMatcherAdapter + # source://rspec-expectations//lib/rspec/expectations/handler.rb#134 + def failure_message; end + + # source://rspec-expectations//lib/rspec/expectations/handler.rb#138 + def failure_message_when_negated; end + + class << self + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/expectations/handler.rb#142 + def interface_matches?(matcher); end + end +end + +# Exception raised from `aggregate_failures` when multiple expectations fail. +# +# @note The constant is defined here but the extensive logic of this class +# is lazily defined when `FailureAggregator` is autoloaded, since we do +# not need to waste time defining that functionality unless +# `aggregate_failures` is used. +# +# source://rspec-expectations//lib/rspec/expectations.rb#76 +class RSpec::Expectations::MultipleExpectationsNotMetError < ::RSpec::Expectations::ExpectationNotMetError + # @return [MultipleExpectationsNotMetError] a new instance of MultipleExpectationsNotMetError + # + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#153 + def initialize(failure_aggregator); end + + # @return [String] The user-assigned label for the aggregation block. + # + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#128 + def aggregation_block_label; end + + # @return [Hash] The metadata hash passed to `aggregate_failures`. + # + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#133 + def aggregation_metadata; end + + # @return [Array] The list of expectation failures and other exceptions, combined. + # + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#125 + def all_exceptions; end + + # return [String] A description of the failure/error counts. + # + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#144 + def exception_count_description; end + + # @return [Array] The list of expectation failures. + # + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#115 + def failures; end + + # @return [String] The fully formatted exception message. + # + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#110 + def message; end + + # @return [Array] The list of other exceptions. + # + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#120 + def other_errors; end + + # @return [String] A summary of the failure, including the block label and a count of failures. + # + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#138 + def summary; end + + private + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#185 + def backtrace_line(line); end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#158 + def block_description; end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#167 + def enumerated(exceptions, index_offset); end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#197 + def enumerated_errors; end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#193 + def enumerated_failures; end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#175 + def exclusion_patterns; end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#181 + def format_backtrace(backtrace); end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#212 + def indentation; end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#203 + def indented(failure_message, index); end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#224 + def index_label(index); end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#216 + def longest_index_label_width; end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#163 + def pluralize(noun, count); end + + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#220 + def width_of_label(index); end +end + +# @private +# +# source://rspec-expectations//lib/rspec/expectations/handler.rb#74 +class RSpec::Expectations::NegativeExpectationHandler + class << self + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/expectations/handler.rb#88 + def does_not_match?(matcher, actual, &block); end + + # source://rspec-expectations//lib/rspec/expectations/handler.rb#75 + def handle_matcher(actual, initial_matcher, custom_message = T.unsafe(nil), &block); end + + # source://rspec-expectations//lib/rspec/expectations/handler.rb#104 + def opposite_should_method; end + + # source://rspec-expectations//lib/rspec/expectations/handler.rb#100 + def should_method; end + + # source://rspec-expectations//lib/rspec/expectations/handler.rb#96 + def verb; end + end +end + +# @private +# +# source://rspec-expectations//lib/rspec/expectations/handler.rb#46 +class RSpec::Expectations::PositiveExpectationHandler + class << self + # source://rspec-expectations//lib/rspec/expectations/handler.rb#47 + def handle_matcher(actual, initial_matcher, custom_message = T.unsafe(nil), &block); end + + # source://rspec-expectations//lib/rspec/expectations/handler.rb#68 + def opposite_should_method; end + + # source://rspec-expectations//lib/rspec/expectations/handler.rb#64 + def should_method; end + + # source://rspec-expectations//lib/rspec/expectations/handler.rb#60 + def verb; end + end +end + +# Provides methods for enabling and disabling the available +# syntaxes provided by rspec-expectations. +# +# @api private +# +# source://rspec-expectations//lib/rspec/expectations/syntax.rb#6 +module RSpec::Expectations::Syntax + private + + # Determines where we add `should` and `should_not`. + # + # @api private + # + # source://rspec-expectations//lib/rspec/expectations/syntax.rb#11 + def default_should_host; end + + # Disables the `expect` syntax. + # + # @api private + # + # source://rspec-expectations//lib/rspec/expectations/syntax.rb#80 + def disable_expect(syntax_host = T.unsafe(nil)); end + + # Disables the `should` syntax. + # + # @api private + # + # source://rspec-expectations//lib/rspec/expectations/syntax.rb#57 + def disable_should(syntax_host = T.unsafe(nil)); end + + # Enables the `expect` syntax. + # + # @api private + # + # source://rspec-expectations//lib/rspec/expectations/syntax.rb#68 + def enable_expect(syntax_host = T.unsafe(nil)); end + + # Enables the `should` syntax. + # + # @api private + # + # source://rspec-expectations//lib/rspec/expectations/syntax.rb#38 + def enable_should(syntax_host = T.unsafe(nil)); end + + # Indicates whether or not the `expect` syntax is enabled. + # + # @api private + # + # source://rspec-expectations//lib/rspec/expectations/syntax.rb#96 + def expect_enabled?(syntax_host = T.unsafe(nil)); end + + # Indicates whether or not the `should` syntax is enabled. + # + # @api private + # + # source://rspec-expectations//lib/rspec/expectations/syntax.rb#90 + def should_enabled?(syntax_host = T.unsafe(nil)); end + + # Instructs rspec-expectations to warn on first usage of `should` or `should_not`. + # Enabled by default. This is largely here to facilitate testing. + # + # @api private + # + # source://rspec-expectations//lib/rspec/expectations/syntax.rb#18 + def warn_about_should!; end + + # Generates a deprecation warning for the given method if no warning + # has already been issued. + # + # @api private + # + # source://rspec-expectations//lib/rspec/expectations/syntax.rb#25 + def warn_about_should_unless_configured(method_name); end + + class << self + # Determines where we add `should` and `should_not`. + # + # @api private + # + # source://rspec-expectations//lib/rspec/expectations/syntax.rb#11 + def default_should_host; end + + # Disables the `expect` syntax. + # + # @api private + # + # source://rspec-expectations//lib/rspec/expectations/syntax.rb#80 + def disable_expect(syntax_host = T.unsafe(nil)); end + + # Disables the `should` syntax. + # + # @api private + # + # source://rspec-expectations//lib/rspec/expectations/syntax.rb#57 + def disable_should(syntax_host = T.unsafe(nil)); end + + # Enables the `expect` syntax. + # + # @api private + # + # source://rspec-expectations//lib/rspec/expectations/syntax.rb#68 + def enable_expect(syntax_host = T.unsafe(nil)); end + + # Enables the `should` syntax. + # + # @api private + # + # source://rspec-expectations//lib/rspec/expectations/syntax.rb#38 + def enable_should(syntax_host = T.unsafe(nil)); end + + # Indicates whether or not the `expect` syntax is enabled. + # + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/expectations/syntax.rb#96 + def expect_enabled?(syntax_host = T.unsafe(nil)); end + + # Indicates whether or not the `should` syntax is enabled. + # + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/expectations/syntax.rb#90 + def should_enabled?(syntax_host = T.unsafe(nil)); end + + # Instructs rspec-expectations to warn on first usage of `should` or `should_not`. + # Enabled by default. This is largely here to facilitate testing. + # + # @api private + # + # source://rspec-expectations//lib/rspec/expectations/syntax.rb#18 + def warn_about_should!; end + + # Generates a deprecation warning for the given method if no warning + # has already been issued. + # + # @api private + # + # source://rspec-expectations//lib/rspec/expectations/syntax.rb#25 + def warn_about_should_unless_configured(method_name); end + end +end + +# Validates the provided matcher to ensure it supports block +# expectations, in order to avoid user confusion when they +# use a block thinking the expectation will be on the return +# value of the block rather than the block itself. +# +# @private +# +# source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#98 +class RSpec::Expectations::ValueExpectationTarget < ::RSpec::Expectations::ExpectationTarget + # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#104 + def not_to(matcher = T.unsafe(nil), message = T.unsafe(nil), &block); end + + # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#99 + def to(matcher = T.unsafe(nil), message = T.unsafe(nil), &block); end + + private + + # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#111 + def enforce_value_expectation(matcher); end + + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/expectations/expectation_target.rb#126 + def supports_value_expectations?(matcher); end +end + +# @private +# +# source://rspec-expectations//lib/rspec/expectations/version.rb#4 +module RSpec::Expectations::Version; end + +# source://rspec-expectations//lib/rspec/expectations/version.rb#5 +RSpec::Expectations::Version::STRING = T.let(T.unsafe(nil), String) + +# RSpec::Matchers provides a number of useful matchers we use to define +# expectations. Any object that implements the [matcher protocol](Matchers/MatcherProtocol) +# can be used as a matcher. +# +# ## Predicates +# +# In addition to matchers that are defined explicitly, RSpec will create +# custom matchers on the fly for any arbitrary predicate, giving your specs a +# much more natural language feel. +# +# A Ruby predicate is a method that ends with a "?" and returns true or false. +# Common examples are `empty?`, `nil?`, and `instance_of?`. +# +# All you need to do is write `expect(..).to be_` followed by the predicate +# without the question mark, and RSpec will figure it out from there. +# For example: +# +# expect([]).to be_empty # => [].empty?() | passes +# expect([]).not_to be_empty # => [].empty?() | fails +# +# In addition to prefixing the predicate matchers with "be_", you can also use "be_a_" +# and "be_an_", making your specs read much more naturally: +# +# expect("a string").to be_an_instance_of(String) # =>"a string".instance_of?(String) # passes +# +# expect(3).to be_a_kind_of(Integer) # => 3.kind_of?(Numeric) | passes +# expect(3).to be_a_kind_of(Numeric) # => 3.kind_of?(Numeric) | passes +# expect(3).to be_an_instance_of(Integer) # => 3.instance_of?(Integer) | passes +# expect(3).not_to be_an_instance_of(Numeric) # => 3.instance_of?(Numeric) | fails +# +# RSpec will also create custom matchers for predicates like `has_key?`. To +# use this feature, just state that the object should have_key(:key) and RSpec will +# call has_key?(:key) on the target. For example: +# +# expect(:a => "A").to have_key(:a) +# expect(:a => "A").to have_key(:b) # fails +# +# You can use this feature to invoke any predicate that begins with "has_", whether it is +# part of the Ruby libraries (like `Hash#has_key?`) or a method you wrote on your own class. +# +# Note that RSpec does not provide composable aliases for these dynamic predicate +# matchers. You can easily define your own aliases, though: +# +# RSpec::Matchers.alias_matcher :a_user_who_is_an_admin, :be_an_admin +# expect(user_list).to include(a_user_who_is_an_admin) +# +# ## Alias Matchers +# +# With {RSpec::Matchers.alias_matcher}, you can easily create an +# alternate name for a given matcher. +# +# The description will also change according to the new name: +# +# RSpec::Matchers.alias_matcher :a_list_that_sums_to, :sum_to +# sum_to(3).description # => "sum to 3" +# a_list_that_sums_to(3).description # => "a list that sums to 3" +# +# or you can specify a custom description like this: +# +# RSpec::Matchers.alias_matcher :a_list_sorted_by, :be_sorted_by do |description| +# description.sub("be sorted by", "a list sorted by") +# end +# +# be_sorted_by(:age).description # => "be sorted by age" +# a_list_sorted_by(:age).description # => "a list sorted by age" +# +# ## Custom Matchers +# +# When you find that none of the stock matchers provide a natural feeling +# expectation, you can very easily write your own using RSpec's matcher DSL +# or writing one from scratch. +# +# ### Matcher DSL +# +# Imagine that you are writing a game in which players can be in various +# zones on a virtual board. To specify that bob should be in zone 4, you +# could say: +# +# expect(bob.current_zone).to eql(Zone.new("4")) +# +# But you might find it more expressive to say: +# +# expect(bob).to be_in_zone("4") +# +# and/or +# +# expect(bob).not_to be_in_zone("3") +# +# You can create such a matcher like so: +# +# RSpec::Matchers.define :be_in_zone do |zone| +# match do |player| +# player.in_zone?(zone) +# end +# end +# +# This will generate a be_in_zone method that returns a matcher +# with logical default messages for failures. You can override the failure +# messages and the generated description as follows: +# +# RSpec::Matchers.define :be_in_zone do |zone| +# match do |player| +# player.in_zone?(zone) +# end +# +# failure_message do |player| +# # generate and return the appropriate string. +# end +# +# failure_message_when_negated do |player| +# # generate and return the appropriate string. +# end +# +# description do +# # generate and return the appropriate string. +# end +# end +# +# Each of the message-generation methods has access to the block arguments +# passed to the create method (in this case, zone). The +# failure message methods (failure_message and +# failure_message_when_negated) are passed the actual value (the +# receiver of expect(..) or expect(..).not_to). +# +# ### Custom Matcher from scratch +# +# You could also write a custom matcher from scratch, as follows: +# +# class BeInZone +# def initialize(expected) +# @expected = expected +# end +# +# def matches?(target) +# @target = target +# @target.current_zone.eql?(Zone.new(@expected)) +# end +# +# def failure_message +# "expected #{@target.inspect} to be in Zone #{@expected}" +# end +# +# def failure_message_when_negated +# "expected #{@target.inspect} not to be in Zone #{@expected}" +# end +# end +# +# ... and a method like this: +# +# def be_in_zone(expected) +# BeInZone.new(expected) +# end +# +# And then expose the method to your specs. This is normally done +# by including the method and the class in a module, which is then +# included in your spec: +# +# module CustomGameMatchers +# class BeInZone +# # ... +# end +# +# def be_in_zone(expected) +# # ... +# end +# end +# +# describe "Player behaviour" do +# include CustomGameMatchers +# # ... +# end +# +# or you can include in globally in a spec_helper.rb file required +# from your spec file(s): +# +# RSpec::configure do |config| +# config.include(CustomGameMatchers) +# end +# +# ### Making custom matchers composable +# +# RSpec's built-in matchers are designed to be composed, in expressions like: +# +# expect(["barn", 2.45]).to contain_exactly( +# a_value_within(0.1).of(2.5), +# a_string_starting_with("bar") +# ) +# +# Custom matchers can easily participate in composed matcher expressions like these. +# Include {RSpec::Matchers::Composable} in your custom matcher to make it support +# being composed (matchers defined using the DSL have this included automatically). +# Within your matcher's `matches?` method (or the `match` block, if using the DSL), +# use `values_match?(expected, actual)` rather than `expected == actual`. +# Under the covers, `values_match?` is able to match arbitrary +# nested data structures containing a mix of both matchers and non-matcher objects. +# It uses `===` and `==` to perform the matching, considering the values to +# match if either returns `true`. The `Composable` mixin also provides some helper +# methods for surfacing the matcher descriptions within your matcher's description +# or failure messages. +# +# RSpec's built-in matchers each have a number of aliases that rephrase the matcher +# from a verb phrase (such as `be_within`) to a noun phrase (such as `a_value_within`), +# which reads better when the matcher is passed as an argument in a composed matcher +# expressions, and also uses the noun-phrase wording in the matcher's `description`, +# for readable failure messages. You can alias your custom matchers in similar fashion +# using {RSpec::Matchers.alias_matcher}. +# +# ## Negated Matchers +# +# Sometimes if you want to test for the opposite using a more descriptive name +# instead of using `not_to`, you can use {RSpec::Matchers.define_negated_matcher}: +# +# RSpec::Matchers.define_negated_matcher :exclude, :include +# include(1, 2).description # => "include 1 and 2" +# exclude(1, 2).description # => "exclude 1 and 2" +# +# While the most obvious negated form may be to add a `not_` prefix, +# the failure messages you get with that form can be confusing (e.g. +# "expected [actual] to not [verb], but did not"). We've found it works +# best to find a more positive name for the negated form, such as +# `avoid_changing` rather than `not_change`. +# +# source://rspec-expectations//lib/rspec/matchers/english_phrasing.rb#2 +module RSpec::Matchers + extend ::RSpec::Matchers::DSL + + # Applied to a proc, specifies that its execution will cause some value to + # change. + # + # You can either pass receiver and message, or a block, + # but not both. + # + # When passing a block, it must use the `{ ... }` format, not + # do/end, as `{ ... }` binds to the `change` method, whereas do/end + # would errantly bind to the `expect(..).to` or `expect(...).not_to` method. + # + # You can chain any of the following off of the end to specify details + # about the change: + # + # * `from` + # * `to` + # + # or any one of: + # + # * `by` + # * `by_at_least` + # * `by_at_most` + # + # == Notes + # + # Evaluates `receiver.message` or `block` before and after it + # evaluates the block passed to `expect`. If the value is the same + # object, its before/after `hash` value is used to see if it has changed. + # Therefore, your object needs to properly implement `hash` to work correctly + # with this matcher. + # + # `expect( ... ).not_to change` supports the form that specifies `from` + # (which specifies what you expect the starting, unchanged value to be) + # but does not support forms with subsequent calls to `by`, `by_at_least`, + # `by_at_most` or `to`. + # + # @example + # expect { + # team.add_player(player) + # }.to change(roster, :count) + # + # expect { + # team.add_player(player) + # }.to change(roster, :count).by(1) + # + # expect { + # team.add_player(player) + # }.to change(roster, :count).by_at_least(1) + # + # expect { + # team.add_player(player) + # }.to change(roster, :count).by_at_most(1) + # + # string = "string" + # expect { + # string.reverse! + # }.to change { string }.from("string").to("gnirts") + # + # string = "string" + # expect { + # string + # }.not_to change { string }.from("string") + # + # expect { + # person.happy_birthday + # }.to change(person, :birthday).from(32).to(33) + # + # expect { + # employee.develop_great_new_social_networking_app + # }.to change(employee, :title).from("Mail Clerk").to("CEO") + # + # expect { + # doctor.leave_office + # }.to change(doctor, :sign).from(/is in/).to(/is out/) + # + # user = User.new(:type => "admin") + # expect { + # user.symbolize_type + # }.to change(user, :type).from(String).to(Symbol) + # @param receiver [Object] + # @param message [Symbol] the message to send the receiver + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def a_block_changing(*args, **_arg1, &block); end + + # With no arg, passes if the block outputs `to_stdout` or `to_stderr`. + # With a string, passes if the block outputs that specific string `to_stdout` or `to_stderr`. + # With a regexp or matcher, passes if the block outputs a string `to_stdout` or `to_stderr` that matches. + # + # To capture output from any spawned subprocess as well, use `to_stdout_from_any_process` or + # `to_stderr_from_any_process`. Output from any process that inherits the main process's corresponding + # standard stream will be captured. + # + # @example + # expect { print 'foo' }.to output.to_stdout + # expect { print 'foo' }.to output('foo').to_stdout + # expect { print 'foo' }.to output(/foo/).to_stdout + # + # expect { do_something }.to_not output.to_stdout + # + # expect { warn('foo') }.to output.to_stderr + # expect { warn('foo') }.to output('foo').to_stderr + # expect { warn('foo') }.to output(/foo/).to_stderr + # + # expect { do_something }.to_not output.to_stderr + # + # expect { system('echo foo') }.to output("foo\n").to_stdout_from_any_process + # expect { system('echo foo', out: :err) }.to output("foo\n").to_stderr_from_any_process + # @note `to_stdout` and `to_stderr` work by temporarily replacing `$stdout` or `$stderr`, + # so they're not able to intercept stream output that explicitly uses `STDOUT`/`STDERR` + # or that uses a reference to `$stdout`/`$stderr` that was stored before the + # matcher was used. + # @note `to_stdout_from_any_process` and `to_stderr_from_any_process` use Tempfiles, and + # are thus significantly (~30x) slower than `to_stdout` and `to_stderr`. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def a_block_outputting(*args, **_arg1, &block); end + + # With no args, matches if any error is raised. + # With a named error, matches only if that specific error is raised. + # With a named error and message specified as a String, matches only if both match. + # With a named error and message specified as a Regexp, matches only if both match. + # Pass an optional block to perform extra verifications on the exception matched + # + # @example + # expect { do_something_risky }.to raise_error + # expect { do_something_risky }.to raise_error(PoorRiskDecisionError) + # expect { do_something_risky }.to raise_error(PoorRiskDecisionError) { |error| expect(error.data).to eq 42 } + # expect { do_something_risky }.to raise_error { |error| expect(error.data).to eq 42 } + # expect { do_something_risky }.to raise_error(PoorRiskDecisionError, "that was too risky") + # expect { do_something_risky }.to raise_error(PoorRiskDecisionError, /oo ri/) + # expect { do_something_risky }.to raise_error("that was too risky") + # + # expect { do_something_risky }.not_to raise_error + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def a_block_raising(*args, **_arg1, &block); end + + # Given no argument, matches if a proc throws any Symbol. + # + # Given a Symbol, matches if the given proc throws the specified Symbol. + # + # Given a Symbol and an arg, matches if the given proc throws the + # specified Symbol with the specified arg. + # + # @example + # expect { do_something_risky }.to throw_symbol + # expect { do_something_risky }.to throw_symbol(:that_was_risky) + # expect { do_something_risky }.to throw_symbol(:that_was_risky, 'culprit') + # + # expect { do_something_risky }.not_to throw_symbol + # expect { do_something_risky }.not_to throw_symbol(:that_was_risky) + # expect { do_something_risky }.not_to throw_symbol(:that_was_risky, 'culprit') + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def a_block_throwing(*args, **_arg1, &block); end + + # Passes if the method called in the expect block yields, regardless + # of whether or not arguments are yielded. + # + # @example + # expect { |b| 5.tap(&b) }.to yield_control + # expect { |b| "a".to_sym(&b) }.not_to yield_control + # @note Your expect block must accept a parameter and pass it on to + # the method-under-test as a block. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def a_block_yielding_control(*args, **_arg1, &block); end + + # Designed for use with methods that repeatedly yield (such as + # iterators). Passes if the method called in the expect block yields + # multiple times with arguments matching those given. + # + # Argument matching is done using `===` (the case match operator) + # and `==`. If the expected and actual arguments match with either + # operator, the matcher will pass. + # + # @example + # expect { |b| [1, 2, 3].each(&b) }.to yield_successive_args(1, 2, 3) + # expect { |b| { :a => 1, :b => 2 }.each(&b) }.to yield_successive_args([:a, 1], [:b, 2]) + # expect { |b| [1, 2, 3].each(&b) }.not_to yield_successive_args(1, 2) + # @note Your expect block must accept a parameter and pass it on to + # the method-under-test as a block. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def a_block_yielding_successive_args(*args, **_arg1, &block); end + + # Given no arguments, matches if the method called in the expect + # block yields with arguments (regardless of what they are or how + # many there are). + # + # Given arguments, matches if the method called in the expect block + # yields with arguments that match the given arguments. + # + # Argument matching is done using `===` (the case match operator) + # and `==`. If the expected and actual arguments match with either + # operator, the matcher will pass. + # + # @example + # expect { |b| 5.tap(&b) }.to yield_with_args # because #tap yields an arg + # expect { |b| 5.tap(&b) }.to yield_with_args(5) # because 5 == 5 + # expect { |b| 5.tap(&b) }.to yield_with_args(Integer) # because Integer === 5 + # expect { |b| File.open("f.txt", &b) }.to yield_with_args(/txt/) # because /txt/ === "f.txt" + # + # expect { |b| User.transaction(&b) }.not_to yield_with_args # because it yields no args + # expect { |b| 5.tap(&b) }.not_to yield_with_args(1, 2, 3) + # @note Your expect block must accept a parameter and pass it on to + # the method-under-test as a block. + # @note This matcher is not designed for use with methods that yield + # multiple times. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def a_block_yielding_with_args(*args, **_arg1, &block); end + + # Passes if the method called in the expect block yields with + # no arguments. Fails if it does not yield, or yields with arguments. + # + # @example + # expect { |b| User.transaction(&b) }.to yield_with_no_args + # expect { |b| 5.tap(&b) }.not_to yield_with_no_args # because it yields with `5` + # expect { |b| "a".to_sym(&b) }.not_to yield_with_no_args # because it does not yield + # @note Your expect block must accept a parameter and pass it on to + # the method-under-test as a block. + # @note This matcher is not designed for use with methods that yield + # multiple times. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def a_block_yielding_with_no_args(*args, **_arg1, &block); end + + # Passes if actual contains all of the expected regardless of order. + # This works for collections. Pass in multiple args and it will only + # pass if all args are found in collection. + # + # @example + # expect([1, 2, 3]).to contain_exactly(1, 2, 3) + # expect([1, 2, 3]).to contain_exactly(1, 3, 2) + # @note This is also available using the `=~` operator with `should`, + # but `=~` is not supported with `expect`. + # @see #match_array + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def a_collection_containing_exactly(*args, **_arg1, &block); end + + # Matches if the actual value ends with the expected value(s). In the case + # of a string, matches against the last `expected.length` characters of the + # actual string. In the case of an array, matches against the last + # `expected.length` elements of the actual array. + # + # @example + # expect("this string").to end_with "string" + # expect([0, 1, 2, 3, 4]).to end_with 4 + # expect([0, 2, 3, 4, 4]).to end_with 3, 4 + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def a_collection_ending_with(*args, **_arg1, &block); end + + # Passes if actual includes expected. This works for + # collections and Strings. You can also pass in multiple args + # and it will only pass if all args are found in collection. + # + # @example + # expect([1,2,3]).to include(3) + # expect([1,2,3]).to include(2,3) + # expect([1,2,3]).to include(2,3,4) # fails + # expect([1,2,3]).not_to include(4) + # expect("spread").to include("read") + # expect("spread").not_to include("red") + # expect(:a => 1, :b => 2).to include(:a) + # expect(:a => 1, :b => 2).to include(:a, :b) + # expect(:a => 1, :b => 2).to include(:a => 1) + # expect(:a => 1, :b => 2).to include(:b => 2, :a => 1) + # expect(:a => 1, :b => 2).to include(:c) # fails + # expect(:a => 1, :b => 2).not_to include(:a => 2) + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def a_collection_including(*args, **_arg1, &block); end + + # Matches if the actual value starts with the expected value(s). In the + # case of a string, matches against the first `expected.length` characters + # of the actual string. In the case of an array, matches against the first + # `expected.length` elements of the actual array. + # + # @example + # expect("this string").to start_with "this s" + # expect([0, 1, 2, 3, 4]).to start_with 0 + # expect([0, 2, 3, 4, 4]).to start_with 0, 1 + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def a_collection_starting_with(*args, **_arg1, &block); end + + # Passes if actual is falsey (false or nil) + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def a_falsey_value(*args, **_arg1, &block); end + + # Passes if actual is falsey (false or nil) + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def a_falsy_value(*args, **_arg1, &block); end + + # Passes if actual includes expected. This works for + # collections and Strings. You can also pass in multiple args + # and it will only pass if all args are found in collection. + # + # @example + # expect([1,2,3]).to include(3) + # expect([1,2,3]).to include(2,3) + # expect([1,2,3]).to include(2,3,4) # fails + # expect([1,2,3]).not_to include(4) + # expect("spread").to include("read") + # expect("spread").not_to include("red") + # expect(:a => 1, :b => 2).to include(:a) + # expect(:a => 1, :b => 2).to include(:a, :b) + # expect(:a => 1, :b => 2).to include(:a => 1) + # expect(:a => 1, :b => 2).to include(:b => 2, :a => 1) + # expect(:a => 1, :b => 2).to include(:c) # fails + # expect(:a => 1, :b => 2).not_to include(:a => 2) + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def a_hash_including(*args, **_arg1, &block); end + + # Passes if actual.kind_of?(expected) + # + # @example + # expect(5).to be_a_kind_of(Integer) + # expect(5).to be_a_kind_of(Numeric) + # expect(5).not_to be_a_kind_of(Float) + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def a_kind_of(*args, **_arg1, &block); end + + # Passes if actual is nil + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def a_nil_value(*args, **_arg1, &block); end + + # Passes if actual covers expected. This works for + # Ranges. You can also pass in multiple args + # and it will only pass if all args are found in Range. + # + # ### Warning:: Ruby >= 1.9 only + # + # @example + # expect(1..10).to cover(5) + # expect(1..10).to cover(4, 6) + # expect(1..10).to cover(4, 6, 11) # fails + # expect(1..10).not_to cover(11) + # expect(1..10).not_to cover(5) # fails + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def a_range_covering(*args, **_arg1, &block); end + + # Matches if the actual value ends with the expected value(s). In the case + # of a string, matches against the last `expected.length` characters of the + # actual string. In the case of an array, matches against the last + # `expected.length` elements of the actual array. + # + # @example + # expect("this string").to end_with "string" + # expect([0, 1, 2, 3, 4]).to end_with 4 + # expect([0, 2, 3, 4, 4]).to end_with 3, 4 + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def a_string_ending_with(*args, **_arg1, &block); end + + # Passes if actual includes expected. This works for + # collections and Strings. You can also pass in multiple args + # and it will only pass if all args are found in collection. + # + # @example + # expect([1,2,3]).to include(3) + # expect([1,2,3]).to include(2,3) + # expect([1,2,3]).to include(2,3,4) # fails + # expect([1,2,3]).not_to include(4) + # expect("spread").to include("read") + # expect("spread").not_to include("red") + # expect(:a => 1, :b => 2).to include(:a) + # expect(:a => 1, :b => 2).to include(:a, :b) + # expect(:a => 1, :b => 2).to include(:a => 1) + # expect(:a => 1, :b => 2).to include(:b => 2, :a => 1) + # expect(:a => 1, :b => 2).to include(:c) # fails + # expect(:a => 1, :b => 2).not_to include(:a => 2) + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def a_string_including(*args, **_arg1, &block); end + + # Given a `Regexp` or `String`, passes if `actual.match(pattern)` + # Given an arbitrary nested data structure (e.g. arrays and hashes), + # matches if `expected === actual` || `actual == expected` for each + # pair of elements. + # + # @example + # expect(email).to match(/^([^\s]+)((?:[-a-z0-9]+\.)+[a-z]{2,})$/i) + # expect(email).to match("@example.com") + # @example + # hash = { + # :a => { + # :b => ["foo", 5], + # :c => { :d => 2.05 } + # } + # } + # + # expect(hash).to match( + # :a => { + # :b => a_collection_containing_exactly( + # a_string_starting_with("f"), + # an_instance_of(Integer) + # ), + # :c => { :d => (a_value < 3) } + # } + # ) + # @note The `match_regex` alias is deprecated and is not recommended for use. + # It was added in 2.12.1 to facilitate its use from within custom + # matchers (due to how the custom matcher DSL was evaluated in 2.x, + # `match` could not be used there), but is no longer needed in 3.x. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def a_string_matching(*args, **_arg1, &block); end + + # Matches if the actual value starts with the expected value(s). In the + # case of a string, matches against the first `expected.length` characters + # of the actual string. In the case of an array, matches against the first + # `expected.length` elements of the actual array. + # + # @example + # expect("this string").to start_with "this s" + # expect([0, 1, 2, 3, 4]).to start_with 0 + # expect([0, 2, 3, 4, 4]).to start_with 0, 1 + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def a_string_starting_with(*args, **_arg1, &block); end + + # Passes if actual is truthy (anything but false or nil) + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def a_truthy_value(*args, **_arg1, &block); end + + # Given true, false, or nil, will pass if actual value is true, false or + # nil (respectively). Given no args means the caller should satisfy an if + # condition (to be or not to be). + # + # Predicates are any Ruby method that ends in a "?" and returns true or + # false. Given be_ followed by arbitrary_predicate (without the "?"), + # RSpec will match convert that into a query against the target object. + # + # The arbitrary_predicate feature will handle any predicate prefixed with + # "be_an_" (e.g. be_an_instance_of), "be_a_" (e.g. be_a_kind_of) or "be_" + # (e.g. be_empty), letting you choose the prefix that best suits the + # predicate. + # + # @example + # expect(actual).to be_truthy + # expect(actual).to be_falsey + # expect(actual).to be_nil + # expect(actual).to be_[arbitrary_predicate](*args) + # expect(actual).not_to be_nil + # expect(actual).not_to be_[arbitrary_predicate](*args) + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def a_value(*args, **_arg1, &block); end + + # Passes if actual.between?(min, max). Works with any Comparable object, + # including String, Symbol, Time, or Numeric (Fixnum, Bignum, Integer, + # Float, Complex, and Rational). + # + # By default, `be_between` is inclusive (i.e. passes when given either the max or min value), + # but you can make it `exclusive` by chaining that off the matcher. + # + # @example + # expect(5).to be_between(1, 10) + # expect(11).not_to be_between(1, 10) + # expect(10).not_to be_between(1, 10).exclusive + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def a_value_between(*args, **_arg1, &block); end + + # Passes if actual == expected +/- delta + # + # @example + # expect(result).to be_within(0.5).of(3.0) + # expect(result).not_to be_within(0.5).of(3.0) + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def a_value_within(*args, **_arg1, &block); end + + # Allows multiple expectations in the provided block to fail, and then + # aggregates them into a single exception, rather than aborting on the + # first expectation failure like normal. This allows you to see all + # failures from an entire set of expectations without splitting each + # off into its own example (which may slow things down if the example + # setup is expensive). + # + # @example + # aggregate_failures("verifying response") do + # expect(response.status).to eq(200) + # expect(response.headers).to include("Content-Type" => "text/plain") + # expect(response.body).to include("Success") + # end + # @note The implementation of this feature uses a thread-local variable, + # which means that if you have an expectation failure in another thread, + # it'll abort like normal. + # @param label [String] label for this aggregation block, which will be + # included in the aggregated exception message. + # @param metadata [Hash] additional metadata about this failure aggregation + # block. If multiple expectations fail, it will be exposed from the + # {Expectations::MultipleExpectationsNotMetError} exception. Mostly + # intended for internal RSpec use but you can use it as well. + # @raise [Expectations::MultipleExpectationsNotMetError] raised when + # multiple expectations fail. + # @raise [Expectations::ExpectationNotMetError] raised when a single + # expectation fails. + # @raise [Exception] other sorts of exceptions will be raised as normal. + # @yield Block containing as many expectation as you want. The block is + # simply yielded to, so you can trust that anything that works outside + # the block should work within it. + # + # source://rspec-expectations//lib/rspec/matchers.rb#305 + def aggregate_failures(label = T.unsafe(nil), metadata = T.unsafe(nil), &block); end + + # Passes if the provided matcher passes when checked against all + # elements of the collection. + # + # @example + # expect([1, 3, 5]).to all be_odd + # expect([1, 3, 6]).to all be_odd # fails + # @example + # expect([1, 3, 5]).to all( be_odd.and be_an(Integer) ) + # @note The negative form `not_to all` is not supported. Instead + # use `not_to include` or pass a negative form of a matcher + # as the argument (e.g. `all exclude(:foo)`). + # @note You can also use this with compound matchers as well. + # + # source://rspec-expectations//lib/rspec/matchers.rb#662 + def all(expected); end + + # An alternate form of `contain_exactly` that accepts + # the expected contents as a single array arg rather + # than splatted out as individual items. + # + # @example + # expect(results).to contain_exactly(1, 2) + # # is identical to: + # expect(results).to match_array([1, 2]) + # @see #contain_exactly + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def an_array_matching(*args, **_arg1, &block); end + + # Passes if actual.instance_of?(expected) + # + # @example + # expect(5).to be_an_instance_of(Integer) + # expect(5).not_to be_an_instance_of(Numeric) + # expect(5).not_to be_an_instance_of(Float) + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def an_instance_of(*args, **_arg1, &block); end + + # Passes if actual == expected. + # + # See http://www.ruby-doc.org/core/classes/Object.html#M001057 for more + # information about equality in Ruby. + # + # @example + # expect(5).to eq(5) + # expect(5).not_to eq(3) + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def an_object_eq_to(*args, **_arg1, &block); end + + # Passes if `actual.eql?(expected)` + # + # See http://www.ruby-doc.org/core/classes/Object.html#M001057 for more + # information about equality in Ruby. + # + # @example + # expect(5).to eql(5) + # expect(5).not_to eql(3) + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def an_object_eql_to(*args, **_arg1, &block); end + + # Passes if actual.equal?(expected) (object identity). + # + # See http://www.ruby-doc.org/core/classes/Object.html#M001057 for more + # information about equality in Ruby. + # + # @example + # expect(5).to equal(5) # Integers are equal + # expect("5").not_to equal("5") # Strings that look the same are not the same object + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def an_object_equal_to(*args, **_arg1, &block); end + + # Passes if `actual.exist?` or `actual.exists?` + # + # @example + # expect(File).to exist("path/to/file") + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def an_object_existing(*args, **_arg1, &block); end + + # Passes if actual's attribute values match the expected attributes hash. + # This works no matter how you define your attribute readers. + # + # @example + # Person = Struct.new(:name, :age) + # person = Person.new("Bob", 32) + # + # expect(person).to have_attributes(:name => "Bob", :age => 32) + # expect(person).to have_attributes(:name => a_string_starting_with("B"), :age => (a_value > 30) ) + # @example + # expect(person).to have_attributes(:color => "red") + # @note It will fail if actual doesn't respond to any of the expected attributes. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def an_object_having_attributes(*args, **_arg1, &block); end + + # Given a `Regexp` or `String`, passes if `actual.match(pattern)` + # Given an arbitrary nested data structure (e.g. arrays and hashes), + # matches if `expected === actual` || `actual == expected` for each + # pair of elements. + # + # @example + # expect(email).to match(/^([^\s]+)((?:[-a-z0-9]+\.)+[a-z]{2,})$/i) + # expect(email).to match("@example.com") + # @example + # hash = { + # :a => { + # :b => ["foo", 5], + # :c => { :d => 2.05 } + # } + # } + # + # expect(hash).to match( + # :a => { + # :b => a_collection_containing_exactly( + # a_string_starting_with("f"), + # an_instance_of(Integer) + # ), + # :c => { :d => (a_value < 3) } + # } + # ) + # @note The `match_regex` alias is deprecated and is not recommended for use. + # It was added in 2.12.1 to facilitate its use from within custom + # matchers (due to how the custom matcher DSL was evaluated in 2.x, + # `match` could not be used there), but is no longer needed in 3.x. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def an_object_matching(*args, **_arg1, &block); end + + # Matches if the target object responds to all of the names + # provided. Names can be Strings or Symbols. + # + # @example + # expect("string").to respond_to(:length) + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def an_object_responding_to(*args, **_arg1, &block); end + + # Passes if the submitted block returns true. Yields target to the + # block. + # + # Generally speaking, this should be thought of as a last resort when + # you can't find any other way to specify the behaviour you wish to + # specify. + # + # If you do find yourself in such a situation, you could always write + # a custom matcher, which would likely make your specs more expressive. + # + # @example + # expect(5).to satisfy { |n| n > 3 } + # expect(5).to satisfy("be greater than 3") { |n| n > 3 } + # @param description [String] optional description to be used for this matcher. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def an_object_satisfying(*args, **_arg1, &block); end + + # Given true, false, or nil, will pass if actual value is true, false or + # nil (respectively). Given no args means the caller should satisfy an if + # condition (to be or not to be). + # + # Predicates are any Ruby method that ends in a "?" and returns true or + # false. Given be_ followed by arbitrary_predicate (without the "?"), + # RSpec will match convert that into a query against the target object. + # + # The arbitrary_predicate feature will handle any predicate prefixed with + # "be_an_" (e.g. be_an_instance_of), "be_a_" (e.g. be_a_kind_of) or "be_" + # (e.g. be_empty), letting you choose the prefix that best suits the + # predicate. + # + # @example + # expect(actual).to be_truthy + # expect(actual).to be_falsey + # expect(actual).to be_nil + # expect(actual).to be_[arbitrary_predicate](*args) + # expect(actual).not_to be_nil + # expect(actual).not_to be_[arbitrary_predicate](*args) + # + # source://rspec-expectations//lib/rspec/matchers.rb#349 + def be(*args); end + + # passes if target.kind_of?(klass) + # + # source://rspec-expectations//lib/rspec/matchers.rb#355 + def be_a(klass); end + + # Passes if actual.kind_of?(expected) + # + # @example + # expect(5).to be_a_kind_of(Integer) + # expect(5).to be_a_kind_of(Numeric) + # expect(5).not_to be_a_kind_of(Float) + # + # source://rspec-expectations//lib/rspec/matchers.rb#378 + def be_a_kind_of(expected); end + + # passes if target.kind_of?(klass) + # + # source://rspec-expectations//lib/rspec/matchers.rb#355 + def be_an(klass); end + + # Passes if actual.instance_of?(expected) + # + # @example + # expect(5).to be_an_instance_of(Integer) + # expect(5).not_to be_an_instance_of(Numeric) + # expect(5).not_to be_an_instance_of(Float) + # + # source://rspec-expectations//lib/rspec/matchers.rb#366 + def be_an_instance_of(expected); end + + # Passes if actual.between?(min, max). Works with any Comparable object, + # including String, Symbol, Time, or Numeric (Fixnum, Bignum, Integer, + # Float, Complex, and Rational). + # + # By default, `be_between` is inclusive (i.e. passes when given either the max or min value), + # but you can make it `exclusive` by chaining that off the matcher. + # + # @example + # expect(5).to be_between(1, 10) + # expect(11).not_to be_between(1, 10) + # expect(10).not_to be_between(1, 10).exclusive + # + # source://rspec-expectations//lib/rspec/matchers.rb#395 + def be_between(min, max); end + + # Passes if actual is falsey (false or nil) + # + # source://rspec-expectations//lib/rspec/matchers.rb#316 + def be_falsey; end + + # Passes if actual is falsey (false or nil) + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def be_falsy(*args, **_arg1, &block); end + + # Passes if actual.instance_of?(expected) + # + # @example + # expect(5).to be_an_instance_of(Integer) + # expect(5).not_to be_an_instance_of(Numeric) + # expect(5).not_to be_an_instance_of(Float) + # + # source://rspec-expectations//lib/rspec/matchers.rb#366 + def be_instance_of(expected); end + + # Passes if actual.kind_of?(expected) + # + # @example + # expect(5).to be_a_kind_of(Integer) + # expect(5).to be_a_kind_of(Numeric) + # expect(5).not_to be_a_kind_of(Float) + # + # source://rspec-expectations//lib/rspec/matchers.rb#378 + def be_kind_of(expected); end + + # Passes if actual is nil + # + # source://rspec-expectations//lib/rspec/matchers.rb#324 + def be_nil; end + + # Passes if actual is truthy (anything but false or nil) + # + # source://rspec-expectations//lib/rspec/matchers.rb#310 + def be_truthy; end + + # Passes if actual == expected +/- delta + # + # @example + # expect(result).to be_within(0.5).of(3.0) + # expect(result).not_to be_within(0.5).of(3.0) + # + # source://rspec-expectations//lib/rspec/matchers.rb#405 + def be_within(delta); end + + # Applied to a proc, specifies that its execution will cause some value to + # change. + # + # You can either pass receiver and message, or a block, + # but not both. + # + # When passing a block, it must use the `{ ... }` format, not + # do/end, as `{ ... }` binds to the `change` method, whereas do/end + # would errantly bind to the `expect(..).to` or `expect(...).not_to` method. + # + # You can chain any of the following off of the end to specify details + # about the change: + # + # * `from` + # * `to` + # + # or any one of: + # + # * `by` + # * `by_at_least` + # * `by_at_most` + # + # == Notes + # + # Evaluates `receiver.message` or `block` before and after it + # evaluates the block passed to `expect`. If the value is the same + # object, its before/after `hash` value is used to see if it has changed. + # Therefore, your object needs to properly implement `hash` to work correctly + # with this matcher. + # + # `expect( ... ).not_to change` supports the form that specifies `from` + # (which specifies what you expect the starting, unchanged value to be) + # but does not support forms with subsequent calls to `by`, `by_at_least`, + # `by_at_most` or `to`. + # + # @example + # expect { + # team.add_player(player) + # }.to change(roster, :count) + # + # expect { + # team.add_player(player) + # }.to change(roster, :count).by(1) + # + # expect { + # team.add_player(player) + # }.to change(roster, :count).by_at_least(1) + # + # expect { + # team.add_player(player) + # }.to change(roster, :count).by_at_most(1) + # + # string = "string" + # expect { + # string.reverse! + # }.to change { string }.from("string").to("gnirts") + # + # string = "string" + # expect { + # string + # }.not_to change { string }.from("string") + # + # expect { + # person.happy_birthday + # }.to change(person, :birthday).from(32).to(33) + # + # expect { + # employee.develop_great_new_social_networking_app + # }.to change(employee, :title).from("Mail Clerk").to("CEO") + # + # expect { + # doctor.leave_office + # }.to change(doctor, :sign).from(/is in/).to(/is out/) + # + # user = User.new(:type => "admin") + # expect { + # user.symbolize_type + # }.to change(user, :type).from(String).to(Symbol) + # @param receiver [Object] + # @param message [Symbol] the message to send the receiver + # + # source://rspec-expectations//lib/rspec/matchers.rb#492 + def change(receiver = T.unsafe(nil), message = T.unsafe(nil), &block); end + + # Applied to a proc, specifies that its execution will cause some value to + # change. + # + # You can either pass receiver and message, or a block, + # but not both. + # + # When passing a block, it must use the `{ ... }` format, not + # do/end, as `{ ... }` binds to the `change` method, whereas do/end + # would errantly bind to the `expect(..).to` or `expect(...).not_to` method. + # + # You can chain any of the following off of the end to specify details + # about the change: + # + # * `from` + # * `to` + # + # or any one of: + # + # * `by` + # * `by_at_least` + # * `by_at_most` + # + # == Notes + # + # Evaluates `receiver.message` or `block` before and after it + # evaluates the block passed to `expect`. If the value is the same + # object, its before/after `hash` value is used to see if it has changed. + # Therefore, your object needs to properly implement `hash` to work correctly + # with this matcher. + # + # `expect( ... ).not_to change` supports the form that specifies `from` + # (which specifies what you expect the starting, unchanged value to be) + # but does not support forms with subsequent calls to `by`, `by_at_least`, + # `by_at_most` or `to`. + # + # @example + # expect { + # team.add_player(player) + # }.to change(roster, :count) + # + # expect { + # team.add_player(player) + # }.to change(roster, :count).by(1) + # + # expect { + # team.add_player(player) + # }.to change(roster, :count).by_at_least(1) + # + # expect { + # team.add_player(player) + # }.to change(roster, :count).by_at_most(1) + # + # string = "string" + # expect { + # string.reverse! + # }.to change { string }.from("string").to("gnirts") + # + # string = "string" + # expect { + # string + # }.not_to change { string }.from("string") + # + # expect { + # person.happy_birthday + # }.to change(person, :birthday).from(32).to(33) + # + # expect { + # employee.develop_great_new_social_networking_app + # }.to change(employee, :title).from("Mail Clerk").to("CEO") + # + # expect { + # doctor.leave_office + # }.to change(doctor, :sign).from(/is in/).to(/is out/) + # + # user = User.new(:type => "admin") + # expect { + # user.symbolize_type + # }.to change(user, :type).from(String).to(Symbol) + # @param receiver [Object] + # @param message [Symbol] the message to send the receiver + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def changing(*args, **_arg1, &block); end + + # Passes if actual contains all of the expected regardless of order. + # This works for collections. Pass in multiple args and it will only + # pass if all args are found in collection. + # + # @example + # expect([1, 2, 3]).to contain_exactly(1, 2, 3) + # expect([1, 2, 3]).to contain_exactly(1, 3, 2) + # @note This is also available using the `=~` operator with `should`, + # but `=~` is not supported with `expect`. + # @see #match_array + # + # source://rspec-expectations//lib/rspec/matchers.rb#510 + def contain_exactly(*items); end + + # Passes if actual contains all of the expected regardless of order. + # This works for collections. Pass in multiple args and it will only + # pass if all args are found in collection. + # + # @example + # expect([1, 2, 3]).to contain_exactly(1, 2, 3) + # expect([1, 2, 3]).to contain_exactly(1, 3, 2) + # @note This is also available using the `=~` operator with `should`, + # but `=~` is not supported with `expect`. + # @see #match_array + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def containing_exactly(*args, **_arg1, &block); end + + # Passes if actual covers expected. This works for + # Ranges. You can also pass in multiple args + # and it will only pass if all args are found in Range. + # + # ### Warning:: Ruby >= 1.9 only + # + # @example + # expect(1..10).to cover(5) + # expect(1..10).to cover(4, 6) + # expect(1..10).to cover(4, 6, 11) # fails + # expect(1..10).not_to cover(11) + # expect(1..10).not_to cover(5) # fails + # + # source://rspec-expectations//lib/rspec/matchers.rb#528 + def cover(*values); end + + # Passes if actual covers expected. This works for + # Ranges. You can also pass in multiple args + # and it will only pass if all args are found in Range. + # + # ### Warning:: Ruby >= 1.9 only + # + # @example + # expect(1..10).to cover(5) + # expect(1..10).to cover(4, 6) + # expect(1..10).to cover(4, 6, 11) # fails + # expect(1..10).not_to cover(11) + # expect(1..10).not_to cover(5) # fails + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def covering(*args, **_arg1, &block); end + + # Matches if the actual value ends with the expected value(s). In the case + # of a string, matches against the last `expected.length` characters of the + # actual string. In the case of an array, matches against the last + # `expected.length` elements of the actual array. + # + # @example + # expect("this string").to end_with "string" + # expect([0, 1, 2, 3, 4]).to end_with 4 + # expect([0, 2, 3, 4, 4]).to end_with 3, 4 + # + # source://rspec-expectations//lib/rspec/matchers.rb#543 + def end_with(*expected); end + + # Matches if the actual value ends with the expected value(s). In the case + # of a string, matches against the last `expected.length` characters of the + # actual string. In the case of an array, matches against the last + # `expected.length` elements of the actual array. + # + # @example + # expect("this string").to end_with "string" + # expect([0, 1, 2, 3, 4]).to end_with 4 + # expect([0, 2, 3, 4, 4]).to end_with 3, 4 + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def ending_with(*args, **_arg1, &block); end + + # Passes if actual == expected. + # + # See http://www.ruby-doc.org/core/classes/Object.html#M001057 for more + # information about equality in Ruby. + # + # @example + # expect(5).to eq(5) + # expect(5).not_to eq(3) + # + # source://rspec-expectations//lib/rspec/matchers.rb#558 + def eq(expected); end + + # Passes if actual == expected. + # + # See http://www.ruby-doc.org/core/classes/Object.html#M001057 for more + # information about equality in Ruby. + # + # @example + # expect(5).to eq(5) + # expect(5).not_to eq(3) + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def eq_to(*args, **_arg1, &block); end + + # Passes if `actual.eql?(expected)` + # + # See http://www.ruby-doc.org/core/classes/Object.html#M001057 for more + # information about equality in Ruby. + # + # @example + # expect(5).to eql(5) + # expect(5).not_to eql(3) + # + # source://rspec-expectations//lib/rspec/matchers.rb#572 + def eql(expected); end + + # Passes if `actual.eql?(expected)` + # + # See http://www.ruby-doc.org/core/classes/Object.html#M001057 for more + # information about equality in Ruby. + # + # @example + # expect(5).to eql(5) + # expect(5).not_to eql(3) + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def eql_to(*args, **_arg1, &block); end + + # Passes if actual.equal?(expected) (object identity). + # + # See http://www.ruby-doc.org/core/classes/Object.html#M001057 for more + # information about equality in Ruby. + # + # @example + # expect(5).to equal(5) # Integers are equal + # expect("5").not_to equal("5") # Strings that look the same are not the same object + # + # source://rspec-expectations//lib/rspec/matchers.rb#586 + def equal(expected); end + + # Passes if actual.equal?(expected) (object identity). + # + # See http://www.ruby-doc.org/core/classes/Object.html#M001057 for more + # information about equality in Ruby. + # + # @example + # expect(5).to equal(5) # Integers are equal + # expect("5").not_to equal("5") # Strings that look the same are not the same object + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def equal_to(*args, **_arg1, &block); end + + # Passes if `actual.exist?` or `actual.exists?` + # + # @example + # expect(File).to exist("path/to/file") + # + # source://rspec-expectations//lib/rspec/matchers.rb#596 + def exist(*args); end + + # Passes if `actual.exist?` or `actual.exists?` + # + # @example + # expect(File).to exist("path/to/file") + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def existing(*args, **_arg1, &block); end + + # Supports `expect(actual).to matcher` syntax by wrapping `actual` in an + # `ExpectationTarget`. + # + # @example + # expect(actual).to eq(expected) + # expect(actual).not_to eq(expected) + # @return [Expectations::ExpectationTarget] + # @see Expectations::ExpectationTarget#to + # @see Expectations::ExpectationTarget#not_to + # + # source://rspec-expectations//lib/rspec/expectations/syntax.rb#72 + def expect(value = T.unsafe(nil), &block); end + + # Passes if actual's attribute values match the expected attributes hash. + # This works no matter how you define your attribute readers. + # + # @example + # Person = Struct.new(:name, :age) + # person = Person.new("Bob", 32) + # + # expect(person).to have_attributes(:name => "Bob", :age => 32) + # expect(person).to have_attributes(:name => a_string_starting_with("B"), :age => (a_value > 30) ) + # @example + # expect(person).to have_attributes(:color => "red") + # @note It will fail if actual doesn't respond to any of the expected attributes. + # + # source://rspec-expectations//lib/rspec/matchers.rb#616 + def have_attributes(expected); end + + # Passes if actual's attribute values match the expected attributes hash. + # This works no matter how you define your attribute readers. + # + # @example + # Person = Struct.new(:name, :age) + # person = Person.new("Bob", 32) + # + # expect(person).to have_attributes(:name => "Bob", :age => 32) + # expect(person).to have_attributes(:name => a_string_starting_with("B"), :age => (a_value > 30) ) + # @example + # expect(person).to have_attributes(:color => "red") + # @note It will fail if actual doesn't respond to any of the expected attributes. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def having_attributes(*args, **_arg1, &block); end + + # Passes if actual includes expected. This works for + # collections and Strings. You can also pass in multiple args + # and it will only pass if all args are found in collection. + # + # @example + # expect([1,2,3]).to include(3) + # expect([1,2,3]).to include(2,3) + # expect([1,2,3]).to include(2,3,4) # fails + # expect([1,2,3]).not_to include(4) + # expect("spread").to include("read") + # expect("spread").not_to include("red") + # expect(:a => 1, :b => 2).to include(:a) + # expect(:a => 1, :b => 2).to include(:a, :b) + # expect(:a => 1, :b => 2).to include(:a => 1) + # expect(:a => 1, :b => 2).to include(:b => 2, :a => 1) + # expect(:a => 1, :b => 2).to include(:c) # fails + # expect(:a => 1, :b => 2).not_to include(:a => 2) + # + # source://rspec-expectations//lib/rspec/matchers.rb#639 + def include(*expected); end + + # Passes if actual includes expected. This works for + # collections and Strings. You can also pass in multiple args + # and it will only pass if all args are found in collection. + # + # @example + # expect([1,2,3]).to include(3) + # expect([1,2,3]).to include(2,3) + # expect([1,2,3]).to include(2,3,4) # fails + # expect([1,2,3]).not_to include(4) + # expect("spread").to include("read") + # expect("spread").not_to include("red") + # expect(:a => 1, :b => 2).to include(:a) + # expect(:a => 1, :b => 2).to include(:a, :b) + # expect(:a => 1, :b => 2).to include(:a => 1) + # expect(:a => 1, :b => 2).to include(:b => 2, :a => 1) + # expect(:a => 1, :b => 2).to include(:c) # fails + # expect(:a => 1, :b => 2).not_to include(:a => 2) + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def including(*args, **_arg1, &block); end + + # Given a `Regexp` or `String`, passes if `actual.match(pattern)` + # Given an arbitrary nested data structure (e.g. arrays and hashes), + # matches if `expected === actual` || `actual == expected` for each + # pair of elements. + # + # @example + # expect(email).to match(/^([^\s]+)((?:[-a-z0-9]+\.)+[a-z]{2,})$/i) + # expect(email).to match("@example.com") + # @example + # hash = { + # :a => { + # :b => ["foo", 5], + # :c => { :d => 2.05 } + # } + # } + # + # expect(hash).to match( + # :a => { + # :b => a_collection_containing_exactly( + # a_string_starting_with("f"), + # an_instance_of(Integer) + # ), + # :c => { :d => (a_value < 3) } + # } + # ) + # @note The `match_regex` alias is deprecated and is not recommended for use. + # It was added in 2.12.1 to facilitate its use from within custom + # matchers (due to how the custom matcher DSL was evaluated in 2.x, + # `match` could not be used there), but is no longer needed in 3.x. + # + # source://rspec-expectations//lib/rspec/matchers.rb#697 + def match(expected); end + + # An alternate form of `contain_exactly` that accepts + # the expected contents as a single array arg rather + # than splatted out as individual items. + # + # @example + # expect(results).to contain_exactly(1, 2) + # # is identical to: + # expect(results).to match_array([1, 2]) + # @see #contain_exactly + # + # source://rspec-expectations//lib/rspec/matchers.rb#715 + def match_array(items); end + + # Given a `Regexp` or `String`, passes if `actual.match(pattern)` + # Given an arbitrary nested data structure (e.g. arrays and hashes), + # matches if `expected === actual` || `actual == expected` for each + # pair of elements. + # + # @example + # expect(email).to match(/^([^\s]+)((?:[-a-z0-9]+\.)+[a-z]{2,})$/i) + # expect(email).to match("@example.com") + # @example + # hash = { + # :a => { + # :b => ["foo", 5], + # :c => { :d => 2.05 } + # } + # } + # + # expect(hash).to match( + # :a => { + # :b => a_collection_containing_exactly( + # a_string_starting_with("f"), + # an_instance_of(Integer) + # ), + # :c => { :d => (a_value < 3) } + # } + # ) + # @note The `match_regex` alias is deprecated and is not recommended for use. + # It was added in 2.12.1 to facilitate its use from within custom + # matchers (due to how the custom matcher DSL was evaluated in 2.x, + # `match` could not be used there), but is no longer needed in 3.x. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def match_regex(*args, **_arg1, &block); end + + # Given a `Regexp` or `String`, passes if `actual.match(pattern)` + # Given an arbitrary nested data structure (e.g. arrays and hashes), + # matches if `expected === actual` || `actual == expected` for each + # pair of elements. + # + # @example + # expect(email).to match(/^([^\s]+)((?:[-a-z0-9]+\.)+[a-z]{2,})$/i) + # expect(email).to match("@example.com") + # @example + # hash = { + # :a => { + # :b => ["foo", 5], + # :c => { :d => 2.05 } + # } + # } + # + # expect(hash).to match( + # :a => { + # :b => a_collection_containing_exactly( + # a_string_starting_with("f"), + # an_instance_of(Integer) + # ), + # :c => { :d => (a_value < 3) } + # } + # ) + # @note The `match_regex` alias is deprecated and is not recommended for use. + # It was added in 2.12.1 to facilitate its use from within custom + # matchers (due to how the custom matcher DSL was evaluated in 2.x, + # `match` could not be used there), but is no longer needed in 3.x. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def matching(*args, **_arg1, &block); end + + # With no arg, passes if the block outputs `to_stdout` or `to_stderr`. + # With a string, passes if the block outputs that specific string `to_stdout` or `to_stderr`. + # With a regexp or matcher, passes if the block outputs a string `to_stdout` or `to_stderr` that matches. + # + # To capture output from any spawned subprocess as well, use `to_stdout_from_any_process` or + # `to_stderr_from_any_process`. Output from any process that inherits the main process's corresponding + # standard stream will be captured. + # + # @example + # expect { print 'foo' }.to output.to_stdout + # expect { print 'foo' }.to output('foo').to_stdout + # expect { print 'foo' }.to output(/foo/).to_stdout + # + # expect { do_something }.to_not output.to_stdout + # + # expect { warn('foo') }.to output.to_stderr + # expect { warn('foo') }.to output('foo').to_stderr + # expect { warn('foo') }.to output(/foo/).to_stderr + # + # expect { do_something }.to_not output.to_stderr + # + # expect { system('echo foo') }.to output("foo\n").to_stdout_from_any_process + # expect { system('echo foo', out: :err) }.to output("foo\n").to_stderr_from_any_process + # @note `to_stdout` and `to_stderr` work by temporarily replacing `$stdout` or `$stderr`, + # so they're not able to intercept stream output that explicitly uses `STDOUT`/`STDERR` + # or that uses a reference to `$stdout`/`$stderr` that was stored before the + # matcher was used. + # @note `to_stdout_from_any_process` and `to_stderr_from_any_process` use Tempfiles, and + # are thus significantly (~30x) slower than `to_stdout` and `to_stderr`. + # + # source://rspec-expectations//lib/rspec/matchers.rb#752 + def output(expected = T.unsafe(nil)); end + + # With no args, matches if any error is raised. + # With a named error, matches only if that specific error is raised. + # With a named error and message specified as a String, matches only if both match. + # With a named error and message specified as a Regexp, matches only if both match. + # Pass an optional block to perform extra verifications on the exception matched + # + # @example + # expect { do_something_risky }.to raise_error + # expect { do_something_risky }.to raise_error(PoorRiskDecisionError) + # expect { do_something_risky }.to raise_error(PoorRiskDecisionError) { |error| expect(error.data).to eq 42 } + # expect { do_something_risky }.to raise_error { |error| expect(error.data).to eq 42 } + # expect { do_something_risky }.to raise_error(PoorRiskDecisionError, "that was too risky") + # expect { do_something_risky }.to raise_error(PoorRiskDecisionError, /oo ri/) + # expect { do_something_risky }.to raise_error("that was too risky") + # + # expect { do_something_risky }.not_to raise_error + # + # source://rspec-expectations//lib/rspec/matchers.rb#773 + def raise_error(error = T.unsafe(nil), message = T.unsafe(nil), &block); end + + # With no args, matches if any error is raised. + # With a named error, matches only if that specific error is raised. + # With a named error and message specified as a String, matches only if both match. + # With a named error and message specified as a Regexp, matches only if both match. + # Pass an optional block to perform extra verifications on the exception matched + # + # @example + # expect { do_something_risky }.to raise_error + # expect { do_something_risky }.to raise_error(PoorRiskDecisionError) + # expect { do_something_risky }.to raise_error(PoorRiskDecisionError) { |error| expect(error.data).to eq 42 } + # expect { do_something_risky }.to raise_error { |error| expect(error.data).to eq 42 } + # expect { do_something_risky }.to raise_error(PoorRiskDecisionError, "that was too risky") + # expect { do_something_risky }.to raise_error(PoorRiskDecisionError, /oo ri/) + # expect { do_something_risky }.to raise_error("that was too risky") + # + # expect { do_something_risky }.not_to raise_error + # + # source://rspec-expectations//lib/rspec/matchers.rb#773 + def raise_exception(error = T.unsafe(nil), message = T.unsafe(nil), &block); end + + # With no args, matches if any error is raised. + # With a named error, matches only if that specific error is raised. + # With a named error and message specified as a String, matches only if both match. + # With a named error and message specified as a Regexp, matches only if both match. + # Pass an optional block to perform extra verifications on the exception matched + # + # @example + # expect { do_something_risky }.to raise_error + # expect { do_something_risky }.to raise_error(PoorRiskDecisionError) + # expect { do_something_risky }.to raise_error(PoorRiskDecisionError) { |error| expect(error.data).to eq 42 } + # expect { do_something_risky }.to raise_error { |error| expect(error.data).to eq 42 } + # expect { do_something_risky }.to raise_error(PoorRiskDecisionError, "that was too risky") + # expect { do_something_risky }.to raise_error(PoorRiskDecisionError, /oo ri/) + # expect { do_something_risky }.to raise_error("that was too risky") + # + # expect { do_something_risky }.not_to raise_error + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def raising(*args, **_arg1, &block); end + + # Matches if the target object responds to all of the names + # provided. Names can be Strings or Symbols. + # + # @example + # expect("string").to respond_to(:length) + # + # source://rspec-expectations//lib/rspec/matchers.rb#792 + def respond_to(*names); end + + # Matches if the target object responds to all of the names + # provided. Names can be Strings or Symbols. + # + # @example + # expect("string").to respond_to(:length) + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def responding_to(*args, **_arg1, &block); end + + # Passes if the submitted block returns true. Yields target to the + # block. + # + # Generally speaking, this should be thought of as a last resort when + # you can't find any other way to specify the behaviour you wish to + # specify. + # + # If you do find yourself in such a situation, you could always write + # a custom matcher, which would likely make your specs more expressive. + # + # @example + # expect(5).to satisfy { |n| n > 3 } + # expect(5).to satisfy("be greater than 3") { |n| n > 3 } + # @param description [String] optional description to be used for this matcher. + # + # source://rspec-expectations//lib/rspec/matchers.rb#813 + def satisfy(description = T.unsafe(nil), &block); end + + # Passes if the submitted block returns true. Yields target to the + # block. + # + # Generally speaking, this should be thought of as a last resort when + # you can't find any other way to specify the behaviour you wish to + # specify. + # + # If you do find yourself in such a situation, you could always write + # a custom matcher, which would likely make your specs more expressive. + # + # @example + # expect(5).to satisfy { |n| n > 3 } + # expect(5).to satisfy("be greater than 3") { |n| n > 3 } + # @param description [String] optional description to be used for this matcher. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def satisfying(*args, **_arg1, &block); end + + # Matches if the actual value starts with the expected value(s). In the + # case of a string, matches against the first `expected.length` characters + # of the actual string. In the case of an array, matches against the first + # `expected.length` elements of the actual array. + # + # @example + # expect("this string").to start_with "this s" + # expect([0, 1, 2, 3, 4]).to start_with 0 + # expect([0, 2, 3, 4, 4]).to start_with 0, 1 + # + # source://rspec-expectations//lib/rspec/matchers.rb#828 + def start_with(*expected); end + + # Matches if the actual value starts with the expected value(s). In the + # case of a string, matches against the first `expected.length` characters + # of the actual string. In the case of an array, matches against the first + # `expected.length` elements of the actual array. + # + # @example + # expect("this string").to start_with "this s" + # expect([0, 1, 2, 3, 4]).to start_with 0 + # expect([0, 2, 3, 4, 4]).to start_with 0, 1 + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def starting_with(*args, **_arg1, &block); end + + # Given no argument, matches if a proc throws any Symbol. + # + # Given a Symbol, matches if the given proc throws the specified Symbol. + # + # Given a Symbol and an arg, matches if the given proc throws the + # specified Symbol with the specified arg. + # + # @example + # expect { do_something_risky }.to throw_symbol + # expect { do_something_risky }.to throw_symbol(:that_was_risky) + # expect { do_something_risky }.to throw_symbol(:that_was_risky, 'culprit') + # + # expect { do_something_risky }.not_to throw_symbol + # expect { do_something_risky }.not_to throw_symbol(:that_was_risky) + # expect { do_something_risky }.not_to throw_symbol(:that_was_risky, 'culprit') + # + # source://rspec-expectations//lib/rspec/matchers.rb#850 + def throw_symbol(expected_symbol = T.unsafe(nil), expected_arg = T.unsafe(nil)); end + + # Given no argument, matches if a proc throws any Symbol. + # + # Given a Symbol, matches if the given proc throws the specified Symbol. + # + # Given a Symbol and an arg, matches if the given proc throws the + # specified Symbol with the specified arg. + # + # @example + # expect { do_something_risky }.to throw_symbol + # expect { do_something_risky }.to throw_symbol(:that_was_risky) + # expect { do_something_risky }.to throw_symbol(:that_was_risky, 'culprit') + # + # expect { do_something_risky }.not_to throw_symbol + # expect { do_something_risky }.not_to throw_symbol(:that_was_risky) + # expect { do_something_risky }.not_to throw_symbol(:that_was_risky, 'culprit') + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def throwing(*args, **_arg1, &block); end + + # Passes if actual == expected +/- delta + # + # @example + # expect(result).to be_within(0.5).of(3.0) + # expect(result).not_to be_within(0.5).of(3.0) + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def within(*args, **_arg1, &block); end + + # Passes if the method called in the expect block yields, regardless + # of whether or not arguments are yielded. + # + # @example + # expect { |b| 5.tap(&b) }.to yield_control + # expect { |b| "a".to_sym(&b) }.not_to yield_control + # @note Your expect block must accept a parameter and pass it on to + # the method-under-test as a block. + # + # source://rspec-expectations//lib/rspec/matchers.rb#871 + def yield_control; end + + # Designed for use with methods that repeatedly yield (such as + # iterators). Passes if the method called in the expect block yields + # multiple times with arguments matching those given. + # + # Argument matching is done using `===` (the case match operator) + # and `==`. If the expected and actual arguments match with either + # operator, the matcher will pass. + # + # @example + # expect { |b| [1, 2, 3].each(&b) }.to yield_successive_args(1, 2, 3) + # expect { |b| { :a => 1, :b => 2 }.each(&b) }.to yield_successive_args([:a, 1], [:b, 2]) + # expect { |b| [1, 2, 3].each(&b) }.not_to yield_successive_args(1, 2) + # @note Your expect block must accept a parameter and pass it on to + # the method-under-test as a block. + # + # source://rspec-expectations//lib/rspec/matchers.rb#940 + def yield_successive_args(*args); end + + # Given no arguments, matches if the method called in the expect + # block yields with arguments (regardless of what they are or how + # many there are). + # + # Given arguments, matches if the method called in the expect block + # yields with arguments that match the given arguments. + # + # Argument matching is done using `===` (the case match operator) + # and `==`. If the expected and actual arguments match with either + # operator, the matcher will pass. + # + # @example + # expect { |b| 5.tap(&b) }.to yield_with_args # because #tap yields an arg + # expect { |b| 5.tap(&b) }.to yield_with_args(5) # because 5 == 5 + # expect { |b| 5.tap(&b) }.to yield_with_args(Integer) # because Integer === 5 + # expect { |b| File.open("f.txt", &b) }.to yield_with_args(/txt/) # because /txt/ === "f.txt" + # + # expect { |b| User.transaction(&b) }.not_to yield_with_args # because it yields no args + # expect { |b| 5.tap(&b) }.not_to yield_with_args(1, 2, 3) + # @note Your expect block must accept a parameter and pass it on to + # the method-under-test as a block. + # @note This matcher is not designed for use with methods that yield + # multiple times. + # + # source://rspec-expectations//lib/rspec/matchers.rb#919 + def yield_with_args(*args); end + + # Passes if the method called in the expect block yields with + # no arguments. Fails if it does not yield, or yields with arguments. + # + # @example + # expect { |b| User.transaction(&b) }.to yield_with_no_args + # expect { |b| 5.tap(&b) }.not_to yield_with_no_args # because it yields with `5` + # expect { |b| "a".to_sym(&b) }.not_to yield_with_no_args # because it does not yield + # @note Your expect block must accept a parameter and pass it on to + # the method-under-test as a block. + # @note This matcher is not designed for use with methods that yield + # multiple times. + # + # source://rspec-expectations//lib/rspec/matchers.rb#889 + def yield_with_no_args; end + + # Passes if the method called in the expect block yields, regardless + # of whether or not arguments are yielded. + # + # @example + # expect { |b| 5.tap(&b) }.to yield_control + # expect { |b| "a".to_sym(&b) }.not_to yield_control + # @note Your expect block must accept a parameter and pass it on to + # the method-under-test as a block. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def yielding_control(*args, **_arg1, &block); end + + # Designed for use with methods that repeatedly yield (such as + # iterators). Passes if the method called in the expect block yields + # multiple times with arguments matching those given. + # + # Argument matching is done using `===` (the case match operator) + # and `==`. If the expected and actual arguments match with either + # operator, the matcher will pass. + # + # @example + # expect { |b| [1, 2, 3].each(&b) }.to yield_successive_args(1, 2, 3) + # expect { |b| { :a => 1, :b => 2 }.each(&b) }.to yield_successive_args([:a, 1], [:b, 2]) + # expect { |b| [1, 2, 3].each(&b) }.not_to yield_successive_args(1, 2) + # @note Your expect block must accept a parameter and pass it on to + # the method-under-test as a block. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def yielding_successive_args(*args, **_arg1, &block); end + + # Given no arguments, matches if the method called in the expect + # block yields with arguments (regardless of what they are or how + # many there are). + # + # Given arguments, matches if the method called in the expect block + # yields with arguments that match the given arguments. + # + # Argument matching is done using `===` (the case match operator) + # and `==`. If the expected and actual arguments match with either + # operator, the matcher will pass. + # + # @example + # expect { |b| 5.tap(&b) }.to yield_with_args # because #tap yields an arg + # expect { |b| 5.tap(&b) }.to yield_with_args(5) # because 5 == 5 + # expect { |b| 5.tap(&b) }.to yield_with_args(Integer) # because Integer === 5 + # expect { |b| File.open("f.txt", &b) }.to yield_with_args(/txt/) # because /txt/ === "f.txt" + # + # expect { |b| User.transaction(&b) }.not_to yield_with_args # because it yields no args + # expect { |b| 5.tap(&b) }.not_to yield_with_args(1, 2, 3) + # @note Your expect block must accept a parameter and pass it on to + # the method-under-test as a block. + # @note This matcher is not designed for use with methods that yield + # multiple times. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def yielding_with_args(*args, **_arg1, &block); end + + # Passes if the method called in the expect block yields with + # no arguments. Fails if it does not yield, or yields with arguments. + # + # @example + # expect { |b| User.transaction(&b) }.to yield_with_no_args + # expect { |b| 5.tap(&b) }.not_to yield_with_no_args # because it yields with `5` + # expect { |b| "a".to_sym(&b) }.not_to yield_with_no_args # because it does not yield + # @note Your expect block must accept a parameter and pass it on to + # the method-under-test as a block. + # @note This matcher is not designed for use with methods that yield + # multiple times. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 + def yielding_with_no_args(*args, **_arg1, &block); end + + private + + # source://rspec-expectations//lib/rspec/matchers.rb#961 + def method_missing(method, *args, **_arg2, &block); end + + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers.rb#974 + def respond_to_missing?(method, *_arg1); end + + class << self + # Extended from {RSpec::Matchers::DSL#alias_matcher}. + # + # source://rspec-expectations//lib/rspec/matchers.rb#250 + def alias_matcher(*args, &block); end + + # Used by rspec-core to clear the state used to generate + # descriptions after an example. + # + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/generated_descriptions.rb#11 + def clear_generated_description; end + + # Delegates to {RSpec::Expectations.configuration}. + # This is here because rspec-core's `expect_with` option + # looks for a `configuration` method on the mixin + # (`RSpec::Matchers`) to yield to a block. + # + # @return [RSpec::Expectations::Configuration] the configuration object + # + # source://rspec-expectations//lib/rspec/matchers.rb#951 + def configuration; end + + # Generates an an example description based on the last expectation. + # Used by rspec-core's one-liner syntax. + # + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/generated_descriptions.rb#19 + def generated_description; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers.rb#1008 + def is_a_describable_matcher?(obj); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers.rb#988 + def is_a_matcher?(obj); end + + # @private + # + # source://rspec-expectations//lib/rspec/matchers/generated_descriptions.rb#25 + def last_description; end + + # @private + # + # source://rspec-expectations//lib/rspec/matchers/generated_descriptions.rb#5 + def last_expectation_handler; end + + # @private + # + # source://rspec-expectations//lib/rspec/matchers/generated_descriptions.rb#5 + def last_expectation_handler=(_arg0); end + + # @private + # + # source://rspec-expectations//lib/rspec/matchers/generated_descriptions.rb#5 + def last_matcher; end + + # @private + # + # source://rspec-expectations//lib/rspec/matchers/generated_descriptions.rb#5 + def last_matcher=(_arg0); end + end +end + +# Decorator that wraps a matcher and overrides `description` +# using the provided block in order to support an alias +# of a matcher. This is intended for use when composing +# matchers, so that you can use an expression like +# `include( a_value_within(0.1).of(3) )` rather than +# `include( be_within(0.1).of(3) )`, and have the corresponding +# description read naturally. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/aliased_matcher.rb#12 +class RSpec::Matchers::AliasedMatcher < ::RSpec::Matchers::MatcherDelegator + # @api private + # @return [AliasedMatcher] a new instance of AliasedMatcher + # + # source://rspec-expectations//lib/rspec/matchers/aliased_matcher.rb#13 + def initialize(base_matcher, description_block); end + + # Provides the description of the aliased matcher. Aliased matchers + # are designed to behave identically to the original matcher except + # for the description and failure messages. The description is different + # to reflect the aliased name. + # + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/aliased_matcher.rb#36 + def description; end + + # Provides the failure_message of the aliased matcher. Aliased matchers + # are designed to behave identically to the original matcher except + # for the description and failure messages. The failure_message is different + # to reflect the aliased name. + # + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/aliased_matcher.rb#46 + def failure_message; end + + # Provides the failure_message_when_negated of the aliased matcher. Aliased matchers + # are designed to behave identically to the original matcher except + # for the description and failure messages. The failure_message_when_negated is different + # to reflect the aliased name. + # + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/aliased_matcher.rb#56 + def failure_message_when_negated; end + + # Forward messages on to the wrapped matcher. + # Since many matchers provide a fluent interface + # (e.g. `a_value_within(0.1).of(3)`), we need to wrap + # the returned value if it responds to `description`, + # so that our override can be applied when it is eventually + # used. + # + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/aliased_matcher.rb#24 + def method_missing(*_arg0); end +end + +# Decorator used for matchers that have special implementations of +# operators like `==` and `===`. +# +# @private +# +# source://rspec-expectations//lib/rspec/matchers/aliased_matcher.rb#65 +class RSpec::Matchers::AliasedMatcherWithOperatorSupport < ::RSpec::Matchers::AliasedMatcher; end + +# @private +# +# source://rspec-expectations//lib/rspec/matchers/aliased_matcher.rb#71 +class RSpec::Matchers::AliasedNegatedMatcher < ::RSpec::Matchers::AliasedMatcher + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/aliased_matcher.rb#80 + def does_not_match?(*args, &block); end + + # source://rspec-expectations//lib/rspec/matchers/aliased_matcher.rb#84 + def failure_message; end + + # source://rspec-expectations//lib/rspec/matchers/aliased_matcher.rb#88 + def failure_message_when_negated; end + + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/aliased_matcher.rb#72 + def matches?(*args, &block); end + + private + + # For a matcher that uses the default failure messages, we prefer to + # use the override provided by the `description_block`, because it + # includes the phrasing that the user has expressed a preference for + # by going through the effort of defining a negated matcher. + # + # However, if the override didn't actually change anything, then we + # should return the opposite failure message instead -- the overridden + # message is going to be confusing if we return it as-is, as it represents + # the non-negated failure message for a negated match (or vice versa). + # + # source://rspec-expectations//lib/rspec/matchers/aliased_matcher.rb#105 + def optimal_failure_message(same, inverted); end +end + +# source://rspec-expectations//lib/rspec/matchers/aliased_matcher.rb#94 +RSpec::Matchers::AliasedNegatedMatcher::DefaultFailureMessages = RSpec::Matchers::BuiltIn::BaseMatcher::DefaultFailureMessages + +# source://rspec-expectations//lib/rspec/matchers.rb#957 +RSpec::Matchers::BE_PREDICATE_REGEX = T.let(T.unsafe(nil), Regexp) + +# Container module for all built-in matchers. The matcher classes are here +# (rather than directly under `RSpec::Matchers`) in order to prevent name +# collisions, since `RSpec::Matchers` gets included into the user's namespace. +# +# Autoloading is used to delay when the matcher classes get loaded, allowing +# rspec-matchers to boot faster, and avoiding loading matchers the user is +# not using. +# +# source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#3 +module RSpec::Matchers::BuiltIn; end + +# Provides the implementation for `all`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/all.rb#8 +class RSpec::Matchers::BuiltIn::All < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [All] a new instance of All + # + # source://rspec-expectations//lib/rspec/matchers/built_in/all.rb#11 + def initialize(matcher); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/all.rb#37 + def description; end + + # @api private + # @private + # @raise [NotImplementedError] + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/all.rb#17 + def does_not_match?(_actual); end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/all.rb#9 + def failed_objects; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/all.rb#23 + def failure_message; end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/all.rb#9 + def matcher; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/all.rb#63 + def add_new_line_if_needed(message); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/all.rb#58 + def failure_message_for_item(index, failure_message); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/all.rb#67 + def indent_multiline_message(message); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/all.rb#50 + def index_failed_objects; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/all.rb#74 + def initialize_copy(other); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/all.rb#80 + def iterable?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/all.rb#43 + def match(_expected, _actual); end +end + +# Used _internally_ as a base class for matchers that ship with +# rspec-expectations and rspec-rails. +# +# ### Warning: +# +# This class is for internal use, and subject to change without notice. +# We strongly recommend that you do not base your custom matchers on this +# class. If/when this changes, we will announce it and remove this warning. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#14 +class RSpec::Matchers::BuiltIn::BaseMatcher + include ::RSpec::Matchers::Composable + include ::RSpec::Matchers::BuiltIn::BaseMatcher::HashFormatting + include ::RSpec::Matchers::BuiltIn::BaseMatcher::DefaultFailureMessages + + # @api private + # @return [BaseMatcher] a new instance of BaseMatcher + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#28 + def initialize(expected = T.unsafe(nil)); end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#23 + def actual; end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#97 + def actual_formatted; end + + # Generates a description using {EnglishPhrasing}. + # + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#60 + def description; end + + # Matchers are not diffable by default. Override this to make your + # subclass diffable. + # + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#69 + def diffable?; end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#23 + def expected; end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#92 + def expected_formatted; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#87 + def expects_call_stack_jump?; end + + # Used to wrap a block of code that will indicate failure by + # raising one of the named exceptions. + # + # This is used by rspec-rails for some of its matchers that + # wrap rails' assertions. + # + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#47 + def match_unless_raises(*exceptions); end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#107 + def matcher_name; end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#26 + def matcher_name=(_arg0); end + + # Indicates if the match is successful. Delegates to `match`, which + # should be defined on a subclass. Takes care of consistently + # initializing the `actual` attribute. + # + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#36 + def matches?(actual); end + + # :nocov: + # + # @api private + def present_ivars; end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#23 + def rescued_exception; end + + # Most matchers are value matchers (i.e. meant to work with `expect(value)`) + # rather than block matchers (i.e. meant to work with `expect { }`), so + # this defaults to false. Block matchers must override this to return true. + # + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#77 + def supports_block_expectations?; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#82 + def supports_value_expectations?; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#129 + def assert_ivars(*expected_ivars); end + + class << self + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#102 + def matcher_name; end + + private + + # Borrowed from ActiveSupport. + # + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#117 + def underscore(camel_cased_word); end + end +end + +# Provides default implementations of failure messages, based on the `description`. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#166 +module RSpec::Matchers::BuiltIn::BaseMatcher::DefaultFailureMessages + # Provides a good generic failure message. Based on `description`. + # When subclassing, if you are not satisfied with this failure message + # you often only need to override `description`. + # + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#172 + def failure_message; end + + # Provides a good generic negative failure message. Based on `description`. + # When subclassing, if you are not satisfied with this failure message + # you often only need to override `description`. + # + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#181 + def failure_message_when_negated; end + + class << self + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#186 + def has_default_failure_messages?(matcher); end + end +end + +# @api private +# @private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#146 +module RSpec::Matchers::BuiltIn::BaseMatcher::HashFormatting + private + + # `{ :a => 5, :b => 2 }.inspect` produces: + # + # {:a=>5, :b=>2} + # + # ...but it looks much better as: + # + # {:a => 5, :b => 2} + # + # This is idempotent and safe to run on a string multiple times. + # + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#156 + def improve_hash_formatting(inspect_string); end + + class << self + # `{ :a => 5, :b => 2 }.inspect` produces: + # + # {:a=>5, :b=>2} + # + # ...but it looks much better as: + # + # {:a => 5, :b => 2} + # + # This is idempotent and safe to run on a string multiple times. + # + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#156 + def improve_hash_formatting(inspect_string); end + end +end + +# Used to detect when no arg is passed to `initialize`. +# `nil` cannot be used because it's a valid value to pass. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#20 +RSpec::Matchers::BuiltIn::BaseMatcher::UNDEFINED = T.let(T.unsafe(nil), Object) + +# Provides the implementation for `be`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#101 +class RSpec::Matchers::BuiltIn::Be < ::RSpec::Matchers::BuiltIn::BaseMatcher + include ::RSpec::Matchers::BuiltIn::BeHelpers + + # @api private + # @return [Be] a new instance of Be + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#104 + def initialize(*args); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#121 + def <(operand); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#121 + def <=(operand); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#121 + def ==(operand); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#121 + def ===(operand); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#121 + def =~(operand); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#121 + def >(operand); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#121 + def >=(operand); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#110 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#116 + def failure_message_when_negated; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#128 + def match(_, actual); end +end + +# Provides the implementation for `be_a_kind_of`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/be_kind_of.rb#7 +class RSpec::Matchers::BuiltIn::BeAKindOf < ::RSpec::Matchers::BuiltIn::BaseMatcher + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_kind_of.rb#10 + def match(expected, actual); end +end + +# Provides the implementation for `be_an_instance_of`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/be_instance_of.rb#9 +class RSpec::Matchers::BuiltIn::BeAnInstanceOf < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_instance_of.rb#10 + def description; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_instance_of.rb#16 + def match(expected, actual); end +end + +# Provides the implementation for `be_between`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/be_between.rb#7 +class RSpec::Matchers::BuiltIn::BeBetween < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [BeBetween] a new instance of BeBetween + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_between.rb#8 + def initialize(min, max); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_between.rb#57 + def description; end + + # Makes the between comparison exclusive. + # + # @api public + # @example + # expect(3).to be_between(2, 4).exclusive + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_between.rb#33 + def exclusive; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_between.rb#51 + def failure_message; end + + # Makes the between comparison inclusive. + # + # @api public + # @example + # expect(3).to be_between(2, 3).inclusive + # @note The matcher is inclusive by default; this simply provides + # a way to be more explicit about it. + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_between.rb#21 + def inclusive; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_between.rb#42 + def matches?(actual); end + + private + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_between.rb#63 + def comparable?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_between.rb#71 + def compare; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_between.rb#67 + def not_comparable_clause; end +end + +# Provides the implementation of `be value`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#136 +class RSpec::Matchers::BuiltIn::BeComparedTo < ::RSpec::Matchers::BuiltIn::BaseMatcher + include ::RSpec::Matchers::BuiltIn::BeHelpers + + # @api private + # @return [BeComparedTo] a new instance of BeComparedTo + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#139 + def initialize(operand, operator); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#178 + def description; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#151 + def does_not_match?(actual); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#159 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#166 + def failure_message_when_negated; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#145 + def matches?(actual); end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#184 + def perform_match(actual); end +end + +# Provides the implementation for `be_falsey`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#32 +class RSpec::Matchers::BuiltIn::BeFalsey < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#33 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#39 + def failure_message_when_negated; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#45 + def match(_, actual); end +end + +# @private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#74 +module RSpec::Matchers::BuiltIn::BeHelpers + private + + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#77 + def args_to_s; end + + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#93 + def args_to_sentence; end + + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#89 + def expected_to_sentence; end + + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#85 + def inspected_args; end + + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#81 + def parenthesize(string); end +end + +# Provides the implementation for `be_nil`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#55 +class RSpec::Matchers::BuiltIn::BeNil < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#56 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#62 + def failure_message_when_negated; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#68 + def match(_, actual); end +end + +# Provides the implementation of `be_`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#138 +class RSpec::Matchers::BuiltIn::BePredicate < ::RSpec::Matchers::BuiltIn::DynamicPredicate + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#149 + def failure_to_respond_explanation; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#141 + def predicate; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#157 + def predicate_accessible?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#145 + def predicate_method_name; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#161 + def present_tense_predicate; end +end + +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#139 +RSpec::Matchers::BuiltIn::BePredicate::REGEX = T.let(T.unsafe(nil), Regexp) + +# Provides the implementation for `be_truthy`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#9 +class RSpec::Matchers::BuiltIn::BeTruthy < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#10 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#16 + def failure_message_when_negated; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#22 + def match(_, actual); end +end + +# Provides the implementation for `be_within`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/be_within.rb#7 +class RSpec::Matchers::BuiltIn::BeWithin < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [BeWithin] a new instance of BeWithin + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_within.rb#8 + def initialize(delta); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_within.rb#52 + def description; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_within.rb#40 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_within.rb#46 + def failure_message_when_negated; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_within.rb#32 + def matches?(actual); end + + # Sets the expected value. + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_within.rb#14 + def of(expected); end + + # Sets the expected value, and makes the matcher do + # a percent comparison. + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_within.rb#24 + def percent_of(expected); end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_within.rb#62 + def needs_expected; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_within.rb#66 + def not_numeric_clause; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/be_within.rb#58 + def numeric?; end +end + +# @private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#159 +module RSpec::Matchers::BuiltIn::CaptureStderr + class << self + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#164 + def capture(block); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#160 + def name; end + end +end + +# @private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#139 +module RSpec::Matchers::BuiltIn::CaptureStdout + class << self + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#144 + def capture(block); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#140 + def name; end + end +end + +# @private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#179 +class RSpec::Matchers::BuiltIn::CaptureStreamToTempfile < ::Struct + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#180 + def capture(block); end +end + +# Provides the implementation for `change`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#9 +class RSpec::Matchers::BuiltIn::Change < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [Change] a new instance of Change + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#87 + def initialize(receiver = T.unsafe(nil), message = T.unsafe(nil), &block); end + + # Specifies the delta of the expected change. + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#10 + def by(expected_delta); end + + # Specifies a minimum delta of the expected change. + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#18 + def by_at_least(minimum); end + + # Specifies a maximum delta of the expected change. + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#26 + def by_at_most(maximum); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#71 + def description; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#50 + def does_not_match?(event_proc); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#57 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#64 + def failure_message_when_negated; end + + # Specifies the original value. + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#40 + def from(value); end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#45 + def matches?(event_proc); end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#76 + def supports_block_expectations?; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#81 + def supports_value_expectations?; end + + # Specifies the new value you expect. + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#34 + def to(value); end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#93 + def change_details; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#119 + def negative_failure_reason; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#97 + def perform_change(event_proc); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#114 + def positive_failure_reason; end + + # @api private + # @raise [SyntaxError] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#109 + def raise_block_syntax_error; end +end + +# Encapsulates the details of the before/after values. +# +# Note that this class exposes the `actual_after` value, to allow the +# matchers above to derive failure messages, etc from the value on demand +# as needed, but it intentionally does _not_ expose the `actual_before` +# value. Some usages of the `change` matcher mutate a specific object +# returned by the value proc, which means that failure message snippets, +# etc, which are derived from the `before` value may not be accurate if +# they are lazily computed as needed. We must pre-compute them before +# applying the change in the `expect` block. To ensure that all `change` +# matchers do that properly, we do not expose the `actual_before` value. +# Instead, matchers must pass a block to `perform_change`, which yields +# the `actual_before` value before applying the change. +# +# @private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#352 +class RSpec::Matchers::BuiltIn::ChangeDetails + # @return [ChangeDetails] a new instance of ChangeDetails + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#357 + def initialize(matcher_name, receiver = T.unsafe(nil), message = T.unsafe(nil), &block); end + + # Returns the value of attribute actual_after. + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#353 + def actual_after; end + + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#418 + def actual_delta; end + + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#402 + def changed?; end + + # @yield [@actual_before] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#389 + def perform_change(event_proc); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#378 + def value_representation; end + + private + + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#424 + def evaluate_value_proc; end + + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#438 + def extract_value_block_snippet; end + + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#428 + def message_notation(receiver, message); end +end + +# source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#355 +module RSpec::Matchers::BuiltIn::ChangeDetails::UNDEFINED; end + +# Used to specify a change from a specific value +# (and, optionally, to a specific value). +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#270 +class RSpec::Matchers::BuiltIn::ChangeFromValue < ::RSpec::Matchers::BuiltIn::SpecificValuesChange + # @api private + # @return [ChangeFromValue] a new instance of ChangeFromValue + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#271 + def initialize(change_details, expected_before); end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#285 + def does_not_match?(event_proc); end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#295 + def failure_message_when_negated; end + + # Specifies the new value you expect. + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#278 + def to(value); end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#303 + def change_description; end +end + +# Used to specify a relative change. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#128 +class RSpec::Matchers::BuiltIn::ChangeRelatively < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [ChangeRelatively] a new instance of ChangeRelatively + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#129 + def initialize(change_details, expected_delta, relativity, &comparer); end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#156 + def description; end + + # @api private + # @private + # @raise [NotImplementedError] + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#150 + def does_not_match?(_event_proc); end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#137 + def failure_message; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#144 + def matches?(event_proc); end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#162 + def supports_block_expectations?; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#167 + def supports_value_expectations?; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#173 + def failure_reason; end +end + +# Used to specify a change to a specific value +# (and, optionally, from a specific value). +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#311 +class RSpec::Matchers::BuiltIn::ChangeToValue < ::RSpec::Matchers::BuiltIn::SpecificValuesChange + # @api private + # @return [ChangeToValue] a new instance of ChangeToValue + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#312 + def initialize(change_details, expected_after); end + + # @api private + # @private + # @raise [NotImplementedError] + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#326 + def does_not_match?(_event_proc); end + + # Specifies the original value. + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#319 + def from(value); end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#333 + def change_description; end +end + +# Base class for `and` and `or` compound matchers. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#7 +class RSpec::Matchers::BuiltIn::Compound < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [Compound] a new instance of Compound + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#10 + def initialize(matcher_1, matcher_2); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#25 + def description; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#49 + def diffable?; end + + # @api private + # @private + # @raise [NotImplementedError] + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#16 + def does_not_match?(_actual); end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#8 + def evaluator; end + + # @api private + # @return [RSpec::Matchers::ExpectedsForMultipleDiffs] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#55 + def expected; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#42 + def expects_call_stack_jump?; end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#8 + def matcher_1; end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#8 + def matcher_2; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#30 + def supports_block_expectations?; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#36 + def supports_value_expectations?; end + + protected + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#62 + def diffable_matcher_list; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#93 + def compound_failure_message; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#125 + def diffable_matcher_list_for(matcher); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#87 + def indent_multiline_message(message); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#71 + def initialize_copy(other); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#77 + def match(_expected, actual); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#99 + def matcher_1_matches?; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#103 + def matcher_2_matches?; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#119 + def matcher_is_diffable?(matcher); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#107 + def matcher_supports_block_expectations?(matcher); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#113 + def matcher_supports_value_expectations?(matcher); end +end + +# Matcher used to represent a compound `and` expectation. +# +# @api public +# +# source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#244 +class RSpec::Matchers::BuiltIn::Compound::And < ::RSpec::Matchers::BuiltIn::Compound + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#245 + def failure_message; end + + private + + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#262 + def conjunction; end + + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#257 + def match(*_arg0); end +end + +# Normally, we evaluate the matching sequentially. For an expression like +# `expect(x).to foo.and bar`, this becomes: +# +# expect(x).to foo +# expect(x).to bar +# +# For block expectations, we need to nest them instead, so that +# `expect { x }.to foo.and bar` becomes: +# +# expect { +# expect { x }.to foo +# }.to bar +# +# This is necessary so that the `expect` block is only executed once. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#156 +class RSpec::Matchers::BuiltIn::Compound::NestedEvaluator + # @api private + # @return [NestedEvaluator] a new instance of NestedEvaluator + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#157 + def initialize(actual, matcher_1, matcher_2); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#170 + def matcher_matches?(matcher); end + + private + + # Some block matchers (such as `yield_xyz`) pass args to the `expect` block. + # When such a matcher is used as the outer matcher, we need to forward the + # the args on to the `expect` block. + # + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#184 + def inner_matcher_block(outer_args); end + + # For a matcher like `raise_error` or `throw_symbol`, where the block will jump + # up the call stack, we need to order things so that it is the inner matcher. + # For example, we need it to be this: + # + # expect { + # expect { + # x += 1 + # raise "boom" + # }.to raise_error("boom") + # }.to change { x }.by(1) + # + # ...rather than: + # + # expect { + # expect { + # x += 1 + # raise "boom" + # }.to change { x }.by(1) + # }.to raise_error("boom") + # + # In the latter case, the after-block logic in the `change` matcher would never + # get executed because the `raise "boom"` line would jump to the `rescue` in the + # `raise_error` logic, so only the former case will work properly. + # + # This method figures out which matcher should be the inner matcher and which + # should be the outer matcher. + # + # @api private + # @raise [ArgumentError] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#224 + def order_block_matchers; end + + class << self + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#233 + def matcher_expects_call_stack_jump?(matcher); end + end +end + +# Matcher used to represent a compound `or` expectation. +# +# @api public +# +# source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#271 +class RSpec::Matchers::BuiltIn::Compound::Or < ::RSpec::Matchers::BuiltIn::Compound + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#272 + def failure_message; end + + private + + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#283 + def conjunction; end + + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#278 + def match(*_arg0); end +end + +# For value expectations, we can evaluate the matchers sequentially. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#132 +class RSpec::Matchers::BuiltIn::Compound::SequentialEvaluator + # @api private + # @return [SequentialEvaluator] a new instance of SequentialEvaluator + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#133 + def initialize(actual, *_arg1); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#137 + def matcher_matches?(matcher); end +end + +# Provides the implementation for `contain_exactly` and `match_array`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#10 +class RSpec::Matchers::BuiltIn::ContainExactly < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#29 + def description; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#11 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#22 + def failure_message_when_negated; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#34 + def matches?(actual); end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#56 + def actual_collection_line; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#135 + def best_solution; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#94 + def convert_actual_to_an_array; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#68 + def describe_collection(collection, surface_descriptions = T.unsafe(nil)); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#52 + def expected_collection_line; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#64 + def extra_elements_line; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#129 + def extra_items; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#44 + def generate_failure_message; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#81 + def match(_expected, _actual); end + + # This cannot always work (e.g. when dealing with unsortable items, + # or matchers as expected items), but it's practically free compared to + # the slowness of the full matching algorithm, and in common cases this + # works, so it's worth a try. + # + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#90 + def match_when_sorted?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#76 + def message_line(prefix, collection, surface_descriptions = T.unsafe(nil)); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#60 + def missing_elements_line; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#123 + def missing_items; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#139 + def pairings_maximizer; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#104 + def safe_sort(array); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#118 + def to_a_disallowed?(object); end +end + +# Once we started supporting composing matchers, the algorithm for this matcher got +# much more complicated. Consider this expression: +# +# expect(["fool", "food"]).to contain_exactly(/foo/, /fool/) +# +# This should pass (because we can pair /fool/ with "fool" and /foo/ with "food"), but +# the original algorithm used by this matcher would pair the first elements it could +# (/foo/ with "fool"), which would leave /fool/ and "food" unmatched. When we have +# an expected element which is a matcher that matches a superset of actual items +# compared to another expected element matcher, we need to consider every possible pairing. +# +# This class is designed to maximize the number of actual/expected pairings -- or, +# conversely, to minimize the number of unpaired items. It's essentially a brute +# force solution, but with a few heuristics applied to reduce the size of the +# problem space: +# +# * Any items which match none of the items in the other list are immediately +# placed into the `unmatched_expected_indexes` or `unmatched_actual_indexes` array. +# The extra items and missing items in the matcher failure message are derived +# from these arrays. +# * Any items which reciprocally match only each other are paired up and not +# considered further. +# +# What's left is only the items which match multiple items from the other list +# (or vice versa). From here, it performs a brute-force depth-first search, +# looking for a solution which pairs all elements in both lists, or, barring that, +# that produces the fewest unmatched items. +# +# @api private +# @private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#186 +class RSpec::Matchers::BuiltIn::ContainExactly::PairingsMaximizer + # @api private + # @return [PairingsMaximizer] a new instance of PairingsMaximizer + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#223 + def initialize(expected_to_actual_matched_indexes, actual_to_expected_matched_indexes); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#221 + def actual_to_expected_matched_indexes; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#221 + def expected_to_actual_matched_indexes; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#237 + def find_best_solution; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#221 + def solution; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#299 + def apply_pairing_to(indeterminates, original_matches, other_list_index); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#283 + def best_solution_for_pairing(expected_index, actual_index); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#263 + def categorize_indexes(indexes_to_categorize, other_indexes); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#278 + def reciprocal_single_match?(matches, index, other_list); end +end + +# Starting solution that is worse than any other real solution. +# +# @api private +# @private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#257 +class RSpec::Matchers::BuiltIn::ContainExactly::PairingsMaximizer::NullSolution + class << self + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#258 + def worse_than?(_other); end + end +end + +# @api private +# @private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#188 +class RSpec::Matchers::BuiltIn::ContainExactly::PairingsMaximizer::Solution < ::Struct + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#210 + def +(derived_candidate_solution); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#194 + def candidate?; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#199 + def ideal?; end + + # Returns the value of attribute indeterminate_actual_indexes + # + # @return [Object] the current value of indeterminate_actual_indexes + def indeterminate_actual_indexes; end + + # Sets the attribute indeterminate_actual_indexes + # + # @param value [Object] the value to set the attribute indeterminate_actual_indexes to. + # @return [Object] the newly set value + def indeterminate_actual_indexes=(_); end + + # Returns the value of attribute indeterminate_expected_indexes + # + # @return [Object] the current value of indeterminate_expected_indexes + def indeterminate_expected_indexes; end + + # Sets the attribute indeterminate_expected_indexes + # + # @param value [Object] the value to set the attribute indeterminate_expected_indexes to. + # @return [Object] the newly set value + def indeterminate_expected_indexes=(_); end + + # Returns the value of attribute unmatched_actual_indexes + # + # @return [Object] the current value of unmatched_actual_indexes + def unmatched_actual_indexes; end + + # Sets the attribute unmatched_actual_indexes + # + # @param value [Object] the value to set the attribute unmatched_actual_indexes to. + # @return [Object] the newly set value + def unmatched_actual_indexes=(_); end + + # Returns the value of attribute unmatched_expected_indexes + # + # @return [Object] the current value of unmatched_expected_indexes + def unmatched_expected_indexes; end + + # Sets the attribute unmatched_expected_indexes + # + # @param value [Object] the value to set the attribute unmatched_expected_indexes to. + # @return [Object] the newly set value + def unmatched_expected_indexes=(_); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#206 + def unmatched_item_count; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#190 + def worse_than?(other); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# Abstract class to implement `once`, `at_least` and other +# count constraints. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#7 +module RSpec::Matchers::BuiltIn::CountExpectation + # Specifies the minimum number of times the method is expected to match + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#42 + def at_least(number); end + + # Specifies the maximum number of times the method is expected to match + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#35 + def at_most(number); end + + # Specifies that the method is expected to match the given number of times. + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#28 + def exactly(number); end + + # Specifies that the method is expected to match once. + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#10 + def once; end + + # Specifies that the method is expected to match thrice. + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#22 + def thrice; end + + # No-op. Provides syntactic sugar. + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#49 + def times; end + + # Specifies that the method is expected to match twice. + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#16 + def twice; end + + protected + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#55 + def count_expectation_type; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#55 + def expected_count; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#120 + def count_constraint_to_number(n); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#139 + def count_expectation_description; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#143 + def count_failure_reason(action); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#60 + def cover?(count, number); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#69 + def expected_count_matches?(actual_count); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#77 + def has_expected_count?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#157 + def human_readable_count(count); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#148 + def human_readable_expectation_type; end + + # @api private + # @raise [ArgumentError] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#100 + def raise_impossible_count_expectation(count); end + + # @api private + # @raise [ArgumentError] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#109 + def raise_unsupported_count_expectation; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#81 + def set_expected_count(relativity, n); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/count_expectation.rb#132 + def unsupported_count_expectation?(relativity); end +end + +# Provides the implementation for `cover`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/cover.rb#7 +class RSpec::Matchers::BuiltIn::Cover < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [Cover] a new instance of Cover + # + # source://rspec-expectations//lib/rspec/matchers/built_in/cover.rb#8 + def initialize(*expected); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/cover.rb#17 + def does_not_match?(range); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/cover.rb#12 + def matches?(range); end +end + +# Provides the implementation for dynamic predicate matchers. +# Not intended to be inherited directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#7 +class RSpec::Matchers::BuiltIn::DynamicPredicate < ::RSpec::Matchers::BuiltIn::BaseMatcher + include ::RSpec::Matchers::BuiltIn::BeHelpers + + # @api private + # @return [DynamicPredicate] a new instance of DynamicPredicate + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#10 + def initialize(method_name, *args, **_arg2, &block); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#43 + def description; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#23 + def does_not_match?(actual, &block); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#31 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#37 + def failure_message_when_negated; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#16 + def matches?(actual, &block); end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#99 + def expectation_of(value); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#94 + def failure_message_expecting(value); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#115 + def failure_to_respond_explanation; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#90 + def method_description; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#49 + def predicate_accessible?; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#74 + def predicate_matches?(value = T.unsafe(nil)); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#70 + def predicate_method_name; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#66 + def predicate_result; end + + # :nocov: + # + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#61 + def private_predicate?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#82 + def root; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#109 + def validity_message; end +end + +# Provides the implementation for `end_with`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/start_or_end_with.rb#81 +class RSpec::Matchers::BuiltIn::EndWith < ::RSpec::Matchers::BuiltIn::StartOrEndWith + private + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/start_or_end_with.rb#88 + def element_matches?; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/start_or_end_with.rb#84 + def subset_matches?; end +end + +# Provides the implementation for `eq`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/eq.rb#9 +class RSpec::Matchers::BuiltIn::Eq < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/eq.rb#22 + def description; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/eq.rb#28 + def diffable?; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/eq.rb#10 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/eq.rb#16 + def failure_message_when_negated; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/eq.rb#34 + def match(expected, actual); end +end + +# Provides the implementation for `eql`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/eql.rb#9 +class RSpec::Matchers::BuiltIn::Eql < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/eql.rb#22 + def diffable?; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/eql.rb#10 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/eql.rb#16 + def failure_message_when_negated; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/eql.rb#28 + def match(expected, actual); end +end + +# Provides the implementation for `equal`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/equal.rb#9 +class RSpec::Matchers::BuiltIn::Equal < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/equal.rb#33 + def diffable?; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/equal.rb#10 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/equal.rb#20 + def failure_message_when_negated; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/equal.rb#49 + def actual_inspected; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/equal.rb#61 + def detailed_failure_message; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/equal.rb#45 + def expected_is_a_literal_singleton?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/equal.rb#75 + def inspect_object(o); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/equal.rb#39 + def match(expected, actual); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/equal.rb#57 + def simple_failure_message; end +end + +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/equal.rb#43 +RSpec::Matchers::BuiltIn::Equal::LITERAL_SINGLETONS = T.let(T.unsafe(nil), Array) + +# Provides the implementation for `exist`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/exist.rb#7 +class RSpec::Matchers::BuiltIn::Exist < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [Exist] a new instance of Exist + # + # source://rspec-expectations//lib/rspec/matchers/built_in/exist.rb#8 + def initialize(*expected); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/exist.rb#22 + def does_not_match?(actual); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/exist.rb#30 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/exist.rb#36 + def failure_message_when_negated; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/exist.rb#14 + def matches?(actual); end +end + +# Simple class for memoizing actual/expected for this matcher +# and examining the match +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/exist.rb#45 +class RSpec::Matchers::BuiltIn::Exist::ExistenceTest < ::Struct + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/exist.rb#52 + def actual_exists?; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/exist.rb#46 + def valid_test?; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/exist.rb#58 + def validity_message; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/exist.rb#83 + def deprecated(predicate, actual); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/exist.rb#75 + def existence_values; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/exist.rb#79 + def predicates; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/exist.rb#71 + def uniq_truthy_values; end +end + +# Provides the implementation for `has_`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#126 +class RSpec::Matchers::BuiltIn::Has < ::RSpec::Matchers::BuiltIn::DynamicPredicate + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#129 + def predicate; end +end + +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#127 +RSpec::Matchers::BuiltIn::Has::REGEX = T.let(T.unsafe(nil), Regexp) + +# Provides the implementation for `have_attributes`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#8 +class RSpec::Matchers::BuiltIn::HaveAttributes < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [HaveAttributes] a new instance of HaveAttributes + # + # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#11 + def initialize(expected); end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#19 + def actual; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#43 + def description; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#50 + def diffable?; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#34 + def does_not_match?(actual); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#56 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#64 + def failure_message_when_negated; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#25 + def matches?(actual); end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#9 + def respond_to_failed; end + + private + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#85 + def actual_has_attribute?(attribute_key, attribute_value); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#70 + def cache_all_values; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#107 + def formatted_values; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#78 + def perform_match(predicate); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#89 + def respond_to_attributes?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#99 + def respond_to_failure_message_or; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#95 + def respond_to_matcher; end +end + +# Provides the implementation for `include`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#9 +class RSpec::Matchers::BuiltIn::Include < ::RSpec::Matchers::BuiltIn::BaseMatcher + include ::RSpec::Matchers::BuiltIn::CountExpectation + + # @api private + # @return [Include] a new instance of Include + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#15 + def initialize(*expecteds); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#43 + def description; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#61 + def diffable?; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#32 + def does_not_match?(actual); end + + # @api private + # @return [Array, Hash] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#67 + def expected; end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#12 + def expecteds; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#49 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#55 + def failure_message_when_negated; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#21 + def matches?(actual); end + + private + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#167 + def actual_collection_includes?(expected_item); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#153 + def actual_hash_has_key?(expected_key); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#141 + def actual_hash_includes?(expected_key, expected_value); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#77 + def check_actual?(actual); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#83 + def check_expected_count?; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#149 + def comparing_hash_keys?(expected_item); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#137 + def comparing_hash_to_a_subset?(expected_item); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#207 + def convert_to_hash?(obj); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#181 + def count_enumerable(expected_item); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#186 + def count_inclusions; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#198 + def diff_would_wrongly_highlight_matched_item?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#120 + def excluded_from_actual; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#95 + def format_failure_message(preposition); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#115 + def perform_match(&block); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#106 + def readable_list_of(items); end +end + +# Provides the implementation for `match`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/match.rb#7 +class RSpec::Matchers::BuiltIn::Match < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [Match] a new instance of Match + # + # source://rspec-expectations//lib/rspec/matchers/built_in/match.rb#8 + def initialize(expected); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/match.rb#15 + def description; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/match.rb#25 + def diffable?; end + + # Used to specify the captures we match against + # + # @api private + # @return [self] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/match.rb#31 + def with_captures(*captures); end + + private + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/match.rb#45 + def can_safely_call_match?(expected, actual); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/match.rb#38 + def match(expected, actual); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/match.rb#52 + def match_captures(expected, actual); end +end + +# Handles operator matcher for `should_not`. +# +# @private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#116 +class RSpec::Matchers::BuiltIn::NegativeOperatorMatcher < ::RSpec::Matchers::BuiltIn::OperatorMatcher + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#117 + def __delegate_operator(actual, operator, expected); end +end + +# @private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#128 +module RSpec::Matchers::BuiltIn::NullCapture + class << self + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#133 + def capture(_block); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#129 + def name; end + end +end + +# Provides the implementation for operator matchers. +# Not intended to be instantiated directly. +# Only available for use with `should`. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#10 +class RSpec::Matchers::BuiltIn::OperatorMatcher + # @api private + # @return [OperatorMatcher] a new instance of OperatorMatcher + # + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#41 + def initialize(actual); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#57 + def !=(_expected); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#57 + def !~(_expected); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#47 + def <(expected); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#47 + def <=(expected); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#47 + def ==(expected); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#47 + def ===(expected); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#47 + def =~(expected); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#47 + def >(expected); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#47 + def >=(expected); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#76 + def description; end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#70 + def fail_with_message(message); end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#88 + def eval_match(actual, operator, expected); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#82 + def has_non_generic_implementation_of?(op); end + + class << self + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#29 + def get(klass, operator); end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#18 + def register(klass, operator, matcher); end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#13 + def registry; end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#24 + def unregister(klass, operator); end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#46 + def use_custom_matcher_or_delegate(operator); end + end +end + +# Provides the implementation for `output`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#9 +class RSpec::Matchers::BuiltIn::Output < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [Output] a new instance of Output + # + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#10 + def initialize(expected); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#76 + def description; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#86 + def diffable?; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#24 + def does_not_match?(block); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#64 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#70 + def failure_message_when_negated; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#17 + def matches?(block); end + + # Indicates this matcher matches against a block. + # + # @api private + # @return [True] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#93 + def supports_block_expectations?; end + + # Indicates this matcher matches against a block only. + # + # @api private + # @return [False] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#100 + def supports_value_expectations?; end + + # Tells the matcher to match against stderr. + # Works only when the main Ruby process prints to stderr + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#39 + def to_stderr; end + + # Tells the matcher to match against stderr. + # Works when subprocesses print to stderr as well. + # This is significantly (~30x) slower than `to_stderr` + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#57 + def to_stderr_from_any_process; end + + # Tells the matcher to match against stdout. + # Works only when the main Ruby process prints to stdout + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#31 + def to_stdout; end + + # Tells the matcher to match against stdout. + # Works when subprocesses print to stdout as well. + # This is significantly (~30x) slower than `to_stdout` + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#48 + def to_stdout_from_any_process; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#121 + def actual_output_description; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#106 + def captured?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#116 + def negative_failure_reason; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/output.rb#110 + def positive_failure_reason; end +end + +# Handles operator matcher for `should`. +# +# @private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#97 +class RSpec::Matchers::BuiltIn::PositiveOperatorMatcher < ::RSpec::Matchers::BuiltIn::OperatorMatcher + # source://rspec-expectations//lib/rspec/matchers/built_in/operators.rb#98 + def __delegate_operator(actual, operator, expected); end +end + +# Provides the implementation for `raise_error`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#9 +class RSpec::Matchers::BuiltIn::RaiseError + include ::RSpec::Matchers::Composable + + # @api private + # @return [RaiseError] a new instance of RaiseError + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#18 + def initialize(expected_error_or_message, expected_message, &block); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#113 + def description; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#79 + def does_not_match?(given_proc); end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#95 + def expects_call_stack_jump?; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#101 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#107 + def failure_message_when_negated; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#48 + def matches?(given_proc, negative_expectation = T.unsafe(nil), &block); end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#85 + def supports_block_expectations?; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#90 + def supports_value_expectations?; end + + # Specifies the expected error message. + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#39 + def with_message(expected_message); end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#119 + def actual_error_message; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#133 + def block_matches?; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#129 + def error_and_message_match?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#141 + def eval_block; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#125 + def expectation_matched?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#222 + def expected_error; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#253 + def expecting_specific_exception?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#237 + def format_backtrace(backtrace); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#242 + def given_error; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#172 + def handle_warning(message); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#257 + def raise_message_already_set; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#137 + def ready_to_eval_block?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#151 + def verify_message; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#184 + def warn_about_bare_error!; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#176 + def warn_about_bare_error?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#210 + def warn_about_negative_false_positive!(expression); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#197 + def warn_about_nil_error!; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#180 + def warn_about_nil_error?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#156 + def warn_for_negative_false_positives!; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#262 + def warning; end +end + +# Used as a sentinel value to be able to tell when the user did not pass an +# argument. We can't use `nil` for that because we need to warn when `nil` is +# passed in a different way. It's an Object, not a Module, since Module's `===` +# does not evaluate to true when compared to itself. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#16 +RSpec::Matchers::BuiltIn::RaiseError::UndefinedValue = T.let(T.unsafe(nil), Object) + +# Used to wrap match data and make it reliable for 1.8.7 +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/match.rb#72 +class RSpec::Matchers::BuiltIn::ReliableMatchData + # @api private + # @return [ReliableMatchData] a new instance of ReliableMatchData + # + # source://rspec-expectations//lib/rspec/matchers/built_in/match.rb#73 + def initialize(match_data); end + + # returns an array of captures from the match data + # + # @api private + # @return Array + # + # source://rspec-expectations//lib/rspec/matchers/built_in/match.rb#96 + def captures; end + + # Returns match data names for named captures + # + # @api private + # @return Array + # + # source://rspec-expectations//lib/rspec/matchers/built_in/match.rb#88 + def names; end + + protected + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/match.rb#102 + def match_data; end +end + +# Provides the implementation for `respond_to`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#9 +class RSpec::Matchers::BuiltIn::RespondTo < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [RespondTo] a new instance of RespondTo + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#10 + def initialize(*names); end + + # Specifies that the method accepts any keyword, i.e. the method has + # a splatted keyword parameter of the form **kw_args. + # + # @api public + # @example + # expect(obj).to respond_to(:message).with_any_keywords + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#48 + def and_any_keywords; end + + # Specifies keyword arguments, if any. + # + # @api public + # @example + # expect(obj).to respond_to(:message).with_keywords(:color, :shape) + # @example with an expected number of arguments + # expect(obj).to respond_to(:message).with(3).arguments.and_keywords(:color, :shape) + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#36 + def and_keywords(*keywords); end + + # Specifies that the number of arguments has no upper limit, i.e. the + # method has a splatted parameter of the form *args. + # + # @api public + # @example + # expect(obj).to respond_to(:message).with_unlimited_arguments + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#60 + def and_unlimited_arguments; end + + # No-op. Intended to be used as syntactic sugar when using `with`. + # + # @api public + # @example + # expect(obj).to respond_to(:message).with(3).arguments + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#71 + def argument; end + + # No-op. Intended to be used as syntactic sugar when using `with`. + # + # @api public + # @example + # expect(obj).to respond_to(:message).with(3).arguments + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#71 + def arguments; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#100 + def description; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#82 + def does_not_match?(actual); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#88 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#94 + def failure_message_when_negated; end + + # Used by other matchers to suppress a check + # + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#106 + def ignoring_method_signature_failure!; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#77 + def matches?(actual); end + + # Specifies the number of expected arguments. + # + # @api public + # @example + # expect(obj).to respond_to(:message).with(3).arguments + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#24 + def with(n); end + + # Specifies that the method accepts any keyword, i.e. the method has + # a splatted keyword parameter of the form **kw_args. + # + # @api public + # @example + # expect(obj).to respond_to(:message).with_any_keywords + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#48 + def with_any_keywords; end + + # Specifies keyword arguments, if any. + # + # @api public + # @example + # expect(obj).to respond_to(:message).with_keywords(:color, :shape) + # @example with an expected number of arguments + # expect(obj).to respond_to(:message).with(3).arguments.and_keywords(:color, :shape) + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#36 + def with_keywords(*keywords); end + + # Specifies that the number of arguments has no upper limit, i.e. the + # method has a splatted parameter of the form *args. + # + # @api public + # @example + # expect(obj).to respond_to(:message).with_unlimited_arguments + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#60 + def with_unlimited_arguments; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#112 + def find_failing_method_names(actual, filter_method); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#119 + def matches_arity?(actual, name); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#156 + def pp_names; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#130 + def with_arity; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#139 + def with_arity_string; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#143 + def with_keywords_string; end +end + +# @api private +# @private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#161 +class RSpec::Matchers::BuiltIn::RespondTo::ArityCheck + # @api private + # @return [ArityCheck] a new instance of ArityCheck + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#162 + def initialize(expected_arity, expected_keywords, arbitrary_keywords, unlimited_arguments); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#178 + def matches?(actual, name); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#187 + def method_signature_for(actual, name); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/respond_to.rb#183 + def verifier_for(actual, name); end +end + +# Provides the implementation for `satisfy`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/satisfy.rb#7 +class RSpec::Matchers::BuiltIn::Satisfy < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [Satisfy] a new instance of Satisfy + # + # source://rspec-expectations//lib/rspec/matchers/built_in/satisfy.rb#8 + def initialize(description = T.unsafe(nil), &block); end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/satisfy.rb#21 + def description; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/satisfy.rb#27 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/satisfy.rb#33 + def failure_message_when_negated; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/satisfy.rb#14 + def matches?(actual, &block); end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/satisfy.rb#40 + def block_representation; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/satisfy.rb#48 + def extract_block_snippet; end +end + +# Base class for specifying a change from and/or to specific values. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#182 +class RSpec::Matchers::BuiltIn::SpecificValuesChange < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [SpecificValuesChange] a new instance of SpecificValuesChange + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#185 + def initialize(change_details, from, to); end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#197 + def description; end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#202 + def failure_message; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#192 + def matches?(event_proc); end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#210 + def supports_block_expectations?; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#215 + def supports_value_expectations?; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#244 + def after_value_failure; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#238 + def before_value_failure; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#255 + def did_change_failure; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#250 + def did_not_change_failure; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#234 + def matches_after?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#261 + def not_given_a_block_failure; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#221 + def perform_change(event_proc); end +end + +# @api private +# @private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#183 +RSpec::Matchers::BuiltIn::SpecificValuesChange::MATCH_ANYTHING = BasicObject + +# For RSpec 3.1, the base class was named `StartAndEndWith`. For SemVer reasons, +# we still provide this constant until 4.0. +# +# @deprecated Use StartOrEndWith instead. +# @private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/start_or_end_with.rb#61 +RSpec::Matchers::BuiltIn::StartAndEndWith = RSpec::Matchers::BuiltIn::StartOrEndWith + +# Base class for the `end_with` and `start_with` matchers. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/start_or_end_with.rb#7 +class RSpec::Matchers::BuiltIn::StartOrEndWith < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [StartOrEndWith] a new instance of StartOrEndWith + # + # source://rspec-expectations//lib/rspec/matchers/built_in/start_or_end_with.rb#8 + def initialize(*expected); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/start_or_end_with.rb#27 + def description; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/start_or_end_with.rb#15 + def failure_message; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/start_or_end_with.rb#36 + def match(_expected, actual); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/start_or_end_with.rb#48 + def subsets_comparable?; end +end + +# Provides the implementation for `start_with`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/start_or_end_with.rb#66 +class RSpec::Matchers::BuiltIn::StartWith < ::RSpec::Matchers::BuiltIn::StartOrEndWith + private + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/start_or_end_with.rb#73 + def element_matches?; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/start_or_end_with.rb#69 + def subset_matches?; end +end + +# Provides the implementation for `throw_symbol`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/throw_symbol.rb#7 +class RSpec::Matchers::BuiltIn::ThrowSymbol + include ::RSpec::Matchers::Composable + + # @api private + # @return [ThrowSymbol] a new instance of ThrowSymbol + # + # source://rspec-expectations//lib/rspec/matchers/built_in/throw_symbol.rb#10 + def initialize(expected_symbol = T.unsafe(nil), expected_arg = T.unsafe(nil)); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/throw_symbol.rb#86 + def description; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/throw_symbol.rb#68 + def does_not_match?(given_proc); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/throw_symbol.rb#103 + def expects_call_stack_jump?; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/throw_symbol.rb#74 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/throw_symbol.rb#80 + def failure_message_when_negated; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/throw_symbol.rb#18 + def matches?(given_proc); end + + # Indicates this matcher matches against a block. + # + # @api private + # @return [True] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/throw_symbol.rb#93 + def supports_block_expectations?; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/throw_symbol.rb#98 + def supports_value_expectations?; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/throw_symbol.rb#109 + def actual_result; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/throw_symbol.rb#118 + def caught; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/throw_symbol.rb#114 + def expected(symbol_desc = T.unsafe(nil)); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/throw_symbol.rb#122 + def throw_description(symbol, arg); end +end + +# Provides the implementation for `yield_control`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#101 +class RSpec::Matchers::BuiltIn::YieldControl < ::RSpec::Matchers::BuiltIn::BaseMatcher + include ::RSpec::Matchers::BuiltIn::CountExpectation + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#111 + def does_not_match?(block); end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#117 + def failure_message; end + + # @api private + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#123 + def failure_message_when_negated; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#104 + def matches?(block); end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#128 + def supports_block_expectations?; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#133 + def supports_value_expectations?; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#139 + def failure_reason; end +end + +# Object that is yielded to `expect` when one of the +# yield matchers is used. Provides information about +# the yield behavior of the object-under-test. +# +# @private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#12 +class RSpec::Matchers::BuiltIn::YieldProbe + # @return [YieldProbe] a new instance of YieldProbe + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#21 + def initialize(block, &callback); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#68 + def assert_used!; end + + # :nocov: + # On 1.8.7, `lambda { }.arity` and `lambda { |*a| }.arity` both return -1, + # so we can't distinguish between accepting no args and an arg splat. + # It's OK to skip, this, though; it just provides a nice error message + # when the user forgets to accept an arg in their block. They'll still get + # the `assert_used!` error message from above, which is sufficient. + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#78 + def assert_valid_expect_block!; end + + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#29 + def has_block?; end + + # Returns the value of attribute num_yields. + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#19 + def num_yields; end + + # Sets the attribute num_yields + # + # @param value the value to set the attribute num_yields to. + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#19 + def num_yields=(_arg0); end + + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#33 + def probe; end + + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#53 + def single_yield_args; end + + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#40 + def to_proc; end + + # Returns the value of attribute yielded_args. + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#19 + def yielded_args; end + + # Sets the attribute yielded_args + # + # @param value the value to set the attribute yielded_args to. + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#19 + def yielded_args=(_arg0); end + + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#57 + def yielded_once?(matcher_name); end + + class << self + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#13 + def probe(block, &callback); end + end +end + +# Provides the implementation for `yield_successive_args`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#296 +class RSpec::Matchers::BuiltIn::YieldSuccessiveArgs < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [YieldSuccessiveArgs] a new instance of YieldSuccessiveArgs + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#297 + def initialize(*args); end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#337 + def description; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#320 + def does_not_match?(block); end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#325 + def failure_message; end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#331 + def failure_message_when_negated; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#302 + def matches?(block); end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#342 + def supports_block_expectations?; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#347 + def supports_value_expectations?; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#353 + def expected_arg_description; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#365 + def negative_failure_reason; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#357 + def positive_failure_reason; end +end + +# Provides the implementation for `yield_with_args`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#199 +class RSpec::Matchers::BuiltIn::YieldWithArgs < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @return [YieldWithArgs] a new instance of YieldWithArgs + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#200 + def initialize(*args); end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#233 + def description; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#218 + def does_not_match?(block); end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#223 + def failure_message; end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#228 + def failure_message_when_negated; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#205 + def matches?(block); end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#240 + def supports_block_expectations?; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#245 + def supports_value_expectations?; end + + private + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#288 + def all_args_match?; end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#273 + def args_currently_match?; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#257 + def expected_arg_description; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#261 + def negative_failure_reason; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#251 + def positive_failure_reason; end +end + +# Provides the implementation for `yield_with_no_args`. +# Not intended to be instantiated directly. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#150 +class RSpec::Matchers::BuiltIn::YieldWithNoArgs < ::RSpec::Matchers::BuiltIn::BaseMatcher + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#158 + def does_not_match?(block); end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#163 + def failure_message; end + + # @api private + # @private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#168 + def failure_message_when_negated; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#151 + def matches?(block); end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#173 + def supports_block_expectations?; end + + # @api private + # @private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#178 + def supports_value_expectations?; end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#190 + def negative_failure_reason; end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#184 + def positive_failure_reason; end +end + +# Mixin designed to support the composable matcher features +# of RSpec 3+. Mix it into your custom matcher classes to +# allow them to be used in a composable fashion. +# +# @api public +# +# source://rspec-expectations//lib/rspec/matchers/composable.rb#10 +module RSpec::Matchers::Composable + # Creates a compound `and` expectation. The matcher will + # only pass if both sub-matchers pass. + # This can be chained together to form an arbitrarily long + # chain of matchers. + # + # @api public + # @example + # expect(alphabet).to start_with("a").and end_with("z") + # expect(alphabet).to start_with("a") & end_with("z") + # @note The negative form (`expect(...).not_to matcher.and other`) + # is not supported at this time. + # + # source://rspec-expectations//lib/rspec/matchers/composable.rb#22 + def &(matcher); end + + # Delegates to `#matches?`. Allows matchers to be used in composable + # fashion and also supports using matchers in case statements. + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/composable.rb#45 + def ===(value); end + + # Creates a compound `and` expectation. The matcher will + # only pass if both sub-matchers pass. + # This can be chained together to form an arbitrarily long + # chain of matchers. + # + # @api public + # @example + # expect(alphabet).to start_with("a").and end_with("z") + # expect(alphabet).to start_with("a") & end_with("z") + # @note The negative form (`expect(...).not_to matcher.and other`) + # is not supported at this time. + # + # source://rspec-expectations//lib/rspec/matchers/composable.rb#22 + def and(matcher); end + + # Creates a compound `or` expectation. The matcher will + # pass if either sub-matcher passes. + # This can be chained together to form an arbitrarily long + # chain of matchers. + # + # @api public + # @example + # expect(stoplight.color).to eq("red").or eq("green").or eq("yellow") + # expect(stoplight.color).to eq("red") | eq("green") | eq("yellow") + # @note The negative form (`expect(...).not_to matcher.or other`) + # is not supported at this time. + # + # source://rspec-expectations//lib/rspec/matchers/composable.rb#38 + def or(matcher); end + + # Creates a compound `or` expectation. The matcher will + # pass if either sub-matcher passes. + # This can be chained together to form an arbitrarily long + # chain of matchers. + # + # @api public + # @example + # expect(stoplight.color).to eq("red").or eq("green").or eq("yellow") + # expect(stoplight.color).to eq("red") | eq("green") | eq("yellow") + # @note The negative form (`expect(...).not_to matcher.or other`) + # is not supported at this time. + # + # source://rspec-expectations//lib/rspec/matchers/composable.rb#38 + def |(matcher); end + + private + + # Returns the description of the given object in a way that is + # aware of composed matchers. If the object is a matcher with + # a `description` method, returns the description; otherwise + # returns `object.inspect`. + # + # You are encouraged to use this in your custom matcher's + # `description`, `failure_message` or + # `failure_message_when_negated` implementation if you are + # supporting matcher arguments. + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/composable.rb#82 + def description_of(object); end + + # We should enumerate arrays as long as they are not recursive. + # + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/composable.rb#142 + def should_enumerate?(item); end + + # Transforms the given data structure (typically a hash or array) + # into a new data structure that, when `#inspect` is called on it, + # will provide descriptions of any contained matchers rather than + # the normal `#inspect` output. + # + # You are encouraged to use this in your custom matcher's + # `description`, `failure_message` or + # `failure_message_when_negated` implementation if you are + # supporting any arguments which may be a data structure + # containing matchers. + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/composable.rb#98 + def surface_descriptions_in(item); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/composable.rb#147 + def unreadable_io?(object); end + + # This provides a generic way to fuzzy-match an expected value against + # an actual value. It understands nested data structures (e.g. hashes + # and arrays) and is able to match against a matcher being used as + # the expected value or within the expected value at any level of + # nesting. + # + # Within a custom matcher you are encouraged to use this whenever your + # matcher needs to match two values, unless it needs more precise semantics. + # For example, the `eq` matcher _does not_ use this as it is meant to + # use `==` (and only `==`) for matching. + # + # @api public + # @param expected [Object] what is expected + # @param actual [Object] the actual value + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/composable.rb#66 + def values_match?(expected, actual); end + + # Historically, a single matcher instance was only checked + # against a single value. Given that the matcher was only + # used once, it's been common to memoize some intermediate + # calculation that is derived from the `actual` value in + # order to reuse that intermediate result in the failure + # message. + # + # This can cause a problem when using such a matcher as an + # argument to another matcher in a composed matcher expression, + # since the matcher instance may be checked against multiple + # values and produce invalid results due to the memoization. + # + # To deal with this, we clone any matchers in `expected` via + # this method when using `values_match?`, so that any memoization + # does not "leak" between checks. + # + # @api public + # @private + # + # source://rspec-expectations//lib/rspec/matchers/composable.rb#128 + def with_matchers_cloned(object); end + + class << self + # We should enumerate arrays as long as they are not recursive. + # + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/composable.rb#142 + def should_enumerate?(item); end + + # Transforms the given data structure (typically a hash or array) + # into a new data structure that, when `#inspect` is called on it, + # will provide descriptions of any contained matchers rather than + # the normal `#inspect` output. + # + # You are encouraged to use this in your custom matcher's + # `description`, `failure_message` or + # `failure_message_when_negated` implementation if you are + # supporting any arguments which may be a data structure + # containing matchers. + # + # @api public + # + # source://rspec-expectations//lib/rspec/matchers/composable.rb#98 + def surface_descriptions_in(item); end + + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/composable.rb#147 + def unreadable_io?(object); end + end +end + +# Wraps an item in order to surface its `description` via `inspect`. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/composable.rb#158 +class RSpec::Matchers::Composable::DescribableItem < ::Struct + # Inspectable version of the item description + # + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/composable.rb#160 + def inspect; end + + # Returns the value of attribute item + # + # @return [Object] the current value of item + def item; end + + # Sets the attribute item + # + # @param value [Object] the value to set the attribute item to. + # @return [Object] the newly set value + def item=(_); end + + # A pretty printed version of the item description. + # + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/composable.rb#165 + def pretty_print(pp); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# Defines the custom matcher DSL. +# +# source://rspec-expectations//lib/rspec/matchers/dsl.rb#6 +module RSpec::Matchers::DSL + # Defines a matcher alias. The returned matcher's `description` will be overridden + # to reflect the phrasing of the new name, which will be used in failure messages + # when passed as an argument to another matcher in a composed matcher expression. + # + # @example + # RSpec::Matchers.alias_matcher :a_list_that_sums_to, :sum_to + # sum_to(3).description # => "sum to 3" + # a_list_that_sums_to(3).description # => "a list that sums to 3" + # @example + # RSpec::Matchers.alias_matcher :a_list_sorted_by, :be_sorted_by do |description| + # description.sub("be sorted by", "a list sorted by") + # end + # + # be_sorted_by(:age).description # => "be sorted by age" + # a_list_sorted_by(:age).description # => "a list sorted by age" + # @option options + # @param new_name [Symbol] the new name for the matcher + # @param old_name [Symbol] the original name for the matcher + # @param options [Hash] options for the aliased matcher + # @see RSpec::Matchers + # @yield [String] optional block that, when given, is used to define the overridden + # logic. The yielded arg is the original description or failure message. If no + # block is provided, a default override is used based on the old and new names. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#32 + def alias_matcher(new_name, old_name, options = T.unsafe(nil), &description_override); end + + # Defines a custom matcher. + # + # @param name [Symbol] the name for the matcher + # @see RSpec::Matchers + # @yield [Object] block that is used to define the matcher. + # The block is evaluated in the context of your custom matcher class. + # When args are passed to your matcher, they will be yielded here, + # usually representing the expected value(s). + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#73 + def define(name, &declarations); end + + # Defines a negated matcher. The returned matcher's `description` and `failure_message` + # will be overridden to reflect the phrasing of the new name, and the match logic will + # be based on the original matcher but negated. + # + # @example + # RSpec::Matchers.define_negated_matcher :exclude, :include + # include(1, 2).description # => "include 1 and 2" + # exclude(1, 2).description # => "exclude 1 and 2" + # @param negated_name [Symbol] the name for the negated matcher + # @param base_name [Symbol] the name of the original matcher that will be negated + # @see RSpec::Matchers + # @yield [String] optional block that, when given, is used to define the overridden + # logic. The yielded arg is the original description or failure message. If no + # block is provided, a default override is used based on the old and new names. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#61 + def define_negated_matcher(negated_name, base_name, &description_override); end + + # Defines a custom matcher. + # + # @param name [Symbol] the name for the matcher + # @see RSpec::Matchers + # @yield [Object] block that is used to define the matcher. + # The block is evaluated in the context of your custom matcher class. + # When args are passed to your matcher, they will be yielded here, + # usually representing the expected value(s). + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#73 + def matcher(name, &declarations); end + + private + + # :nocov: + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#84 + def warn_about_block_args(name, declarations); end +end + +# Defines default implementations of the matcher +# protocol methods for custom matchers. You can +# override any of these using the {RSpec::Matchers::DSL::Macros Macros} methods +# from within an `RSpec::Matchers.define` block. +# +# source://rspec-expectations//lib/rspec/matchers/dsl.rb#385 +module RSpec::Matchers::DSL::DefaultImplementations + include ::RSpec::Matchers::BuiltIn::BaseMatcher::DefaultFailureMessages + + # The default description. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#395 + def description; end + + # Used internally by objects returns by `should` and `should_not`. + # + # @api private + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#390 + def diffable?; end + + # Most matchers do not expect call stack jumps. + # + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#412 + def expects_call_stack_jump?; end + + # Matchers do not support block expectations by default. You + # must opt-in. + # + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#403 + def supports_block_expectations?; end + + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#407 + def supports_value_expectations?; end + + private + + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#418 + def chained_method_clause_sentences; end +end + +# Contains the methods that are available from within the +# `RSpec::Matchers.define` DSL for creating custom matchers. +# +# source://rspec-expectations//lib/rspec/matchers/dsl.rb#104 +module RSpec::Matchers::DSL::Macros + # Convenience for defining methods on this matcher to create a fluent + # interface. The trick about fluent interfaces is that each method must + # return self in order to chain methods together. `chain` handles that + # for you. If the method is invoked and the + # `include_chain_clauses_in_custom_matcher_descriptions` config option + # hash been enabled, the chained method name and args will be added to the + # default description and failure message. + # + # In the common case where you just want the chained method to store some + # value(s) for later use (e.g. in `match`), you can provide one or more + # attribute names instead of a block; the chained method will store its + # arguments in instance variables with those names, and the values will + # be exposed via getters. + # + # @example + # + # RSpec::Matchers.define :have_errors_on do |key| + # chain :with do |message| + # @message = message + # end + # + # match do |actual| + # actual.errors[key] == @message + # end + # end + # + # expect(minor).to have_errors_on(:age).with("Not old enough to participate") + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#298 + def chain(method_name, *attr_names, &definition); end + + # Customize the description to use for one-liners. Only use this when + # the description generated by default doesn't suit your needs. + # + # @example + # + # RSpec::Matchers.define :qualify_for do |expected| + # match { your_match_logic } + # + # description do + # "qualify for #{expected}" + # end + # end + # @yield [Object] actual the actual object (i.e. the value wrapped by `expect`) + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#253 + def description(&definition); end + + # Tells the matcher to diff the actual and expected values in the failure + # message. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#259 + def diffable; end + + # Customizes the failure message to use when this matcher is + # asked to positively match. Only use this when the message + # generated by default doesn't suit your needs. + # + # @example + # + # RSpec::Matchers.define :have_strength do |expected| + # match { your_match_logic } + # + # failure_message do |actual| + # "Expected strength of #{expected}, but had #{actual.strength}" + # end + # end + # @yield [Object] actual the actual object (i.e. the value wrapped by `expect`) + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#216 + def failure_message(&definition); end + + # Customize the failure message to use when this matcher is asked + # to negatively match. Only use this when the message generated by + # default doesn't suit your needs. + # + # @example + # + # RSpec::Matchers.define :have_strength do |expected| + # match { your_match_logic } + # + # failure_message_when_negated do |actual| + # "Expected not to have strength of #{expected}, but did" + # end + # end + # @yield [Object] actual the actual object (i.e. the value wrapped by `expect`) + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#235 + def failure_message_when_negated(&definition); end + + # Stores the block that is used to determine whether this matcher passes + # or fails. The block should return a boolean value. When the matcher is + # passed to `expect(...).to` and the block returns `true`, then the expectation + # passes. Similarly, when the matcher is passed to `expect(...).not_to` and the + # block returns `false`, then the expectation passes. + # + # By default the match block will swallow expectation errors (e.g. + # caused by using an expectation such as `expect(1).to eq 2`), if you + # wish to allow these to bubble up, pass in the option + # `:notify_expectation_failures => true`. + # + # @example + # + # RSpec::Matchers.define :be_even do + # match do |actual| + # actual.even? + # end + # end + # + # expect(4).to be_even # passes + # expect(3).not_to be_even # passes + # expect(3).to be_even # fails + # expect(4).not_to be_even # fails + # @param options [Hash] for defining the behavior of the match block. + # @yield [Object] actual the actual value (i.e. the value wrapped by `expect`) + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#131 + def match(options = T.unsafe(nil), &match_block); end + + # Use this instead of `match` when the block will raise an exception + # rather than returning false to indicate a failure. + # + # @example + # + # RSpec::Matchers.define :accept_as_valid do |candidate_address| + # match_unless_raises ValidationException do |validator| + # validator.validate(candidate_address) + # end + # end + # + # expect(email_validator).to accept_as_valid("person@company.com") + # @yield [Object] actual the actual object (i.e. the value wrapped by `expect`) + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#188 + def match_unless_raises(expected_exception = T.unsafe(nil), &match_block); end + + # Use this to define the block for a negative expectation (`expect(...).not_to`) + # when the positive and negative forms require different handling. This + # is rarely necessary, but can be helpful, for example, when specifying + # asynchronous processes that require different timeouts. + # + # By default the match block will swallow expectation errors (e.g. + # caused by using an expectation such as `expect(1).to eq 2`), if you + # wish to allow these to bubble up, pass in the option + # `:notify_expectation_failures => true`. + # + # @param options [Hash] for defining the behavior of the match block. + # @yield [Object] actual the actual value (i.e. the value wrapped by `expect`) + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#160 + def match_when_negated(options = T.unsafe(nil), &match_block); end + + # Declares that the matcher can be used in a block expectation. + # Users will not be able to use your matcher in a block + # expectation without declaring this. + # (e.g. `expect { do_something }.to matcher`). + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#267 + def supports_block_expectations; end + + private + + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#312 + def assign_attributes(attr_names); end + + # Does the following: + # + # - Defines the named method using a user-provided block + # in @user_method_defs, which is included as an ancestor + # in the singleton class in which we eval the `define` block. + # - Defines an overridden definition for the same method + # usign the provided `our_def` block. + # - Provides a default `our_def` block for the common case + # of needing to call the user's definition with `@actual` + # as an arg, but only if their block's arity can handle it. + # + # This compiles the user block into an actual method, allowing + # them to use normal method constructs like `return` + # (e.g. for an early guard statement), while allowing us to define + # an override that can provide the wrapped handling + # (e.g. assigning `@actual`, rescueing errors, etc) and + # can `super` to the user's definition. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#346 + def define_user_override(method_name, user_def, &our_def); end +end + +# Defines deprecated macro methods from RSpec 2 for backwards compatibility. +# +# @deprecated Use the methods from {Macros} instead. +# +# source://rspec-expectations//lib/rspec/matchers/dsl.rb#354 +module RSpec::Matchers::DSL::Macros::Deprecated + # @deprecated Use {Macros#failure_message} instead. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#368 + def failure_message_for_should(&definition); end + + # @deprecated Use {Macros#failure_message_when_negated} instead. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#374 + def failure_message_for_should_not(&definition); end + + # @deprecated Use {Macros#match} instead. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#356 + def match_for_should(&definition); end + + # @deprecated Use {Macros#match_when_negated} instead. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#362 + def match_for_should_not(&definition); end +end + +# @private +# +# source://rspec-expectations//lib/rspec/matchers/dsl.rb#146 +RSpec::Matchers::DSL::Macros::RAISE_NOTIFIER = T.let(T.unsafe(nil), Proc) + +# The class used for custom matchers. The block passed to +# `RSpec::Matchers.define` will be evaluated in the context +# of the singleton class of an instance, and will have the +# {RSpec::Matchers::DSL::Macros Macros} methods available. +# +# source://rspec-expectations//lib/rspec/matchers/dsl.rb#433 +class RSpec::Matchers::DSL::Matcher + include ::RSpec::Matchers::BuiltIn::BaseMatcher::DefaultFailureMessages + include ::RSpec::Matchers::DSL::DefaultImplementations + include ::RSpec::Matchers + include ::RSpec::Matchers::Composable + extend ::RSpec::Matchers::DSL::Macros + extend ::RSpec::Matchers::DSL::Macros::Deprecated + + # @api private + # @return [Matcher] a new instance of Matcher + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#462 + def initialize(name, declarations, matcher_execution_context, *expected, &block_arg); end + + # Exposes the value being matched against -- generally the object + # object wrapped by `expect`. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#449 + def actual; end + + # The block parameter used in the expectation + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#456 + def block_arg; end + + # Provides the expected value. This will return an array if + # multiple arguments were passed to the matcher; otherwise it + # will return a single value. + # + # @see #expected_as_array + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#482 + def expected; end + + # Returns the expected value as an an array. This exists primarily + # to aid in upgrading from RSpec 2.x, since in RSpec 2, `expected` + # always returned an array. + # + # @see #expected + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#494 + def expected_as_array; end + + # Adds the name (rather than a cryptic hex number) + # so we can identify an instance of + # the matcher in error messages (e.g. for `NoMethodError`) + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#499 + def inspect; end + + # The name of the matcher. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#459 + def name; end + + # Exposes the exception raised during the matching by `match_unless_raises`. + # Could be useful to extract details for a failure message. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#453 + def rescued_exception; end + + private + + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#522 + def actual_arg_for(block); end + + # Takes care of forwarding unhandled messages to the + # `@matcher_execution_context` (typically the current + # running `RSpec::Core::Example`). This is needed by + # rspec-rails so that it can define matchers that wrap + # Rails' test helper methods, but it's also a useful + # feature in its own right. + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#532 + def method_missing(method, *args, **_arg2, &block); end + + # Indicates that this matcher responds to messages + # from the `@matcher_execution_context` as well. + # Also, supports getting a method object for such methods. + # + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#507 + def respond_to_missing?(method, include_private = T.unsafe(nil)); end +end + +# source://rspec-expectations//lib/rspec/matchers.rb#959 +RSpec::Matchers::DYNAMIC_MATCHER_REGEX = T.let(T.unsafe(nil), Regexp) + +# Facilitates converting ruby objects to English phrases. +# +# source://rspec-expectations//lib/rspec/matchers/english_phrasing.rb#4 +module RSpec::Matchers::EnglishPhrasing + class << self + # when given an empty list. + # + # Converts an object (often a collection of objects) + # into an English list. + # + # list(['banana', 'kiwi', 'mango']) + # #=> " \"banana\", \"kiwi\", and \"mango\"" + # + # Given an empty collection, returns the empty string. + # + # list([]) #=> "" + # + # @note The returned string has a leading space except + # + # source://rspec-expectations//lib/rspec/matchers/english_phrasing.rb#26 + def list(obj); end + + # Converts a symbol into an English expression. + # + # split_words(:banana_creme_pie) #=> "banana creme pie" + # + # source://rspec-expectations//lib/rspec/matchers/english_phrasing.rb#9 + def split_words(sym); end + end +end + +# Handles list of expected values when there is a need to render +# multiple diffs. Also can handle one value. +# +# @api private +# +# source://rspec-expectations//lib/rspec/matchers/expecteds_for_multiple_diffs.rb#6 +class RSpec::Matchers::ExpectedsForMultipleDiffs + # @api private + # @return [ExpectedsForMultipleDiffs] a new instance of ExpectedsForMultipleDiffs + # + # source://rspec-expectations//lib/rspec/matchers/expecteds_for_multiple_diffs.rb#16 + def initialize(expected_list); end + + # Returns message with diff(s) appended for provided differ + # factory and actual value if there are any + # + # @api private + # @param message [String] original failure message + # @param differ [Proc] + # @param actual [Any] value + # @return [String] + # + # source://rspec-expectations//lib/rspec/matchers/expecteds_for_multiple_diffs.rb#47 + def message_with_diff(message, differ, actual); end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/expecteds_for_multiple_diffs.rb#68 + def diffs(differ, actual); end + + class << self + # Wraps provided matcher list in instance of + # ExpectedForMultipleDiffs. + # + # @api private + # @param matchers [Array] list of matchers to wrap + # @return [RSpec::Matchers::ExpectedsForMultipleDiffs] + # + # source://rspec-expectations//lib/rspec/matchers/expecteds_for_multiple_diffs.rb#36 + def for_many_matchers(matchers); end + + # Wraps provided expected value in instance of + # ExpectedForMultipleDiffs. If provided value is already an + # ExpectedForMultipleDiffs then it just returns it. + # + # @api private + # @param expected [Any] value to be wrapped + # @return [RSpec::Matchers::ExpectedsForMultipleDiffs] + # + # source://rspec-expectations//lib/rspec/matchers/expecteds_for_multiple_diffs.rb#26 + def from(expected); end + + private + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/expecteds_for_multiple_diffs.rb#58 + def diff_label_for(matcher); end + + # @api private + # + # source://rspec-expectations//lib/rspec/matchers/expecteds_for_multiple_diffs.rb#62 + def truncated(description); end + end +end + +# Default diff label when there is only one matcher in diff +# output +# +# @api private +# @private +# +# source://rspec-expectations//lib/rspec/matchers/expecteds_for_multiple_diffs.rb#10 +RSpec::Matchers::ExpectedsForMultipleDiffs::DEFAULT_DIFF_LABEL = T.let(T.unsafe(nil), String) + +# Maximum readable matcher description length +# +# @api private +# @private +# +# source://rspec-expectations//lib/rspec/matchers/expecteds_for_multiple_diffs.rb#14 +RSpec::Matchers::ExpectedsForMultipleDiffs::DESCRIPTION_MAX_LENGTH = T.let(T.unsafe(nil), Integer) + +# source://rspec-expectations//lib/rspec/matchers.rb#958 +RSpec::Matchers::HAS_REGEX = T.let(T.unsafe(nil), Regexp) + +# Provides the necessary plumbing to wrap a matcher with a decorator. +# +# @private +# +# source://rspec-expectations//lib/rspec/matchers/matcher_delegator.rb#5 +class RSpec::Matchers::MatcherDelegator + include ::RSpec::Matchers::Composable + + # @return [MatcherDelegator] a new instance of MatcherDelegator + # + # source://rspec-expectations//lib/rspec/matchers/matcher_delegator.rb#9 + def initialize(base_matcher); end + + # Returns the value of attribute base_matcher. + # + # source://rspec-expectations//lib/rspec/matchers/matcher_delegator.rb#7 + def base_matcher; end + + # source://rspec-expectations//lib/rspec/matchers/matcher_delegator.rb#13 + def method_missing(*args, &block); end + + private + + # source://rspec-expectations//lib/rspec/matchers/matcher_delegator.rb#29 + def initialize_copy(other); end + + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/matcher_delegator.rb#18 + def respond_to_missing?(name, include_all = T.unsafe(nil)); end +end diff --git a/sorbet/rbi/gems/rspec-its@1.3.0.rbi b/sorbet/rbi/gems/rspec-its@1.3.0.rbi new file mode 100644 index 00000000000..374ff087434 --- /dev/null +++ b/sorbet/rbi/gems/rspec-its@1.3.0.rbi @@ -0,0 +1,197 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rspec-its` gem. +# Please instead update this file by running `bin/tapioca gem rspec-its`. + +# source://rspec-its//lib/rspec/its/version.rb#1 +module RSpec + class << self + # source://rspec-core/3.12.2/lib/rspec/core.rb#70 + def clear_examples; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#85 + def configuration; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#49 + def configuration=(_arg0); end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#97 + def configure; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#194 + def const_missing(name); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def context(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#122 + def current_example; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#128 + def current_example=(example); end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#154 + def current_scope; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#134 + def current_scope=(scope); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def describe(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def example_group(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def fcontext(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def fdescribe(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#58 + def reset; end + + # source://rspec-core/3.12.2/lib/rspec/core/shared_example_group.rb#110 + def shared_context(name, *args, &block); end + + # source://rspec-core/3.12.2/lib/rspec/core/shared_example_group.rb#110 + def shared_examples(name, *args, &block); end + + # source://rspec-core/3.12.2/lib/rspec/core/shared_example_group.rb#110 + def shared_examples_for(name, *args, &block); end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#160 + def world; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#49 + def world=(_arg0); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def xcontext(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def xdescribe(*args, &example_group_block); end + end +end + +module RSpec::Core::SharedContext + include ::RSpec::Its +end + +# source://rspec-its//lib/rspec/its/version.rb#2 +module RSpec::Its + # Creates a nested example group named by the submitted `attribute`, + # and then generates an example using the submitted block. + # + # The attribute can be a `Symbol` or a `String`. Given a `String` + # with dots, the result is as though you concatenated that `String` + # onto the subject in an expression. + # + # When the subject is a `Hash`, you can refer to the Hash keys by + # specifying a `Symbol` or `String` in an array. + # + # With an implicit subject, `is_expected` can be used as an alternative + # to `should` (e.g. for one-liner use). An `are_expected` alias is also + # supplied. + # + # With an implicit subject, `will` can be used as an alternative + # to `expect { subject.attribute }.to matcher` (e.g. for one-liner use). + # + # With an implicit subject, `will_not` can be used as an alternative + # to `expect { subject.attribute }.to_not matcher` (e.g. for one-liner use). + # + # You can pass more than one argument on the `its` block to add + # some metadata to the generated example + # + # Note that this method does not modify `subject` in any way, so if you + # refer to `subject` in `let` or `before` blocks, you're still + # referring to the outer subject. + # + # @example + # + # # This ... + # describe Array do + # its(:size) { should eq(0) } + # end + # + # # ... generates the same runtime structure as this: + # describe Array do + # describe "size" do + # it "should eq(0)" do + # subject.size.should eq(0) + # end + # end + # end + # @example + # + # describe Person do + # subject do + # Person.new.tap do |person| + # person.phone_numbers << "555-1212" + # end + # end + # + # its("phone_numbers.first") { should eq("555-1212") } + # end + # @example + # + # describe "a configuration Hash" do + # subject do + # { :max_users => 3, + # 'admin' => :all_permissions. + # 'john_doe' => {:permissions => [:read, :write]}} + # end + # + # its([:max_users]) { should eq(3) } + # its(['admin']) { should eq(:all_permissions) } + # its(['john_doe', :permissions]) { should eq([:read, :write]) } + # + # # You can still access its regular methods this way: + # its(:keys) { should include(:max_users) } + # its(:count) { should eq(2) } + # end + # @example + # + # describe Array do + # its(:size) { is_expected.to eq(0) } + # end + # @example + # + # describe Array do + # its(:foo) { will raise_error(NoMethodError) } + # end + # @example + # + # describe Array do + # its(:size) { will_not raise_error } + # end + # @example + # + # # This ... + # describe Array do + # its(:size, :focus) { should eq(0) } + # end + # + # # ... generates the same runtime structure as this: + # describe Array do + # describe "size" do + # it "should eq(0)", :focus do + # subject.size.should eq(0) + # end + # end + # end + # @example + # + # describe Person do + # subject { Person.new } + # before { subject.age = 25 } + # its(:age) { should eq(25) } + # end + # + # source://rspec-its//lib/rspec/its.rb#121 + def its(attribute, *options, &block); end +end + +# source://rspec-its//lib/rspec/its/version.rb#3 +RSpec::Its::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/rspec-mocks@3.12.6.rbi b/sorbet/rbi/gems/rspec-mocks@3.12.6.rbi new file mode 100644 index 00000000000..ac8fc5fdb73 --- /dev/null +++ b/sorbet/rbi/gems/rspec-mocks@3.12.6.rbi @@ -0,0 +1,5310 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rspec-mocks` gem. +# Please instead update this file by running `bin/tapioca gem rspec-mocks`. + +# Share the top-level RSpec namespace, because we are a core supported +# extension. +# +# source://rspec-mocks//lib/rspec/mocks/instance_method_stasher.rb#1 +module RSpec + class << self + # source://rspec-core/3.12.2/lib/rspec/core.rb#70 + def clear_examples; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#85 + def configuration; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#49 + def configuration=(_arg0); end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#97 + def configure; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#194 + def const_missing(name); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def context(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#122 + def current_example; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#128 + def current_example=(example); end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#154 + def current_scope; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#134 + def current_scope=(scope); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def describe(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def example_group(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def fcontext(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def fdescribe(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#58 + def reset; end + + # source://rspec-core/3.12.2/lib/rspec/core/shared_example_group.rb#110 + def shared_context(name, *args, &block); end + + # source://rspec-core/3.12.2/lib/rspec/core/shared_example_group.rb#110 + def shared_examples(name, *args, &block); end + + # source://rspec-core/3.12.2/lib/rspec/core/shared_example_group.rb#110 + def shared_examples_for(name, *args, &block); end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#160 + def world; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#49 + def world=(_arg0); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def xcontext(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def xdescribe(*args, &example_group_block); end + end +end + +# Contains top-level utility methods. While this contains a few +# public methods, these are not generally meant to be called from +# a test or example. They exist primarily for integration with +# test frameworks (such as rspec-core). +# +# source://rspec-mocks//lib/rspec/mocks/instance_method_stasher.rb#2 +module RSpec::Mocks + class << self + # Adds an allowance (stub) on `subject` + # + # @example Defines the implementation of `foo` on `bar`, using the passed block + # x = 0 + # RSpec::Mocks.allow_message(bar, :foo) { x += 1 } + # @param subject the subject to which the message will be added + # @param message a symbol, representing the message that will be + # added. + # @param opts a hash of options, :expected_from is used to set the + # original call site + # @yield an optional implementation for the allowance + # + # source://rspec-mocks//lib/rspec/mocks.rb#69 + def allow_message(subject, message, opts = T.unsafe(nil), &block); end + + # Mocks specific configuration, as distinct from `RSpec.configuration` + # which is core RSpec configuration. + # + # source://rspec-mocks//lib/rspec/mocks/configuration.rb#206 + def configuration; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#386 + def error_generator; end + + # Sets a message expectation on `subject`. + # + # @example Expect the message `foo` to receive `bar`, then call it + # RSpec::Mocks.expect_message(bar, :foo) + # bar.foo + # @param subject the subject on which the message will be expected + # @param message a symbol, representing the message that will be + # expected. + # @param opts a hash of options, :expected_from is used to set the + # original call site + # @yield an optional implementation for the expectation + # + # source://rspec-mocks//lib/rspec/mocks.rb#84 + def expect_message(subject, message, opts = T.unsafe(nil), &block); end + + # Performs per-test/example setup. This should be called before + # an test or example begins. + # + # source://rspec-mocks//lib/rspec/mocks.rb#38 + def setup; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks.rb#106 + def space; end + + # Cleans up all test double state (including any methods that were + # redefined on partial doubles). This _must_ be called after + # each example, even if an error was raised during the example. + # + # source://rspec-mocks//lib/rspec/mocks.rb#51 + def teardown; end + + # Verifies any message expectations that were set during the + # test or example. This should be called at the end of an example. + # + # source://rspec-mocks//lib/rspec/mocks.rb#44 + def verify; end + + # Call the passed block and verify mocks after it has executed. This allows + # mock usage in arbitrary places, such as a `before(:all)` hook. + # + # @return [Object] the return value from the block + # + # source://rspec-mocks//lib/rspec/mocks.rb#92 + def with_temporary_scope; end + end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/targets.rb#92 +class RSpec::Mocks::AllowanceTarget < ::RSpec::Mocks::TargetBase + # source://rspec-mocks//lib/rspec/mocks/targets.rb#93 + def expression; end + + # source://rspec-mocks//lib/rspec/mocks/targets.rb#29 + def not_to(matcher, *_args); end + + # source://rspec-mocks//lib/rspec/mocks/targets.rb#6 + def to(matcher, &block); end + + # source://rspec-mocks//lib/rspec/mocks/targets.rb#29 + def to_not(matcher, *_args); end +end + +# Handles the implementation of an `and_invoke` implementation. +# +# @private +# +# source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#737 +class RSpec::Mocks::AndInvokeImplementation + # @return [AndInvokeImplementation] a new instance of AndInvokeImplementation + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#738 + def initialize(procs_to_invoke); end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#742 + def call(*args, &block); end +end + +# Handles the implementation of an `and_return` implementation. +# +# @private +# +# source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#721 +class RSpec::Mocks::AndReturnImplementation + # @return [AndReturnImplementation] a new instance of AndReturnImplementation + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#722 + def initialize(values_to_return); end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#726 + def call(*_args_to_ignore, &_block); end +end + +# Represents an `and_call_original` implementation. +# +# @private +# +# source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#779 +class RSpec::Mocks::AndWrapOriginalImplementation + # @return [AndWrapOriginalImplementation] a new instance of AndWrapOriginalImplementation + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#780 + def initialize(method, block); end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#807 + def call(*args, **_arg1, &block); end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#787 + def initial_action=(_value); end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#803 + def inner_action; end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#791 + def inner_action=(_value); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#799 + def present?; end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#795 + def terminal_action=(_value); end + + private + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#814 + def cannot_modify_further_error; end +end + +# source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#785 +class RSpec::Mocks::AndWrapOriginalImplementation::CannotModifyFurtherError < ::StandardError; end + +# Handles the implementation of an `and_yield` declaration. +# +# @private +# +# source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#694 +class RSpec::Mocks::AndYieldImplementation + # @return [AndYieldImplementation] a new instance of AndYieldImplementation + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#695 + def initialize(args_to_yield, eval_context, error_generator); end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#701 + def call(*_args_to_ignore, &block); end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#4 +module RSpec::Mocks::AnyInstance + class << self + # source://rspec-mocks//lib/rspec/mocks/any_instance/error_generator.rb#26 + def error_generator; end + end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#6 +class RSpec::Mocks::AnyInstance::Chain + include ::RSpec::Mocks::AnyInstance::Chain::Customizations + + # @return [Chain] a new instance of Chain + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#7 + def initialize(recorder, *args, &block); end + + # @private + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#61 + def constrained_to_any_of?(*constraints); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#75 + def expectation_fulfilled!; end + + # @private + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#70 + def matches_args?(*args); end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#79 + def never; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#53 + def playback!(instance); end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#84 + def with(*args, &block); end + + private + + # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#99 + def last_message; end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#95 + def messages; end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#91 + def negated?; end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#103 + def record(rspec_method_name, *args, &block); end +end + +# Provides convenience methods for recording customizations on message +# expectations. +# +# @private +# +# source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#18 +module RSpec::Mocks::AnyInstance::Chain::Customizations + # Records the `and_call_original` message for playback against an instance that + # invokes a method stubbed or mocked using `any_instance`. + # + # @see RSpec::Mocks::MessageExpectation#and_call_original + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#27 + def and_call_original(*args, &block); end + + # Records the `and_raise` message for playback against an instance that + # invokes a method stubbed or mocked using `any_instance`. + # + # @see RSpec::Mocks::MessageExpectation#and_raise + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#27 + def and_raise(*args, &block); end + + # Records the `and_return` message for playback against an instance that + # invokes a method stubbed or mocked using `any_instance`. + # + # @see RSpec::Mocks::MessageExpectation#and_return + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#27 + def and_return(*args, &block); end + + # Records the `and_throw` message for playback against an instance that + # invokes a method stubbed or mocked using `any_instance`. + # + # @see RSpec::Mocks::MessageExpectation#and_throw + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#27 + def and_throw(*args, &block); end + + # Records the `and_wrap_original` message for playback against an instance that + # invokes a method stubbed or mocked using `any_instance`. + # + # @see RSpec::Mocks::MessageExpectation#and_wrap_original + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#27 + def and_wrap_original(*args, &block); end + + # Records the `and_yield` message for playback against an instance that + # invokes a method stubbed or mocked using `any_instance`. + # + # @see RSpec::Mocks::MessageExpectation#and_yield + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#27 + def and_yield(*args, &block); end + + # Records the `at_least` message for playback against an instance that + # invokes a method stubbed or mocked using `any_instance`. + # + # @see RSpec::Mocks::MessageExpectation#at_least + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#27 + def at_least(*args, &block); end + + # Records the `at_most` message for playback against an instance that + # invokes a method stubbed or mocked using `any_instance`. + # + # @see RSpec::Mocks::MessageExpectation#at_most + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#27 + def at_most(*args, &block); end + + # Records the `exactly` message for playback against an instance that + # invokes a method stubbed or mocked using `any_instance`. + # + # @see RSpec::Mocks::MessageExpectation#exactly + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#27 + def exactly(*args, &block); end + + # Records the `never` message for playback against an instance that + # invokes a method stubbed or mocked using `any_instance`. + # + # @see RSpec::Mocks::MessageExpectation#never + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#27 + def never(*args, &block); end + + # Records the `once` message for playback against an instance that + # invokes a method stubbed or mocked using `any_instance`. + # + # @see RSpec::Mocks::MessageExpectation#once + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#27 + def once(*args, &block); end + + # Records the `thrice` message for playback against an instance that + # invokes a method stubbed or mocked using `any_instance`. + # + # @see RSpec::Mocks::MessageExpectation#thrice + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#27 + def thrice(*args, &block); end + + # Records the `time` message for playback against an instance that + # invokes a method stubbed or mocked using `any_instance`. + # + # @see RSpec::Mocks::MessageExpectation#time + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#27 + def time(*args, &block); end + + # Records the `times` message for playback against an instance that + # invokes a method stubbed or mocked using `any_instance`. + # + # @see RSpec::Mocks::MessageExpectation#times + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#27 + def times(*args, &block); end + + # Records the `twice` message for playback against an instance that + # invokes a method stubbed or mocked using `any_instance`. + # + # @see RSpec::Mocks::MessageExpectation#twice + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#27 + def twice(*args, &block); end + + # Records the `with` message for playback against an instance that + # invokes a method stubbed or mocked using `any_instance`. + # + # @see RSpec::Mocks::MessageExpectation#with + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#27 + def with(*args, &block); end + + class << self + # source://rspec-mocks//lib/rspec/mocks/any_instance/chain.rb#26 + def record(method_name); end + end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/any_instance/error_generator.rb#5 +class RSpec::Mocks::AnyInstance::ErrorGenerator < ::RSpec::Mocks::ErrorGenerator + # source://rspec-mocks//lib/rspec/mocks/any_instance/error_generator.rb#11 + def raise_does_not_implement_error(klass, method_name); end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/error_generator.rb#15 + def raise_message_already_received_by_other_instance_error(method_name, object_inspect, invoked_instance); end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/error_generator.rb#20 + def raise_not_supported_with_prepend_error(method_name, problem_mod); end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/error_generator.rb#6 + def raise_second_instance_received_message_error(unfulfilled_expectations); end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/any_instance/expect_chain_chain.rb#5 +class RSpec::Mocks::AnyInstance::ExpectChainChain < ::RSpec::Mocks::AnyInstance::StubChain + # @return [ExpectChainChain] a new instance of ExpectChainChain + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/expect_chain_chain.rb#6 + def initialize(*args); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/expect_chain_chain.rb#11 + def expectation_fulfilled?; end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/expect_chain_chain.rb#15 + def playback!(instance); end + + private + + # source://rspec-mocks//lib/rspec/mocks/any_instance/expect_chain_chain.rb#21 + def create_message_expectation_on(instance); end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/expect_chain_chain.rb#25 + def invocation_order; end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/any_instance/expectation_chain.rb#5 +class RSpec::Mocks::AnyInstance::ExpectationChain < ::RSpec::Mocks::AnyInstance::Chain + # @return [ExpectationChain] a new instance of ExpectationChain + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/expectation_chain.rb#10 + def initialize(*args, &block); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/expectation_chain.rb#6 + def expectation_fulfilled?; end + + private + + # source://rspec-mocks//lib/rspec/mocks/any_instance/expectation_chain.rb#17 + def verify_invocation_order(_rspec_method_name, *_args, &_block); end +end + +# Delegates messages to each of the given targets in order to +# provide the fluent interface that is available off of message +# expectations when dealing with `any_instance`. +# +# `targets` will typically contain 1 of the `AnyInstance::Recorder` +# return values and N `MessageExpectation` instances (one per instance +# of the `any_instance` klass). +# +# @private +# +# source://rspec-mocks//lib/rspec/mocks/any_instance/proxy.rb#103 +class RSpec::Mocks::AnyInstance::FluentInterfaceProxy < ::BasicObject + # @return [FluentInterfaceProxy] a new instance of FluentInterfaceProxy + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/proxy.rb#104 + def initialize(targets); end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/proxy.rb#118 + def method_missing(*args, &block); end + + private + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/proxy.rb#109 + def respond_to_missing?(method_name, include_private = T.unsafe(nil)); end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/any_instance/message_chains.rb#5 +class RSpec::Mocks::AnyInstance::MessageChains + # @return [MessageChains] a new instance of MessageChains + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/message_chains.rb#6 + def initialize; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/message_chains.rb#11 + def [](method_name); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/message_chains.rb#16 + def add(method_name, chain); end + + # @private + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/message_chains.rb#43 + def all_expectations_fulfilled?; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/message_chains.rb#36 + def each_unfulfilled_expectation_matching(method_name, *args); end + + # @private + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/message_chains.rb#29 + def has_expectation?(method_name); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/message_chains.rb#64 + def playback!(instance, method_name); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/message_chains.rb#57 + def received_expected_message!(method_name); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/message_chains.rb#22 + def remove_stub_chains_for!(method_name); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/message_chains.rb#50 + def unfulfilled_expectations; end + + private + + # source://rspec-mocks//lib/rspec/mocks/any_instance/message_chains.rb#73 + def raise_if_second_instance_to_receive_message(instance); end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/any_instance/expectation_chain.rb#22 +class RSpec::Mocks::AnyInstance::PositiveExpectationChain < ::RSpec::Mocks::AnyInstance::ExpectationChain + private + + # source://rspec-mocks//lib/rspec/mocks/any_instance/expectation_chain.rb#25 + def create_message_expectation_on(instance); end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/expectation_chain.rb#44 + def invocation_order; end +end + +# source://rspec-mocks//lib/rspec/mocks/any_instance/expectation_chain.rb#38 +RSpec::Mocks::AnyInstance::PositiveExpectationChain::ExpectationInvocationOrder = T.let(T.unsafe(nil), Hash) + +# The `AnyInstance::Recorder` is responsible for redefining the klass's +# instance method in order to add any stubs/expectations the first time +# the method is called. It's not capable of updating a stub on an instance +# that's already been previously stubbed (either directly, or via +# `any_instance`). +# +# This proxy sits in front of the recorder and delegates both to it +# and to the `RSpec::Mocks::Proxy` for each already mocked or stubbed +# instance of the class, in order to propagates changes to the instances. +# +# Note that unlike `RSpec::Mocks::Proxy`, this proxy class is stateless +# and is not persisted in `RSpec::Mocks.space`. +# +# Proxying for the message expectation fluent interface (typically chained +# off of the return value of one of these methods) is provided by the +# `FluentInterfaceProxy` class below. +# +# @private +# +# source://rspec-mocks//lib/rspec/mocks/any_instance/proxy.rb#21 +class RSpec::Mocks::AnyInstance::Proxy + # @return [Proxy] a new instance of Proxy + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/proxy.rb#22 + def initialize(recorder, target_proxies); end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/proxy.rb#55 + def expect_chain(*chain, &block); end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/proxy.rb#27 + def klass; end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/proxy.rb#71 + def should_not_receive(method_name, &block); end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/proxy.rb#61 + def should_receive(method_name, &block); end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/proxy.rb#31 + def stub(method_name_or_method_map, &block); end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/proxy.rb#49 + def stub_chain(*chain, &block); end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/proxy.rb#43 + def unstub(method_name); end + + private + + # source://rspec-mocks//lib/rspec/mocks/any_instance/proxy.rb#79 + def perform_proxying(method_name, args, block, &target_proxy_block); end +end + +# Given a class `TheClass`, `TheClass.any_instance` returns a `Recorder`, +# which records stubs and message expectations for later playback on +# instances of `TheClass`. +# +# Further constraints are stored in instances of [Chain](Chain). +# +# @see AnyInstance +# @see Chain +# +# source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#12 +class RSpec::Mocks::AnyInstance::Recorder + # @return [Recorder] a new instance of Recorder + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#16 + def initialize(klass); end + + # @private + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#127 + def already_observing?(method_name); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#122 + def build_alias_method_name(method_name); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#53 + def expect_chain(*method_names_and_optional_return_values, &block); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#117 + def instance_that_received(method_name); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#14 + def klass; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#14 + def message_chains; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#132 + def notify_received_message(_object, message, args, _blk); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#109 + def playback!(instance, method_name); end + + # The opposite of `should_receive` + # + # @see Methods#should_not_receive + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#75 + def should_not_receive(method_name, &block); end + + # Initializes the recording a message expectation to be played back + # against any instance of this object that invokes the submitted + # method. + # + # @see Methods#should_receive + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#66 + def should_receive(method_name, &block); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#104 + def stop_all_observation!; end + + # Initializes the recording a stub to be played back against any + # instance of this object that invokes the submitted method. + # + # @see Methods#stub + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#35 + def stub(method_name, &block); end + + # Initializes the recording a stub chain to be played back against any + # instance of this object that invokes the method matching the first + # argument. + # + # @see Methods#stub_chain + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#45 + def stub_chain(*method_names_and_optional_return_values, &block); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#14 + def stubs; end + + # Removes any previously recorded stubs, stub_chains or message + # expectations that use `method_name`. + # + # @see Methods#unstub + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#83 + def unstub(method_name); end + + # Used internally to verify that message expectations have been + # fulfilled. + # + # @api private + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#96 + def verify; end + + protected + + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#148 + def stop_observing!(method_name); end + + private + + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#280 + def allow_no_prepended_module_definition_of(method_name); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#159 + def ancestor_is_an_observer?(method_name); end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#233 + def backup_method!(method_name); end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#267 + def mark_invoked!(method_name); end + + # @yield [args.first, args] + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#176 + def normalize_chain(*args); end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#247 + def observe!(method_name); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#243 + def public_protected_or_private_method_defined?(method_name); end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#181 + def received_expected_message!(method_name); end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#227 + def remove_dummy_method!(method_name); end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#187 + def restore_method!(method_name); end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#195 + def restore_original_method!(method_name); end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#168 + def super_class_observers_for(method_name); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#172 + def super_class_observing?(method_name); end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/any_instance/stub_chain.rb#6 +class RSpec::Mocks::AnyInstance::StubChain < ::RSpec::Mocks::AnyInstance::Chain + # @private + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/stub_chain.rb#7 + def expectation_fulfilled?; end + + private + + # source://rspec-mocks//lib/rspec/mocks/any_instance/stub_chain.rb#13 + def create_message_expectation_on(instance); end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/stub_chain.rb#40 + def invocation_order; end + + # @raise [NoMethodError] + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/stub_chain.rb#44 + def verify_invocation_order(rspec_method_name, *_args, &_block); end +end + +# source://rspec-mocks//lib/rspec/mocks/any_instance/stub_chain.rb#38 +RSpec::Mocks::AnyInstance::StubChain::EmptyInvocationOrder = T.let(T.unsafe(nil), Hash) + +# source://rspec-mocks//lib/rspec/mocks/any_instance/stub_chain.rb#28 +RSpec::Mocks::AnyInstance::StubChain::InvocationOrder = T.let(T.unsafe(nil), Hash) + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/any_instance/stub_chain_chain.rb#5 +class RSpec::Mocks::AnyInstance::StubChainChain < ::RSpec::Mocks::AnyInstance::StubChain + # @return [StubChainChain] a new instance of StubChainChain + # + # source://rspec-mocks//lib/rspec/mocks/any_instance/stub_chain_chain.rb#6 + def initialize(*args); end + + private + + # source://rspec-mocks//lib/rspec/mocks/any_instance/stub_chain_chain.rb#13 + def create_message_expectation_on(instance); end + + # source://rspec-mocks//lib/rspec/mocks/any_instance/stub_chain_chain.rb#17 + def invocation_order; end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/targets.rb#103 +class RSpec::Mocks::AnyInstanceAllowanceTarget < ::RSpec::Mocks::TargetBase + # source://rspec-mocks//lib/rspec/mocks/targets.rb#104 + def expression; end + + # source://rspec-mocks//lib/rspec/mocks/targets.rb#29 + def not_to(matcher, *_args); end + + # source://rspec-mocks//lib/rspec/mocks/targets.rb#6 + def to(matcher, &block); end + + # source://rspec-mocks//lib/rspec/mocks/targets.rb#29 + def to_not(matcher, *_args); end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/targets.rb#114 +class RSpec::Mocks::AnyInstanceExpectationTarget < ::RSpec::Mocks::TargetBase + # source://rspec-mocks//lib/rspec/mocks/targets.rb#115 + def expression; end + + # source://rspec-mocks//lib/rspec/mocks/targets.rb#16 + def not_to(matcher, &block); end + + # source://rspec-mocks//lib/rspec/mocks/targets.rb#6 + def to(matcher, &block); end + + # source://rspec-mocks//lib/rspec/mocks/targets.rb#16 + def to_not(matcher, &block); end +end + +# Wrapper for matching arguments against a list of expected values. Used by +# the `with` method on a `MessageExpectation`: +# +# expect(object).to receive(:message).with(:a, 'b', 3) +# object.message(:a, 'b', 3) +# +# Values passed to `with` can be literal values or argument matchers that +# match against the real objects .e.g. +# +# expect(object).to receive(:message).with(hash_including(:a => 'b')) +# +# Can also be used directly to match the contents of any `Array`. This +# enables 3rd party mocking libs to take advantage of rspec's argument +# matching without using the rest of rspec-mocks. +# +# require 'rspec/mocks/argument_list_matcher' +# include RSpec::Mocks::ArgumentMatchers +# +# arg_list_matcher = RSpec::Mocks::ArgumentListMatcher.new(123, hash_including(:a => 'b')) +# arg_list_matcher.args_match?(123, :a => 'b') +# +# This class is immutable. +# +# @see ArgumentMatchers +# +# source://rspec-mocks//lib/rspec/mocks/argument_list_matcher.rb#33 +class RSpec::Mocks::ArgumentListMatcher + # Initializes an `ArgumentListMatcher` with a collection of literal + # values and/or argument matchers. + # + # @api public + # @param expected_args [Array] a list of expected literals and/or argument matchers + # @return [ArgumentListMatcher] a new instance of ArgumentListMatcher + # @see ArgumentMatchers + # @see #args_match? + # + # source://rspec-mocks//lib/rspec/mocks/argument_list_matcher.rb#45 + def initialize(*expected_args, **_arg1); end + + # Matches each element in the `expected_args` against the element in the same + # position of the arguments passed to `new`. + # + # @api public + # @param actual_args [Array] + # @return [Boolean] + # @see #initialize + # + # source://rspec-mocks//lib/rspec/mocks/argument_list_matcher.rb#58 + def args_match?(*actual_args, **_arg1); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/argument_list_matcher.rb#35 + def expected_args; end + + # Resolves abstract arg placeholders like `no_args` and `any_args` into + # a more concrete arg list based on the provided `actual_args`. + # + # @private + # + # source://rspec-mocks//lib/rspec/mocks/argument_list_matcher.rb#81 + def resolve_expected_args_based_on(actual_args); end + + private + + # source://rspec-mocks//lib/rspec/mocks/argument_list_matcher.rb#100 + def ensure_expected_args_valid!; end + + # source://rspec-mocks//lib/rspec/mocks/argument_list_matcher.rb#92 + def replace_any_args_with_splat_of_anything(before_count, actual_args_count); end +end + +# Value that will match all argument lists. +# +# @private +# +# source://rspec-mocks//lib/rspec/mocks/argument_list_matcher.rb#114 +RSpec::Mocks::ArgumentListMatcher::MATCH_ALL = T.let(T.unsafe(nil), RSpec::Mocks::ArgumentListMatcher) + +# ArgumentMatchers are placeholders that you can include in message +# expectations to match arguments against a broader check than simple +# equality. +# +# With the exception of `any_args` and `no_args`, they all match against +# the arg in same position in the argument list. +# +# @see ArgumentListMatcher +# +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#16 +module RSpec::Mocks::ArgumentMatchers + # Matches if `arg.kind_of?(klass)` + # + # @example + # expect(object).to receive(:message).with(kind_of(Thing)) + # + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#111 + def a_kind_of(klass); end + + # Matches if `arg.instance_of?(klass)` + # + # @example + # expect(object).to receive(:message).with(instance_of(Thing)) + # + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#101 + def an_instance_of(klass); end + + # Acts like an arg splat, matching any number of args at any point in an arg list. + # + # @example + # expect(object).to receive(:message).with(1, 2, any_args) + # + # # matches any of these: + # object.message(1, 2) + # object.message(1, 2, 3) + # object.message(1, 2, 3, 4) + # + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#26 + def any_args; end + + # Matches any argument at all. + # + # @example + # expect(object).to receive(:message).with(anything) + # + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#34 + def anything; end + + # Matches an array that includes the specified items at least once. + # Ignores duplicates and additional values + # + # @example + # expect(object).to receive(:message).with(array_including(1,2,3)) + # expect(object).to receive(:message).with(array_including([1,2,3])) + # + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#80 + def array_including(*args); end + + # Matches a boolean value. + # + # @example + # expect(object).to receive(:message).with(boolean()) + # + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#59 + def boolean; end + + # Matches if the actual argument responds to the specified messages. + # + # @example + # expect(object).to receive(:message).with(duck_type(:hello)) + # expect(object).to receive(:message).with(duck_type(:hello, :goodbye)) + # + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#51 + def duck_type(*args); end + + # Matches a hash that doesn't include the specified key(s) or key/value. + # + # @example + # expect(object).to receive(:message).with(hash_excluding(:key => val)) + # expect(object).to receive(:message).with(hash_excluding(:key)) + # expect(object).to receive(:message).with(hash_excluding(:key, :key2 => :val2)) + # + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#91 + def hash_excluding(*args); end + + # Matches a hash that includes the specified key(s) or key/value pairs. + # Ignores any additional keys. + # + # @example + # expect(object).to receive(:message).with(hash_including(:key => val)) + # expect(object).to receive(:message).with(hash_including(:key)) + # expect(object).to receive(:message).with(hash_including(:key, :key2 => val2)) + # + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#70 + def hash_including(*args); end + + # Matches a hash that doesn't include the specified key(s) or key/value. + # + # @example + # expect(object).to receive(:message).with(hash_excluding(:key => val)) + # expect(object).to receive(:message).with(hash_excluding(:key)) + # expect(object).to receive(:message).with(hash_excluding(:key, :key2 => :val2)) + # + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#91 + def hash_not_including(*args); end + + # Matches if `arg.instance_of?(klass)` + # + # @example + # expect(object).to receive(:message).with(instance_of(Thing)) + # + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#101 + def instance_of(klass); end + + # Matches if `arg.kind_of?(klass)` + # + # @example + # expect(object).to receive(:message).with(kind_of(Thing)) + # + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#111 + def kind_of(klass); end + + # Matches no arguments. + # + # @example + # expect(object).to receive(:message).with(no_args) + # + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#42 + def no_args; end + + class << self + # @private + # + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#118 + def anythingize_lonely_keys(*args); end + end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#149 +class RSpec::Mocks::ArgumentMatchers::AnyArgMatcher < ::RSpec::Mocks::ArgumentMatchers::SingletonMatcher + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#150 + def ===(_other); end + + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#154 + def description; end +end + +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#137 +RSpec::Mocks::ArgumentMatchers::AnyArgMatcher::INSTANCE = T.let(T.unsafe(nil), RSpec::Mocks::ArgumentMatchers::AnyArgMatcher) + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#142 +class RSpec::Mocks::ArgumentMatchers::AnyArgsMatcher < ::RSpec::Mocks::ArgumentMatchers::SingletonMatcher + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#143 + def description; end +end + +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#137 +RSpec::Mocks::ArgumentMatchers::AnyArgsMatcher::INSTANCE = T.let(T.unsafe(nil), RSpec::Mocks::ArgumentMatchers::AnyArgsMatcher) + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#232 +class RSpec::Mocks::ArgumentMatchers::ArrayIncludingMatcher + # @return [ArrayIncludingMatcher] a new instance of ArrayIncludingMatcher + # + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#233 + def initialize(expected); end + + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#237 + def ===(actual); end + + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#248 + def description; end + + private + + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#254 + def formatted_expected_values; end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#178 +class RSpec::Mocks::ArgumentMatchers::BaseHashMatcher + # @return [BaseHashMatcher] a new instance of BaseHashMatcher + # + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#179 + def initialize(expected); end + + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#183 + def ===(predicate, actual); end + + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#191 + def description(name); end + + private + + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#197 + def formatted_expected_hash; end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#167 +class RSpec::Mocks::ArgumentMatchers::BooleanMatcher < ::RSpec::Mocks::ArgumentMatchers::SingletonMatcher + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#168 + def ===(value); end + + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#172 + def description; end +end + +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#137 +RSpec::Mocks::ArgumentMatchers::BooleanMatcher::INSTANCE = T.let(T.unsafe(nil), RSpec::Mocks::ArgumentMatchers::BooleanMatcher) + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#262 +class RSpec::Mocks::ArgumentMatchers::DuckTypeMatcher + # @return [DuckTypeMatcher] a new instance of DuckTypeMatcher + # + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#263 + def initialize(*methods_to_respond_to); end + + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#267 + def ===(value); end + + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#271 + def description; end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#221 +class RSpec::Mocks::ArgumentMatchers::HashExcludingMatcher < ::RSpec::Mocks::ArgumentMatchers::BaseHashMatcher + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#222 + def ===(actual); end + + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#226 + def description; end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#210 +class RSpec::Mocks::ArgumentMatchers::HashIncludingMatcher < ::RSpec::Mocks::ArgumentMatchers::BaseHashMatcher + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#211 + def ===(actual); end + + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#215 + def description; end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#277 +class RSpec::Mocks::ArgumentMatchers::InstanceOf + # @return [InstanceOf] a new instance of InstanceOf + # + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#278 + def initialize(klass); end + + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#282 + def ===(actual); end + + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#286 + def description; end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#292 +class RSpec::Mocks::ArgumentMatchers::KindOf + # @return [KindOf] a new instance of KindOf + # + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#293 + def initialize(klass); end + + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#297 + def ===(actual); end + + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#301 + def description; end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#160 +class RSpec::Mocks::ArgumentMatchers::NoArgsMatcher < ::RSpec::Mocks::ArgumentMatchers::SingletonMatcher + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#161 + def description; end +end + +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#137 +RSpec::Mocks::ArgumentMatchers::NoArgsMatcher::INSTANCE = T.let(T.unsafe(nil), RSpec::Mocks::ArgumentMatchers::NoArgsMatcher) + +# Intended to be subclassed by stateless, immutable argument matchers. +# Provides a `::INSTANCE` constant for accessing a global +# singleton instance of the matcher. There is no need to construct +# multiple instance since there is no state. It also facilities the +# special case logic we need for some of these matchers, by making it +# easy to do comparisons like: `[klass::INSTANCE] == args` rather than +# `args.count == 1 && klass === args.first`. +# +# @private +# +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#133 +class RSpec::Mocks::ArgumentMatchers::SingletonMatcher + class << self + # @private + # + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#136 + def inherited(subklass); end + + private + + def new(*_arg0); end + end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#7 +class RSpec::Mocks::CallbackInvocationStrategy + # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#8 + def call(doubled_module); end +end + +# Raised for situations that RSpec cannot support due to mutations made +# externally on arguments that RSpec is holding onto to use for later +# comparisons. +# +# @deprecated We no longer raise this error but the constant remains until +# RSpec 4 for SemVer reasons. +# +# source://rspec-mocks//lib/rspec/mocks/error_generator.rb#26 +class RSpec::Mocks::CannotSupportArgMutationsError < ::StandardError; end + +# When a class's `.new` method is stubbed, we want to use the method +# signature from `#initialize` because `.new`'s signature is a generic +# `def new(*args)` and it simply delegates to `#initialize` and forwards +# all args...so the method with the actually used signature is `#initialize`. +# +# This method reference implementation handles that specific case. +# +# @private +# +# source://rspec-mocks//lib/rspec/mocks/method_reference.rb#184 +class RSpec::Mocks::ClassNewMethodReference < ::RSpec::Mocks::ObjectMethodReference + # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#207 + def with_signature; end + + class << self + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#185 + def applies_to?(method_name); end + + # Ruby 2's Method#== is too strict + # + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#198 + def uses_class_new?(klass); end + end +end + +# source://rspec-mocks//lib/rspec/mocks/method_reference.rb#196 +RSpec::Mocks::ClassNewMethodReference::CLASS_NEW = T.let(T.unsafe(nil), UnboundMethod) + +# Effectively the same as an ObjectVerifyingDouble (since a class is a type +# of object), except with Module in the inheritance chain so that +# transferring nested constants to work. +# +# @private +# +# source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#119 +class RSpec::Mocks::ClassVerifyingDouble < ::Module + include ::RSpec::Mocks::TestDouble + include ::RSpec::Mocks::VerifyingDouble + include ::RSpec::Mocks::ObjectVerifyingDoubleMethods +end + +# Provides configuration options for rspec-mocks. +# +# source://rspec-mocks//lib/rspec/mocks/configuration.rb#4 +class RSpec::Mocks::Configuration + # @return [Configuration] a new instance of Configuration + # + # source://rspec-mocks//lib/rspec/mocks/configuration.rb#5 + def initialize; end + + # Adds `stub` and `should_receive` to the given + # modules or classes. This is usually only necessary + # if you application uses some proxy classes that + # "strip themselves down" to a bare minimum set of + # methods and remove `stub` and `should_receive` in + # the process. + # + # @example + # RSpec.configure do |rspec| + # rspec.mock_with :rspec do |mocks| + # mocks.add_stub_and_should_receive_to Delegator + # end + # end + # + # source://rspec-mocks//lib/rspec/mocks/configuration.rb#62 + def add_stub_and_should_receive_to(*modules); end + + # Sets whether RSpec will warn, ignore, or fail a test when + # expectations are set on nil. + # By default, when this flag is not set, warning messages are issued when + # expectations are set on nil. This is to prevent false-positives and to + # catch potential bugs early on. + # When set to `true`, warning messages are suppressed. + # When set to `false`, it will raise an error. + # + # @example + # RSpec.configure do |config| + # config.mock_with :rspec do |mocks| + # mocks.allow_message_expectations_on_nil = false + # end + # end + # + # source://rspec-mocks//lib/rspec/mocks/configuration.rb#29 + def allow_message_expectations_on_nil; end + + # Sets whether RSpec will warn, ignore, or fail a test when + # expectations are set on nil. + # By default, when this flag is not set, warning messages are issued when + # expectations are set on nil. This is to prevent false-positives and to + # catch potential bugs early on. + # When set to `true`, warning messages are suppressed. + # When set to `false`, it will raise an error. + # + # @example + # RSpec.configure do |config| + # config.mock_with :rspec do |mocks| + # mocks.allow_message_expectations_on_nil = false + # end + # end + # + # source://rspec-mocks//lib/rspec/mocks/configuration.rb#29 + def allow_message_expectations_on_nil=(_arg0); end + + # Provides a way to perform customisations when verifying doubles. + # + # @example + # RSpec::Mocks.configuration.before_verifying_doubles do |ref| + # ref.some_method! + # end + # + # source://rspec-mocks//lib/rspec/mocks/configuration.rb#128 + def before_verifying_doubles(&block); end + + # Indicates whether or not diffs should be colored. + # Delegates to rspec-core's color option if rspec-core + # is loaded; otherwise you can set it here. + # + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/configuration.rb#164 + def color?; end + + # Monkey-patch `Marshal.dump` to enable dumping of mocked or stubbed + # objects. By default this will not work since RSpec mocks works by + # adding singleton methods that cannot be serialized. This patch removes + # these singleton methods before serialization. Setting to falsey removes + # the patch. + # + # This method is idempotent. + # + # source://rspec-mocks//lib/rspec/mocks/configuration.rb#188 + def patch_marshal_to_support_partial_doubles=(val); end + + # Resets the configured syntax to the default. + # + # @api private + # + # source://rspec-mocks//lib/rspec/mocks/configuration.rb#198 + def reset_syntaxes_to_default; end + + # Returns an array with a list of syntaxes + # that are enabled. + # + # @example + # unless RSpec::Mocks.configuration.syntax.include?(:expect) + # raise "this RSpec extension gem requires the rspec-mocks `:expect` syntax" + # end + # + # source://rspec-mocks//lib/rspec/mocks/configuration.rb#104 + def syntax; end + + # Provides the ability to set either `expect`, + # `should` or both syntaxes. RSpec uses `expect` + # syntax by default. This is needed if you want to + # explicitly enable `should` syntax and/or explicitly + # disable `expect` syntax. + # + # end + # + # @example + # RSpec.configure do |rspec| + # rspec.mock_with :rspec do |mocks| + # mocks.syntax = [:expect, :should] + # end + # + # source://rspec-mocks//lib/rspec/mocks/configuration.rb#81 + def syntax=(*values); end + + # Used to track wether we are temporarily suppressing verifying partial + # doubles with `without_partial_double_verification { ... }` + # + # @private + # + # source://rspec-mocks//lib/rspec/mocks/configuration.rb#161 + def temporarily_suppress_partial_double_verification; end + + # Used to track wether we are temporarily suppressing verifying partial + # doubles with `without_partial_double_verification { ... }` + # + # @private + # + # source://rspec-mocks//lib/rspec/mocks/configuration.rb#161 + def temporarily_suppress_partial_double_verification=(_arg0); end + + # Sets the default for the `transfer_nested_constants` option when + # stubbing constants. + # + # source://rspec-mocks//lib/rspec/mocks/configuration.rb#145 + def transfer_nested_constants=(_arg0); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/configuration.rb#139 + def transfer_nested_constants?; end + + # When this is set to true, an error will be raised when + # `instance_double` or `class_double` is given the name of an undefined + # constant. You probably only want to set this when running your entire + # test suite, with all production code loaded. Setting this for an + # isolated unit test will prevent you from being able to isolate it! + # + # source://rspec-mocks//lib/rspec/mocks/configuration.rb#120 + def verify_doubled_constant_names=(_arg0); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/configuration.rb#111 + def verify_doubled_constant_names?; end + + # When set to true, partial mocks will be verified the same as object + # doubles. Any stubs will have their arguments checked against the original + # method, and methods that do not exist cannot be stubbed. + # + # source://rspec-mocks//lib/rspec/mocks/configuration.rb#150 + def verify_partial_doubles=(val); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/configuration.rb#154 + def verify_partial_doubles?; end + + # Returns an array of blocks to call when verifying doubles + # + # @api private + # + # source://rspec-mocks//lib/rspec/mocks/configuration.rb#135 + def verifying_double_callbacks; end + + # Provides a way to perform customisations when verifying doubles. + # + # @example + # RSpec::Mocks.configuration.before_verifying_doubles do |ref| + # ref.some_method! + # end + # + # source://rspec-mocks//lib/rspec/mocks/configuration.rb#128 + def when_declaring_verifying_double(&block); end + + # Sets whether or not RSpec will yield the receiving instance of a + # message to blocks that are used for any_instance stub implementations. + # When set, the first yielded argument will be the receiving instance. + # Defaults to `true`. + # + # @example + # RSpec.configure do |rspec| + # rspec.mock_with :rspec do |mocks| + # mocks.yield_receiver_to_any_instance_implementation_blocks = false + # end + # end + # + # source://rspec-mocks//lib/rspec/mocks/configuration.rb#46 + def yield_receiver_to_any_instance_implementation_blocks=(_arg0); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/configuration.rb#31 + def yield_receiver_to_any_instance_implementation_blocks?; end +end + +# Provides information about constants that may (or may not) +# have been mutated by rspec-mocks. +# +# source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#7 +class RSpec::Mocks::Constant + extend ::RSpec::Support::RecursiveConstMethods + + # @api private + # @return [Constant] a new instance of Constant + # @yield [_self] + # @yieldparam _self [RSpec::Mocks::Constant] the object that the method was called on + # + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#11 + def initialize(name); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#29 + def hidden=(_arg0); end + + # @return [Boolean] Whether or not rspec-mocks has hidden + # this constant. + # + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#51 + def hidden?; end + + # The default `to_s` isn't very useful, so a custom version is provided. + # + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#62 + def inspect; end + + # @return [Boolean] Whether or not rspec-mocks has mutated + # (stubbed or hidden) this constant. + # + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#39 + def mutated?; end + + # @return [String] The fully qualified name of the constant. + # + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#21 + def name; end + + # @return [Object, nil] The original value (e.g. before it + # was mutated by rspec-mocks) of the constant, or + # nil if the constant was not previously defined. + # + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#26 + def original_value; end + + # @return [Object, nil] The original value (e.g. before it + # was mutated by rspec-mocks) of the constant, or + # nil if the constant was not previously defined. + # + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#26 + def original_value=(_arg0); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#29 + def previously_defined=(_arg0); end + + # @return [Boolean] Whether or not the constant was defined + # before the current example. + # + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#33 + def previously_defined?; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#29 + def stubbed=(_arg0); end + + # @return [Boolean] Whether or not rspec-mocks has stubbed + # this constant. + # + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#45 + def stubbed?; end + + # The default `to_s` isn't very useful, so a custom version is provided. + # + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#62 + def to_s; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#29 + def valid_name=(_arg0); end + + # @return [Boolean] Whether or not the provided constant name + # is a valid Ruby constant name. + # + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#57 + def valid_name?; end + + class << self + # Queries rspec-mocks to find out information about the named constant. + # + # @param name [String] the name of the constant + # @return [Constant] an object containing information about the named + # constant. + # + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#86 + def original(name); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#68 + def unmutated(name); end + end +end + +# Provides a means to stub constants. +# +# source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#93 +class RSpec::Mocks::ConstantMutator + extend ::RSpec::Support::RecursiveConstMethods + + class << self + # Hides a constant. + # + # @note It's recommended that you use `hide_const` in your + # examples. This is an alternate public API that is provided + # so you can hide constants in other contexts (e.g. helper + # classes). + # @param constant_name [String] The fully qualified name of the constant. + # The current constant scoping at the point of call is not considered. + # @see ExampleMethods#hide_const + # + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#131 + def hide(constant_name); end + + # Uses the mutator to mutate (stub or hide) a constant. Ensures that + # the mutator is correctly registered so it can be backed out at the end + # of the test. + # + # @private + # + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#320 + def mutate(mutator); end + + # Used internally by the constant stubbing to raise a helpful + # error when a constant like "A::B::C" is stubbed and A::B is + # not a module (and thus, it's impossible to define "A::B::C" + # since only modules can have nested constants). + # + # @api private + # + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#331 + def raise_on_invalid_const; end + + # Stubs a constant. + # + # @note It's recommended that you use `stub_const` in your + # examples. This is an alternate public API that is provided + # so you can stub constants in other contexts (e.g. helper + # classes). + # @option options + # @param constant_name [String] The fully qualified name of the constant. The current + # constant scoping at the point of call is not considered. + # @param value [Object] The value to make the constant refer to. When the + # example completes, the constant will be restored to its prior state. + # @param options [Hash] Stubbing options. + # @return [Object] the stubbed value of the constant + # @see ExampleMethods#stub_const + # + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#107 + def stub(constant_name, value, options = T.unsafe(nil)); end + end +end + +# Contains common functionality used by all of the constant mutators. +# +# @private +# +# source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#139 +class RSpec::Mocks::ConstantMutator::BaseMutator + include ::RSpec::Support::RecursiveConstMethods + + # @return [BaseMutator] a new instance of BaseMutator + # + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#144 + def initialize(full_constant_name, mutated_value, transfer_nested_constants); end + + # Returns the value of attribute full_constant_name. + # + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#142 + def full_constant_name; end + + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#160 + def idempotently_reset; end + + # Returns the value of attribute original_value. + # + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#142 + def original_value; end + + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#153 + def to_constant; end +end + +# Hides a defined constant for the duration of an example. +# +# @private +# +# source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#169 +class RSpec::Mocks::ConstantMutator::ConstantHider < ::RSpec::Mocks::ConstantMutator::BaseMutator + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#170 + def mutate; end + + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#188 + def reset; end + + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#178 + def to_constant; end +end + +# Replaces a defined constant for the duration of an example. +# +# @private +# +# source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#197 +class RSpec::Mocks::ConstantMutator::DefinedConstantReplacer < ::RSpec::Mocks::ConstantMutator::BaseMutator + # @return [DefinedConstantReplacer] a new instance of DefinedConstantReplacer + # + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#198 + def initialize(*args); end + + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#203 + def mutate; end + + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#223 + def reset; end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#268 + def should_transfer_nested_constants?; end + + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#215 + def to_constant; end + + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#232 + def transfer_nested_constants; end + + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#238 + def verify_constants_to_transfer!; end +end + +# Sets an undefined constant for the duration of an example. +# +# @private +# +# source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#278 +class RSpec::Mocks::ConstantMutator::UndefinedConstantSetter < ::RSpec::Mocks::ConstantMutator::BaseMutator + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#279 + def mutate; end + + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#299 + def reset; end + + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#291 + def to_constant; end + + private + + # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#305 + def name_for(parent, name); end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#104 +RSpec::Mocks::DEFAULT_CALLBACK_INVOCATION_STRATEGY = T.let(T.unsafe(nil), RSpec::Mocks::CallbackInvocationStrategy) + +# An implementation of rspec-mocks' reference interface. +# Used when an object is passed to {ExampleMethods#object_double}, or +# an anonymous class or module is passed to {ExampleMethods#instance_double} +# or {ExampleMethods#class_double}. +# Represents a reference to that object. +# +# @see NamedObjectReference +# +# source://rspec-mocks//lib/rspec/mocks/object_reference.rb#56 +class RSpec::Mocks::DirectObjectReference + # @param object [Object] the object to which this refers + # @return [DirectObjectReference] a new instance of DirectObjectReference + # + # source://rspec-mocks//lib/rspec/mocks/object_reference.rb#58 + def initialize(object); end + + # Defined for interface parity with the other object reference + # implementations. Raises an `ArgumentError` to indicate that `as_stubbed_const` + # is invalid when passing an object argument to `object_double`. + # + # @raise [ArgumentError] + # + # source://rspec-mocks//lib/rspec/mocks/object_reference.rb#70 + def const_to_replace; end + + # Always returns true for an object as the class is defined. + # + # @return [true] + # + # source://rspec-mocks//lib/rspec/mocks/object_reference.rb#85 + def defined?; end + + # @return [String] the object's description (via `#inspect`). + # + # source://rspec-mocks//lib/rspec/mocks/object_reference.rb#63 + def description; end + + # The target of the verifying double (the object itself). + # + # @return [Object] + # + # source://rspec-mocks//lib/rspec/mocks/object_reference.rb#78 + def target; end + + # Yields if the reference target is loaded, providing a generic mechanism + # to optionally run a bit of code only when a reference's target is + # loaded. + # + # This specific implementation always yields because direct references + # are always loaded. + # + # @yield [Object] the target of this reference. + # + # source://rspec-mocks//lib/rspec/mocks/object_reference.rb#97 + def when_loaded; end +end + +# A generic test double object. `double`, `instance_double` and friends +# return an instance of this. +# +# source://rspec-mocks//lib/rspec/mocks/test_double.rb#132 +class RSpec::Mocks::Double + include ::RSpec::Mocks::TestDouble +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/error_generator.rb#36 +class RSpec::Mocks::ErrorGenerator + # @return [ErrorGenerator] a new instance of ErrorGenerator + # + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#39 + def initialize(target = T.unsafe(nil)); end + + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#71 + def default_error_message(expectation, expected_args, actual_args); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#132 + def describe_expectation(verb, message, expected_received_count, _actual_received_count, args); end + + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#215 + def expectation_on_nil_message(method_name); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#222 + def intro(unwrapped = T.unsafe(nil)); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#235 + def method_call_args_description(args, generic_prefix = T.unsafe(nil), matcher_prefix = T.unsafe(nil)); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#44 + def opts; end + + # Sets the attribute opts + # + # @param value the value to set the attribute opts to. + # + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#37 + def opts=(_arg0); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#203 + def raise_already_invoked_error(message, calling_customization); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#193 + def raise_cant_constrain_count_for_negated_have_received_error(count_constraint); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#170 + def raise_double_negation_error(wrapped_expression); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#77 + def raise_expectation_error(message, expected_received_count, argument_list_matcher, actual_received_count, expectation_count_type, args, backtrace_line = T.unsafe(nil), source_id = T.unsafe(nil)); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#164 + def raise_expectation_on_mocked_method(method); end + + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#211 + def raise_expectation_on_nil_error(method_name); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#158 + def raise_expectation_on_unstubbed_method(method); end + + # @private + # @raise [ExpiredTestDoubleError] + # + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#123 + def raise_expired_test_double_error; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#187 + def raise_have_received_disallowed(type, reason); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#118 + def raise_invalid_arguments_error(verifier); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#198 + def raise_method_not_stubbed_error(method_name); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#142 + def raise_missing_block_error(args_to_yield); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#59 + def raise_missing_default_stub_error(expectation, args_for_multiple_calls); end + + # @private + # @raise [NoMethodError] + # + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#111 + def raise_non_public_error(method_name, visibility); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#152 + def raise_only_valid_on_a_partial_double(method); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#137 + def raise_out_of_order_error(message); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#67 + def raise_similar_message_args_error(expectation, args_for_multiple_calls, backtrace_line = T.unsafe(nil)); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#54 + def raise_unexpected_message_args_error(expectation, args_for_multiple_calls, source_id = T.unsafe(nil)); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#49 + def raise_unexpected_message_error(message, args); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#87 + def raise_unimplemented_error(doubled_module, method_name, object); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#178 + def raise_verifying_double_not_defined_error(ref); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#147 + def raise_wrong_arity_error(args_to_yield, signature); end + + private + + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#328 + def __raise(message, backtrace_line = T.unsafe(nil), source_id = T.unsafe(nil)); end + + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#356 + def arg_list(args); end + + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#366 + def count_message(count, expectation_count_type = T.unsafe(nil)); end + + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#302 + def diff_message(expected_args, actual_args); end + + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#324 + def differ; end + + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#268 + def error_message(expectation, args_for_multiple_calls); end + + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#257 + def expected_part_of_expectation_error(expected_received_count, expectation_count_type, argument_list_matcher); end + + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#351 + def format_args(args); end + + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#360 + def format_received_args(args_for_multiple_calls); end + + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#380 + def group_count(index, args); end + + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#376 + def grouped_args(args); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#320 + def list_of_exactly_one_string?(args); end + + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#347 + def notify(*args); end + + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#342 + def prepend_to_backtrace(exception, line); end + + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#250 + def received_part_of_expectation_error(actual_received_count, args); end + + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#372 + def times(count); end + + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#264 + def unexpected_arguments_message(expected_args_string, actual_args_string); end + + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#312 + def unpack_string_args(formatted_expected_args, actual_args); end +end + +# Contains methods intended to be used from within code examples. +# Mix this in to your test context (such as a test framework base class) +# to use rspec-mocks with your test framework. If you're using rspec-core, +# it'll take care of doing this for you. +# +# source://rspec-mocks//lib/rspec/mocks/example_methods.rb#9 +module RSpec::Mocks::ExampleMethods + include ::RSpec::Mocks::ArgumentMatchers + include ::RSpec::Mocks::ExampleMethods::ExpectHost + + # Used to wrap an object in preparation for stubbing a method + # on it. + # + # @example + # allow(dbl).to receive(:foo).with(5).and_return(:return_value) + # @note If you disable the `:expect` syntax this method will be undefined. + # + # source://rspec-mocks//lib/rspec/mocks/syntax.rb#128 + def allow(target); end + + # Used to wrap a class in preparation for stubbing a method + # on instances of it. + # + # @example + # allow_any_instance_of(MyClass).to receive(:foo) + # @note This is only available when you have enabled the `expect` syntax. + # + # source://rspec-mocks//lib/rspec/mocks/syntax.rb#136 + def allow_any_instance_of(klass); end + + # Disables warning messages about expectations being set on nil. + # + # By default warning messages are issued when expectations are set on + # nil. This is to prevent false-positives and to catch potential bugs + # early on. + # + # @deprecated Use {RSpec::Mocks::Configuration#allow_message_expectations_on_nil} instead. + # + # source://rspec-mocks//lib/rspec/mocks/example_methods.rb#201 + def allow_message_expectations_on_nil; end + + # Constructs a test double against a specific class. If the given class + # name has been loaded, only class methods defined on the class are + # allowed to be stubbed. In all other ways it behaves like a + # [double](double). + # + # @overload class_double + # @overload class_double + # @overload class_double + # @overload class_double + # @return ClassVerifyingDouble + # + # source://rspec-mocks//lib/rspec/mocks/example_methods.rb#79 + def class_double(doubled_class, *args); end + + # Constructs a test double that is optimized for use with `have_received` + # against a specific class. If the given class name has been loaded, + # only class methods defined on the class are allowed to be stubbed. + # With a normal double one has to stub methods in order to be able to spy + # them. An class_spy automatically spies on all class methods to which the + # class responds. + # + # @overload class_spy + # @overload class_spy + # @overload class_spy + # @overload class_spy + # @return ClassVerifyingDouble + # + # source://rspec-mocks//lib/rspec/mocks/example_methods.rb#191 + def class_spy(*args); end + + # Constructs an instance of [RSpec::Mocks::Double](RSpec::Mocks::Double) configured + # with an optional name, used for reporting in failure messages, and an optional + # hash of message/return-value pairs. + # + # @example + # book = double("book", :title => "The RSpec Book") + # book.title #=> "The RSpec Book" + # + # card = double("card", :suit => "Spades", :rank => "A") + # card.suit #=> "Spades" + # card.rank #=> "A" + # @overload double + # @overload double + # @overload double + # @overload double + # @return [Double] + # + # source://rspec-mocks//lib/rspec/mocks/example_methods.rb#34 + def double(*args); end + + # Used to wrap a class in preparation for setting a mock expectation + # on instances of it. + # + # @example + # expect_any_instance_of(MyClass).to receive(:foo) + # @note If you disable the `:expect` syntax this method will be undefined. + # + # source://rspec-mocks//lib/rspec/mocks/syntax.rb#132 + def expect_any_instance_of(klass); end + + # Verifies that the given object received the expected message during the + # course of the test. On a spy objects or as null object doubles this + # works for any method, on other objects the method must have + # been stubbed beforehand in order for messages to be verified. + # + # Stubbing and verifying messages received in this way implements the + # Test Spy pattern. + # + # @example + # invitation = double('invitation', accept: true) + # user.accept_invitation(invitation) + # expect(invitation).to have_received(:accept) + # + # # You can also use most message expectations: + # expect(invitation).to have_received(:accept).with(mailer).once + # @note `have_received(...).with(...)` is unable to work properly when + # passed arguments are mutated after the spy records the received message. + # @param method_name [Symbol] name of the method expected to have been + # called. + # + # source://rspec-mocks//lib/rspec/mocks/example_methods.rb#281 + def have_received(method_name, &block); end + + # Hides the named constant with the given value. The constant will be + # undefined for the duration of the test. + # + # Like method stubs, the constant will be restored to its original value + # when the example completes. + # + # @example + # hide_const("MyClass") # => MyClass is now an undefined constant + # @param constant_name [String] The fully qualified name of the constant. + # The current constant scoping at the point of call is not considered. + # + # source://rspec-mocks//lib/rspec/mocks/example_methods.rb#256 + def hide_const(constant_name); end + + # Constructs a test double against a specific class. If the given class + # name has been loaded, only instance methods defined on the class are + # allowed to be stubbed. In all other ways it behaves like a + # [double](double). + # + # @overload instance_double + # @overload instance_double + # @overload instance_double + # @overload instance_double + # @return InstanceVerifyingDouble + # + # source://rspec-mocks//lib/rspec/mocks/example_methods.rb#56 + def instance_double(doubled_class, *args); end + + # Constructs a test double that is optimized for use with `have_received` + # against a specific class. If the given class name has been loaded, only + # instance methods defined on the class are allowed to be stubbed. With + # a normal double one has to stub methods in order to be able to spy + # them. An instance_spy automatically spies on all instance methods to + # which the class responds. + # + # @overload instance_spy + # @overload instance_spy + # @overload instance_spy + # @overload instance_spy + # @return InstanceVerifyingDouble + # + # source://rspec-mocks//lib/rspec/mocks/example_methods.rb#144 + def instance_spy(*args); end + + # Constructs a test double against a specific object. Only the methods + # the object responds to are allowed to be stubbed. If a String argument + # is provided, it is assumed to reference a constant object which is used + # for verification. In all other ways it behaves like a [double](double). + # + # @overload object_double + # @overload object_double + # @overload object_double + # @overload object_double + # @return ObjectVerifyingDouble + # + # source://rspec-mocks//lib/rspec/mocks/example_methods.rb#102 + def object_double(object_or_name, *args); end + + # Constructs a test double that is optimized for use with `have_received` + # against a specific object. Only instance methods defined on the object + # are allowed to be stubbed. With a normal double one has to stub + # methods in order to be able to spy them. An object_spy automatically + # spies on all methods to which the object responds. + # + # @overload object_spy + # @overload object_spy + # @overload object_spy + # @overload object_spy + # @return ObjectVerifyingDouble + # + # source://rspec-mocks//lib/rspec/mocks/example_methods.rb#167 + def object_spy(*args); end + + # Used to specify a message that you expect or allow an object + # to receive. The object returned by `receive` supports the same + # fluent interface that `should_receive` and `stub` have always + # supported, allowing you to constrain the arguments or number of + # times, and configure how the object should respond to the message. + # + # @example + # expect(obj).to receive(:hello).with("world").exactly(3).times + # @note If you disable the `:expect` syntax this method will be undefined. + # + # source://rspec-mocks//lib/rspec/mocks/syntax.rb#114 + def receive(method_name, &block); end + + # stubs/mocks a chain of messages on an object or test double. + # + # ## Warning: + # + # Chains can be arbitrarily long, which makes it quite painless to + # violate the Law of Demeter in violent ways, so you should consider any + # use of `receive_message_chain` a code smell. Even though not all code smells + # indicate real problems (think fluent interfaces), `receive_message_chain` still + # results in brittle examples. For example, if you write + # `allow(foo).to receive_message_chain(:bar, :baz => 37)` in a spec and then the + # implementation calls `foo.baz.bar`, the stub will not work. + # + # @example + # allow(double).to receive_message_chain("foo.bar") { :baz } + # allow(double).to receive_message_chain(:foo, :bar => :baz) + # allow(double).to receive_message_chain(:foo, :bar) { :baz } + # + # # Given any of ^^ these three forms ^^: + # double.foo.bar # => :baz + # + # # Common use in Rails/ActiveRecord: + # allow(Article).to receive_message_chain("recent.published") { [Article.new] } + # @note If you disable the `:expect` syntax this method will be undefined. + # @overload receive_message_chain + # @overload receive_message_chain + # @overload receive_message_chain + # + # source://rspec-mocks//lib/rspec/mocks/syntax.rb#124 + def receive_message_chain(*messages, &block); end + + # Shorthand syntax used to setup message(s), and their return value(s), + # that you expect or allow an object to receive. The method takes a hash + # of messages and their respective return values. Unlike with `receive`, + # you cannot apply further customizations using a block or the fluent + # interface. + # + # @example + # allow(obj).to receive_messages(:speak => "Hello World") + # allow(obj).to receive_messages(:speak => "Hello", :meow => "Meow") + # @note If you disable the `:expect` syntax this method will be undefined. + # + # source://rspec-mocks//lib/rspec/mocks/syntax.rb#118 + def receive_messages(message_return_value_hash); end + + # Constructs a test double that is optimized for use with + # `have_received`. With a normal double one has to stub methods in order + # to be able to spy them. A spy automatically spies on all methods. + # + # @overload spy + # @overload spy + # @overload spy + # @overload spy + # @return [Double] + # + # source://rspec-mocks//lib/rspec/mocks/example_methods.rb#120 + def spy(*args); end + + # Stubs the named constant with the given value. + # Like method stubs, the constant will be restored + # to its original value (or lack of one, if it was + # undefined) when the example completes. + # + # @example + # stub_const("MyClass", Class.new) # => Replaces (or defines) MyClass with a new class object. + # stub_const("SomeModel::PER_PAGE", 5) # => Sets SomeModel::PER_PAGE to 5. + # + # class CardDeck + # SUITS = [:Spades, :Diamonds, :Clubs, :Hearts] + # NUM_CARDS = 52 + # end + # + # stub_const("CardDeck", Class.new) + # CardDeck::SUITS # => uninitialized constant error + # CardDeck::NUM_CARDS # => uninitialized constant error + # + # stub_const("CardDeck", Class.new, :transfer_nested_constants => true) + # CardDeck::SUITS # => our suits array + # CardDeck::NUM_CARDS # => 52 + # + # stub_const("CardDeck", Class.new, :transfer_nested_constants => [:SUITS]) + # CardDeck::SUITS # => our suits array + # CardDeck::NUM_CARDS # => uninitialized constant error + # @option options + # @param constant_name [String] The fully qualified name of the constant. The current + # constant scoping at the point of call is not considered. + # @param value [Object] The value to make the constant refer to. When the + # example completes, the constant will be restored to its prior state. + # @param options [Hash] Stubbing options. + # @return [Object] the stubbed value of the constant + # + # source://rspec-mocks//lib/rspec/mocks/example_methods.rb#241 + def stub_const(constant_name, value, options = T.unsafe(nil)); end + + # Turns off the verifying of partial doubles for the duration of the + # block, this is useful in situations where methods are defined at run + # time and you wish to define stubs for them but not turn off partial + # doubles for the entire run suite. (e.g. view specs in rspec-rails). + # + # source://rspec-mocks//lib/rspec/mocks/example_methods.rb#289 + def without_partial_double_verification; end + + class << self + # @private + # + # source://rspec-mocks//lib/rspec/mocks/example_methods.rb#423 + def declare_double(type, *args); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/example_methods.rb#408 + def declare_verifying_double(type, ref, *args); end + + # @private + # @private + # + # source://rspec-mocks//lib/rspec/mocks/example_methods.rb#401 + def extended(object); end + + # @private + # @private + # + # source://rspec-mocks//lib/rspec/mocks/example_methods.rb#392 + def included(klass); end + end +end + +# This module exists to host the `expect` method for cases where +# rspec-mocks is used w/o rspec-expectations. +# +# source://rspec-mocks//lib/rspec/mocks/example_methods.rb#430 +module RSpec::Mocks::ExampleMethods::ExpectHost + # source://rspec-mocks//lib/rspec/mocks/syntax.rb#142 + def expect(target); end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/message_chain.rb#62 +class RSpec::Mocks::ExpectChain < ::RSpec::Mocks::MessageChain + private + + # source://rspec-mocks//lib/rspec/mocks/message_chain.rb#69 + def expectation(object, message, &return_block); end + + class << self + # @api private + # + # source://rspec-mocks//lib/rspec/mocks/message_chain.rb#63 + def expect_chain_on(object, *chain, &blk); end + end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/targets.rb#87 +class RSpec::Mocks::ExpectationTarget < ::RSpec::Mocks::TargetBase + include ::RSpec::Mocks::ExpectationTargetMethods +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/targets.rb#73 +module RSpec::Mocks::ExpectationTargetMethods + include ::RSpec::Mocks::TargetDelegationInstanceMethods + extend ::RSpec::Mocks::TargetDelegationClassMethods + + # source://rspec-mocks//lib/rspec/mocks/targets.rb#81 + def expression; end + + # source://rspec-mocks//lib/rspec/mocks/targets.rb#16 + def not_to(matcher, &block); end + + # source://rspec-mocks//lib/rspec/mocks/targets.rb#6 + def to(matcher, &block); end + + # source://rspec-mocks//lib/rspec/mocks/targets.rb#16 + def to_not(matcher, &block); end +end + +# Raised when a test double is used after it has been torn +# down (typically at the end of an rspec-core example). +# +# source://rspec-mocks//lib/rspec/mocks/error_generator.rb#10 +class RSpec::Mocks::ExpiredTestDoubleError < ::RSpec::Mocks::MockExpectationError; end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks.rb#112 +RSpec::Mocks::IGNORED_BACKTRACE_LINE = T.let(T.unsafe(nil), String) + +# Represents a configured implementation. Takes into account +# any number of sub-implementations. +# +# @private +# +# source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#756 +class RSpec::Mocks::Implementation + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#759 + def call(*args, **_arg1, &block); end + + # Returns the value of attribute initial_action. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#757 + def initial_action; end + + # Sets the attribute initial_action + # + # @param value the value to set the attribute initial_action to. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#757 + def initial_action=(_arg0); end + + # Returns the value of attribute inner_action. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#757 + def inner_action; end + + # Sets the attribute inner_action + # + # @param value the value to set the attribute inner_action to. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#757 + def inner_action=(_arg0); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#766 + def present?; end + + # Returns the value of attribute terminal_action. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#757 + def terminal_action; end + + # Sets the attribute terminal_action + # + # @param value the value to set the attribute terminal_action to. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#757 + def terminal_action=(_arg0); end + + private + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#772 + def actions; end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/method_reference.rb#113 +class RSpec::Mocks::InstanceMethodReference < ::RSpec::Mocks::MethodReference + private + + # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#138 + def find_method(mod); end + + # Ideally, we'd use `respond_to?` for `method_implemented?` but we need a + # reference to an instance to do that and we don't have one. Note that + # we may get false negatives: if the method is implemented via + # `method_missing`, we'll return `false` even though it meets our + # definition of "implemented". However, it's the best we can do. + # + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#116 + def method_defined?(mod); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#116 + def method_implemented?(mod); end + + # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#143 + def visibility_from(mod); end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/instance_method_stasher.rb#4 +class RSpec::Mocks::InstanceMethodStasher + # @return [InstanceMethodStasher] a new instance of InstanceMethodStasher + # + # source://rspec-mocks//lib/rspec/mocks/instance_method_stasher.rb#5 + def initialize(object, method); end + + # ruby 2.0.0-p247 and 2.0.0-p195 both have a bug that we can't work around :(. + # https://bugs.ruby-lang.org/issues/8686 + # + # source://rspec-mocks//lib/rspec/mocks/instance_method_stasher.rb#91 + def handle_restoration_failures; end + + # @private + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/instance_method_stasher.rb#49 + def method_is_stashed?; end + + # Returns the value of attribute original_method. + # + # source://rspec-mocks//lib/rspec/mocks/instance_method_stasher.rb#14 + def original_method; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/instance_method_stasher.rb#61 + def restore; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/instance_method_stasher.rb#54 + def stash; end + + private + + # @private + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/instance_method_stasher.rb#100 + def method_defined_directly_on_klass?; end + + # @private + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/instance_method_stasher.rb#105 + def method_defined_on_klass?(klass = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/instance_method_stasher.rb#109 + def method_owned_by_klass?; end +end + +# A mock providing a custom proxy that can verify the validity of any +# method stubs or expectations against the public instance methods of the +# given class. +# +# @private +# +# source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#71 +class RSpec::Mocks::InstanceVerifyingDouble + include ::RSpec::Mocks::TestDouble + include ::RSpec::Mocks::VerifyingDouble + + # source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#75 + def __build_mock_proxy(order_group); end +end + +# Support for `patch_marshal_to_support_partial_doubles` configuration. +# +# @private +# +# source://rspec-mocks//lib/rspec/mocks/marshal_extension.rb#6 +class RSpec::Mocks::MarshalExtension + class << self + # source://rspec-mocks//lib/rspec/mocks/marshal_extension.rb#7 + def patch!; end + + # source://rspec-mocks//lib/rspec/mocks/marshal_extension.rb#27 + def unpatch!; end + end +end + +# Namespace for mock-related matchers. +# +# source://rspec-mocks//lib/rspec/mocks.rb#122 +module RSpec::Mocks::Matchers; end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/matchers/expectation_customization.rb#5 +class RSpec::Mocks::Matchers::ExpectationCustomization + # @return [ExpectationCustomization] a new instance of ExpectationCustomization + # + # source://rspec-mocks//lib/rspec/mocks/matchers/expectation_customization.rb#8 + def initialize(method_name, args, block); end + + # Returns the value of attribute block. + # + # source://rspec-mocks//lib/rspec/mocks/matchers/expectation_customization.rb#6 + def block; end + + # Sets the attribute block + # + # @param value the value to set the attribute block to. + # + # source://rspec-mocks//lib/rspec/mocks/matchers/expectation_customization.rb#6 + def block=(_arg0); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/expectation_customization.rb#14 + def playback_onto(expectation); end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#5 +class RSpec::Mocks::Matchers::HaveReceived + include ::RSpec::Mocks::Matchers::Matcher + + # @return [HaveReceived] a new instance of HaveReceived + # + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#12 + def initialize(method_name, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#53 + def at_least(*args); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#53 + def at_most(*args); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#48 + def description; end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#32 + def does_not_match?(subject); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#53 + def exactly(*args); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#40 + def failure_message; end + + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#44 + def failure_message_when_negated; end + + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#19 + def matcher_name; end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#23 + def matches?(subject, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#53 + def once(*args); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#53 + def ordered(*args); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#67 + def setup_allowance(_subject, &_block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#71 + def setup_any_instance_allowance(_subject, &_block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#75 + def setup_any_instance_expectation(_subject, &_block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#79 + def setup_any_instance_negative_expectation(_subject, &_block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#59 + def setup_expectation(subject, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#63 + def setup_negative_expectation(subject, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#53 + def thrice(*args); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#53 + def time(*args); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#53 + def times(*args); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#53 + def twice(*args); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#53 + def with(*args); end + + private + + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#95 + def apply_constraints_to(expectation); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#112 + def capture_failure_message; end + + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#106 + def count_constraint; end + + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#85 + def disallow(type, reason = T.unsafe(nil)); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#101 + def ensure_count_unconstrained; end + + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#89 + def expect; end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#123 + def expected_messages_received_in_order?; end + + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#128 + def mock_proxy; end + + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#118 + def notify_failure_message; end +end + +# source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#9 +RSpec::Mocks::Matchers::HaveReceived::ARGS_CONSTRAINTS = T.let(T.unsafe(nil), Array) + +# source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#10 +RSpec::Mocks::Matchers::HaveReceived::CONSTRAINTS = T.let(T.unsafe(nil), Array) + +# source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#8 +RSpec::Mocks::Matchers::HaveReceived::COUNT_CONSTRAINTS = T.let(T.unsafe(nil), Array) + +# just a "tag" for rspec-mock matchers detection +# +# @private +# +# source://rspec-mocks//lib/rspec/mocks.rb#125 +module RSpec::Mocks::Matchers::Matcher; end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#7 +class RSpec::Mocks::Matchers::Receive + include ::RSpec::Mocks::Matchers::Matcher + + # @return [Receive] a new instance of Receive + # + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#10 + def initialize(message, block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 + def and_call_original(*args, **_arg1, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 + def and_invoke(*args, **_arg1, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 + def and_raise(*args, **_arg1, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 + def and_return(*args, **_arg1, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 + def and_throw(*args, **_arg1, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 + def and_wrap_original(*args, **_arg1, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 + def and_yield(*args, **_arg1, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 + def at_least(*args, **_arg1, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 + def at_most(*args, **_arg1, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#20 + def description; end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#30 + def does_not_match?(subject, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 + def exactly(*args, **_arg1, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 + def inspect(*args, **_arg1, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#16 + def matcher_name; end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#24 + def matches?(subject, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 + def never(*args, **_arg1, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 + def once(*args, **_arg1, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 + def ordered(*args, **_arg1, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#41 + def setup_allowance(subject, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#54 + def setup_any_instance_allowance(subject, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#46 + def setup_any_instance_expectation(subject, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#50 + def setup_any_instance_negative_expectation(subject, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#24 + def setup_expectation(subject, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#30 + def setup_negative_expectation(subject, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 + def thrice(*args, **_arg1, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 + def time(*args, **_arg1, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 + def times(*args, **_arg1, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 + def to_s(*args, **_arg1, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 + def twice(*args, **_arg1, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 + def with(*args, **_arg1, &block); end + + private + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#71 + def describable; end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#108 + def move_block_to_last_customization(block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#91 + def setup_any_instance_method_substitute(subject, method, block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#96 + def setup_method_substitute(host, method, block, *args); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#86 + def setup_mock_proxy_method_substitute(subject, method, block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#75 + def warn_if_any_instance(expression, subject); end +end + +# MessageExpectation objects are able to describe themselves in detail. +# We use this as a fall back when a MessageExpectation is not available. +# +# @private +# +# source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#119 +class RSpec::Mocks::Matchers::Receive::DefaultDescribable + # @return [DefaultDescribable] a new instance of DefaultDescribable + # + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#120 + def initialize(message); end + + # This is much simpler for the `any_instance` case than what the + # user may want, but I'm not up for putting a bunch of effort + # into full descriptions for `any_instance` expectations at this point :(. + # + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#127 + def description_for(verb); end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#7 +class RSpec::Mocks::Matchers::ReceiveMessageChain + include ::RSpec::Mocks::Matchers::Matcher + + # @return [ReceiveMessageChain] a new instance of ReceiveMessageChain + # + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#10 + def initialize(chain, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#17 + def and_call_original(*args, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#17 + def and_invoke(*args, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#17 + def and_raise(*args, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#17 + def and_return(*args, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#17 + def and_throw(*args, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#17 + def and_yield(*args, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#27 + def description; end + + # @raise [NegationUnsupportedError] + # + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#53 + def does_not_match?(*_args); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#23 + def matcher_name; end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#48 + def matches?(subject, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#31 + def setup_allowance(subject, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#36 + def setup_any_instance_allowance(subject, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#42 + def setup_any_instance_expectation(subject, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#48 + def setup_expectation(subject, &block); end + + # @raise [NegationUnsupportedError] + # + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#53 + def setup_negative_expectation(*_args); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#17 + def with(*args, &block); end + + private + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#70 + def formatted_chain; end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#64 + def replay_customizations(chain); end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/matchers/receive_messages.rb#5 +class RSpec::Mocks::Matchers::ReceiveMessages + include ::RSpec::Mocks::Matchers::Matcher + + # @return [ReceiveMessages] a new instance of ReceiveMessages + # + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_messages.rb#8 + def initialize(message_return_value_hash); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_messages.rb#17 + def description; end + + # @raise [NegationUnsupportedError] + # + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_messages.rb#29 + def does_not_match?(_subject); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_messages.rb#13 + def matcher_name; end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_messages.rb#21 + def matches?(subject); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_messages.rb#36 + def setup_allowance(subject); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_messages.rb#50 + def setup_any_instance_allowance(subject); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_messages.rb#43 + def setup_any_instance_expectation(subject); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_messages.rb#21 + def setup_expectation(subject); end + + # @raise [NegationUnsupportedError] + # + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_messages.rb#29 + def setup_negative_expectation(_subject); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_messages.rb#55 + def warn_about_block; end + + private + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_messages.rb#65 + def any_instance_of(subject); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_messages.rb#69 + def each_message_on(host); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_messages.rb#61 + def proxy_on(subject); end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/message_chain.rb#4 +class RSpec::Mocks::MessageChain + # @return [MessageChain] a new instance of MessageChain + # + # source://rspec-mocks//lib/rspec/mocks/message_chain.rb#7 + def initialize(object, *chain, &blk); end + + # Returns the value of attribute block. + # + # source://rspec-mocks//lib/rspec/mocks/message_chain.rb#5 + def block; end + + # Returns the value of attribute chain. + # + # source://rspec-mocks//lib/rspec/mocks/message_chain.rb#5 + def chain; end + + # Returns the value of attribute object. + # + # source://rspec-mocks//lib/rspec/mocks/message_chain.rb#5 + def object; end + + # @api private + # + # source://rspec-mocks//lib/rspec/mocks/message_chain.rb#13 + def setup_chain; end + + private + + # source://rspec-mocks//lib/rspec/mocks/message_chain.rb#33 + def chain_on(object, *chain, &block); end + + # source://rspec-mocks//lib/rspec/mocks/message_chain.rb#54 + def find_matching_expectation; end + + # source://rspec-mocks//lib/rspec/mocks/message_chain.rb#49 + def find_matching_stub; end + + # source://rspec-mocks//lib/rspec/mocks/message_chain.rb#38 + def format_chain(*chain, &blk); end +end + +# Represents an individual method stub or message expectation. The methods +# defined here can be used to configure how it behaves. The methods return +# `self` so that they can be chained together to form a fluent interface. +# +# source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#44 +class RSpec::Mocks::MessageExpectation + include ::RSpec::Mocks::MessageExpectation::ImplementationDetails + + # Tells the object to delegate to the original unmodified method + # when it receives the message. + # + # @example + # expect(counter).to receive(:increment).and_call_original + # original_count = counter.count + # counter.increment + # expect(counter.count).to eq(original_count + 1) + # @note This is only available on partial doubles. + # @return [nil] No further chaining is supported after this. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#141 + def and_call_original; end + + # Tells the object to invoke a Proc when it receives the message. Given + # more than one value, the result of the first Proc is returned the first + # time the message is received, the result of the second Proc is returned + # the next time, etc, etc. + # + # If the message is received more times than there are Procs, the result of + # the last Proc is returned for every subsequent call. + # + # @example + # allow(api).to receive(:get_foo).and_invoke(-> { raise ApiTimeout }) + # api.get_foo # => raises ApiTimeout + # api.get_foo # => raises ApiTimeout + # + # allow(api).to receive(:get_foo).and_invoke(-> { raise ApiTimeout }, -> { raise ApiTimeout }, -> { :a_foo }) + # api.get_foo # => raises ApiTimeout + # api.get_foo # => rasies ApiTimeout + # api.get_foo # => :a_foo + # api.get_foo # => :a_foo + # api.get_foo # => :a_foo + # # etc + # @return [nil] No further chaining is supported after this. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#109 + def and_invoke(first_proc, *procs); end + + # Tells the object to raise an exception when the message is received. + # + # @example + # allow(car).to receive(:go).and_raise + # allow(car).to receive(:go).and_raise(OutOfGas) + # allow(car).to receive(:go).and_raise(OutOfGas, "At least 2 oz of gas needed to drive") + # allow(car).to receive(:go).and_raise(OutOfGas.new(2, :oz)) + # @note When you pass an exception class, the MessageExpectation will raise + # an instance of it, creating it with `exception` and passing `message` + # if specified. If the exception class initializer requires more than + # one parameters, you must pass in an instance and not the class, + # otherwise this method will raise an ArgumentError exception. + # @overload and_raise + # @overload and_raise + # @overload and_raise + # @overload and_raise + # @return [nil] No further chaining is supported after this. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#186 + def and_raise(*args); end + + # Tells the object to return a value when it receives the message. Given + # more than one value, the first value is returned the first time the + # message is received, the second value is returned the next time, etc, + # etc. + # + # If the message is received more times than there are values, the last + # value is returned for every subsequent call. + # + # @example + # allow(counter).to receive(:count).and_return(1) + # counter.count # => 1 + # counter.count # => 1 + # + # allow(counter).to receive(:count).and_return(1,2,3) + # counter.count # => 1 + # counter.count # => 2 + # counter.count # => 3 + # counter.count # => 3 + # counter.count # => 3 + # # etc + # @overload and_return + # @overload and_return + # @return [nil] No further chaining is supported after this. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#71 + def and_return(first_value, *values); end + + # Tells the object to throw a symbol (with the object if that form is + # used) when the message is received. + # + # @example + # allow(car).to receive(:go).and_throw(:out_of_gas) + # allow(car).to receive(:go).and_throw(:out_of_gas, :level => 0.1) + # @overload and_throw + # @overload and_throw + # @return [nil] No further chaining is supported after this. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#202 + def and_throw(*args); end + + # Decorates the stubbed method with the supplied block. The original + # unmodified method is passed to the block along with any method call + # arguments so you can delegate to it, whilst still being able to + # change what args are passed to it and/or change the return value. + # + # @example + # expect(api).to receive(:large_list).and_wrap_original do |original_method, *args, &block| + # original_method.call(*args, &block).first(10) + # end + # @note This is only available on partial doubles. + # @return [nil] No further chaining is supported after this. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#162 + def and_wrap_original(&block); end + + # Tells the object to yield one or more args to a block when the message + # is received. + # + # @example + # stream.stub(:open).and_yield(StringIO.new) + # @return [MessageExpectation] self, to support further chaining. + # @yield [@eval_context = Object.new] + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#214 + def and_yield(*args, &block); end + + # Constrain a message expectation to be received at least a specific + # number of times. + # + # @example + # expect(dealer).to receive(:deal_card).at_least(9).times + # @return [MessageExpectation] self, to support further chaining. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#249 + def at_least(n, &block); end + + # Constrain a message expectation to be received at most a specific + # number of times. + # + # @example + # expect(dealer).to receive(:deal_card).at_most(10).times + # @return [MessageExpectation] self, to support further chaining. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#268 + def at_most(n, &block); end + + # Constrain a message expectation to be received a specific number of + # times. + # + # @example + # expect(dealer).to receive(:deal_card).exactly(10).times + # @return [MessageExpectation] self, to support further chaining. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#236 + def exactly(n, &block); end + + # @return [String] a nice representation of the message expectation + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#396 + def inspect; end + + # Expect a message not to be received at all. + # + # @example + # expect(car).to receive(:stop).never + # @return [MessageExpectation] self, to support further chaining. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#293 + def never; end + + # Expect a message to be received exactly one time. + # + # @example + # expect(car).to receive(:go).once + # @return [MessageExpectation] self, to support further chaining. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#304 + def once(&block); end + + # Expect messages to be received in a specific order. + # + # @example + # expect(api).to receive(:prepare).ordered + # expect(api).to receive(:run).ordered + # expect(api).to receive(:finish).ordered + # @return [MessageExpectation] self, to support further chaining. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#379 + def ordered(&block); end + + # Expect a message to be received exactly three times. + # + # @example + # expect(car).to receive(:go).thrice + # @return [MessageExpectation] self, to support further chaining. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#326 + def thrice(&block); end + + # Syntactic sugar for `exactly`, `at_least` and `at_most` + # + # @example + # expect(dealer).to receive(:deal_card).exactly(10).times + # expect(dealer).to receive(:deal_card).at_least(10).times + # expect(dealer).to receive(:deal_card).at_most(10).times + # @return [MessageExpectation] self, to support further chaining. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#282 + def time(&block); end + + # Syntactic sugar for `exactly`, `at_least` and `at_most` + # + # @example + # expect(dealer).to receive(:deal_card).exactly(10).times + # expect(dealer).to receive(:deal_card).at_least(10).times + # expect(dealer).to receive(:deal_card).at_most(10).times + # @return [MessageExpectation] self, to support further chaining. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#282 + def times(&block); end + + # @return [String] a nice representation of the message expectation + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#396 + def to_s; end + + # Expect a message to be received exactly two times. + # + # @example + # expect(car).to receive(:go).twice + # @return [MessageExpectation] self, to support further chaining. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#315 + def twice(&block); end + + # Constrains a stub or message expectation to invocations with specific + # arguments. + # + # With a stub, if the message might be received with other args as well, + # you should stub a default value first, and then stub or mock the same + # message using `with` to constrain to specific arguments. + # + # A message expectation will fail if the message is received with different + # arguments. + # + # @example + # allow(cart).to receive(:add) { :failure } + # allow(cart).to receive(:add).with(Book.new(:isbn => 1934356379)) { :success } + # cart.add(Book.new(:isbn => 1234567890)) + # # => :failure + # cart.add(Book.new(:isbn => 1934356379)) + # # => :success + # + # expect(cart).to receive(:add).with(Book.new(:isbn => 1934356379)) { :success } + # cart.add(Book.new(:isbn => 1234567890)) + # # => failed expectation + # cart.add(Book.new(:isbn => 1934356379)) + # # => passes + # @return [MessageExpectation] self, to support further chaining. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#359 + def with(*args, **_arg1, &block); end +end + +# Contains the parts of `MessageExpectation` that aren't part of +# rspec-mocks' public API. The class is very big and could really use +# some collaborators it delegates to for this stuff but for now this was +# the simplest way to split the public from private stuff to make it +# easier to publish the docs for the APIs we want published. +# +# @private +# +# source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#409 +module RSpec::Mocks::MessageExpectation::ImplementationDetails + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#420 + def initialize(error_generator, expectation_ordering, expected_from, method_double, type = T.unsafe(nil), opts = T.unsafe(nil), &implementation_block); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#588 + def actual_received_count_matters?; end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#575 + def additional_expected_calls; end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#532 + def advise(*args); end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#454 + def and_yield_receiver_to_implementation; end + + # Sets the attribute argument_list_matcher + # + # @param value the value to set the attribute argument_list_matcher to. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#413 + def argument_list_matcher=(_arg0); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#487 + def called_max_times?; end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#564 + def description_for(verb); end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#507 + def ensure_expected_ordering_received!; end + + # Returns the value of attribute error_generator. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#410 + def error_generator; end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#558 + def expectation_count_type; end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#450 + def expected_args; end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#503 + def expected_messages_received?; end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#540 + def generate_error; end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#512 + def ignoring_args?; end + + # Returns the value of attribute implementation. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#410 + def implementation; end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#592 + def increase_actual_received_count!; end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#473 + def invoke(parent_stub, *args, **_arg2, &block); end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#478 + def invoke_without_incrementing_received_count(parent_stub, *args, **_arg2, &block); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#463 + def matches?(message, *args, **_arg2); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#516 + def matches_at_least_count?; end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#520 + def matches_at_most_count?; end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#524 + def matches_exact_count?; end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#494 + def matches_name_but_not_args(message, *args); end + + # Returns the value of attribute message. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#411 + def message; end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#483 + def negative?; end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#584 + def negative_expectation_for?(message); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#580 + def ordered?; end + + # Returns the value of attribute orig_object. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#412 + def orig_object; end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#571 + def raise_out_of_order_error; end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#554 + def raise_unexpected_message_args_error(args_for_multiple_calls); end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#468 + def safe_invoke(parent_stub, *args, **_arg2, &block); end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#528 + def similar_messages; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#417 + def type; end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#536 + def unadvise(args); end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#498 + def verify_messages_received; end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#459 + def yield_receiver_to_implementation_block?; end + + protected + + # Sets the attribute error_generator + # + # @param value the value to set the attribute error_generator to. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#410 + def error_generator=(_arg0); end + + # Sets the attribute expected_from + # + # @param value the value to set the attribute expected_from to. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#413 + def expected_from=(_arg0); end + + # Sets the attribute expected_received_count + # + # @param value the value to set the attribute expected_received_count to. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#413 + def expected_received_count=(_arg0); end + + # Sets the attribute implementation + # + # @param value the value to set the attribute implementation to. + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#410 + def implementation=(_arg0); end + + private + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#600 + def exception_source_id; end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#632 + def has_been_invoked?; end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#655 + def initial_implementation_action=(action); end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#659 + def inner_implementation_action=(action); end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#604 + def invoke_incrementing_actual_calls_by(increment, allowed_to_fail, parent_stub, *args, **_arg4, &block); end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#636 + def raise_already_invoked_error_if_necessary(calling_customization); end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#642 + def set_expected_received_count(relativity, n); end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#665 + def terminal_implementation_action=(action); end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#669 + def warn_about_stub_override; end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#676 + def wrap_original(method_name, &block); end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/method_double.rb#4 +class RSpec::Mocks::MethodDouble + # @private + # @return [MethodDouble] a new instance of MethodDouble + # + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#12 + def initialize(object, method_name, proxy); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#216 + def add_default_stub(*args, &implementation); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#166 + def add_expectation(error_generator, expectation_ordering, expected_from, opts, &implementation); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#202 + def add_simple_expectation(method_name, response, error_generator, backtrace_line); end + + # A simple stub can only return a concrete value for a message, and + # cannot match on arguments. It is used as an optimization over + # `add_stub` / `add_expectation` where it is known in advance that this + # is all that will be required of a stub, such as when passing attributes + # to the `double` example method. They do not stash or restore existing method + # definitions. + # + # @private + # + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#197 + def add_simple_stub(method_name, response); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#181 + def add_stub(error_generator, expectation_ordering, expected_from, opts = T.unsafe(nil), &implementation); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#175 + def build_expectation(error_generator, expectation_ordering); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#152 + def clear; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#61 + def configure_method; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#68 + def define_proxy_method; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#9 + def expectations; end + + # The type of message expectation to create has been extracted to its own + # method so that subclasses can override it. + # + # @private + # + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#161 + def message_expectation_class; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#41 + def method_missing_block; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#9 + def method_name; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#9 + def method_stasher; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#9 + def object; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#56 + def object_singleton_class; end + + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#24 + def original_implementation_callable; end + + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#34 + def original_method; end + + # The implementation of the proxied method. Subclasses may override this + # method to perform additional operations. + # + # @private + # + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#97 + def proxy_method_invoked(_obj, *args, **_arg2, &block); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#233 + def raise_method_not_stubbed_error; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#222 + def remove_stub; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#228 + def remove_stub_if_present; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#146 + def reset; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#103 + def restore_original_method; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#133 + def restore_original_visibility; end + + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#24 + def save_original_implementation_callable!; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#207 + def setup_simple_method_double(method_name, response, collection, error_generator = T.unsafe(nil), backtrace_line = T.unsafe(nil)); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#122 + def show_frozen_warning; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#9 + def stubs; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#141 + def verify; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#51 + def visibility; end + + private + + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#255 + def definition_target; end + + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#275 + def new_rspec_prepended_module; end + + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#293 + def remove_method_from_definition_target; end + + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#259 + def usable_rspec_prepended_module; end +end + +# @private TODO: drop in favor of FrozenError in ruby 2.5+ +# +# source://rspec-mocks//lib/rspec/mocks/method_double.rb#6 +RSpec::Mocks::MethodDouble::FROZEN_ERROR_MSG = T.let(T.unsafe(nil), Regexp) + +# We subclass `Module` in order to be able to easily detect our prepended module. +# +# source://rspec-mocks//lib/rspec/mocks/method_double.rb#253 +class RSpec::Mocks::MethodDouble::RSpecPrependedModule < ::Module; end + +# Represents a method on an object that may or may not be defined. +# The method may be an instance method on a module or a method on +# any object. +# +# @private +# +# source://rspec-mocks//lib/rspec/mocks/method_reference.rb#10 +class RSpec::Mocks::MethodReference + # @return [MethodReference] a new instance of MethodReference + # + # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#15 + def initialize(object_reference, method_name); end + + # A method is defined if we are able to get a `Method` object for it. + # In that case, we can assert against metadata like the arity. + # + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#46 + def defined?; end + + # A method is implemented if sending the message does not result in + # a `NoMethodError`. It might be dynamically implemented by + # `method_missing`. + # + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#23 + def implemented?; end + + # Returns true if we definitively know that sending the method + # will result in a `NoMethodError`. + # + # This is not simply the inverse of `implemented?`: there are + # cases when we don't know if a method is implemented and + # both `implemented?` and `unimplemented?` will return false. + # + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#35 + def unimplemented?; end + + # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#57 + def visibility; end + + # @yield [Support::MethodSignature.new(original)] + # + # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#52 + def with_signature; end + + private + + # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#105 + def original_method; end + + class << self + # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#11 + def for(object_reference, method_name); end + + # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#67 + def instance_method_visibility_for(klass, method_name); end + + # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#67 + def method_defined_at_any_visibility?(klass, method_name); end + + # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#81 + def method_visibility_for(object, method_name); end + end +end + +# Raised when an expectation customization method (e.g. `with`, +# `and_return`) is called on a message expectation which has already been +# invoked. +# +# source://rspec-mocks//lib/rspec/mocks/error_generator.rb#18 +class RSpec::Mocks::MockExpectationAlreadyInvokedError < ::Exception; end + +# Raised when a message expectation is not satisfied. +# +# source://rspec-mocks//lib/rspec/mocks/error_generator.rb#6 +class RSpec::Mocks::MockExpectationError < ::Exception; end + +# An implementation of rspec-mocks' reference interface. +# Used when a string is passed to {ExampleMethods#object_double}, +# and when a string, named class or named module is passed to +# {ExampleMethods#instance_double}, or {ExampleMethods#class_double}. +# Represents a reference to the object named (via a constant lookup) +# by the string. +# +# @see DirectObjectReference +# +# source://rspec-mocks//lib/rspec/mocks/object_reference.rb#109 +class RSpec::Mocks::NamedObjectReference + # @param const_name [String] constant name + # @return [NamedObjectReference] a new instance of NamedObjectReference + # + # source://rspec-mocks//lib/rspec/mocks/object_reference.rb#111 + def initialize(const_name); end + + # @return [String] the constant name to replace with a double. + # + # source://rspec-mocks//lib/rspec/mocks/object_reference.rb#121 + def const_to_replace; end + + # @return [Boolean] true if the named constant is defined, false otherwise. + # + # source://rspec-mocks//lib/rspec/mocks/object_reference.rb#116 + def defined?; end + + # @return [String] the constant name to replace with a double. + # + # source://rspec-mocks//lib/rspec/mocks/object_reference.rb#121 + def description; end + + # @return [Object, nil] the target of the verifying double (the named object), or + # nil if it is not defined. + # + # source://rspec-mocks//lib/rspec/mocks/object_reference.rb#128 + def target; end + + # Yields if the reference target is loaded, providing a generic mechanism + # to optionally run a bit of code only when a reference's target is + # loaded. + # + # @yield [Object] the target object + # + # source://rspec-mocks//lib/rspec/mocks/object_reference.rb#137 + def when_loaded; end + + private + + # source://rspec-mocks//lib/rspec/mocks/object_reference.rb#143 + def object; end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/error_generator.rb#31 +class RSpec::Mocks::NegationUnsupportedError < ::StandardError; end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/space.rb#209 +class RSpec::Mocks::NestedSpace < ::RSpec::Mocks::Space + # @return [NestedSpace] a new instance of NestedSpace + # + # source://rspec-mocks//lib/rspec/mocks/space.rb#210 + def initialize(parent); end + + # source://rspec-mocks//lib/rspec/mocks/space.rb#219 + def constant_mutator_for(name); end + + # source://rspec-mocks//lib/rspec/mocks/space.rb#215 + def proxies_of(klass); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/space.rb#223 + def registered?(object); end + + private + + # source://rspec-mocks//lib/rspec/mocks/space.rb#233 + def any_instance_recorder_not_found_for(id, klass); end + + # source://rspec-mocks//lib/rspec/mocks/space.rb#229 + def proxy_not_found_for(id, object); end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#16 +class RSpec::Mocks::NoCallbackInvocationStrategy + # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#17 + def call(_doubled_module); end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/method_reference.rb#149 +class RSpec::Mocks::ObjectMethodReference < ::RSpec::Mocks::MethodReference + private + + # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#168 + def find_method(object); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#164 + def method_defined?(object); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#160 + def method_implemented?(object); end + + # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#172 + def visibility_from(object); end + + class << self + # source://rspec-mocks//lib/rspec/mocks/method_reference.rb#150 + def for(object_reference, method_name); end + end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/object_reference.rb#4 +class RSpec::Mocks::ObjectReference + class << self + # Returns an appropriate Object or Module reference based + # on the given argument. + # + # source://rspec-mocks//lib/rspec/mocks/object_reference.rb#7 + def for(object_module_or_name, allow_direct_object_refs = T.unsafe(nil)); end + + private + + # 1.8.7 + # + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/object_reference.rb#31 + def anonymous_module?(mod); end + + # source://rspec-mocks//lib/rspec/mocks/object_reference.rb#41 + def name_of(mod); end + end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/object_reference.rb#47 +RSpec::Mocks::ObjectReference::MODULE_NAME_METHOD = T.let(T.unsafe(nil), UnboundMethod) + +# Similar to an InstanceVerifyingDouble, except that it verifies against +# public methods of the given object. +# +# @private +# +# source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#110 +class RSpec::Mocks::ObjectVerifyingDouble + include ::RSpec::Mocks::TestDouble + include ::RSpec::Mocks::VerifyingDouble + include ::RSpec::Mocks::ObjectVerifyingDoubleMethods +end + +# An awkward module necessary because we cannot otherwise have +# ClassVerifyingDouble inherit from Module and still share these methods. +# +# @private +# +# source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#87 +module RSpec::Mocks::ObjectVerifyingDoubleMethods + include ::RSpec::Mocks::TestDouble + include ::RSpec::Mocks::VerifyingDouble + + # source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#91 + def as_stubbed_const(options = T.unsafe(nil)); end + + private + + # source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#98 + def __build_mock_proxy(order_group); end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/order_group.rb#4 +class RSpec::Mocks::OrderGroup + # @return [OrderGroup] a new instance of OrderGroup + # + # source://rspec-mocks//lib/rspec/mocks/order_group.rb#5 + def initialize; end + + # source://rspec-mocks//lib/rspec/mocks/order_group.rb#48 + def clear; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/order_group.rb#26 + def consume; end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/order_group.rb#54 + def empty?; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/order_group.rb#37 + def handle_order_constraint(expectation); end + + # source://rspec-mocks//lib/rspec/mocks/order_group.rb#16 + def invoked(message); end + + # @private + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/order_group.rb#21 + def ready_for?(expectation); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/order_group.rb#12 + def register(expectation); end + + # source://rspec-mocks//lib/rspec/mocks/order_group.rb#43 + def verify_invocation_order(expectation); end + + private + + # source://rspec-mocks//lib/rspec/mocks/order_group.rb#76 + def expectation_for(message); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/order_group.rb#64 + def expectations_invoked_in_order?; end + + # source://rspec-mocks//lib/rspec/mocks/order_group.rb#72 + def expected_invocations; end + + # source://rspec-mocks//lib/rspec/mocks/order_group.rb#68 + def invoked_expectations; end + + # source://rspec-mocks//lib/rspec/mocks/order_group.rb#60 + def remaining_expectations; end +end + +# Raised when doubles or partial doubles are used outside of the per-test lifecycle. +# +# source://rspec-mocks//lib/rspec/mocks/error_generator.rb#13 +class RSpec::Mocks::OutsideOfExampleError < ::StandardError; end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/proxy.rb#459 +class RSpec::Mocks::PartialClassDoubleProxy < ::RSpec::Mocks::PartialDoubleProxy + include ::RSpec::Mocks::PartialClassDoubleProxyMethods +end + +# When we mock or stub a method on a class, we have to treat it a bit different, +# because normally singleton method definitions only affect the object on which +# they are defined, but on classes they affect subclasses, too. As a result, +# we need some special handling to get the original method. +# +# @private +# +# source://rspec-mocks//lib/rspec/mocks/proxy.rb#383 +module RSpec::Mocks::PartialClassDoubleProxyMethods + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#384 + def initialize(source_space, *args); end + + # Consider this situation: + # + # class A; end + # class B < A; end + # + # allow(A).to receive(:new) + # expect(B).to receive(:new).and_call_original + # + # When getting the original definition for `B.new`, we cannot rely purely on + # using `B.method(:new)` before our redefinition is defined on `B`, because + # `B.method(:new)` will return a method that will execute the stubbed version + # of the method on `A` since singleton methods on classes are in the lookup + # hierarchy. + # + # To do it properly, we need to find the original definition of `new` from `A` + # from _before_ `A` was stubbed, and we need to rebind it to `B` so that it will + # run with the proper `self`. + # + # That's what this method (together with `original_unbound_method_handle_from_ancestor_for`) + # does. + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#409 + def original_method_handle_for(message); end + + protected + + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#437 + def method_double_from_ancestor_for(message); end + + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#432 + def original_unbound_method_handle_from_ancestor_for(message); end + + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#447 + def superclass_proxy; end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/proxy.rb#320 +class RSpec::Mocks::PartialDoubleProxy < ::RSpec::Mocks::Proxy + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#334 + def add_simple_expectation(method_name, response, location); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#340 + def add_simple_stub(method_name, response); end + + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#357 + def message_received(message, *args, **_arg2, &block); end + + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#321 + def original_method_handle_for(message); end + + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#352 + def reset; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#346 + def visibility_for(method_name); end + + private + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#367 + def any_instance_class_recorder_observing_method?(klass, method_name); end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/proxy.rb#4 +class RSpec::Mocks::Proxy + # @private + # @return [Proxy] a new instance of Proxy + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#23 + def initialize(object, order_group, options = T.unsafe(nil)); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#68 + def add_message_expectation(method_name, opts = T.unsafe(nil), &block); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#82 + def add_simple_expectation(method_name, response, location); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#143 + def add_simple_stub(method_name, response); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#137 + def add_stub(method_name, opts = T.unsafe(nil), &implementation); end + + # Tells the object to ignore any messages that aren't explicitly set as + # stubs or message expectations. + # + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#55 + def as_null_object; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#87 + def build_expectation(method_name); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#120 + def check_for_unexpected_arguments(expectation); end + + # @private + # @raise [ArgumentError] + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#37 + def ensure_can_be_proxied!(object); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#18 + def ensure_implemented(*_args); end + + # @private + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#184 + def has_negative_expectation?(message); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#198 + def message_received(message, *args, **_arg2, &block); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#177 + def messages_arg_list; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#263 + def method_double_if_exists_for_message(message); end + + # @private + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#48 + def null_object?; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#45 + def object; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#61 + def original_method_handle_for(_message); end + + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#257 + def prepended_modules_of_singleton_class; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#236 + def raise_missing_default_stub_error(expectation, args_for_multiple_calls); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#231 + def raise_unexpected_message_error(method_name, args); end + + # @private + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#170 + def received_message?(method_name, *args, &block); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#189 + def record_message_received(message, *args, **_arg2, &block); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#148 + def remove_stub(method_name); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#153 + def remove_stub_if_present(method_name); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#97 + def replay_received_message_on(expectation, &block); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#163 + def reset; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#158 + def verify; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#241 + def visibility_for(_method_name); end + + private + + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#280 + def find_almost_matching_expectation(method_name, *args, **_arg2); end + + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#304 + def find_almost_matching_stub(method_name, *args, **_arg2); end + + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#287 + def find_best_matching_expectation_for(method_name); end + + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#273 + def find_matching_expectation(method_name, *args, **_arg2); end + + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#299 + def find_matching_method_stub(method_name, *args, **_arg2); end + + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#269 + def method_double_for(message); end + + class << self + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#247 + def prepended_modules_of(klass); end + end +end + +# source://rspec-mocks//lib/rspec/mocks/proxy.rb#65 +RSpec::Mocks::Proxy::DEFAULT_MESSAGE_EXPECTATION_OPTS = T.let(T.unsafe(nil), Hash) + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/proxy.rb#6 +class RSpec::Mocks::Proxy::SpecificMessage < ::Struct + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#7 + def ==(expectation); end + + # Returns the value of attribute args + # + # @return [Object] the current value of args + def args; end + + # Sets the attribute args + # + # @param value [Object] the value to set the attribute args to. + # @return [Object] the newly set value + def args=(_); end + + # Returns the value of attribute message + # + # @return [Object] the current value of message + def message; end + + # Sets the attribute message + # + # @param value [Object] the value to set the attribute message to. + # @return [Object] the newly set value + def message=(_); end + + # Returns the value of attribute object + # + # @return [Object] the current value of object + def object; end + + # Sets the attribute object + # + # @param value [Object] the value to set the attribute object to. + # @return [Object] the newly set value + def object=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/proxy.rb#464 +class RSpec::Mocks::ProxyForNil < ::RSpec::Mocks::PartialDoubleProxy + # @return [ProxyForNil] a new instance of ProxyForNil + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#465 + def initialize(order_group); end + + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#473 + def add_message_expectation(method_name, opts = T.unsafe(nil), &block); end + + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#478 + def add_stub(method_name, opts = T.unsafe(nil), &implementation); end + + # Returns the value of attribute disallow_expectations. + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#470 + def disallow_expectations; end + + # Sets the attribute disallow_expectations + # + # @param value the value to set the attribute disallow_expectations to. + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#470 + def disallow_expectations=(_arg0); end + + # Returns the value of attribute warn_about_expectations. + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#471 + def warn_about_expectations; end + + # Sets the attribute warn_about_expectations + # + # @param value the value to set the attribute warn_about_expectations to. + # + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#471 + def warn_about_expectations=(_arg0); end + + private + + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#515 + def raise_error(method_name); end + + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#485 + def set_expectation_behavior; end + + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#510 + def warn(method_name); end + + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#499 + def warn_or_raise!(method_name); end +end + +# Provides a default space implementation for outside +# the scope of an example. Called "root" because it serves +# as the root of the space stack. +# +# @private +# +# source://rspec-mocks//lib/rspec/mocks/space.rb#9 +class RSpec::Mocks::RootSpace + # source://rspec-mocks//lib/rspec/mocks/space.rb#18 + def any_instance_proxy_for(*_args); end + + # source://rspec-mocks//lib/rspec/mocks/space.rb#14 + def any_instance_recorder_for(*_args); end + + # source://rspec-mocks//lib/rspec/mocks/space.rb#26 + def any_instance_recorders_from_ancestry_of(_object); end + + # source://rspec-mocks//lib/rspec/mocks/space.rb#44 + def new_scope; end + + # source://rspec-mocks//lib/rspec/mocks/space.rb#10 + def proxy_for(*_args); end + + # source://rspec-mocks//lib/rspec/mocks/space.rb#22 + def register_constant_mutator(_mutator); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/space.rb#36 + def registered?(_object); end + + # source://rspec-mocks//lib/rspec/mocks/space.rb#30 + def reset_all; end + + # source://rspec-mocks//lib/rspec/mocks/space.rb#40 + def superclass_proxy_for(*_args); end + + # source://rspec-mocks//lib/rspec/mocks/space.rb#33 + def verify_all; end + + private + + # @raise [OutsideOfExampleError] + # + # source://rspec-mocks//lib/rspec/mocks/space.rb#50 + def raise_lifecycle_message; end +end + +# A message expectation that only allows concrete return values to be set +# for a message. While this same effect can be achieved using a standard +# MessageExpectation, this version is much faster and so can be used as an +# optimization. +# +# @private +# +# source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#11 +class RSpec::Mocks::SimpleMessageExpectation + # @return [SimpleMessageExpectation] a new instance of SimpleMessageExpectation + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#12 + def initialize(message, response, error_generator, backtrace_line = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#26 + def called_max_times?; end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#17 + def invoke(*_); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#22 + def matches?(message, *_); end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#37 + def unadvise(_); end + + # source://rspec-mocks//lib/rspec/mocks/message_expectation.rb#30 + def verify_messages_received; end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/space.rb#57 +class RSpec::Mocks::Space + # @return [Space] a new instance of Space + # + # source://rspec-mocks//lib/rspec/mocks/space.rb#60 + def initialize; end + + # Returns the value of attribute any_instance_mutex. + # + # source://rspec-mocks//lib/rspec/mocks/space.rb#58 + def any_instance_mutex; end + + # source://rspec-mocks//lib/rspec/mocks/space.rb#103 + def any_instance_proxy_for(klass); end + + # source://rspec-mocks//lib/rspec/mocks/space.rb#93 + def any_instance_recorder_for(klass, only_return_existing = T.unsafe(nil)); end + + # Returns the value of attribute any_instance_recorders. + # + # source://rspec-mocks//lib/rspec/mocks/space.rb#58 + def any_instance_recorders; end + + # source://rspec-mocks//lib/rspec/mocks/space.rb#131 + def any_instance_recorders_from_ancestry_of(object); end + + # source://rspec-mocks//lib/rspec/mocks/space.rb#89 + def constant_mutator_for(name); end + + # source://rspec-mocks//lib/rspec/mocks/space.rb#111 + def ensure_registered(object); end + + # source://rspec-mocks//lib/rspec/mocks/space.rb#69 + def new_scope; end + + # Returns the value of attribute proxies. + # + # source://rspec-mocks//lib/rspec/mocks/space.rb#58 + def proxies; end + + # source://rspec-mocks//lib/rspec/mocks/space.rb#107 + def proxies_of(klass); end + + # source://rspec-mocks//lib/rspec/mocks/space.rb#111 + def proxy_for(object); end + + # Returns the value of attribute proxy_mutex. + # + # source://rspec-mocks//lib/rspec/mocks/space.rb#58 + def proxy_mutex; end + + # source://rspec-mocks//lib/rspec/mocks/space.rb#85 + def register_constant_mutator(mutator); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/space.rb#127 + def registered?(object); end + + # source://rspec-mocks//lib/rspec/mocks/space.rb#78 + def reset_all; end + + # source://rspec-mocks//lib/rspec/mocks/space.rb#118 + def superclass_proxy_for(klass); end + + # source://rspec-mocks//lib/rspec/mocks/space.rb#73 + def verify_all; end + + private + + # source://rspec-mocks//lib/rspec/mocks/space.rb#184 + def any_instance_recorder_not_found_for(id, klass); end + + # source://rspec-mocks//lib/rspec/mocks/space.rb#171 + def class_proxy_with_callback_verification_strategy(object, strategy); end + + # source://rspec-mocks//lib/rspec/mocks/space.rb#202 + def id_for(object); end + + # source://rspec-mocks//lib/rspec/mocks/space.rb#147 + def new_mutex; end + + # source://rspec-mocks//lib/rspec/mocks/space.rb#151 + def proxy_not_found_for(id, object); end + + # source://rspec-mocks//lib/rspec/mocks/space.rb#166 + def superclass_proxy_not_found_for(id, object); end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/message_chain.rb#75 +class RSpec::Mocks::StubChain < ::RSpec::Mocks::MessageChain + private + + # source://rspec-mocks//lib/rspec/mocks/message_chain.rb#82 + def expectation(object, message, &return_block); end + + class << self + # source://rspec-mocks//lib/rspec/mocks/message_chain.rb#76 + def stub_chain_on(object, *chain, &blk); end + end +end + +# Provides methods for enabling and disabling the available syntaxes +# provided by rspec-mocks. +# +# @api private +# +# source://rspec-mocks//lib/rspec/mocks/syntax.rb#6 +module RSpec::Mocks::Syntax + class << self + # Determines where the methods like `should_receive`, and `stub` are added. + # + # @api private + # + # source://rspec-mocks//lib/rspec/mocks/syntax.rb#181 + def default_should_syntax_host; end + + # Disables the expect syntax (`expect(dbl).to receive`, `allow(dbl).to receive`, etc). + # + # @api private + # + # source://rspec-mocks//lib/rspec/mocks/syntax.rb#150 + def disable_expect(syntax_host = T.unsafe(nil)); end + + # Disables the should syntax (`dbl.stub`, `dbl.should_receive`, etc). + # + # @api private + # + # source://rspec-mocks//lib/rspec/mocks/syntax.rb#89 + def disable_should(syntax_host = T.unsafe(nil)); end + + # Enables the expect syntax (`expect(dbl).to receive`, `allow(dbl).to receive`, etc). + # + # @api private + # + # source://rspec-mocks//lib/rspec/mocks/syntax.rb#110 + def enable_expect(syntax_host = T.unsafe(nil)); end + + # Enables the should syntax (`dbl.stub`, `dbl.should_receive`, etc). + # + # @api private + # + # source://rspec-mocks//lib/rspec/mocks/syntax.rb#26 + def enable_should(syntax_host = T.unsafe(nil)); end + + # Indicates whether or not the expect syntax is enabled. + # + # @api private + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/syntax.rb#175 + def expect_enabled?(syntax_host = T.unsafe(nil)); end + + # Indicates whether or not the should syntax is enabled. + # + # @api private + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/syntax.rb#169 + def should_enabled?(syntax_host = T.unsafe(nil)); end + + # @api private + # @private + # + # source://rspec-mocks//lib/rspec/mocks/syntax.rb#8 + def warn_about_should!; end + + # @api private + # @private + # + # source://rspec-mocks//lib/rspec/mocks/syntax.rb#13 + def warn_unless_should_configured(method_name, replacement = T.unsafe(nil)); end + end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/targets.rb#63 +class RSpec::Mocks::TargetBase + include ::RSpec::Mocks::TargetDelegationInstanceMethods + extend ::RSpec::Mocks::TargetDelegationClassMethods + + # @return [TargetBase] a new instance of TargetBase + # + # source://rspec-mocks//lib/rspec/mocks/targets.rb#64 + def initialize(target); end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/targets.rb#4 +module RSpec::Mocks::TargetDelegationClassMethods + # source://rspec-mocks//lib/rspec/mocks/targets.rb#14 + def delegate_not_to(matcher_method, options = T.unsafe(nil)); end + + # source://rspec-mocks//lib/rspec/mocks/targets.rb#5 + def delegate_to(matcher_method); end + + # source://rspec-mocks//lib/rspec/mocks/targets.rb#28 + def disallow_negation(method_name); end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/targets.rb#36 +module RSpec::Mocks::TargetDelegationInstanceMethods + # Returns the value of attribute target. + # + # source://rspec-mocks//lib/rspec/mocks/targets.rb#37 + def target; end + + private + + # source://rspec-mocks//lib/rspec/mocks/targets.rb#45 + def define_matcher(matcher, name, &block); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/targets.rb#41 + def matcher_allowed?(matcher); end + + # @raise [NegationUnsupportedError] + # + # source://rspec-mocks//lib/rspec/mocks/targets.rb#55 + def raise_negation_unsupported(method_name, matcher); end + + # @raise [UnsupportedMatcherError] + # + # source://rspec-mocks//lib/rspec/mocks/targets.rb#49 + def raise_unsupported_matcher(method_name, matcher); end +end + +# Implements the methods needed for a pure test double. RSpec::Mocks::Double +# includes this module, and it is provided for cases where you want a +# pure test double without subclassing RSpec::Mocks::Double. +# +# source://rspec-mocks//lib/rspec/mocks/test_double.rb#6 +module RSpec::Mocks::TestDouble + # Creates a new test double with a `name` (that will be used in error + # messages only) + # + # source://rspec-mocks//lib/rspec/mocks/test_double.rb#9 + def initialize(name = T.unsafe(nil), stubs = T.unsafe(nil)); end + + # This allows for comparing the mock to other objects that proxy such as + # ActiveRecords belongs_to proxy objects. By making the other object run + # the comparison, we're sure the call gets delegated to the proxy + # target. + # + # source://rspec-mocks//lib/rspec/mocks/test_double.rb#36 + def ==(other); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/test_double.rb#56 + def __build_mock_proxy_unless_expired(order_group); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/test_double.rb#61 + def __disallow_further_usage!; end + + # Tells the object to respond to all messages. If specific stub values + # are declared, they'll work as expected. If not, the receiver is + # returned. + # + # source://rspec-mocks//lib/rspec/mocks/test_double.rb#23 + def as_null_object; end + + # Override for default freeze implementation to prevent freezing of test + # doubles. + # + # source://rspec-mocks//lib/rspec/mocks/test_double.rb#67 + def freeze; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/test_double.rb#41 + def inspect; end + + # Returns true if this object has received `as_null_object` + # + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/test_double.rb#28 + def null_object?; end + + # @private + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/test_double.rb#51 + def respond_to?(message, incl_private = T.unsafe(nil)); end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/test_double.rb#46 + def to_s; end + + private + + # source://rspec-mocks//lib/rspec/mocks/test_double.rb#115 + def __build_mock_proxy(order_group); end + + # source://rspec-mocks//lib/rspec/mocks/test_double.rb#111 + def __mock_proxy; end + + # source://rspec-mocks//lib/rspec/mocks/test_double.rb#119 + def __raise_expired_error; end + + # source://rspec-mocks//lib/rspec/mocks/test_double.rb#105 + def assign_stubs(stubs); end + + # source://rspec-mocks//lib/rspec/mocks/test_double.rb#124 + def initialize_copy(other); end + + # @raise [NoMethodError] + # + # source://rspec-mocks//lib/rspec/mocks/test_double.rb#74 + def method_missing(message, *args, &block); end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/test_double.rb#137 +module RSpec::Mocks::TestDoubleFormatter + class << self + # source://rspec-mocks//lib/rspec/mocks/test_double.rb#138 + def format(dbl, unwrap = T.unsafe(nil)); end + + private + + # source://rspec-mocks//lib/rspec/mocks/test_double.rb#164 + def name_desc(dbl); end + + # source://rspec-mocks//lib/rspec/mocks/test_double.rb#147 + def type_desc(dbl); end + + # source://rspec-mocks//lib/rspec/mocks/test_double.rb#159 + def verified_module_desc(dbl); end + end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/proxy.rb#311 +class RSpec::Mocks::TestDoubleProxy < ::RSpec::Mocks::Proxy + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#312 + def reset; end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/error_generator.rb#29 +class RSpec::Mocks::UnsupportedMatcherError < ::StandardError; end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#6 +module RSpec::Mocks::VerifyingDouble + # source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#53 + def initialize(doubled_module, *args); end + + # source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#39 + def __send__(name, *args, **_arg2, &block); end + + # source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#20 + def method_missing(message, *args, &block); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#7 + def respond_to?(message, include_private = T.unsafe(nil)); end + + # source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#48 + def send(name, *args, **_arg2, &block); end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/error_generator.rb#33 +class RSpec::Mocks::VerifyingDoubleNotDefinedError < ::StandardError; end + +# Used in place of a `VerifyingExistingMethodDouble` for the specific case +# of mocking or stubbing a `new` method on a class. In this case, we substitute +# the method signature from `#initialize` since new's signature is just `*args`. +# +# @private +# +# source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#215 +class RSpec::Mocks::VerifyingExistingClassNewMethodDouble < ::RSpec::Mocks::VerifyingExistingMethodDouble + # @yield [Support::MethodSignature.new(object.instance_method(:initialize))] + # + # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#216 + def with_signature; end +end + +# A VerifyingMethodDouble fetches the method to verify against from the +# original object, using a MethodReference. This works for pure doubles, +# but when the original object is itself the one being modified we need to +# collapse the reference and the method double into a single object so that +# we can access the original pristine method definition. +# +# @private +# +# source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#180 +class RSpec::Mocks::VerifyingExistingMethodDouble < ::RSpec::Mocks::VerifyingMethodDouble + # @return [VerifyingExistingMethodDouble] a new instance of VerifyingExistingMethodDouble + # + # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#181 + def initialize(object, method_name, proxy); end + + # @return [Boolean] + # + # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#195 + def unimplemented?; end + + # @yield [Support::MethodSignature.new(original_implementation_callable)] + # + # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#191 + def with_signature; end + + class << self + # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#199 + def for(object, method_name, proxy); end + end +end + +# A message expectation that knows about the real implementation of the +# message being expected, so that it can verify that any expectations +# have the valid arguments. +# +# @api private +# +# source://rspec-mocks//lib/rspec/mocks/verifying_message_expectation.rb#17 +class RSpec::Mocks::VerifyingMessageExpectation < ::RSpec::Mocks::MessageExpectation + # @api private + # @return [VerifyingMessageExpectation] a new instance of VerifyingMessageExpectation + # + # source://rspec-mocks//lib/rspec/mocks/verifying_message_expectation.rb#20 + def initialize(*args); end + + # A level of indirection is used here rather than just passing in the + # method itself, since method look up is expensive and we only want to + # do it if actually needed. + # + # Conceptually the method reference makes more sense as a constructor + # argument since it should be immutable, but it is significantly more + # straight forward to build the object in pieces so for now it stays as + # an accessor. + # + # @api private + # + # source://rspec-mocks//lib/rspec/mocks/verifying_message_expectation.rb#18 + def method_reference; end + + # A level of indirection is used here rather than just passing in the + # method itself, since method look up is expensive and we only want to + # do it if actually needed. + # + # Conceptually the method reference makes more sense as a constructor + # argument since it should be immutable, but it is significantly more + # straight forward to build the object in pieces so for now it stays as + # an accessor. + # + # @api private + # + # source://rspec-mocks//lib/rspec/mocks/verifying_message_expectation.rb#18 + def method_reference=(_arg0); end + + # @api private + # @private + # + # source://rspec-mocks//lib/rspec/mocks/verifying_message_expectation.rb#25 + def with(*args, **_arg1, &block); end + + private + + # @api private + # + # source://rspec-mocks//lib/rspec/mocks/verifying_message_expectation.rb#38 + def validate_expected_arguments!; end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#139 +class RSpec::Mocks::VerifyingMethodDouble < ::RSpec::Mocks::MethodDouble + # @return [VerifyingMethodDouble] a new instance of VerifyingMethodDouble + # + # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#140 + def initialize(object, method_name, proxy, method_reference); end + + # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#149 + def add_expectation(*args, &block); end + + # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#154 + def add_stub(*args, &block); end + + # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#145 + def message_expectation_class; end + + # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#159 + def proxy_method_invoked(obj, *args, **_arg2, &block); end + + # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#165 + def validate_arguments!(actual_args); end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#134 +class RSpec::Mocks::VerifyingPartialClassDoubleProxy < ::RSpec::Mocks::VerifyingPartialDoubleProxy + include ::RSpec::Mocks::PartialClassDoubleProxyMethods +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#107 +class RSpec::Mocks::VerifyingPartialDoubleProxy < ::RSpec::Mocks::PartialDoubleProxy + include ::RSpec::Mocks::VerifyingProxyMethods + + # @return [VerifyingPartialDoubleProxy] a new instance of VerifyingPartialDoubleProxy + # + # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#110 + def initialize(object, expectation_ordering, optional_callback_invocation_strategy = T.unsafe(nil)); end + + # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#123 + def ensure_implemented(_method_name); end + + # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#128 + def method_reference; end +end + +# A verifying proxy mostly acts like a normal proxy, except that it +# contains extra logic to try and determine the validity of any expectation +# set on it. This includes whether or not methods have been defined and the +# validity of arguments on method calls. +# +# In all other ways this behaves like a normal proxy. It only adds the +# verification behaviour to specific methods then delegates to the parent +# implementation. +# +# These checks are only activated if the doubled class has already been +# loaded, otherwise they are disabled. This allows for testing in +# isolation. +# +# @private +# +# source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#71 +class RSpec::Mocks::VerifyingProxy < ::RSpec::Mocks::TestDoubleProxy + include ::RSpec::Mocks::VerifyingProxyMethods + + # @return [VerifyingProxy] a new instance of VerifyingProxy + # + # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#74 + def initialize(object, order_group, doubled_module, method_reference_class); end + + # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#88 + def method_reference; end + + # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#98 + def validate_arguments!(method_name, args); end + + # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#94 + def visibility_for(method_name); end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#22 +module RSpec::Mocks::VerifyingProxyMethods + # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#33 + def add_message_expectation(method_name, opts = T.unsafe(nil), &block); end + + # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#28 + def add_simple_stub(method_name, *args); end + + # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#23 + def add_stub(method_name, opts = T.unsafe(nil), &implementation); end + + # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#38 + def ensure_implemented(method_name); end + + # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#48 + def ensure_publicly_implemented(method_name, _object); end +end + +# Version information for RSpec mocks. +# +# source://rspec-mocks//lib/rspec/mocks/version.rb#4 +module RSpec::Mocks::Version; end + +# Version of RSpec mocks currently in use in SemVer format. +# +# source://rspec-mocks//lib/rspec/mocks/version.rb#6 +RSpec::Mocks::Version::STRING = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/rspec-sorbet@1.9.2.rbi b/sorbet/rbi/gems/rspec-sorbet@1.9.2.rbi new file mode 100644 index 00000000000..45acc4465c8 --- /dev/null +++ b/sorbet/rbi/gems/rspec-sorbet@1.9.2.rbi @@ -0,0 +1,163 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rspec-sorbet` gem. +# Please instead update this file by running `bin/tapioca gem rspec-sorbet`. + +# source://rspec-sorbet//lib/rspec/sorbet/doubles.rb#6 +module RSpec + class << self + # source://rspec-core/3.12.2/lib/rspec/core.rb#70 + def clear_examples; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#85 + def configuration; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#49 + def configuration=(_arg0); end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#97 + def configure; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#194 + def const_missing(name); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def context(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#122 + def current_example; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#128 + def current_example=(example); end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#154 + def current_scope; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#134 + def current_scope=(scope); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def describe(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def example_group(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def fcontext(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def fdescribe(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#58 + def reset; end + + # source://rspec-core/3.12.2/lib/rspec/core/shared_example_group.rb#110 + def shared_context(name, *args, &block); end + + # source://rspec-core/3.12.2/lib/rspec/core/shared_example_group.rb#110 + def shared_examples(name, *args, &block); end + + # source://rspec-core/3.12.2/lib/rspec/core/shared_example_group.rb#110 + def shared_examples_for(name, *args, &block); end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#160 + def world; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#49 + def world=(_arg0); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def xcontext(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def xdescribe(*args, &example_group_block); end + end +end + +# source://rspec-sorbet//lib/rspec/sorbet/doubles.rb#7 +module RSpec::Sorbet + extend ::RSpec::Sorbet::Doubles +end + +# source://rspec-sorbet//lib/rspec/sorbet/doubles.rb#8 +module RSpec::Sorbet::Doubles + requires_ancestor { Kernel } + + # source://rspec-sorbet//lib/rspec/sorbet/doubles.rb#15 + sig { void } + def allow_doubles!; end + + # @return [void] + # + # source://sorbet-runtime/0.5.11178/lib/types/private/methods/_methods.rb#252 + def allow_instance_doubles!(*args, **_arg1, &blk); end + + # source://rspec-sorbet//lib/rspec/sorbet/doubles.rb#36 + sig { params(clear_existing: T::Boolean).void } + def reset!(clear_existing: T.unsafe(nil)); end + + private + + # source://rspec-sorbet//lib/rspec/sorbet/doubles.rb#139 + sig { params(signature: T.untyped, opts: T::Hash[T.untyped, T.untyped]).void } + def call_validation_error_handler(signature, opts); end + + # source://rspec-sorbet//lib/rspec/sorbet/doubles.rb#65 + sig { returns(T.nilable(T::Boolean)) } + def configured; end + + # @return [Boolean, nil] + # + # source://rspec-sorbet//lib/rspec/sorbet/doubles.rb#65 + def configured=(_arg0); end + + # source://rspec-sorbet//lib/rspec/sorbet/doubles.rb#127 + sig { params(message: ::String).returns(T::Boolean) } + def double_message_with_ellipsis?(message); end + + # source://rspec-sorbet//lib/rspec/sorbet/doubles.rb#62 + sig { returns(T.nilable(T.proc.params(signature: T.untyped, opts: T::Hash[T.untyped, T.untyped]).void)) } + def existing_call_validation_error_handler; end + + # @return [T.proc.params(signature: T.untyped, opts: T::Hash[T.untyped, T.untyped]).void, nil] + # + # source://rspec-sorbet//lib/rspec/sorbet/doubles.rb#62 + def existing_call_validation_error_handler=(_arg0); end + + # source://rspec-sorbet//lib/rspec/sorbet/doubles.rb#59 + sig { returns(T.nilable(T.proc.params(signature: ::Exception).void)) } + def existing_inline_type_error_handler; end + + # @return [T.proc.params(signature: Exception).void, nil] + # + # source://rspec-sorbet//lib/rspec/sorbet/doubles.rb#59 + def existing_inline_type_error_handler=(_arg0); end + + # @raise [TypeError] + # + # source://rspec-sorbet//lib/rspec/sorbet/doubles.rb#73 + sig { params(signature: T.untyped, opts: T.untyped).void } + def handle_call_validation_error(signature, opts); end + + # source://rspec-sorbet//lib/rspec/sorbet/doubles.rb#80 + sig { params(error: ::Exception).void } + def inline_type_error_handler(error); end + + # source://rspec-sorbet//lib/rspec/sorbet/doubles.rb#134 + sig { params(message: ::String).returns(T::Boolean) } + def typed_array_message?(message); end + + # source://rspec-sorbet//lib/rspec/sorbet/doubles.rb#118 + sig { params(message: ::String).returns(T::Boolean) } + def unable_to_check_type_for_message?(message); end +end + +# source://rspec-sorbet//lib/rspec/sorbet/doubles.rb#68 +RSpec::Sorbet::Doubles::INLINE_DOUBLE_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://rspec-sorbet//lib/rspec/sorbet/doubles.rb#131 +RSpec::Sorbet::Doubles::TYPED_ARRAY_MESSAGE = T.let(T.unsafe(nil), Regexp) + +# source://rspec-sorbet//lib/rspec/sorbet/doubles.rb#123 +RSpec::Sorbet::Doubles::VERIFYING_DOUBLE_OR_DOUBLE = T.let(T.unsafe(nil), Regexp) diff --git a/sorbet/rbi/gems/rspec-support@3.12.1.rbi b/sorbet/rbi/gems/rspec-support@3.12.1.rbi new file mode 100644 index 00000000000..fe2118b735b --- /dev/null +++ b/sorbet/rbi/gems/rspec-support@3.12.1.rbi @@ -0,0 +1,1609 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rspec-support` gem. +# Please instead update this file by running `bin/tapioca gem rspec-support`. + +# source://rspec-support//lib/rspec/support.rb#1 +module RSpec + extend ::RSpec::Support::Warnings + + class << self + # source://rspec-core/3.12.2/lib/rspec/core.rb#70 + def clear_examples; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#85 + def configuration; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#49 + def configuration=(_arg0); end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#97 + def configure; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#194 + def const_missing(name); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def context(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#122 + def current_example; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#128 + def current_example=(example); end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#154 + def current_scope; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#134 + def current_scope=(scope); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def describe(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def example_group(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def fcontext(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def fdescribe(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#58 + def reset; end + + # source://rspec-core/3.12.2/lib/rspec/core/shared_example_group.rb#110 + def shared_context(name, *args, &block); end + + # source://rspec-core/3.12.2/lib/rspec/core/shared_example_group.rb#110 + def shared_examples(name, *args, &block); end + + # source://rspec-core/3.12.2/lib/rspec/core/shared_example_group.rb#110 + def shared_examples_for(name, *args, &block); end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#160 + def world; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#49 + def world=(_arg0); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def xcontext(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def xdescribe(*args, &example_group_block); end + end +end + +# Consistent implementation for "cleaning" the caller method to strip out +# non-rspec lines. This enables errors to be reported at the call site in +# the code using the library, which is far more useful than the particular +# internal method that raised an error. +# +# source://rspec-support//lib/rspec/support/caller_filter.rb#8 +class RSpec::CallerFilter + class << self + # Earlier rubies do not support the two argument form of `caller`. This + # fallback is logically the same, but slower. + # + # source://rspec-support//lib/rspec/support/caller_filter.rb#47 + def first_non_rspec_line(skip_frames = T.unsafe(nil), increment = T.unsafe(nil)); end + end +end + +# source://rspec-support//lib/rspec/support/caller_filter.rb#18 +RSpec::CallerFilter::ADDITIONAL_TOP_LEVEL_FILES = T.let(T.unsafe(nil), Array) + +# rubygems/core_ext/kernel_require.rb isn't actually part of rspec (obviously) but we want +# it ignored when we are looking for the first meaningful line of the backtrace outside +# of RSpec. It can show up in the backtrace as the immediate first caller +# when `CallerFilter.first_non_rspec_line` is called from the top level of a required +# file, but it depends on if rubygems is loaded or not. We don't want to have to deal +# with this complexity in our `RSpec.deprecate` calls, so we ignore it here. +# +# source://rspec-support//lib/rspec/support/caller_filter.rb#28 +RSpec::CallerFilter::IGNORE_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://rspec-support//lib/rspec/support/caller_filter.rb#20 +RSpec::CallerFilter::LIB_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://rspec-support//lib/rspec/support/caller_filter.rb#9 +RSpec::CallerFilter::RSPEC_LIBS = T.let(T.unsafe(nil), Array) + +# source://rspec-support//lib/rspec/support.rb#2 +module RSpec::Support + class << self + # Used internally to get a class of a given object, even if it does not respond to #class. + # + # @api private + # + # source://rspec-support//lib/rspec/support.rb#84 + def class_of(object); end + + # Defines a helper method that is optimized to require files from the + # named lib. The passed block MUST be `{ |f| require_relative f }` + # because for `require_relative` to work properly from within the named + # lib the line of code must be IN that lib. + # + # `require_relative` is preferred when available because it is always O(1), + # regardless of the number of dirs in $LOAD_PATH. `require`, on the other + # hand, does a linear O(N) search over the dirs in the $LOAD_PATH until + # it can resolve the file relative to one of the dirs. + # + # @api private + # + # source://rspec-support//lib/rspec/support.rb#14 + def define_optimized_require_for_rspec(lib, &require_relative); end + + # Remove a previously registered matcher. Useful for cleaning up after + # yourself in specs. + # + # @private + # + # source://rspec-support//lib/rspec/support/matcher_definition.rb#22 + def deregister_matcher_definition(&block); end + + # @api private + # + # source://rspec-support//lib/rspec/support.rb#111 + def failure_notifier; end + + # @api private + # + # source://rspec-support//lib/rspec/support.rb#103 + def failure_notifier=(callable); end + + # @private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/matcher_definition.rb#27 + def is_a_matcher?(object); end + + # @private + # + # source://rspec-support//lib/rspec/support/matcher_definition.rb#4 + def matcher_definitions; end + + # source://rspec-support//lib/rspec/support.rb#52 + def method_handle_for(object, method_name); end + + # @api private + # + # source://rspec-support//lib/rspec/support.rb#116 + def notify_failure(failure, options = T.unsafe(nil)); end + + # Used internally to break cyclic dependency between mocks, expectations, + # and support. We don't currently have a consistent implementation of our + # matchers, though we are considering changing that: + # https://github.com/rspec/rspec-mocks/issues/513 + # + # @private + # + # source://rspec-support//lib/rspec/support/matcher_definition.rb#14 + def register_matcher_definition(&block); end + + # source://rspec-support//lib/rspec/support.rb#23 + def require_rspec_core(f); end + + # source://rspec-support//lib/rspec/support.rb#23 + def require_rspec_support(f); end + + # gives a string representation of an object for use in RSpec descriptions + # + # @api private + # + # source://rspec-support//lib/rspec/support/matcher_definition.rb#34 + def rspec_description_for_object(object); end + + # source://rspec-support//lib/rspec/support.rb#93 + def thread_local_data; end + + # @api private + # + # source://rspec-support//lib/rspec/support.rb#138 + def warning_notifier; end + + # @api private + # + # source://rspec-support//lib/rspec/support.rb#131 + def warning_notifier=(_arg0); end + + # @api private + # + # source://rspec-support//lib/rspec/support.rb#121 + def with_failure_notifier(callable); end + end +end + +# @private +# +# source://rspec-support//lib/rspec/support.rb#143 +module RSpec::Support::AllExceptionsExceptOnesWeMustNotRescue + class << self + # source://rspec-support//lib/rspec/support.rb#148 + def ===(exception); end + end +end + +# These exceptions are dangerous to rescue as rescuing them +# would interfere with things we should not interfere with. +# +# source://rspec-support//lib/rspec/support.rb#146 +RSpec::Support::AllExceptionsExceptOnesWeMustNotRescue::AVOID_RESCUING = T.let(T.unsafe(nil), Array) + +# Deals with the slightly different semantics of block arguments. +# For methods, arguments are required unless a default value is provided. +# For blocks, arguments are optional, even if no default value is provided. +# +# However, we want to treat block args as required since you virtually +# always want to pass a value for each received argument and our +# `and_yield` has treated block args as required for many years. +# +# @api private +# +# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#266 +class RSpec::Support::BlockSignature < ::RSpec::Support::MethodSignature + # @api private + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#268 + def classify_parameters; end +end + +# @private +# +# source://rspec-support//lib/rspec/support/comparable_version.rb#4 +class RSpec::Support::ComparableVersion + include ::Comparable + + # @return [ComparableVersion] a new instance of ComparableVersion + # + # source://rspec-support//lib/rspec/support/comparable_version.rb#9 + def initialize(string); end + + # source://rspec-support//lib/rspec/support/comparable_version.rb#13 + def <=>(other); end + + # source://rspec-support//lib/rspec/support/comparable_version.rb#35 + def segments; end + + # Returns the value of attribute string. + # + # source://rspec-support//lib/rspec/support/comparable_version.rb#7 + def string; end +end + +# @private +# +# source://rspec-support//lib/rspec/support.rb#108 +RSpec::Support::DEFAULT_FAILURE_NOTIFIER = T.let(T.unsafe(nil), Proc) + +# @private +# +# source://rspec-support//lib/rspec/support.rb#135 +RSpec::Support::DEFAULT_WARNING_NOTIFIER = T.let(T.unsafe(nil), Proc) + +# source://rspec-support//lib/rspec/support/differ.rb#10 +class RSpec::Support::Differ + # @return [Differ] a new instance of Differ + # + # source://rspec-support//lib/rspec/support/differ.rb#67 + def initialize(opts = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/differ.rb#63 + def color?; end + + # source://rspec-support//lib/rspec/support/differ.rb#11 + def diff(actual, expected); end + + # source://rspec-support//lib/rspec/support/differ.rb#57 + def diff_as_object(actual, expected); end + + # source://rspec-support//lib/rspec/support/differ.rb#28 + def diff_as_string(actual, expected); end + + private + + # source://rspec-support//lib/rspec/support/differ.rb#128 + def add_old_hunk_to_hunk(hunk, oldhunk); end + + # source://rspec-support//lib/rspec/support/differ.rb#124 + def add_to_output(output, string); end + + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/differ.rb#78 + def all_strings?(*args); end + + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/differ.rb#82 + def any_multiline_strings?(*args); end + + # source://rspec-support//lib/rspec/support/differ.rb#153 + def blue(text); end + + # source://rspec-support//lib/rspec/support/differ.rb#115 + def build_hunks(actual, expected); end + + # source://rspec-support//lib/rspec/support/differ.rb#90 + def coerce_to_string(string_or_array); end + + # source://rspec-support//lib/rspec/support/differ.rb#141 + def color(text, color_code); end + + # source://rspec-support//lib/rspec/support/differ.rb#161 + def color_diff(diff); end + + # source://rspec-support//lib/rspec/support/differ.rb#95 + def diffably_stringify(array); end + + # source://rspec-support//lib/rspec/support/differ.rb#119 + def finalize_output(output, final_line); end + + # source://rspec-support//lib/rspec/support/differ.rb#137 + def format_type; end + + # source://rspec-support//lib/rspec/support/differ.rb#149 + def green(text); end + + # source://rspec-support//lib/rspec/support/differ.rb#202 + def handle_encoding_errors(actual, expected); end + + # source://rspec-support//lib/rspec/support/differ.rb#192 + def hash_to_string(hash); end + + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/differ.rb#106 + def multiline?(string); end + + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/differ.rb#86 + def no_numbers?(*args); end + + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/differ.rb#74 + def no_procs?(*args); end + + # source://rspec-support//lib/rspec/support/differ.rb#157 + def normal(text); end + + # source://rspec-support//lib/rspec/support/differ.rb#178 + def object_to_string(object); end + + # source://rspec-support//lib/rspec/support/differ.rb#145 + def red(text); end + + # source://rspec-support//lib/rspec/support/differ.rb#132 + def safely_flatten(array); end +end + +# Replacement for fileutils#mkdir_p because we don't want to require parts +# of stdlib in RSpec. +# +# @api private +# +# source://rspec-support//lib/rspec/support/directory_maker.rb#9 +class RSpec::Support::DirectoryMaker + class << self + # Implements nested directory construction + # + # @api private + # + # source://rspec-support//lib/rspec/support/directory_maker.rb#13 + def mkdir_p(path); end + + private + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/directory_maker.rb#55 + def directory_exists?(dirname); end + + # @api private + # + # source://rspec-support//lib/rspec/support/directory_maker.rb#50 + def generate_path(stack, part); end + + # @api private + # + # source://rspec-support//lib/rspec/support/directory_maker.rb#47 + def generate_stack(path); end + end +end + +# @private +# +# source://rspec-support//lib/rspec/support/encoded_string.rb#4 +class RSpec::Support::EncodedString + # @return [EncodedString] a new instance of EncodedString + # + # source://rspec-support//lib/rspec/support/encoded_string.rb#14 + def initialize(string, encoding = T.unsafe(nil)); end + + # source://rspec-support//lib/rspec/support/encoded_string.rb#26 + def <<(string); end + + # source://rspec-support//lib/rspec/support/encoded_string.rb#23 + def ==(*args, &block); end + + # source://rspec-support//lib/rspec/support/encoded_string.rb#23 + def empty?(*args, &block); end + + # source://rspec-support//lib/rspec/support/encoded_string.rb#23 + def encoding(*args, &block); end + + # source://rspec-support//lib/rspec/support/encoded_string.rb#23 + def eql?(*args, &block); end + + # source://rspec-support//lib/rspec/support/encoded_string.rb#23 + def lines(*args, &block); end + + # Returns the value of attribute source_encoding. + # + # source://rspec-support//lib/rspec/support/encoded_string.rb#19 + def source_encoding; end + + # source://rspec-support//lib/rspec/support/encoded_string.rb#39 + def split(regex_or_string); end + + # source://rspec-support//lib/rspec/support/encoded_string.rb#44 + def to_s; end + + # source://rspec-support//lib/rspec/support/encoded_string.rb#44 + def to_str; end + + private + + # source://rspec-support//lib/rspec/support/encoded_string.rb#137 + def detect_source_encoding(string); end + + # Encoding Exceptions: + # + # Raised by Encoding and String methods: + # Encoding::UndefinedConversionError: + # when a transcoding operation fails + # if the String contains characters invalid for the target encoding + # e.g. "\x80".encode('UTF-8','ASCII-8BIT') + # vs "\x80".encode('UTF-8','ASCII-8BIT', undef: :replace, replace: '') + # # => '' + # Encoding::CompatibilityError + # when Encoding.compatible?(str1, str2) is nil + # e.g. utf_16le_emoji_string.split("\n") + # e.g. valid_unicode_string.encode(utf8_encoding) << ascii_string + # Encoding::InvalidByteSequenceError: + # when the string being transcoded contains a byte invalid for + # either the source or target encoding + # e.g. "\x80".encode('UTF-8','US-ASCII') + # vs "\x80".encode('UTF-8','US-ASCII', invalid: :replace, replace: '') + # # => '' + # ArgumentError + # when operating on a string with invalid bytes + # e.g."\x80".split("\n") + # TypeError + # when a symbol is passed as an encoding + # Encoding.find(:"UTF-8") + # when calling force_encoding on an object + # that doesn't respond to #to_str + # + # Raised by transcoding methods: + # Encoding::ConverterNotFoundError: + # when a named encoding does not correspond with a known converter + # e.g. 'abc'.force_encoding('UTF-8').encode('foo') + # or a converter path cannot be found + # e.g. "\x80".force_encoding('ASCII-8BIT').encode('Emacs-Mule') + # + # Raised by byte <-> char conversions + # RangeError: out of char range + # e.g. the UTF-16LE emoji: 128169.chr + # + # source://rspec-support//lib/rspec/support/encoded_string.rb#91 + def matching_encoding(string); end + + # http://stackoverflow.com/a/8711118/879854 + # Loop over chars in a string replacing chars + # with invalid encoding, which is a pretty good proxy + # for the invalid byte sequence that causes an ArgumentError + # + # source://rspec-support//lib/rspec/support/encoded_string.rb#122 + def remove_invalid_bytes(string); end + + class << self + # source://rspec-support//lib/rspec/support/encoded_string.rb#141 + def pick_encoding(source_a, source_b); end + end +end + +# Ruby's default replacement string is: +# U+FFFD ("\xEF\xBF\xBD"), for Unicode encoding forms, else +# ? ("\x3F") +# +# source://rspec-support//lib/rspec/support/encoded_string.rb#12 +RSpec::Support::EncodedString::REPLACE = T.let(T.unsafe(nil), String) + +# source://rspec-support//lib/rspec/support/encoded_string.rb#7 +RSpec::Support::EncodedString::US_ASCII = T.let(T.unsafe(nil), String) + +# Reduce allocations by storing constants. +# +# source://rspec-support//lib/rspec/support/encoded_string.rb#6 +RSpec::Support::EncodedString::UTF_8 = T.let(T.unsafe(nil), String) + +# @private +# +# source://rspec-support//lib/rspec/support/hunk_generator.rb#7 +class RSpec::Support::HunkGenerator + # @return [HunkGenerator] a new instance of HunkGenerator + # + # source://rspec-support//lib/rspec/support/hunk_generator.rb#8 + def initialize(actual, expected); end + + # source://rspec-support//lib/rspec/support/hunk_generator.rb#13 + def hunks; end + + private + + # source://rspec-support//lib/rspec/support/hunk_generator.rb#30 + def actual_lines; end + + # source://rspec-support//lib/rspec/support/hunk_generator.rb#34 + def build_hunk(piece); end + + # source://rspec-support//lib/rspec/support/hunk_generator.rb#42 + def context_lines; end + + # source://rspec-support//lib/rspec/support/hunk_generator.rb#22 + def diffs; end + + # source://rspec-support//lib/rspec/support/hunk_generator.rb#26 + def expected_lines; end +end + +# @api private +# +# source://rspec-support//lib/rspec/support.rb#38 +RSpec::Support::KERNEL_METHOD_METHOD = T.let(T.unsafe(nil), UnboundMethod) + +# Allows matchers to be used instead of providing keyword arguments. In +# practice, when this happens only the arity of the method is verified. +# +# @private +# +# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#391 +class RSpec::Support::LooseSignatureVerifier < ::RSpec::Support::MethodSignatureVerifier + private + + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#394 + def split_args(*args); end +end + +# If a matcher is used in a signature in place of keyword arguments, all +# keyword argument validation needs to be skipped since the matcher is +# opaque. +# +# Instead, keyword arguments will be validated when the method is called +# and they are actually known. +# +# @private +# +# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#411 +class RSpec::Support::LooseSignatureVerifier::SignatureWithKeywordArgumentsMatcher + # @return [SignatureWithKeywordArgumentsMatcher] a new instance of SignatureWithKeywordArgumentsMatcher + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#412 + def initialize(signature); end + + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#432 + def has_kw_args_in?(args); end + + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#420 + def invalid_kw_args_from(_kw_args); end + + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#416 + def missing_kw_args_from(_kw_args); end + + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#424 + def non_kw_args_arity_description; end + + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#428 + def valid_non_kw_args?(*args); end +end + +# Extracts info about the number of arguments and allowed/required +# keyword args of a given method. +# +# @private +# +# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#11 +class RSpec::Support::MethodSignature + # @return [MethodSignature] a new instance of MethodSignature + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#14 + def initialize(method); end + + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#96 + def arbitrary_kw_args?; end + + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#36 + def classify_arity(arity = T.unsafe(nil)); end + + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#104 + def classify_parameters; end + + # Without considering what the last arg is, could it + # contain keyword arguments? + # + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#90 + def could_contain_kw_args?(args); end + + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#49 + def description; end + + # If the last argument is Hash, Ruby will treat only symbol keys as keyword arguments + # the rest will be grouped in another Hash and passed as positional argument. + # + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#82 + def has_kw_args_in?(args); end + + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#75 + def invalid_kw_args_from(given_kw_args); end + + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#12 + def max_non_kw_args; end + + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#12 + def min_non_kw_args; end + + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#71 + def missing_kw_args_from(given_kw_args); end + + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#21 + def non_kw_args_arity_description; end + + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#12 + def optional_kw_args; end + + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#12 + def required_kw_args; end + + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#100 + def unlimited_args?; end + + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#29 + def valid_non_kw_args?(positional_arg_count, optional_max_arg_count = T.unsafe(nil)); end +end + +# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#160 +RSpec::Support::MethodSignature::INFINITY = T.let(T.unsafe(nil), Float) + +# Encapsulates expectations about the number of arguments and +# allowed/required keyword args of a given method. +# +# @api private +# +# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#217 +class RSpec::Support::MethodSignatureExpectation + # @api private + # @return [MethodSignatureExpectation] a new instance of MethodSignatureExpectation + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#218 + def initialize; end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#245 + def empty?; end + + # @api private + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#229 + def expect_arbitrary_keywords; end + + # @api private + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#229 + def expect_arbitrary_keywords=(_arg0); end + + # @api private + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#229 + def expect_unlimited_arguments; end + + # @api private + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#229 + def expect_unlimited_arguments=(_arg0); end + + # @api private + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#227 + def keywords; end + + # @api private + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#252 + def keywords=(values); end + + # @api private + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#227 + def max_count; end + + # @api private + # @raise [ArgumentError] + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#231 + def max_count=(number); end + + # @api private + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#227 + def min_count; end + + # @api private + # @raise [ArgumentError] + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#238 + def min_count=(number); end +end + +# Abstract base class for signature verifiers. +# +# @api private +# +# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#278 +class RSpec::Support::MethodSignatureVerifier + # @api private + # @return [MethodSignatureVerifier] a new instance of MethodSignatureVerifier + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#281 + def initialize(signature, args = T.unsafe(nil)); end + + # @api private + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#324 + def error_message; end + + # @api private + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#279 + def kw_args; end + + # @api private + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#279 + def max_non_kw_args; end + + # @api private + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#279 + def min_non_kw_args; end + + # @api private + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#279 + def non_kw_args; end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#316 + def valid?; end + + # @api private + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#288 + def with_expectation(expectation); end + + private + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#355 + def arbitrary_kw_args?; end + + # @api private + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#351 + def invalid_kw_args; end + + # @api private + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#347 + def missing_kw_args; end + + # @api private + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#363 + def split_args(*args); end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#359 + def unlimited_args?; end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#343 + def valid_non_kw_args?; end +end + +# On 1.9 and up, this is in core, so we just use the real one +# +# source://rspec-support//lib/rspec/support/reentrant_mutex.rb#65 +class RSpec::Support::Mutex < ::Thread::Mutex + class << self + # source://rspec-support//lib/rspec/support/reentrant_mutex.rb#68 + def new; end + end +end + +# If you mock Mutex.new you break our usage of Mutex, so +# instead we capture the original method to return Mutexs. +# +# source://rspec-support//lib/rspec/support/reentrant_mutex.rb#66 +RSpec::Support::Mutex::NEW_MUTEX_METHOD = T.let(T.unsafe(nil), Method) + +# Provides query methods for different OS or OS features. +# +# @api private +# +# source://rspec-support//lib/rspec/support/ruby_features.rb#9 +module RSpec::Support::OS + private + + # @api private + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#12 + def windows?; end + + # @api private + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#16 + def windows_file_path?; end + + class << self + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#12 + def windows?; end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#16 + def windows_file_path?; end + end +end + +# Provide additional output details beyond what `inspect` provides when +# printing Time, DateTime, or BigDecimal +# +# @api private +# +# source://rspec-support//lib/rspec/support/object_formatter.rb#8 +class RSpec::Support::ObjectFormatter + # @api private + # @return [ObjectFormatter] a new instance of ObjectFormatter + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#27 + def initialize(max_formatted_output_length = T.unsafe(nil)); end + + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#32 + def format(object); end + + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#11 + def max_formatted_output_length; end + + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#11 + def max_formatted_output_length=(_arg0); end + + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#68 + def prepare_array(array); end + + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#92 + def prepare_element(element); end + + # Prepares the provided object to be formatted by wrapping it as needed + # in something that, when `inspect` is called on it, will produce the + # desired output. + # + # This allows us to apply the desired formatting to hash/array data structures + # at any level of nesting, simply by walking that structure and replacing items + # with custom items that have `inspect` defined to return the desired output + # for that item. Then we can just use `Array#inspect` or `Hash#inspect` to + # format the entire thing. + # + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#56 + def prepare_for_inspection(object); end + + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#74 + def prepare_hash(input_hash); end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#111 + def recursive_structure?(object); end + + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#84 + def sort_hash_keys(input_hash); end + + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#104 + def with_entering_structure(structure); end + + private + + # Returns the substring defined by the start_index and end_index + # If the string ends with a partial ANSI code code then that + # will be removed as printing partial ANSI + # codes to the terminal can lead to corruption + # + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#266 + def truncate_string(str, start_index, end_index); end + + class << self + # Methods are deferred to a default instance of the class to maintain the interface + # For example, calling ObjectFormatter.format is still possible + # + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#15 + def default_instance; end + + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#19 + def format(object); end + + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#23 + def prepare_for_inspection(object); end + end +end + +# @api private +# +# source://rspec-support//lib/rspec/support/object_formatter.rb#125 +class RSpec::Support::ObjectFormatter::BaseInspector < ::Struct + # Returns the value of attribute formatter + # + # @return [Object] the current value of formatter + def formatter; end + + # Sets the attribute formatter + # + # @param value [Object] the value to set the attribute formatter to. + # @return [Object] the newly set value + def formatter=(_); end + + # @api private + # @raise [NotImplementedError] + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#130 + def inspect; end + + # Returns the value of attribute object + # + # @return [Object] the current value of object + def object; end + + # Sets the attribute object + # + # @param value [Object] the value to set the attribute object to. + # @return [Object] the newly set value + def object=(_); end + + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#134 + def pretty_print(pp); end + + class << self + def [](*_arg0); end + + # @api private + # @raise [NotImplementedError] + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#126 + def can_inspect?(_object); end + + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# @api private +# +# source://rspec-support//lib/rspec/support/object_formatter.rb#175 +class RSpec::Support::ObjectFormatter::BigDecimalInspector < ::RSpec::Support::ObjectFormatter::BaseInspector + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#180 + def inspect; end + + class << self + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#176 + def can_inspect?(object); end + end +end + +# @api private +# +# source://rspec-support//lib/rspec/support/object_formatter.rb#157 +class RSpec::Support::ObjectFormatter::DateTimeInspector < ::RSpec::Support::ObjectFormatter::BaseInspector + # ActiveSupport sometimes overrides inspect. If `ActiveSupport` is + # defined use a custom format string that includes more time precision. + # + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#166 + def inspect; end + + class << self + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#160 + def can_inspect?(object); end + end +end + +# @api private +# +# source://rspec-support//lib/rspec/support/object_formatter.rb#158 +RSpec::Support::ObjectFormatter::DateTimeInspector::FORMAT = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rspec-support//lib/rspec/support/object_formatter.rb#222 +class RSpec::Support::ObjectFormatter::DelegatorInspector < ::RSpec::Support::ObjectFormatter::BaseInspector + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#227 + def inspect; end + + class << self + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#223 + def can_inspect?(object); end + end +end + +# @api private +# +# source://rspec-support//lib/rspec/support/object_formatter.rb#185 +class RSpec::Support::ObjectFormatter::DescribableMatcherInspector < ::RSpec::Support::ObjectFormatter::BaseInspector + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#190 + def inspect; end + + class << self + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#186 + def can_inspect?(object); end + end +end + +# @api private +# +# source://rspec-support//lib/rspec/support/object_formatter.rb#9 +RSpec::Support::ObjectFormatter::ELLIPSIS = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rspec-support//lib/rspec/support/object_formatter.rb#245 +RSpec::Support::ObjectFormatter::INSPECTOR_CLASSES = T.let(T.unsafe(nil), Array) + +# @api private +# +# source://rspec-support//lib/rspec/support/object_formatter.rb#115 +class RSpec::Support::ObjectFormatter::InspectableItem < ::Struct + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#116 + def inspect; end + + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#120 + def pretty_print(pp); end + + # Returns the value of attribute text + # + # @return [Object] the current value of text + def text; end + + # Sets the attribute text + # + # @param value [Object] the value to set the attribute text to. + # @return [Object] the newly set value + def text=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# @api private +# +# source://rspec-support//lib/rspec/support/object_formatter.rb#232 +class RSpec::Support::ObjectFormatter::InspectableObjectInspector < ::RSpec::Support::ObjectFormatter::BaseInspector + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#240 + def inspect; end + + class << self + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#233 + def can_inspect?(object); end + end +end + +# @api private +# +# source://rspec-support//lib/rspec/support/object_formatter.rb#139 +class RSpec::Support::ObjectFormatter::TimeInspector < ::RSpec::Support::ObjectFormatter::BaseInspector + # for 1.8.7 + # + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#147 + def inspect; end + + class << self + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#142 + def can_inspect?(object); end + end +end + +# @api private +# +# source://rspec-support//lib/rspec/support/object_formatter.rb#140 +RSpec::Support::ObjectFormatter::TimeInspector::FORMAT = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rspec-support//lib/rspec/support/object_formatter.rb#195 +class RSpec::Support::ObjectFormatter::UninspectableObjectInspector < ::RSpec::Support::ObjectFormatter::BaseInspector + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#205 + def inspect; end + + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#209 + def klass; end + + # http://stackoverflow.com/a/2818916 + # + # @api private + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#214 + def native_object_id; end + + class << self + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/object_formatter.rb#198 + def can_inspect?(object); end + end +end + +# @api private +# +# source://rspec-support//lib/rspec/support/object_formatter.rb#196 +RSpec::Support::ObjectFormatter::UninspectableObjectInspector::OBJECT_ID_FORMAT = T.let(T.unsafe(nil), String) + +# Provides recursive constant lookup methods useful for +# constant stubbing. +# +# source://rspec-support//lib/rspec/support/recursive_const_methods.rb#5 +module RSpec::Support::RecursiveConstMethods + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/recursive_const_methods.rb#43 + def const_defined_on?(mod, const_name); end + + # source://rspec-support//lib/rspec/support/recursive_const_methods.rb#51 + def constants_defined_on(mod); end + + # @raise [NameError] + # + # source://rspec-support//lib/rspec/support/recursive_const_methods.rb#47 + def get_const_defined_on(mod, const_name); end + + # source://rspec-support//lib/rspec/support/recursive_const_methods.rb#71 + def normalize_const_name(const_name); end + + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/recursive_const_methods.rb#62 + def recursive_const_defined?(const_name); end + + # source://rspec-support//lib/rspec/support/recursive_const_methods.rb#56 + def recursive_const_get(const_name); end +end + +# Allows a thread to lock out other threads from a critical section of code, +# while allowing the thread with the lock to reenter that section. +# +# Based on Monitor as of 2.2 - +# https://github.com/ruby/ruby/blob/eb7ddaa3a47bf48045d26c72eb0f263a53524ebc/lib/monitor.rb#L9 +# +# Depends on Mutex, but Mutex is only available as part of core since 1.9.1: +# exists - http://ruby-doc.org/core-1.9.1/Mutex.html +# dne - http://ruby-doc.org/core-1.9.0/Mutex.html +# +# @private +# +# source://rspec-support//lib/rspec/support/reentrant_mutex.rb#14 +class RSpec::Support::ReentrantMutex + # @return [ReentrantMutex] a new instance of ReentrantMutex + # + # source://rspec-support//lib/rspec/support/reentrant_mutex.rb#15 + def initialize; end + + # source://rspec-support//lib/rspec/support/reentrant_mutex.rb#21 + def synchronize; end + + private + + # source://rspec-support//lib/rspec/support/reentrant_mutex.rb#33 + def enter; end + + # source://rspec-support//lib/rspec/support/reentrant_mutex.rb#38 + def exit; end +end + +# Provides query methods for different rubies +# +# @api private +# +# source://rspec-support//lib/rspec/support/ruby_features.rb#24 +module RSpec::Support::Ruby + private + + # @api private + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#27 + def jruby?; end + + # @api private + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#35 + def jruby_9000?; end + + # @api private + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#31 + def jruby_version; end + + # @api private + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#47 + def mri?; end + + # @api private + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#43 + def non_mri?; end + + # @api private + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#39 + def rbx?; end + + # @api private + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#51 + def truffleruby?; end + + class << self + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#27 + def jruby?; end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#35 + def jruby_9000?; end + + # @api private + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#31 + def jruby_version; end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#47 + def mri?; end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#43 + def non_mri?; end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#39 + def rbx?; end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#51 + def truffleruby?; end + end +end + +# Provides query methods for ruby features that differ among +# implementations. +# +# @api private +# +# source://rspec-support//lib/rspec/support/ruby_features.rb#60 +module RSpec::Support::RubyFeatures + private + + # @api private + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#83 + def caller_locations_supported?; end + + # @api private + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#132 + def distincts_kw_args_from_positional_hash?; end + + # On JRuby 1.7 `--1.8` mode, `Process.respond_to?(:fork)` returns true, + # but when you try to fork, it raises an error: + # NotImplementedError: fork is not available on this platform + # + # When we drop support for JRuby 1.7 and/or Ruby 1.8, we can drop + # this special case. + # + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#74 + def fork_supported?; end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#137 + def kw_args_supported?; end + + # @api private + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#193 + def module_prepends_supported?; end + + # @api private + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#189 + def module_refinement_supported?; end + + # @api private + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#79 + def optional_and_splat_args_supported?; end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#141 + def required_kw_args_supported?; end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#123 + def ripper_supported?; end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#88 + def supports_exception_cause?; end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#145 + def supports_rebinding_module_methods?; end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#98 + def supports_taint?; end + + class << self + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#83 + def caller_locations_supported?; end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#132 + def distincts_kw_args_from_positional_hash?; end + + # source://rspec-support//lib/rspec/support/ruby_features.rb#74 + def fork_supported?; end + + # source://rspec-support//lib/rspec/support/ruby_features.rb#137 + def kw_args_supported?; end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#193 + def module_prepends_supported?; end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#189 + def module_refinement_supported?; end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#79 + def optional_and_splat_args_supported?; end + + # source://rspec-support//lib/rspec/support/ruby_features.rb#141 + def required_kw_args_supported?; end + + # source://rspec-support//lib/rspec/support/ruby_features.rb#123 + def ripper_supported?; end + + # source://rspec-support//lib/rspec/support/ruby_features.rb#88 + def supports_exception_cause?; end + + # source://rspec-support//lib/rspec/support/ruby_features.rb#145 + def supports_rebinding_module_methods?; end + + # source://rspec-support//lib/rspec/support/ruby_features.rb#98 + def supports_taint?; end + end +end + +# Figures out wether a given method can accept various arguments. +# Surprisingly non-trivial. +# +# @private +# +# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#385 +RSpec::Support::StrictSignatureVerifier = RSpec::Support::MethodSignatureVerifier + +# source://rspec-support//lib/rspec/support/version.rb#3 +module RSpec::Support::Version; end + +# source://rspec-support//lib/rspec/support/version.rb#4 +RSpec::Support::Version::STRING = T.let(T.unsafe(nil), String) + +# source://rspec-support//lib/rspec/support/warnings.rb#6 +module RSpec::Support::Warnings + # source://rspec-support//lib/rspec/support/warnings.rb#7 + def deprecate(deprecated, options = T.unsafe(nil)); end + + # Used internally to print deprecation warnings + # when rspec-core isn't loaded + # + # @private + # + # source://rspec-support//lib/rspec/support/warnings.rb#15 + def warn_deprecation(message, options = T.unsafe(nil)); end + + # Used internally to print longer warnings + # + # @private + # + # source://rspec-support//lib/rspec/support/warnings.rb#29 + def warn_with(message, options = T.unsafe(nil)); end + + # Used internally to print warnings + # + # @private + # + # source://rspec-support//lib/rspec/support/warnings.rb#22 + def warning(text, options = T.unsafe(nil)); end +end + +# source://rspec-support//lib/rspec/support/with_keywords_when_needed.rb#5 +module RSpec::Support::WithKeywordsWhenNeeded + private + + # Remove this in RSpec 4 in favour of explicitly passed in kwargs where + # this is used. Works around a warning in Ruby 2.7 + # + # source://rspec-support//lib/rspec/support/with_keywords_when_needed.rb#15 + def class_exec(klass, *args, **_arg2, &block); end + + class << self + # source://rspec-support//lib/rspec/support/with_keywords_when_needed.rb#15 + def class_exec(klass, *args, **_arg2, &block); end + end +end diff --git a/sorbet/rbi/gems/rspec@3.12.0.rbi b/sorbet/rbi/gems/rspec@3.12.0.rbi new file mode 100644 index 00000000000..50c2701b425 --- /dev/null +++ b/sorbet/rbi/gems/rspec@3.12.0.rbi @@ -0,0 +1,82 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rspec` gem. +# Please instead update this file by running `bin/tapioca gem rspec`. + +# source://rspec//lib/rspec/version.rb#1 +module RSpec + class << self + # source://rspec-core/3.12.2/lib/rspec/core.rb#70 + def clear_examples; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#85 + def configuration; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#49 + def configuration=(_arg0); end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#97 + def configure; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#194 + def const_missing(name); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def context(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#122 + def current_example; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#128 + def current_example=(example); end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#154 + def current_scope; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#134 + def current_scope=(scope); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def describe(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def example_group(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def fcontext(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def fdescribe(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#58 + def reset; end + + # source://rspec-core/3.12.2/lib/rspec/core/shared_example_group.rb#110 + def shared_context(name, *args, &block); end + + # source://rspec-core/3.12.2/lib/rspec/core/shared_example_group.rb#110 + def shared_examples(name, *args, &block); end + + # source://rspec-core/3.12.2/lib/rspec/core/shared_example_group.rb#110 + def shared_examples_for(name, *args, &block); end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#160 + def world; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#49 + def world=(_arg0); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def xcontext(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def xdescribe(*args, &example_group_block); end + end +end + +# source://rspec//lib/rspec/version.rb#2 +module RSpec::Version; end + +# source://rspec//lib/rspec/version.rb#3 +RSpec::Version::STRING = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/turbo_tests@2.2.0.rbi b/sorbet/rbi/gems/turbo_tests@2.2.0.rbi new file mode 100644 index 00000000000..169aebe1577 --- /dev/null +++ b/sorbet/rbi/gems/turbo_tests@2.2.0.rbi @@ -0,0 +1,405 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `turbo_tests` gem. +# Please instead update this file by running `bin/tapioca gem turbo_tests`. + +# source://turbo_tests//lib/utils/hash_extension.rb#1 +module CoreExtensions; end + +class RSpec::Core::Runner + extend ::RSpecExt +end + +# source://turbo_tests//lib/turbo_tests/json_rows_formatter.rb#8 +module RSpecExt + # source://turbo_tests//lib/turbo_tests/json_rows_formatter.rb#9 + def handle_interrupt; end +end + +# source://turbo_tests//lib/turbo_tests/reporter.rb#3 +module TurboTests; end + +# source://turbo_tests//lib/turbo_tests/cli.rb#6 +class TurboTests::CLI + # @return [CLI] a new instance of CLI + # + # source://turbo_tests//lib/turbo_tests/cli.rb#7 + def initialize(argv); end + + # source://turbo_tests//lib/turbo_tests/cli.rb#11 + def run; end +end + +# source://turbo_tests//lib/turbo_tests.rb#53 +class TurboTests::FakeExample < ::Struct + # Returns the value of attribute description + # + # @return [Object] the current value of description + def description; end + + # Sets the attribute description + # + # @param value [Object] the value to set the attribute description to. + # @return [Object] the newly set value + def description=(_); end + + # Returns the value of attribute execution_result + # + # @return [Object] the current value of execution_result + def execution_result; end + + # Sets the attribute execution_result + # + # @param value [Object] the value to set the attribute execution_result to. + # @return [Object] the newly set value + def execution_result=(_); end + + # Returns the value of attribute full_description + # + # @return [Object] the current value of full_description + def full_description; end + + # Sets the attribute full_description + # + # @param value [Object] the value to set the attribute full_description to. + # @return [Object] the newly set value + def full_description=(_); end + + # Returns the value of attribute location + # + # @return [Object] the current value of location + def location; end + + # Sets the attribute location + # + # @param value [Object] the value to set the attribute location to. + # @return [Object] the newly set value + def location=(_); end + + # Returns the value of attribute location_rerun_argument + # + # @return [Object] the current value of location_rerun_argument + def location_rerun_argument; end + + # Sets the attribute location_rerun_argument + # + # @param value [Object] the value to set the attribute location_rerun_argument to. + # @return [Object] the newly set value + def location_rerun_argument=(_); end + + # Returns the value of attribute metadata + # + # @return [Object] the current value of metadata + def metadata; end + + # Sets the attribute metadata + # + # @param value [Object] the value to set the attribute metadata to. + # @return [Object] the newly set value + def metadata=(_); end + + # source://turbo_tests//lib/turbo_tests.rb#77 + def notification; end + + class << self + def [](*_arg0); end + + # source://turbo_tests//lib/turbo_tests.rb#55 + def from_obj(obj); end + + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://turbo_tests//lib/turbo_tests.rb#19 +class TurboTests::FakeException < ::Struct + # Returns the value of attribute backtrace + # + # @return [Object] the current value of backtrace + def backtrace; end + + # Sets the attribute backtrace + # + # @param value [Object] the value to set the attribute backtrace to. + # @return [Object] the newly set value + def backtrace=(_); end + + # Returns the value of attribute cause + # + # @return [Object] the current value of cause + def cause; end + + # Sets the attribute cause + # + # @param value [Object] the value to set the attribute cause to. + # @return [Object] the newly set value + def cause=(_); end + + # Returns the value of attribute message + # + # @return [Object] the current value of message + def message; end + + # Sets the attribute message + # + # @param value [Object] the value to set the attribute message to. + # @return [Object] the newly set value + def message=(_); end + + class << self + def [](*_arg0); end + + # source://turbo_tests//lib/turbo_tests.rb#21 + def from_obj(obj); end + + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://turbo_tests//lib/turbo_tests.rb#39 +class TurboTests::FakeExecutionResult < ::Struct + # Returns the value of attribute example_skipped? + # + # @return [Object] the current value of example_skipped? + def example_skipped?; end + + # Returns the value of attribute exception + # + # @return [Object] the current value of exception + def exception; end + + # Sets the attribute exception + # + # @param value [Object] the value to set the attribute exception to. + # @return [Object] the newly set value + def exception=(_); end + + # Returns the value of attribute pending_exception + # + # @return [Object] the current value of pending_exception + def pending_exception; end + + # Sets the attribute pending_exception + # + # @param value [Object] the value to set the attribute pending_exception to. + # @return [Object] the newly set value + def pending_exception=(_); end + + # Returns the value of attribute pending_fixed? + # + # @return [Object] the current value of pending_fixed? + def pending_fixed?; end + + # Returns the value of attribute pending_message + # + # @return [Object] the current value of pending_message + def pending_message; end + + # Sets the attribute pending_message + # + # @param value [Object] the value to set the attribute pending_message to. + # @return [Object] the newly set value + def pending_message=(_); end + + # Returns the value of attribute status + # + # @return [Object] the current value of status + def status; end + + # Sets the attribute status + # + # @param value [Object] the value to set the attribute status to. + # @return [Object] the newly set value + def status=(_); end + + class << self + def [](*_arg0); end + + # source://turbo_tests//lib/turbo_tests.rb#41 + def from_obj(obj); end + + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# An RSpec formatter used for each subprocess during parallel test execution +# +# source://turbo_tests//lib/turbo_tests/json_rows_formatter.rb#22 +class TurboTests::JsonRowsFormatter + # @return [JsonRowsFormatter] a new instance of JsonRowsFormatter + # + # source://turbo_tests//lib/turbo_tests/json_rows_formatter.rb#38 + def initialize(output); end + + # source://turbo_tests//lib/turbo_tests/json_rows_formatter.rb#91 + def close(notification); end + + # source://turbo_tests//lib/turbo_tests/json_rows_formatter.rb#77 + def example_failed(notification); end + + # source://turbo_tests//lib/turbo_tests/json_rows_formatter.rb#56 + def example_group_finished(notification); end + + # source://turbo_tests//lib/turbo_tests/json_rows_formatter.rb#49 + def example_group_started(notification); end + + # source://turbo_tests//lib/turbo_tests/json_rows_formatter.rb#63 + def example_passed(notification); end + + # source://turbo_tests//lib/turbo_tests/json_rows_formatter.rb#70 + def example_pending(notification); end + + # source://turbo_tests//lib/turbo_tests/json_rows_formatter.rb#97 + def message(notification); end + + # Returns the value of attribute output. + # + # source://turbo_tests//lib/turbo_tests/json_rows_formatter.rb#36 + def output; end + + # source://turbo_tests//lib/turbo_tests/json_rows_formatter.rb#84 + def seed(notification); end + + # source://turbo_tests//lib/turbo_tests/json_rows_formatter.rb#42 + def start(notification); end + + private + + # source://turbo_tests//lib/turbo_tests/json_rows_formatter.rb#134 + def example_to_json(example); end + + # source://turbo_tests//lib/turbo_tests/json_rows_formatter.rb#106 + def exception_to_json(exception); end + + # source://turbo_tests//lib/turbo_tests/json_rows_formatter.rb#117 + def execution_result_to_json(result); end + + # source://turbo_tests//lib/turbo_tests/json_rows_formatter.rb#158 + def group_to_json(notification); end + + # source://turbo_tests//lib/turbo_tests/json_rows_formatter.rb#151 + def load_summary_to_json(notification); end + + # source://turbo_tests//lib/turbo_tests/json_rows_formatter.rb#166 + def output_row(obj); end + + # source://turbo_tests//lib/turbo_tests/json_rows_formatter.rb#127 + def stack_frame_to_json(frame); end +end + +# source://turbo_tests//lib/turbo_tests/reporter.rb#4 +class TurboTests::Reporter + # @return [Reporter] a new instance of Reporter + # + # source://turbo_tests//lib/turbo_tests/reporter.rb#26 + def initialize(start_time); end + + # source://turbo_tests//lib/turbo_tests/reporter.rb#37 + def add(name, outputs); end + + # source://turbo_tests//lib/turbo_tests/reporter.rb#86 + def error_outside_of_examples; end + + # source://turbo_tests//lib/turbo_tests/reporter.rb#74 + def example_failed(example); end + + # source://turbo_tests//lib/turbo_tests/reporter.rb#61 + def example_passed(example); end + + # source://turbo_tests//lib/turbo_tests/reporter.rb#67 + def example_pending(example); end + + # Returns the value of attribute failed_examples. + # + # source://turbo_tests//lib/turbo_tests/reporter.rb#24 + def failed_examples; end + + # source://turbo_tests//lib/turbo_tests/reporter.rb#90 + def finish; end + + # source://turbo_tests//lib/turbo_tests/reporter.rb#57 + def group_finished; end + + # source://turbo_tests//lib/turbo_tests/reporter.rb#53 + def group_started(notification); end + + # Sets the attribute load_time + # + # @param value the value to set the attribute load_time to. + # + # source://turbo_tests//lib/turbo_tests/reporter.rb#5 + def load_time=(_arg0); end + + # source://turbo_tests//lib/turbo_tests/reporter.rb#81 + def message(message); end + + # Returns the value of attribute pending_examples. + # + # source://turbo_tests//lib/turbo_tests/reporter.rb#23 + def pending_examples; end + + # source://turbo_tests//lib/turbo_tests/reporter.rb#117 + def seed_notification(seed, seed_used); end + + protected + + # source://turbo_tests//lib/turbo_tests/reporter.rb#124 + def delegate_to_formatters(method, *args); end + + class << self + # source://turbo_tests//lib/turbo_tests/reporter.rb#7 + def from_config(formatter_config, start_time); end + end +end + +# source://turbo_tests//lib/turbo_tests/runner.rb#9 +class TurboTests::Runner + # @return [Runner] a new instance of Runner + # + # source://turbo_tests//lib/turbo_tests/runner.rb#45 + def initialize(opts); end + + # source://turbo_tests//lib/turbo_tests/runner.rb#64 + def run; end + + private + + # source://turbo_tests//lib/turbo_tests/runner.rb#273 + def fail_fast_met; end + + # source://turbo_tests//lib/turbo_tests/runner.rb#223 + def handle_messages; end + + # source://turbo_tests//lib/turbo_tests/runner.rb#277 + def report_number_of_tests(groups); end + + # source://turbo_tests//lib/turbo_tests/runner.rb#114 + def setup_tmp_dir; end + + # source://turbo_tests//lib/turbo_tests/runner.rb#210 + def start_copy_thread(src, dst); end + + # source://turbo_tests//lib/turbo_tests/runner.rb#123 + def start_regular_subprocess(tests, process_id, **opts); end + + # source://turbo_tests//lib/turbo_tests/runner.rb#133 + def start_subprocess(env, extra_args, tests, process_id, record_runtime:); end + + class << self + # source://turbo_tests//lib/turbo_tests/runner.rb#12 + def run(opts = T.unsafe(nil)); end + end +end + +# source://turbo_tests//lib/turbo_tests/version.rb#2 +TurboTests::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/vcr@6.2.0.rbi b/sorbet/rbi/gems/vcr@6.2.0.rbi new file mode 100644 index 00000000000..11f1607570f --- /dev/null +++ b/sorbet/rbi/gems/vcr@6.2.0.rbi @@ -0,0 +1,3036 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `vcr` gem. +# Please instead update this file by running `bin/tapioca gem vcr`. + +# The main entry point for VCR. +# +# @note This module is extended onto itself; thus, the methods listed +# here as instance methods are available directly off of VCR. +# +# source://vcr//lib/vcr/util/logger.rb#1 +module VCR + include ::VCR::VariableArgsBlockCaller + include ::VCR::Errors + extend ::VCR::VariableArgsBlockCaller + extend ::VCR::Errors + extend ::VCR + + # @private + # + # source://vcr//lib/vcr.rb#385 + def cassette_persisters; end + + # @private + # + # source://vcr//lib/vcr.rb#380 + def cassette_serializers; end + + # @return [Enumerable] list of all cassettes currently being used + # + # source://vcr//lib/vcr.rb#362 + def cassettes(context = T.unsafe(nil)); end + + # @deprecated Use #configure instead. + # @see #configure + # + # source://vcr//lib/vcr/deprecations.rb#4 + def config; end + + # @return [VCR::Configuration] the VCR configuration. + # + # source://vcr//lib/vcr.rb#239 + def configuration; end + + # Used to configure VCR. + # + # @example + # VCR.configure do |c| + # c.some_config_option = true + # end + # @return [void] + # @yield the configuration block + # @yieldparam config [VCR::Configuration] the configuration object + # + # source://vcr//lib/vcr.rb#234 + def configure; end + + # Sets up `Before` and `After` cucumber hooks in order to + # use VCR with particular cucumber tags. + # + # @example + # VCR.cucumber_tags do |t| + # t.tags "tag1", "tag2" + # t.tag "@some_other_tag", :record => :new_episodes + # end + # @return [void] + # @see VCR::CucumberTags#tags + # @yield the cucumber tags configuration block + # @yieldparam t [VCR::CucumberTags] Cucumber tags config object + # + # source://vcr//lib/vcr.rb#256 + def cucumber_tags(&block); end + + # The currently active cassette. + # + # @return [nil, VCR::Cassette] The current cassette or nil if there is + # no current cassette. + # + # source://vcr//lib/vcr.rb#48 + def current_cassette; end + + # Ejects the current cassette. The cassette will no longer be used. + # In addition, any newly recorded HTTP interactions will be written to + # disk. + # + # @option options + # @param options [Hash] Eject options. + # @return [VCR::Cassette, nil] the ejected cassette if there was one + # + # source://vcr//lib/vcr.rb#159 + def eject_cassette(options = T.unsafe(nil)); end + + # @private + # @return [Boolean] + # + # source://vcr//lib/vcr.rb#408 + def fibers_available?; end + + # @private + # + # source://vcr//lib/vcr.rb#345 + def http_interactions; end + + # Inserts the named cassette using the given cassette options. + # New HTTP interactions, if allowed by the cassette's `:record` option, will + # be recorded to the cassette. The cassette's existing HTTP interactions + # will be used to stub requests, unless prevented by the cassette's + # `:record` option. + # + # @example + # VCR.insert_cassette('twitter', :record => :new_episodes) + # + # # ...later, after making an HTTP request: + # + # VCR.eject_cassette + # @note If you use this method you _must_ call `eject_cassette` when you + # are done. It is generally recommended that you use {#use_cassette} + # unless your code-under-test cannot be run as a block. + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param name [#to_s] The name of the cassette. VCR will sanitize + # this to ensure it is a valid file name. + # @param options [Hash] The cassette options. The given options will + # be merged with the configured default_cassette_options. + # @raise [ArgumentError] when the given cassette is already being used. + # @raise [VCR::Errors::TurnedOffError] when VCR has been turned off + # without using the :ignore_cassettes option. + # @raise [VCR::Errors::MissingERBVariableError] when the `:erb` option + # is used and the ERB template requires variables that you did not provide. + # @return [VCR::Cassette] the inserted cassette + # + # source://vcr//lib/vcr.rb#132 + def insert_cassette(name, options = T.unsafe(nil)); end + + # @private + # + # source://vcr//lib/vcr.rb#375 + def library_hooks; end + + # @private + # + # source://vcr//lib/vcr.rb#398 + def link_context(from_thread, to_key); end + + # @private + # @return [Boolean] + # + # source://vcr//lib/vcr.rb#351 + def real_http_connections_allowed?; end + + # @private + # + # source://vcr//lib/vcr.rb#390 + def record_http_interaction(interaction); end + + # @private + # + # source://vcr//lib/vcr.rb#370 + def request_ignorer; end + + # @return [RequestMatcherRegistry] the request matcher registry + # + # source://vcr//lib/vcr.rb#357 + def request_matchers; end + + # Turns VCR off, so that it no longer handles every HTTP request. + # + # @option options + # @param options [Hash] hash of options + # @raise [VCR::Errors::CassetteInUseError] if there is currently a cassette in use + # @raise [ArgumentError] if you pass an invalid option + # @return [void] + # + # source://vcr//lib/vcr.rb#290 + def turn_off!(options = T.unsafe(nil)); end + + # Turns on VCR, if it has previously been turned off. + # + # @return [void] + # @see #turn_off! + # @see #turned_off + # @see #turned_on? + # @see #turned_on + # + # source://vcr//lib/vcr.rb#327 + def turn_on!; end + + # Turns VCR off for the duration of a block. + # + # @param options [Hash] hash of options + # @raise [VCR::Errors::CassetteInUseError] if there is currently a cassette in use + # @raise [ArgumentError] if you pass an invalid option + # @return [void] + # @see #turn_off! + # @see #turn_on! + # @see #turned_on? + # @see #turned_on + # + # source://vcr//lib/vcr.rb#270 + def turned_off(options = T.unsafe(nil)); end + + # Turns on VCR, for the duration of a block. + # + # @param options [Hash] hash of options + # @return [void] + # @see #turn_off! + # @see #turned_off + # @see #turned_on? + # + # source://vcr//lib/vcr.rb#311 + def turned_on(options = T.unsafe(nil)); end + + # @note Normally VCR is _always_ turned on; it will only be off if you have + # explicitly turned it off. + # @return [Boolean] whether or not VCR is turned on + # @see #turn_on! + # @see #turn_off! + # @see #turned_off + # + # source://vcr//lib/vcr.rb#337 + def turned_on?; end + + # @private + # + # source://vcr//lib/vcr.rb#403 + def unlink_context(key); end + + # Inserts a cassette using the given name and options, runs the given + # block, and ejects the cassette. + # + # @example + # VCR.use_cassette('twitter', :record => :new_episodes) do + # # make an HTTP request + # end + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param name [#to_s] The name of the cassette. VCR will sanitize + # this to ensure it is a valid file name. + # @param options [Hash] The cassette options. The given options will + # be merged with the configured default_cassette_options. + # @raise [ArgumentError] when the given cassette is already being used. + # @raise [VCR::Errors::TurnedOffError] when VCR has been turned off + # without using the :ignore_cassettes option. + # @raise [VCR::Errors::MissingERBVariableError] when the `:erb` option + # is used and the ERB template requires variables that you did not provide. + # @return [void] + # @see #insert_cassette + # @see #eject_cassette + # @yield Block to run while this cassette is in use. + # @yieldparam cassette [(optional) VCR::Cassette] the cassette that has + # been inserted. + # + # source://vcr//lib/vcr.rb#184 + def use_cassette(name, options = T.unsafe(nil), &block); end + + # Inserts multiple cassettes the given names + # + # @example + # cassettes = [ + # { name: 'github' }, + # { name: 'apple', options: { erb: true } } + # ] + # VCR.use_cassettes(cassettes) do + # # make multiple HTTP requests + # end + # + # source://vcr//lib/vcr.rb#213 + def use_cassettes(cassettes, &block); end + + # @note This string also has singleton methods: + # + # * `major` [Integer] The major version. + # * `minor` [Integer] The minor version. + # * `patch` [Integer] The patch version. + # * `parts` [Array] List of the version parts. + # @return [String] the current VCR version. + # + # source://vcr//lib/vcr/version.rb#11 + def version; end + + private + + # source://vcr//lib/vcr.rb#448 + def context_cassettes; end + + # source://vcr//lib/vcr.rb#427 + def context_value(name); end + + # source://vcr//lib/vcr.rb#413 + def current_context; end + + # source://vcr//lib/vcr.rb#435 + def dup_context(context); end + + # source://vcr//lib/vcr.rb#417 + def get_context(thread_key, fiber_key = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://vcr//lib/vcr.rb#444 + def ignore_cassettes?; end + + # source://vcr//lib/vcr.rb#452 + def initialize_fibers; end + + # source://vcr//lib/vcr.rb#461 + def initialize_ivars; end + + # source://vcr//lib/vcr.rb#431 + def set_context_value(name, value); end + + class << self + # @private + # + # source://vcr//lib/vcr/deprecations.rb#10 + def const_missing(const); end + end +end + +# The media VCR uses to store HTTP interactions for later re-use. +# +# source://vcr//lib/vcr/cassette/http_interaction_list.rb#2 +class VCR::Cassette + include ::VCR::Logger::Mixin + + # @param name [#to_s] The name of the cassette. VCR will sanitize + # this to ensure it is a valid file name. + # @param options [Hash] The cassette options. The given options will + # be merged with the configured default_cassette_options. + # @return [Cassette] a new instance of Cassette + # @see VCR#insert_cassette + # + # source://vcr//lib/vcr/cassette.rb#58 + def initialize(name, options = T.unsafe(nil)); end + + # @return [Boolean, nil] Should outdated interactions be recorded back to file + # + # source://vcr//lib/vcr/cassette.rb#47 + def clean_outdated_http_interactions; end + + # @return [Boolean] Should unused requests be dropped from the cassette? + # + # source://vcr//lib/vcr/cassette.rb#50 + def drop_unused_requests; end + + # Ejects the current cassette. The cassette will no longer be used. + # In addition, any newly recorded HTTP interactions will be written to + # disk. + # + # @note This is not intended to be called directly. Use `VCR.eject_cassette` instead. + # @see VCR#eject_cassette + # + # source://vcr//lib/vcr/cassette.rb#78 + def eject(options = T.unsafe(nil)); end + + # @return [Boolean, Hash] The cassette's ERB option. The file will be treated as an + # ERB template if this has a truthy value. A hash, if provided, will be used as local + # variables for the ERB template. + # + # source://vcr//lib/vcr/cassette.rb#41 + def erb; end + + # @note VCR will take care of sanitizing the cassette name to make it a valid file name. + # @raise [NotImplementedError] if the configured cassette persister + # does not support resolving file paths. + # @return [String] The file for this cassette. + # + # source://vcr//lib/vcr/cassette.rb#132 + def file; end + + # @private + # + # source://vcr//lib/vcr/cassette.rb#102 + def http_interactions; end + + # @return [Boolean] false unless wrapped with LinkedCassette + # + # source://vcr//lib/vcr/cassette.rb#171 + def linked?; end + + # @return [Array] List of request matchers. Used to find a response from an + # existing HTTP interaction to play back. + # + # source://vcr//lib/vcr/cassette.rb#36 + def match_requests_on; end + + # @return [#to_s] The name of the cassette. Used to determine the cassette's file name. + # @see #file + # + # source://vcr//lib/vcr/cassette.rb#21 + def name; end + + # @private + # + # source://vcr//lib/vcr/cassette.rb#124 + def new_recorded_interactions; end + + # @example + # + # VCR.use_cassette("some cassette") do |cassette| + # Timecop.freeze(cassette.originally_recorded_at || Time.now) do + # # ... + # end + # end + # @return [Time, nil] The `recorded_at` time of the first HTTP interaction + # or nil if the cassette has no prior HTTP interactions. + # + # source://vcr//lib/vcr/cassette.rb#166 + def originally_recorded_at; end + + # @return [Integer, nil] How frequently (in seconds) the cassette should be re-recorded. + # + # source://vcr//lib/vcr/cassette.rb#44 + def re_record_interval; end + + # @private + # + # source://vcr//lib/vcr/cassette.rb#116 + def record_http_interaction(interaction); end + + # @return [Symbol] The record mode. Determines whether the cassette records HTTP interactions, + # plays them back, or does both. + # + # source://vcr//lib/vcr/cassette.rb#25 + def record_mode; end + + # @return [Boolean] The cassette's record_on_error mode. When the code that uses the cassette + # raises an error (for example a test failure) and record_on_error is set to false, no + # cassette will be recorded. This is useful when you are TDD'ing an API integration: when + # an error is raised that often means your request is invalid, so you don't want the cassette + # to be recorded. + # + # source://vcr//lib/vcr/cassette.rb#32 + def record_on_error; end + + # @return [Boolean] Whether or not the cassette is recording. + # + # source://vcr//lib/vcr/cassette.rb#140 + def recording?; end + + # @private + # + # source://vcr//lib/vcr/cassette.rb#87 + def run_failed!; end + + # @private + # @return [Boolean] + # + # source://vcr//lib/vcr/cassette.rb#92 + def run_failed?; end + + # @return [Hash] The hash that will be serialized when the cassette is written to disk. + # + # source://vcr//lib/vcr/cassette.rb#149 + def serializable_hash; end + + # @return [Boolean] + # + # source://vcr//lib/vcr/cassette.rb#97 + def should_write_recorded_interactions_to_disk?; end + + # @return [Array] If set, {VCR::Configuration#before_record} and + # {VCR::Configuration#before_playback} hooks with a corresponding tag will apply. + # + # source://vcr//lib/vcr/cassette.rb#54 + def tags; end + + private + + # source://vcr//lib/vcr/cassette.rb#177 + def assert_valid_options!; end + + # source://vcr//lib/vcr/cassette.rb#205 + def assign_tags; end + + # source://vcr//lib/vcr/cassette.rb#324 + def deserialized_hash; end + + # source://vcr//lib/vcr/cassette.rb#191 + def extract_options; end + + # source://vcr//lib/vcr/cassette.rb#300 + def interactions_to_record; end + + # source://vcr//lib/vcr/cassette.rb#316 + def invoke_hook(type, interactions); end + + # source://vcr//lib/vcr/cassette.rb#337 + def log_prefix; end + + # source://vcr//lib/vcr/cassette.rb#278 + def merged_interactions; end + + # source://vcr//lib/vcr/cassette.rb#213 + def previously_recorded_interactions; end + + # source://vcr//lib/vcr/cassette.rb#231 + def raise_error_unless_valid_record_mode; end + + # source://vcr//lib/vcr/cassette.rb#274 + def raw_cassette_bytes; end + + # source://vcr//lib/vcr/cassette.rb#341 + def request_summary(request); end + + # @return [Boolean] + # + # source://vcr//lib/vcr/cassette.rb#270 + def should_assert_no_unused_interactions?; end + + # @return [Boolean] + # + # source://vcr//lib/vcr/cassette.rb#237 + def should_re_record?(record_mode); end + + # @return [Boolean] + # + # source://vcr//lib/vcr/cassette.rb#262 + def should_remove_matching_existing_interactions?; end + + # @return [Boolean] + # + # source://vcr//lib/vcr/cassette.rb#266 + def should_remove_unused_interactions?; end + + # @return [Boolean] + # + # source://vcr//lib/vcr/cassette.rb#258 + def should_stub_requests?; end + + # source://vcr//lib/vcr/cassette.rb#227 + def storage_key; end + + # source://vcr//lib/vcr/cassette.rb#295 + def up_to_date_interactions(interactions); end + + # source://vcr//lib/vcr/cassette.rb#308 + def write_recorded_interactions_to_disk; end + + class << self + # @private + # + # source://vcr//lib/vcr/deprecations.rb#17 + def const_missing(const); end + end +end + +# @private +# +# source://vcr//lib/vcr/cassette/erb_renderer.rb#6 +class VCR::Cassette::ERBRenderer + # @return [ERBRenderer] a new instance of ERBRenderer + # + # source://vcr//lib/vcr/cassette/erb_renderer.rb#7 + def initialize(raw_template, erb, cassette_name = T.unsafe(nil)); end + + # source://vcr//lib/vcr/cassette/erb_renderer.rb#11 + def render; end + + private + + # source://vcr//lib/vcr/cassette/erb_renderer.rb#52 + def binding_for_variables; end + + # source://vcr//lib/vcr/cassette/erb_renderer.rb#34 + def erb_variables; end + + # @raise [Errors::MissingERBVariableError] + # + # source://vcr//lib/vcr/cassette/erb_renderer.rb#21 + def handle_name_error(e); end + + # source://vcr//lib/vcr/cassette/erb_renderer.rb#38 + def template; end + + # @return [Boolean] + # + # source://vcr//lib/vcr/cassette/erb_renderer.rb#30 + def use_erb?; end + + # source://vcr//lib/vcr/cassette/erb_renderer.rb#48 + def variables_object; end +end + +# @private +# +# source://vcr//lib/vcr/cassette/serializers.rb#49 +module VCR::Cassette::EncodingErrorHandling + # source://vcr//lib/vcr/cassette/serializers.rb#50 + def handle_encoding_errors; end +end + +# @private +# +# source://vcr//lib/vcr/cassette/http_interaction_list.rb#4 +class VCR::Cassette::HTTPInteractionList + include ::VCR::Logger::Mixin + + # @return [HTTPInteractionList] a new instance of HTTPInteractionList + # + # source://vcr//lib/vcr/cassette/http_interaction_list.rb#18 + def initialize(interactions, request_matchers, allow_playback_repeats = T.unsafe(nil), parent_list = T.unsafe(nil), log_prefix = T.unsafe(nil)); end + + # Returns the value of attribute allow_playback_repeats. + # + # source://vcr//lib/vcr/cassette/http_interaction_list.rb#16 + def allow_playback_repeats; end + + # Checks if there are no unused interactions left. + # + # @raise [VCR::Errors::UnusedHTTPInteractionError] if not all interactions were played back. + # + # source://vcr//lib/vcr/cassette/http_interaction_list.rb#65 + def assert_no_unused_interactions!; end + + # @return [Boolean] + # + # source://vcr//lib/vcr/cassette/http_interaction_list.rb#48 + def has_interaction_matching?(request); end + + # @return [Boolean] + # + # source://vcr//lib/vcr/cassette/http_interaction_list.rb#54 + def has_used_interaction_matching?(request); end + + # Returns the value of attribute interactions. + # + # source://vcr//lib/vcr/cassette/http_interaction_list.rb#16 + def interactions; end + + # Returns the value of attribute parent_list. + # + # source://vcr//lib/vcr/cassette/http_interaction_list.rb#16 + def parent_list; end + + # source://vcr//lib/vcr/cassette/http_interaction_list.rb#58 + def remaining_unused_interaction_count; end + + # Returns the value of attribute request_matchers. + # + # source://vcr//lib/vcr/cassette/http_interaction_list.rb#16 + def request_matchers; end + + # source://vcr//lib/vcr/cassette/http_interaction_list.rb#31 + def response_for(request); end + + private + + # @return [Boolean] Whether or not there are unused interactions left in the list. + # + # source://vcr//lib/vcr/cassette/http_interaction_list.rb#79 + def has_unused_interactions?; end + + # @return [Boolean] + # + # source://vcr//lib/vcr/cassette/http_interaction_list.rb#96 + def interaction_matches_request?(request, interaction); end + + # source://vcr//lib/vcr/cassette/http_interaction_list.rb#107 + def log_prefix; end + + # source://vcr//lib/vcr/cassette/http_interaction_list.rb#87 + def matching_interaction_index_for(request); end + + # source://vcr//lib/vcr/cassette/http_interaction_list.rb#91 + def matching_used_interaction_for(request); end + + # source://vcr//lib/vcr/cassette/http_interaction_list.rb#83 + def request_summary(request); end +end + +# @private +# +# source://vcr//lib/vcr/cassette/http_interaction_list.rb#8 +module VCR::Cassette::HTTPInteractionList::NullList + extend ::VCR::Cassette::HTTPInteractionList::NullList + + # @return [Boolean] + # + # source://vcr//lib/vcr/cassette/http_interaction_list.rb#11 + def has_interaction_matching?(*a); end + + # @return [Boolean] + # + # source://vcr//lib/vcr/cassette/http_interaction_list.rb#12 + def has_used_interaction_matching?(*a); end + + # source://vcr//lib/vcr/cassette/http_interaction_list.rb#13 + def remaining_unused_interaction_count(*a); end + + # source://vcr//lib/vcr/cassette/http_interaction_list.rb#10 + def response_for(*a); end +end + +# Keeps track of the cassette persisters in a hash-like object. +# +# source://vcr//lib/vcr/cassette/persisters.rb#4 +class VCR::Cassette::Persisters + # @private + # @return [Persisters] a new instance of Persisters + # + # source://vcr//lib/vcr/cassette/persisters.rb#8 + def initialize; end + + # Gets the named persister. + # + # @param name [Symbol] the name of the persister + # @raise [ArgumentError] if there is not a persister for the given name + # @return the named persister + # + # source://vcr//lib/vcr/cassette/persisters.rb#17 + def [](name); end + + # Registers a persister. + # + # @param name [Symbol] the name of the persister + # @param value [#[], #[]=] the persister object. It must implement `[]` and `[]=`. + # + # source://vcr//lib/vcr/cassette/persisters.rb#31 + def []=(name, value); end +end + +# The only built-in cassette persister. Persists cassettes to the file system. +# +# source://vcr//lib/vcr/cassette/persisters/file_system.rb#7 +module VCR::Cassette::Persisters::FileSystem + extend ::VCR::Cassette::Persisters::FileSystem + + # Gets the cassette for the given storage key (file name). + # + # @param file_name [String] the file name + # @return [String] the cassette content + # + # source://vcr//lib/vcr/cassette/persisters/file_system.rb#23 + def [](file_name); end + + # Sets the cassette for the given storage key (file name). + # + # @param file_name [String] the file name + # @param content [String] the content to store + # + # source://vcr//lib/vcr/cassette/persisters/file_system.rb#33 + def []=(file_name, content); end + + # @private + # + # source://vcr//lib/vcr/cassette/persisters/file_system.rb#41 + def absolute_path_to_file(file_name); end + + # @private + # + # source://vcr//lib/vcr/cassette/persisters/file_system.rb#11 + def storage_location; end + + # @private + # + # source://vcr//lib/vcr/cassette/persisters/file_system.rb#14 + def storage_location=(dir); end + + private + + # source://vcr//lib/vcr/cassette/persisters/file_system.rb#47 + def absolute_path_for(path); end + + # @return [Boolean] + # + # source://vcr//lib/vcr/cassette/persisters/file_system.rb#63 + def downcase_cassette_names?; end + + # source://vcr//lib/vcr/cassette/persisters/file_system.rb#51 + def sanitized_file_name_from(file_name); end +end + +# Keeps track of the cassette serializers in a hash-like object. +# +# source://vcr//lib/vcr/cassette/serializers.rb#4 +class VCR::Cassette::Serializers + # @private + # @return [Serializers] a new instance of Serializers + # + # source://vcr//lib/vcr/cassette/serializers.rb#12 + def initialize; end + + # Gets the named serializer. + # + # @param name [Symbol] the name of the serializer + # @raise [ArgumentError] if there is not a serializer for the given name + # @return the named serializer + # + # source://vcr//lib/vcr/cassette/serializers.rb#21 + def [](name); end + + # Registers a serializer. + # + # @param name [Symbol] the name of the serializer + # @param value [#file_extension, #serialize, #deserialize] the serializer object. It must implement + # `file_extension()`, `serialize(Hash)` and `deserialize(String)`. + # + # source://vcr//lib/vcr/cassette/serializers.rb#39 + def []=(name, value); end +end + +# The compressed serializer. This serializer wraps the YAML serializer +# to write compressed cassettes to disk. +# +# Cassettes containing responses with JSON data often compress at greater +# than 10:1. The tradeoff is that cassettes will not diff nicely or be +# easily inspectable or editable. +# +# @see YAML +# +# source://vcr//lib/vcr/cassette/serializers/compressed.rb#15 +module VCR::Cassette::Serializers::Compressed + extend ::VCR::Cassette::Serializers::Compressed + + # Deserializes the given compressed cassette data. + # + # @param string [String] the compressed YAML cassette data + # @return [Hash] the deserialized object + # + # source://vcr//lib/vcr/cassette/serializers/compressed.rb#38 + def deserialize(string); end + + # The file extension to use for this serializer. + # + # @return [String] "zz" + # + # source://vcr//lib/vcr/cassette/serializers/compressed.rb#21 + def file_extension; end + + # Serializes the given hash using YAML and Zlib. + # + # @param hash [Hash] the object to serialize + # @return [String] the compressed cassette data + # + # source://vcr//lib/vcr/cassette/serializers/compressed.rb#29 + def serialize(hash); end +end + +# The JSON serializer. +# +# @see Psych +# @see Syck +# @see YAML +# +# source://vcr//lib/vcr/cassette/serializers/json.rb#11 +module VCR::Cassette::Serializers::JSON + extend ::VCR::Cassette::Serializers::JSON + extend ::VCR::Cassette::EncodingErrorHandling + extend ::VCR::Cassette::SyntaxErrorHandling + + # Deserializes the given string using `JSON`. + # + # @param string [String] the JSON string + # @return [Hash] the deserialized object + # + # source://vcr//lib/vcr/cassette/serializers/json.rb#44 + def deserialize(string); end + + # The file extension to use for this serializer. + # + # @return [String] "json" + # + # source://vcr//lib/vcr/cassette/serializers/json.rb#26 + def file_extension; end + + # Serializes the given hash using `JSON`. + # + # @param hash [Hash] the object to serialize + # @return [String] the JSON string + # + # source://vcr//lib/vcr/cassette/serializers/json.rb#34 + def serialize(hash); end +end + +# @private +# +# source://vcr//lib/vcr/cassette/serializers/json.rb#17 +VCR::Cassette::Serializers::JSON::ENCODING_ERRORS = T.let(T.unsafe(nil), Array) + +# @private +# +# source://vcr//lib/vcr/cassette/serializers/json.rb#21 +VCR::Cassette::Serializers::JSON::SYNTAX_ERRORS = T.let(T.unsafe(nil), Array) + +# The Psych serializer. Psych is the new YAML engine in ruby 1.9. +# +# @see JSON +# @see Syck +# @see YAML +# +# source://vcr//lib/vcr/cassette/serializers/psych.rb#11 +module VCR::Cassette::Serializers::Psych + extend ::VCR::Cassette::Serializers::Psych + extend ::VCR::Cassette::EncodingErrorHandling + extend ::VCR::Cassette::SyntaxErrorHandling + + # Deserializes the given string using Psych. + # + # @param string [String] the YAML string + # @return [Hash] the deserialized object + # + # source://vcr//lib/vcr/cassette/serializers/psych.rb#45 + def deserialize(string); end + + # The file extension to use for this serializer. + # + # @return [String] "yml" + # + # source://vcr//lib/vcr/cassette/serializers/psych.rb#25 + def file_extension; end + + # Serializes the given hash using Psych. + # + # @param hash [Hash] the object to serialize + # @return [String] the YAML string + # + # source://vcr//lib/vcr/cassette/serializers/psych.rb#33 + def serialize(hash); end +end + +# @private +# +# source://vcr//lib/vcr/cassette/serializers/psych.rb#17 +VCR::Cassette::Serializers::Psych::ENCODING_ERRORS = T.let(T.unsafe(nil), Array) + +# @private +# +# source://vcr//lib/vcr/cassette/serializers/psych.rb#20 +VCR::Cassette::Serializers::Psych::SYNTAX_ERRORS = T.let(T.unsafe(nil), Array) + +# The Syck serializer. Syck is the legacy YAML engine in ruby 1.8 and 1.9. +# +# @see JSON +# @see Psych +# @see YAML +# +# source://vcr//lib/vcr/cassette/serializers/syck.rb#11 +module VCR::Cassette::Serializers::Syck + extend ::VCR::Cassette::Serializers::Syck + extend ::VCR::Cassette::EncodingErrorHandling + extend ::VCR::Cassette::SyntaxErrorHandling + + # Deserializes the given string using Syck. + # + # @param string [String] the YAML string + # @return [Hash] the deserialized object + # + # source://vcr//lib/vcr/cassette/serializers/syck.rb#43 + def deserialize(string); end + + # The file extension to use for this serializer. + # + # @return [String] "yml" + # + # source://vcr//lib/vcr/cassette/serializers/syck.rb#25 + def file_extension; end + + # Serializes the given hash using Syck. + # + # @param hash [Hash] the object to serialize + # @return [String] the YAML string + # + # source://vcr//lib/vcr/cassette/serializers/syck.rb#33 + def serialize(hash); end + + private + + # source://vcr//lib/vcr/cassette/serializers/syck.rb#53 + def using_syck; end +end + +# @private +# +# source://vcr//lib/vcr/cassette/serializers/syck.rb#17 +VCR::Cassette::Serializers::Syck::ENCODING_ERRORS = T.let(T.unsafe(nil), Array) + +# @private +# +# source://vcr//lib/vcr/cassette/serializers/syck.rb#20 +VCR::Cassette::Serializers::Syck::SYNTAX_ERRORS = T.let(T.unsafe(nil), Array) + +# The YAML serializer. This will use either Psych or Syck, which ever your +# ruby interpreter defaults to. You can also force VCR to use Psych or Syck by +# using one of those serializers. +# +# @see JSON +# @see Psych +# @see Syck +# +# source://vcr//lib/vcr/cassette/serializers/yaml.rb#13 +module VCR::Cassette::Serializers::YAML + extend ::VCR::Cassette::Serializers::YAML + extend ::VCR::Cassette::EncodingErrorHandling + extend ::VCR::Cassette::SyntaxErrorHandling + + # Deserializes the given string using YAML. + # + # @param string [String] the YAML string + # @return [Hash] the deserialized object + # + # source://vcr//lib/vcr/cassette/serializers/yaml.rb#47 + def deserialize(string); end + + # The file extension to use for this serializer. + # + # @return [String] "yml" + # + # source://vcr//lib/vcr/cassette/serializers/yaml.rb#27 + def file_extension; end + + # Serializes the given hash using YAML. + # + # @param hash [Hash] the object to serialize + # @return [String] the YAML string + # + # source://vcr//lib/vcr/cassette/serializers/yaml.rb#35 + def serialize(hash); end +end + +# @private +# +# source://vcr//lib/vcr/cassette/serializers/yaml.rb#19 +VCR::Cassette::Serializers::YAML::ENCODING_ERRORS = T.let(T.unsafe(nil), Array) + +# @private +# +# source://vcr//lib/vcr/cassette/serializers/yaml.rb#22 +VCR::Cassette::Serializers::YAML::SYNTAX_ERRORS = T.let(T.unsafe(nil), Array) + +# @private +# +# source://vcr//lib/vcr/cassette/serializers.rb#59 +module VCR::Cassette::SyntaxErrorHandling + # source://vcr//lib/vcr/cassette/serializers.rb#60 + def handle_syntax_errors; end +end + +# The supported record modes. +# +# * :all -- Record every HTTP interactions; do not play any back. +# * :none -- Do not record any HTTP interactions; play them back. +# * :new_episodes -- Playback previously recorded HTTP interactions and record new ones. +# * :once -- Record the HTTP interactions if the cassette has not already been recorded; +# otherwise, playback the HTTP interactions. +# +# source://vcr//lib/vcr/cassette.rb#17 +VCR::Cassette::VALID_RECORD_MODES = T.let(T.unsafe(nil), Array) + +# Mutex to synchronize access to cassettes in a threaded environment +# +# source://vcr//lib/vcr.rb#27 +VCR::CassetteMutex = T.let(T.unsafe(nil), Thread::Mutex) + +# Stores the VCR configuration. +# +# source://vcr//lib/vcr/configuration.rb#7 +class VCR::Configuration + include ::VCR::VariableArgsBlockCaller + include ::VCR::Hooks + include ::VCR::Configuration::DefinedHooks + include ::VCR::Logger::Mixin + extend ::VCR::Hooks::ClassMethods + + # @return [Configuration] a new instance of Configuration + # + # source://vcr//lib/vcr/configuration.rb#490 + def initialize; end + + # Adds a callback that will be called with each HTTP request after it is complete. + # + # @example + # VCR.configure do |c| + # c.after_http_request(:ignored?) do |request, response| + # puts "Request: #{request.method} #{request.uri}" + # puts "Response: #{response.status.code}" + # end + # end + # @param filters [optional splat of #to_proc] one or more filters to apply. + # The objects provided will be converted to procs using `#to_proc`. If provided, + # the callback will only be invoked if these procs all return `true`. + # @see #before_http_request + # @see #around_http_request + # @yield the callback + # @yieldparam request [VCR::Request::Typed] the request that is being made + # @yieldparam response [VCR::Response] the response from the request + # + # source://vcr//lib/vcr/configuration.rb#366 + def after_http_request(*filters); end + + # Determines how VCR treats HTTP requests that are made when + # no VCR cassette is in use. When set to `true`, requests made + # when there is no VCR cassette in use will be allowed. When set + # to `false` (the default), an {VCR::Errors::UnhandledHTTPRequestError} + # will be raised for any HTTP request made when there is no + # cassette in use. + # + # @overload allow_http_connections_when_no_cassette? + # @overload allow_http_connections_when_no_cassette= + # + # source://vcr//lib/vcr/configuration.rb#129 + def allow_http_connections_when_no_cassette=(_arg0); end + + # @private (documented above) + # @return [Boolean] + # + # source://vcr//lib/vcr/configuration.rb#131 + def allow_http_connections_when_no_cassette?; end + + # Adds a callback that will be executed around each HTTP request. + # + # @example + # VCR.configure do |c| + # c.around_http_request(lambda {|r| r.uri =~ /api.geocoder.com/}) do |request| + # # extract an address like "1700 E Pine St, Seattle, WA" + # # from a query like "address=1700+E+Pine+St%2C+Seattle%2C+WA" + # address = CGI.unescape(URI(request.uri).query.split('=').last) + # VCR.use_cassette("geocoding/#{address}", &request) + # end + # end + # @note This method can only be used on ruby interpreters that support + # fibers (i.e. 1.9+). On 1.8 you can use separate `before_http_request` and + # `after_http_request` hooks. + # @note You _must_ call `request.proceed` or pass the request as a proc on to a + # method that yields to a block (i.e. `some_method(&request)`). + # @param filters [optional splat of #to_proc] one or more filters to apply. + # The objects provided will be converted to procs using `#to_proc`. If provided, + # the callback will only be invoked if these procs all return `true`. + # @raise [VCR::Errors::NotSupportedError] if the fiber library cannot be loaded. + # @see #before_http_request + # @see #after_http_request + # @yield the callback + # @yieldparam request [VCR::Request::FiberAware] the request that is being made + # + # source://vcr//lib/vcr/configuration.rb#395 + def around_http_request(*filters, &block); end + + # Adds a callback that will be called before a previously recorded + # HTTP interaction is loaded for playback. + # + # @example + # VCR.configure do |c| + # # Don't playback transient 5xx errors + # c.before_playback do |interaction| + # interaction.ignore! if interaction.response.status.code >= 500 + # end + # + # # Change a response header for playback + # c.before_playback(:twilio) do |interaction| + # interaction.response.headers['X-Foo-Bar'] = 'Bazz' + # end + # end + # @param tag [(optional) Symbol] Used to apply this hook to only cassettes that match + # the given tag. + # @see #before_record + # @yield the callback + # @yieldparam interaction [VCR::HTTPInteraction::HookAware] The interaction that is being + # loaded. + # @yieldparam cassette [(optional) VCR::Cassette] The current cassette. + # + # source://vcr//lib/vcr/configuration.rb#325 + def before_playback(tag = T.unsafe(nil), &block); end + + # Adds a callback that will be called before the recorded HTTP interactions + # are serialized and written to disk. + # + # @example + # VCR.configure do |c| + # # Don't record transient 5xx errors + # c.before_record do |interaction| + # interaction.ignore! if interaction.response.status.code >= 500 + # end + # + # # Modify the response body for cassettes tagged with :twilio + # c.before_record(:twilio) do |interaction| + # interaction.response.body.downcase! + # end + # end + # @param tag [(optional) Symbol] Used to apply this hook to only cassettes that match + # the given tag. + # @see #before_playback + # @yield the callback + # @yieldparam interaction [VCR::HTTPInteraction::HookAware] The interaction that will be + # serialized and written to disk. + # @yieldparam cassette [(optional) VCR::Cassette] The current cassette. + # + # source://vcr//lib/vcr/configuration.rb#297 + def before_record(tag = T.unsafe(nil), &block); end + + # Gets the directory to read cassettes from and write cassettes to. + # + # @return [String] the directory to read cassettes from and write cassettes to + # + # source://vcr//lib/vcr/configuration.rb#15 + def cassette_library_dir; end + + # Sets the directory to read cassettes from and writes cassettes to. + # + # @example + # VCR.configure do |c| + # c.cassette_library_dir = 'spec/cassettes' + # end + # @note This is only necessary if you use the `:file_system` + # cassette persister (the default). + # @param dir [String] the directory to read cassettes from and write cassettes to + # @return [void] + # + # source://vcr//lib/vcr/configuration.rb#30 + def cassette_library_dir=(dir); end + + # Gets the registry of cassette persisters. Use it to register a custom persister. + # + # @example + # VCR.configure do |c| + # c.cassette_persisters[:my_custom_persister] = my_custom_persister + # end + # @note Custom persisters must implement the following interface: + # + # * `persister[storage_key]` # returns previously persisted content + # * `persister[storage_key] = content` # persists given content + # @return [VCR::Cassette::Persisters] the cassette persister registry object. + # + # source://vcr//lib/vcr/configuration.rb#269 + def cassette_persisters; end + + # Gets the registry of cassette serializers. Use it to register a custom serializer. + # + # @example + # VCR.configure do |c| + # c.cassette_serializers[:my_custom_serializer] = my_custom_serializer + # end + # @note Custom serializers must implement the following interface: + # + # * `file_extension # => String` + # * `serialize(Hash) # => String` + # * `deserialize(String) # => Hash` + # @return [VCR::Cassette::Serializers] the cassette serializer registry object. + # + # source://vcr//lib/vcr/configuration.rb#253 + def cassette_serializers; end + + # Configures RSpec to use a VCR cassette for any example + # tagged with `:vcr`. + # + # source://vcr//lib/vcr/configuration.rb#418 + def configure_rspec_metadata!; end + + # An object to log debug output to. + # + # @example + # VCR.configure do |c| + # c.debug_logger = $stderr + # end + # @example + # VCR.configure do |c| + # c.debug_logger = File.open('vcr.log', 'w') + # end + # @overload debug_logger + # @overload debug_logger= + # + # source://vcr//lib/vcr/configuration.rb#440 + def debug_logger; end + + # @private (documented above) + # + # source://vcr//lib/vcr/configuration.rb#442 + def debug_logger=(value); end + + # Default options to apply to every cassette. + # + # @example + # VCR.configure do |c| + # c.default_cassette_options = { :record => :new_episodes } + # end + # @note {VCR#insert_cassette} for the list of valid options. + # @overload default_cassette_options + # @overload default_cassette_options= + # + # source://vcr//lib/vcr/configuration.rb#46 + def default_cassette_options; end + + # Sets the default options that apply to every cassette. + # + # source://vcr//lib/vcr/configuration.rb#49 + def default_cassette_options=(overrides); end + + # Sets up a {#before_record} and a {#before_playback} hook that will + # insert a placeholder string in the cassette in place of another string. + # You can use this as a generic way to interpolate a variable into the + # cassette for a unique string. It's particularly useful for unique + # sensitive strings like API keys and passwords. + # + # @example + # VCR.configure do |c| + # # Put "" in place of the actual API key in + # # our cassettes so we don't have to commit to source control. + # c.filter_sensitive_data('') { GithubClient.api_key } + # + # # Put a "" placeholder variable in our cassettes tagged with + # # :user_cassette since it can be different for different test runs. + # c.define_cassette_placeholder('', :user_cassette) { User.last.id } + # end + # @param placeholder [String] The placeholder string. + # @param tag [Symbol] Set this to apply this only to cassettes + # with a matching tag; otherwise it will apply to every cassette. + # @yield block that determines what string to replace + # @yieldparam interaction [(optional) VCR::HTTPInteraction::HookAware] the HTTP interaction + # @yieldreturn the string to replace + # + # source://vcr//lib/vcr/configuration.rb#225 + def define_cassette_placeholder(placeholder, tag = T.unsafe(nil), &block); end + + # Sets up a {#before_record} and a {#before_playback} hook that will + # insert a placeholder string in the cassette in place of another string. + # You can use this as a generic way to interpolate a variable into the + # cassette for a unique string. It's particularly useful for unique + # sensitive strings like API keys and passwords. + # + # @example + # VCR.configure do |c| + # # Put "" in place of the actual API key in + # # our cassettes so we don't have to commit to source control. + # c.filter_sensitive_data('') { GithubClient.api_key } + # + # # Put a "" placeholder variable in our cassettes tagged with + # # :user_cassette since it can be different for different test runs. + # c.define_cassette_placeholder('', :user_cassette) { User.last.id } + # end + # @param placeholder [String] The placeholder string. + # @param tag [Symbol] Set this to apply this only to cassettes + # with a matching tag; otherwise it will apply to every cassette. + # @yield block that determines what string to replace + # @yieldparam interaction [(optional) VCR::HTTPInteraction::HookAware] the HTTP interaction + # @yieldreturn the string to replace + # + # source://vcr//lib/vcr/configuration.rb#225 + def filter_sensitive_data(placeholder, tag = T.unsafe(nil), &block); end + + # Configures which libraries VCR will hook into to intercept HTTP requests. + # + # @example + # VCR.configure do |c| + # c.hook_into :webmock, :typhoeus + # end + # @param hooks [Array] List of libraries. Valid values are + # `:webmock`, `:typhoeus`, `:excon` and `:faraday`. + # @raise [ArgumentError] when given an unsupported library name. + # @raise [VCR::Errors::LibraryVersionTooLowError] when the version + # of a library you are using is too low for VCR to support. + # + # source://vcr//lib/vcr/configuration.rb#65 + def hook_into(*hooks); end + + # Specifies host(s) that VCR should ignore. + # + # @param hosts [Array] List of hosts to ignore + # @see #ignore_localhost= + # @see #ignore_request + # + # source://vcr//lib/vcr/configuration.rb#75 + def ignore_host(*hosts); end + + # Specifies host(s) that VCR should ignore. + # + # @param hosts [Array] List of hosts to ignore + # @see #ignore_localhost= + # @see #ignore_request + # + # source://vcr//lib/vcr/configuration.rb#75 + def ignore_hosts(*hosts); end + + # Sets whether or not VCR should ignore localhost requests. + # + # @param value [Boolean] the value to set + # @see #ignore_hosts + # @see #ignore_request + # + # source://vcr//lib/vcr/configuration.rb#94 + def ignore_localhost=(value); end + + # Defines what requests to ignore using a block. + # + # @example + # VCR.configure do |c| + # c.ignore_request do |request| + # uri = URI(request.uri) + # # ignore only localhost requests to port 7500 + # uri.host == 'localhost' && uri.port == 7500 + # end + # end + # @yield the callback + # @yieldparam request [VCR::Request] the HTTP request + # @yieldreturn [Boolean] whether or not to ignore the request + # + # source://vcr//lib/vcr/configuration.rb#112 + def ignore_request(&block); end + + # Logger object that provides logging APIs and helper methods. + # + # @private + # + # source://vcr//lib/vcr/configuration.rb#454 + def logger; end + + # @param http_message [#body, #headers] the `VCR::Request` or `VCR::Response` object being serialized + # @return [Boolean] whether or not the body of the given HTTP message should + # be base64 encoded during serialization in order to preserve the bytes exactly. + # @see #preserve_exact_body_bytes + # + # source://vcr//lib/vcr/configuration.rb#484 + def preserve_exact_body_bytes_for?(http_message); end + + # Sets a parser for VCR to use when parsing query strings for request + # comparisons. The new parser must implement a method `call` that returns + # an object which is both equalivant and consistent when given an HTTP + # query string of possibly differing value ordering. + # + # * `#== # => Boolean` + # + # The `#==` method must return true if both objects represent the + # same query string. + # + # This defaults to `CGI.parse` from the ruby standard library. + # + # @overload query_parser + # @overload query_parser= + # + # source://vcr//lib/vcr/configuration.rb#151 + def query_parser; end + + # Sets a parser for VCR to use when parsing query strings for request + # comparisons. The new parser must implement a method `call` that returns + # an object which is both equalivant and consistent when given an HTTP + # query string of possibly differing value ordering. + # + # * `#== # => Boolean` + # + # The `#==` method must return true if both objects represent the + # same query string. + # + # This defaults to `CGI.parse` from the ruby standard library. + # + # @overload query_parser + # @overload query_parser= + # + # source://vcr//lib/vcr/configuration.rb#151 + def query_parser=(_arg0); end + + # Registers a request matcher for later use. + # + # @example + # VCR.configure do |c| + # c.register_request_matcher :port do |request_1, request_2| + # URI(request_1.uri).port == URI(request_2.uri).port + # end + # end + # + # VCR.use_cassette("my_cassette", :match_requests_on => [:method, :host, :port]) do + # # ... + # end + # @param name [Symbol] the name of the request matcher + # @yield the request matcher + # @yieldparam request_1 [VCR::Request] One request + # @yieldparam request_2 [VCR::Request] The other request + # @yieldreturn [Boolean] whether or not these two requests should be considered + # equivalent + # + # source://vcr//lib/vcr/configuration.rb#198 + def register_request_matcher(name, &block); end + + # @deprecated Use #hook_into instead. + # @see #hook_into + # + # source://vcr//lib/vcr/deprecations.rb#26 + def stub_with(*adapters); end + + # Specifies host(s) that VCR should stop ignoring. + # + # @param hosts [Array] List of hosts to unignore + # @see #ignore_hosts + # + # source://vcr//lib/vcr/configuration.rb#84 + def unignore_host(*hosts); end + + # Specifies host(s) that VCR should stop ignoring. + # + # @param hosts [Array] List of hosts to unignore + # @see #ignore_hosts + # + # source://vcr//lib/vcr/configuration.rb#84 + def unignore_hosts(*hosts); end + + # Sets a parser for VCR to use when parsing URIs. The new parser + # must implement a method `parse` that returns an instance of the + # URI object. This URI object must implement the following + # interface: + # + # * `scheme # => String` + # * `host # => String` + # * `port # => Fixnum` + # * `path # => String` + # * `query # => String` + # * `#port=` + # * `#query=` + # * `#to_s # => String` + # * `#== # => Boolean` + # + # The `#==` method must return true if both URI objects represent the + # same URI. + # + # This defaults to `URI` from the ruby standard library. + # + # @overload uri_parser + # @overload uri_parser= + # + # source://vcr//lib/vcr/configuration.rb#177 + def uri_parser; end + + # Sets a parser for VCR to use when parsing URIs. The new parser + # must implement a method `parse` that returns an instance of the + # URI object. This URI object must implement the following + # interface: + # + # * `scheme # => String` + # * `host # => String` + # * `port # => Fixnum` + # * `path # => String` + # * `query # => String` + # * `#port=` + # * `#query=` + # * `#to_s # => String` + # * `#== # => Boolean` + # + # The `#==` method must return true if both URI objects represent the + # same URI. + # + # This defaults to `URI` from the ruby standard library. + # + # @overload uri_parser + # @overload uri_parser= + # + # source://vcr//lib/vcr/configuration.rb#177 + def uri_parser=(_arg0); end + + private + + # source://vcr//lib/vcr/configuration.rb#529 + def create_fiber_for(fiber_errors, hook_declaration, proc); end + + # source://vcr//lib/vcr/configuration.rb#511 + def load_library_hook(hook); end + + # source://vcr//lib/vcr/configuration.rb#582 + def log_prefix; end + + # source://vcr//lib/vcr/configuration.rb#564 + def register_built_in_hooks; end + + # source://vcr//lib/vcr/configuration.rb#559 + def request_filter_from(object); end + + # source://vcr//lib/vcr/configuration.rb#519 + def resume_fiber(fiber, fiber_errors, response, hook_declaration); end + + # source://vcr//lib/vcr/configuration.rb#548 + def start_new_fiber_for(request, fibers, fiber_errors, hook_declaration, proc); end + + # source://vcr//lib/vcr/configuration.rb#554 + def tag_filter_from(tag); end +end + +# source://vcr//lib/vcr/configuration.rb#0 +module VCR::Configuration::DefinedHooks + # source://vcr//lib/vcr/util/hooks.rb#55 + def after_http_request(*filters, &hook); end + + # source://vcr//lib/vcr/util/hooks.rb#55 + def after_library_hooks_loaded(*filters, &hook); end + + # source://vcr//lib/vcr/util/hooks.rb#55 + def before_http_request(*filters, &hook); end + + # source://vcr//lib/vcr/util/hooks.rb#55 + def before_playback(*filters, &hook); end + + # source://vcr//lib/vcr/util/hooks.rb#55 + def before_record(*filters, &hook); end + + # source://vcr//lib/vcr/util/hooks.rb#55 + def preserve_exact_body_bytes(*filters, &hook); end +end + +# Provides integration with Cucumber using tags. +# +# source://vcr//lib/vcr/test_frameworks/cucumber.rb#3 +class VCR::CucumberTags + # @private + # @return [CucumberTags] a new instance of CucumberTags + # + # source://vcr//lib/vcr/test_frameworks/cucumber.rb#19 + def initialize(main_object); end + + # Adds `Before` and `After` cucumber hooks for the named tags that + # will cause a VCR cassette to be used for scenarios with matching tags. + # + # @param tag_names [Array] the cucumber scenario tags. If + # the last argument is a hash it is treated as cassette options. + # - `:use_scenario_name => true` to automatically name the + # cassette according to the scenario name. + # + # source://vcr//lib/vcr/test_frameworks/cucumber.rb#30 + def tag(*tag_names); end + + # Adds `Before` and `After` cucumber hooks for the named tags that + # will cause a VCR cassette to be used for scenarios with matching tags. + # + # @param tag_names [Array] the cucumber scenario tags. If + # the last argument is a hash it is treated as cassette options. + # - `:use_scenario_name => true` to automatically name the + # cassette according to the scenario name. + # + # source://vcr//lib/vcr/test_frameworks/cucumber.rb#30 + def tags(*tag_names); end + + class << self + # @private + # + # source://vcr//lib/vcr/test_frameworks/cucumber.rb#11 + def add_tag(tag); end + + # @private + # + # source://vcr//lib/vcr/test_frameworks/cucumber.rb#6 + def tags; end + end +end + +# Constructs a cassette name from a Cucumber 2 scenario outline +# +# @private +# +# source://vcr//lib/vcr/test_frameworks/cucumber.rb#84 +class VCR::CucumberTags::ScenarioNameBuilder + # @return [ScenarioNameBuilder] a new instance of ScenarioNameBuilder + # + # source://vcr//lib/vcr/test_frameworks/cucumber.rb#85 + def initialize(test_case); end + + # source://vcr//lib/vcr/test_frameworks/cucumber.rb#90 + def cassette_name; end + + # source://vcr//lib/vcr/test_frameworks/cucumber.rb#100 + def examples_table(*_arg0); end + + # source://vcr//lib/vcr/test_frameworks/cucumber.rb#103 + def examples_table_row(row); end + + # source://vcr//lib/vcr/test_frameworks/cucumber.rb#94 + def feature(feature); end + + # source://vcr//lib/vcr/test_frameworks/cucumber.rb#100 + def scenario(*_arg0); end + + # source://vcr//lib/vcr/test_frameworks/cucumber.rb#94 + def scenario_outline(feature); end +end + +# @private +# +# source://vcr//lib/vcr/deprecations.rb#33 +module VCR::Deprecations; end + +# source://vcr//lib/vcr/deprecations.rb#34 +module VCR::Deprecations::Middleware; end + +# @private +# +# source://vcr//lib/vcr/deprecations.rb#36 +module VCR::Deprecations::Middleware::Faraday + # source://vcr//lib/vcr/deprecations.rb#37 + def initialize(*args); end +end + +# Namespace for VCR errors. +# +# source://vcr//lib/vcr/errors.rb#3 +module VCR::Errors; end + +# Error raised when an `around_http_request` hook is used improperly. +# +# @see VCR::Configuration#around_http_request +# +# source://vcr//lib/vcr/errors.rb#36 +class VCR::Errors::AroundHTTPRequestHookError < ::VCR::Errors::Error; end + +# Error raised when VCR is turned off while a cassette is in use. +# +# @see VCR#turn_off! +# @see VCR#turned_off +# +# source://vcr//lib/vcr/errors.rb#10 +class VCR::Errors::CassetteInUseError < ::VCR::Errors::Error; end + +# Error raised when you attempt to eject a cassette inserted by another +# thread. +# +# source://vcr//lib/vcr/errors.rb#56 +class VCR::Errors::EjectLinkedCassetteError < ::VCR::Errors::Error; end + +# Base class for all VCR errors. +# +# source://vcr//lib/vcr/errors.rb#5 +class VCR::Errors::Error < ::StandardError; end + +# Error raised when a VCR 1.x cassette is used with VCR 2. +# +# source://vcr//lib/vcr/errors.rb#32 +class VCR::Errors::InvalidCassetteFormatError < ::VCR::Errors::Error; end + +# Error raised when the version of one of the libraries that VCR hooks into +# is too low for VCR to support. +# +# @see VCR::Configuration#hook_into +# +# source://vcr//lib/vcr/errors.rb#26 +class VCR::Errors::LibraryVersionTooLowError < ::VCR::Errors::Error; end + +# Error raised when an cassette ERB template is rendered and a +# variable is missing. +# +# @see VCR#insert_cassette +# @see VCR#use_cassette +# +# source://vcr//lib/vcr/errors.rb#21 +class VCR::Errors::MissingERBVariableError < ::VCR::Errors::Error; end + +# Error raised when you attempt to use a VCR feature that is not +# supported on your ruby interpreter. +# +# @see VCR::Configuration#around_http_request +# +# source://vcr//lib/vcr/errors.rb#41 +class VCR::Errors::NotSupportedError < ::VCR::Errors::Error; end + +# Error raised when a VCR cassette is inserted while VCR is turned off. +# +# @see VCR#insert_cassette +# @see VCR#use_cassette +# +# source://vcr//lib/vcr/errors.rb#15 +class VCR::Errors::TurnedOffError < ::VCR::Errors::Error; end + +# Error raised when an HTTP request is made that VCR is unable to handle. +# +# @note VCR will raise this to force you to do something about the +# HTTP request. The idea is that you want to handle _every_ HTTP +# request in your test suite. The error message will give you +# suggestions for how to deal with the request. +# +# source://vcr//lib/vcr/errors.rb#64 +class VCR::Errors::UnhandledHTTPRequestError < ::VCR::Errors::Error + # Constructs the error. + # + # @param request [VCR::Request] the unhandled request. + # @return [UnhandledHTTPRequestError] a new instance of UnhandledHTTPRequestError + # + # source://vcr//lib/vcr/errors.rb#70 + def initialize(request); end + + # The HTTP request. + # + # source://vcr//lib/vcr/errors.rb#65 + def request; end + + private + + # source://vcr//lib/vcr/errors.rb#136 + def cassettes_description; end + + # source://vcr//lib/vcr/errors.rb#148 + def cassettes_list; end + + # source://vcr//lib/vcr/errors.rb#81 + def construct_message; end + + # source://vcr//lib/vcr/errors.rb#90 + def current_cassettes; end + + # source://vcr//lib/vcr/errors.rb#118 + def current_matchers; end + + # source://vcr//lib/vcr/errors.rb#183 + def format_bullet_point(lines, index); end + + # source://vcr//lib/vcr/errors.rb#189 + def format_foot_note(url, index); end + + # source://vcr//lib/vcr/errors.rb#128 + def formatted_headers; end + + # source://vcr//lib/vcr/errors.rb#168 + def formatted_suggestions; end + + # @return [Boolean] + # + # source://vcr//lib/vcr/errors.rb#295 + def has_used_interaction_matching?; end + + # @return [Boolean] + # + # source://vcr//lib/vcr/errors.rb#114 + def match_request_on_body?; end + + # @return [Boolean] + # + # source://vcr//lib/vcr/errors.rb#110 + def match_request_on_headers?; end + + # source://vcr//lib/vcr/errors.rb#299 + def match_requests_on_suggestion; end + + # source://vcr//lib/vcr/errors.rb#277 + def no_cassette_suggestions; end + + # source://vcr//lib/vcr/errors.rb#283 + def record_mode_suggestion; end + + # source://vcr//lib/vcr/errors.rb#77 + def relish_version_slug; end + + # source://vcr//lib/vcr/errors.rb#94 + def request_description; end + + # source://vcr//lib/vcr/errors.rb#259 + def suggestion_for(key); end + + # source://vcr//lib/vcr/errors.rb#266 + def suggestions; end +end + +# List of suggestions for how to configure VCR to handle the request. +# +# source://vcr//lib/vcr/errors.rb#194 +VCR::Errors::UnhandledHTTPRequestError::ALL_SUGGESTIONS = T.let(T.unsafe(nil), Hash) + +# Error raised when you ask VCR to decode a compressed response +# body but the content encoding isn't one of the known ones. +# +# @see VCR::Response#decompress +# +# source://vcr//lib/vcr/errors.rb#46 +class VCR::Errors::UnknownContentEncodingError < ::VCR::Errors::Error; end + +# Error raised when a request matcher is requested that is not registered. +# +# source://vcr//lib/vcr/errors.rb#29 +class VCR::Errors::UnregisteredMatcherError < ::VCR::Errors::Error; end + +# Error raised when you eject a cassette before all previously +# recorded HTTP interactions are played back. +# +# @note Only applicable when :allow_episode_skipping is false. +# @see VCR::HTTPInteractionList#assert_no_unused_interactions! +# +# source://vcr//lib/vcr/errors.rb#52 +class VCR::Errors::UnusedHTTPInteractionError < ::VCR::Errors::Error; end + +# Represents a single interaction over HTTP, containing a request and a response. +# +# @attr request [Request] the request +# @attr response [Response] the response +# @attr recorded_at [Time] when this HTTP interaction was recorded +# +# source://vcr//lib/vcr/structs.rb#501 +class VCR::HTTPInteraction < ::Struct + # @return [HTTPInteraction] a new instance of HTTPInteraction + # + # source://vcr//lib/vcr/structs.rb#502 + def initialize(*args); end + + # @return [HookAware] an instance with additional capabilities + # suitable for use in `before_record` and `before_playback` hooks. + # + # source://vcr//lib/vcr/structs.rb#532 + def hook_aware; end + + # Builds a serializable hash from the HTTP interaction data. + # + # @return [Hash] hash that represents this HTTP interaction + # and can be easily serialized. + # @see HTTPInteraction.from_hash + # + # source://vcr//lib/vcr/structs.rb#512 + def to_hash; end + + class << self + # Constructs a new instance from a hash. + # + # @param hash [Hash] the hash to use to construct the instance. + # @return [HTTPInteraction] the HTTP interaction + # + # source://vcr//lib/vcr/structs.rb#524 + def from_hash(hash); end + end +end + +# Decorates an {HTTPInteraction} with additional methods useful +# for a `before_record` or `before_playback` hook. +# +# source://vcr//lib/vcr/structs.rb#538 +class VCR::HTTPInteraction::HookAware + # @return [HookAware] a new instance of HookAware + # + # source://vcr//lib/vcr/structs.rb#539 + def initialize(http_interaction); end + + # Replaces a string in any part of the HTTP interaction (headers, request body, + # response body, etc) with the given replacement text. + # + # @param text [#to_s] the text to replace + # @param replacement_text [#to_s] the text to put in its place + # + # source://vcr//lib/vcr/structs.rb#563 + def filter!(text, replacement_text); end + + # Flags the HTTP interaction so that VCR ignores it. This is useful in + # a {VCR::Configuration#before_record} or {VCR::Configuration#before_playback} + # hook so that VCR does not record or play it back. + # + # @see #ignored? + # + # source://vcr//lib/vcr/structs.rb#548 + def ignore!; end + + # @return [Boolean] whether or not this HTTP interaction should be ignored. + # @see #ignore! + # + # source://vcr//lib/vcr/structs.rb#554 + def ignored?; end + + private + + # source://vcr//lib/vcr/structs.rb#584 + def filter_hash!(hash, text, replacement_text); end + + # source://vcr//lib/vcr/structs.rb#571 + def filter_object!(object, text, replacement_text); end +end + +# @private +# +# source://vcr//lib/vcr/util/hooks.rb#5 +module VCR::Hooks + include ::VCR::VariableArgsBlockCaller + + mixes_in_class_methods ::VCR::Hooks::ClassMethods + + # source://vcr//lib/vcr/util/hooks.rb#34 + def clear_hooks; end + + # @return [Boolean] + # + # source://vcr//lib/vcr/util/hooks.rb#44 + def has_hooks_for?(hook_type); end + + # source://vcr//lib/vcr/util/hooks.rb#38 + def hooks; end + + # source://vcr//lib/vcr/util/hooks.rb#28 + def invoke_hook(hook_type, *args); end + + class << self + # @private + # + # source://vcr//lib/vcr/util/hooks.rb#19 + def included(klass); end + end +end + +# @private +# +# source://vcr//lib/vcr/util/hooks.rb#49 +module VCR::Hooks::ClassMethods + # source://vcr//lib/vcr/util/hooks.rb#50 + def define_hook(hook_type, prepend = T.unsafe(nil)); end +end + +# @private +# +# source://vcr//lib/vcr/util/hooks.rb#9 +class VCR::Hooks::FilteredHook < ::Struct + include ::VCR::VariableArgsBlockCaller + + # source://vcr//lib/vcr/util/hooks.rb#12 + def conditionally_invoke(*args); end + + # Returns the value of attribute filters + # + # @return [Object] the current value of filters + def filters; end + + # Sets the attribute filters + # + # @param value [Object] the value to set the attribute filters to. + # @return [Object] the newly set value + def filters=(_); end + + # Returns the value of attribute hook + # + # @return [Object] the current value of hook + def hook; end + + # Sets the attribute hook + # + # @param value [Object] the value to set the attribute hook to. + # @return [Object] the newly set value + def hook=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# @private +# +# source://vcr//lib/vcr/util/internet_connection.rb#26 +module VCR::InternetConnection + extend ::VCR::InternetConnection + + # @return [Boolean] + # + # source://vcr//lib/vcr/util/internet_connection.rb#31 + def available?; end +end + +# source://vcr//lib/vcr/util/internet_connection.rb#29 +VCR::InternetConnection::EXAMPLE_HOST = T.let(T.unsafe(nil), String) + +# @private +# +# source://vcr//lib/vcr/library_hooks.rb#3 +class VCR::LibraryHooks + # @return [Boolean] + # + # source://vcr//lib/vcr/library_hooks.rb#6 + def disabled?(hook); end + + # Returns the value of attribute exclusive_hook. + # + # source://vcr//lib/vcr/library_hooks.rb#4 + def exclusive_hook; end + + # Sets the attribute exclusive_hook + # + # @param value the value to set the attribute exclusive_hook to. + # + # source://vcr//lib/vcr/library_hooks.rb#4 + def exclusive_hook=(_arg0); end + + # source://vcr//lib/vcr/library_hooks.rb#10 + def exclusively_enabled(hook); end +end + +# A Cassette wrapper for linking cassettes from another thread +# +# source://vcr//lib/vcr/linked_cassette.rb#7 +class VCR::LinkedCassette < ::SimpleDelegator + # Prevents cassette ejection by raising EjectLinkedCassetteError + # + # @raise [Errors::EjectLinkedCassetteError] + # + # source://vcr//lib/vcr/linked_cassette.rb#62 + def eject(*args); end + + # @return [Boolean] true + # + # source://vcr//lib/vcr/linked_cassette.rb#68 + def linked?; end + + class << self + # Create a new CassetteList + # + # @param cassettes [Array] context-owned cassettes + # @param linked_cassettes [Array] context-unowned (linked) cassettes + # + # source://vcr//lib/vcr/linked_cassette.rb#57 + def list(cassettes, linked_cassettes); end + end +end + +# An enumerable lazily wrapping a list of cassettes that a context is using +# +# source://vcr//lib/vcr/linked_cassette.rb#8 +class VCR::LinkedCassette::CassetteList + include ::Enumerable + + # Creates a new list of context-owned cassettes and linked cassettes + # + # @param cassettes [Array] context-owned cassettes + # @param linked_cassettes [Array] context-unowned (linked) cassettes + # @return [CassetteList] a new instance of CassetteList + # + # source://vcr//lib/vcr/linked_cassette.rb#14 + def initialize(cassettes, linked_cassettes); end + + # Yields linked cassettes first, and then context-owned cassettes + # + # source://vcr//lib/vcr/linked_cassette.rb#20 + def each; end + + # Provide last implementation, which is not provided by Enumerable + # + # source://vcr//lib/vcr/linked_cassette.rb#31 + def last; end + + # Provide size implementation, which is not provided by Enumerable + # + # source://vcr//lib/vcr/linked_cassette.rb#40 + def size; end + + protected + + # source://vcr//lib/vcr/linked_cassette.rb#45 + def wrap(cassette); end +end + +# Provides log message formatting helper methods. +# +# @private +# +# source://vcr//lib/vcr/util/logger.rb#4 +class VCR::Logger + # @return [Logger] a new instance of Logger + # + # source://vcr//lib/vcr/util/logger.rb#5 + def initialize(stream); end + + # source://vcr//lib/vcr/util/logger.rb#9 + def log(message, log_prefix, indentation_level = T.unsafe(nil)); end + + # source://vcr//lib/vcr/util/logger.rb#15 + def request_summary(request, request_matchers); end + + # source://vcr//lib/vcr/util/logger.rb#22 + def response_summary(response); end +end + +# Provides common logger helper methods that simply delegate to +# the underlying logger object. +# +# @private +# +# source://vcr//lib/vcr/util/logger.rb#45 +module VCR::Logger::Mixin + # source://vcr//lib/vcr/util/logger.rb#46 + def log(message, indentation_level = T.unsafe(nil)); end + + # source://vcr//lib/vcr/util/logger.rb#50 + def request_summary(*args); end + + # source://vcr//lib/vcr/util/logger.rb#54 + def response_summary(*args); end +end + +# A null-object version of the Logger. Used when +# a `debug_logger` has not been set. +# +# @note We used to use a null object for the `debug_logger` itself, +# but some users noticed a negative perf impact from having the +# logger formatting logic still executing in that case, so we +# moved the null object interface up a layer to here. +# @private +# +# source://vcr//lib/vcr/util/logger.rb#34 +module VCR::Logger::Null + private + + # source://vcr//lib/vcr/util/logger.rb#37 + def log(*_arg0); end + + # source://vcr//lib/vcr/util/logger.rb#38 + def request_summary(*_arg0); end + + # source://vcr//lib/vcr/util/logger.rb#39 + def response_summary(*_arg0); end + + class << self + # source://vcr//lib/vcr/util/logger.rb#37 + def log(*_arg0); end + + # source://vcr//lib/vcr/util/logger.rb#38 + def request_summary(*_arg0); end + + # source://vcr//lib/vcr/util/logger.rb#39 + def response_summary(*_arg0); end + end +end + +# The main thread in which VCR was loaded +# +# source://vcr//lib/vcr.rb#30 +VCR::MainThread = T.let(T.unsafe(nil), Thread) + +# Contains middlewares for use with different libraries. +# +# source://vcr//lib/vcr.rb#39 +module VCR::Middleware; end + +# Object yielded by VCR's {Rack} middleware that allows you to configure +# the cassette dynamically based on the rack env. +# +# source://vcr//lib/vcr/middleware/rack.rb#5 +class VCR::Middleware::CassetteArguments + # @private + # @return [CassetteArguments] a new instance of CassetteArguments + # + # source://vcr//lib/vcr/middleware/rack.rb#7 + def initialize; end + + # Sets (and gets) the cassette name. + # + # @param name [#to_s] the cassette name + # @return [#to_s] the cassette name + # + # source://vcr//lib/vcr/middleware/rack.rb#16 + def name(name = T.unsafe(nil)); end + + # Sets (and gets) the cassette options. + # + # @param options [Hash] the cassette options + # @return [Hash] the cassette options + # + # source://vcr//lib/vcr/middleware/rack.rb#25 + def options(options = T.unsafe(nil)); end +end + +# Faraday middleware that VCR uses to record and replay HTTP requests made through +# Faraday. +# +# @note You can either insert this middleware into the Faraday middleware stack +# yourself or configure {VCR::Configuration#hook_into} to hook into `:faraday`. +# +# source://vcr//lib/vcr/middleware/faraday.rb#15 +class VCR::Middleware::Faraday + include ::VCR::Deprecations::Middleware::Faraday + + # Constructs a new instance of the Faraday middleware. + # + # @param app [#call] the faraday app + # @return [Faraday] a new instance of Faraday + # + # source://vcr//lib/vcr/middleware/faraday.rb#21 + def initialize(app); end + + # Handles the HTTP request being made through Faraday + # + # @param env [Hash] the Faraday request env hash + # + # source://vcr//lib/vcr/middleware/faraday.rb#29 + def call(env); end + + # Close any persistent connections. + # + # source://vcr//lib/vcr/middleware/faraday.rb#35 + def close; end +end + +# @private +# +# source://vcr//lib/vcr/middleware/faraday.rb#40 +class VCR::Middleware::Faraday::RequestHandler < ::VCR::RequestHandler + # @return [RequestHandler] a new instance of RequestHandler + # + # source://vcr//lib/vcr/middleware/faraday.rb#42 + def initialize(app, env); end + + # Returns the value of attribute app. + # + # source://vcr//lib/vcr/middleware/faraday.rb#41 + def app; end + + # Returns the value of attribute env. + # + # source://vcr//lib/vcr/middleware/faraday.rb#41 + def env; end + + # source://vcr//lib/vcr/middleware/faraday.rb#47 + def handle; end + + private + + # source://vcr//lib/vcr/middleware/faraday.rb#129 + def collect_chunks; end + + # @return [Boolean] + # + # source://vcr//lib/vcr/middleware/faraday.rb#61 + def delay_finishing?; end + + # source://vcr//lib/vcr/middleware/faraday.rb#124 + def invoke_after_request_hook(response); end + + # source://vcr//lib/vcr/middleware/faraday.rb#94 + def on_ignored_request; end + + # source://vcr//lib/vcr/middleware/faraday.rb#113 + def on_recordable_request; end + + # source://vcr//lib/vcr/middleware/faraday.rb#100 + def on_stubbed_by_vcr_request; end + + # source://vcr//lib/vcr/middleware/faraday.rb#73 + def raw_body_from(body); end + + # source://vcr//lib/vcr/middleware/faraday.rb#81 + def response_for(response); end + + # source://vcr//lib/vcr/middleware/faraday.rb#139 + def restore_body_from_chunks(request); end + + # source://vcr//lib/vcr/middleware/faraday.rb#65 + def vcr_request; end +end + +# Rack middleware that uses a VCR cassette for each incoming HTTP request. +# +# @example +# app = Rack::Builder.new do +# use VCR::Middleware::Rack do |cassette, env| +# cassette.name "rack/#{env['SERVER_NAME']}" +# cassette.options :record => :new_episodes +# end +# +# run MyRackApp +# end +# @note This will record/replay _outbound_ HTTP requests made by your rack app. +# +# source://vcr//lib/vcr/middleware/rack.rb#43 +class VCR::Middleware::Rack + include ::VCR::VariableArgsBlockCaller + + # Constructs a new instance of VCR's rack middleware. + # + # @param app [#call] the rack app + # @raise [ArgumentError] if no configuration block is provided + # @return [Rack] a new instance of Rack + # @yield the cassette configuration block + # @yieldparam cassette [CassetteArguments] the cassette configuration object + # @yieldparam env [(optional) Hash] the rack env hash + # + # source://vcr//lib/vcr/middleware/rack.rb#53 + def initialize(app, &block); end + + # Implements the rack middleware interface. + # + # @param env [Hash] the rack env hash + # @return [Array(Integer, Hash, #each)] the rack response + # + # source://vcr//lib/vcr/middleware/rack.rb#62 + def call(env); end + + private + + # source://vcr//lib/vcr/middleware/rack.rb#72 + def cassette_arguments(env); end +end + +# @private +# +# source://vcr//lib/vcr/structs.rb#7 +module VCR::Normalizers; end + +# @private +# +# source://vcr//lib/vcr/structs.rb#9 +module VCR::Normalizers::Body + mixes_in_class_methods ::VCR::Normalizers::Body::ClassMethods + + # source://vcr//lib/vcr/structs.rb#61 + def initialize(*args); end + + private + + # source://vcr//lib/vcr/structs.rb#92 + def base_body_hash(body); end + + # source://vcr//lib/vcr/structs.rb#78 + def serializable_body; end + + class << self + # @private + # + # source://vcr//lib/vcr/structs.rb#10 + def included(klass); end + end +end + +# @private +# +# source://vcr//lib/vcr/structs.rb#15 +module VCR::Normalizers::Body::ClassMethods + # source://vcr//lib/vcr/structs.rb#16 + def body_from(hash_or_string); end + + # source://vcr//lib/vcr/structs.rb#29 + def force_encode_string(string, encoding); end + + # source://vcr//lib/vcr/structs.rb#34 + def try_encode_string(string, encoding); end +end + +# @private +# +# source://vcr//lib/vcr/structs.rb#103 +module VCR::Normalizers::Header + # source://vcr//lib/vcr/structs.rb#104 + def initialize(*args); end + + private + + # source://vcr//lib/vcr/structs.rb#153 + def convert_to_raw_strings(array); end + + # source://vcr//lib/vcr/structs.rb#146 + def delete_header(key); end + + # source://vcr//lib/vcr/structs.rb#139 + def edit_header(key, value = T.unsafe(nil)); end + + # source://vcr//lib/vcr/structs.rb#134 + def get_header(key); end + + # source://vcr//lib/vcr/structs.rb#129 + def header_key(key); end + + # source://vcr//lib/vcr/structs.rb#111 + def normalize_headers; end +end + +# @private +# +# source://vcr//lib/vcr/util/internet_connection.rb#8 +module VCR::Ping + private + + # source://vcr//lib/vcr/util/internet_connection.rb#9 + def pingecho(host, timeout = T.unsafe(nil), service = T.unsafe(nil)); end + + class << self + # source://vcr//lib/vcr/util/internet_connection.rb#9 + def pingecho(host, timeout = T.unsafe(nil), service = T.unsafe(nil)); end + end +end + +# Integrates VCR with RSpec. +# +# source://vcr//lib/vcr.rb#35 +module VCR::RSpec; end + +# @private +# +# source://vcr//lib/vcr/test_frameworks/rspec.rb#5 +module VCR::RSpec::Metadata + extend ::VCR::RSpec::Metadata + + # source://vcr//lib/vcr/test_frameworks/rspec.rb#30 + def configure!; end + + # source://vcr//lib/vcr/test_frameworks/rspec.rb#8 + def vcr_cassette_name_for(metadata); end +end + +# The request of an {HTTPInteraction}. +# +# @attr method [Symbol] the HTTP method (i.e. :head, :options, :get, :post, :put, :patch or :delete) +# @attr uri [String] the request URI +# @attr body [String, nil] the request body +# @attr headers [Hash{String => Array}] the request headers +# +# source://vcr//lib/vcr/structs.rb#176 +class VCR::Request < ::Struct + include ::VCR::Normalizers::Header + include ::VCR::Normalizers::Body + extend ::VCR::Normalizers::Body::ClassMethods + + # @return [Request] a new instance of Request + # + # source://vcr//lib/vcr/structs.rb#180 + def initialize(*args); end + + # the HTTP method (i.e. :head, :options, :get, :post, :put, :patch or :delete) + # + # @return [Symbol] the current value of method + # + # source://vcr//lib/vcr/structs.rb#228 + def method(*args); end + + # Parses the URI using the configured `uri_parser`. + # + # @return [#schema, #host, #port, #path, #query] A parsed URI object. + # + # source://vcr//lib/vcr/structs.rb#223 + def parsed_uri; end + + # Builds a serializable hash from the request data. + # + # @return [Hash] hash that represents this request and can be easily + # serialized. + # @see Request.from_hash + # + # source://vcr//lib/vcr/structs.rb#197 + def to_hash; end + + private + + # source://vcr//lib/vcr/structs.rb#315 + def without_standard_port(uri); end + + class << self + # Constructs a new instance from a hash. + # + # @param hash [Hash] the hash to use to construct the instance. + # @return [Request] the request + # + # source://vcr//lib/vcr/structs.rb#210 + def from_hash(hash); end + end +end + +# Provides fiber-awareness for the {VCR::Configuration#around_http_request} hook. +# +# source://vcr//lib/vcr/structs.rb#296 +class VCR::Request::FiberAware + # Yields the fiber so the request can proceed. + # + # @return [VCR::Response] the response from the request + # + # source://vcr//lib/vcr/structs.rb#297 + def proceed; end + + # Builds a proc that allows the request to proceed when called. + # This allows you to treat the request as a proc and pass it on + # to a method that yields (at which point the request will proceed). + # + # @return [Proc] the proc + # + # source://vcr//lib/vcr/structs.rb#306 + def to_proc; end +end + +# Decorates a {Request} with its current type. +# +# source://vcr//lib/vcr/structs.rb#235 +class VCR::Request::Typed + # @param request [Request] the request + # @param type [Symbol] the type. Should be one of `:ignored`, `:stubbed`, `:recordable` or `:unhandled`. + # @return [Typed] a new instance of Typed + # + # source://vcr//lib/vcr/structs.rb#240 + def initialize(request, type); end + + # @return [Boolean] whether or not this request is being stubbed by an + # external library (such as WebMock). + # @see #stubbed_by_vcr? + # @see #stubbed? + # + # source://vcr//lib/vcr/structs.rb#261 + def externally_stubbed?; end + + # @return [Boolean] whether or not this request is being ignored + # + # source://vcr//lib/vcr/structs.rb#246 + def ignored?; end + + # @note VCR allows `:ignored` and `:recordable` requests to be made for real. + # @return [Boolean] whether or not this request will be made for real. + # + # source://vcr//lib/vcr/structs.rb#277 + def real?; end + + # @return [Boolean] whether or not this request will be recorded. + # + # source://vcr//lib/vcr/structs.rb#266 + def recordable?; end + + # @return [Boolean] whether or not this request will be stubbed. + # It may be stubbed by an external library or by VCR. + # @see #stubbed_by_vcr? + # @see #externally_stubbed? + # + # source://vcr//lib/vcr/structs.rb#285 + def stubbed?; end + + # @return [Boolean] whether or not this request is being stubbed by VCR + # @see #externally_stubbed? + # @see #stubbed? + # + # source://vcr//lib/vcr/structs.rb#253 + def stubbed_by_vcr?; end + + # @return [Symbol] One of `:ignored`, `:stubbed`, `:recordable` or `:unhandled`. + # + # source://vcr//lib/vcr/structs.rb#236 + def type; end + + # @return [Boolean] whether or not VCR knows how to handle this request. + # + # source://vcr//lib/vcr/structs.rb#271 + def unhandled?; end +end + +# @private +# +# source://vcr//lib/vcr/request_handler.rb#3 +class VCR::RequestHandler + include ::VCR::Logger::Mixin + + # source://vcr//lib/vcr/request_handler.rb#6 + def handle; end + + private + + # @return [Boolean] + # + # source://vcr//lib/vcr/request_handler.rb#62 + def disabled?; end + + # @return [Boolean] + # + # source://vcr//lib/vcr/request_handler.rb#54 + def externally_stubbed?; end + + # @return [Boolean] + # + # source://vcr//lib/vcr/request_handler.rb#66 + def has_response_stub?(consume_stub); end + + # source://vcr//lib/vcr/request_handler.rb#49 + def invoke_after_request_hook(vcr_response); end + + # source://vcr//lib/vcr/request_handler.rb#43 + def invoke_before_request_hook; end + + # source://vcr//lib/vcr/request_handler.rb#78 + def library_name; end + + # source://vcr//lib/vcr/request_handler.rb#110 + def log_prefix; end + + # Subclasses can implement these + # + # source://vcr//lib/vcr/request_handler.rb#84 + def on_externally_stubbed_request; end + + # source://vcr//lib/vcr/request_handler.rb#87 + def on_ignored_request; end + + # source://vcr//lib/vcr/request_handler.rb#93 + def on_recordable_request; end + + # source://vcr//lib/vcr/request_handler.rb#90 + def on_stubbed_by_vcr_request; end + + # @raise [VCR::Errors::UnhandledHTTPRequestError] + # + # source://vcr//lib/vcr/request_handler.rb#96 + def on_unhandled_request; end + + # source://vcr//lib/vcr/request_handler.rb#100 + def request_summary; end + + # source://vcr//lib/vcr/request_handler.rb#33 + def request_type(consume_stub = T.unsafe(nil)); end + + # source://vcr//lib/vcr/request_handler.rb#29 + def set_typed_request_for_after_hook(request_type); end + + # @return [Boolean] + # + # source://vcr//lib/vcr/request_handler.rb#58 + def should_ignore?; end + + # source://vcr//lib/vcr/request_handler.rb#74 + def stubbed_response; end +end + +# @private +# +# source://vcr//lib/vcr/request_ignorer.rb#6 +class VCR::RequestIgnorer + include ::VCR::VariableArgsBlockCaller + include ::VCR::Hooks + include ::VCR::RequestIgnorer::DefinedHooks + extend ::VCR::Hooks::ClassMethods + + # @return [RequestIgnorer] a new instance of RequestIgnorer + # + # source://vcr//lib/vcr/request_ignorer.rb#13 + def initialize; end + + # @return [Boolean] + # + # source://vcr//lib/vcr/request_ignorer.rb#40 + def ignore?(request); end + + # source://vcr//lib/vcr/request_ignorer.rb#32 + def ignore_hosts(*hosts); end + + # source://vcr//lib/vcr/request_ignorer.rb#20 + def ignore_localhost=(value); end + + # @return [Boolean] + # + # source://vcr//lib/vcr/request_ignorer.rb#28 + def localhost_ignored?; end + + # source://vcr//lib/vcr/request_ignorer.rb#36 + def unignore_hosts(*hosts); end + + private + + # source://vcr//lib/vcr/request_ignorer.rb#46 + def ignored_hosts; end +end + +# source://vcr//lib/vcr/request_ignorer.rb#0 +module VCR::RequestIgnorer::DefinedHooks + # source://vcr//lib/vcr/util/hooks.rb#55 + def ignore_request(*filters, &hook); end +end + +# source://vcr//lib/vcr/request_ignorer.rb#11 +VCR::RequestIgnorer::LOCALHOST_ALIASES = T.let(T.unsafe(nil), Array) + +# Keeps track of the different request matchers. +# +# source://vcr//lib/vcr/request_matcher_registry.rb#5 +class VCR::RequestMatcherRegistry + # @private + # @return [RequestMatcherRegistry] a new instance of RequestMatcherRegistry + # + # source://vcr//lib/vcr/request_matcher_registry.rb#49 + def initialize; end + + # @private + # + # source://vcr//lib/vcr/request_matcher_registry.rb#64 + def [](matcher); end + + # @private + # + # source://vcr//lib/vcr/request_matcher_registry.rb#55 + def register(name, &block); end + + # Builds a dynamic request matcher that matches on a URI while ignoring the + # named query parameters. This is useful for dealing with non-deterministic + # URIs (i.e. that have a timestamp or request signature parameter). + # + # @example + # without_timestamp = VCR.request_matchers.uri_without_param(:timestamp) + # + # # use it directly... + # VCR.use_cassette('example', :match_requests_on => [:method, without_timestamp]) { } + # + # # ...or register it as a named matcher + # VCR.configure do |c| + # c.register_request_matcher(:uri_without_timestamp, &without_timestamp) + # end + # + # VCR.use_cassette('example', :match_requests_on => [:method, :uri_without_timestamp]) { } + # @param ignores [Array<#to_s>] The names of the query parameters to ignore + # @return [#call] the request matcher + # + # source://vcr//lib/vcr/request_matcher_registry.rb#91 + def uri_without_param(*ignores); end + + # Builds a dynamic request matcher that matches on a URI while ignoring the + # named query parameters. This is useful for dealing with non-deterministic + # URIs (i.e. that have a timestamp or request signature parameter). + # + # @example + # without_timestamp = VCR.request_matchers.uri_without_param(:timestamp) + # + # # use it directly... + # VCR.use_cassette('example', :match_requests_on => [:method, without_timestamp]) { } + # + # # ...or register it as a named matcher + # VCR.configure do |c| + # c.register_request_matcher(:uri_without_timestamp, &without_timestamp) + # end + # + # VCR.use_cassette('example', :match_requests_on => [:method, :uri_without_timestamp]) { } + # @param ignores [Array<#to_s>] The names of the query parameters to ignore + # @return [#call] the request matcher + # + # source://vcr//lib/vcr/request_matcher_registry.rb#91 + def uri_without_params(*ignores); end + + private + + # source://vcr//lib/vcr/request_matcher_registry.rb#105 + def raise_unregistered_matcher_error(name); end + + # source://vcr//lib/vcr/request_matcher_registry.rb#111 + def register_built_ins; end + + # source://vcr//lib/vcr/request_matcher_registry.rb#132 + def try_to_register_body_as_json; end + + # source://vcr//lib/vcr/request_matcher_registry.rb#98 + def uri_without_param_matchers; end +end + +# The default request matchers used for any cassette that does not +# specify request matchers. +# +# source://vcr//lib/vcr/request_matcher_registry.rb#9 +VCR::RequestMatcherRegistry::DEFAULT_MATCHERS = T.let(T.unsafe(nil), Array) + +# @private +# +# source://vcr//lib/vcr/request_matcher_registry.rb#12 +class VCR::RequestMatcherRegistry::Matcher < ::Struct + # @return [Boolean] + # + # source://vcr//lib/vcr/request_matcher_registry.rb#13 + def matches?(request_1, request_2); end +end + +# @private +# +# source://vcr//lib/vcr/request_matcher_registry.rb#19 +class VCR::RequestMatcherRegistry::URIWithoutParamsMatcher < ::Struct + # source://vcr//lib/vcr/request_matcher_registry.rb#39 + def call(request_1, request_2); end + + # source://vcr//lib/vcr/request_matcher_registry.rb#20 + def partial_uri_from(request); end + + # source://vcr//lib/vcr/request_matcher_registry.rb#43 + def to_proc; end +end + +# The response of an {HTTPInteraction}. +# +# @attr status [ResponseStatus] the status of the response +# @attr headers [Hash{String => Array}] the response headers +# @attr body [String] the response body +# @attr http_version [nil, String] the HTTP version +# @attr adapter_metadata [Hash] Additional metadata used by a specific VCR adapter. +# +# source://vcr//lib/vcr/structs.rb#331 +class VCR::Response < ::Struct + include ::VCR::Normalizers::Header + include ::VCR::Normalizers::Body + extend ::VCR::Normalizers::Body::ClassMethods + + # @return [Response] a new instance of Response + # + # source://vcr//lib/vcr/structs.rb#335 + def initialize(*args); end + + # Checks if the type of encoding is one of "gzip" or "deflate". + # + # @return [Boolean] + # + # source://vcr//lib/vcr/structs.rb#382 + def compressed?; end + + # The type of encoding. + # + # @return [String] encoding type + # + # source://vcr//lib/vcr/structs.rb#377 + def content_encoding; end + + # Decodes the compressed body and deletes evidence that it was ever compressed. + # + # @raise [VCR::Errors::UnknownContentEncodingError] if the content encoding + # is not a known encoding. + # @return self + # + # source://vcr//lib/vcr/structs.rb#396 + def decompress; end + + # Recompresses the decompressed body according to adapter metadata. + # + # @raise [VCR::Errors::UnknownContentEncodingError] if the content encoding + # stored in the adapter metadata is unknown + # + # source://vcr//lib/vcr/structs.rb#410 + def recompress; end + + # Builds a serializable hash from the response data. + # + # @return [Hash] hash that represents this response + # and can be easily serialized. + # @see Response.from_hash + # + # source://vcr//lib/vcr/structs.rb#345 + def to_hash; end + + # Updates the Content-Length response header so that it is + # accurate for the response body. + # + # source://vcr//lib/vcr/structs.rb#370 + def update_content_length_header; end + + # Checks if VCR decompressed the response body + # + # @return [Boolean] + # + # source://vcr//lib/vcr/structs.rb#387 + def vcr_decompressed?; end + + class << self + # Decode string compressed with gzip or deflate + # + # @raise [VCR::Errors::UnknownContentEncodingError] if the content encoding + # is not a known encoding. + # + # source://vcr//lib/vcr/structs.rb#449 + def decompress(body, type); end + + # Constructs a new instance from a hash. + # + # @param hash [Hash] the hash to use to construct the instance. + # @return [Response] the response + # + # source://vcr//lib/vcr/structs.rb#360 + def from_hash(hash); end + end +end + +# source://vcr//lib/vcr/structs.rb#440 +VCR::Response::HAVE_ZLIB = T.let(T.unsafe(nil), TrueClass) + +# The response status of an {HTTPInteraction}. +# +# @attr code [Integer] the HTTP status code +# @attr message [String] the HTTP status message (e.g. "OK" for a status of 200) +# +# source://vcr//lib/vcr/structs.rb#480 +class VCR::ResponseStatus < ::Struct + # Builds a serializable hash from the response status data. + # + # @return [Hash] hash that represents this response status + # and can be easily serialized. + # @see ResponseStatus.from_hash + # + # source://vcr//lib/vcr/structs.rb#481 + def to_hash; end + + class << self + # Constructs a new instance from a hash. + # + # @param hash [Hash] the hash to use to construct the instance. + # @return [ResponseStatus] the response status + # + # source://vcr//lib/vcr/structs.rb#491 + def from_hash(hash); end + end +end + +# @private +# +# source://vcr//lib/vcr/util/variable_args_block_caller.rb#3 +module VCR::VariableArgsBlockCaller + # source://vcr//lib/vcr/util/variable_args_block_caller.rb#4 + def call_block(block, *args); end +end + +# @private +# +# source://vcr//lib/vcr/util/version_checker.rb#3 +class VCR::VersionChecker + # @return [VersionChecker] a new instance of VersionChecker + # + # source://vcr//lib/vcr/util/version_checker.rb#4 + def initialize(library_name, library_version, min_version); end + + # source://vcr//lib/vcr/util/version_checker.rb#13 + def check_version!; end + + private + + # source://vcr//lib/vcr/util/version_checker.rb#29 + def compare_version; end + + # source://vcr//lib/vcr/util/version_checker.rb#43 + def parse_version(version); end + + # @raise [Errors::LibraryVersionTooLowError] + # + # source://vcr//lib/vcr/util/version_checker.rb#23 + def raise_too_low_error; end + + # @return [Boolean] + # + # source://vcr//lib/vcr/util/version_checker.rb#19 + def too_low?; end + + # source://vcr//lib/vcr/util/version_checker.rb#39 + def version_requirement; end +end diff --git a/sorbet/rbi/shims/opentelemetry-sdk.rbi b/sorbet/rbi/shims/opentelemetry-sdk.rbi index 898a2389f5a..407c7353669 100644 --- a/sorbet/rbi/shims/opentelemetry-sdk.rbi +++ b/sorbet/rbi/shims/opentelemetry-sdk.rbi @@ -20,6 +20,9 @@ module OpenTelemetry sig { params(instrumentation_name: String).void } def use(instrumentation_name); end + + sig { void } + def use_all; end end end diff --git a/updater/Gemfile b/updater/Gemfile index 38d5bde63b8..fd87ae9d9c8 100644 --- a/updater/Gemfile +++ b/updater/Gemfile @@ -6,6 +6,7 @@ gem "dependabot-bundler", path: "../bundler" gem "dependabot-cargo", path: "../cargo" gem "dependabot-common", path: "../common" gem "dependabot-composer", path: "../composer" +gem "dependabot-devcontainers", path: "../devcontainers" gem "dependabot-docker", path: "../docker" gem "dependabot-elm", path: "../elm" gem "dependabot-github_actions", path: "../github_actions" @@ -24,9 +25,10 @@ gem "dependabot-terraform", path: "../terraform" gem "http", "~> 5.1" gem "octokit", "6.1.1" gem "opentelemetry-exporter-otlp", "~> 0.26" -gem "opentelemetry-instrumentation-excon", "~> 0.21" +gem "opentelemetry-instrumentation-excon", "~> 0.22" gem "opentelemetry-instrumentation-faraday", "~> 0.23" gem "opentelemetry-instrumentation-http", "~> 0.23" +gem "opentelemetry-instrumentation-net_http", "~> 0.22" gem "opentelemetry-sdk", "~> 1.3" gem "sentry-raven", "~> 3.1" gem "terminal-table", "~> 3.0.2" diff --git a/updater/Gemfile.lock b/updater/Gemfile.lock index d037e1a5909..0afc2655619 100644 --- a/updater/Gemfile.lock +++ b/updater/Gemfile.lock @@ -1,25 +1,25 @@ PATH remote: ../bundler specs: - dependabot-bundler (0.241.0) - dependabot-common (= 0.241.0) + dependabot-bundler (0.242.0) + dependabot-common (= 0.242.0) PATH remote: ../cargo specs: - dependabot-cargo (0.241.0) - dependabot-common (= 0.241.0) + dependabot-cargo (0.242.0) + dependabot-common (= 0.242.0) PATH remote: ../common specs: - dependabot-common (0.241.0) + dependabot-common (0.242.0) aws-sdk-codecommit (~> 1.28) aws-sdk-ecr (~> 1.5) bundler (>= 1.16, < 3.0.0) commonmarker (>= 0.20.1, < 0.24.0) docker_registry2 (~> 1.18.0) - excon (~> 0.96, < 0.105) + excon (~> 0.109) faraday (= 2.7.11) faraday-retry (= 2.2.0) gitlab (= 4.19.0) @@ -35,95 +35,101 @@ PATH PATH remote: ../composer specs: - dependabot-composer (0.241.0) - dependabot-common (= 0.241.0) + dependabot-composer (0.242.0) + dependabot-common (= 0.242.0) + +PATH + remote: ../devcontainers + specs: + dependabot-devcontainers (0.242.0) + dependabot-common (= 0.242.0) PATH remote: ../docker specs: - dependabot-docker (0.241.0) - dependabot-common (= 0.241.0) + dependabot-docker (0.242.0) + dependabot-common (= 0.242.0) PATH remote: ../elm specs: - dependabot-elm (0.241.0) - dependabot-common (= 0.241.0) + dependabot-elm (0.242.0) + dependabot-common (= 0.242.0) PATH remote: ../git_submodules specs: - dependabot-git_submodules (0.241.0) - dependabot-common (= 0.241.0) + dependabot-git_submodules (0.242.0) + dependabot-common (= 0.242.0) parseconfig (~> 1.0, < 1.1.0) PATH remote: ../github_actions specs: - dependabot-github_actions (0.241.0) - dependabot-common (= 0.241.0) + dependabot-github_actions (0.242.0) + dependabot-common (= 0.242.0) PATH remote: ../go_modules specs: - dependabot-go_modules (0.241.0) - dependabot-common (= 0.241.0) + dependabot-go_modules (0.242.0) + dependabot-common (= 0.242.0) PATH remote: ../gradle specs: - dependabot-gradle (0.241.0) - dependabot-common (= 0.241.0) - dependabot-maven (= 0.241.0) + dependabot-gradle (0.242.0) + dependabot-common (= 0.242.0) + dependabot-maven (= 0.242.0) PATH remote: ../hex specs: - dependabot-hex (0.241.0) - dependabot-common (= 0.241.0) + dependabot-hex (0.242.0) + dependabot-common (= 0.242.0) PATH remote: ../maven specs: - dependabot-maven (0.241.0) - dependabot-common (= 0.241.0) + dependabot-maven (0.242.0) + dependabot-common (= 0.242.0) PATH remote: ../npm_and_yarn specs: - dependabot-npm_and_yarn (0.241.0) - dependabot-common (= 0.241.0) + dependabot-npm_and_yarn (0.242.0) + dependabot-common (= 0.242.0) PATH remote: ../nuget specs: - dependabot-nuget (0.241.0) - dependabot-common (= 0.241.0) + dependabot-nuget (0.242.0) + dependabot-common (= 0.242.0) rubyzip (>= 2.3.2, < 3.0) PATH remote: ../pub specs: - dependabot-pub (0.241.0) - dependabot-common (= 0.241.0) + dependabot-pub (0.242.0) + dependabot-common (= 0.242.0) PATH remote: ../python specs: - dependabot-python (0.241.0) - dependabot-common (= 0.241.0) + dependabot-python (0.242.0) + dependabot-common (= 0.242.0) PATH remote: ../swift specs: - dependabot-swift (0.241.0) - dependabot-common (= 0.241.0) + dependabot-swift (0.242.0) + dependabot-common (= 0.242.0) PATH remote: ../terraform specs: - dependabot-terraform (0.241.0) - dependabot-common (= 0.241.0) + dependabot-terraform (0.242.0) + dependabot-common (= 0.242.0) GEM remote: https://rubygems.org/ @@ -159,7 +165,7 @@ GEM rest-client (>= 1.8.0) domain_name (0.5.20190701) unf (>= 0.0.5, < 1.0.0) - excon (0.104.0) + excon (0.109.0) faraday (2.7.11) base64 faraday-net_http (>= 2.0, < 3.1) @@ -224,20 +230,24 @@ GEM opentelemetry-common (~> 0.20) opentelemetry-sdk (~> 1.2) opentelemetry-semantic_conventions - opentelemetry-instrumentation-base (0.22.2) + opentelemetry-instrumentation-base (0.22.3) opentelemetry-api (~> 1.0) opentelemetry-registry (~> 0.1) - opentelemetry-instrumentation-excon (0.21.2) + opentelemetry-instrumentation-excon (0.22.0) opentelemetry-api (~> 1.0) opentelemetry-common (~> 0.20.0) opentelemetry-instrumentation-base (~> 0.22.1) - opentelemetry-instrumentation-faraday (0.23.3) + opentelemetry-instrumentation-faraday (0.23.4) opentelemetry-api (~> 1.0) opentelemetry-common (~> 0.20.0) opentelemetry-instrumentation-base (~> 0.22.1) - opentelemetry-instrumentation-http (0.23.1) + opentelemetry-instrumentation-http (0.23.2) opentelemetry-api (~> 1.0) opentelemetry-instrumentation-base (~> 0.22.1) + opentelemetry-instrumentation-net_http (0.22.4) + opentelemetry-api (~> 1.0) + opentelemetry-common (~> 0.20.0) + opentelemetry-instrumentation-base (~> 0.22.1) opentelemetry-registry (0.3.0) opentelemetry-api (~> 1.1) opentelemetry-sdk (1.3.1) @@ -343,6 +353,7 @@ DEPENDENCIES dependabot-cargo! dependabot-common! dependabot-composer! + dependabot-devcontainers! dependabot-docker! dependabot-elm! dependabot-git_submodules! @@ -361,9 +372,10 @@ DEPENDENCIES http (~> 5.1) octokit (= 6.1.1) opentelemetry-exporter-otlp (~> 0.26) - opentelemetry-instrumentation-excon (~> 0.21) + opentelemetry-instrumentation-excon (~> 0.22) opentelemetry-instrumentation-faraday (~> 0.23) opentelemetry-instrumentation-http (~> 0.23) + opentelemetry-instrumentation-net_http (~> 0.22) opentelemetry-sdk (~> 1.3) rake (~> 13) rspec (~> 3.12) diff --git a/updater/lib/dependabot/opentelemetry.rb b/updater/lib/dependabot/opentelemetry.rb index 9de4f69aa63..9fbc07f7ed8 100644 --- a/updater/lib/dependabot/opentelemetry.rb +++ b/updater/lib/dependabot/opentelemetry.rb @@ -30,15 +30,25 @@ def self.configure puts "OpenTelemetry is enabled, configuring..." require "opentelemetry/exporter/otlp" + + # OpenTelemetry instrumentation expects the related gem to be loaded. + # While most are already loaded by this point in initialization, some are not. + # We explicitly load them here to ensure that the instrumentation is enabled. + require "excon" require "opentelemetry/instrumentation/excon" + require "faraday" require "opentelemetry/instrumentation/faraday" + require "http" require "opentelemetry/instrumentation/http" + require "net/http" + require "opentelemetry/instrumentation/net/http" ::OpenTelemetry::SDK.configure do |config| config.service_name = "dependabot" config.use "OpenTelemetry::Instrumentation::Excon" config.use "OpenTelemetry::Instrumentation::Faraday" - config.use "OpenTelemetry::Instrumentation::Http" + config.use "OpenTelemetry::Instrumentation::HTTP" + config.use "OpenTelemetry::Instrumentation::Net::HTTP" end tracer diff --git a/updater/lib/dependabot/setup.rb b/updater/lib/dependabot/setup.rb index 61dfffae3d2..8b190169822 100644 --- a/updater/lib/dependabot/setup.rb +++ b/updater/lib/dependabot/setup.rb @@ -36,7 +36,8 @@ npm_and_yarn| bundler| pub| - swift + swift| + devcontainers )}x config.processors += [ExceptionSanitizer] @@ -63,3 +64,4 @@ require "dependabot/bundler" require "dependabot/pub" require "dependabot/swift" +require "dependabot/devcontainers"