rdoc 6.17.0 → 8.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (169) hide show
  1. checksums.yaml +4 -4
  2. data/CONTRIBUTING.md +193 -0
  3. data/LEGAL.rdoc +6 -0
  4. data/LICENSE.rdoc +4 -0
  5. data/README.md +132 -8
  6. data/RI.md +75 -75
  7. data/doc/markup_reference/markdown.md +659 -0
  8. data/doc/markup_reference/rdoc.rdoc +1169 -0
  9. data/exe/rdoc +2 -2
  10. data/lib/rdoc/code_object/alias.rb +70 -74
  11. data/lib/rdoc/code_object/any_method.rb +308 -293
  12. data/lib/rdoc/code_object/attr.rb +150 -142
  13. data/lib/rdoc/code_object/class_module.rb +802 -715
  14. data/lib/rdoc/code_object/constant.rb +181 -144
  15. data/lib/rdoc/code_object/context/section.rb +140 -130
  16. data/lib/rdoc/code_object/context.rb +925 -941
  17. data/lib/rdoc/code_object/extend.rb +7 -5
  18. data/lib/rdoc/code_object/include.rb +7 -5
  19. data/lib/rdoc/code_object/method_attr.rb +328 -315
  20. data/lib/rdoc/code_object/mixin.rb +97 -92
  21. data/lib/rdoc/code_object/normal_class.rb +77 -78
  22. data/lib/rdoc/code_object/normal_module.rb +61 -59
  23. data/lib/rdoc/code_object/require.rb +23 -39
  24. data/lib/rdoc/code_object/single_class.rb +21 -19
  25. data/lib/rdoc/code_object/top_level.rb +215 -202
  26. data/lib/rdoc/code_object.rb +305 -305
  27. data/lib/rdoc/comment.rb +274 -337
  28. data/lib/rdoc/cross_reference.rb +195 -206
  29. data/lib/rdoc/encoding.rb +105 -103
  30. data/lib/rdoc/erb_partial.rb +13 -11
  31. data/lib/rdoc/erbio.rb +29 -27
  32. data/lib/rdoc/generator/aliki.rb +196 -30
  33. data/lib/rdoc/generator/darkfish.rb +647 -629
  34. data/lib/rdoc/generator/json_index.rb +233 -229
  35. data/lib/rdoc/generator/markup.rb +165 -122
  36. data/lib/rdoc/generator/pot/message_extractor.rb +57 -51
  37. data/lib/rdoc/generator/pot/po.rb +52 -51
  38. data/lib/rdoc/generator/pot/po_entry.rb +138 -132
  39. data/lib/rdoc/generator/pot.rb +85 -81
  40. data/lib/rdoc/generator/ri.rb +23 -19
  41. data/lib/rdoc/generator/template/aliki/DESIGN.md +538 -0
  42. data/lib/rdoc/generator/template/aliki/_aside_toc.rhtml +1 -1
  43. data/lib/rdoc/generator/template/aliki/_footer.rhtml +2 -2
  44. data/lib/rdoc/generator/template/aliki/_head.rhtml +15 -10
  45. data/lib/rdoc/generator/template/aliki/_header.rhtml +29 -44
  46. data/lib/rdoc/generator/template/aliki/_sidebar_extends.rhtml +8 -6
  47. data/lib/rdoc/generator/template/aliki/_sidebar_includes.rhtml +8 -6
  48. data/lib/rdoc/generator/template/aliki/_sidebar_installed.rhtml +1 -1
  49. data/lib/rdoc/generator/template/aliki/_sidebar_pages.rhtml +3 -3
  50. data/lib/rdoc/generator/template/aliki/_sidebar_search.rhtml +3 -3
  51. data/lib/rdoc/generator/template/aliki/_sidebar_sections.rhtml +1 -1
  52. data/lib/rdoc/generator/template/aliki/_sidebar_toggle.rhtml +1 -1
  53. data/lib/rdoc/generator/template/aliki/class.rhtml +71 -61
  54. data/lib/rdoc/generator/template/aliki/css/rdoc.css +796 -323
  55. data/lib/rdoc/generator/template/aliki/index.rhtml +1 -1
  56. data/lib/rdoc/generator/template/aliki/js/aliki.js +119 -113
  57. data/lib/rdoc/generator/template/aliki/js/bash_highlighter.js +167 -0
  58. data/lib/rdoc/generator/template/aliki/js/c_highlighter.js +1 -1
  59. data/lib/rdoc/generator/template/aliki/js/{search.js → search_controller.js} +16 -7
  60. data/lib/rdoc/generator/template/aliki/js/search_navigation.js +105 -0
  61. data/lib/rdoc/generator/template/aliki/js/search_ranker.js +239 -0
  62. data/lib/rdoc/generator/template/aliki/page.rhtml +1 -1
  63. data/lib/rdoc/generator/template/aliki/servlet_not_found.rhtml +1 -1
  64. data/lib/rdoc/generator/template/aliki/servlet_root.rhtml +2 -2
  65. data/lib/rdoc/generator/template/darkfish/_footer.rhtml +1 -1
  66. data/lib/rdoc/generator/template/darkfish/_sidebar_extends.rhtml +8 -6
  67. data/lib/rdoc/generator/template/darkfish/_sidebar_includes.rhtml +8 -6
  68. data/lib/rdoc/generator/template/darkfish/_sidebar_installed.rhtml +1 -1
  69. data/lib/rdoc/generator/template/darkfish/_sidebar_pages.rhtml +2 -2
  70. data/lib/rdoc/generator/template/darkfish/_sidebar_sections.rhtml +1 -1
  71. data/lib/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml +5 -5
  72. data/lib/rdoc/generator/template/darkfish/class.rhtml +29 -32
  73. data/lib/rdoc/generator/template/darkfish/css/rdoc.css +19 -1
  74. data/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml +3 -3
  75. data/lib/rdoc/generator.rb +48 -46
  76. data/lib/rdoc/i18n/locale.rb +99 -95
  77. data/lib/rdoc/i18n/text.rb +109 -105
  78. data/lib/rdoc/i18n.rb +7 -5
  79. data/lib/rdoc/markdown/byte_runtime.rb +80 -0
  80. data/lib/rdoc/markdown.kpeg +52 -33
  81. data/lib/rdoc/markdown.rb +365 -177
  82. data/lib/rdoc/markup/blank_line.rb +25 -23
  83. data/lib/rdoc/markup/block_quote.rb +12 -8
  84. data/lib/rdoc/markup/document.rb +127 -123
  85. data/lib/rdoc/markup/element.rb +21 -0
  86. data/lib/rdoc/markup/formatter.rb +220 -203
  87. data/lib/rdoc/markup/hard_break.rb +30 -27
  88. data/lib/rdoc/markup/heading.rb +163 -77
  89. data/lib/rdoc/markup/include.rb +33 -29
  90. data/lib/rdoc/markup/indented_paragraph.rb +37 -33
  91. data/lib/rdoc/markup/inline_parser.rb +316 -0
  92. data/lib/rdoc/markup/list.rb +80 -88
  93. data/lib/rdoc/markup/list_item.rb +73 -85
  94. data/lib/rdoc/markup/paragraph.rb +23 -19
  95. data/lib/rdoc/markup/parser.rb +501 -497
  96. data/lib/rdoc/markup/pre_process.rb +284 -305
  97. data/lib/rdoc/markup/raw.rb +52 -55
  98. data/lib/rdoc/markup/rule.rb +16 -12
  99. data/lib/rdoc/markup/table.rb +48 -40
  100. data/lib/rdoc/markup/to_ansi.rb +143 -92
  101. data/lib/rdoc/markup/to_bs.rb +86 -102
  102. data/lib/rdoc/markup/to_html.rb +608 -506
  103. data/lib/rdoc/markup/to_html_crossref.rb +219 -210
  104. data/lib/rdoc/markup/to_html_snippet.rb +210 -205
  105. data/lib/rdoc/markup/to_joined_paragraph.rb +40 -41
  106. data/lib/rdoc/markup/to_label.rb +64 -51
  107. data/lib/rdoc/markup/to_markdown.rb +212 -184
  108. data/lib/rdoc/markup/to_rdoc.rb +341 -277
  109. data/lib/rdoc/markup/to_table_of_contents.rb +66 -62
  110. data/lib/rdoc/markup/to_test.rb +62 -50
  111. data/lib/rdoc/markup/to_tt_only.rb +83 -92
  112. data/lib/rdoc/markup/verbatim.rb +62 -58
  113. data/lib/rdoc/markup.rb +196 -215
  114. data/lib/rdoc/options.rb +1063 -1076
  115. data/lib/rdoc/parser/c.rb +1039 -1036
  116. data/lib/rdoc/parser/changelog.rb +320 -287
  117. data/lib/rdoc/parser/markdown.rb +17 -13
  118. data/lib/rdoc/parser/rbs.rb +279 -0
  119. data/lib/rdoc/parser/rd.rb +17 -13
  120. data/lib/rdoc/parser/ruby.rb +1231 -2222
  121. data/lib/rdoc/parser/ruby_colorizer.rb +303 -0
  122. data/lib/rdoc/parser/simple.rb +31 -27
  123. data/lib/rdoc/parser/text.rb +12 -8
  124. data/lib/rdoc/parser.rb +230 -221
  125. data/lib/rdoc/rbs_helper.rb +186 -0
  126. data/lib/rdoc/rd/inline.rb +57 -53
  127. data/lib/rdoc/rd.rb +90 -88
  128. data/lib/rdoc/rdoc.rb +547 -366
  129. data/lib/rdoc/ri/driver.rb +1141 -1130
  130. data/lib/rdoc/ri/formatter.rb +7 -3
  131. data/lib/rdoc/ri/paths.rb +140 -136
  132. data/lib/rdoc/ri/servlet.rb +456 -0
  133. data/lib/rdoc/ri/store.rb +4 -2
  134. data/lib/rdoc/ri/task.rb +55 -51
  135. data/lib/rdoc/ri.rb +14 -11
  136. data/lib/rdoc/rubygems_hook.rb +194 -192
  137. data/lib/rdoc/server.rb +462 -0
  138. data/lib/rdoc/stats/normal.rb +46 -42
  139. data/lib/rdoc/stats/quiet.rb +39 -35
  140. data/lib/rdoc/stats/verbose.rb +35 -31
  141. data/lib/rdoc/stats.rb +363 -338
  142. data/lib/rdoc/store.rb +919 -725
  143. data/lib/rdoc/task.rb +260 -255
  144. data/lib/rdoc/text.rb +164 -240
  145. data/lib/rdoc/token_stream.rb +88 -106
  146. data/lib/rdoc/tom_doc.rb +203 -201
  147. data/lib/rdoc/version.rb +1 -1
  148. data/lib/rdoc.rb +35 -7
  149. data/lib/rubygems_plugin.rb +2 -11
  150. data/rdoc-logo.svg +43 -0
  151. data/rdoc.gemspec +9 -7
  152. metadata +46 -32
  153. data/CONTRIBUTING.rdoc +0 -219
  154. data/ExampleMarkdown.md +0 -39
  155. data/ExampleRDoc.rdoc +0 -210
  156. data/lib/rdoc/code_object/anon_class.rb +0 -10
  157. data/lib/rdoc/code_object/ghost_method.rb +0 -6
  158. data/lib/rdoc/code_object/meta_method.rb +0 -6
  159. data/lib/rdoc/markdown/literals.kpeg +0 -21
  160. data/lib/rdoc/markdown/literals.rb +0 -454
  161. data/lib/rdoc/markup/attr_changer.rb +0 -22
  162. data/lib/rdoc/markup/attr_span.rb +0 -35
  163. data/lib/rdoc/markup/attribute_manager.rb +0 -405
  164. data/lib/rdoc/markup/attributes.rb +0 -70
  165. data/lib/rdoc/markup/regexp_handling.rb +0 -40
  166. data/lib/rdoc/parser/prism_ruby.rb +0 -1100
  167. data/lib/rdoc/parser/ripper_state_lex.rb +0 -302
  168. data/lib/rdoc/parser/ruby_tools.rb +0 -163
  169. data/lib/rdoc/servlet.rb +0 -452
