rdoc 2.5.5 → 2.5.6
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.
- data.tar.gz.sig +0 -0
- data/History.txt +17 -1
- data/lib/rdoc.rb +1 -1
- data/lib/rdoc/any_method.rb +0 -1
- data/lib/rdoc/code_object.rb +6 -0
- data/lib/rdoc/generator/template/darkfish/rdoc.css +1 -3
- data/lib/rdoc/options.rb +1 -1
- data/lib/rdoc/parser/c.rb +1 -1
- data/lib/rdoc/parser/ruby.rb +1 -1
- data/lib/rdoc/parser/simple.rb +4 -1
- data/test/test_rdoc_code_object.rb +12 -0
- data/test/test_rdoc_options.rb +11 -0
- data/test/test_rdoc_parser_c.rb +11 -0
- data/test/test_rdoc_parser_ruby.rb +5 -2
- data/test/test_rdoc_parser_simple.rb +9 -0
- metadata +17 -4
- metadata.gz.sig +0 -0
data.tar.gz.sig
CHANGED
Binary file
|
data/History.txt
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
=== 2.5.
|
1
|
+
=== 2.5.6 / 2010-04-22
|
2
2
|
|
3
3
|
*NOTE*:
|
4
4
|
|
@@ -19,6 +19,22 @@ To have ri data for you gems you'll also need to run:
|
|
19
19
|
|
20
20
|
If you don't want to rebuild the rdoc for `gem server`, add --no-rdoc.
|
21
21
|
|
22
|
+
* Minor Enhancements
|
23
|
+
* Unrecognized RDoc directives are added as metadata to the object they get
|
24
|
+
attached to.
|
25
|
+
|
26
|
+
##
|
27
|
+
# :my_new_directive: my cool value
|
28
|
+
|
29
|
+
Results in a 'my_new_directive' metadata key with value 'my cool value' on
|
30
|
+
the RDoc::CodeObject it is for
|
31
|
+
* Bug Fixes
|
32
|
+
* RDoc no longer prints out "invalid options:" when there were no invalid
|
33
|
+
options.
|
34
|
+
* Fixed link size on Darkfish file pages
|
35
|
+
|
36
|
+
=== 2.5.5 / 2010-04-19
|
37
|
+
|
22
38
|
* 1 Minor Enhancement
|
23
39
|
* Use #binread in RDoc::Markup::PreProcess. Patch from ruby trunk.
|
24
40
|
* 3 Bug Fixes
|
data/lib/rdoc.rb
CHANGED
data/lib/rdoc/any_method.rb
CHANGED
data/lib/rdoc/code_object.rb
CHANGED
@@ -54,6 +54,11 @@ class RDoc::CodeObject
|
|
54
54
|
|
55
55
|
attr_accessor :force_documentation
|
56
56
|
|
57
|
+
##
|
58
|
+
# Hash of arbitrary metadata for this CodeObject
|
59
|
+
|
60
|
+
attr_reader :metadata
|
61
|
+
|
57
62
|
##
|
58
63
|
# Our parent CodeObject
|
59
64
|
|
@@ -75,6 +80,7 @@ class RDoc::CodeObject
|
|
75
80
|
# Creates a new CodeObject that will document itself and its children
|
76
81
|
|
77
82
|
def initialize
|
83
|
+
@metadata = {}
|
78
84
|
@comment = ''
|
79
85
|
|
80
86
|
@document_children = true
|
data/lib/rdoc/options.rb
CHANGED
@@ -366,7 +366,7 @@ Usage: #{opt.program_name} [options] [names...]
|
|
366
366
|
end
|
367
367
|
end
|
368
368
|
|
369
|
-
|
369
|
+
unless ignored.empty? or quiet then
|
370
370
|
$stderr.puts "invalid options: #{ignored.join ', '}"
|
371
371
|
$stderr.puts '(invalid options are ignored)'
|
372
372
|
end
|
data/lib/rdoc/parser/c.rb
CHANGED
data/lib/rdoc/parser/ruby.rb
CHANGED
data/lib/rdoc/parser/simple.rb
CHANGED
@@ -7,6 +7,8 @@ class RDoc::Parser::Simple < RDoc::Parser
|
|
7
7
|
|
8
8
|
parse_files_matching(//)
|
9
9
|
|
10
|
+
attr_reader :content # :nodoc:
|
11
|
+
|
10
12
|
##
|
11
13
|
# Prepare to parse a plain file
|
12
14
|
|
@@ -16,7 +18,8 @@ class RDoc::Parser::Simple < RDoc::Parser
|
|
16
18
|
preprocess = RDoc::Markup::PreProcess.new @file_name, @options.rdoc_include
|
17
19
|
|
18
20
|
preprocess.handle @content do |directive, param|
|
19
|
-
|
21
|
+
top_level.metadata[directive] = param
|
22
|
+
false
|
20
23
|
end
|
21
24
|
end
|
22
25
|
|
@@ -61,6 +61,18 @@ class TestRDocCodeObject < XrefTestCase
|
|
61
61
|
assert @co.documented?
|
62
62
|
end
|
63
63
|
|
64
|
+
def test_metadata
|
65
|
+
assert_empty @co.metadata
|
66
|
+
|
67
|
+
@co.metadata['markup'] = 'not_rdoc'
|
68
|
+
|
69
|
+
expected = { 'markup' => 'not_rdoc' }
|
70
|
+
|
71
|
+
assert_equal expected, @co.metadata
|
72
|
+
|
73
|
+
assert_equal 'not_rdoc', @co.metadata['markup']
|
74
|
+
end
|
75
|
+
|
64
76
|
def test_parent_file_name
|
65
77
|
assert_equal '(unknown)', @co.parent_file_name
|
66
78
|
assert_equal 'xref_data.rb', @c1.parent_file_name
|
data/test/test_rdoc_options.rb
CHANGED
@@ -39,5 +39,16 @@ class TestRDocOptions < MiniTest::Unit::TestCase
|
|
39
39
|
assert_match %r%^invalid option: --bogus%, err
|
40
40
|
end
|
41
41
|
|
42
|
+
def test_parse_main
|
43
|
+
out, err = capture_io do
|
44
|
+
@options.parse %w[--main MAIN]
|
45
|
+
end
|
46
|
+
|
47
|
+
assert_empty out
|
48
|
+
assert_empty err
|
49
|
+
|
50
|
+
assert_equal 'MAIN', @options.main_page
|
51
|
+
end
|
52
|
+
|
42
53
|
end
|
43
54
|
|
data/test/test_rdoc_parser_c.rb
CHANGED
@@ -406,6 +406,17 @@ Init_Foo(void) {
|
|
406
406
|
assert_equal "a comment for bar", bar.comment
|
407
407
|
end
|
408
408
|
|
409
|
+
def test_look_for_directives_in
|
410
|
+
parser = util_parser ''
|
411
|
+
|
412
|
+
comment = "# :markup: not_rdoc\n"
|
413
|
+
|
414
|
+
parser.look_for_directives_in @top_level, comment
|
415
|
+
|
416
|
+
assert_equal "# :markup: not_rdoc\n", comment
|
417
|
+
assert_equal 'not_rdoc', @top_level.metadata['markup']
|
418
|
+
end
|
419
|
+
|
409
420
|
def test_define_method
|
410
421
|
content = <<-EOF
|
411
422
|
/*Method Comment! */
|
@@ -151,11 +151,14 @@ class TestRDocParserRuby < MiniTest::Unit::TestCase
|
|
151
151
|
def test_look_for_directives_in_unhandled
|
152
152
|
util_parser ""
|
153
153
|
|
154
|
-
comment = "# :unhandled: \n# :title: hi\n"
|
154
|
+
comment = "# :unhandled: \n# :markup: not rdoc\n# :title: hi\n"
|
155
155
|
|
156
156
|
@parser.look_for_directives_in @top_level, comment
|
157
157
|
|
158
|
-
assert_equal "# :unhandled: \n", comment
|
158
|
+
assert_equal "# :unhandled: \n# :markup: not rdoc\n", comment
|
159
|
+
|
160
|
+
assert_equal nil, @top_level.metadata['unhandled']
|
161
|
+
assert_equal 'not rdoc', @top_level.metadata['markup']
|
159
162
|
|
160
163
|
assert_equal 'hi', @options.title
|
161
164
|
end
|
@@ -22,6 +22,15 @@ class TestRDocParserSimple < MiniTest::Unit::TestCase
|
|
22
22
|
@tempfile.close
|
23
23
|
end
|
24
24
|
|
25
|
+
def test_initialize_metadata
|
26
|
+
parser = util_parser ":unhandled: \n# :markup: not rdoc\n"
|
27
|
+
|
28
|
+
assert_equal nil, @top_level.metadata['unhandled']
|
29
|
+
assert_equal 'not rdoc', @top_level.metadata['markup']
|
30
|
+
|
31
|
+
assert_equal ":unhandled: \n# :markup: not rdoc\n", parser.content
|
32
|
+
end
|
33
|
+
|
25
34
|
def test_remove_coding_comment
|
26
35
|
parser = util_parser <<-TEXT
|
27
36
|
# -*- mode: rdoc; coding: utf-8; fill-column: 74; -*-
|
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rdoc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
+
hash: 23
|
4
5
|
prerelease: false
|
5
6
|
segments:
|
6
7
|
- 2
|
7
8
|
- 5
|
8
|
-
-
|
9
|
-
version: 2.5.
|
9
|
+
- 6
|
10
|
+
version: 2.5.6
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- Eric Hodel
|
@@ -38,16 +39,18 @@ cert_chain:
|
|
38
39
|
x52qPcexcYZR7w==
|
39
40
|
-----END CERTIFICATE-----
|
40
41
|
|
41
|
-
date: 2010-04-
|
42
|
+
date: 2010-04-22 00:00:00 -07:00
|
42
43
|
default_executable:
|
43
44
|
dependencies:
|
44
45
|
- !ruby/object:Gem::Dependency
|
45
46
|
name: rubyforge
|
46
47
|
prerelease: false
|
47
48
|
requirement: &id001 !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
48
50
|
requirements:
|
49
51
|
- - ">="
|
50
52
|
- !ruby/object:Gem::Version
|
53
|
+
hash: 9
|
51
54
|
segments:
|
52
55
|
- 2
|
53
56
|
- 0
|
@@ -59,9 +62,11 @@ dependencies:
|
|
59
62
|
name: gemcutter
|
60
63
|
prerelease: false
|
61
64
|
requirement: &id002 !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
62
66
|
requirements:
|
63
67
|
- - ">="
|
64
68
|
- !ruby/object:Gem::Version
|
69
|
+
hash: 11
|
65
70
|
segments:
|
66
71
|
- 0
|
67
72
|
- 5
|
@@ -73,9 +78,11 @@ dependencies:
|
|
73
78
|
name: minitest
|
74
79
|
prerelease: false
|
75
80
|
requirement: &id003 !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
76
82
|
requirements:
|
77
83
|
- - ~>
|
78
84
|
- !ruby/object:Gem::Version
|
85
|
+
hash: 9
|
79
86
|
segments:
|
80
87
|
- 1
|
81
88
|
- 3
|
@@ -86,9 +93,11 @@ dependencies:
|
|
86
93
|
name: hoe
|
87
94
|
prerelease: false
|
88
95
|
requirement: &id004 !ruby/object:Gem::Requirement
|
96
|
+
none: false
|
89
97
|
requirements:
|
90
98
|
- - ">="
|
91
99
|
- !ruby/object:Gem::Version
|
100
|
+
hash: 27
|
92
101
|
segments:
|
93
102
|
- 2
|
94
103
|
- 5
|
@@ -282,16 +291,20 @@ rdoc_options:
|
|
282
291
|
require_paths:
|
283
292
|
- lib
|
284
293
|
required_ruby_version: !ruby/object:Gem::Requirement
|
294
|
+
none: false
|
285
295
|
requirements:
|
286
296
|
- - ">="
|
287
297
|
- !ruby/object:Gem::Version
|
298
|
+
hash: 3
|
288
299
|
segments:
|
289
300
|
- 0
|
290
301
|
version: "0"
|
291
302
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
303
|
+
none: false
|
292
304
|
requirements:
|
293
305
|
- - ">="
|
294
306
|
- !ruby/object:Gem::Version
|
307
|
+
hash: 9
|
295
308
|
segments:
|
296
309
|
- 1
|
297
310
|
- 3
|
@@ -299,7 +312,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
299
312
|
requirements: []
|
300
313
|
|
301
314
|
rubyforge_project: rdoc
|
302
|
-
rubygems_version: 1.3.
|
315
|
+
rubygems_version: 1.3.7.pre.1
|
303
316
|
signing_key:
|
304
317
|
specification_version: 3
|
305
318
|
summary: RDoc is an application that produces documentation for one or more Ruby source files
|
metadata.gz.sig
CHANGED
Binary file
|