voloko-sdoc 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (95) hide show
  1. data/rdoc/History.txt +254 -0
  2. data/rdoc/Manifest.txt +126 -0
  3. data/rdoc/README.txt +47 -0
  4. data/rdoc/RI.txt +58 -0
  5. data/rdoc/Rakefile +70 -0
  6. data/rdoc/bin/rdoc +35 -0
  7. data/rdoc/bin/ri +5 -0
  8. data/rdoc/lib/rdoc/alias.rb +54 -0
  9. data/rdoc/lib/rdoc/anon_class.rb +10 -0
  10. data/rdoc/lib/rdoc/any_method.rb +190 -0
  11. data/rdoc/lib/rdoc/attr.rb +79 -0
  12. data/rdoc/lib/rdoc/cache.rb +41 -0
  13. data/rdoc/lib/rdoc/class_module.rb +87 -0
  14. data/rdoc/lib/rdoc/code_object.rb +152 -0
  15. data/rdoc/lib/rdoc/code_objects.rb +23 -0
  16. data/rdoc/lib/rdoc/constant.rb +36 -0
  17. data/rdoc/lib/rdoc/context.rb +712 -0
  18. data/rdoc/lib/rdoc/diagram.rb +340 -0
  19. data/rdoc/lib/rdoc/dot.rb +249 -0
  20. data/rdoc/lib/rdoc/generator/darkfish.rb +455 -0
  21. data/rdoc/lib/rdoc/generator/markup.rb +194 -0
  22. data/rdoc/lib/rdoc/generator/ri.rb +230 -0
  23. data/rdoc/lib/rdoc/generator/template/darkfish/classpage.rhtml +281 -0
  24. data/rdoc/lib/rdoc/generator/template/darkfish/filepage.rhtml +112 -0
  25. data/rdoc/lib/rdoc/generator/template/darkfish/images/brick.png +0 -0
  26. data/rdoc/lib/rdoc/generator/template/darkfish/images/brick_link.png +0 -0
  27. data/rdoc/lib/rdoc/generator/template/darkfish/images/bug.png +0 -0
  28. data/rdoc/lib/rdoc/generator/template/darkfish/images/bullet_black.png +0 -0
  29. data/rdoc/lib/rdoc/generator/template/darkfish/images/bullet_toggle_minus.png +0 -0
  30. data/rdoc/lib/rdoc/generator/template/darkfish/images/bullet_toggle_plus.png +0 -0
  31. data/rdoc/lib/rdoc/generator/template/darkfish/images/date.png +0 -0
  32. data/rdoc/lib/rdoc/generator/template/darkfish/images/find.png +0 -0
  33. data/rdoc/lib/rdoc/generator/template/darkfish/images/loadingAnimation.gif +0 -0
  34. data/rdoc/lib/rdoc/generator/template/darkfish/images/macFFBgHack.png +0 -0
  35. data/rdoc/lib/rdoc/generator/template/darkfish/images/package.png +0 -0
  36. data/rdoc/lib/rdoc/generator/template/darkfish/images/page_green.png +0 -0
  37. data/rdoc/lib/rdoc/generator/template/darkfish/images/page_white_text.png +0 -0
  38. data/rdoc/lib/rdoc/generator/template/darkfish/images/page_white_width.png +0 -0
  39. data/rdoc/lib/rdoc/generator/template/darkfish/images/plugin.png +0 -0
  40. data/rdoc/lib/rdoc/generator/template/darkfish/images/ruby.png +0 -0
  41. data/rdoc/lib/rdoc/generator/template/darkfish/images/tag_green.png +0 -0
  42. data/rdoc/lib/rdoc/generator/template/darkfish/images/wrench.png +0 -0
  43. data/rdoc/lib/rdoc/generator/template/darkfish/images/wrench_orange.png +0 -0
  44. data/rdoc/lib/rdoc/generator/template/darkfish/images/zoom.png +0 -0
  45. data/rdoc/lib/rdoc/generator/template/darkfish/index.rhtml +64 -0
  46. data/rdoc/lib/rdoc/generator/template/darkfish/js/darkfish.js +116 -0
  47. data/rdoc/lib/rdoc/generator/template/darkfish/js/jquery.js +32 -0
  48. data/rdoc/lib/rdoc/generator/template/darkfish/js/quicksearch.js +114 -0
  49. data/rdoc/lib/rdoc/generator/template/darkfish/js/thickbox-compressed.js +10 -0
  50. data/rdoc/lib/rdoc/generator/template/darkfish/rdoc.css +696 -0
  51. data/rdoc/lib/rdoc/generator.rb +8 -0
  52. data/rdoc/lib/rdoc/ghost_method.rb +8 -0
  53. data/rdoc/lib/rdoc/include.rb +39 -0
  54. data/rdoc/lib/rdoc/known_classes.rb +68 -0
  55. data/rdoc/lib/rdoc/markup/attribute_manager.rb +311 -0
  56. data/rdoc/lib/rdoc/markup/formatter.rb +25 -0
  57. data/rdoc/lib/rdoc/markup/fragments.rb +377 -0
  58. data/rdoc/lib/rdoc/markup/inline.rb +126 -0
  59. data/rdoc/lib/rdoc/markup/lines.rb +156 -0
  60. data/rdoc/lib/rdoc/markup/preprocess.rb +80 -0
  61. data/rdoc/lib/rdoc/markup/to_flow.rb +211 -0
  62. data/rdoc/lib/rdoc/markup/to_html.rb +406 -0
  63. data/rdoc/lib/rdoc/markup/to_html_crossref.rb +140 -0
  64. data/rdoc/lib/rdoc/markup/to_latex.rb +328 -0
  65. data/rdoc/lib/rdoc/markup/to_test.rb +53 -0
  66. data/rdoc/lib/rdoc/markup/to_texinfo.rb +73 -0
  67. data/rdoc/lib/rdoc/markup.rb +378 -0
  68. data/rdoc/lib/rdoc/meta_method.rb +8 -0
  69. data/rdoc/lib/rdoc/normal_class.rb +18 -0
  70. data/rdoc/lib/rdoc/normal_module.rb +34 -0
  71. data/rdoc/lib/rdoc/options.rb +542 -0
  72. data/rdoc/lib/rdoc/parser/c.rb +678 -0
  73. data/rdoc/lib/rdoc/parser/perl.rb +165 -0
  74. data/rdoc/lib/rdoc/parser/ruby.rb +2904 -0
  75. data/rdoc/lib/rdoc/parser/simple.rb +39 -0
  76. data/rdoc/lib/rdoc/parser.rb +138 -0
  77. data/rdoc/lib/rdoc/rdoc.rb +375 -0
  78. data/rdoc/lib/rdoc/require.rb +32 -0
  79. data/rdoc/lib/rdoc/ri/cache.rb +187 -0
  80. data/rdoc/lib/rdoc/ri/descriptions.rb +156 -0
  81. data/rdoc/lib/rdoc/ri/display.rb +340 -0
  82. data/rdoc/lib/rdoc/ri/driver.rb +828 -0
  83. data/rdoc/lib/rdoc/ri/formatter.rb +654 -0
  84. data/rdoc/lib/rdoc/ri/paths.rb +93 -0
  85. data/rdoc/lib/rdoc/ri/reader.rb +106 -0
  86. data/rdoc/lib/rdoc/ri/util.rb +79 -0
  87. data/rdoc/lib/rdoc/ri/writer.rb +68 -0
  88. data/rdoc/lib/rdoc/ri.rb +8 -0
  89. data/rdoc/lib/rdoc/single_class.rb +8 -0
  90. data/rdoc/lib/rdoc/stats.rb +178 -0
  91. data/rdoc/lib/rdoc/task.rb +276 -0
  92. data/rdoc/lib/rdoc/tokenstream.rb +33 -0
  93. data/rdoc/lib/rdoc/top_level.rb +242 -0
  94. data/rdoc/lib/rdoc.rb +398 -0
  95. metadata +1 -1