data/lib/rdoc/version.rb CHANGED
@@ -5,6 +5,6 @@ module RDoc
5
5
  ##
6
6
  # RDoc version you are using
7
7
 
8
- VERSION = '6.17.0'
8
+ VERSION = '8.1.0'
9
9
 
10
10
  end
data/lib/rdoc.rb CHANGED
@@ -100,7 +100,14 @@ module RDoc
100
100
  %w[arg args yield yields notnew not-new not_new doc]
101
101
 
102
102
  ##
103
- # Loads the best available YAML library.
103
+ # Loads the YAML backend used for <tt>.rdoc_options</tt>.
104
+ #
105
+ # Psych is preferred and used whenever it can be required. Requiring +yaml+
106
+ # is not attempted as a fallback because +yaml+ is merely a thin wrapper that
107
+ # loads Psych anyway. When Psych is genuinely unavailable, a minimal
108
+ # serializer shipped with RubyGems or Bundler is loaded instead, so that RDoc
109
+ # does not need a runtime dependency on Psych. Callers branch on whether
110
+ # Psych is defined and use ::yaml_serializer otherwise.
104
111
 
105
112
  def self.load_yaml
106
113
  begin
@@ -113,11 +120,25 @@ module RDoc
113
120
  begin
114
121
  require 'psych'
