rdoc 2.2.1 → 2.3.0

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.

Files changed (95) hide show
  1. data.tar.gz.sig +2 -0
  2. data/.document +4 -0
  3. data/History.txt +35 -0
  4. data/Manifest.txt +36 -15
  5. data/README.txt +11 -27
  6. data/Rakefile +3 -0
  7. data/lib/rdoc.rb +1 -1
  8. data/lib/rdoc/cache.rb +32 -0
  9. data/lib/rdoc/code_objects.rb +121 -59
  10. data/lib/rdoc/generator.rb +196 -133
  11. data/lib/rdoc/generator/darkfish.rb +471 -0
  12. data/lib/rdoc/generator/html.rb +71 -60
  13. data/lib/rdoc/generator/html/html.rb +115 -115
  14. data/lib/rdoc/generator/html/one_page_html.rb +56 -56
  15. data/lib/rdoc/generator/ri.rb +2 -0
  16. data/lib/rdoc/generator/template/darkfish/.document +0 -0
  17. data/lib/rdoc/generator/template/darkfish/classpage.rhtml +302 -0
  18. data/lib/rdoc/generator/template/darkfish/filepage.rhtml +114 -0
  19. data/lib/rdoc/generator/template/darkfish/images/brick.png +0 -0
  20. data/lib/rdoc/generator/template/darkfish/images/brick_link.png +0 -0
  21. data/lib/rdoc/generator/template/darkfish/images/bug.png +0 -0
  22. data/lib/rdoc/generator/template/darkfish/images/bullet_black.png +0 -0
  23. data/lib/rdoc/generator/template/darkfish/images/bullet_toggle_minus.png +0 -0
  24. data/lib/rdoc/generator/template/darkfish/images/bullet_toggle_plus.png +0 -0
  25. data/lib/rdoc/generator/template/darkfish/images/date.png +0 -0
  26. data/lib/rdoc/generator/template/darkfish/images/find.png +0 -0
  27. data/lib/rdoc/generator/template/darkfish/images/loadingAnimation.gif +0 -0
  28. data/lib/rdoc/generator/template/darkfish/images/macFFBgHack.png +0 -0
  29. data/lib/rdoc/generator/template/darkfish/images/package.png +0 -0
  30. data/lib/rdoc/generator/template/darkfish/images/page_green.png +0 -0
  31. data/lib/rdoc/generator/template/darkfish/images/page_white_text.png +0 -0
  32. data/lib/rdoc/generator/template/darkfish/images/page_white_width.png +0 -0
  33. data/lib/rdoc/generator/template/darkfish/images/plugin.png +0 -0
  34. data/lib/rdoc/generator/template/darkfish/images/ruby.png +0 -0
  35. data/lib/rdoc/generator/template/darkfish/images/tag_green.png +0 -0
  36. data/lib/rdoc/generator/template/darkfish/images/wrench.png +0 -0
  37. data/lib/rdoc/generator/template/darkfish/images/wrench_orange.png +0 -0
  38. data/lib/rdoc/generator/template/darkfish/images/zoom.png +0 -0
  39. data/lib/rdoc/generator/template/darkfish/index.rhtml +57 -0
  40. data/lib/rdoc/generator/template/darkfish/js/darkfish.js +116 -0
  41. data/lib/rdoc/generator/template/darkfish/js/jquery.js +32 -0
  42. data/lib/rdoc/generator/template/darkfish/js/quicksearch.js +114 -0
  43. data/lib/rdoc/generator/template/darkfish/js/thickbox-compressed.js +10 -0
  44. data/lib/rdoc/generator/template/darkfish/rdoc.css +696 -0
  45. data/lib/rdoc/generator/xml.rb +19 -12
  46. data/lib/rdoc/generator/xml/rdf.rb +50 -50
  47. data/lib/rdoc/generator/xml/xml.rb +58 -58
  48. data/lib/rdoc/known_classes.rb +0 -1
  49. data/lib/rdoc/markup/preprocess.rb +4 -3
  50. data/lib/rdoc/markup/to_html.rb +4 -1
  51. data/lib/rdoc/markup/to_html_crossref.rb +28 -31
  52. data/lib/rdoc/options.rb +25 -20
  53. data/lib/rdoc/parser.rb +10 -2
  54. data/lib/rdoc/parser/c.rb +38 -29
  55. data/lib/rdoc/parser/f95.rb +32 -32
  56. data/lib/rdoc/parser/ruby.rb +5 -2
  57. data/lib/rdoc/parser/simple.rb +1 -0
  58. data/lib/rdoc/rdoc.rb +99 -47
  59. data/lib/rdoc/ri/cache.rb +6 -6
  60. data/lib/rdoc/ri/display.rb +22 -75
  61. data/lib/rdoc/ri/driver.rb +237 -78
  62. data/lib/rdoc/stats.rb +91 -28
  63. data/lib/rdoc/template.rb +6 -2
  64. data/test/test.ja.rdoc +8 -0
  65. data/test/test.ja.txt +8 -0
  66. data/test/test_attribute_manager.rb +9 -6
  67. data/test/test_rdoc_markup.rb +4 -2
  68. data/test/test_rdoc_markup_attribute_manager.rb +13 -3
  69. data/test/test_rdoc_markup_to_html.rb +18 -2
  70. data/test/test_rdoc_markup_to_html_crossref.rb +186 -249
  71. data/test/test_rdoc_parser.rb +17 -1
  72. data/test/test_rdoc_parser_c.rb +65 -10
  73. data/test/test_rdoc_parser_perl.rb +4 -2
  74. data/test/test_rdoc_parser_ruby.rb +6 -4
  75. data/test/test_rdoc_ri_attribute_formatter.rb +4 -2
  76. data/test/test_rdoc_ri_default_display.rb +8 -4
  77. data/test/test_rdoc_ri_driver.rb +4 -2
  78. data/test/test_rdoc_ri_formatter.rb +6 -4
  79. data/test/test_rdoc_ri_overstrike_formatter.rb +4 -2
  80. metadata +84 -33
  81. metadata.gz.sig +0 -0
  82. data/lib/rdoc/generator/chm.rb +0 -113
  83. data/lib/rdoc/generator/chm/chm.rb +0 -100
  84. data/lib/rdoc/generator/html/frameless.rb +0 -92
  85. data/lib/rdoc/generator/html/hefss.rb +0 -150
  86. data/lib/rdoc/generator/html/kilmer.rb +0 -151
  87. data/lib/rdoc/generator/html/kilmerfactory.rb +0 -427
  88. data/lib/rdoc/generator/texinfo.rb +0 -81
  89. data/lib/rdoc/generator/texinfo/class.texinfo.erb +0 -44
  90. data/lib/rdoc/generator/texinfo/file.texinfo.erb +0 -6
  91. data/lib/rdoc/generator/texinfo/method.texinfo.erb +0 -6
  92. data/lib/rdoc/generator/texinfo/texinfo.erb +0 -28
  93. data/test/rdoc_markup_to_html_crossref_reference.rb +0 -31
  94. data/test/test_rdoc_info_formatting.rb +0 -175
  95. data/test/test_rdoc_info_sections.rb +0 -136
