rdoc 6.7.0 → 6.12.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.
- checksums.yaml +4 -4
- data/ExampleMarkdown.md +2 -0
- data/ExampleRDoc.rdoc +2 -0
- data/History.rdoc +64 -62
- data/LICENSE.rdoc +2 -0
- data/README.rdoc +13 -0
- data/RI.md +842 -0
- data/TODO.rdoc +8 -7
- data/lib/rdoc/{alias.rb → code_object/alias.rb} +1 -1
- data/lib/rdoc/{any_method.rb → code_object/any_method.rb} +3 -3
- data/lib/rdoc/{attr.rb → code_object/attr.rb} +1 -1
- data/lib/rdoc/{class_module.rb → code_object/class_module.rb} +82 -12
- data/lib/rdoc/{constant.rb → code_object/constant.rb} +1 -1
- data/lib/rdoc/{context → code_object/context}/section.rb +10 -68
- data/lib/rdoc/{method_attr.rb → code_object/method_attr.rb} +17 -5
- data/lib/rdoc/{top_level.rb → code_object/top_level.rb} +5 -5
- data/lib/rdoc/code_object.rb +6 -1
- data/lib/rdoc/comment.rb +11 -1
- data/lib/rdoc/generator/darkfish.rb +41 -3
- data/lib/rdoc/generator/pot/message_extractor.rb +1 -1
- data/lib/rdoc/generator/pot/po_entry.rb +1 -1
- data/lib/rdoc/generator/template/darkfish/_head.rhtml +23 -0
- data/lib/rdoc/generator/template/darkfish/_sidebar_classes.rhtml +1 -0
- data/lib/rdoc/generator/template/darkfish/_sidebar_methods.rhtml +20 -11
- data/lib/rdoc/generator/template/darkfish/_sidebar_parent.rhtml +3 -8
- data/lib/rdoc/generator/template/darkfish/_sidebar_toggle.rhtml +3 -0
- data/lib/rdoc/generator/template/darkfish/class.rhtml +69 -43
- data/lib/rdoc/generator/template/darkfish/css/rdoc.css +380 -399
- data/lib/rdoc/generator/template/darkfish/index.rhtml +11 -10
- data/lib/rdoc/generator/template/darkfish/js/darkfish.js +24 -1
- data/lib/rdoc/generator/template/darkfish/page.rhtml +5 -5
- data/lib/rdoc/generator/template/darkfish/servlet_not_found.rhtml +10 -8
- data/lib/rdoc/generator/template/darkfish/servlet_root.rhtml +5 -2
- data/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml +11 -0
- data/lib/rdoc/markdown.kpeg +1 -1
- data/lib/rdoc/markdown.rb +21 -11
- data/lib/rdoc/markup/attribute_manager.rb +2 -2
- data/lib/rdoc/markup/formatter.rb +19 -12
- data/lib/rdoc/markup/pre_process.rb +26 -6
- data/lib/rdoc/markup/to_bs.rb +1 -1
- data/lib/rdoc/markup/to_html.rb +1 -1
- data/lib/rdoc/markup/to_html_crossref.rb +63 -12
- data/lib/rdoc/markup/to_rdoc.rb +5 -5
- data/lib/rdoc/markup.rb +18 -13
- data/lib/rdoc/options.rb +78 -12
- data/lib/rdoc/parser/c.rb +26 -2
- data/lib/rdoc/parser/changelog.rb +5 -4
- data/lib/rdoc/parser/prism_ruby.rb +1099 -0
- data/lib/rdoc/parser/ripper_state_lex.rb +7 -305
- data/lib/rdoc/parser/ruby.rb +16 -7
- data/lib/rdoc/parser/simple.rb +1 -1
- data/lib/rdoc/parser.rb +5 -4
- data/lib/rdoc/rd/block_parser.rb +3 -3
- data/lib/rdoc/rd/inline_parser.rb +3 -3
- data/lib/rdoc/rdoc.rb +6 -3
- data/lib/rdoc/ri/driver.rb +74 -29
- data/lib/rdoc/rubygems_hook.rb +90 -8
- data/lib/rdoc/store.rb +12 -0
- data/lib/rdoc/task.rb +2 -3
- data/lib/rdoc/tom_doc.rb +1 -7
- data/lib/rdoc/version.rb +1 -1
- data/lib/rdoc.rb +22 -24
- data/lib/rubygems_plugin.rb +23 -0
- metadata +27 -26
- data/RI.rdoc +0 -57
- data/lib/rdoc/generator/template/darkfish/.document +0 -0
- data/lib/rdoc/generator/template/json_index/.document +0 -1
- /data/lib/rdoc/{anon_class.rb → code_object/anon_class.rb} +0 -0
- /data/lib/rdoc/{context.rb → code_object/context.rb} +0 -0
- /data/lib/rdoc/{extend.rb → code_object/extend.rb} +0 -0
- /data/lib/rdoc/{ghost_method.rb → code_object/ghost_method.rb} +0 -0
- /data/lib/rdoc/{include.rb → code_object/include.rb} +0 -0
- /data/lib/rdoc/{meta_method.rb → code_object/meta_method.rb} +0 -0
- /data/lib/rdoc/{mixin.rb → code_object/mixin.rb} +0 -0
- /data/lib/rdoc/{normal_class.rb → code_object/normal_class.rb} +0 -0
- /data/lib/rdoc/{normal_module.rb → code_object/normal_module.rb} +0 -0
- /data/lib/rdoc/{require.rb → code_object/require.rb} +0 -0
- /data/lib/rdoc/{single_class.rb → code_object/single_class.rb} +0 -0
data/lib/rdoc/ri/driver.rb
CHANGED
@@ -79,6 +79,7 @@ class RDoc::RI::Driver
|
|
79
79
|
options[:interactive] = false
|
80
80
|
options[:profile] = false
|
81
81
|
options[:show_all] = false
|
82
|
+
options[:expand_refs] = true
|
82
83
|
options[:use_stdout] = !$stdout.tty?
|
83
84
|
options[:width] = 72
|
84
85
|
|
@@ -110,10 +111,6 @@ class RDoc::RI::Driver
|
|
110
111
|
options = default_options
|
111
112
|
|
112
113
|
opts = OptionParser.new do |opt|
|
113
|
-
opt.accept File do |file,|
|
114
|
-
File.readable?(file) and not File.directory?(file) and file
|
115
|
-
end
|
116
|
-
|
117
114
|
opt.program_name = File.basename $0
|
118
115
|
opt.version = RDoc::VERSION
|
119
116
|
opt.release = nil
|
@@ -249,6 +246,12 @@ or the PAGER environment variable.
|
|
249
246
|
|
250
247
|
opt.separator nil
|
251
248
|
|
249
|
+
opt.on("--[no-]expand-refs", "Expand rdoc-refs at the end of output") do |value|
|
250
|
+
options[:expand_refs] = value
|
251
|
+
end
|
252
|
+
|
253
|
+
opt.separator nil
|
254
|
+
|
252
255
|
opt.on("--help", "-h",
|
253
256
|
"Show help and exit.") do
|
254
257
|
puts opts
|
@@ -345,9 +348,17 @@ or the PAGER environment variable.
|
|
345
348
|
|
346
349
|
opt.separator nil
|
347
350
|
|
348
|
-
opt.on("--dump=CACHE",
|
351
|
+
opt.on("--dump=CACHE",
|
349
352
|
"Dump data from an ri cache or data file.") do |value|
|
350
|
-
|
353
|
+
unless File.readable?(value)
|
354
|
+
abort "#{value.inspect} is not readable"
|
355
|
+
end
|
356
|
+
|
357
|
+
if File.directory?(value)
|
358
|
+
abort "#{value.inspect} is a directory"
|
359
|
+
end
|
360
|
+
|
361
|
+
options[:dump_path] = File.new(value)
|
351
362
|
end
|
352
363
|
end
|
353
364
|
|
@@ -421,6 +432,7 @@ or the PAGER environment variable.
|
|
421
432
|
@use_stdout = options[:use_stdout]
|
422
433
|
@show_all = options[:show_all]
|
423
434
|
@width = options[:width]
|
435
|
+
@expand_refs = options[:expand_refs]
|
424
436
|
end
|
425
437
|
|
426
438
|
##
|
@@ -506,7 +518,7 @@ or the PAGER environment variable.
|
|
506
518
|
with.each do |incl|
|
507
519
|
out << RDoc::Markup::Paragraph.new(incl.name)
|
508
520
|
out << RDoc::Markup::BlankLine.new
|
509
|
-
out << incl.comment
|
521
|
+
out << incl.comment.parse
|
510
522
|
end
|
511
523
|
|
512
524
|
unless wout.empty? then
|
@@ -530,7 +542,7 @@ or the PAGER environment variable.
|
|
530
542
|
|
531
543
|
if include.comment then
|
532
544
|
out << RDoc::Markup::BlankLine.new
|
533
|
-
out << include.comment
|
545
|
+
out << include.comment.parse
|
534
546
|
end
|
535
547
|
end
|
536
548
|
|
@@ -545,11 +557,8 @@ or the PAGER environment variable.
|
|
545
557
|
# Looks up the method +name+ and adds it to +out+
|
546
558
|
|
547
559
|
def add_method out, name
|
548
|
-
filtered
|
549
|
-
|
550
|
-
method_out = method_document name, filtered
|
551
|
-
|
552
|
-
out.concat method_out.parts
|
560
|
+
filtered = lookup_method name
|
561
|
+
method_document out, name, filtered
|
553
562
|
end
|
554
563
|
|
555
564
|
##
|
@@ -641,18 +650,19 @@ or the PAGER environment variable.
|
|
641
650
|
|
642
651
|
add_also_in out, also_in
|
643
652
|
|
653
|
+
expand_rdoc_refs_at_the_bottom(out)
|
644
654
|
out
|
645
655
|
end
|
646
656
|
|
647
657
|
##
|
648
658
|
# Adds the class +comment+ to +out+.
|
649
659
|
|
650
|
-
def class_document_comment out,
|
651
|
-
unless
|
660
|
+
def class_document_comment out, document # :nodoc:
|
661
|
+
unless document.empty? then
|
652
662
|
out << RDoc::Markup::Rule.new(1)
|
653
663
|
|
654
|
-
if
|
655
|
-
parts =
|
664
|
+
if document.merged? then
|
665
|
+
parts = document.parts
|
656
666
|
parts = parts.zip [RDoc::Markup::BlankLine.new] * parts.length
|
657
667
|
parts.flatten!
|
658
668
|
parts.pop
|
@@ -677,7 +687,7 @@ or the PAGER environment variable.
|
|
677
687
|
constants = klass.constants.sort_by { |constant| constant.name }
|
678
688
|
|
679
689
|
list.items.concat constants.map { |constant|
|
680
|
-
parts = constant.comment.parts
|
690
|
+
parts = constant.comment.parse.parts
|
681
691
|
parts << RDoc::Markup::Paragraph.new('[not documented]') if
|
682
692
|
parts.empty?
|
683
693
|
|
@@ -820,6 +830,8 @@ or the PAGER environment variable.
|
|
820
830
|
|
821
831
|
add_method out, name
|
822
832
|
|
833
|
+
expand_rdoc_refs_at_the_bottom(out)
|
834
|
+
|
823
835
|
display out
|
824
836
|
end
|
825
837
|
|
@@ -894,7 +906,7 @@ or the PAGER environment variable.
|
|
894
906
|
|
895
907
|
page = store.load_page page_name
|
896
908
|
|
897
|
-
display page.comment
|
909
|
+
display page.comment.parse
|
898
910
|
end
|
899
911
|
|
900
912
|
##
|
@@ -1195,7 +1207,8 @@ or the PAGER environment variable.
|
|
1195
1207
|
|
1196
1208
|
store.load_method klass, "#{type}#{method}"
|
1197
1209
|
rescue RDoc::Store::MissingFileError => e
|
1198
|
-
comment = RDoc::Comment.new("missing documentation at #{e.file}")
|
1210
|
+
comment = RDoc::Comment.new("missing documentation at #{e.file}")
|
1211
|
+
comment.parse
|
1199
1212
|
|
1200
1213
|
method = RDoc::AnyMethod.new nil, name
|
1201
1214
|
method.comment = comment
|
@@ -1251,9 +1264,7 @@ or the PAGER environment variable.
|
|
1251
1264
|
##
|
1252
1265
|
# Builds a RDoc::Markup::Document from +found+, +klasses+ and +includes+
|
1253
1266
|
|
1254
|
-
def method_document name, filtered
|
1255
|
-
out = RDoc::Markup::Document.new
|
1256
|
-
|
1267
|
+
def method_document out, name, filtered
|
1257
1268
|
out << RDoc::Markup::Heading.new(1, name)
|
1258
1269
|
out << RDoc::Markup::BlankLine.new
|
1259
1270
|
|
@@ -1357,13 +1368,13 @@ or the PAGER environment variable.
|
|
1357
1368
|
# documentable items the class is added to +also_in+ instead.
|
1358
1369
|
|
1359
1370
|
def render_class out, store, klass, also_in # :nodoc:
|
1360
|
-
|
1371
|
+
document = klass.comment.parse
|
1361
1372
|
# TODO the store's cache should always return an empty Array
|
1362
1373
|
class_methods = store.class_methods[klass.full_name] || []
|
1363
1374
|
instance_methods = store.instance_methods[klass.full_name] || []
|
1364
1375
|
attributes = store.attributes[klass.full_name] || []
|
1365
1376
|
|
1366
|
-
if
|
1377
|
+
if document.empty? and
|
1367
1378
|
instance_methods.empty? and class_methods.empty? then
|
1368
1379
|
also_in << store
|
1369
1380
|
return
|
@@ -1371,7 +1382,7 @@ or the PAGER environment variable.
|
|
1371
1382
|
|
1372
1383
|
add_from out, store
|
1373
1384
|
|
1374
|
-
class_document_comment out,
|
1385
|
+
class_document_comment out, document
|
1375
1386
|
|
1376
1387
|
if class_methods or instance_methods or not klass.constants.empty? then
|
1377
1388
|
out << RDoc::Markup::Rule.new(1)
|
@@ -1419,16 +1430,16 @@ or the PAGER environment variable.
|
|
1419
1430
|
if alias_for
|
1420
1431
|
unless method.comment.nil? or method.comment.empty?
|
1421
1432
|
out << RDoc::Markup::BlankLine.new
|
1422
|
-
out << method.comment
|
1433
|
+
out << method.comment.parse
|
1423
1434
|
end
|
1424
1435
|
out << RDoc::Markup::BlankLine.new
|
1425
1436
|
out << RDoc::Markup::Paragraph.new("(This method is an alias for #{alias_for.full_name}.)")
|
1426
1437
|
out << RDoc::Markup::BlankLine.new
|
1427
|
-
out << alias_for.comment
|
1438
|
+
out << alias_for.comment.parse
|
1428
1439
|
out << RDoc::Markup::BlankLine.new
|
1429
1440
|
else
|
1430
1441
|
out << RDoc::Markup::BlankLine.new
|
1431
|
-
out << method.comment
|
1442
|
+
out << method.comment.parse
|
1432
1443
|
out << RDoc::Markup::BlankLine.new
|
1433
1444
|
end
|
1434
1445
|
end
|
@@ -1510,4 +1521,38 @@ or the PAGER environment variable.
|
|
1510
1521
|
server.start
|
1511
1522
|
end
|
1512
1523
|
|
1524
|
+
RDOC_REFS_REGEXP = /\[rdoc-ref:([\w.]+)(@.*)?\]/
|
1525
|
+
|
1526
|
+
def expand_rdoc_refs_at_the_bottom(out)
|
1527
|
+
return unless @expand_refs
|
1528
|
+
|
1529
|
+
extracted_rdoc_refs = []
|
1530
|
+
|
1531
|
+
out.each do |part|
|
1532
|
+
content = if part.respond_to?(:text)
|
1533
|
+
part.text
|
1534
|
+
else
|
1535
|
+
next
|
1536
|
+
end
|
1537
|
+
|
1538
|
+
rdoc_refs = content.scan(RDOC_REFS_REGEXP).uniq.map do |file_name, _anchor|
|
1539
|
+
file_name
|
1540
|
+
end
|
1541
|
+
|
1542
|
+
extracted_rdoc_refs.concat(rdoc_refs)
|
1543
|
+
end
|
1544
|
+
|
1545
|
+
found_pages = extracted_rdoc_refs.map do |ref|
|
1546
|
+
begin
|
1547
|
+
@stores.first.load_page(ref)
|
1548
|
+
rescue RDoc::Store::MissingFileError
|
1549
|
+
end
|
1550
|
+
end.compact
|
1551
|
+
|
1552
|
+
found_pages.each do |page|
|
1553
|
+
out << RDoc::Markup::Heading.new(4, "Expanded from #{page.full_name}")
|
1554
|
+
out << RDoc::Markup::BlankLine.new
|
1555
|
+
out << page.comment.parse
|
1556
|
+
end
|
1557
|
+
end
|
1513
1558
|
end
|
data/lib/rdoc/rubygems_hook.rb
CHANGED
@@ -3,13 +3,19 @@ require 'rubygems/user_interaction'
|
|
3
3
|
require 'fileutils'
|
4
4
|
require_relative '../rdoc'
|
5
5
|
|
6
|
-
|
7
|
-
# Gem::RDoc provides methods to generate RDoc and ri data for installed gems
|
8
|
-
# upon gem installation.
|
6
|
+
# We define the following two similar name classes in this file:
|
9
7
|
#
|
10
|
-
#
|
8
|
+
# - RDoc::RubyGemsHook
|
9
|
+
# - RDoc::RubygemsHook
|
10
|
+
#
|
11
|
+
# RDoc::RubyGemsHook is the main class that has real logic.
|
12
|
+
#
|
13
|
+
# RDoc::RubygemsHook is a class that is only for
|
14
|
+
# compatibility. RDoc::RubygemsHook is used by RubyGems directly. We
|
15
|
+
# can remove this when all maintained RubyGems remove
|
16
|
+
# `rubygems/rdoc.rb`.
|
11
17
|
|
12
|
-
class RDoc::
|
18
|
+
class RDoc::RubyGemsHook
|
13
19
|
|
14
20
|
include Gem::UserInteraction
|
15
21
|
extend Gem::UserInteraction
|
@@ -45,7 +51,7 @@ class RDoc::RubygemsHook
|
|
45
51
|
# Post installs hook that generates documentation for each specification in
|
46
52
|
# +specs+
|
47
53
|
|
48
|
-
def self.
|
54
|
+
def self.generate installer, specs
|
49
55
|
start = Time.now
|
50
56
|
types = installer.document
|
51
57
|
|
@@ -64,6 +70,10 @@ class RDoc::RubygemsHook
|
|
64
70
|
say "Done installing documentation for #{names} after #{duration} seconds"
|
65
71
|
end
|
66
72
|
|
73
|
+
def self.remove uninstaller
|
74
|
+
new(uninstaller.spec).remove
|
75
|
+
end
|
76
|
+
|
67
77
|
##
|
68
78
|
# Loads the RDoc generator
|
69
79
|
|
@@ -171,10 +181,10 @@ class RDoc::RubygemsHook
|
|
171
181
|
options = ::RDoc::Options.new
|
172
182
|
options.default_title = "#{@spec.full_name} Documentation"
|
173
183
|
options.parse args
|
184
|
+
options.quiet = !Gem.configuration.really_verbose
|
185
|
+
options.finish
|
174
186
|
end
|
175
187
|
|
176
|
-
options.quiet = !Gem.configuration.really_verbose
|
177
|
-
|
178
188
|
@rdoc = new_rdoc
|
179
189
|
@rdoc.options = options
|
180
190
|
|
@@ -246,3 +256,75 @@ class RDoc::RubygemsHook
|
|
246
256
|
end
|
247
257
|
|
248
258
|
end
|
259
|
+
|
260
|
+
# This class is referenced by RubyGems to create documents.
|
261
|
+
# All implementations are moved to the above RubyGemsHook.
|
262
|
+
#
|
263
|
+
# This class does nothing when this RDoc is installed as a normal gem
|
264
|
+
# or a bundled gem.
|
265
|
+
#
|
266
|
+
# This class does generate/remove documents for compatibility when
|
267
|
+
# this RDoc is installed as a default gem.
|
268
|
+
#
|
269
|
+
# We can remove this when all maintained RubyGems remove
|
270
|
+
# `rubygems/rdoc.rb`.
|
271
|
+
module RDoc
|
272
|
+
class RubygemsHook
|
273
|
+
|
274
|
+
attr_accessor :generate_rdoc, :generate_ri, :force
|
275
|
+
|
276
|
+
def self.default_gem?
|
277
|
+
!File.exist?(File.join(__dir__, "..", "rubygems_plugin.rb"))
|
278
|
+
end
|
279
|
+
|
280
|
+
def initialize(spec, generate_rdoc = false, generate_ri = true)
|
281
|
+
@spec = spec
|
282
|
+
@generate_rdoc = generate_rdoc
|
283
|
+
@generate_ri = generate_ri
|
284
|
+
@force = false
|
285
|
+
end
|
286
|
+
|
287
|
+
def generate
|
288
|
+
# Do nothing if this is NOT a default gem.
|
289
|
+
return unless self.class.default_gem?
|
290
|
+
|
291
|
+
# Generate document for compatibility if this is a default gem.
|
292
|
+
hook = RubyGemsHook.new(@spec, @generate_rdoc, @generate_ri)
|
293
|
+
hook.force = @force
|
294
|
+
hook.generate
|
295
|
+
end
|
296
|
+
|
297
|
+
def remove
|
298
|
+
# Do nothing if this is NOT a default gem.
|
299
|
+
return unless self.class.default_gem?
|
300
|
+
|
301
|
+
# Remove generated document for compatibility if this is a
|
302
|
+
# default gem.
|
303
|
+
RubyGemsHook.new(@spec).remove
|
304
|
+
end
|
305
|
+
|
306
|
+
def self.generation_hook installer, specs
|
307
|
+
# Do nothing if this is NOT a default gem.
|
308
|
+
return unless default_gem?
|
309
|
+
|
310
|
+
# Generate document for compatibility if this is a default gem.
|
311
|
+
RubyGemsHook.generate(installer, specs)
|
312
|
+
end
|
313
|
+
|
314
|
+
def self.load_rdoc
|
315
|
+
RubyGemsHook.load_rdoc
|
316
|
+
end
|
317
|
+
|
318
|
+
def self.rdoc_version
|
319
|
+
RubyGemsHook.rdoc_version
|
320
|
+
end
|
321
|
+
|
322
|
+
def rdoc_installed?
|
323
|
+
RubyGemsHook.new(@spec).rdoc_installed?
|
324
|
+
end
|
325
|
+
|
326
|
+
def ri_installed?
|
327
|
+
RubyGemsHook.new(@spec).ri_installed?
|
328
|
+
end
|
329
|
+
end
|
330
|
+
end
|
data/lib/rdoc/store.rb
CHANGED
@@ -197,6 +197,18 @@ class RDoc::Store
|
|
197
197
|
top_level
|
198
198
|
end
|
199
199
|
|
200
|
+
##
|
201
|
+
# Make sure any references to C variable names are resolved to the corresponding class.
|
202
|
+
#
|
203
|
+
|
204
|
+
def resolve_c_superclasses
|
205
|
+
@classes_hash.each_value do |klass|
|
206
|
+
if klass.superclass.is_a?(String) && (candidate = find_c_enclosure(klass.superclass))
|
207
|
+
klass.superclass = candidate
|
208
|
+
end
|
209
|
+
end
|
210
|
+
end
|
211
|
+
|
200
212
|
##
|
201
213
|
# Sets the parser of +absolute_name+, unless it from a source code file.
|
202
214
|
|
data/lib/rdoc/task.rb
CHANGED
@@ -104,9 +104,8 @@ class RDoc::Task < Rake::TaskLib
|
|
104
104
|
attr_accessor :name
|
105
105
|
|
106
106
|
##
|
107
|
-
#
|
108
|
-
#
|
109
|
-
|
107
|
+
# The markup format; one of: +rdoc+ (the default), +markdown+, +rd+, +tomdoc+.
|
108
|
+
# See {Markup Formats}[rdoc-ref:RDoc::Markup@Markup+Formats].
|
110
109
|
attr_accessor :markup
|
111
110
|
|
112
111
|
##
|
data/lib/rdoc/tom_doc.rb
CHANGED
@@ -3,13 +3,7 @@
|
|
3
3
|
|
4
4
|
# A parser for TomDoc based on TomDoc 1.0.0-rc1 (02adef9b5a)
|
5
5
|
#
|
6
|
-
# The TomDoc specification can be found at
|
7
|
-
#
|
8
|
-
# http://tomdoc.org
|
9
|
-
#
|
10
|
-
# The latest version of the TomDoc specification can be found at:
|
11
|
-
#
|
12
|
-
# https://github.com/mojombo/tomdoc/blob/master/tomdoc.md
|
6
|
+
# The TomDoc specification can be found at http://tomdoc.org.
|
13
7
|
#
|
14
8
|
# To choose TomDoc as your only default format see RDoc::Options@Saved+Options
|
15
9
|
# for instructions on setting up a <code>.rdoc_options</code> file to store
|
data/lib/rdoc/version.rb
CHANGED
data/lib/rdoc.rb
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
$DEBUG_RDOC = nil
|
3
3
|
|
4
|
-
# :main: README.rdoc
|
5
|
-
|
6
4
|
##
|
7
5
|
# RDoc produces documentation for Ruby source files by parsing the source and
|
8
6
|
# extracting the definition for classes, modules, methods, includes and
|
@@ -21,7 +19,7 @@ $DEBUG_RDOC = nil
|
|
21
19
|
# see RDoc::Markup and refer to <tt>rdoc --help</tt> for command line usage.
|
22
20
|
#
|
23
21
|
# If you want to set the default markup format see
|
24
|
-
# RDoc::Markup@
|
22
|
+
# RDoc::Markup@Markup+Formats
|
25
23
|
#
|
26
24
|
# If you want to store rdoc configuration in your gem (such as the default
|
27
25
|
# markup format) see RDoc::Options@Saved+Options
|
@@ -188,26 +186,26 @@ module RDoc
|
|
188
186
|
# programs: classes, modules, methods, and so on.
|
189
187
|
autoload :CodeObject, "#{__dir__}/rdoc/code_object"
|
190
188
|
|
191
|
-
autoload :Context, "#{__dir__}/rdoc/context"
|
192
|
-
autoload :TopLevel, "#{__dir__}/rdoc/top_level"
|
193
|
-
|
194
|
-
autoload :AnonClass, "#{__dir__}/rdoc/anon_class"
|
195
|
-
autoload :ClassModule, "#{__dir__}/rdoc/class_module"
|
196
|
-
autoload :NormalClass, "#{__dir__}/rdoc/normal_class"
|
197
|
-
autoload :NormalModule, "#{__dir__}/rdoc/normal_module"
|
198
|
-
autoload :SingleClass, "#{__dir__}/rdoc/single_class"
|
199
|
-
|
200
|
-
autoload :Alias, "#{__dir__}/rdoc/alias"
|
201
|
-
autoload :AnyMethod, "#{__dir__}/rdoc/any_method"
|
202
|
-
autoload :MethodAttr, "#{__dir__}/rdoc/method_attr"
|
203
|
-
autoload :GhostMethod, "#{__dir__}/rdoc/ghost_method"
|
204
|
-
autoload :MetaMethod, "#{__dir__}/rdoc/meta_method"
|
205
|
-
autoload :Attr, "#{__dir__}/rdoc/attr"
|
206
|
-
|
207
|
-
autoload :Constant, "#{__dir__}/rdoc/constant"
|
208
|
-
autoload :Mixin, "#{__dir__}/rdoc/mixin"
|
209
|
-
autoload :Include, "#{__dir__}/rdoc/include"
|
210
|
-
autoload :Extend, "#{__dir__}/rdoc/extend"
|
211
|
-
autoload :Require, "#{__dir__}/rdoc/require"
|
189
|
+
autoload :Context, "#{__dir__}/rdoc/code_object/context"
|
190
|
+
autoload :TopLevel, "#{__dir__}/rdoc/code_object/top_level"
|
191
|
+
|
192
|
+
autoload :AnonClass, "#{__dir__}/rdoc/code_object/anon_class"
|
193
|
+
autoload :ClassModule, "#{__dir__}/rdoc/code_object/class_module"
|
194
|
+
autoload :NormalClass, "#{__dir__}/rdoc/code_object/normal_class"
|
195
|
+
autoload :NormalModule, "#{__dir__}/rdoc/code_object/normal_module"
|
196
|
+
autoload :SingleClass, "#{__dir__}/rdoc/code_object/single_class"
|
197
|
+
|
198
|
+
autoload :Alias, "#{__dir__}/rdoc/code_object/alias"
|
199
|
+
autoload :AnyMethod, "#{__dir__}/rdoc/code_object/any_method"
|
200
|
+
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
|
+
autoload :Attr, "#{__dir__}/rdoc/code_object/attr"
|
204
|
+
|
205
|
+
autoload :Constant, "#{__dir__}/rdoc/code_object/constant"
|
206
|
+
autoload :Mixin, "#{__dir__}/rdoc/code_object/mixin"
|
207
|
+
autoload :Include, "#{__dir__}/rdoc/code_object/include"
|
208
|
+
autoload :Extend, "#{__dir__}/rdoc/code_object/extend"
|
209
|
+
autoload :Require, "#{__dir__}/rdoc/code_object/require"
|
212
210
|
|
213
211
|
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# If this file is exist, RDoc generates and removes documents by rubygems plugins.
|
4
|
+
#
|
5
|
+
# In follwing cases,
|
6
|
+
# RubyGems directly exectute RDoc::RubygemsHook.generation_hook and RDoc::RubygemsHook#remove to generate and remove documents.
|
7
|
+
#
|
8
|
+
# - RDoc is used as a default gem.
|
9
|
+
# - RDoc is a old version that doesn't have rubygems_plugin.rb.
|
10
|
+
|
11
|
+
require_relative 'rdoc/rubygems_hook'
|
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
|
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.
|
4
|
+
version: 6.12.0
|
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:
|
16
|
+
date: 2025-02-06 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: psych
|
@@ -53,7 +53,7 @@ extra_rdoc_files:
|
|
53
53
|
- LEGAL.rdoc
|
54
54
|
- LICENSE.rdoc
|
55
55
|
- README.rdoc
|
56
|
-
- RI.
|
56
|
+
- RI.md
|
57
57
|
- TODO.rdoc
|
58
58
|
files:
|
59
59
|
- CONTRIBUTING.rdoc
|
@@ -64,27 +64,37 @@ files:
|
|
64
64
|
- LEGAL.rdoc
|
65
65
|
- LICENSE.rdoc
|
66
66
|
- README.rdoc
|
67
|
-
- RI.
|
67
|
+
- RI.md
|
68
68
|
- TODO.rdoc
|
69
69
|
- exe/rdoc
|
70
70
|
- exe/ri
|
71
71
|
- lib/rdoc.rb
|
72
|
-
- lib/rdoc/alias.rb
|
73
|
-
- lib/rdoc/anon_class.rb
|
74
|
-
- lib/rdoc/any_method.rb
|
75
|
-
- lib/rdoc/attr.rb
|
76
|
-
- lib/rdoc/class_module.rb
|
77
72
|
- lib/rdoc/code_object.rb
|
73
|
+
- lib/rdoc/code_object/alias.rb
|
74
|
+
- lib/rdoc/code_object/anon_class.rb
|
75
|
+
- lib/rdoc/code_object/any_method.rb
|
76
|
+
- lib/rdoc/code_object/attr.rb
|
77
|
+
- lib/rdoc/code_object/class_module.rb
|
78
|
+
- lib/rdoc/code_object/constant.rb
|
79
|
+
- lib/rdoc/code_object/context.rb
|
80
|
+
- lib/rdoc/code_object/context/section.rb
|
81
|
+
- lib/rdoc/code_object/extend.rb
|
82
|
+
- lib/rdoc/code_object/ghost_method.rb
|
83
|
+
- lib/rdoc/code_object/include.rb
|
84
|
+
- lib/rdoc/code_object/meta_method.rb
|
85
|
+
- lib/rdoc/code_object/method_attr.rb
|
86
|
+
- lib/rdoc/code_object/mixin.rb
|
87
|
+
- lib/rdoc/code_object/normal_class.rb
|
88
|
+
- lib/rdoc/code_object/normal_module.rb
|
89
|
+
- lib/rdoc/code_object/require.rb
|
90
|
+
- lib/rdoc/code_object/single_class.rb
|
91
|
+
- lib/rdoc/code_object/top_level.rb
|
78
92
|
- lib/rdoc/code_objects.rb
|
79
93
|
- lib/rdoc/comment.rb
|
80
|
-
- lib/rdoc/constant.rb
|
81
|
-
- lib/rdoc/context.rb
|
82
|
-
- lib/rdoc/context/section.rb
|
83
94
|
- lib/rdoc/cross_reference.rb
|
84
95
|
- lib/rdoc/encoding.rb
|
85
96
|
- lib/rdoc/erb_partial.rb
|
86
97
|
- lib/rdoc/erbio.rb
|
87
|
-
- lib/rdoc/extend.rb
|
88
98
|
- lib/rdoc/generator.rb
|
89
99
|
- lib/rdoc/generator/darkfish.rb
|
90
100
|
- lib/rdoc/generator/json_index.rb
|
@@ -94,7 +104,6 @@ files:
|
|
94
104
|
- lib/rdoc/generator/pot/po.rb
|
95
105
|
- lib/rdoc/generator/pot/po_entry.rb
|
96
106
|
- lib/rdoc/generator/ri.rb
|
97
|
-
- lib/rdoc/generator/template/darkfish/.document
|
98
107
|
- lib/rdoc/generator/template/darkfish/_footer.rhtml
|
99
108
|
- lib/rdoc/generator/template/darkfish/_head.rhtml
|
100
109
|
- lib/rdoc/generator/template/darkfish/_sidebar_VCS_info.rhtml
|
@@ -110,6 +119,7 @@ files:
|
|
110
119
|
- lib/rdoc/generator/template/darkfish/_sidebar_search.rhtml
|
111
120
|
- lib/rdoc/generator/template/darkfish/_sidebar_sections.rhtml
|
112
121
|
- lib/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml
|
122
|
+
- lib/rdoc/generator/template/darkfish/_sidebar_toggle.rhtml
|
113
123
|
- lib/rdoc/generator/template/darkfish/class.rhtml
|
114
124
|
- lib/rdoc/generator/template/darkfish/css/fonts.css
|
115
125
|
- lib/rdoc/generator/template/darkfish/css/rdoc.css
|
@@ -151,14 +161,11 @@ files:
|
|
151
161
|
- lib/rdoc/generator/template/darkfish/servlet_not_found.rhtml
|
152
162
|
- lib/rdoc/generator/template/darkfish/servlet_root.rhtml
|
153
163
|
- lib/rdoc/generator/template/darkfish/table_of_contents.rhtml
|
154
|
-
- lib/rdoc/generator/template/json_index/.document
|
155
164
|
- lib/rdoc/generator/template/json_index/js/navigation.js
|
156
165
|
- lib/rdoc/generator/template/json_index/js/searcher.js
|
157
|
-
- lib/rdoc/ghost_method.rb
|
158
166
|
- lib/rdoc/i18n.rb
|
159
167
|
- lib/rdoc/i18n/locale.rb
|
160
168
|
- lib/rdoc/i18n/text.rb
|
161
|
-
- lib/rdoc/include.rb
|
162
169
|
- lib/rdoc/known_classes.rb
|
163
170
|
- lib/rdoc/markdown.kpeg
|
164
171
|
- lib/rdoc/markdown.rb
|
@@ -200,16 +207,12 @@ files:
|
|
200
207
|
- lib/rdoc/markup/to_test.rb
|
201
208
|
- lib/rdoc/markup/to_tt_only.rb
|
202
209
|
- lib/rdoc/markup/verbatim.rb
|
203
|
-
- lib/rdoc/meta_method.rb
|
204
|
-
- lib/rdoc/method_attr.rb
|
205
|
-
- lib/rdoc/mixin.rb
|
206
|
-
- lib/rdoc/normal_class.rb
|
207
|
-
- lib/rdoc/normal_module.rb
|
208
210
|
- lib/rdoc/options.rb
|
209
211
|
- lib/rdoc/parser.rb
|
210
212
|
- lib/rdoc/parser/c.rb
|
211
213
|
- lib/rdoc/parser/changelog.rb
|
212
214
|
- lib/rdoc/parser/markdown.rb
|
215
|
+
- lib/rdoc/parser/prism_ruby.rb
|
213
216
|
- lib/rdoc/parser/rd.rb
|
214
217
|
- lib/rdoc/parser/ripper_state_lex.rb
|
215
218
|
- lib/rdoc/parser/ruby.rb
|
@@ -223,7 +226,6 @@ files:
|
|
223
226
|
- lib/rdoc/rd/inline_parser.rb
|
224
227
|
- lib/rdoc/rd/inline_parser.ry
|
225
228
|
- lib/rdoc/rdoc.rb
|
226
|
-
- lib/rdoc/require.rb
|
227
229
|
- lib/rdoc/ri.rb
|
228
230
|
- lib/rdoc/ri/driver.rb
|
229
231
|
- lib/rdoc/ri/formatter.rb
|
@@ -232,7 +234,6 @@ files:
|
|
232
234
|
- lib/rdoc/ri/task.rb
|
233
235
|
- lib/rdoc/rubygems_hook.rb
|
234
236
|
- lib/rdoc/servlet.rb
|
235
|
-
- lib/rdoc/single_class.rb
|
236
237
|
- lib/rdoc/stats.rb
|
237
238
|
- lib/rdoc/stats/normal.rb
|
238
239
|
- lib/rdoc/stats/quiet.rb
|
@@ -242,8 +243,8 @@ files:
|
|
242
243
|
- lib/rdoc/text.rb
|
243
244
|
- lib/rdoc/token_stream.rb
|
244
245
|
- lib/rdoc/tom_doc.rb
|
245
|
-
- lib/rdoc/top_level.rb
|
246
246
|
- lib/rdoc/version.rb
|
247
|
+
- lib/rubygems_plugin.rb
|
247
248
|
- man/ri.1
|
248
249
|
homepage: https://ruby.github.io/rdoc
|
249
250
|
licenses:
|
@@ -268,7 +269,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
268
269
|
- !ruby/object:Gem::Version
|
269
270
|
version: '2.2'
|
270
271
|
requirements: []
|
271
|
-
rubygems_version: 3.6.
|
272
|
+
rubygems_version: 3.6.2
|
272
273
|
specification_version: 4
|
273
274
|
summary: RDoc produces HTML and command-line documentation for Ruby projects
|
274
275
|
test_files: []
|