rdoc 6.14.2 → 6.16.1

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 (75) hide show
  1. checksums.yaml +4 -4
  2. data/History.rdoc +1 -1
  3. data/README.md +112 -0
  4. data/RI.md +1 -1
  5. data/lib/rdoc/code_object/top_level.rb +18 -25
  6. data/lib/rdoc/comment.rb +190 -8
  7. data/lib/rdoc/cross_reference.rb +1 -1
  8. data/lib/rdoc/generator/aliki.rb +42 -0
  9. data/lib/rdoc/generator/template/aliki/_aside_toc.rhtml +8 -0
  10. data/lib/rdoc/generator/template/aliki/_footer.rhtml +23 -0
  11. data/lib/rdoc/generator/template/aliki/_head.rhtml +158 -0
  12. data/lib/rdoc/generator/template/aliki/_header.rhtml +56 -0
  13. data/lib/rdoc/generator/template/aliki/_sidebar_ancestors.rhtml +6 -0
  14. data/lib/rdoc/generator/template/aliki/_sidebar_classes.rhtml +5 -0
  15. data/lib/rdoc/generator/template/aliki/_sidebar_extends.rhtml +15 -0
  16. data/lib/rdoc/generator/template/aliki/_sidebar_includes.rhtml +15 -0
  17. data/lib/rdoc/generator/template/aliki/_sidebar_installed.rhtml +16 -0
  18. data/lib/rdoc/generator/template/aliki/_sidebar_methods.rhtml +21 -0
  19. data/lib/rdoc/generator/template/aliki/_sidebar_pages.rhtml +37 -0
  20. data/lib/rdoc/generator/template/aliki/_sidebar_search.rhtml +15 -0
  21. data/lib/rdoc/generator/template/aliki/_sidebar_sections.rhtml +11 -0
  22. data/lib/rdoc/generator/template/aliki/_sidebar_toggle.rhtml +3 -0
  23. data/lib/rdoc/generator/template/aliki/class.rhtml +219 -0
  24. data/lib/rdoc/generator/template/aliki/css/rdoc.css +1612 -0
  25. data/lib/rdoc/generator/template/aliki/index.rhtml +21 -0
  26. data/lib/rdoc/generator/template/aliki/js/aliki.js +483 -0
  27. data/lib/rdoc/generator/template/aliki/js/c_highlighter.js +299 -0
  28. data/lib/rdoc/generator/template/aliki/js/search.js +120 -0
  29. data/lib/rdoc/generator/template/aliki/js/theme-toggle.js +112 -0
  30. data/lib/rdoc/generator/template/aliki/page.rhtml +17 -0
  31. data/lib/rdoc/generator/template/aliki/servlet_not_found.rhtml +14 -0
  32. data/lib/rdoc/generator/template/aliki/servlet_root.rhtml +65 -0
  33. data/lib/rdoc/generator/template/darkfish/_footer.rhtml +3 -3
  34. data/lib/rdoc/generator/template/darkfish/_head.rhtml +14 -19
  35. data/lib/rdoc/generator/template/darkfish/_sidebar_extends.rhtml +8 -8
  36. data/lib/rdoc/generator/template/darkfish/_sidebar_includes.rhtml +8 -8
  37. data/lib/rdoc/generator/template/darkfish/_sidebar_installed.rhtml +7 -6
  38. data/lib/rdoc/generator/template/darkfish/_sidebar_methods.rhtml +6 -6
  39. data/lib/rdoc/generator/template/darkfish/_sidebar_pages.rhtml +19 -19
  40. data/lib/rdoc/generator/template/darkfish/_sidebar_parent.rhtml +2 -2
  41. data/lib/rdoc/generator/template/darkfish/_sidebar_search.rhtml +1 -0
  42. data/lib/rdoc/generator/template/darkfish/_sidebar_sections.rhtml +3 -3
  43. data/lib/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml +14 -14
  44. data/lib/rdoc/generator/template/darkfish/class.rhtml +62 -60
  45. data/lib/rdoc/generator/template/darkfish/index.rhtml +4 -3
  46. data/lib/rdoc/generator/template/darkfish/js/darkfish.js +21 -1
  47. data/lib/rdoc/generator/template/darkfish/js/search.js +11 -1
  48. data/lib/rdoc/generator/template/darkfish/page.rhtml +2 -1
  49. data/lib/rdoc/generator/template/darkfish/servlet_not_found.rhtml +2 -1
  50. data/lib/rdoc/generator/template/darkfish/servlet_root.rhtml +19 -19
  51. data/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml +19 -17
  52. data/lib/rdoc/generator/template/json_index/js/searcher.js +48 -6
  53. data/lib/rdoc/generator.rb +1 -0
  54. data/lib/rdoc/markdown.kpeg +28 -17
  55. data/lib/rdoc/markdown.rb +365 -544
  56. data/lib/rdoc/markup/pre_process.rb +34 -10
  57. data/lib/rdoc/markup/to_html.rb +162 -14
  58. data/lib/rdoc/markup/to_html_crossref.rb +53 -23
  59. data/lib/rdoc/options.rb +22 -11
  60. data/lib/rdoc/parser/c.rb +15 -46
  61. data/lib/rdoc/parser/prism_ruby.rb +121 -113
  62. data/lib/rdoc/parser/ruby.rb +8 -8
  63. data/lib/rdoc/parser/ruby_tools.rb +5 -7
  64. data/lib/rdoc/parser/simple.rb +4 -21
  65. data/lib/rdoc/rdoc.rb +1 -0
  66. data/lib/rdoc/ri/task.rb +2 -2
  67. data/lib/rdoc/store.rb +2 -2
  68. data/lib/rdoc/task.rb +4 -4
  69. data/lib/rdoc/text.rb +1 -1
  70. data/lib/rdoc/token_stream.rb +13 -1
  71. data/lib/rdoc/tom_doc.rb +1 -1
  72. data/lib/rdoc/version.rb +1 -1
  73. data/rdoc.gemspec +3 -2
  74. metadata +44 -5
  75. data/README.rdoc +0 -144