Binary file
@@ -1,113 +0,0 @@
1
- require 'rdoc/generator/html'
2
-
3
- class RDoc::Generator::CHM < RDoc::Generator::HTML
4
-
5
- HHC_PATH = "c:/Program Files/HTML Help Workshop/hhc.exe"
6
-
7
- ##
8
- # Standard generator factory
9
-
10
- def self.for(options)
11
- new(options)
12
- end
13
-
14
- def initialize(*args)
15
- super
16
- @op_name = @options.op_name || "rdoc"
17
- check_for_html_help_workshop
18
- end
19
-
20
- def check_for_html_help_workshop
21
- stat = File.stat(HHC_PATH)
22
- rescue
23
- $stderr <<
24
- "\n.chm output generation requires that Microsoft's Html Help\n" <<
25
- "Workshop is installed. RDoc looks for it in:\n\n " <<
26
- HHC_PATH <<
27
- "\n\nYou can download a copy for free from:\n\n" <<
28
- " http://msdn.microsoft.com/library/default.asp?" <<
29
- "url=/library/en-us/htmlhelp/html/hwMicrosoftHTMLHelpDownloads.asp\n\n"
30
- end
31
-
32
- ##
33
- # Generate the html as normal, then wrap it in a help project
34
-
35
- def generate(info)
36
- super
37
- @project_name = @op_name + ".hhp"
38
- create_help_project
39
- end
40
-
41
- ##
42
- # The project contains the project file, a table of contents and an index
43
-
44
- def create_help_project
45
- create_project_file
46
- create_contents_and_index
47
- compile_project
48
- end
49
-
50
- ##
51
- # The project file links together all the various
52
- # files that go to make up the help.
53
-
54
- def create_project_file
55
- template = RDoc::TemplatePage.new @template::HPP_FILE
56
- values = { "title" => @options.title, "opname" => @op_name }
57
- files = []
58
- @files.each do |f|
59
- files << { "html_file_name" => f.path }
60
- end
61
-
62
- values['all_html_files'] = files
63
-
64
- File.open(@project_name, "w") do |f|
65
- template.write_html_on(f, values)
66
- end
67
- end
68
-
69
- ##
70
- # The contents is a list of all files and modules.
71
- # For each we include as sub-entries the list
72
- # of methods they contain. As we build the contents
73
- # we also build an index file
74
-
75
- def create_contents_and_index
76
- contents = []
77
- index = []
78
-
79
- (@files+@classes).sort.each do |entry|
80
- content_entry = { "c_name" => entry.name, "ref" => entry.path }
81
- index << { "name" => entry.name, "aref" => entry.path }
82
-
83
- internals = []
84
-
85
- methods = entry.build_method_summary_list(entry.path)
86
-
87
- content_entry["methods"] = methods unless methods.empty?
88
- contents << content_entry
89
- index.concat methods
90
- end
91
-
92
- values = { "contents" => contents }
93
- template = RDoc::TemplatePage.new @template::CONTENTS
94
- File.open("contents.hhc", "w") do |f|
95
- template.write_html_on(f, values)
96
- end
97
-
98
- values = { "index" => index }
99
- template = RDoc::TemplatePage.new @template::CHM_INDEX
100
- File.open("index.hhk", "w") do |f|
101
- template.write_html_on(f, values)
102
- end
103
- end
104
-
105
- ##
106
- # Invoke the windows help compiler to compiler the project
107
-
108
- def compile_project
109
- system(HHC_PATH, @project_name)
110
- end
111
-
112
- end
113
-
@@ -1,100 +0,0 @@
1
- require 'rdoc/generator/chm'
2
- require 'rdoc/generator/html/html'
3
-
4
- module RDoc::Generator::CHM::CHM
5
-
6
- HTML = RDoc::Generator::HTML::HTML
7
-
8
- INDEX = HTML::INDEX
9
-
10
- STYLE = HTML::STYLE
11
-
12
- CLASS_INDEX = HTML::CLASS_INDEX
13
- CLASS_PAGE = HTML::CLASS_PAGE
14
- FILE_INDEX = HTML::FILE_INDEX
15
- FILE_PAGE = HTML::FILE_PAGE
16
- METHOD_INDEX = HTML::METHOD_INDEX
17
- METHOD_LIST = HTML::METHOD_LIST
18
-
19
- FR_INDEX_BODY = HTML::FR_INDEX_BODY
20
-
21
- # This is a nasty little hack, but hhc doesn't support the <?xml tag, so...
22
- BODY = HTML::BODY.sub!(/<\?xml.*\?>/, '')
23
- SRC_PAGE = HTML::SRC_PAGE.sub!(/<\?xml.*\?>/, '')
24
-
25
- HPP_FILE = <<-EOF
26
- [OPTIONS]
27
- Auto Index = Yes
28
- Compatibility=1.1 or later
29
- Compiled file=<%= values["opname"] %>.chm
30
- Contents file=contents.hhc
31
- Full-text search=Yes
32
- Index file=index.hhk
33
- Language=0x409 English(United States)
34
- Title=<%= values["title"] %>
35
-
36
- [FILES]
37
- <% values["all_html_files"].each do |all_html_files| %>
38
- <%= all_html_files["html_file_name"] %>
39
- <% end # values["all_html_files"] %>
40
- EOF
41
-
42
- CONTENTS = <<-EOF
43
- <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
44
- <HTML>
45
- <HEAD>
46
- <meta name="GENERATOR" content="Microsoft&reg; HTML Help Workshop 4.1">
47
- <!-- Sitemap 1.0 -->
48
- </HEAD><BODY>
49
- <OBJECT type="text/site properties">
50
- <param name="Foreground" value="0x80">
51
- <param name="Window Styles" value="0x800025">
52
- <param name="ImageType" value="Folder">
53
- </OBJECT>
54
- <UL>
55
- <% values["contents"].each do |contents| %>
56
- <LI> <OBJECT type="text/sitemap">
57
- <param name="Name" value="<%= contents["c_name"] %>">
58
- <param name="Local" value="<%= contents["ref"] %>">
59
- </OBJECT>
60
- <% if contents["methods"] then %>
61
- <ul>
62
- <% contents["methods"].each do |methods| %>
63
- <LI> <OBJECT type="text/sitemap">
64
- <param name="Name" value="<%= methods["name"] %>">
65
- <param name="Local" value="<%= methods["aref"] %>">
66
- </OBJECT>
67
- <% end # contents["methods"] %>
68
- </ul>
69
- <% end %>
70
- </LI>
71
- <% end # values["contents"] %>
72
- </UL>
73
- </BODY></HTML>
74
- EOF
75
-
76
- CHM_INDEX = <<-EOF
77
- <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
78
- <HTML>
79
- <HEAD>
80
- <meta name="GENERATOR" content="Microsoft&reg; HTML Help Workshop 4.1">
81
- <!-- Sitemap 1.0 -->
82
- </HEAD><BODY>
83
- <OBJECT type="text/site properties">
84
- <param name="Foreground" value="0x80">
85
- <param name="Window Styles" value="0x800025">
86
- <param name="ImageType" value="Folder">
87
- </OBJECT>
88
- <UL>
89
- <% values["index"].each do |index| %>
90
- <LI> <OBJECT type="text/sitemap">
91
- <param name="Name" value="<%= index["name"] %>">
92
- <param name="Local" value="<%= index["aref"] %>">
93
- </OBJECT>
94
- <% end # values["index"] %>
95
- </UL>
96
- </BODY></HTML>
97
- EOF
98
-
99
- end
100
-
@@ -1,92 +0,0 @@
1
- require 'rdoc/generator/html/html'
2
-
3
- ##
4
- # = CSS2 RDoc HTML template
5
- #
6
- # This is a template for RDoc that uses XHTML 1.0 Strict and dictates a
7
- # bit more of the appearance of the output to cascading stylesheets than the
8
- # default. It was designed for clean inline code display, and uses DHTMl to
9
- # toggle the visbility of each method's source with each click on the '[source]'
10
- # link.
11
- #
12
- # Frameless basically is the html template without frames.
13
- #
14
- # == Authors
15
- #
16
- # * Michael Granger <ged@FaerieMUD.org>
17
- #
18
- # Copyright (c) 2002, 2003 The FaerieMUD Consortium. Some rights reserved.
19
- #
20
- # This work is licensed under the Creative Commons Attribution License. To view
21
- # a copy of this license, visit http://creativecommons.org/licenses/by/1.0/ or
22
- # send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California
23
- # 94305, USA.
24
-
25
- module RDoc::Generator::HTML::FRAMELESS
26
-
27
- FRAMELESS = true
28
-
29
- FONTS = RDoc::Generator::HTML::HTML::FONTS
30
-
31
- STYLE = RDoc::Generator::HTML::HTML::STYLE
32
-
33
- HEADER = RDoc::Generator::HTML::HTML::HEADER
34
-
35
- FOOTER = <<-EOF
36
- <div id="popupmenu" class="index">
37
- <br />
38
- <h1 class="index-entries section-bar">Files</h1>
39
- <ul>
40
- <% values["file_list"].each do |file| %>
41
- <li><a href="<%= file["href"] %>"><%= file["name"] %></a></li>
42
- <% end %>
43
- </ul>
44
-
45
- <br />
46
- <h1 class="index-entries section-bar">Classes</h1>
47
- <ul>
48
- <% values["class_list"].each do |klass| %>
49
- <li><a href="<%= klass["href"] %>"><%= klass["name"] %></a></li>
50
- <% end %>
51
- </ul>
52
-
53
- <br />
54
- <h1 class="index-entries section-bar">Methods</h1>
55
- <ul>
56
- <% values["method_list"].each do |method| %>
57
- <li><a href="<%= method["href"] %>"><%= method["name"] %></a></li>
58
- <% end %>
59
- </ul>
60
- </div>
61
- </body>
62
- </html>
63
- EOF
64
-
65
- FILE_PAGE = RDoc::Generator::HTML::HTML::FILE_PAGE
66
-
67
- CLASS_PAGE = RDoc::Generator::HTML::HTML::CLASS_PAGE
68
-
69
- METHOD_LIST = RDoc::Generator::HTML::HTML::METHOD_LIST
70
-
71
- BODY = HEADER + %{
72
-
73
- <%= template_include %> <!-- banner header -->
74
-
75
- <div id="bodyContent">
76
-
77
- } + METHOD_LIST + %{
78
-
79
- </div>
80
-
81
- } + FOOTER
82
-
83
- SRC_PAGE = RDoc::Generator::HTML::HTML::SRC_PAGE
84
-
85
- FR_INDEX_BODY = RDoc::Generator::HTML::HTML::FR_INDEX_BODY
86
-
87
- FILE_INDEX = RDoc::Generator::HTML::HTML::FILE_INDEX
88
-
89
- CLASS_INDEX = RDoc::Generator::HTML::HTML::CLASS_INDEX
90
-
91
- METHOD_INDEX = RDoc::Generator::HTML::HTML::METHOD_INDEX
92
- end
@@ -1,150 +0,0 @@
1
- require 'rdoc/generator/html'
2
- require 'rdoc/generator/html/kilmerfactory'
3
-
4
- module RDoc::Generator::HTML::HEFSS
5
-
6
- FONTS = "Verdana, Arial, Helvetica, sans-serif"
7
-
8
- CENTRAL_STYLE = <<-EOF
9
- body,p { font-family: <%= values["fonts"] %>;
10
- color: #000040; background: #BBBBBB;
11
- }
12
-
13
- td { font-family: <%= values["fonts"] %>;
14
- color: #000040;
15
- }
16
-
17
- .attr-rw { font-size: small; color: #444488 }
18
-
19
- .title-row {color: #eeeeff;
20
- background: #BBBBDD;
21
- }
22
-
23
- .big-title-font { color: white;
24
- font-family: <%= values["fonts"] %>;
25
- font-size: large;
26
- height: 50px}
27
-
28
- .small-title-font { color: purple;
29
- font-family: <%= values["fonts"] %>;
30
- font-size: small; }
31
-
32
- .aqua { color: purple }
33
-
34
- #diagram img {
35
- border: 0;
36
- }
37
-
38
- .method-name, attr-name {
39
- font-family: monospace; font-weight: bold;
40
- }
41
-
42
- .tablesubtitle {
43
- width: 100%;
44
- margin-top: 1ex;
45
- margin-bottom: .5ex;
46
- padding: 5px 0px 5px 20px;
47
- font-size: large;
48
- color: purple;
49
- background: #BBBBCC;
50
- }
51
-
52
- .tablesubsubtitle {
53
- width: 100%;
54
- margin-top: 1ex;
55
- margin-bottom: .5ex;
56
- padding: 5px 0px 5px 20px;
57
- font-size: medium;
58
- color: white;
59
- background: #BBBBCC;
60
- }
61
-
62
- .name-list {
63
- font-family: monospace;
64
- margin-left: 40px;
65
- margin-bottom: 2ex;
66
- line-height: 140%;
67
- }
68
-
69
- .description {
70
- margin-left: 40px;
71
- margin-bottom: 2ex;
72
- line-height: 140%;
73
- }
74
-
75
- .methodtitle {
76
- font-size: medium;
77
- text_decoration: none;
78
- padding: 3px 3px 3px 20px;
79
- color: #0000AA;
80
- }
81
-
82
- .ruby-comment { color: green; font-style: italic }
83
- .ruby-constant { color: #4433aa; font-weight: bold; }
84
- .ruby-identifier { color: #222222; }
85
- .ruby-ivar { color: #2233dd; }
86
- .ruby-keyword { color: #3333FF; font-weight: bold }
87
- .ruby-node { color: #777777; }
88
- .ruby-operator { color: #111111; }
89
- .ruby-regexp { color: #662222; }
90
- .ruby-value { color: #662222; font-style: italic }
91
-
92
- .srcbut { float: right }
93
- EOF
94
-
95
- INDEX_STYLE = <<-EOF
96
- body {
97
- background-color: #bbbbbb;
98
- font-family: #{FONTS};
99
- font-size: 11px;
100
- font-style: normal;
101
- line-height: 14px;
102
- color: #000040;
103
- }
104
-
105
- div.banner {
106
- background: #bbbbcc;
107
- color: white;
108
- padding: 1;
109
- margin: 0;
110
- font-size: 90%;
111
- font-weight: bold;
112
- line-height: 1.1;
113
- text-align: center;
114
- width: 100%;
115
- }
116
- EOF
117
-
118
- FACTORY = RDoc::Generator::HTML::
119
- KilmerFactory.new(:central_css => CENTRAL_STYLE,
120
- :index_css => INDEX_STYLE,
121
- :method_list_heading => "Subroutines and Functions",
122
- :class_and_module_list_heading => "Classes and Modules",
123
- :attribute_list_heading => "Arguments")
124
-
125
- STYLE = FACTORY.get_STYLE()
126
-
127
- METHOD_LIST = FACTORY.get_METHOD_LIST()
128
-
129
- BODY = FACTORY.get_BODY()
130
-
131
- FILE_PAGE = FACTORY.get_FILE_PAGE()
132
-
133
- CLASS_PAGE = FACTORY.get_CLASS_PAGE()
134
-
135
- SRC_PAGE = FACTORY.get_SRC_PAGE()
136
-
137
- FR_INDEX_BODY = FACTORY.get_FR_INDEX_BODY()
138
-
139
- FILE_INDEX = FACTORY.get_FILE_INDEX()
140
-
141
- CLASS_INDEX = FACTORY.get_CLASS_INDEX()
142
-
143
- METHOD_INDEX = FACTORY.get_METHOD_INDEX()
144
-
145
- INDEX = FACTORY.get_INDEX()
146
-
147
- def self.write_extra_pages(values)
148
- FACTORY.write_extra_pages(values)
149
- end
150
- end