rdoc 3.12.2 → 4.0.0.preview2
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 +6 -6
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/.autotest +3 -2
- data/DEVELOPERS.rdoc +53 -0
- data/History.rdoc +159 -25
- data/LEGAL.rdoc +12 -0
- data/Manifest.txt +56 -3
- data/README.rdoc +87 -19
- data/Rakefile +11 -2
- data/TODO.rdoc +20 -13
- data/bin/rdoc +4 -0
- data/lib/gauntlet_rdoc.rb +1 -1
- data/lib/rdoc.rb +32 -71
- data/lib/rdoc/any_method.rb +75 -21
- data/lib/rdoc/attr.rb +49 -10
- data/lib/rdoc/class_module.rb +182 -32
- data/lib/rdoc/code_object.rb +54 -12
- data/lib/rdoc/comment.rb +8 -1
- data/lib/rdoc/constant.rb +100 -6
- data/lib/rdoc/context.rb +93 -41
- data/lib/rdoc/context/section.rb +143 -28
- data/lib/rdoc/cross_reference.rb +58 -50
- data/lib/rdoc/encoding.rb +34 -29
- data/lib/rdoc/erb_partial.rb +18 -0
- data/lib/rdoc/extend.rb +117 -0
- data/lib/rdoc/generator.rb +11 -6
- data/lib/rdoc/generator/darkfish.rb +250 -62
- data/lib/rdoc/generator/json_index.rb +20 -12
- data/lib/rdoc/generator/markup.rb +10 -12
- data/lib/rdoc/generator/ri.rb +7 -60
- data/lib/rdoc/generator/template/darkfish/_head.rhtml +7 -7
- data/lib/rdoc/generator/template/darkfish/_sidebar_extends.rhtml +16 -0
- data/lib/rdoc/generator/template/darkfish/_sidebar_in_files.rhtml +1 -1
- data/lib/rdoc/generator/template/darkfish/_sidebar_installed.rhtml +14 -0
- data/lib/rdoc/generator/template/darkfish/_sidebar_methods.rhtml +1 -1
- data/lib/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml +13 -0
- data/lib/rdoc/generator/template/darkfish/class.rhtml +15 -1
- data/lib/rdoc/generator/template/darkfish/images/arrow_up.png +0 -0
- data/lib/rdoc/generator/template/darkfish/index.rhtml +3 -3
- data/lib/rdoc/generator/template/darkfish/js/darkfish.js +7 -9
- data/lib/rdoc/generator/template/darkfish/page.rhtml +2 -0
- data/lib/rdoc/generator/template/darkfish/rdoc.css +31 -0
- data/lib/rdoc/generator/template/darkfish/servlet_not_found.rhtml +18 -0
- data/lib/rdoc/generator/template/darkfish/servlet_root.rhtml +37 -0
- data/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml +3 -3
- data/lib/rdoc/include.rb +12 -3
- data/lib/rdoc/markdown.kpeg +1186 -0
- data/lib/rdoc/markdown.rb +16336 -0
- data/lib/rdoc/markdown/entities.rb +2128 -0
- data/lib/rdoc/markdown/literals_1_8.kpeg +18 -0
- data/lib/rdoc/markdown/literals_1_8.rb +454 -0
- data/lib/rdoc/markdown/literals_1_9.kpeg +22 -0
- data/lib/rdoc/markdown/literals_1_9.rb +417 -0
- data/lib/rdoc/markup.rb +69 -10
- data/lib/rdoc/markup/attr_changer.rb +2 -5
- data/lib/rdoc/markup/attribute_manager.rb +23 -14
- data/lib/rdoc/markup/attributes.rb +70 -0
- data/lib/rdoc/markup/block_quote.rb +14 -0
- data/lib/rdoc/markup/document.rb +20 -4
- data/lib/rdoc/markup/formatter.rb +17 -6
- data/lib/rdoc/markup/formatter_test_case.rb +93 -24
- data/lib/rdoc/markup/hard_break.rb +31 -0
- data/lib/rdoc/markup/heading.rb +1 -1
- data/lib/rdoc/markup/indented_paragraph.rb +14 -0
- data/lib/rdoc/markup/list.rb +23 -4
- data/lib/rdoc/markup/list_item.rb +17 -4
- data/lib/rdoc/markup/paragraph.rb +14 -0
- data/lib/rdoc/markup/parser.rb +107 -60
- data/lib/rdoc/markup/raw.rb +4 -4
- data/lib/rdoc/markup/special.rb +3 -3
- data/lib/rdoc/markup/to_ansi.rb +7 -1
- data/lib/rdoc/markup/to_html.rb +42 -14
- data/lib/rdoc/markup/to_html_crossref.rb +10 -9
- data/lib/rdoc/markup/to_html_snippet.rb +20 -4
- data/lib/rdoc/markup/to_joined_paragraph.rb +68 -0
- data/lib/rdoc/markup/to_label.rb +20 -1
- data/lib/rdoc/markup/to_markdown.rb +134 -0
- data/lib/rdoc/markup/to_rdoc.rb +36 -5
- data/lib/rdoc/markup/to_table_of_contents.rb +6 -1
- data/lib/rdoc/markup/to_tt_only.rb +11 -2
- data/lib/rdoc/markup/verbatim.rb +19 -0
- data/lib/rdoc/method_attr.rb +33 -19
- data/lib/rdoc/normal_class.rb +26 -7
- data/lib/rdoc/normal_module.rb +10 -5
- data/lib/rdoc/options.rb +95 -21
- data/lib/rdoc/parser.rb +6 -2
- data/lib/rdoc/parser/c.rb +212 -97
- data/lib/rdoc/parser/markdown.rb +23 -0
- data/lib/rdoc/parser/ruby.rb +115 -35
- data/lib/rdoc/parser/ruby_tools.rb +8 -3
- data/lib/rdoc/rd.rb +8 -4
- data/lib/rdoc/rd/block_parser.rb +1 -1
- data/lib/rdoc/rd/block_parser.ry +1 -1
- data/lib/rdoc/rdoc.rb +45 -21
- data/lib/rdoc/ri/driver.rb +322 -76
- data/lib/rdoc/ri/paths.rb +90 -31
- data/lib/rdoc/ri/store.rb +2 -353
- data/lib/rdoc/ruby_lex.rb +5 -21
- data/lib/rdoc/ruby_token.rb +2 -3
- data/lib/rdoc/rubygems_hook.rb +21 -9
- data/lib/rdoc/servlet.rb +302 -0
- data/lib/rdoc/stats.rb +28 -20
- data/lib/rdoc/store.rb +881 -0
- data/lib/rdoc/task.rb +2 -1
- data/lib/rdoc/test_case.rb +103 -1
- data/lib/rdoc/text.rb +5 -4
- data/lib/rdoc/tom_doc.rb +17 -16
- data/lib/rdoc/top_level.rb +43 -285
- data/test/MarkdownTest_1.0.3/Amps and angle encoding.text +21 -0
- data/test/MarkdownTest_1.0.3/Auto links.text +13 -0
- data/test/MarkdownTest_1.0.3/Backslash escapes.text +120 -0
- data/test/MarkdownTest_1.0.3/Blockquotes with code blocks.text +11 -0
- data/test/MarkdownTest_1.0.3/Code Blocks.text +14 -0
- data/test/MarkdownTest_1.0.3/Code Spans.text +6 -0
- data/test/MarkdownTest_1.0.3/Hard-wrapped paragraphs with list-like lines.text +8 -0
- data/test/MarkdownTest_1.0.3/Horizontal rules.text +67 -0
- data/test/MarkdownTest_1.0.3/Inline HTML (Advanced).text +15 -0
- data/test/MarkdownTest_1.0.3/Inline HTML (Simple).text +69 -0
- data/test/MarkdownTest_1.0.3/Inline HTML comments.text +13 -0
- data/test/MarkdownTest_1.0.3/Links, inline style.text +12 -0
- data/test/MarkdownTest_1.0.3/Links, reference style.text +71 -0
- data/test/MarkdownTest_1.0.3/Links, shortcut references.text +20 -0
- data/test/MarkdownTest_1.0.3/Literal quotes in titles.text +7 -0
- data/test/MarkdownTest_1.0.3/Markdown Documentation - Basics.text +306 -0
- data/test/MarkdownTest_1.0.3/Markdown Documentation - Syntax.text +888 -0
- data/test/MarkdownTest_1.0.3/Nested blockquotes.text +5 -0
- data/test/MarkdownTest_1.0.3/Ordered and unordered lists.text +131 -0
- data/test/MarkdownTest_1.0.3/Strong and em together.text +7 -0
- data/test/MarkdownTest_1.0.3/Tabs.text +21 -0
- data/test/MarkdownTest_1.0.3/Tidyness.text +5 -0
- data/test/test_attribute_manager.rb +7 -4
- data/test/test_rdoc_any_method.rb +84 -13
- data/test/test_rdoc_attr.rb +59 -9
- data/test/test_rdoc_class_module.rb +670 -73
- data/test/test_rdoc_code_object.rb +21 -1
- data/test/test_rdoc_comment.rb +1 -1
- data/test/test_rdoc_constant.rb +132 -0
- data/test/test_rdoc_context.rb +84 -18
- data/test/test_rdoc_context_section.rb +99 -15
- data/test/test_rdoc_cross_reference.rb +1 -1
- data/test/test_rdoc_encoding.rb +17 -1
- data/test/test_rdoc_extend.rb +94 -0
- data/test/test_rdoc_generator_darkfish.rb +45 -19
- data/test/test_rdoc_generator_json_index.rb +27 -7
- data/test/test_rdoc_generator_markup.rb +3 -3
- data/test/test_rdoc_generator_ri.rb +11 -9
- data/test/test_rdoc_include.rb +12 -0
- data/test/test_rdoc_markdown.rb +977 -0
- data/test/test_rdoc_markdown_test.rb +1891 -0
- data/test/test_rdoc_markup.rb +1 -1
- data/test/test_rdoc_markup_attribute_manager.rb +2 -2
- data/test/test_rdoc_markup_attributes.rb +39 -0
- data/test/test_rdoc_markup_document.rb +16 -1
- data/test/test_rdoc_markup_formatter.rb +7 -4
- data/test/test_rdoc_markup_hard_break.rb +31 -0
- data/test/test_rdoc_markup_indented_paragraph.rb +14 -0
- data/test/test_rdoc_markup_paragraph.rb +15 -1
- data/test/test_rdoc_markup_parser.rb +152 -89
- data/test/test_rdoc_markup_to_ansi.rb +23 -2
- data/test/test_rdoc_markup_to_bs.rb +24 -0
- data/test/test_rdoc_markup_to_html.rb +50 -19
- data/test/test_rdoc_markup_to_html_crossref.rb +23 -5
- data/test/test_rdoc_markup_to_html_snippet.rb +49 -8
- data/test/test_rdoc_markup_to_joined_paragraph.rb +32 -0
- data/test/test_rdoc_markup_to_label.rb +63 -1
- data/test/test_rdoc_markup_to_markdown.rb +352 -0
- data/test/test_rdoc_markup_to_rdoc.rb +22 -2
- data/test/test_rdoc_markup_to_table_of_contents.rb +44 -39
- data/test/test_rdoc_markup_to_tt_only.rb +20 -0
- data/test/test_rdoc_markup_verbatim.rb +13 -0
- data/test/test_rdoc_method_attr.rb +5 -0
- data/test/test_rdoc_normal_class.rb +24 -5
- data/test/test_rdoc_normal_module.rb +1 -1
- data/test/test_rdoc_options.rb +21 -6
- data/test/test_rdoc_parser.rb +24 -0
- data/test/test_rdoc_parser_c.rb +151 -26
- data/test/test_rdoc_parser_markdown.rb +55 -0
- data/test/test_rdoc_parser_rd.rb +2 -2
- data/test/test_rdoc_parser_ruby.rb +468 -109
- data/test/test_rdoc_parser_simple.rb +2 -2
- data/test/test_rdoc_rd_block_parser.rb +0 -4
- data/test/test_rdoc_rdoc.rb +110 -22
- data/test/test_rdoc_ri_driver.rb +415 -80
- data/test/test_rdoc_ri_paths.rb +122 -13
- data/test/test_rdoc_ruby_lex.rb +5 -61
- data/test/test_rdoc_ruby_token.rb +19 -0
- data/test/test_rdoc_rubygems_hook.rb +64 -43
- data/test/test_rdoc_servlet.rb +429 -0
- data/test/test_rdoc_stats.rb +83 -24
- data/test/{test_rdoc_ri_store.rb → test_rdoc_store.rb} +395 -22
- data/test/test_rdoc_task.rb +2 -2
- data/test/test_rdoc_text.rb +37 -11
- data/test/test_rdoc_tom_doc.rb +59 -62
- data/test/test_rdoc_top_level.rb +71 -113
- data/test/xref_test_case.rb +7 -9
- metadata +122 -39
- metadata.gz.sig +0 -0
- data/CVE-2013-0256.rdoc +0 -49
- data/lib/rdoc/markup/attribute.rb +0 -51
@@ -15,9 +15,9 @@ require 'json'
|
|
15
15
|
# @json_index = RDoc::Generator::JsonIndex.new self, options
|
16
16
|
# end
|
17
17
|
#
|
18
|
-
# def generate
|
18
|
+
# def generate
|
19
19
|
# # ...
|
20
|
-
# @json_index.generate
|
20
|
+
# @json_index.generate
|
21
21
|
# end
|
22
22
|
# end
|
23
23
|
#
|
@@ -88,7 +88,8 @@ class RDoc::Generator::JsonIndex
|
|
88
88
|
|
89
89
|
def initialize parent_generator, options
|
90
90
|
@parent_generator = parent_generator
|
91
|
-
@
|
91
|
+
@store = parent_generator.store
|
92
|
+
@options = options
|
92
93
|
|
93
94
|
@template_dir = File.expand_path '../template/json_index', __FILE__
|
94
95
|
@base_dir = @parent_generator.base_dir
|
@@ -98,6 +99,19 @@ class RDoc::Generator::JsonIndex
|
|
98
99
|
@index = nil
|
99
100
|
end
|
100
101
|
|
102
|
+
##
|
103
|
+
# Builds the JSON index as a Hash.
|
104
|
+
|
105
|
+
def build_index
|
106
|
+
reset @store.all_files.sort, @store.all_classes_and_modules.sort
|
107
|
+
|
108
|
+
index_classes
|
109
|
+
index_methods
|
110
|
+
index_pages
|
111
|
+
|
112
|
+
{ :index => @index }
|
113
|
+
end
|
114
|
+
|
101
115
|
##
|
102
116
|
# Output progress information if debugging is enabled
|
103
117
|
|
@@ -107,19 +121,13 @@ class RDoc::Generator::JsonIndex
|
|
107
121
|
end
|
108
122
|
|
109
123
|
##
|
110
|
-
#
|
124
|
+
# Writes the JSON index to disk
|
111
125
|
|
112
|
-
def generate
|
126
|
+
def generate
|
113
127
|
debug_msg "Generating JSON index"
|
114
128
|
|
115
|
-
reset top_levels.sort, RDoc::TopLevel.all_classes_and_modules.sort
|
116
|
-
|
117
|
-
index_classes
|
118
|
-
index_methods
|
119
|
-
index_pages
|
120
|
-
|
121
129
|
debug_msg " writing search index to %s" % SEARCH_INDEX_FILE
|
122
|
-
data =
|
130
|
+
data = build_index
|
123
131
|
|
124
132
|
return if @options.dry_run
|
125
133
|
|
@@ -1,4 +1,3 @@
|
|
1
|
-
|
2
1
|
##
|
3
2
|
# Handle common RDoc::Markup tasks for various CodeObjects
|
4
3
|
#
|
@@ -34,12 +33,10 @@ module RDoc::Generator::Markup
|
|
34
33
|
def formatter
|
35
34
|
return @formatter if defined? @formatter
|
36
35
|
|
37
|
-
|
38
|
-
hyperlink_all = RDoc::RDoc.current.options.hyperlink_all
|
36
|
+
options = @store.rdoc.options
|
39
37
|
this = RDoc::Context === self ? self : @parent
|
40
38
|
|
41
|
-
@formatter = RDoc::Markup::ToHtmlCrossref.new
|
42
|
-
hyperlink_all)
|
39
|
+
@formatter = RDoc::Markup::ToHtmlCrossref.new options, this.path, this
|
43
40
|
@formatter.code_object = self
|
44
41
|
@formatter
|
45
42
|
end
|
@@ -47,7 +44,7 @@ module RDoc::Generator::Markup
|
|
47
44
|
##
|
48
45
|
# Build a webcvs URL starting for the given +url+ with +full_path+ appended
|
49
46
|
# as the destination path. If +url+ contains '%s' +full_path+ will be
|
50
|
-
# sprintf
|
47
|
+
# will replace the %s using sprintf on the +url+.
|
51
48
|
|
52
49
|
def cvs_url(url, full_path)
|
53
50
|
if /%s/ =~ url then
|
@@ -65,7 +62,7 @@ class RDoc::CodeObject
|
|
65
62
|
|
66
63
|
end
|
67
64
|
|
68
|
-
class RDoc::
|
65
|
+
class RDoc::MethodAttr
|
69
66
|
|
70
67
|
@add_line_numbers = false
|
71
68
|
|
@@ -83,7 +80,8 @@ class RDoc::AnyMethod
|
|
83
80
|
#
|
84
81
|
# # File xxxxx, line dddd
|
85
82
|
#
|
86
|
-
# If it has
|
83
|
+
# If it has this comment then line numbers are added to +src+ and the <tt>,
|
84
|
+
# line dddd</tt> portion of the comment is removed.
|
87
85
|
|
88
86
|
def add_line_numbers(src)
|
89
87
|
return unless src.sub!(/\A(.*)(, line (\d+))/, '\1')
|
@@ -127,7 +125,7 @@ class RDoc::AnyMethod
|
|
127
125
|
end
|
128
126
|
src.gsub!(/^#{' ' * indent}/, '') if indent > 0
|
129
127
|
|
130
|
-
add_line_numbers(src) if
|
128
|
+
add_line_numbers(src) if RDoc::MethodAttr.add_line_numbers
|
131
129
|
|
132
130
|
src
|
133
131
|
end
|
@@ -158,12 +156,12 @@ class RDoc::TopLevel
|
|
158
156
|
# command line option to set.
|
159
157
|
|
160
158
|
def cvs_url
|
161
|
-
url =
|
159
|
+
url = @store.rdoc.options.webcvs
|
162
160
|
|
163
161
|
if /%s/ =~ url then
|
164
|
-
url % @
|
162
|
+
url % @relative_name
|
165
163
|
else
|
166
|
-
url + @
|
164
|
+
url + @relative_name
|
167
165
|
end
|
168
166
|
end
|
169
167
|
|
data/lib/rdoc/generator/ri.rb
CHANGED
@@ -13,70 +13,17 @@ class RDoc::Generator::RI
|
|
13
13
|
##
|
14
14
|
# Set up a new ri generator
|
15
15
|
|
16
|
-
def initialize options #:not-new:
|
17
|
-
@options
|
18
|
-
@
|
19
|
-
@
|
20
|
-
|
21
|
-
@store = RDoc::RI::Store.new '.'
|
22
|
-
@store.dry_run = @options.dry_run
|
23
|
-
@store.encoding = @options.encoding if @options.respond_to? :encoding
|
16
|
+
def initialize store, options #:not-new:
|
17
|
+
@options = options
|
18
|
+
@store = store
|
19
|
+
@store.path = '.'
|
24
20
|
end
|
25
21
|
|
26
22
|
##
|
27
|
-
#
|
28
|
-
# objects containing the extracted information.
|
29
|
-
|
30
|
-
def generate top_levels
|
31
|
-
install_siginfo_handler
|
32
|
-
|
33
|
-
@store.load_cache
|
34
|
-
|
35
|
-
RDoc::TopLevel.all_classes_and_modules.each do |klass|
|
36
|
-
@current = "#{klass.class}: #{klass.full_name}"
|
37
|
-
|
38
|
-
@store.save_class klass
|
39
|
-
|
40
|
-
klass.each_method do |method|
|
41
|
-
@current = "#{method.class}: #{method.full_name}"
|
42
|
-
@store.save_method klass, method
|
43
|
-
end
|
44
|
-
|
45
|
-
klass.each_attribute do |attribute|
|
46
|
-
@store.save_method klass, attribute
|
47
|
-
end
|
48
|
-
end
|
49
|
-
|
50
|
-
@current = 'saving cache'
|
51
|
-
|
52
|
-
@store.save_cache
|
53
|
-
|
54
|
-
ensure
|
55
|
-
@current = nil
|
56
|
-
|
57
|
-
remove_siginfo_handler
|
58
|
-
end
|
59
|
-
|
60
|
-
##
|
61
|
-
# Installs a siginfo handler that prints the current filename.
|
62
|
-
|
63
|
-
def install_siginfo_handler
|
64
|
-
return unless Signal.list.key? 'INFO'
|
65
|
-
|
66
|
-
@old_siginfo = trap 'INFO' do
|
67
|
-
puts @current if @current
|
68
|
-
end
|
69
|
-
end
|
70
|
-
|
71
|
-
##
|
72
|
-
# Removes a siginfo handler and replaces the previous
|
73
|
-
|
74
|
-
def remove_siginfo_handler
|
75
|
-
return unless Signal.list.key? 'INFO'
|
76
|
-
|
77
|
-
handler = @old_siginfo || 'DEFAULT'
|
23
|
+
# Writes the parsed data store to disk for use by ri.
|
78
24
|
|
79
|
-
|
25
|
+
def generate
|
26
|
+
@store.save
|
80
27
|
end
|
81
28
|
|
82
29
|
end
|
@@ -2,15 +2,15 @@
|
|
2
2
|
|
3
3
|
<title><%= h @title %></title>
|
4
4
|
|
5
|
-
<link type="text/css" media="screen" href="<%=
|
5
|
+
<link type="text/css" media="screen" href="<%= asset_rel_prefix %>/rdoc.css" rel="stylesheet">
|
6
6
|
|
7
7
|
<script type="text/javascript">
|
8
8
|
var rdoc_rel_prefix = "<%= rel_prefix %>/";
|
9
9
|
</script>
|
10
10
|
|
11
|
-
<script type="text/javascript" charset="utf-8" src="<%=
|
12
|
-
<script type="text/javascript" charset="utf-8" src="<%=
|
13
|
-
<script type="text/javascript" charset="utf-8" src="<%=
|
14
|
-
<script type="text/javascript" charset="utf-8" src="<%=
|
15
|
-
<script type="text/javascript" charset="utf-8" src="<%=
|
16
|
-
<script type="text/javascript" charset="utf-8" src="<%=
|
11
|
+
<script type="text/javascript" charset="utf-8" src="<%= asset_rel_prefix %>/js/jquery.js"></script>
|
12
|
+
<script type="text/javascript" charset="utf-8" src="<%= asset_rel_prefix %>/js/navigation.js"></script>
|
13
|
+
<script type="text/javascript" charset="utf-8" src="<%= search_index_rel_prefix %>/js/search_index.js"></script>
|
14
|
+
<script type="text/javascript" charset="utf-8" src="<%= asset_rel_prefix %>/js/search.js"></script>
|
15
|
+
<script type="text/javascript" charset="utf-8" src="<%= asset_rel_prefix %>/js/searcher.js"></script>
|
16
|
+
<script type="text/javascript" charset="utf-8" src="<%= asset_rel_prefix %>/js/darkfish.js"></script>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<% unless klass.extends.empty? then %>
|
2
|
+
<!-- Extension Modules -->
|
3
|
+
<nav id="extends-section" class="section">
|
4
|
+
<h3 class="section-header">Extended With Modules</h3>
|
5
|
+
|
6
|
+
<ul class="link-list">
|
7
|
+
<% klass.each_extend do |ext| %>
|
8
|
+
<% unless String === ext.module then %>
|
9
|
+
<li><a class="extend" href="<%= klass.aref_to ext.module.path %>"><%= ext.module.full_name %></a>
|
10
|
+
<% else %>
|
11
|
+
<li><span class="extend"><%= ext.name %></span>
|
12
|
+
<% end %>
|
13
|
+
<% end %>
|
14
|
+
</ul>
|
15
|
+
</nav>
|
16
|
+
<% end %>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<nav id="home-section" class="section">
|
2
|
+
<h3 class="section-header">Documentation</h3>
|
3
|
+
|
4
|
+
<ul>
|
5
|
+
<% installed.each do |name, href, exists| %>
|
6
|
+
<li class="folder">
|
7
|
+
<% if exists then %>
|
8
|
+
<a href="<%= href %>"><%= h name %></a>
|
9
|
+
<% else %>
|
10
|
+
<%= h name %>
|
11
|
+
<% end %>
|
12
|
+
<% end %>
|
13
|
+
</ul>
|
14
|
+
</nav>
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
<ul class="link-list">
|
7
7
|
<% klass.each_method do |meth| %>
|
8
|
-
<li
|
8
|
+
<li <% if meth.calls_super %>class="calls-super" <% end %>><a href="#<%= meth.aref %>"><%= meth.singleton ? '::' : '#' %><%= h meth.name %></a>
|
9
9
|
<% end %>
|
10
10
|
</ul>
|
11
11
|
</nav>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<% table = current.parse(current.comment).table_of_contents
|
2
|
+
if table.length > 1 then %>
|
3
|
+
<div id="table-of-contents">
|
4
|
+
<nav class="section">
|
5
|
+
<h3 class="section-header">Table of Contents</h3>
|
6
|
+
<ul>
|
7
|
+
<% table.each do |heading| %>
|
8
|
+
<li><a href="#<%= heading.aref %>"><%= heading.plain_html %></a>
|
9
|
+
<% end %>
|
10
|
+
</ul>
|
11
|
+
</nav>
|
12
|
+
</div>
|
13
|
+
<% end %>
|
@@ -4,6 +4,8 @@
|
|
4
4
|
|
5
5
|
<%= render '_sidebar_search.rhtml' %>
|
6
6
|
|
7
|
+
<%= render '_sidebar_table_of_contents.rhtml' %>
|
8
|
+
|
7
9
|
<div id="file-metadata">
|
8
10
|
<%= render '_sidebar_in_files.rhtml' %>
|
9
11
|
<%= render '_sidebar_VCS_info.rhtml' %>
|
@@ -13,6 +15,7 @@
|
|
13
15
|
<%= render '_sidebar_sections.rhtml' %>
|
14
16
|
<%= render '_sidebar_parent.rhtml' %>
|
15
17
|
<%= render '_sidebar_includes.rhtml' %>
|
18
|
+
<%= render '_sidebar_extends.rhtml' %>
|
16
19
|
<%= render '_sidebar_methods.rhtml' %>
|
17
20
|
</div>
|
18
21
|
|
@@ -109,7 +112,7 @@
|
|
109
112
|
gsub( /^\w+\./m, '')).
|
110
113
|
gsub(/(.*)[-=]>/, '\1→') %>
|
111
114
|
</span>
|
112
|
-
<% if i == 0 then %>
|
115
|
+
<% if i == 0 and method.token_stream then %>
|
113
116
|
<span class="method-click-advice">click to toggle source</span>
|
114
117
|
<% end %>
|
115
118
|
</div>
|
@@ -118,7 +121,9 @@
|
|
118
121
|
<div class="method-heading">
|
119
122
|
<span class="method-name"><%= h method.name %></span><span
|
120
123
|
class="method-args"><%= method.param_seq %></span>
|
124
|
+
<% if method.token_stream then %>
|
121
125
|
<span class="method-click-advice">click to toggle source</span>
|
126
|
+
<% end %>
|
122
127
|
</div>
|
123
128
|
<% end %>
|
124
129
|
|
@@ -128,6 +133,15 @@
|
|
128
133
|
<% else %>
|
129
134
|
<p class="missing-docs">(Not documented)
|
130
135
|
<% end %>
|
136
|
+
<% if method.calls_super then %>
|
137
|
+
<div class="method-calls-super">
|
138
|
+
Calls superclass method
|
139
|
+
<%=
|
140
|
+
method.superclass_method ?
|
141
|
+
method.formatter.link(method.superclass_method.full_name, method.superclass_method.full_name) : nil
|
142
|
+
%>
|
143
|
+
</div>
|
144
|
+
<% end %>
|
131
145
|
|
132
146
|
<% if method.token_stream then %>
|
133
147
|
<div class="method-source-code" id="<%= method.html_name %>-source">
|
Binary file
|
@@ -10,10 +10,10 @@
|
|
10
10
|
</div>
|
11
11
|
</nav>
|
12
12
|
|
13
|
-
<% if @options.main_page && main_page = @files.find { |f| f.full_name == @options.main_page } then %>
|
14
13
|
<div id="documentation" class="description">
|
15
|
-
|
16
|
-
|
14
|
+
<% if @options.main_page && main_page = @files.find { |f| f.full_name == @options.main_page } then %>
|
15
|
+
<%= main_page.description %>
|
17
16
|
<% else %>
|
18
17
|
<p>This is the API documentation for <%= @title %>.
|
19
18
|
<% end %>
|
19
|
+
</div>
|
@@ -109,15 +109,13 @@ function hookSearch() {
|
|
109
109
|
function highlightTarget( anchor ) {
|
110
110
|
console.debug( "Highlighting target '%s'.", anchor );
|
111
111
|
|
112
|
-
$("a[name]").each( function() {
|
113
|
-
if (
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
console.debug( "Already wrapped." );
|
120
|
-
}
|
112
|
+
$("a[name=" + anchor + "]").each( function() {
|
113
|
+
if ( !$(this).parent().parent().hasClass('target-section') ) {
|
114
|
+
console.debug( "Wrapping the target-section" );
|
115
|
+
$('div.method-detail').unwrap( 'div.target-section' );
|
116
|
+
$(this).parent().wrap( '<div class="target-section"></div>' );
|
117
|
+
} else {
|
118
|
+
console.debug( "Already wrapped." );
|
121
119
|
}
|
122
120
|
});
|
123
121
|
};
|
@@ -6,6 +6,7 @@
|
|
6
6
|
*
|
7
7
|
*/
|
8
8
|
|
9
|
+
/* vim: ft=css et sw=2 ts=2 sts=2 */
|
9
10
|
/* Base Green is: #6C8C22 */
|
10
11
|
|
11
12
|
* { padding: 0; margin: 0; }
|
@@ -42,6 +43,16 @@ pre {
|
|
42
43
|
padding: 0.5em 0;
|
43
44
|
}
|
44
45
|
|
46
|
+
blockquote {
|
47
|
+
background: #ddd;
|
48
|
+
margin: 1em;
|
49
|
+
padding: 0.25em;
|
50
|
+
}
|
51
|
+
|
52
|
+
blockquote > :first-child {
|
53
|
+
margin-top: 0 !important;
|
54
|
+
}
|
55
|
+
|
45
56
|
/* @group Generic Classes */
|
46
57
|
|
47
58
|
.initially-hidden {
|
@@ -193,6 +204,15 @@ pre {
|
|
193
204
|
list-style-image: url(images/page_green.png);
|
194
205
|
}
|
195
206
|
|
207
|
+
#table-of-contents {
|
208
|
+
margin-top: 2em;
|
209
|
+
}
|
210
|
+
|
211
|
+
#table-of-contents ul {
|
212
|
+
padding-left: 28px;
|
213
|
+
list-style-image: url(images/tag_blue.png);
|
214
|
+
}
|
215
|
+
|
196
216
|
dl.svninfo {
|
197
217
|
color: #666;
|
198
218
|
margin: 0;
|
@@ -203,7 +223,9 @@ dl.svninfo dt {
|
|
203
223
|
|
204
224
|
ul.link-list li {
|
205
225
|
white-space: nowrap;
|
226
|
+
line-height: 20px;
|
206
227
|
}
|
228
|
+
|
207
229
|
ul.link-list .type {
|
208
230
|
font-size: 8px;
|
209
231
|
text-transform: uppercase;
|
@@ -213,6 +235,10 @@ ul.link-list .type {
|
|
213
235
|
-webkit-border-radius: 5px;
|
214
236
|
}
|
215
237
|
|
238
|
+
.calls-super {
|
239
|
+
background: url(images/arrow_up.png) no-repeat right center;
|
240
|
+
}
|
241
|
+
|
216
242
|
/* @end */
|
217
243
|
|
218
244
|
/* @group Class Metadata Section */
|
@@ -385,6 +411,11 @@ ul.link-list .type {
|
|
385
411
|
display: none;
|
386
412
|
}
|
387
413
|
|
414
|
+
#documentation .method-description .method-calls-super {
|
415
|
+
color: #333;
|
416
|
+
font-weight: bolder;
|
417
|
+
}
|
418
|
+
|
388
419
|
#documentation .method-detail {
|
389
420
|
margin: 0.5em 0;
|
390
421
|
padding: 0.5em 0;
|