115
122
  rescue ::LoadError
116
- ensure
117
- require 'yaml'
123
+ # Psych is unavailable; load the stub serializer shipped with RubyGems,
124
+ # or Bundler's copy on RubyGems older than 3.5 (Ruby 3.2) where
125
+ # rubygems/yaml_serializer does not exist yet.
126
+ begin
127
+ require 'rubygems/yaml_serializer'
128
+ rescue ::LoadError
129
+ require 'bundler/yaml_serializer'
130
+ end
118
131
  end
119
132
  end
120
133
 
134
+ ##
135
+ # The minimal YAML serializer module loaded by ::load_yaml as a fallback.
136
+ # Only meaningful when Psych is not defined.
137
+
138
+ def self.yaml_serializer
139
+ defined?(Gem::YAMLSerializer) ? Gem::YAMLSerializer : Bundler::YAMLSerializer
140
+ end
141
+
121
142
  ##
122
143
  # Searches and returns the directory for settings.
123
144
  #
@@ -151,6 +172,16 @@ module RDoc
151
172
  end
152
173
  end
153
174
 
175
+ ##
176
+ # Returns +File.mtime(file)+, or +nil+ if the file cannot be stat'd
177
+ # (missing, permission denied, etc.).
178
+
179
+ def self.safe_mtime(file)
180
+ File.mtime(file)
181
+ rescue SystemCallError
182
+ nil
183
+ end
184
+
154
185
  autoload :RDoc, "#{__dir__}/rdoc/rdoc"
155
186
 
156
187
  autoload :CrossReference, "#{__dir__}/rdoc/cross_reference"
@@ -160,7 +191,7 @@ module RDoc
160
191
  autoload :Generator, "#{__dir__}/rdoc/generator"
161
192
  autoload :Options, "#{__dir__}/rdoc/options"
162
193
  autoload :Parser, "#{__dir__}/rdoc/parser"
163
- autoload :Servlet, "#{__dir__}/rdoc/servlet"
194
+ autoload :Server, "#{__dir__}/rdoc/server"
164
195
  autoload :RI, "#{__dir__}/rdoc/ri"
165
196
  autoload :Stats, "#{__dir__}/rdoc/stats"
166
197
  autoload :Store, "#{__dir__}/rdoc/store"
@@ -189,7 +220,6 @@ module RDoc
189
220
  autoload :Context, "#{__dir__}/rdoc/code_object/context"
190
221
  autoload :TopLevel, "#{__dir__}/rdoc/code_object/top_level"
191
222
 
192
- autoload :AnonClass, "#{__dir__}/rdoc/code_object/anon_class"
193
223
  autoload :ClassModule, "#{__dir__}/rdoc/code_object/class_module"
194
224
  autoload :NormalClass, "#{__dir__}/rdoc/code_object/normal_class"
195
225
  autoload :NormalModule, "#{__dir__}/rdoc/code_object/normal_module"
@@ -198,8 +228,6 @@ module RDoc
198
228
  autoload :Alias, "#{__dir__}/rdoc/code_object/alias"
