gitlab-rdoc 6.3.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (196) hide show
  1. checksums.yaml +7 -0
  2. data/CONTRIBUTING.rdoc +220 -0
  3. data/CVE-2013-0256.rdoc +49 -0
  4. data/ExampleMarkdown.md +37 -0
  5. data/ExampleRDoc.rdoc +208 -0
  6. data/Gemfile +12 -0
  7. data/History.rdoc +1666 -0
  8. data/LEGAL.rdoc +50 -0
  9. data/LICENSE.rdoc +57 -0
  10. data/README.rdoc +133 -0
  11. data/RI.rdoc +57 -0
  12. data/Rakefile +101 -0
  13. data/TODO.rdoc +59 -0
  14. data/bin/console +7 -0
  15. data/bin/setup +6 -0
  16. data/exe/rdoc +44 -0
  17. data/exe/ri +12 -0
  18. data/lib/rdoc/alias.rb +112 -0
  19. data/lib/rdoc/anon_class.rb +11 -0
  20. data/lib/rdoc/any_method.rb +361 -0
  21. data/lib/rdoc/attr.rb +176 -0
  22. data/lib/rdoc/class_module.rb +802 -0
  23. data/lib/rdoc/code_object.rb +421 -0
  24. data/lib/rdoc/code_objects.rb +6 -0
  25. data/lib/rdoc/comment.rb +250 -0
  26. data/lib/rdoc/constant.rb +187 -0
  27. data/lib/rdoc/context/section.rb +232 -0
  28. data/lib/rdoc/context.rb +1266 -0
  29. data/lib/rdoc/cross_reference.rb +202 -0
  30. data/lib/rdoc/encoding.rb +136 -0
  31. data/lib/rdoc/erb_partial.rb +19 -0
  32. data/lib/rdoc/erbio.rb +42 -0
  33. data/lib/rdoc/extend.rb +10 -0
  34. data/lib/rdoc/generator/darkfish.rb +790 -0
  35. data/lib/rdoc/generator/json_index.rb +300 -0
  36. data/lib/rdoc/generator/markup.rb +160 -0
  37. data/lib/rdoc/generator/pot/message_extractor.rb +68 -0
  38. data/lib/rdoc/generator/pot/po.rb +84 -0
  39. data/lib/rdoc/generator/pot/po_entry.rb +141 -0
  40. data/lib/rdoc/generator/pot.rb +98 -0
  41. data/lib/rdoc/generator/ri.rb +31 -0
  42. data/lib/rdoc/generator/template/darkfish/.document +0 -0
  43. data/lib/rdoc/generator/template/darkfish/_footer.rhtml +5 -0
  44. data/lib/rdoc/generator/template/darkfish/_head.rhtml +22 -0
  45. data/lib/rdoc/generator/template/darkfish/_sidebar_VCS_info.rhtml +19 -0
  46. data/lib/rdoc/generator/template/darkfish/_sidebar_classes.rhtml +9 -0
  47. data/lib/rdoc/generator/template/darkfish/_sidebar_extends.rhtml +15 -0
  48. data/lib/rdoc/generator/template/darkfish/_sidebar_in_files.rhtml +9 -0
  49. data/lib/rdoc/generator/template/darkfish/_sidebar_includes.rhtml +15 -0
  50. data/lib/rdoc/generator/template/darkfish/_sidebar_installed.rhtml +15 -0
  51. data/lib/rdoc/generator/template/darkfish/_sidebar_methods.rhtml +12 -0
  52. data/lib/rdoc/generator/template/darkfish/_sidebar_navigation.rhtml +11 -0
  53. data/lib/rdoc/generator/template/darkfish/_sidebar_pages.rhtml +12 -0
  54. data/lib/rdoc/generator/template/darkfish/_sidebar_parent.rhtml +11 -0
  55. data/lib/rdoc/generator/template/darkfish/_sidebar_search.rhtml +14 -0
  56. data/lib/rdoc/generator/template/darkfish/_sidebar_sections.rhtml +11 -0
  57. data/lib/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml +18 -0
  58. data/lib/rdoc/generator/template/darkfish/class.rhtml +172 -0
  59. data/lib/rdoc/generator/template/darkfish/css/fonts.css +167 -0
  60. data/lib/rdoc/generator/template/darkfish/css/rdoc.css +639 -0
  61. data/lib/rdoc/generator/template/darkfish/fonts/Lato-Light.ttf +0 -0
  62. data/lib/rdoc/generator/template/darkfish/fonts/Lato-LightItalic.ttf +0 -0
  63. data/lib/rdoc/generator/template/darkfish/fonts/Lato-Regular.ttf +0 -0
  64. data/lib/rdoc/generator/template/darkfish/fonts/Lato-RegularItalic.ttf +0 -0
  65. data/lib/rdoc/generator/template/darkfish/fonts/SourceCodePro-Bold.ttf +0 -0
  66. data/lib/rdoc/generator/template/darkfish/fonts/SourceCodePro-Regular.ttf +0 -0
  67. data/lib/rdoc/generator/template/darkfish/images/add.png +0 -0
  68. data/lib/rdoc/generator/template/darkfish/images/arrow_up.png +0 -0
  69. data/lib/rdoc/generator/template/darkfish/images/brick.png +0 -0
  70. data/lib/rdoc/generator/template/darkfish/images/brick_link.png +0 -0
  71. data/lib/rdoc/generator/template/darkfish/images/bug.png +0 -0
  72. data/lib/rdoc/generator/template/darkfish/images/bullet_black.png +0 -0
  73. data/lib/rdoc/generator/template/darkfish/images/bullet_toggle_minus.png +0 -0
  74. data/lib/rdoc/generator/template/darkfish/images/bullet_toggle_plus.png +0 -0
  75. data/lib/rdoc/generator/template/darkfish/images/date.png +0 -0
  76. data/lib/rdoc/generator/template/darkfish/images/delete.png +0 -0
  77. data/lib/rdoc/generator/template/darkfish/images/find.png +0 -0
  78. data/lib/rdoc/generator/template/darkfish/images/loadingAnimation.gif +0 -0
  79. data/lib/rdoc/generator/template/darkfish/images/macFFBgHack.png +0 -0
  80. data/lib/rdoc/generator/template/darkfish/images/package.png +0 -0
  81. data/lib/rdoc/generator/template/darkfish/images/page_green.png +0 -0
  82. data/lib/rdoc/generator/template/darkfish/images/page_white_text.png +0 -0
  83. data/lib/rdoc/generator/template/darkfish/images/page_white_width.png +0 -0
  84. data/lib/rdoc/generator/template/darkfish/images/plugin.png +0 -0
  85. data/lib/rdoc/generator/template/darkfish/images/ruby.png +0 -0
  86. data/lib/rdoc/generator/template/darkfish/images/tag_blue.png +0 -0
  87. data/lib/rdoc/generator/template/darkfish/images/tag_green.png +0 -0
  88. data/lib/rdoc/generator/template/darkfish/images/transparent.png +0 -0
  89. data/lib/rdoc/generator/template/darkfish/images/wrench.png +0 -0
  90. data/lib/rdoc/generator/template/darkfish/images/wrench_orange.png +0 -0
  91. data/lib/rdoc/generator/template/darkfish/images/zoom.png +0 -0
  92. data/lib/rdoc/generator/template/darkfish/index.rhtml +22 -0
  93. data/lib/rdoc/generator/template/darkfish/js/darkfish.js +84 -0
  94. data/lib/rdoc/generator/template/darkfish/js/search.js +110 -0
  95. data/lib/rdoc/generator/template/darkfish/page.rhtml +18 -0
  96. data/lib/rdoc/generator/template/darkfish/servlet_not_found.rhtml +18 -0
  97. data/lib/rdoc/generator/template/darkfish/servlet_root.rhtml +62 -0
  98. data/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml +58 -0
  99. data/lib/rdoc/generator/template/json_index/.document +1 -0
  100. data/lib/rdoc/generator/template/json_index/js/navigation.js +105 -0
  101. data/lib/rdoc/generator/template/json_index/js/searcher.js +229 -0
  102. data/lib/rdoc/generator.rb +51 -0
  103. data/lib/rdoc/ghost_method.rb +7 -0
  104. data/lib/rdoc/i18n/locale.rb +102 -0
  105. data/lib/rdoc/i18n/text.rb +126 -0
  106. data/lib/rdoc/i18n.rb +10 -0
  107. data/lib/rdoc/include.rb +10 -0
  108. data/lib/rdoc/known_classes.rb +73 -0
  109. data/lib/rdoc/markdown/entities.rb +2132 -0
  110. data/lib/rdoc/markdown/literals.kpeg +23 -0
  111. data/lib/rdoc/markdown/literals.rb +417 -0
  112. data/lib/rdoc/markdown.kpeg +1237 -0
  113. data/lib/rdoc/markdown.rb +16685 -0
  114. data/lib/rdoc/markup/attr_changer.rb +23 -0
  115. data/lib/rdoc/markup/attr_span.rb +36 -0
  116. data/lib/rdoc/markup/attribute_manager.rb +409 -0
  117. data/lib/rdoc/markup/attributes.rb +71 -0
  118. data/lib/rdoc/markup/blank_line.rb +28 -0
  119. data/lib/rdoc/markup/block_quote.rb +15 -0
  120. data/lib/rdoc/markup/document.rb +165 -0
  121. data/lib/rdoc/markup/formatter.rb +266 -0
  122. data/lib/rdoc/markup/hard_break.rb +32 -0
  123. data/lib/rdoc/markup/heading.rb +79 -0
  124. data/lib/rdoc/markup/include.rb +43 -0
  125. data/lib/rdoc/markup/indented_paragraph.rb +48 -0
  126. data/lib/rdoc/markup/list.rb +102 -0
  127. data/lib/rdoc/markup/list_item.rb +100 -0
  128. data/lib/rdoc/markup/paragraph.rb +29 -0
  129. data/lib/rdoc/markup/parser.rb +575 -0
  130. data/lib/rdoc/markup/pre_process.rb +296 -0
  131. data/lib/rdoc/markup/raw.rb +70 -0
  132. data/lib/rdoc/markup/regexp_handling.rb +41 -0
  133. data/lib/rdoc/markup/rule.rb +21 -0
  134. data/lib/rdoc/markup/table.rb +47 -0
  135. data/lib/rdoc/markup/to_ansi.rb +94 -0
  136. data/lib/rdoc/markup/to_bs.rb +77 -0
  137. data/lib/rdoc/markup/to_html.rb +444 -0
  138. data/lib/rdoc/markup/to_html_crossref.rb +176 -0
  139. data/lib/rdoc/markup/to_html_snippet.rb +285 -0
  140. data/lib/rdoc/markup/to_joined_paragraph.rb +47 -0
  141. data/lib/rdoc/markup/to_label.rb +75 -0
  142. data/lib/rdoc/markup/to_markdown.rb +192 -0
  143. data/lib/rdoc/markup/to_rdoc.rb +362 -0
  144. data/lib/rdoc/markup/to_table_of_contents.rb +89 -0
  145. data/lib/rdoc/markup/to_test.rb +70 -0
  146. data/lib/rdoc/markup/to_tt_only.rb +121 -0
  147. data/lib/rdoc/markup/verbatim.rb +84 -0
  148. data/lib/rdoc/markup.rb +867 -0
  149. data/lib/rdoc/meta_method.rb +7 -0
  150. data/lib/rdoc/method_attr.rb +419 -0
  151. data/lib/rdoc/mixin.rb +121 -0
  152. data/lib/rdoc/normal_class.rb +93 -0
  153. data/lib/rdoc/normal_module.rb +74 -0
  154. data/lib/rdoc/options.rb +1285 -0
  155. data/lib/rdoc/parser/c.rb +1225 -0
  156. data/lib/rdoc/parser/changelog.rb +335 -0
  157. data/lib/rdoc/parser/markdown.rb +24 -0
  158. data/lib/rdoc/parser/rd.rb +23 -0
  159. data/lib/rdoc/parser/ripper_state_lex.rb +590 -0
  160. data/lib/rdoc/parser/ruby.rb +2327 -0
  161. data/lib/rdoc/parser/ruby_tools.rb +167 -0
  162. data/lib/rdoc/parser/simple.rb +61 -0
  163. data/lib/rdoc/parser/text.rb +12 -0
  164. data/lib/rdoc/parser.rb +277 -0
  165. data/lib/rdoc/rd/block_parser.rb +1056 -0
  166. data/lib/rdoc/rd/block_parser.ry +639 -0
  167. data/lib/rdoc/rd/inline.rb +72 -0
  168. data/lib/rdoc/rd/inline_parser.rb +1208 -0
  169. data/lib/rdoc/rd/inline_parser.ry +593 -0
  170. data/lib/rdoc/rd.rb +100 -0
  171. data/lib/rdoc/rdoc.rb +579 -0
  172. data/lib/rdoc/require.rb +52 -0
  173. data/lib/rdoc/ri/driver.rb +1572 -0
  174. data/lib/rdoc/ri/formatter.rb +6 -0
  175. data/lib/rdoc/ri/paths.rb +171 -0
  176. data/lib/rdoc/ri/store.rb +7 -0
  177. data/lib/rdoc/ri/task.rb +71 -0
  178. data/lib/rdoc/ri.rb +21 -0
  179. data/lib/rdoc/rubygems_hook.rb +246 -0
  180. data/lib/rdoc/servlet.rb +451 -0
  181. data/lib/rdoc/single_class.rb +26 -0
  182. data/lib/rdoc/stats/normal.rb +58 -0
  183. data/lib/rdoc/stats/quiet.rb +60 -0
  184. data/lib/rdoc/stats/verbose.rb +46 -0
  185. data/lib/rdoc/stats.rb +462 -0
  186. data/lib/rdoc/store.rb +979 -0
  187. data/lib/rdoc/task.rb +329 -0
  188. data/lib/rdoc/text.rb +304 -0
  189. data/lib/rdoc/token_stream.rb +119 -0
  190. data/lib/rdoc/tom_doc.rb +263 -0
  191. data/lib/rdoc/top_level.rb +289 -0
  192. data/lib/rdoc/version.rb +8 -0
  193. data/lib/rdoc.rb +201 -0
  194. data/man/ri.1 +247 -0
  195. data/rdoc.gemspec +249 -0
  196. metadata +279 -0