data/lib/rdoc/tom_doc.rb CHANGED
@@ -49,7 +49,7 @@ class RDoc::TomDoc < RDoc::Markup::Parser
49
49
  next unless code_object and
50
50
  RDoc::Comment === comment and comment.format == 'tomdoc'
51
51
 
52
- comment.text.gsub!(/(\A\s*# )(Public|Internal|Deprecated):\s+/) do
52
+ comment.text.gsub!(/\A(\s*# |)(Public|Internal|Deprecated):\s+/) do
53
53
  section = code_object.add_section $2
54
54
  code_object.temporary_section = section
55
55
 
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.14.2'
8
+ VERSION = '6.16.1'
9
9
 
10
10
  end
data/rdoc.gemspec CHANGED
@@ -45,7 +45,7 @@ RDoc includes the +rdoc+ and +ri+ tools for generating and displaying documentat
45
45
  "History.rdoc",
46
46
  "LEGAL.rdoc",
47
47
  "LICENSE.rdoc",
48
- "README.rdoc",
48
+ "README.md",
49
49
  "RI.md",
50
50
  "TODO.rdoc",
51
51
  "exe/rdoc",
@@ -60,7 +60,7 @@ RDoc includes the +rdoc+ and +ri+ tools for generating and displaying documentat
60
60
 
61
61
  s.files = (non_lib_files + template_files + lib_files).uniq
62
62
 
63
- s.rdoc_options = ["--main", "README.rdoc"]
63
+ s.rdoc_options = ["--main", "README.md"]
64
64
  s.extra_rdoc_files += s.files.grep(%r[\A[^\/]+\.(?:rdoc|md)\z])
65
65
 
66
66
  s.required_ruby_version = Gem::Requirement.new(">= 2.6.0")
@@ -68,4 +68,5 @@ RDoc includes the +rdoc+ and +ri+ tools for generating and displaying documentat
68
68
 
69
69
  s.add_dependency 'psych', '>= 4.0.0'
70
70
  s.add_dependency 'erb'
71
+ s.add_dependency 'tsort'
71
72
  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.14.2
4
+ version: 6.16.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Hodel
@@ -13,7 +13,7 @@ authors:
13
13
  - ITOYANAGI Sakura
14
14
  bindir: exe
15
15
  cert_chain: []
16
- date: 2025-07-03 00:00:00.000000000 Z
16
+ date: 2025-11-28 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: psych
@@ -43,6 +43,20 @@ dependencies:
43
43
  - - ">="
44
44
  - !ruby/object:Gem::Version
45
45
  version: '0'
46
+ - !ruby/object:Gem::Dependency
47
+ name: tsort
48
+ requirement: !ruby/object:Gem::Requirement
49
+ requirements:
50
+ - - ">="
51
+ - !ruby/object:Gem::Version
52
+ version: '0'
53
+ type: :runtime
54
+ prerelease: false
55
+ version_requirements: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - ">="
58
+ - !ruby/object:Gem::Version
59
+ version: '0'
46
60
  description: |
47
61
  RDoc produces HTML and command-line documentation for Ruby projects.
48
62
  RDoc includes the +rdoc+ and +ri+ tools for generating and displaying documentation from the command-line.
@@ -66,7 +80,7 @@ extra_rdoc_files:
66
80
  - History.rdoc
67
81
  - LEGAL.rdoc
68
82
  - LICENSE.rdoc
69
- - README.rdoc
83
+ - README.md
70
84
  - RI.md
71
85
  - TODO.rdoc
72
86
  files:
@@ -77,7 +91,7 @@ files:
77
91
  - History.rdoc
78
92
  - LEGAL.rdoc
79
93
  - LICENSE.rdoc
80
- - README.rdoc
94
+ - README.md
81
95
  - RI.md
82
96
  - TODO.rdoc
83
97
  - exe/rdoc
@@ -110,6 +124,7 @@ files:
110
124
  - lib/rdoc/erb_partial.rb
111
125
  - lib/rdoc/erbio.rb
112
126
  - lib/rdoc/generator.rb
127
+ - lib/rdoc/generator/aliki.rb
113
128
  - lib/rdoc/generator/darkfish.rb
114
129
  - lib/rdoc/generator/json_index.rb
115
130
  - lib/rdoc/generator/markup.rb
@@ -118,6 +133,30 @@ files:
118
133
  - lib/rdoc/generator/pot/po.rb
119
134
  - lib/rdoc/generator/pot/po_entry.rb
120
135
  - lib/rdoc/generator/ri.rb
136
+ - lib/rdoc/generator/template/aliki/_aside_toc.rhtml
137
+ - lib/rdoc/generator/template/aliki/_footer.rhtml
138
+ - lib/rdoc/generator/template/aliki/_head.rhtml
139
+ - lib/rdoc/generator/template/aliki/_header.rhtml
140
+ - lib/rdoc/generator/template/aliki/_sidebar_ancestors.rhtml
141
+ - lib/rdoc/generator/template/aliki/_sidebar_classes.rhtml
142
+ - lib/rdoc/generator/template/aliki/_sidebar_extends.rhtml
143
+ - lib/rdoc/generator/template/aliki/_sidebar_includes.rhtml
144
+ - lib/rdoc/generator/template/aliki/_sidebar_installed.rhtml
145
+ - lib/rdoc/generator/template/aliki/_sidebar_methods.rhtml
146
+ - lib/rdoc/generator/template/aliki/_sidebar_pages.rhtml
147
+ - lib/rdoc/generator/template/aliki/_sidebar_search.rhtml
148
+ - lib/rdoc/generator/template/aliki/_sidebar_sections.rhtml
149
+ - lib/rdoc/generator/template/aliki/_sidebar_toggle.rhtml
150
+ - lib/rdoc/generator/template/aliki/class.rhtml
151
+ - lib/rdoc/generator/template/aliki/css/rdoc.css
152
+ - lib/rdoc/generator/template/aliki/index.rhtml
153
+ - lib/rdoc/generator/template/aliki/js/aliki.js
154
+ - lib/rdoc/generator/template/aliki/js/c_highlighter.js
155
+ - lib/rdoc/generator/template/aliki/js/search.js
156
+ - lib/rdoc/generator/template/aliki/js/theme-toggle.js
157
+ - lib/rdoc/generator/template/aliki/page.rhtml
158
+ - lib/rdoc/generator/template/aliki/servlet_not_found.rhtml
159
+ - lib/rdoc/generator/template/aliki/servlet_root.rhtml
121
160
  - lib/rdoc/generator/template/darkfish/_footer.rhtml
122
161
  - lib/rdoc/generator/template/darkfish/_head.rhtml
123
162
  - lib/rdoc/generator/template/darkfish/_sidebar_classes.rhtml
@@ -268,7 +307,7 @@ metadata:
268
307
  changelog_uri: https://github.com/ruby/rdoc/releases
269
308
  rdoc_options:
270
309
  - "--main"
271
- - README.rdoc
310
+ - README.md
272
311
  require_paths:
273
312
  - lib
274
313
  required_ruby_version: !ruby/object:Gem::Requirement
data/README.rdoc DELETED
@@ -1,144 +0,0 @@
1
- = \RDoc - Ruby Documentation System
2
-
3
- home :: https://github.com/ruby/rdoc
4
- rdoc :: https://ruby.github.io/rdoc
5
- bugs :: https://github.com/ruby/rdoc/issues
6
- code quality :: https://codeclimate.com/github/ruby/rdoc
7
-
8
- == Description
9
-
10
- RDoc produces HTML and command-line documentation for Ruby projects. RDoc
11
- includes the +rdoc+ and +ri+ tools for generating and displaying documentation
12
- from the command-line.
13
-
14
- == Generating Documentation
15
-
16
- Once installed, you can create documentation using the +rdoc+ command
17
-
18
- $ rdoc [options] [names...]
19
-
20
- For an up-to-date option summary, type
21
-
22
- $ rdoc --help
23
-
24
- A typical use might be to generate documentation for a package of Ruby
25
- source (such as RDoc itself).
26
-
27
- $ rdoc
28
-
29
- This command generates documentation for all the Ruby and C source
30
- files in and below the current directory. These will be stored in a
31
- documentation tree starting in the subdirectory +doc+.
32
-
33
- You can make this slightly more useful for your readers by having the
34
- index page contain the documentation for the primary file. In our
35
- case, we could type
36
-
37
- % rdoc --main README.rdoc
38
-
39
- You'll find information on the various formatting tricks you can use
40
- in comment blocks in the documentation this generates.
41
-
42
- RDoc uses file extensions to determine how to process each file. File names
43
- ending +.rb+ and +.rbw+ are assumed to be Ruby source. Files
44
- ending +.c+ are parsed as C files. All other files are assumed to
45
- contain just Markup-style markup (with or without leading '#' comment
46
- markers). If directory names are passed to RDoc, they are scanned
47
- recursively for C and Ruby source files only.
48
-
49
- To generate documentation using +rake+ see RDoc::Task[https://ruby.github.io/rdoc/RDoc/Task.html].
50
-
51
- To generate documentation programmatically:
52
-
53
- gem 'rdoc'
54
- require 'rdoc/rdoc'
55
-
56
- options = RDoc::Options.new
57
- options.files = ['a.rb', 'b.rb']
58
- options.setup_generator 'darkfish'
59
- # see RDoc::Options
60
-
61
- rdoc = RDoc::RDoc.new
62
- rdoc.document options
63
- # see RDoc::RDoc
64
-
65
- You can specify the target files for document generation with +.document+ file in the project root directory.
66
- +.document+ file contains a list of file and directory names including comment lines starting with '#'.
67
- See https://github.com/ruby/rdoc/blob/master/.document as an example.
68
-
69
- == Writing Documentation
70
-
71
- To write documentation for RDoc place a comment above the class, module,
72
- method, constant, or attribute you want documented:
73
-
74
- ##
75
- # This class represents an arbitrary shape by a series of points.
76
-
77
- class Shape
78
-
79
- ##
80
- # Creates a new shape described by a +polyline+.
81
- #
82
- # If the +polyline+ does not end at the same point it started at the
83
- # first pointed is copied and placed at the end of the line.
84
- #
85
- # An ArgumentError is raised if the line crosses itself, but shapes may
86
- # be concave.
87
-
88
- def initialize polyline
89
- # ...
90
- end
91
-
92
- end
93
-
94
- The default comment markup format is the RDoc::Markup format.
95
- TomDoc[rdoc-ref:RDoc::TomDoc], Markdown[rdoc-ref:RDoc::Markdown] and
96
- RD[rdoc-ref:RDoc::RD] format comments are also supported. You can set the
97
- default comment format for your entire project by creating a
98
- <tt>.rdoc_options</tt> file. See RDoc::Options@Saved+Options for instructions
99
- on creating one. You can also set the comment format for a single file
100
- through the +:markup:+ directive, but this is only recommended if you wish to
101
- switch markup formats. See RDoc::Markup@Other+directives.
102
-
103
- Comments can contain directives that tell RDoc information that it cannot
104
- otherwise discover through parsing. See RDoc::Markup@Directives to control
105
- what is or is not documented, to define method arguments or to break up
106
- methods in a class by topic. See RDoc::Parser::Ruby for directives used to
107
- teach RDoc about metaprogrammed methods.
108
-
109
- See RDoc::Parser::C for documenting C extensions with RDoc.
110
-
111
- To determine how well your project is documented run <tt>rdoc -C lib</tt> to
112
- get a documentation coverage report. <tt>rdoc -C1 lib</tt> includes parameter
113
- names in the documentation coverage report.
114
-
115
- == Theme Options
116
-
117
- There are a few community-maintained themes for \RDoc:
118
-
119
- - rorvswild-theme-rdoc[https://github.com/BaseSecrete/rorvswild-theme-rdoc]
120
- - hanna[https://github.com/jeremyevans/hanna] (a fork maintained by {Jeremy Evans}[https://github.com/jeremyevans])
121
-
122
- Please follow the theme's README for usage instructions.
123
-
124
- == Bugs
125
-
126
- See CONTRIBUTING.rdoc for information on filing a bug report. It's OK to file
127
- a bug report for anything you're having a problem with. If you can't figure
128
- out how to make RDoc produce the output you like that is probably a
129
- documentation bug.
130
-
131
- == License
132
-
133
- RDoc is Copyright (c) 2001-2003 Dave Thomas, The Pragmatic Programmers.
134
- Portions (c) 2007-2011 Eric Hodel. Portions copyright others, see individual
135
- files and LEGAL.rdoc for details.
136
-
137
- RDoc is free software, and may be redistributed under the terms specified in
138
- LICENSE.rdoc.
139
-
140
- == Warranty
141
-
142
- This software is provided "as is" and without any express or implied
143
- warranties, including, without limitation, the implied warranties of
144
- merchantability and fitness for a particular purpose.