rdoc 6.1.2.1 → 6.3.3
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of rdoc might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/Gemfile +9 -0
- data/README.rdoc +0 -1
- data/Rakefile +28 -18
- data/lib/rdoc/any_method.rb +52 -7
- data/lib/rdoc/class_module.rb +1 -1
- data/lib/rdoc/comment.rb +12 -1
- data/lib/rdoc/context/section.rb +0 -13
- data/lib/rdoc/context.rb +10 -2
- data/lib/rdoc/cross_reference.rb +4 -4
- data/lib/rdoc/erb_partial.rb +1 -1
- data/lib/rdoc/erbio.rb +2 -2
- data/lib/rdoc/generator/darkfish.rb +9 -9
- data/lib/rdoc/generator/pot.rb +3 -3
- data/lib/rdoc/generator/template/darkfish/_head.rhtml +4 -5
- data/lib/rdoc/generator/template/darkfish/_sidebar_VCS_info.rhtml +2 -2
- data/lib/rdoc/generator/template/darkfish/_sidebar_classes.rhtml +2 -2
- data/lib/rdoc/generator/template/darkfish/_sidebar_extends.rhtml +7 -7
- data/lib/rdoc/generator/template/darkfish/_sidebar_in_files.rhtml +2 -2
- data/lib/rdoc/generator/template/darkfish/_sidebar_includes.rhtml +7 -7
- data/lib/rdoc/generator/template/darkfish/_sidebar_installed.rhtml +6 -6
- data/lib/rdoc/generator/template/darkfish/_sidebar_methods.rhtml +5 -5
- data/lib/rdoc/generator/template/darkfish/_sidebar_pages.rhtml +5 -5
- data/lib/rdoc/generator/template/darkfish/_sidebar_parent.rhtml +5 -5
- data/lib/rdoc/generator/template/darkfish/_sidebar_sections.rhtml +4 -4
- data/lib/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml +4 -4
- data/lib/rdoc/generator/template/darkfish/class.rhtml +44 -44
- data/lib/rdoc/generator/template/darkfish/css/rdoc.css +33 -5
- data/lib/rdoc/generator/template/darkfish/index.rhtml +3 -4
- data/lib/rdoc/generator/template/darkfish/servlet_root.rhtml +15 -16
- data/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml +16 -16
- data/lib/rdoc/i18n.rb +1 -1
- data/lib/rdoc/markdown/literals.rb +7 -8
- data/lib/rdoc/markdown.kpeg +20 -2
- data/lib/rdoc/markdown.rb +458 -61
- data/lib/rdoc/markup/attr_span.rb +8 -2
- data/lib/rdoc/markup/attribute_manager.rb +93 -28
- data/lib/rdoc/markup/formatter.rb +1 -1
- data/lib/rdoc/markup/parser.rb +58 -42
- data/lib/rdoc/markup/pre_process.rb +1 -1
- data/lib/rdoc/markup/table.rb +47 -0
- data/lib/rdoc/markup/to_html.rb +46 -6
- data/lib/rdoc/markup/to_html_crossref.rb +18 -6
- data/lib/rdoc/markup/to_joined_paragraph.rb +1 -0
- data/lib/rdoc/markup/to_rdoc.rb +28 -0
- data/lib/rdoc/markup/to_table_of_contents.rb +1 -0
- data/lib/rdoc/markup.rb +1 -2
- data/lib/rdoc/options.rb +56 -6
- data/lib/rdoc/parser/c.rb +139 -183
- data/lib/rdoc/parser/changelog.rb +145 -14
- data/lib/rdoc/parser/ripper_state_lex.rb +2 -1
- data/lib/rdoc/parser/ruby.rb +18 -8
- data/lib/rdoc/parser.rb +7 -7
- data/lib/rdoc/rdoc.rb +34 -21
- data/lib/rdoc/ri/driver.rb +9 -5
- data/lib/rdoc/ri/paths.rb +3 -17
- data/lib/rdoc/ri/task.rb +1 -1
- data/lib/rdoc/rubygems_hook.rb +2 -2
- data/lib/rdoc/servlet.rb +16 -8
- data/lib/rdoc/store.rb +6 -14
- data/lib/rdoc/task.rb +1 -1
- data/lib/rdoc/text.rb +8 -2
- data/lib/rdoc/token_stream.rb +8 -3
- data/lib/rdoc/tom_doc.rb +6 -7
- data/lib/rdoc/version.rb +1 -1
- data/lib/rdoc.rb +21 -0
- data/man/ri.1 +247 -0
- data/rdoc.gemspec +196 -9
- metadata +7 -67
- data/.document +0 -5
- data/.gitignore +0 -14
- data/.travis.yml +0 -21
- data/appveyor.yml +0 -36
- data/lib/rdoc/markup/formatter_test_case.rb +0 -764
- data/lib/rdoc/markup/text_formatter_test_case.rb +0 -115
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 120ff1fdb58f0543a2a49d1e4fffc2ebaf3f1bcd9f3cd2006f4130b6a4caa330
|
4
|
+
data.tar.gz: 7c8dabbb3b1256e4bca4b2a14dfb216d43f9bb3acb26d5277b7acbbf6212f5eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 38fa507c6bf06b2697642b7a133fcb42ed256aa7b788c7ca6eaba7545d92e071325e2b175020716fca082864efff9e2702aa05f5e5b758e06aa3c3947c972449
|
7
|
+
data.tar.gz: 655ceb71a41d8e17202c9ecab7dd41af87f30fd16a5be757778f3671563f8779f82982b223b68610c9a7e37899e5311a9614fbbb7df8f80c9533358a4db480cf
|
data/Gemfile
CHANGED
data/README.rdoc
CHANGED
@@ -3,7 +3,6 @@
|
|
3
3
|
home :: https://github.com/ruby/rdoc
|
4
4
|
rdoc :: https://ruby.github.io/rdoc
|
5
5
|
bugs :: https://github.com/ruby/rdoc/issues
|
6
|
-
build status :: {<img src="https://travis-ci.org/ruby/rdoc.svg?branch=master" alt="Build Status on Travis CI" />}[https://travis-ci.org/ruby/rdoc] {<img src="https://ci.appveyor.com/api/projects/status/github/ruby/rdoc?branch=master&svg=true" alt="Build Status on AppVeyor" />}[https://ci.appveyor.com/project/ruby/rdoc]
|
7
6
|
code quality :: {<img src="https://codeclimate.com/github/ruby/rdoc/badges/gpa.svg" alt="Code Climate">}[https://codeclimate.com/github/ruby/rdoc]
|
8
7
|
|
9
8
|
== Description
|
data/Rakefile
CHANGED
@@ -2,10 +2,9 @@ $:.unshift File.expand_path 'lib'
|
|
2
2
|
require 'rdoc/task'
|
3
3
|
require 'bundler/gem_tasks'
|
4
4
|
require 'rake/testtask'
|
5
|
-
require 'rubocop/rake_task'
|
6
5
|
|
7
6
|
task :docs => :generate
|
8
|
-
task :test => :
|
7
|
+
task :test => [:normal_test, :rubygems_test]
|
9
8
|
|
10
9
|
PARSER_FILES = %w[
|
11
10
|
lib/rdoc/rd/block_parser.ry
|
@@ -34,10 +33,18 @@ task ghpages: :rdoc do
|
|
34
33
|
FileUtils.cp_r Dir.glob("/tmp/html/*"), "."
|
35
34
|
end
|
36
35
|
|
37
|
-
Rake::TestTask.new(:
|
38
|
-
t.libs << "test"
|
36
|
+
Rake::TestTask.new(:normal_test) do |t|
|
37
|
+
t.libs << "test/rdoc"
|
39
38
|
t.verbose = true
|
40
|
-
t.
|
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"
|
41
48
|
end
|
42
49
|
|
43
50
|
path = "pkg/#{Bundler::GemHelper.gemspec.full_name}"
|
@@ -54,13 +61,13 @@ package_parser_files = PARSER_FILES.map do |parser_file|
|
|
54
61
|
end
|
55
62
|
|
56
63
|
parsed_files = PARSER_FILES.map do |parser_file|
|
57
|
-
|
58
|
-
|
59
|
-
parsed_file = "#{_path}/#{name}.rb"
|
64
|
+
ext = File.extname(parser_file)
|
65
|
+
parsed_file = "#{parser_file.chomp(ext)}.rb"
|
60
66
|
|
61
|
-
file parsed_file do |t|
|
67
|
+
file parsed_file => parser_file do |t|
|
62
68
|
puts "Generating #{parsed_file}..."
|
63
|
-
|
69
|
+
case ext
|
70
|
+
when '.ry' # need racc
|
64
71
|
racc = Gem.bin_path 'racc', 'racc'
|
65
72
|
rb_file = parser_file.gsub(/\.ry\z/, ".rb")
|
66
73
|
ruby "#{racc} -l -o #{rb_file} #{parser_file}"
|
@@ -69,7 +76,7 @@ parsed_files = PARSER_FILES.map do |parser_file|
|
|
69
76
|
f.rewind
|
70
77
|
f.write newtext
|
71
78
|
end
|
72
|
-
|
79
|
+
when '.kpeg' # need kpeg
|
73
80
|
kpeg = Gem.bin_path 'kpeg', 'kpeg'
|
74
81
|
rb_file = parser_file.gsub(/\.kpeg\z/, ".rb")
|
75
82
|
ruby "#{kpeg} -fsv -o #{rb_file} #{parser_file}"
|
@@ -80,12 +87,15 @@ parsed_files = PARSER_FILES.map do |parser_file|
|
|
80
87
|
end
|
81
88
|
|
82
89
|
task "#{path}.gem" => package_parser_files
|
83
|
-
|
84
|
-
RuboCop::RakeTask.new(:rubocop) do |t|
|
85
|
-
t.options = [*parsed_files]
|
86
|
-
end
|
87
|
-
|
88
|
-
desc "Genrate all files used racc and kpeg"
|
90
|
+
desc "Generate all files used racc and kpeg"
|
89
91
|
task :generate => parsed_files
|
90
92
|
|
91
|
-
|
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/lib/rdoc/any_method.rb
CHANGED
@@ -26,12 +26,6 @@ class RDoc::AnyMethod < RDoc::MethodAttr
|
|
26
26
|
|
27
27
|
attr_accessor :c_function
|
28
28
|
|
29
|
-
##
|
30
|
-
# Different ways to call this method
|
31
|
-
|
32
|
-
attr_reader :call_seq
|
33
|
-
|
34
|
-
##
|
35
29
|
# Parameters for this method
|
36
30
|
|
37
31
|
attr_accessor :params
|
@@ -93,6 +87,19 @@ class RDoc::AnyMethod < RDoc::MethodAttr
|
|
93
87
|
end
|
94
88
|
end
|
95
89
|
|
90
|
+
##
|
91
|
+
# Different ways to call this method
|
92
|
+
|
93
|
+
def call_seq
|
94
|
+
unless call_seq = _call_seq
|
95
|
+
call_seq = is_alias_for._call_seq if is_alias_for
|
96
|
+
end
|
97
|
+
|
98
|
+
return unless call_seq
|
99
|
+
|
100
|
+
deduplicate_call_seq(call_seq)
|
101
|
+
end
|
102
|
+
|
96
103
|
##
|
97
104
|
# Sets the different ways you can call this method. If an empty +call_seq+
|
98
105
|
# is given nil is assumed.
|
@@ -312,5 +319,43 @@ class RDoc::AnyMethod < RDoc::MethodAttr
|
|
312
319
|
@superclass_method
|
313
320
|
end
|
314
321
|
|
315
|
-
|
322
|
+
protected
|
323
|
+
|
324
|
+
##
|
325
|
+
# call_seq without deduplication and alias lookup.
|
326
|
+
|
327
|
+
def _call_seq
|
328
|
+
@call_seq if defined?(@call_seq) && @call_seq
|
329
|
+
end
|
330
|
+
|
331
|
+
private
|
332
|
+
|
333
|
+
##
|
334
|
+
# call_seq with alias examples information removed, if this
|
335
|
+
# method is an alias method.
|
336
|
+
|
337
|
+
def deduplicate_call_seq(call_seq)
|
338
|
+
return call_seq unless is_alias_for || !aliases.empty?
|
339
|
+
|
340
|
+
method_name = self.name
|
341
|
+
method_name = method_name[0, 1] if method_name =~ /\A\[/
|
316
342
|
|
343
|
+
entries = call_seq.split "\n"
|
344
|
+
|
345
|
+
ignore = aliases.map(&:name)
|
346
|
+
if is_alias_for
|
347
|
+
ignore << is_alias_for.name
|
348
|
+
ignore.concat is_alias_for.aliases.map(&:name)
|
349
|
+
end
|
350
|
+
ignore.map! { |n| n =~ /\A\[/ ? n[0, 1] : n}
|
351
|
+
ignore.delete(method_name)
|
352
|
+
ignore = Regexp.union(ignore)
|
353
|
+
|
354
|
+
matching = entries.reject do |entry|
|
355
|
+
entry =~ /^\w*\.?#{ignore}/ or
|
356
|
+
entry =~ /\s#{ignore}\s/
|
357
|
+
end
|
358
|
+
|
359
|
+
matching.join "\n"
|
360
|
+
end
|
361
|
+
end
|
data/lib/rdoc/class_module.rb
CHANGED
@@ -210,7 +210,7 @@ class RDoc::ClassModule < RDoc::Context
|
|
210
210
|
normalize_comment comment
|
211
211
|
end
|
212
212
|
|
213
|
-
comment = "#{@comment}\n---\n#{comment}" unless @comment.empty?
|
213
|
+
comment = "#{@comment.to_s}\n---\n#{comment.to_s}" unless @comment.empty?
|
214
214
|
|
215
215
|
super comment
|
216
216
|
end
|
data/lib/rdoc/comment.rb
CHANGED
@@ -23,6 +23,11 @@ class RDoc::Comment
|
|
23
23
|
|
24
24
|
attr_accessor :location
|
25
25
|
|
26
|
+
##
|
27
|
+
# Line where this Comment was written
|
28
|
+
|
29
|
+
attr_accessor :line
|
30
|
+
|
26
31
|
##
|
27
32
|
# For duck-typing when merging classes at load time
|
28
33
|
|
@@ -33,6 +38,11 @@ class RDoc::Comment
|
|
33
38
|
|
34
39
|
attr_reader :text
|
35
40
|
|
41
|
+
##
|
42
|
+
# Alias for text
|
43
|
+
|
44
|
+
alias to_s text
|
45
|
+
|
36
46
|
##
|
37
47
|
# Overrides the content returned by #parse. Use when there is no #text
|
38
48
|
# source for this comment
|
@@ -43,9 +53,10 @@ class RDoc::Comment
|
|
43
53
|
# Creates a new comment with +text+ that is found in the RDoc::TopLevel
|
44
54
|
# +location+.
|
45
55
|
|
46
|
-
def initialize text = nil, location = nil
|
56
|
+
def initialize text = nil, location = nil, language = nil
|
47
57
|
@location = location
|
48
58
|
@text = text.nil? ? nil : text.dup
|
59
|
+
@language = language
|
49
60
|
|
50
61
|
@document = nil
|
51
62
|
@format = 'rdoc'
|
data/lib/rdoc/context/section.rb
CHANGED
@@ -34,8 +34,6 @@ class RDoc::Context::Section
|
|
34
34
|
|
35
35
|
attr_reader :title
|
36
36
|
|
37
|
-
@@sequence = "SEC00000"
|
38
|
-
|
39
37
|
##
|
40
38
|
# Creates a new section with +title+ and +comment+
|
41
39
|
|
@@ -43,9 +41,6 @@ class RDoc::Context::Section
|
|
43
41
|
@parent = parent
|
44
42
|
@title = title ? title.strip : title
|
45
43
|
|
46
|
-
@@sequence = @@sequence.succ
|
47
|
-
@sequence = @@sequence.dup
|
48
|
-
|
49
44
|
@comments = []
|
50
45
|
|
51
46
|
add_comment comment
|
@@ -233,13 +228,5 @@ class RDoc::Context::Section
|
|
233
228
|
end
|
234
229
|
end
|
235
230
|
|
236
|
-
##
|
237
|
-
# Section sequence number (deprecated)
|
238
|
-
|
239
|
-
def sequence
|
240
|
-
warn "RDoc::Context::Section#sequence is deprecated, use #aref"
|
241
|
-
@sequence
|
242
|
-
end
|
243
|
-
|
244
231
|
end
|
245
232
|
|
data/lib/rdoc/context.rb
CHANGED
@@ -990,13 +990,21 @@ class RDoc::Context < RDoc::CodeObject
|
|
990
990
|
@instance_attributes ||= attributes.reject { |a| a.singleton }
|
991
991
|
end
|
992
992
|
|
993
|
+
##
|
994
|
+
# Instance methods
|
995
|
+
|
996
|
+
def instance_methods
|
997
|
+
@instance_methods ||= method_list.reject { |a| a.singleton }
|
998
|
+
end
|
999
|
+
|
993
1000
|
##
|
994
1001
|
# Instance methods
|
995
1002
|
#--
|
996
|
-
# TODO
|
1003
|
+
# TODO remove this later
|
997
1004
|
|
998
1005
|
def instance_method_list
|
999
|
-
|
1006
|
+
warn '#instance_method_list is obsoleted, please use #instance_methods'
|
1007
|
+
@instance_methods ||= method_list.reject { |a| a.singleton }
|
1000
1008
|
end
|
1001
1009
|
|
1002
1010
|
##
|
data/lib/rdoc/cross_reference.rb
CHANGED
@@ -19,7 +19,7 @@ class RDoc::CrossReference
|
|
19
19
|
#
|
20
20
|
# See CLASS_REGEXP_STR
|
21
21
|
|
22
|
-
METHOD_REGEXP_STR = '([a-z]\w*[!?=]?|%|===|\[\]
|
22
|
+
METHOD_REGEXP_STR = '([a-z]\w*[!?=]?|%|===|\[\]=?|<<|>>|\+@|-@|-|\+|\*)(?:\([\w.+*/=<>-]*\))?'
|
23
23
|
|
24
24
|
##
|
25
25
|
# Regular expressions matching text that should potentially have
|
@@ -28,7 +28,7 @@ class RDoc::CrossReference
|
|
28
28
|
# have been suppressed, since the suppression characters are removed by the
|
29
29
|
# code that is triggered.
|
30
30
|
|
31
|
-
CROSSREF_REGEXP = /(
|
31
|
+
CROSSREF_REGEXP = /(?:^|[\s()])
|
32
32
|
(
|
33
33
|
(?:
|
34
34
|
# A::B::C.meth
|
@@ -76,7 +76,7 @@ class RDoc::CrossReference
|
|
76
76
|
# Version of CROSSREF_REGEXP used when <tt>--hyperlink-all</tt> is specified.
|
77
77
|
|
78
78
|
ALL_CROSSREF_REGEXP = /
|
79
|
-
(
|
79
|
+
(?:^|[\s()])
|
80
80
|
(
|
81
81
|
(?:
|
82
82
|
# A::B::C.meth
|
@@ -173,7 +173,7 @@ class RDoc::CrossReference
|
|
173
173
|
end unless ref
|
174
174
|
|
175
175
|
# Try a page name
|
176
|
-
ref = @store.page name if not ref and name =~
|
176
|
+
ref = @store.page name if not ref and name =~ /^[\w.]+$/
|
177
177
|
|
178
178
|
ref = nil if RDoc::Alias === ref # external alias, can't link to it
|
179
179
|
|
data/lib/rdoc/erb_partial.rb
CHANGED
data/lib/rdoc/erbio.rb
CHANGED
@@ -20,11 +20,11 @@ class RDoc::ERBIO < ERB
|
|
20
20
|
##
|
21
21
|
# Defaults +eoutvar+ to 'io', otherwise is identical to ERB's initialize
|
22
22
|
|
23
|
-
def initialize str, safe_level = nil,
|
23
|
+
def initialize str, safe_level = nil, legacy_trim_mode = nil, legacy_eoutvar = 'io', trim_mode: nil, eoutvar: 'io'
|
24
24
|
if RUBY_VERSION >= '2.6'
|
25
25
|
super(str, trim_mode: trim_mode, eoutvar: eoutvar)
|
26
26
|
else
|
27
|
-
super
|
27
|
+
super(str, safe_level, legacy_trim_mode, legacy_eoutvar)
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
@@ -4,7 +4,7 @@
|
|
4
4
|
require 'erb'
|
5
5
|
require 'fileutils'
|
6
6
|
require 'pathname'
|
7
|
-
|
7
|
+
require_relative 'markup'
|
8
8
|
|
9
9
|
##
|
10
10
|
# Darkfish RDoc HTML Generator
|
@@ -269,7 +269,7 @@ class RDoc::Generator::Darkfish
|
|
269
269
|
|
270
270
|
@options.static_path.each do |path|
|
271
271
|
unless File.directory? path then
|
272
|
-
FileUtils.install path, @outputdir, fu_options.merge(:mode => 0644)
|
272
|
+
FileUtils.install path, @outputdir, **fu_options.merge(:mode => 0644)
|
273
273
|
next
|
274
274
|
end
|
275
275
|
|
@@ -278,9 +278,9 @@ class RDoc::Generator::Darkfish
|
|
278
278
|
dest_file = @outputdir + entry
|
279
279
|
|
280
280
|
if File.directory? entry then
|
281
|
-
FileUtils.mkdir_p entry, fu_options
|
281
|
+
FileUtils.mkdir_p entry, **fu_options
|
282
282
|
else
|
283
|
-
FileUtils.install entry, dest_file, fu_options.merge(:mode => 0644)
|
283
|
+
FileUtils.install entry, dest_file, **fu_options.merge(:mode => 0644)
|
284
284
|
end
|
285
285
|
end
|
286
286
|
end
|
@@ -585,16 +585,16 @@ class RDoc::Generator::Darkfish
|
|
585
585
|
return unless source.exist?
|
586
586
|
|
587
587
|
begin
|
588
|
-
FileUtils.mkdir_p File.dirname(destination), options
|
588
|
+
FileUtils.mkdir_p File.dirname(destination), **options
|
589
589
|
|
590
590
|
begin
|
591
|
-
FileUtils.ln source, destination, options
|
591
|
+
FileUtils.ln source, destination, **options
|
592
592
|
rescue Errno::EEXIST
|
593
593
|
FileUtils.rm destination
|
594
594
|
retry
|
595
595
|
end
|
596
596
|
rescue
|
597
|
-
FileUtils.cp source, destination, options
|
597
|
+
FileUtils.cp source, destination, **options
|
598
598
|
end
|
599
599
|
end
|
600
600
|
|
@@ -779,9 +779,9 @@ class RDoc::Generator::Darkfish
|
|
779
779
|
end
|
780
780
|
|
781
781
|
if RUBY_VERSION >= '2.6'
|
782
|
-
template = klass.new template, trim_mode: '
|
782
|
+
template = klass.new template, trim_mode: '-', eoutvar: erbout
|
783
783
|
else
|
784
|
-
template = klass.new template, nil, '
|
784
|
+
template = klass.new template, nil, '-', erbout
|
785
785
|
end
|
786
786
|
@template_cache[file] = template
|
787
787
|
template
|
data/lib/rdoc/generator/pot.rb
CHANGED
@@ -91,8 +91,8 @@ class RDoc::Generator::POT
|
|
91
91
|
extractor.extract
|
92
92
|
end
|
93
93
|
|
94
|
-
|
95
|
-
|
96
|
-
|
94
|
+
require_relative 'pot/message_extractor'
|
95
|
+
require_relative 'pot/po'
|
96
|
+
require_relative 'pot/po_entry'
|
97
97
|
|
98
98
|
end
|
@@ -15,9 +15,8 @@
|
|
15
15
|
|
16
16
|
<link href="<%= asset_rel_prefix %>/css/fonts.css" rel="stylesheet">
|
17
17
|
<link href="<%= asset_rel_prefix %>/css/rdoc.css" rel="stylesheet">
|
18
|
-
|
19
|
-
|
18
|
+
<%- if @options.template_stylesheets.flatten.any? then -%>
|
19
|
+
<%- @options.template_stylesheets.flatten.each do |stylesheet| -%>
|
20
20
|
<link href="<%= asset_rel_prefix %>/<%= File.basename stylesheet %>" rel="stylesheet">
|
21
|
-
|
22
|
-
|
23
|
-
|
21
|
+
<%- end -%>
|
22
|
+
<%- end -%>
|
@@ -2,8 +2,8 @@
|
|
2
2
|
<h3>Class and Module Index</h3>
|
3
3
|
|
4
4
|
<ul class="link-list">
|
5
|
-
|
5
|
+
<%- @modsort.each do |index_klass| -%>
|
6
6
|
<li><a href="<%= rel_prefix %>/<%= index_klass.path %>"><%= index_klass.full_name %></a>
|
7
|
-
|
7
|
+
<%- end -%>
|
8
8
|
</ul>
|
9
9
|
</div>
|
@@ -1,15 +1,15 @@
|
|
1
|
-
|
1
|
+
<%- unless klass.extends.empty? then %>
|
2
2
|
<div id="extends-section" class="nav-section">
|
3
3
|
<h3>Extended With Modules</h3>
|
4
4
|
|
5
5
|
<ul class="link-list">
|
6
|
-
|
7
|
-
|
6
|
+
<%- klass.each_extend do |ext| -%>
|
7
|
+
<%- unless String === ext.module then -%>
|
8
8
|
<li><a class="extend" href="<%= klass.aref_to ext.module.path %>"><%= ext.module.full_name %></a>
|
9
|
-
|
9
|
+
<%- else -%>
|
10
10
|
<li><span class="extend"><%= ext.name %></span>
|
11
|
-
|
12
|
-
|
11
|
+
<%- end -%>
|
12
|
+
<%- end -%>
|
13
13
|
</ul>
|
14
14
|
</div>
|
15
|
-
|
15
|
+
<%- end -%>
|
@@ -1,15 +1,15 @@
|
|
1
|
-
|
1
|
+
<%- unless klass.includes.empty? then %>
|
2
2
|
<div id="includes-section" class="nav-section">
|
3
3
|
<h3>Included Modules</h3>
|
4
4
|
|
5
5
|
<ul class="link-list">
|
6
|
-
|
7
|
-
|
6
|
+
<%- klass.each_include do |inc| -%>
|
7
|
+
<%- unless String === inc.module then -%>
|
8
8
|
<li><a class="include" href="<%= klass.aref_to inc.module.path %>"><%= inc.module.full_name %></a>
|
9
|
-
|
9
|
+
<%- else -%>
|
10
10
|
<li><span class="include"><%= inc.name %></span>
|
11
|
-
|
12
|
-
|
11
|
+
<%- end -%>
|
12
|
+
<%- end -%>
|
13
13
|
</ul>
|
14
14
|
</div>
|
15
|
-
|
15
|
+
<%- end -%>
|
@@ -2,14 +2,14 @@
|
|
2
2
|
<h3>Documentation</h3>
|
3
3
|
|
4
4
|
<ul>
|
5
|
-
|
6
|
-
|
5
|
+
<%- installed.each do |name, href, exists, type, _| -%>
|
6
|
+
<%- next if type == :extra -%>
|
7
7
|
<li class="folder">
|
8
|
-
|
8
|
+
<%- if exists then -%>
|
9
9
|
<a href="<%= href %>"><%= h name %></a>
|
10
|
-
|
10
|
+
<%- else -%>
|
11
11
|
<%= h name %>
|
12
|
-
|
13
|
-
|
12
|
+
<%- end -%>
|
13
|
+
<%- end -%>
|
14
14
|
</ul>
|
15
15
|
</div>
|
@@ -1,12 +1,12 @@
|
|
1
|
-
|
1
|
+
<%- unless klass.method_list.empty? then %>
|
2
2
|
<!-- Method Quickref -->
|
3
3
|
<div id="method-list-section" class="nav-section">
|
4
4
|
<h3>Methods</h3>
|
5
5
|
|
6
6
|
<ul class="link-list" role="directory">
|
7
|
-
|
8
|
-
<li
|
9
|
-
|
7
|
+
<%- klass.each_method do |meth| -%>
|
8
|
+
<li <%- if meth.calls_super %>class="calls-super" <%- end %>><a href="#<%= meth.aref %>"><%= meth.singleton ? '::' : '#' %><%= h meth.name -%></a>
|
9
|
+
<%- end -%>
|
10
10
|
</ul>
|
11
11
|
</div>
|
12
|
-
|
12
|
+
<%- end -%>
|
@@ -1,12 +1,12 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
<%- simple_files = @files.select { |f| f.text? } %>
|
2
|
+
<%- unless simple_files.empty? then -%>
|
3
3
|
<div id="fileindex-section" class="nav-section">
|
4
4
|
<h3>Pages</h3>
|
5
5
|
|
6
6
|
<ul class="link-list">
|
7
|
-
|
7
|
+
<%- simple_files.each do |f| -%>
|
8
8
|
<li><a href="<%= rel_prefix %>/<%= f.path %>"><%= h f.page_name %></a>
|
9
|
-
|
9
|
+
<%- end -%>
|
10
10
|
</ul>
|
11
11
|
</div>
|
12
|
-
|
12
|
+
<%- end -%>
|
@@ -1,11 +1,11 @@
|
|
1
|
-
|
1
|
+
<%- if klass.type == 'class' then %>
|
2
2
|
<div id="parent-class-section" class="nav-section">
|
3
3
|
<h3>Parent</h3>
|
4
4
|
|
5
|
-
|
5
|
+
<%- if klass.superclass and not String === klass.superclass then -%>
|
6
6
|
<p class="link"><a href="<%= klass.aref_to klass.superclass.path %>"><%= klass.superclass.full_name %></a>
|
7
|
-
|
7
|
+
<%- else -%>
|
8
8
|
<p class="link"><%= klass.superclass %>
|
9
|
-
|
9
|
+
<%- end -%>
|
10
10
|
</div>
|
11
|
-
|
11
|
+
<%- end -%>
|
@@ -1,11 +1,11 @@
|
|
1
|
-
|
1
|
+
<%- unless klass.sections.length == 1 then %>
|
2
2
|
<div id="sections-section" class="nav-section">
|
3
3
|
<h3>Sections</h3>
|
4
4
|
|
5
5
|
<ul class="link-list" role="directory">
|
6
|
-
|
6
|
+
<%- klass.sort_sections.each do |section| -%>
|
7
7
|
<li><a href="#<%= section.aref %>"><%= h section.title %></a></li>
|
8
|
-
|
8
|
+
<%- end -%>
|
9
9
|
</ul>
|
10
10
|
</div>
|
11
|
-
|
11
|
+
<%- end -%>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
<%- comment = if current.respond_to? :comment_location then
|
2
2
|
current.comment_location
|
3
3
|
else
|
4
4
|
current.comment
|
@@ -10,9 +10,9 @@
|
|
10
10
|
<h3>Table of Contents</h3>
|
11
11
|
|
12
12
|
<ul class="link-list" role="directory">
|
13
|
-
|
13
|
+
<%- table.each do |heading| -%>
|
14
14
|
<li><a href="#<%= heading.label current %>"><%= heading.plain_html %></a>
|
15
|
-
|
15
|
+
<%- end -%>
|
16
16
|
</ul>
|
17
17
|
</div>
|
18
|
-
|
18
|
+
<%- end -%>
|