Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update yard #542

Merged
merged 4 commits into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gems/yard/0.9/EXTERNAL_TODO.rbs
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -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
Expand Down
File renamed without changes.
24 changes: 24 additions & 0 deletions gems/yard/0.9/_generators/Rakefile
Original file line number Diff line number Diff line change
@@ -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]
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -15,6 +9,10 @@ gems:
version: '0'
source:
type: stdlib
- name: fileutils
version: '0'
source:
type: stdlib
- name: json
version: '0'
source:
Expand All @@ -32,7 +30,7 @@ gems:
source:
type: stdlib
- name: orthoses
version: 1.12.0
version: 1.13.0
source:
type: rubygems
- name: orthoses-yard
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion gems/yard/0.9/_test/yard.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# !!! GENERATED FILE !!!
# Please see generators/yard-generator/README.md
# Please see yard/0.9/_generators/README.md

require 'yard'

Expand Down
2 changes: 1 addition & 1 deletion gems/yard/0.9/manifest.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# !!! GENERATED FILE !!!
# Please see generators/yard-generator/README.md
# Please see yard/0.9/_generators/README.md

dependencies:
- name: optparse
Expand Down
2 changes: 1 addition & 1 deletion gems/yard/0.9/symbol_hash.rbs
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion gems/yard/0.9/yard.rbs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion gems/yard/0.9/yard/cli.rbs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 3 additions & 2 deletions gems/yard/0.9/yard/code_objects.rbs
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion gems/yard/0.9/yard/config.rbs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion gems/yard/0.9/yard/docstring.rbs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion gems/yard/0.9/yard/docstring_parser.rbs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion gems/yard/0.9/yard/gem_index.rbs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion gems/yard/0.9/yard/handlers.rbs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion gems/yard/0.9/yard/i18n.rbs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion gems/yard/0.9/yard/logger.rbs
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion gems/yard/0.9/yard/options.rbs
Original file line number Diff line number Diff line change
@@ -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.
#
Expand Down
6 changes: 3 additions & 3 deletions gems/yard/0.9/yard/parser.rbs
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion gems/yard/0.9/yard/rake.rbs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion gems/yard/0.9/yard/registry.rbs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion gems/yard/0.9/yard/registry_resolver.rbs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion gems/yard/0.9/yard/registry_store.rbs
Original file line number Diff line number Diff line change
@@ -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}.
#
Expand Down
2 changes: 1 addition & 1 deletion gems/yard/0.9/yard/serializers.rbs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion gems/yard/0.9/yard/server.rbs
Original file line number Diff line number Diff line change
@@ -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
#
Expand Down
2 changes: 1 addition & 1 deletion gems/yard/0.9/yard/stub_proxy.rbs
Original file line number Diff line number Diff line change
@@ -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
#
Expand Down
2 changes: 1 addition & 1 deletion gems/yard/0.9/yard/tags.rbs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion gems/yard/0.9/yard/templates.rbs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion gems/yard/0.9/yard/verifier.rbs
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
15 changes: 0 additions & 15 deletions gems/yard/_generators/Rakefile

This file was deleted.

24 changes: 0 additions & 24 deletions gems/yard/_generators/templates/_scripts/test.erb

This file was deleted.

18 changes: 0 additions & 18 deletions gems/yard/_generators/templates/_test/Steepfile.erb

This file was deleted.

Loading