diff --git a/gems/yard/0.9/EXTERNAL_TODO.rbs b/gems/yard/0.9/EXTERNAL_TODO.rbs index 05f66d5e..33302123 100644 --- a/gems/yard/0.9/EXTERNAL_TODO.rbs +++ b/gems/yard/0.9/EXTERNAL_TODO.rbs @@ -1,5 +1,5 @@ # !!! GENERATED FILE !!! -# Please see generators/yard-generator/README.md +# Please see yard/0.9/_generators/README.md # It is a temporary definition of a type definition # for which the library RBS does not currently exist. diff --git a/gems/yard/_generators/Gemfile b/gems/yard/0.9/_generators/Gemfile similarity index 100% rename from gems/yard/_generators/Gemfile rename to gems/yard/0.9/_generators/Gemfile diff --git a/gems/yard/_generators/Gemfile.lock b/gems/yard/0.9/_generators/Gemfile.lock similarity index 74% rename from gems/yard/_generators/Gemfile.lock rename to gems/yard/0.9/_generators/Gemfile.lock index 88b8a049..ae61cd8f 100644 --- a/gems/yard/_generators/Gemfile.lock +++ b/gems/yard/0.9/_generators/Gemfile.lock @@ -1,19 +1,21 @@ GEM remote: https://rubygems.org/ specs: - orthoses (1.12.0) + abbrev (0.1.2) + orthoses (1.13.0) rbs (~> 3.0) orthoses-yard (0.6.0) orthoses (>= 1.5.0, < 2.0) yard - rack (3.0.8) + rack (3.0.10) rackup (2.1.0) rack (>= 3) webrick (~> 1.8) - rake (13.0.6) - rbs (3.2.2) + rake (13.2.0) + rbs (3.4.4) + abbrev webrick (1.8.1) - yard (0.9.34) + yard (0.9.36) PLATFORMS arm64-darwin-21 diff --git a/gems/yard/_generators/README.md b/gems/yard/0.9/_generators/README.md similarity index 100% rename from gems/yard/_generators/README.md rename to gems/yard/0.9/_generators/README.md diff --git a/gems/yard/0.9/_generators/Rakefile b/gems/yard/0.9/_generators/Rakefile new file mode 100644 index 00000000..43a3d4fb --- /dev/null +++ b/gems/yard/0.9/_generators/Rakefile @@ -0,0 +1,24 @@ +task :generate do + load 'generate.rb' +end + +task :validate do + sh "bundle exec rbs --no-collection -r logger -r optparse -r ripper -I out validate" +end + +task :replace do + rm_rf '../_test' + sh 'cp -a out/_test ../_test' + rm_rf '../yard' + sh 'cp -a out/yard ../yard' + sh 'cp -a out/EXTERNAL_TODO.rbs ../EXTERNAL_TODO.rbs' + sh 'cp -a out/manifest.yaml ../manifest.yaml' + sh 'cp -a out/symbol_hash.rbs ../symbol_hash.rbs' + sh 'cp -a out/yard.rbs ../yard.rbs' +end + +task :clean do + rm_rf 'out' +end + +task default: [:generate, :validate, :replace, :clean] diff --git a/gems/yard/_generators/generate.rb b/gems/yard/0.9/_generators/generate.rb similarity index 82% rename from gems/yard/_generators/generate.rb rename to gems/yard/0.9/_generators/generate.rb index 98d4ba8f..7d8b67a0 100644 --- a/gems/yard/_generators/generate.rb +++ b/gems/yard/0.9/_generators/generate.rb @@ -13,7 +13,7 @@ Orthoses.logger.level = :warn gem_path = Gem::Specification.find_by_name("yard").load_paths.first -notice = "# !!! GENERATED FILE !!!\n# Please see generators/yard-generator/README.md\n" +notice = "# !!! GENERATED FILE !!!\n# Please see yard/0.9/_generators/README.md\n" Orthoses::Builder.new do use Orthoses::CreateFileByName, @@ -59,15 +59,7 @@ def erb(template_filename, **vars) out = Pathname(output_dir) out.join("EXTERNAL_TODO.rbs").write(erb("EXTERNAL_TODO.rbs", notice: notice)) out.join("manifest.yaml").write(erb("manifest.yaml", notice: notice, stdlib_dependencies: stdlib_dependencies)) -out.join('_scripts').tap do |scripts| - scripts.mkpath - scripts.join("test").tap do |test| - test.write(erb("_scripts/test", notice: notice, stdlib_dependencies: stdlib_dependencies)) - test.chmod(0o755) - end -end out.join('_test').tap do |test| test.mkpath test.join("yard.rb").write(erb("_test/yard.rb", notice: notice)) - test.join('Steepfile').write(erb("_test/Steepfile", notice: notice, stdlib_dependencies: stdlib_dependencies)) end diff --git a/gems/yard/_generators/known_sig/symbol_hash.rbs b/gems/yard/0.9/_generators/known_sig/symbol_hash.rbs similarity index 100% rename from gems/yard/_generators/known_sig/symbol_hash.rbs rename to gems/yard/0.9/_generators/known_sig/symbol_hash.rbs diff --git a/gems/yard/_generators/known_sig/tags.rbs b/gems/yard/0.9/_generators/known_sig/tags.rbs similarity index 100% rename from gems/yard/_generators/known_sig/tags.rbs rename to gems/yard/0.9/_generators/known_sig/tags.rbs diff --git a/gems/yard/_generators/rbs_collection.lock.yaml b/gems/yard/0.9/_generators/rbs_collection.lock.yaml similarity index 73% rename from gems/yard/_generators/rbs_collection.lock.yaml rename to gems/yard/0.9/_generators/rbs_collection.lock.yaml index 3e88d308..0f726377 100644 --- a/gems/yard/_generators/rbs_collection.lock.yaml +++ b/gems/yard/0.9/_generators/rbs_collection.lock.yaml @@ -1,10 +1,4 @@ --- -sources: -- type: git - name: ruby/gem_rbs_collection - revision: c69c46f012a6a0263006eef0f84ca59ac0c5043e - remote: https://github.com/ruby/gem_rbs_collection.git - repo_dir: gems path: ".gem_rbs_collection" gems: - name: abbrev @@ -15,6 +9,10 @@ gems: version: '0' source: type: stdlib +- name: fileutils + version: '0' + source: + type: stdlib - name: json version: '0' source: @@ -32,7 +30,7 @@ gems: source: type: stdlib - name: orthoses - version: 1.12.0 + version: 1.13.0 source: type: rubygems - name: orthoses-yard @@ -48,11 +46,19 @@ gems: source: type: git name: ruby/gem_rbs_collection - revision: c69c46f012a6a0263006eef0f84ca59ac0c5043e + revision: 823e015090cd291d53c4f9d9d7e76b931a6cc75d + remote: https://github.com/ruby/gem_rbs_collection.git + repo_dir: gems +- name: rake + version: '13.0' + source: + type: git + name: ruby/gem_rbs_collection + revision: 823e015090cd291d53c4f9d9d7e76b931a6cc75d remote: https://github.com/ruby/gem_rbs_collection.git repo_dir: gems - name: rbs - version: 3.2.2 + version: 3.4.4 source: type: rubygems - name: rdoc diff --git a/gems/yard/_generators/rbs_collection.yaml b/gems/yard/0.9/_generators/rbs_collection.yaml similarity index 100% rename from gems/yard/_generators/rbs_collection.yaml rename to gems/yard/0.9/_generators/rbs_collection.yaml diff --git a/gems/yard/_generators/templates/EXTERNAL_TODO.rbs.erb b/gems/yard/0.9/_generators/templates/EXTERNAL_TODO.rbs.erb similarity index 100% rename from gems/yard/_generators/templates/EXTERNAL_TODO.rbs.erb rename to gems/yard/0.9/_generators/templates/EXTERNAL_TODO.rbs.erb diff --git a/gems/yard/_generators/templates/_test/yard.rb.erb b/gems/yard/0.9/_generators/templates/_test/yard.rb.erb similarity index 100% rename from gems/yard/_generators/templates/_test/yard.rb.erb rename to gems/yard/0.9/_generators/templates/_test/yard.rb.erb diff --git a/gems/yard/_generators/templates/manifest.yaml.erb b/gems/yard/0.9/_generators/templates/manifest.yaml.erb similarity index 100% rename from gems/yard/_generators/templates/manifest.yaml.erb rename to gems/yard/0.9/_generators/templates/manifest.yaml.erb diff --git a/gems/yard/0.9/_test/yard.rb b/gems/yard/0.9/_test/yard.rb index 33f315e5..2cb936b7 100644 --- a/gems/yard/0.9/_test/yard.rb +++ b/gems/yard/0.9/_test/yard.rb @@ -1,5 +1,5 @@ # !!! GENERATED FILE !!! -# Please see generators/yard-generator/README.md +# Please see yard/0.9/_generators/README.md require 'yard' diff --git a/gems/yard/0.9/manifest.yaml b/gems/yard/0.9/manifest.yaml index b1340355..98f3395f 100644 --- a/gems/yard/0.9/manifest.yaml +++ b/gems/yard/0.9/manifest.yaml @@ -1,5 +1,5 @@ # !!! GENERATED FILE !!! -# Please see generators/yard-generator/README.md +# Please see yard/0.9/_generators/README.md dependencies: - name: optparse diff --git a/gems/yard/0.9/symbol_hash.rbs b/gems/yard/0.9/symbol_hash.rbs index d0c928ab..d19d8e5e 100644 --- a/gems/yard/0.9/symbol_hash.rbs +++ b/gems/yard/0.9/symbol_hash.rbs @@ -1,5 +1,5 @@ # !!! GENERATED FILE !!! -# Please see generators/yard-generator/README.md +# Please see yard/0.9/_generators/README.md # A subclass of Hash where all keys are converted into Symbols, and # optionally, all String values are converted into Symbols. diff --git a/gems/yard/0.9/yard.rbs b/gems/yard/0.9/yard.rbs index ef99d471..347f9a2c 100644 --- a/gems/yard/0.9/yard.rbs +++ b/gems/yard/0.9/yard.rbs @@ -1,5 +1,5 @@ # !!! GENERATED FILE !!! -# Please see generators/yard-generator/README.md +# Please see yard/0.9/_generators/README.md # # Gem::YARDoc provides methods to generate YARDoc and yri data for installed gems diff --git a/gems/yard/0.9/yard/cli.rbs b/gems/yard/0.9/yard/cli.rbs index b1354081..bc68b06e 100644 --- a/gems/yard/0.9/yard/cli.rbs +++ b/gems/yard/0.9/yard/cli.rbs @@ -1,5 +1,5 @@ # !!! GENERATED FILE !!! -# Please see generators/yard-generator/README.md +# Please see yard/0.9/_generators/README.md # Namespace for command-line interface components module YARD::CLI diff --git a/gems/yard/0.9/yard/code_objects.rbs b/gems/yard/0.9/yard/code_objects.rbs index 2532493b..917c1d3f 100644 --- a/gems/yard/0.9/yard/code_objects.rbs +++ b/gems/yard/0.9/yard/code_objects.rbs @@ -1,5 +1,5 @@ # !!! GENERATED FILE !!! -# Please see generators/yard-generator/README.md +# Please see yard/0.9/_generators/README.md # A "code object" is defined as any entity in the Ruby language. # Classes, modules, methods, class variables and constants are the @@ -237,7 +237,8 @@ class YARD::CodeObjects::Base # definitions with docstrings first. # # @return [String] a filename - def file: () -> String + # @return [nil] if there is no file associated with the object + def file: () -> String? # Returns the line the object was first parsed at (or nil) # # @return [Fixnum] the line where the object was first defined. diff --git a/gems/yard/0.9/yard/config.rbs b/gems/yard/0.9/yard/config.rbs index 91518afc..ccfe2a60 100644 --- a/gems/yard/0.9/yard/config.rbs +++ b/gems/yard/0.9/yard/config.rbs @@ -1,5 +1,5 @@ # !!! GENERATED FILE !!! -# Please see generators/yard-generator/README.md +# Please see yard/0.9/_generators/README.md # This class maintains all system-wide configuration for YARD and handles # the loading of plugins. To access options call {options}, and to load diff --git a/gems/yard/0.9/yard/docstring.rbs b/gems/yard/0.9/yard/docstring.rbs index 6fe7eb0c..11cda5af 100644 --- a/gems/yard/0.9/yard/docstring.rbs +++ b/gems/yard/0.9/yard/docstring.rbs @@ -1,5 +1,5 @@ # !!! GENERATED FILE !!! -# Please see generators/yard-generator/README.md +# Please see yard/0.9/_generators/README.md # A documentation string, or "docstring" for short, encapsulates the # comments and metadata, or "tags", of an object. Meta-data is expressed diff --git a/gems/yard/0.9/yard/docstring_parser.rbs b/gems/yard/0.9/yard/docstring_parser.rbs index 4c8b6988..c253106a 100644 --- a/gems/yard/0.9/yard/docstring_parser.rbs +++ b/gems/yard/0.9/yard/docstring_parser.rbs @@ -1,5 +1,5 @@ # !!! GENERATED FILE !!! -# Please see generators/yard-generator/README.md +# Please see yard/0.9/_generators/README.md # Parses text and creates a {Docstring} object to represent documentation # for a {CodeObjects::Base}. To create a new docstring, you should initialize diff --git a/gems/yard/0.9/yard/gem_index.rbs b/gems/yard/0.9/yard/gem_index.rbs index a0dadbc0..8a0b7e84 100644 --- a/gems/yard/0.9/yard/gem_index.rbs +++ b/gems/yard/0.9/yard/gem_index.rbs @@ -1,5 +1,5 @@ # !!! GENERATED FILE !!! -# Please see generators/yard-generator/README.md +# Please see yard/0.9/_generators/README.md module YARD::GemIndex private def find_all_by_name: (*untyped args) -> untyped diff --git a/gems/yard/0.9/yard/handlers.rbs b/gems/yard/0.9/yard/handlers.rbs index a6ac32f0..cea7ecd9 100644 --- a/gems/yard/0.9/yard/handlers.rbs +++ b/gems/yard/0.9/yard/handlers.rbs @@ -1,5 +1,5 @@ # !!! GENERATED FILE !!! -# Please see generators/yard-generator/README.md +# Please see yard/0.9/_generators/README.md # Handlers are called during the data processing part of YARD's # parsing phase. This allows YARD as well as any custom extension to diff --git a/gems/yard/0.9/yard/i18n.rbs b/gems/yard/0.9/yard/i18n.rbs index 0b3733ed..ccbdfae6 100644 --- a/gems/yard/0.9/yard/i18n.rbs +++ b/gems/yard/0.9/yard/i18n.rbs @@ -1,5 +1,5 @@ # !!! GENERATED FILE !!! -# Please see generators/yard-generator/README.md +# Please see yard/0.9/_generators/README.md # Namespace for internationalization (i18n) # @since 0.8.0 diff --git a/gems/yard/0.9/yard/logger.rbs b/gems/yard/0.9/yard/logger.rbs index b3b73c74..31e9f652 100644 --- a/gems/yard/0.9/yard/logger.rbs +++ b/gems/yard/0.9/yard/logger.rbs @@ -1,5 +1,5 @@ # !!! GENERATED FILE !!! -# Please see generators/yard-generator/README.md +# Please see yard/0.9/_generators/README.md # Handles console logging for info, warnings and errors. # Uses the stdlib Logger class in Ruby for all the backend logic. diff --git a/gems/yard/0.9/yard/options.rbs b/gems/yard/0.9/yard/options.rbs index a72b74ed..1bbe539b 100644 --- a/gems/yard/0.9/yard/options.rbs +++ b/gems/yard/0.9/yard/options.rbs @@ -1,5 +1,5 @@ # !!! GENERATED FILE !!! -# Please see generators/yard-generator/README.md +# Please see yard/0.9/_generators/README.md # Generalized options class for passing around large amounts of options between objects. # diff --git a/gems/yard/0.9/yard/parser.rbs b/gems/yard/0.9/yard/parser.rbs index 155027f3..7260401b 100644 --- a/gems/yard/0.9/yard/parser.rbs +++ b/gems/yard/0.9/yard/parser.rbs @@ -1,5 +1,5 @@ # !!! GENERATED FILE !!! -# Please see generators/yard-generator/README.md +# Please see yard/0.9/_generators/README.md # The parser namespace holds all parsing engines used by YARD. # Currently only Ruby and C (Ruby) parsers are implemented. @@ -291,7 +291,7 @@ class YARD::Parser::Ruby::AstNode < ::Array[untyped] # @yield each descendant node in order # @yieldparam [AstNode] self, or a child/descendant node # @return [void] - def traverse: () { (YARD::Parser::Ruby::AstNode self) -> untyped } -> void + def traverse: () { (YARD::Parser::Ruby::AstNode `self,`) -> untyped } -> void # @return [Boolean] whether the node is a token def token?: () -> bool # @return [Boolean] whether the node is a reference (variable, @@ -741,7 +741,7 @@ class YARD::Parser::Ruby::MethodDefinitionNode < ::YARD::Parser::Ruby::AstNode def method_name: (?untyped name_only) -> untyped def parameters: (?untyped include_block_param) -> untyped def signature: () -> untyped - def block: (*untyped) -> untyped + def block: (?untyped n) -> untyped private def index_adjust: () -> untyped end diff --git a/gems/yard/0.9/yard/rake.rbs b/gems/yard/0.9/yard/rake.rbs index b3cb3182..e7a2ce1d 100644 --- a/gems/yard/0.9/yard/rake.rbs +++ b/gems/yard/0.9/yard/rake.rbs @@ -1,5 +1,5 @@ # !!! GENERATED FILE !!! -# Please see generators/yard-generator/README.md +# Please see yard/0.9/_generators/README.md # Holds Rake tasks used by YARD module YARD::Rake diff --git a/gems/yard/0.9/yard/registry.rbs b/gems/yard/0.9/yard/registry.rbs index 94b61f0b..5b0ad326 100644 --- a/gems/yard/0.9/yard/registry.rbs +++ b/gems/yard/0.9/yard/registry.rbs @@ -1,5 +1,5 @@ # !!! GENERATED FILE !!! -# Please see generators/yard-generator/README.md +# Please see yard/0.9/_generators/README.md # The +Registry+ is the centralized data store for all {CodeObjects} created # during parsing. The storage is a key value store with the object's path diff --git a/gems/yard/0.9/yard/registry_resolver.rbs b/gems/yard/0.9/yard/registry_resolver.rbs index 5d3a7f7f..c008ce6c 100644 --- a/gems/yard/0.9/yard/registry_resolver.rbs +++ b/gems/yard/0.9/yard/registry_resolver.rbs @@ -1,5 +1,5 @@ # !!! GENERATED FILE !!! -# Please see generators/yard-generator/README.md +# Please see yard/0.9/_generators/README.md # Handles all logic for complex lexical and inherited object resolution. # Used by {Registry.resolve}, so there is no need to use this class diff --git a/gems/yard/0.9/yard/registry_store.rbs b/gems/yard/0.9/yard/registry_store.rbs index baad0bf2..3cc1f8f6 100644 --- a/gems/yard/0.9/yard/registry_store.rbs +++ b/gems/yard/0.9/yard/registry_store.rbs @@ -1,5 +1,5 @@ # !!! GENERATED FILE !!! -# Please see generators/yard-generator/README.md +# Please see yard/0.9/_generators/README.md # The data store for the {Registry}. # diff --git a/gems/yard/0.9/yard/serializers.rbs b/gems/yard/0.9/yard/serializers.rbs index d8fdde2d..7b2ffed9 100644 --- a/gems/yard/0.9/yard/serializers.rbs +++ b/gems/yard/0.9/yard/serializers.rbs @@ -1,5 +1,5 @@ # !!! GENERATED FILE !!! -# Please see generators/yard-generator/README.md +# Please see yard/0.9/_generators/README.md # Namespace for components that serialize to various endpoints module YARD::Serializers diff --git a/gems/yard/0.9/yard/server.rbs b/gems/yard/0.9/yard/server.rbs index 876b190d..43c8abf7 100644 --- a/gems/yard/0.9/yard/server.rbs +++ b/gems/yard/0.9/yard/server.rbs @@ -1,5 +1,5 @@ # !!! GENERATED FILE !!! -# Please see generators/yard-generator/README.md +# Please see yard/0.9/_generators/README.md # Namespace for classes and modules that handle serving documentation over HTTP # diff --git a/gems/yard/0.9/yard/stub_proxy.rbs b/gems/yard/0.9/yard/stub_proxy.rbs index b9fd70a2..da09d420 100644 --- a/gems/yard/0.9/yard/stub_proxy.rbs +++ b/gems/yard/0.9/yard/stub_proxy.rbs @@ -1,5 +1,5 @@ # !!! GENERATED FILE !!! -# Please see generators/yard-generator/README.md +# Please see yard/0.9/_generators/README.md # Stubs marshal dumps and acts a delegate class for an object by path # diff --git a/gems/yard/0.9/yard/tags.rbs b/gems/yard/0.9/yard/tags.rbs index e6972ffd..bb2b03ca 100644 --- a/gems/yard/0.9/yard/tags.rbs +++ b/gems/yard/0.9/yard/tags.rbs @@ -1,5 +1,5 @@ # !!! GENERATED FILE !!! -# Please see generators/yard-generator/README.md +# Please see yard/0.9/_generators/README.md # Namespace for Tag components module YARD::Tags diff --git a/gems/yard/0.9/yard/templates.rbs b/gems/yard/0.9/yard/templates.rbs index e099efd4..bccd6e4d 100644 --- a/gems/yard/0.9/yard/templates.rbs +++ b/gems/yard/0.9/yard/templates.rbs @@ -1,5 +1,5 @@ # !!! GENERATED FILE !!! -# Please see generators/yard-generator/README.md +# Please see yard/0.9/_generators/README.md # Namespace for templating system module YARD::Templates diff --git a/gems/yard/0.9/yard/verifier.rbs b/gems/yard/0.9/yard/verifier.rbs index 483e45f0..866195b6 100644 --- a/gems/yard/0.9/yard/verifier.rbs +++ b/gems/yard/0.9/yard/verifier.rbs @@ -1,5 +1,5 @@ # !!! GENERATED FILE !!! -# Please see generators/yard-generator/README.md +# Please see yard/0.9/_generators/README.md # Similar to a Proc, but runs a set of Ruby expressions using a small # DSL to make tag lookups easier. diff --git a/gems/yard/_generators/Rakefile b/gems/yard/_generators/Rakefile deleted file mode 100644 index 15c1f282..00000000 --- a/gems/yard/_generators/Rakefile +++ /dev/null @@ -1,15 +0,0 @@ -task :generate do - load 'generate.rb' -end - -task :validate do - sh "bundle exec rbs --repo ../../ -r ripper -I out validate --silent" -end - -task :replace do - target = "../0.9" - rm_rf target - mv 'out', target -end - -task default: [:generate, :validate, :replace] diff --git a/gems/yard/_generators/templates/_scripts/test.erb b/gems/yard/_generators/templates/_scripts/test.erb deleted file mode 100755 index da7b9923..00000000 --- a/gems/yard/_generators/templates/_scripts/test.erb +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env bash - -<%= notice %> - -# Exit command with non-zero status code, Output logs of every command executed, Treat unset variables as an error when substituting. -set -eou pipefail -# Internal Field Separator - Linux shell variable -IFS=$'\n\t' - -# Print shell input lines -set -v - -# Set RBS_DIR variable to change directory to execute type checks using `steep check` -RBS_DIR=$(cd $(dirname $0)/..; pwd) -# Set REPO_DIR variable to validate RBS files added to the corresponding folder -REPO_DIR=$(cd $(dirname $0)/../../..; pwd) -# Validate RBS files, using the bundler environment present -bundle exec rbs --repo $REPO_DIR -r yard:0.9 <%= stdlib_dependencies.map { "-r #{_1}" }.join(' ') %> validate --silent - -cd ${RBS_DIR}/_test -# Run type checks -bundle exec steep check - -$(git rev-parse --show-toplevel)/bin/check-untyped-call.rb diff --git a/gems/yard/_generators/templates/_test/Steepfile.erb b/gems/yard/_generators/templates/_test/Steepfile.erb deleted file mode 100644 index 467974e9..00000000 --- a/gems/yard/_generators/templates/_test/Steepfile.erb +++ /dev/null @@ -1,18 +0,0 @@ -<%= notice %> - -D = Steep::Diagnostic - -target :test do - check "." - signature '.' - - repo_path "../../../" - -<% stdlib_dependencies.each do |stdlib| %> - library "<%= stdlib %>" -<% end %> - - library "yard:0.9" - - configure_code_diagnostics(D::Ruby.all_error) -end