data/rdoc/lib/rdoc.rb ADDED
@@ -0,0 +1,398 @@
1
+ $DEBUG_RDOC = nil
2
+
3
+ # :main: README.txt
4
+
5
+ ##
6
+ # = \RDoc - Ruby Documentation System
7
+ #
8
+ # This package contains RDoc and RDoc::Markup. RDoc is an application that
9
+ # produces documentation for one or more Ruby source files. It works similarly
10
+ # to JavaDoc, parsing the source, and extracting the definition for classes,
11
+ # modules, and methods (along with includes and requires). It associates with
12
+ # these optional documentation contained in the immediately preceding comment
13
+ # block, and then renders the result using a pluggable output formatter.
14
+ # RDoc::Markup is a library that converts plain text into various output
15
+ # formats. The markup library is used to interpret the comment blocks that
16
+ # RDoc uses to document methods, classes, and so on.
17
+ #
18
+ # == Roadmap
19
+ #
20
+ # * If you want to use RDoc to create documentation for your Ruby source files,
21
+ # read on.
22
+ # * If you want to include extensions written in C, see RDoc::Parser::C
23
+ # * If you want to drive RDoc programmatically, see RDoc::RDoc.
24
+ # * If you want to use the library to format text blocks into HTML, have a look
25
+ # at RDoc::Markup.
26
+ # * If you want to try writing your own HTML output template, see
27
+ # RDoc::Generator::HTML
28
+ #
29
+ # == Summary
30
+ #
31
+ # Once installed, you can create documentation using the +rdoc+ command
32
+ #
33
+ # % rdoc [options] [names...]
34
+ #
35
+ # For an up-to-date option summary, type
36
+ # % rdoc --help
37
+ #
38
+ # A typical use might be to generate documentation for a package of Ruby
39
+ # source (such as RDoc itself).
40
+ #
41
+ # % rdoc
42
+ #
43
+ # This command generates documentation for all the Ruby and C source
44
+ # files in and below the current directory. These will be stored in a
45
+ # documentation tree starting in the subdirectory +doc+.
46
+ #
47
+ # You can make this slightly more useful for your readers by having the
48
+ # index page contain the documentation for the primary file. In our
49
+ # case, we could type
50
+ #
51
+ # % rdoc --main rdoc.rb
52
+ #
53
+ # You'll find information on the various formatting tricks you can use
54
+ # in comment blocks in the documentation this generates.
55
+ #
56
+ # RDoc uses file extensions to determine how to process each file. File names
57
+ # ending +.rb+ and +.rbw+ are assumed to be Ruby source. Files
58
+ # ending +.c+ are parsed as C files. All other files are assumed to
59
+ # contain just Markup-style markup (with or without leading '#' comment
60
+ # markers). If directory names are passed to RDoc, they are scanned
61
+ # recursively for C and Ruby source files only.
62
+ #
63
+ # == \Options
64
+ #
65
+ # rdoc can be passed a variety of command-line options. In addition,
66
+ # options can be specified via the +RDOCOPT+ environment variable, which
67
+ # functions similarly to the +RUBYOPT+ environment variable.
68
+ #
69
+ # % export RDOCOPT="-S"
70
+ #
71
+ # will make rdoc default to inline method source code. Command-line options
72
+ # always will override those in +RDOCOPT+.
73
+ #
74
+ # Run:
75
+ #
76
+ # rdoc --help
77
+ #
78
+ # for full details on rdoc's options.
79
+ #
80
+ # == Documenting Source Code
81
+ #
82
+ # Comment blocks can be written fairly naturally, either using <tt>#</tt> on
83
+ # successive lines of the comment, or by including the comment in
84
+ # a =begin/=end block. If you use the latter form, the =begin line must be
85
+ # flagged with an RDoc tag:
86
+ #
87
+ # =begin rdoc
88
+ # Documentation to be processed by RDoc.
89
+ #
90
+ # ...
91
+ # =end
92
+ #
93
+ # RDoc stops processing comments if it finds a comment line containing
94
+ # a <tt>--</tt>. This can be used to separate external from internal
95
+ # comments, or to stop a comment being associated with a method, class, or
96
+ # module. Commenting can be turned back on with a line that starts with a
97
+ # <tt>++</tt>.
98
+ #
99
+ # ##
100
+ # # Extract the age and calculate the date-of-birth.
101
+ # #--
102
+ # # FIXME: fails if the birthday falls on February 29th
103
+ # #++
104
+ # # The DOB is returned as a Time object.
105
+ #
106
+ # def get_dob(person)
107
+ # # ...
108
+ # end
109
+ #
110
+ # Names of classes, files, and any method names containing an
111
+ # underscore or preceded by a hash character are automatically hyperlinked
112
+ # from comment text to their description.
113
+ #
114
+ # Method parameter lists are extracted and displayed with the method
115
+ # description. If a method calls +yield+, then the parameters passed to yield
116
+ # will also be displayed:
117
+ #
118
+ # def fred
119
+ # ...
120
+ # yield line, address
121
+ #
122
+ # This will get documented as:
123
+ #
124
+ # fred() { |line, address| ... }
125
+ #
126
+ # You can override this using a comment containing ':yields: ...' immediately
127
+ # after the method definition
128
+ #
129
+ # def fred # :yields: index, position
130
+ # # ...
131
+ #
132
+ # yield line, address
133
+ #
134
+ # which will get documented as
135
+ #
136
+ # fred() { |index, position| ... }
137
+ #
138
+ # +:yields:+ is an example of a documentation directive. These appear
139
+ # immediately after the start of the document element they are modifying.
140
+ #
141
+ # RDoc automatically cross-references words with underscores or camel-case.
142
+ # To suppress cross-references, prefix the word with a \\ character. To
143
+ # include special characters like "\\n", you'll need to use two \\
144
+ # characters like "\\\\\\n".
145
+ #
146
+ # == \Markup
147
+ #
148
+ # * The markup engine looks for a document's natural left margin. This is
149
+ # used as the initial margin for the document.
150
+ #
151
+ # * Consecutive lines starting at this margin are considered to be a
152
+ # paragraph.
153
+ #
154
+ # * If a paragraph starts with a "*", "-", or with "<digit>.", then it is
155
+ # taken to be the start of a list. The margin in increased to be the first
156
+ # non-space following the list start flag. Subsequent lines should be
157
+ # indented to this new margin until the list ends. For example:
158
+ #
159
+ # * this is a list with three paragraphs in
160
+ # the first item. This is the first paragraph.
161
+ #
162
+ # And this is the second paragraph.
163
+ #
164
+ # 1. This is an indented, numbered list.
165
+ # 2. This is the second item in that list
166
+ #
167
+ # This is the third conventional paragraph in the
168
+ # first list item.
169
+ #
170
+ # * This is the second item in the original list
171
+ #
172
+ # * You can also construct labeled lists, sometimes called description
173
+ # or definition lists. Do this by putting the label in square brackets
174
+ # and indenting the list body:
175
+ #
176
+ # [cat] a small furry mammal
177
+ # that seems to sleep a lot
178
+ #
179
+ # [ant] a little insect that is known
180
+ # to enjoy picnics
181
+ #
182
+ # A minor variation on labeled lists uses two colons to separate the
183
+ # label from the list body:
184
+ #
185
+ # cat:: a small furry mammal
186
+ # that seems to sleep a lot
187
+ #
188
+ # ant:: a little insect that is known
189
+ # to enjoy picnics
190
+ #
191
+ # This latter style guarantees that the list bodies' left margins are
192
+ # aligned: think of them as a two column table.
193
+ #
194
+ # * Any line that starts to the right of the current margin is treated
195
+ # as verbatim text. This is useful for code listings. The example of a
196
+ # list above is also verbatim text.
197
+ #
198
+ # * A line starting with an equals sign (=) is treated as a
199
+ # heading. Level one headings have one equals sign, level two headings
200
+ # have two,and so on.
201
+ #
202
+ # * A line starting with three or more hyphens (at the current indent)
203
+ # generates a horizontal rule. The more hyphens, the thicker the rule
204
+ # (within reason, and if supported by the output device)
205
+ #
206
+ # * You can use markup within text (except verbatim) to change the
207
+ # appearance of parts of that text. Out of the box, RDoc::Markup
208
+ # supports word-based and general markup.
209
+ #
210
+ # Word-based markup uses flag characters around individual words:
211
+ #
212
+ # [<tt>\*word*</tt>] displays word in a *bold* font
213
+ # [<tt>\_word_</tt>] displays word in an _emphasized_ font
214
+ # [<tt>\+word+</tt>] displays word in a +code+ font
215
+ #
216
+ # General markup affects text between a start delimiter and and end
217
+ # delimiter. Not surprisingly, these delimiters look like HTML markup.
218
+ #
219
+ # [<tt>\<b>text...</b></tt>] displays word in a *bold* font
220
+ # [<tt>\<em>text...</em></tt>] displays word in an _emphasized_ font
221
+ # [<tt>\<i>text...</i></tt>] displays word in an <i>italicized</i> font
222
+ # [<tt>\<tt>text...\</tt></tt>] displays word in a +code+ font
223
+ #
224
+ # Unlike conventional Wiki markup, general markup can cross line
225
+ # boundaries. You can turn off the interpretation of markup by
226
+ # preceding the first character with a backslash. This only works for
227
+ # simple markup, not HTML-style markup.
228
+ #
229
+ # * Hyperlinks to the web starting http:, mailto:, ftp:, or www. are
230
+ # recognized. An HTTP url that references an external image file is
231
+ # converted into an inline \<IMG..>. Hyperlinks starting 'link:' are
232
+ # assumed to refer to local files whose path is relative to the --op
233
+ # directory.
234
+ #
235
+ # Hyperlinks can also be of the form <tt>label</tt>[url], in which
236
+ # case the label is used in the displayed text, and +url+ is
237
+ # used as the target. If +label+ contains multiple words,
238
+ # put it in braces: <em>{multi word label}[</em>url<em>]</em>.
239
+ #
240
+ # Example hyperlinks:
241
+ #
242
+ # link:RDoc.html
243
+ # http://rdoc.rubyforge.org
244
+ # mailto:user@example.com
245
+ # {RDoc Documentation}[http://rdoc.rubyforge.org]
246
+ # {RDoc Markup}[link:RDoc/Markup.html]
247
+ #
248
+ # == Directives
249
+ #
250
+ # [+:nodoc:+ / +:nodoc:+ all]
251
+ # This directive prevents documentation for the element from
252
+ # being generated. For classes and modules, the methods, aliases,
253
+ # constants, and attributes directly within the affected class or
254
+ # module also will be omitted. By default, though, modules and
255
+ # classes within that class of module _will_ be documented. This is
256
+ # turned off by adding the +all+ modifier.
257
+ #
258
+ # module MyModule # :nodoc:
259
+ # class Input
260
+ # end
261
+ # end
262
+ #
263
+ # module OtherModule # :nodoc: all
264
+ # class Output
265
+ # end
266
+ # end
267
+ #
268
+ # In the above code, only class <tt>MyModule::Input</tt> will be documented.
269
+ # The +:nodoc:+ directive is global across all files for the class or module
270
+ # to which it applies, so use +:stopdoc:+/+:startdoc:+ to suppress
271
+ # documentation only for a particular set of methods, etc.
272
+ #
273
+ # [+:doc:+]
274
+ # Forces a method or attribute to be documented even if it wouldn't be
275
+ # otherwise. Useful if, for example, you want to include documentation of a
276
+ # particular private method.
277
+ #
278
+ # [+:notnew:+]
279
+ # Only applicable to the +initialize+ instance method. Normally RDoc
280
+ # assumes that the documentation and parameters for +initialize+ are
281
+ # actually for the +new+ method, and so fakes out a +new+ for the class.
282
+ # The +:notnew:+ modifier stops this. Remember that +initialize+ is private,
283
+ # so you won't see the documentation unless you use the +-a+ command line
284
+ # option.
285
+ #
286
+ # Comment blocks can contain other directives:
287
+ #
288
+ # [<tt>:section: title</tt>]
289
+ # Starts a new section in the output. The title following +:section:+ is
290
+ # used as the section heading, and the remainder of the comment containing
291
+ # the section is used as introductory text. Subsequent methods, aliases,
292
+ # attributes, and classes will be documented in this section. A :section:
293
+ # comment block may have one or more lines before the :section: directive.
294
+ # These will be removed, and any identical lines at the end of the block are
295
+ # also removed. This allows you to add visual cues such as:
296
+ #
297
+ # # ----------------------------------------
298
+ # # :section: My Section
299
+ # # This is the section that I wrote.
300
+ # # See it glisten in the noon-day sun.
301
+ # # ----------------------------------------
302
+ #
303
+ # [+:call-seq:+]
304
+ # Lines up to the next blank line in the comment are treated as the method's
305
+ # calling sequence, overriding the default parsing of method parameters and
306
+ # yield arguments.
307
+ #
308
+ # [+:include:+ _filename_]
309
+ # \Include the contents of the named file at this point. The file will be
310
+ # searched for in the directories listed by the +--include+ option, or in
311
+ # the current directory by default. The contents of the file will be
312
+ # shifted to have the same indentation as the ':' at the start of
313
+ # the :include: directive.
314
+ #
315
+ # [+:title:+ _text_]
316
+ # Sets the title for the document. Equivalent to the <tt>--title</tt>
317
+ # command line parameter. (The command line parameter overrides any :title:
318
+ # directive in the source).
319
+ #
320
+ # [+:enddoc:+]
321
+ # Document nothing further at the current level.
322
+ #
323
+ # [+:main:+ _name_]
324
+ # Equivalent to the <tt>--main</tt> command line parameter.
325
+ #
326
+ # [+:stopdoc:+ / +:startdoc:+]
327
+ # Stop and start adding new documentation elements to the current container.
328
+ # For example, if a class has a number of constants that you don't want to
329
+ # document, put a +:stopdoc:+ before the first, and a +:startdoc:+ after the
330
+ # last. If you don't specify a +:startdoc:+ by the end of the container,
331
+ # disables documentation for the entire class or module.
332
+ #
333
+ # == Other stuff
334
+ #
335
+ # RDoc is currently being maintained by Eric Hodel <drbrain@segment7.net>
336
+ #
337
+ # Dave Thomas <dave@pragmaticprogrammer.com> is the original author of RDoc.
338
+ #
339
+ # == Credits
340
+ #
341
+ # * The Ruby parser in rdoc/parse.rb is based heavily on the outstanding
342
+ # work of Keiju ISHITSUKA of Nippon Rational Inc, who produced the Ruby
343
+ # parser for irb and the rtags package.
344
+ #
345
+ # * Code to diagram classes and modules was written by Sergey A Yanovitsky
346
+ # (Jah) of Enticla.
347
+ #
348
+ # * Charset patch from MoonWolf.
349
+ #
350
+ # * Rich Kilmer wrote the kilmer.rb output template.
351
+ #
352
+ # * Dan Brickley led the design of the RDF format.
353
+ #
354
+ # == License
355
+ #
356
+ # RDoc is Copyright (c) 2001-2003 Dave Thomas, The Pragmatic Programmers. It
357
+ # is free software, and may be redistributed under the terms specified
358
+ # in the README file of the Ruby distribution.
359
+ #
360
+ # == Warranty
361
+ #
362
+ # This software is provided "as is" and without any express or implied
363
+ # warranties, including, without limitation, the implied warranties of
364
+ # merchantibility and fitness for a particular purpose.
365
+
366
+ module RDoc
367
+
368
+ ##
369
+ # Exception thrown by any rdoc error.
370
+
371
+ class Error < RuntimeError; end
372
+
373
+ RDocError = Error # :nodoc:
374
+
375
+ ##
376
+ # RDoc version you are using
377
+
378
+ VERSION = "2.4.2"
379
+
380
+ ##
381
+ # Name of the dotfile that contains the description of files to be processed
382
+ # in the current directory
383
+
384
+ DOT_DOC_FILENAME = ".document"
385
+
386
+ GENERAL_MODIFIERS = %w[nodoc].freeze
387
+
388
+ CLASS_MODIFIERS = GENERAL_MODIFIERS
389
+
390
+ ATTR_MODIFIERS = GENERAL_MODIFIERS
391
+
392
+ CONSTANT_MODIFIERS = GENERAL_MODIFIERS
393
+
394
+ METHOD_MODIFIERS = GENERAL_MODIFIERS +
395
+ %w[arg args yield yields notnew not-new not_new doc]
396
+
397
+ end
398
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: voloko-sdoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vladimir Kolesnikov