data/LEGAL.rdoc ADDED
@@ -0,0 +1,50 @@
1
+ # coding: UTF-8
2
+
3
+ = Legal Notice Information
4
+
5
+ The files in this distribution are covered by the Ruby license (see LICENSE) except the features mentioned below:
6
+
7
+ Darkfish::
8
+ Darkfish was written by Michael Granger and is included under the MIT
9
+ license. Darkfish contains images from the Silk Icons set by Mark James.
10
+
11
+ See lib/rdoc/generator/darkfish.rb for license information.
12
+
13
+ * lib/rdoc/generator/darkfish.rb
14
+ * lib/rdoc/generator/template/darkfish/*
15
+ * lib/rdoc/generator/template/darkfish/images
16
+
17
+ SDoc::
18
+ Portions of SDoc by (Володя Колесников) Vladimir Kolesnikov are included
19
+ under the MIT license as RDoc::Generator::JsonIndex. See
20
+ lib/rdoc/generator/json_index.rb for license information.
21
+
22
+ * lib/rdoc/generator/json_index.rb
23
+ * lib/rdoc/generator/template/json_index/*
24
+ * The +#search_index+ methods on RDoc::CodeObject subclasses were derived
25
+ from sdoc.
26
+ * RDoc::ClassModule#document_self_or_methods comes from SDoc.
27
+
28
+ peg-markdown::
29
+ RDoc's Markdown support is derived from peg-markdown by John MacFarlane. It
30
+ is used under the MIT license. See RDoc::Markdown for license details.
31
+
32
+ MarkdownTest::
33
+ test/test_rdoc_markdown_test.rb uses MarkdownTest 1.0.3's source files which
34
+ are included as test/MarkdownTest_1.0.3/*.text which are Copyright (c)
35
+ 2004-2005 John Gruber http://daringfireball.net and is included under the
36
+ same terms as Perl itself.
37
+
38
+ See http://dev.perl.org/licenses/ for the terms of the Perl license.
39
+
40
+ Fonts::
41
+ Source Code Pro is (c) 2010, 2012 Adobe Systems Incorporated.
42
+
43
+ Lato is (c) 2010 Łukasz Dziedzic.
44
+
45
+ Both fonts are used under the SIL Open Font License, Version 1.1. The
46
+ license is available at http://scripts.sil.org/OFL
47
+
48
+ See lib/rdoc/generator/template/darkfish/fonts.css for complete copyright
49
+ and license information, including a copy of the OFL.
50
+
data/LICENSE.rdoc ADDED
@@ -0,0 +1,57 @@
1
+ RDoc is copyrighted free software.
2
+
3
+ You can redistribute it and/or modify it under either the terms of the GPL
4
+ version 2 (see the file GPL), or the conditions below:
5
+
6
+ 1. You may make and give away verbatim copies of the source form of the
7
+ software without restriction, provided that you duplicate all of the
8
+ original copyright notices and associated disclaimers.
9
+
10
+ 2. You may modify your copy of the software in any way, provided that
11
+ you do at least ONE of the following:
12
+
13
+ a. place your modifications in the Public Domain or otherwise
14
+ make them Freely Available, such as by posting said
15
+ modifications to Usenet or an equivalent medium, or by allowing
16
+ the author to include your modifications in the software.
17
+
18
+ b. use the modified software only within your corporation or
19
+ organization.
20
+
21
+ c. give non-standard binaries non-standard names, with
22
+ instructions on where to get the original software distribution.
23
+
24
+ d. make other distribution arrangements with the author.
25
+
26
+ 3. You may distribute the software in object code or binary form,
27
+ provided that you do at least ONE of the following:
28
+
29
+ a. distribute the binaries and library files of the software,
30
+ together with instructions (in the manual page or equivalent)
31
+ on where to get the original distribution.
32
+
33
+ b. accompany the distribution with the machine-readable source of
34
+ the software.
35
+
36
+ c. give non-standard binaries non-standard names, with
37
+ instructions on where to get the original software distribution.
38
+
39
+ d. make other distribution arrangements with the author.
40
+
41
+ 4. You may modify and include the part of the software into any other
42
+ software (possibly commercial). But some files in the distribution
43
+ are not written by the author, so that they are not under these terms.
44
+
45
+ For the list of those files and their copying conditions, see the
46
+ file LEGAL.
47
+
48
+ 5. The scripts and library files supplied as input to or produced as
49
+ output from the software do not automatically fall under the
50
+ copyright of the software, but belong to whomever generated them,
51
+ and may be sold commercially, and may be aggregated with this
52
+ software.
53
+
54
+ 6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
55
+ IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
56
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
57
+ PURPOSE.
data/README.rdoc ADDED
@@ -0,0 +1,133 @@
1
+ = \RDoc - Ruby Documentation System
2
+
3
+ This is a fork of https://github.com/ruby/rdoc since the 6.3.1 release is missing a file and no subsequent versions have
4
+ been released. See https://github.com/ruby/rdoc/issues/808 and https://github.com/ruby/rdoc/pull/809 for details. gitlab-rdoc
5
+ v6.3.2 has been released with the missing file included: https://rubygems.org/gems/gitlab-rdoc/versions/6.3.2.
6
+
7
+ home :: https://github.com/ruby/rdoc
8
+ rdoc :: https://ruby.github.io/rdoc
9
+ bugs :: https://github.com/ruby/rdoc/issues
10
+ code quality :: {<img src="https://codeclimate.com/github/ruby/rdoc/badges/gpa.svg" alt="Code Climate">}[https://codeclimate.com/github/ruby/rdoc]
11
+
12
+ == Description
13
+
14
+ RDoc produces HTML and command-line documentation for Ruby projects. RDoc
15
+ includes the +rdoc+ and +ri+ tools for generating and displaying documentation
16
+ from the command-line.
17
+
18
+ == Generating Documentation
19
+
20
+ Once installed, you can create documentation using the +rdoc+ command
21
+
22
+ $ rdoc [options] [names...]
23
+
24
+ For an up-to-date option summary, type
25
+
26
+ $ rdoc --help
27
+
28
+ A typical use might be to generate documentation for a package of Ruby
29
+ source (such as RDoc itself).
30
+
31
+ $ rdoc
32
+
33
+ This command generates documentation for all the Ruby and C source
34
+ files in and below the current directory. These will be stored in a
35
+ documentation tree starting in the subdirectory +doc+.
36
+
37
+ You can make this slightly more useful for your readers by having the
38
+ index page contain the documentation for the primary file. In our
39
+ case, we could type
40
+
41
+ % rdoc --main README.rdoc
42
+
43
+ You'll find information on the various formatting tricks you can use
44
+ in comment blocks in the documentation this generates.
45
+
46
+ RDoc uses file extensions to determine how to process each file. File names
47
+ ending +.rb+ and +.rbw+ are assumed to be Ruby source. Files
48
+ ending +.c+ are parsed as C files. All other files are assumed to
49
+ contain just Markup-style markup (with or without leading '#' comment
50
+ markers). If directory names are passed to RDoc, they are scanned
51
+ recursively for C and Ruby source files only.
52
+
53
+ To generate documentation using +rake+ see RDoc::Task[https://ruby.github.io/rdoc/RDocTask.html].
54
+
55
+ To generate documentation programmatically:
56
+
57
+ gem 'rdoc'
58
+ require 'rdoc/rdoc'
59
+
60
+ options = RDoc::Options.new
61
+ # see RDoc::Options
62
+
63
+ rdoc = RDoc::RDoc.new
64
+ rdoc.document options
65
+ # see RDoc::RDoc
66
+
67
+ == Writing Documentation
68
+
69
+ To write documentation for RDoc place a comment above the class, module,
70
+ method, constant, or attribute you want documented:
71
+
72
+ ##
73
+ # This class represents an arbitrary shape by a series of points.
74
+
75
+ class Shape
76
+
77
+ ##
78
+ # Creates a new shape described by a +polyline+.
79
+ #
80
+ # If the +polyline+ does not end at the same point it started at the
81
+ # first pointed is copied and placed at the end of the line.
82
+ #
83
+ # An ArgumentError is raised if the line crosses itself, but shapes may
84
+ # be concave.
85
+
86
+ def initialize polyline
87
+ # ...
88
+ end
89
+
90
+ end
91
+
92
+ The default comment markup format is the RDoc::Markup format.
93
+ TomDoc[rdoc-ref:RDoc::TomDoc], Markdown[rdoc-ref:RDoc::Markdown] and
94
+ RD[rdoc-ref:RDoc::RD] format comments are also supported. You can set the
95
+ default comment format for your entire project by creating a
96
+ <tt>.rdoc_options</tt> file. See RDoc::Options@Saved+Options for instructions
97
+ on creating one. You can also set the comment format for a single file
98
+ through the +:markup:+ directive, but this is only recommended if you wish to
99
+ switch markup formats. See RDoc::Markup@Other+directives.
100
+
101
+ Comments can contain directives that tell RDoc information that it cannot
102
+ otherwise discover through parsing. See RDoc::Markup@Directives to control
103
+ what is or is not documented, to define method arguments or to break up
104
+ methods in a class by topic. See RDoc::Parser::Ruby for directives used to
105
+ teach RDoc about metaprogrammed methods.
106
+
107
+ See RDoc::Parser::C for documenting C extensions with RDoc.
108
+
109
+ To determine how well your project is documented run <tt>rdoc -C lib</tt> to
110
+ get a documentation coverage report. <tt>rdoc -C1 lib</tt> includes parameter
111
+ names in the documentation coverage report.
112
+
113
+ == Bugs
114
+
115
+ See CONTRIBUTING@Bugs for information on filing a bug report. It's OK to file
116
+ a bug report for anything you're having a problem with. If you can't figure
117
+ out how to make RDoc produce the output you like that is probably a
118
+ documentation bug.
119
+
120
+ == License
121
+
122
+ RDoc is Copyright (c) 2001-2003 Dave Thomas, The Pragmatic Programmers.
123
+ Portions (c) 2007-2011 Eric Hodel. Portions copyright others, see individual
124
+ files and LEGAL.rdoc for details.
125
+
126
+ RDoc is free software, and may be redistributed under the terms specified in
127
+ LICENSE.rdoc.
128
+
129
+ == Warranty
130
+
131
+ This software is provided "as is" and without any express or implied
132
+ warranties, including, without limitation, the implied warranties of
133
+ merchantability and fitness for a particular purpose.
data/RI.rdoc ADDED
@@ -0,0 +1,57 @@
1
+ = RI
2
+
3
+ +ri+ is a tool that allows Ruby documentation to be viewed on the command-line.
4
+
5
+ You can use +ri+ to look up information from either the command line or
6
+ interactively. When you run +ri+ without any arguments it will launch in
7
+ interactive mode. In interactive mode you can tab-complete class and method
8
+ names.
9
+
10
+ == Usage
11
+
12
+ To see information for a class, do:
13
+ ri ClassName
14
+
15
+ For example, for the Array class, do:
16
+ ri Array
17
+
18
+ To see information on a method on a class, do:
19
+ ri ClassName.method
20
+
21
+ This will show both instance and class methods. For example, the IO
22
+ class defines both IO::read and IO#read:
23
+ ri IO.read
24
+
25
+ To see information for an instance method, do:
26
+ ri ClassName#method_name
27
+
28
+ For example, for Array's +join+ method, do:
29
+ ri Array#join
30
+
31
+ To see information for a class method, do:
32
+ ri ClassName::method_name
33
+
34
+ For example, for Module's +private+ method, do:
35
+ ri Module::private
36
+
37
+ To read documentation for all +read+ methods, do:
38
+ ri read
39
+
40
+ == Options
41
+
42
+ +ri+ supports a variety of options, all of which can be viewed via +--help+.
43
+ Of particular interest, are:
44
+
45
+ [<tt>-f</tt>]
46
+ Outputs ri data using the selected formatter. You can see the available
47
+ formatters in <tt>ri --help</tt>
48
+ [<tt>-T</tt>]
49
+ Send output to stdout, rather than to a pager.
50
+
51
+ All options also can be specified through the +RI+ environment variable.
52
+ Command-line options always override those specified in the +RI+ environment
53
+ variable.
54
+
55
+ The +RI_PAGER+ environment variable allows you to choose a particular pager or
56
+ particular options for your pager.
57
+
data/Rakefile ADDED
@@ -0,0 +1,101 @@
1
+ $:.unshift File.expand_path 'lib'
2
+ require 'rdoc/task'
3
+ require 'bundler/gem_tasks'
4
+ require 'rake/testtask'
5
+
6
+ task :docs => :generate
7
+ task :test => [:normal_test, :rubygems_test]
8
+
9
+ PARSER_FILES = %w[
10
+ lib/rdoc/rd/block_parser.ry
11
+ lib/rdoc/rd/inline_parser.ry
12
+ lib/rdoc/markdown.kpeg
13
+ lib/rdoc/markdown/literals.kpeg
14
+ ]
15
+
16
+ $rdoc_rakefile = true
17
+
18
+ task :default => :test
19
+
20
+ RDoc::Task.new do |doc|
21
+ doc.main = 'README.rdoc'
22
+ doc.title = "rdoc #{RDoc::VERSION} Documentation"
23
+ doc.rdoc_dir = 'html'
24
+ doc.rdoc_files = FileList.new %w[lib/**/*.rb *.rdoc] - PARSER_FILES
25
+ end
26
+
27
+ task ghpages: :rdoc do
28
+ `git checkout gh-pages`
29
+ require "fileutils"
30
+ FileUtils.rm_rf "/tmp/html"
31
+ FileUtils.mv "html", "/tmp"
32
+ FileUtils.rm_rf "*"
33
+ FileUtils.cp_r Dir.glob("/tmp/html/*"), "."
34
+ end
35
+
36
+ Rake::TestTask.new(:normal_test) do |t|
37
+ t.libs << "test/rdoc"
38
+ t.verbose = true
39
+ t.deps = :generate
40
+ t.test_files = FileList["test/**/test_*.rb"].exclude("test/rdoc/test_rdoc_rubygems_hook.rb")
41
+ end
42
+
43
+ Rake::TestTask.new(:rubygems_test) do |t|
44
+ t.libs << "test/rdoc"
45
+ t.verbose = true
46
+ t.deps = :generate
47
+ t.pattern = "test/rdoc/test_rdoc_rubygems_hook.rb"
48
+ end
49
+
50
+ path = "pkg/#{Bundler::GemHelper.gemspec.full_name}"
51
+
52
+ package_parser_files = PARSER_FILES.map do |parser_file|
53
+ name = File.basename(parser_file, File.extname(parser_file))
54
+ _path = File.dirname(parser_file)
55
+ package_parser_file = "#{path}/#{name}.rb"
56
+ parsed_file = "#{_path}/#{name}.rb"
57
+
58
+ file package_parser_file => parsed_file # ensure copy runs before racc
59
+
60
+ package_parser_file
61
+ end
62
+
63
+ parsed_files = PARSER_FILES.map do |parser_file|
64
+ ext = File.extname(parser_file)
65
+ parsed_file = "#{parser_file.chomp(ext)}.rb"
66
+
67
+ file parsed_file => parser_file do |t|
68
+ puts "Generating #{parsed_file}..."
69
+ case ext
70
+ when '.ry' # need racc
71
+ racc = Gem.bin_path 'racc', 'racc'
72
+ rb_file = parser_file.gsub(/\.ry\z/, ".rb")
73
+ ruby "#{racc} -l -o #{rb_file} #{parser_file}"
74
+ open(rb_file, 'r+') do |f|
75
+ newtext = "# frozen_string_literal: true\n#{f.read}"
76
+ f.rewind
77
+ f.write newtext
78
+ end
79
+ when '.kpeg' # need kpeg
80
+ kpeg = Gem.bin_path 'kpeg', 'kpeg'
81
+ rb_file = parser_file.gsub(/\.kpeg\z/, ".rb")
82
+ ruby "#{kpeg} -fsv -o #{rb_file} #{parser_file}"
83
+ end
84
+ end
85
+
86
+ parsed_file
87
+ end
88
+
89
+ task "#{path}.gem" => package_parser_files
90
+ desc "Generate all files used racc and kpeg"
91
+ task :generate => parsed_files
92
+
93
+ begin
94
+ require 'rubocop/rake_task'
95
+ rescue LoadError
96
+ else
97
+ RuboCop::RakeTask.new(:rubocop) do |t|
98
+ t.options = [*parsed_files]
99
+ end
100
+ task :build => [:generate, "rubocop:auto_correct"]
101
+ end
data/TODO.rdoc ADDED
@@ -0,0 +1,59 @@
1
+ This file contains some things that might happen in RDoc, or might not.
2
+ Forward Looking Statements applies.
3
+
4
+ === RDoc::VERSION.succ
5
+
6
+ Blockers:
7
+
8
+ * Update LICENSE to match ruby's switch
9
+ * The alias keyword should not be bidirectional
10
+ * Fix RDoc::Parser#use_markup to handle the filename (see TODO)
11
+ * Restore backwards compatibility due to paragraph text joining from existing
12
+ ri files
13
+ * Fix consumption of , after link like: RDoc[rdoc-ref:RDoc], <- comma here
14
+ * Remove support for links like Matrix[*rows]
15
+
16
+ Nice to have:
17
+
18
+ * Parse only changed files (like in ruby)
19
+ * Page of Glory (or Shame) in HTML output showing documentation coverage
20
+ statistics.
21
+ * Link to the parent-class implementation of methods that use super
22
+ * Add direct accessor to RDoc::Options to RDoc::Task
23
+ * Remove "Public" in HTML output if there are only public methods
24
+ * Method markup support for rd documentation (per rd syntax)
25
+ * Improve SIGINFO handling
26
+ * Global variable support
27
+ * Provide the code_object to directive handlers
28
+
29
+ === 4
30
+
31
+ API changes to RDoc
32
+
33
+ * RDoc::TopLevel#add_method should automatically create the appropriate method
34
+ class rather than requiring one be passed in.
35
+ * Remove #comment= from Context subclasses in favor of #add_comment
36
+ * Add versions to RDoc::Markup syntax tree marshal format
37
+ * Comments can no longer be Strings
38
+
39
+ === Crazy Ideas
40
+
41
+ * Auto-normalize heading levels to look OK. It's weird to see an <h1> in
42
+ the middle of a method section.
43
+ * RDoc::CodeObject
44
+ * Move into own namespace
45
+ * Rename TopLevel to File
46
+ * Rename Context to Container
47
+ * Rename NormalClass to Class
48
+
49
+ === Accessibility
50
+
51
+ Page title in right hand side
52
+
53
+ Table of contents in left hand side as sub-list under main heading
54
+
55
+ For class list, never method list, method summary at top
56
+
57
+ table-of-contents-navigation div => nav + role="navigation"
58
+
59
+ type "mod", focus is still on "mod"