199
229
  autoload :AnyMethod, "#{__dir__}/rdoc/code_object/any_method"
200
230
  autoload :MethodAttr, "#{__dir__}/rdoc/code_object/method_attr"
201
- autoload :GhostMethod, "#{__dir__}/rdoc/code_object/ghost_method"
202
- autoload :MetaMethod, "#{__dir__}/rdoc/code_object/meta_method"
203
231
  autoload :Attr, "#{__dir__}/rdoc/code_object/attr"
204
232
 
205
233
  autoload :Constant, "#{__dir__}/rdoc/code_object/constant"
@@ -10,14 +10,5 @@
10
10
 
11
11
  require_relative 'rdoc/rubygems_hook'
12
12
 
13
- # To install dependency libraries of RDoc, you need to run bundle install.
14
- # At that time, rdoc/markdown is not generated.
15
- # If generate and remove are executed at that time, an error will occur.
16
- # So, we can't register generate and remove to Gem at that time.
17
- begin
18
- require_relative 'rdoc/markdown'
19
- rescue LoadError
20
- else
21
- Gem.done_installing(&RDoc::RubyGemsHook.method(:generate))
22
- Gem.pre_uninstall(&RDoc::RubyGemsHook.method(:remove))
23
- end
13
+ Gem.done_installing(&RDoc::RubyGemsHook.method(:generate))
14
+ Gem.pre_uninstall(&RDoc::RubyGemsHook.method(:remove))
data/rdoc-logo.svg ADDED
@@ -0,0 +1,43 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="168" height="198" viewBox="298 140 712 840" role="img" aria-labelledby="title desc">
2
+ <title id="title">RDoc</title>
3
+ <desc id="desc">A red document outline with a folded corner and a Ruby gem.</desc>
4
+ <style>
5
+ .surface {
6
+ fill: transparent;
7
+ }
8
+
9
+ .stroke {
10
+ stroke: url(#rdoc-red);
11
+ }
12
+
13
+ .solid {
14
+ fill: url(#rdoc-red);
15
+ }
16
+ </style>
17
+ <defs>
18
+ <linearGradient id="rdoc-red" x1="338" y1="178" x2="973" y2="938" gradientUnits="userSpaceOnUse">
19
+ <stop id="rdoc-red-start" offset="0" stop-color="#e62923"/>
20
+ <stop id="rdoc-red-mid" offset="0.56" stop-color="#e62923"/>
21
+ <stop id="rdoc-red-end" offset="1" stop-color="#e62923"/>
22
+ </linearGradient>
23
+ <filter id="soft-red-shadow" x="-10%" y="-10%" width="120%" height="120%">
24
+ <feDropShadow dx="0" dy="5" stdDeviation="5" flood-color="#e62923" flood-opacity="0.1"/>
25
+ </filter>
26
+ </defs>
27
+
28
+ <g filter="url(#soft-red-shadow)" fill="none" class="stroke" stroke-linecap="round" stroke-linejoin="round">
29
+ <path class="surface" d="M382 178h326l149 149v499c0 24-20 44-44 44H382c-24 0-44-20-44-44V222c0-24 20-44 44-44Z" stroke="none"/>
30
+ <path d="M685 870H382c-24 0-44-20-44-44V222c0-24 20-44 44-44h326l149 149v246" stroke-width="26"/>
31
+ <path class="solid" d="M708 178v126c0 24 19 43 43 43h106" stroke="none"/>
32
+ <path d="M708 178 857 327" stroke-width="26"/>
33
+
34
+ <path d="M440 411h216" stroke-width="26"/>
35
+ <path d="M440 506h216" stroke-width="26"/>
36
+ <path d="M440 605h145" stroke-width="26"/>
37
+
38
+ <path class="surface" d="M668 609h224l81 97-195 232-191-232 81-97Z" stroke-width="26"/>
39
+ <path d="M668 609 700 706 778 609 858 706 892 609" stroke-width="20"/>
40
+ <path d="M587 706h386" stroke-width="20"/>
41
+ <path d="M700 706 778 938 858 706" stroke-width="20"/>
42
+ </g>
43
+ </svg>
data/rdoc.gemspec CHANGED
@@ -26,7 +26,7 @@ RDoc produces HTML and command-line documentation for Ruby projects.
26
26
  RDoc includes the +rdoc+ and +ri+ tools for generating and displaying documentation from the command-line.
27
27
  DESCRIPTION
28
28
  s.homepage = "https://ruby.github.io/rdoc"
29
- s.licenses = ["Ruby"]
29
+ s.licenses = ["Ruby", "GPL-2.0-only"]
30
30
 
31
31
  s.metadata["homepage_uri"] = s.homepage
32
32
  s.metadata["source_code_uri"] = "https://github.com/ruby/rdoc"
@@ -38,10 +38,10 @@ RDoc includes the +rdoc+ and +ri+ tools for generating and displaying documentat
38
38
  # for ruby core repository. It was generated by
39
39
  # `git ls-files -z`.split("\x0").each {|f| puts " #{f.dump}," unless f.start_with?(*%W[test/ spec/ features/ .]) }
40
40
  non_lib_files = [
41
- "CONTRIBUTING.rdoc",
41
+ "CONTRIBUTING.md",
42
42
  "CVE-2013-0256.rdoc",
43
- "ExampleMarkdown.md",
44
- "ExampleRDoc.rdoc",
43
+ "doc/markup_reference/markdown.md",
44
+ "doc/markup_reference/rdoc.rdoc",
45
45
  "History.rdoc",
46
46
  "LEGAL.rdoc",
47
47
  "LICENSE.rdoc",
@@ -51,6 +51,7 @@ RDoc includes the +rdoc+ and +ri+ tools for generating and displaying documentat
51
51
  "exe/rdoc",
52
52
  "exe/ri",
53
53
  "man/ri.1",
54
+ "rdoc-logo.svg",
54
55
  "rdoc.gemspec",
55
56
  ]
56
57
  base = __dir__
@@ -60,13 +61,14 @@ RDoc includes the +rdoc+ and +ri+ tools for generating and displaying documentat
60
61
 
61
62
  s.files = (non_lib_files + template_files + lib_files).uniq
62
63
 
63
- s.rdoc_options = ["--main", "README.md"]
64
+ s.rdoc_options = ["--main", "README.md", "--copy-files", "rdoc-logo.svg"]
64
65
  s.extra_rdoc_files += s.files.grep(%r[\A[^\/]+\.(?:rdoc|md)\z])
65
66
 
66
- s.required_ruby_version = Gem::Requirement.new(">= 2.6.0")
67
+ s.required_ruby_version = Gem::Requirement.new(">= 3.2.0")
67
68
  s.required_rubygems_version = Gem::Requirement.new(">= 2.2")
68
69
 
69
- s.add_dependency 'psych', '>= 4.0.0'
70
70
  s.add_dependency 'erb'
71
71
  s.add_dependency 'tsort'
72
+ s.add_dependency 'prism', '>= 1.6.0'
73
+ s.add_dependency 'rbs', '>= 4.0.0'
72
74
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rdoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.17.0
4
+ version: 8.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Hodel
@@ -13,24 +13,24 @@ authors:
13
13
  - ITOYANAGI Sakura
14
14
  bindir: exe
15
15
  cert_chain: []
16
- date: 2025-12-07 00:00:00.000000000 Z
16
+ date: 2026-09-28 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
- name: psych
19
+ name: erb
20
20
  requirement: !ruby/object:Gem::Requirement
21
21
  requirements:
22
22
  - - ">="
23
23
  - !ruby/object:Gem::Version
24
- version: 4.0.0
24
+ version: '0'
25
25
  type: :runtime
26
26
  prerelease: false
27
27
  version_requirements: !ruby/object:Gem::Requirement
28
28
  requirements:
29
29
  - - ">="
30
30
  - !ruby/object:Gem::Version
31
- version: 4.0.0
31
+ version: '0'
32
32
  - !ruby/object:Gem::Dependency
33
- name: erb
33
+ name: tsort
34
34
  requirement: !ruby/object:Gem::Requirement
35
35
  requirements:
36
36
  - - ">="
@@ -44,19 +44,33 @@ dependencies:
44
44
  - !ruby/object:Gem::Version
45
45
  version: '0'
46
46
  - !ruby/object:Gem::Dependency
47
- name: tsort
47
+ name: prism
48
48
  requirement: !ruby/object:Gem::Requirement
49
49
  requirements:
50
50
  - - ">="
51
51
  - !ruby/object:Gem::Version
52
- version: '0'
52
+ version: 1.6.0
53
53
  type: :runtime
54
54
  prerelease: false
55
55
  version_requirements: !ruby/object:Gem::Requirement
56
56
  requirements:
57
57
  - - ">="
58
58
  - !ruby/object:Gem::Version
59
- version: '0'
59
+ version: 1.6.0
60
+ - !ruby/object:Gem::Dependency
61
+ name: rbs
62
+ requirement: !ruby/object:Gem::Requirement
63
+ requirements:
64
+ - - ">="
65
+ - !ruby/object:Gem::Version
66
+ version: 4.0.0
67
+ type: :runtime
68
+ prerelease: false
69
+ version_requirements: !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - ">="
72
+ - !ruby/object:Gem::Version
73
+ version: 4.0.0
60
74
  description: |
61
75
  RDoc produces HTML and command-line documentation for Ruby projects.
62
76
  RDoc includes the +rdoc+ and +ri+ tools for generating and displaying documentation from the command-line.
@@ -73,10 +87,8 @@ executables:
73
87
  - ri
74
88
  extensions: []
75
89
  extra_rdoc_files:
76
- - CONTRIBUTING.rdoc
90
+ - CONTRIBUTING.md
77
91
  - CVE-2013-0256.rdoc
78
- - ExampleMarkdown.md
79
- - ExampleRDoc.rdoc
80
92
  - History.rdoc
81
93
  - LEGAL.rdoc
82
94
  - LICENSE.rdoc
@@ -84,22 +96,21 @@ extra_rdoc_files:
84
96
  - RI.md
85
97
  - TODO.rdoc
86
98
  files:
87
- - CONTRIBUTING.rdoc
99
+ - CONTRIBUTING.md
88
100
  - CVE-2013-0256.rdoc
89
- - ExampleMarkdown.md
90
- - ExampleRDoc.rdoc
91
101
  - History.rdoc
92
102
  - LEGAL.rdoc
93
103
  - LICENSE.rdoc
94
104
  - README.md
95
105
  - RI.md
96
106
  - TODO.rdoc
107
+ - doc/markup_reference/markdown.md
108
+ - doc/markup_reference/rdoc.rdoc
97
109
  - exe/rdoc
98
110
  - exe/ri
99
111
  - lib/rdoc.rb
100
112
  - lib/rdoc/code_object.rb
101
113
  - lib/rdoc/code_object/alias.rb
102
- - lib/rdoc/code_object/anon_class.rb
103
114
  - lib/rdoc/code_object/any_method.rb
104
115
  - lib/rdoc/code_object/attr.rb
105
116
  - lib/rdoc/code_object/class_module.rb
@@ -107,9 +118,7 @@ files:
107
118
  - lib/rdoc/code_object/context.rb
108
119
  - lib/rdoc/code_object/context/section.rb
109
120
  - lib/rdoc/code_object/extend.rb
110
- - lib/rdoc/code_object/ghost_method.rb
111
121
  - lib/rdoc/code_object/include.rb
112
- - lib/rdoc/code_object/meta_method.rb
113
122
  - lib/rdoc/code_object/method_attr.rb
114
123
  - lib/rdoc/code_object/mixin.rb
115
124
  - lib/rdoc/code_object/normal_class.rb
@@ -133,6 +142,7 @@ files:
133
142
  - lib/rdoc/generator/pot/po.rb
134
143
  - lib/rdoc/generator/pot/po_entry.rb
135
144
  - lib/rdoc/generator/ri.rb
145
+ - lib/rdoc/generator/template/aliki/DESIGN.md
136
146
  - lib/rdoc/generator/template/aliki/_aside_toc.rhtml
137
147
  - lib/rdoc/generator/template/aliki/_footer.rhtml
138
148
  - lib/rdoc/generator/template/aliki/_head.rhtml
@@ -152,8 +162,11 @@ files:
152
162
  - lib/rdoc/generator/template/aliki/css/rdoc.css
153
163
  - lib/rdoc/generator/template/aliki/index.rhtml
154
164
  - lib/rdoc/generator/template/aliki/js/aliki.js
165
+ - lib/rdoc/generator/template/aliki/js/bash_highlighter.js
155
166
  - lib/rdoc/generator/template/aliki/js/c_highlighter.js
156
- - lib/rdoc/generator/template/aliki/js/search.js
167
+ - lib/rdoc/generator/template/aliki/js/search_controller.js
168
+ - lib/rdoc/generator/template/aliki/js/search_navigation.js
169
+ - lib/rdoc/generator/template/aliki/js/search_ranker.js
157
170
  - lib/rdoc/generator/template/aliki/js/theme-toggle.js
158
171
  - lib/rdoc/generator/template/aliki/page.rhtml
159
172
  - lib/rdoc/generator/template/aliki/servlet_not_found.rhtml
@@ -221,29 +234,25 @@ files:
221
234
  - lib/rdoc/known_classes.rb
222
235
  - lib/rdoc/markdown.kpeg
223
236
  - lib/rdoc/markdown.rb
237
+ - lib/rdoc/markdown/byte_runtime.rb
224
238
  - lib/rdoc/markdown/entities.rb
225
- - lib/rdoc/markdown/literals.kpeg
226
- - lib/rdoc/markdown/literals.rb
227
239
  - lib/rdoc/markup.rb
228
- - lib/rdoc/markup/attr_changer.rb
229
- - lib/rdoc/markup/attr_span.rb
230
- - lib/rdoc/markup/attribute_manager.rb
231
- - lib/rdoc/markup/attributes.rb
232
240
  - lib/rdoc/markup/blank_line.rb
233
241
  - lib/rdoc/markup/block_quote.rb
234
242
  - lib/rdoc/markup/document.rb
243
+ - lib/rdoc/markup/element.rb
235
244
  - lib/rdoc/markup/formatter.rb
236
245
  - lib/rdoc/markup/hard_break.rb
237
246
  - lib/rdoc/markup/heading.rb
238
247
  - lib/rdoc/markup/include.rb
239
248
  - lib/rdoc/markup/indented_paragraph.rb
249
+ - lib/rdoc/markup/inline_parser.rb
240
250
  - lib/rdoc/markup/list.rb
241
251
  - lib/rdoc/markup/list_item.rb
242
252
  - lib/rdoc/markup/paragraph.rb
243
253
  - lib/rdoc/markup/parser.rb
244
254
  - lib/rdoc/markup/pre_process.rb
245
255
  - lib/rdoc/markup/raw.rb
246
- - lib/rdoc/markup/regexp_handling.rb
247
256
  - lib/rdoc/markup/rule.rb
248
257
  - lib/rdoc/markup/table.rb
249
258
  - lib/rdoc/markup/to_ansi.rb
@@ -264,13 +273,13 @@ files:
264
273
  - lib/rdoc/parser/c.rb
265
274
  - lib/rdoc/parser/changelog.rb
266
275
  - lib/rdoc/parser/markdown.rb
267
- - lib/rdoc/parser/prism_ruby.rb
276
+ - lib/rdoc/parser/rbs.rb
268
277
  - lib/rdoc/parser/rd.rb
269
- - lib/rdoc/parser/ripper_state_lex.rb
270
278
  - lib/rdoc/parser/ruby.rb
271
- - lib/rdoc/parser/ruby_tools.rb
279
+ - lib/rdoc/parser/ruby_colorizer.rb
272
280
  - lib/rdoc/parser/simple.rb
273
281
  - lib/rdoc/parser/text.rb
282
+ - lib/rdoc/rbs_helper.rb
274
283
  - lib/rdoc/rd.rb
275
284
  - lib/rdoc/rd/block_parser.rb
276
285
  - lib/rdoc/rd/block_parser.ry
@@ -282,10 +291,11 @@ files:
282
291
  - lib/rdoc/ri/driver.rb
283
292
  - lib/rdoc/ri/formatter.rb
284
293
  - lib/rdoc/ri/paths.rb
294
+ - lib/rdoc/ri/servlet.rb
285
295
  - lib/rdoc/ri/store.rb
286
296
  - lib/rdoc/ri/task.rb
287
297
  - lib/rdoc/rubygems_hook.rb
288
- - lib/rdoc/servlet.rb
298
+ - lib/rdoc/server.rb
289
299
  - lib/rdoc/stats.rb
290
300
  - lib/rdoc/stats/normal.rb
291
301
  - lib/rdoc/stats/quiet.rb
@@ -298,10 +308,12 @@ files:
298
308
  - lib/rdoc/version.rb
299
309
  - lib/rubygems_plugin.rb
300
310
  - man/ri.1
311
+ - rdoc-logo.svg
301
312
  - rdoc.gemspec
302
313
  homepage: https://ruby.github.io/rdoc
303
314
  licenses:
304
315
  - Ruby
316
+ - GPL-2.0-only
305
317
  metadata:
306
318
  homepage_uri: https://ruby.github.io/rdoc
307
319
  source_code_uri: https://github.com/ruby/rdoc
@@ -309,20 +321,22 @@ metadata:
309
321
  rdoc_options:
310
322
  - "--main"
311
323
  - README.md
324
+ - "--copy-files"
325
+ - rdoc-logo.svg
312
326
  require_paths:
313
327
  - lib
314
328
  required_ruby_version: !ruby/object:Gem::Requirement
315
329
  requirements:
316
330
  - - ">="
317
331
  - !ruby/object:Gem::Version
318
- version: 2.6.0
332
+ version: 3.2.0
319
333
  required_rubygems_version: !ruby/object:Gem::Requirement
320
334
  requirements:
321
335
  - - ">="
322
336
  - !ruby/object:Gem::Version
323
337
  version: '2.2'
324
338
  requirements: []
325
- rubygems_version: 3.6.7
339
+ rubygems_version: 4.0.20
326
340
  specification_version: 4
327
341
  summary: RDoc produces HTML and command-line documentation for Ruby projects
328
342
  test_files: []
data/CONTRIBUTING.rdoc DELETED
@@ -1,219 +0,0 @@
1
- = Developer Introduction
2
-
3
- So you want to write a generator, fix a bug, or otherwise work with RDoc. This
4
- document provides an overview of how RDoc works from parsing options to
5
- generating output. Most of the documentation can be found in the specific
6
- classes for each feature.
7
-
8
- == Bugs
9
-
10
- If you think you found a bug, file a ticket on the {issues
11
- tracker}[https://github.com/ruby/rdoc/issues] on github.
12
-
13
- If your bug involves an error RDoc produced please include a sample file that
14
- illustrates the problem or link to the repository or gem that is associated
15
- with the bug.
16
-
17
- Please include steps to reproduce the issue. Here are some examples of good
18
- issues:
19
-
20
- * https://github.com/ruby/rdoc/issues/55
21
- * https://github.com/ruby/rdoc/issues/61
22
-
23
- == Developer Quick Start
24
-
25
- RDoc uses bundler for development. To get ready to work on RDoc run:
26
-
27
- $ gem install bundler
28
- [...]
29
- $ bundle install
30
- [...]
31
- $ rake
32
- [...]
33
-
34
- This will install all the necessary dependencies for development with rake,
35
- generate documentation and run the tests for the first time.
36
-
37
- If the tests don't pass on the first run check the {GitHub Actions page}[https://github.com/ruby/rdoc/actions] to see if there are any known failures
38
- (there shouldn't be).
39
-
40
- You can now use `rake` and `autotest` to run the tests.
41
-
42
- Note: the `rake` command must be used first before running any tests, because
43
- it's used to generate various parsers implemented in RDoc. Also `rake clean` is
44
- helpful to delete these generated files.
45
-
46
- == Glossary
47
-
48
- Here are definitions for some common terms in the RDoc documentation. The
49
- list also briefly describes how the components of RDoc interact.
50
-
51
- parser::
52
- Parses files and creates a documentation tree from the contents.
53
-
54
- documentation tree::
55
- The documentation tree represents files, classes, modules, methods,
56
- constants, includes, comments and other ruby syntax features as a tree.
57
- RDoc walks this tree with a generator to create documentation.
58
-
59
- generator::
60
- Walks the documentation tree and generates output.
61
-
62
- RDoc ships with two generators, the Darkfish generator creates HTML and the
63
- RI generator creates an RI data store.
64
-
65
- markup parser::
66
- Parses comments from a file into a generic markup tree.
67
-
68
- The markup parsers allow RDoc to handle RDoc, TomDoc, rd and Markdown format
69
- documentation with common formatters.
70
-
71
- markup tree::
72
- Each parsed comment has a markup tree that represents common markup items
73
- such as headings, paragraphs, lists or verbatim text sections for example
74
- code or output.
75
-
76
- A generator uses a formatters to walks the tree to create output. Some
77
- generators use multiple formatters on a markup tree to produce the output.
78
-
79
- formatter::
80
- Converts a parsed markup tree into some form other form of markup.
81
-
82
- Formatters can either produce a one-to-one conversion, such as ToHtml, or
83
- extract part of the parsed result, such as ToHtmlSnippet which outputs the
84
- first 100 characters as HTML.
85
-
86
- == Plugins
87
-
88
- When 'rdoc/rdoc' is loaded RDoc looks for 'rdoc/discover' files in your
89
- installed gems. This can be used to load parsers, alternate generators, or
90
- additional preprocessor directives. An rdoc plugin layout should look
91
- something like this:
92
-
93
- lib/rdoc/discover.rb
94
- lib/my/rdoc/plugin.rb
95
- # etc.
96
-
97
- In your rdoc/discover.rb file you will want to wrap the loading of your plugin
98
- in an RDoc version check like this:
99
-
100
- begin
101
- gem 'rdoc', '~> 3'
102
- require 'my/rdoc/plugin'
103
- rescue Gem::LoadError
104
- end
105
-
106
- === Plugin Types
107
-
108
- In RDoc you can change the following behaviors:
109
-
110
- * Add a parser for a new file format
111
- * Add a new output generator
112
- * Add a new markup directive
113
- * Add a new type of documentation markup
114
- * Add a new type of formatter
115
-
116
- All of these are described below
117
-
118
- == Option Parsing
119
-
120
- Option parsing is handled by RDoc::Options. When you're writing a generator
121
- you can provide the user with extra options by providing a class method
122
- +setup_options+. The option parser will call this after your generator is
123
- loaded. See RDoc::Generator for details.
124
-
125
- == File Parsing
126
-
127
- After options are parsed, RDoc parses files from the files and directories in
128
- ARGV. RDoc compares the filename against what each parser claims it can parse
129
- via RDoc::Parser#parse_files_matching. For example, RDoc::Parser::C can parse
130
- C files, C headers, C++ files, C++ headers and yacc grammars.
131
-
132
- Once a matching parser class is found it is instantiated and +scan+ is called.
133
- The parser needs to extract documentation from the file and add it to the RDoc
134
- document tree. Usually this involves starting at the root and adding a class
135
- or a module (RDoc::TopLevel#add_class and RDoc::TopLevel#add_module) and
136
- proceeding to add classes, modules and methods to each nested item.
137
-
138
- When the parsers are finished the document tree is cleaned up to remove
139
- dangling references to aliases and includes that were not found (and may exist
140
- in a separate library) through RDoc::ClassModule#complete.
141
-
142
- To write your own parser for a new file format see RDoc::Parser.
143
-
144
- === Documentation Tree
145
-
146
- The parsers build a documentation tree that is composed of RDoc::CodeObject and
147
- its subclasses. There are various methods to walk the tree to extract
148
- information, see RDoc::Context and its subclasses.
149
-
150
- Within a class or module, attributes, methods and constants are divided into
151
- sections. The section represents a functional grouping of parts of the class.
152
- TomDoc uses the sections "Public", "Internal" and "Deprecated". The sections
153
- can be enumerated using RDoc::Context#each_section.
154
-
155
- == Output Generation
156
-
157
- An RDoc generator turns the documentation tree into some other kind of output.
158
- RDoc comes with an HTML generator (RDoc::Generator::Darkfish) and an RI
159
- database generator (RDoc::Generator::RI). The output a generator creates does
160
- not have to be human-readable.
161
-
162
- To create your own generator see RDoc::Generator.
163
-
164
- === Comments
165
-
166
- In RDoc 3.10 and newer the comment on an RDoc::CodeObject is now an
167
- RDoc::Comment object instead of a String. This is to support various
168
- documentation markup formats like rdoc, TomDoc and rd. The comments are
169
- normalized to remove comment markers and remove indentation then parsed lazily
170
- via RDoc::Comment#document to create a generic markup tree that can be
171
- processed by a formatter.
172
-
173
- To add your own markup format see RDoc::Markup@Other+directives
174
-
175
- ==== Formatters
176
-
177
- To transform a comment into some form of output an RDoc::Markup::Formatter
178
- subclass is used like RDoc::Markup::ToHtml. A formatter is a visitor that
179
- walks a parsed comment tree (an RDoc::Markup::Document) of any format. To help
180
- write a formatter RDoc::Markup::FormatterTestCase exists for generic parsers,
181
- and RDoc::Markup::TextFormatterTestCase which contains extra test cases for
182
- text-type output (like +ri+ output).
183
-
184
- RDoc ships with formatters that will turn a comment into HTML, rdoc-markup-like
185
- text, ANSI or terminal backspace highlighted text, HTML, cross-referenced HTML,
186
- an HTML snippet free of most markup, an HTML label for use in id attributes, a
187
- table-of-contents page, and text with only code blocks.
188
-
189
- The output of the formatter does not need to be text or text-like.
190
- RDoc::Markup::ToLabel creates an HTML-safe label for use in an HTML id
191
- attribute. A formatter could count the number of words and the average word
192
- length for a comment, for example.
193
-
194
- ==== Directives
195
-
196
- For comments in markup you can add new directives (:nodoc: is a directive).
197
- Directives may replace text or store it off for later use.
198
-
199
- See RDoc::Markup::PreProcess::register for details.
200
-
201
- === JSONIndex
202
-
203
- RDoc contains a special generator, RDoc::Generator::JSONIndex, which creates a
204
- JSON-based search index and includes a search engine for use with HTML output.
205
- This generator can be used to add searching to any HTML output and is designed
206
- to be called from inside an HTML generator.
207
-
208
- == Markup
209
-
210
- Additional documentation markup formats can be added to RDoc. A markup
211
- parsing class must respond to \::parse and accept a String argument containing
212
- the markup format. An RDoc::Document containing documentation items
213
- (RDoc::Markup::Heading, RDoc::Markup::Paragraph, RDoc::Markup::Verbatim, etc.)
214
- must be returned.
215
-
216
- To register the parser with rdoc, add the markup type's name and class to the
217
- RDoc::Text::MARKUP_FORMAT hash like:
218
-
219
- RDoc::Text::MARKUP_FORMAT['rdoc'] = RDoc::Markup