rdoc 3.5.1 → 3.5.2
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 +18 -1
- data/Manifest.txt +1 -0
- data/README.txt +3 -3
- data/Rakefile +10 -3
- data/lib/rdoc.rb +1 -1
- data/lib/rdoc/any_method.rb +2 -2
- data/lib/rdoc/context.rb +105 -38
- data/lib/rdoc/generator/markup.rb +12 -17
- data/lib/rdoc/generator/template/darkfish/classpage.rhtml +138 -115
- data/lib/rdoc/generator/template/darkfish/rdoc.css +40 -11
- data/lib/rdoc/markup.rb +9 -5
- data/lib/rdoc/markup/to_html.rb +62 -82
- data/lib/rdoc/options.rb +1 -1
- data/lib/rdoc/text.rb +32 -0
- data/test/test_rdoc_any_method.rb +7 -1
- data/test/test_rdoc_context.rb +65 -0
- data/test/test_rdoc_context_section.rb +54 -0
- data/test/test_rdoc_options.rb +18 -8
- data/test/xref_data.rb +5 -0
- metadata +23 -14
- metadata.gz.sig +0 -0
@@ -0,0 +1,54 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'cgi'
|
3
|
+
require 'minitest/autorun'
|
4
|
+
require 'rdoc'
|
5
|
+
require 'rdoc/code_objects'
|
6
|
+
|
7
|
+
class TestRDocContextSection < MiniTest::Unit::TestCase
|
8
|
+
|
9
|
+
def setup
|
10
|
+
@S = RDoc::Context::Section
|
11
|
+
@s = @S.new nil, 'section', '# comment'
|
12
|
+
end
|
13
|
+
|
14
|
+
def test_aref
|
15
|
+
assert_equal 'section', @s.aref
|
16
|
+
|
17
|
+
assert_equal '5Buntitled-5D', @S.new(nil, nil, nil).aref
|
18
|
+
|
19
|
+
assert_equal 'one+two', @S.new(nil, 'one two', nil).aref
|
20
|
+
end
|
21
|
+
|
22
|
+
def test_comment_equals
|
23
|
+
@s.comment = "# :section: section\n"
|
24
|
+
|
25
|
+
assert_equal "# comment", @s.comment
|
26
|
+
|
27
|
+
@s.comment = "# :section: section\n# other"
|
28
|
+
|
29
|
+
assert_equal "# comment\n# ---\n# other", @s.comment
|
30
|
+
|
31
|
+
s = @S.new nil, nil, nil
|
32
|
+
|
33
|
+
s.comment = "# :section:\n# other"
|
34
|
+
|
35
|
+
assert_equal "# other", s.comment
|
36
|
+
end
|
37
|
+
|
38
|
+
def test_extract_comment
|
39
|
+
assert_equal '', @s.extract_comment('')
|
40
|
+
assert_equal '', @s.extract_comment("# :section: b\n")
|
41
|
+
assert_equal '# c', @s.extract_comment("# :section: b\n# c")
|
42
|
+
assert_equal '# c', @s.extract_comment("# a\n# :section: b\n# c")
|
43
|
+
end
|
44
|
+
|
45
|
+
def test_sequence
|
46
|
+
_, err = capture_io do
|
47
|
+
assert_match(/\ASEC\d{5}\Z/, @s.sequence)
|
48
|
+
end
|
49
|
+
|
50
|
+
assert_equal "#{@S}#sequence is deprecated, use #aref\n", err
|
51
|
+
end
|
52
|
+
|
53
|
+
end
|
54
|
+
|
data/test/test_rdoc_options.rb
CHANGED
@@ -17,16 +17,26 @@ class TestRDocOptions < MiniTest::Unit::TestCase
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def test_check_files
|
20
|
-
skip "assumes UNIX permission model" if /mswin|mingw/ =~ RUBY_PLATFORM
|
21
20
|
out, err = capture_io do
|
22
21
|
Dir.mktmpdir do |dir|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
22
|
+
begin
|
23
|
+
unreadable = nil # variable for windows
|
24
|
+
|
25
|
+
Dir.chdir dir do
|
26
|
+
if RUBY_PLATFORM =~ /mswin|mingw/ then
|
27
|
+
unreadable = open 'unreadable'
|
28
|
+
File.delete 'unreadable'
|
29
|
+
else
|
30
|
+
FileUtils.touch 'unreadable'
|
31
|
+
FileUtils.chmod 0, 'unreadable'
|
32
|
+
end
|
33
|
+
|
34
|
+
@options.files = %w[nonexistent unreadable]
|
35
|
+
|
36
|
+
@options.check_files
|
37
|
+
end
|
38
|
+
ensure
|
39
|
+
unreadable.close if unreadable
|
30
40
|
end
|
31
41
|
end
|
32
42
|
end
|
data/test/xref_data.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rdoc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 3
|
8
8
|
- 5
|
9
|
-
-
|
10
|
-
version: 3.5.
|
9
|
+
- 2
|
10
|
+
version: 3.5.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Eric Hodel
|
@@ -39,7 +39,7 @@ cert_chain:
|
|
39
39
|
x52qPcexcYZR7w==
|
40
40
|
-----END CERTIFICATE-----
|
41
41
|
|
42
|
-
date: 2011-
|
42
|
+
date: 2011-02-04 00:00:00 -08:00
|
43
43
|
default_executable:
|
44
44
|
dependencies:
|
45
45
|
- !ruby/object:Gem::Dependency
|
@@ -108,12 +108,12 @@ dependencies:
|
|
108
108
|
requirements:
|
109
109
|
- - ">="
|
110
110
|
- !ruby/object:Gem::Version
|
111
|
-
hash:
|
111
|
+
hash: 43
|
112
112
|
segments:
|
113
113
|
- 2
|
114
|
-
-
|
114
|
+
- 9
|
115
115
|
- 0
|
116
|
-
version: 2.
|
116
|
+
version: 2.9.0
|
117
117
|
type: :development
|
118
118
|
version_requirements: *id005
|
119
119
|
description: |-
|
@@ -266,6 +266,7 @@ files:
|
|
266
266
|
- test/test_rdoc_code_object.rb
|
267
267
|
- test/test_rdoc_constant.rb
|
268
268
|
- test/test_rdoc_context.rb
|
269
|
+
- test/test_rdoc_context_section.rb
|
269
270
|
- test/test_rdoc_encoding.rb
|
270
271
|
- test/test_rdoc_generator_darkfish.rb
|
271
272
|
- test/test_rdoc_generator_ri.rb
|
@@ -310,10 +311,12 @@ homepage: http://rdoc.rubyforge.org
|
|
310
311
|
licenses: []
|
311
312
|
|
312
313
|
post_install_message: |
|
313
|
-
|
314
|
-
gem to a version >= 2.5.3.
|
314
|
+
NOTE: If you are running Ruby 1.9.2 you can ignore this message.
|
315
315
|
|
316
|
-
|
316
|
+
RDoc 2.5+ has a new ri data format for Ruby 1.8.7 and 1.9.1. (1.9.2 contains
|
317
|
+
RDoc 2.5 so there is nothing to do!)
|
318
|
+
|
319
|
+
To install new ri data for core and stdlib you'll need to:
|
317
320
|
|
318
321
|
gem install rdoc-data
|
319
322
|
|
@@ -326,6 +329,9 @@ post_install_message: |
|
|
326
329
|
gem rdoc --all --overwrite
|
327
330
|
|
328
331
|
If you don't want to rebuild the rdoc for `gem server`, add --no-rdoc.
|
332
|
+
|
333
|
+
NOTE: RDoc 2.5 did not save method parameters, so you should upgrade your
|
334
|
+
rdoc-data gem to a version >= 2.5.3 if you installed an older version.
|
329
335
|
|
330
336
|
rdoc_options:
|
331
337
|
- --main
|
@@ -337,10 +343,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
337
343
|
requirements:
|
338
344
|
- - ">="
|
339
345
|
- !ruby/object:Gem::Version
|
340
|
-
hash:
|
346
|
+
hash: 57
|
341
347
|
segments:
|
342
|
-
-
|
343
|
-
|
348
|
+
- 1
|
349
|
+
- 8
|
350
|
+
- 7
|
351
|
+
version: 1.8.7
|
344
352
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
345
353
|
none: false
|
346
354
|
requirements:
|
@@ -354,7 +362,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
354
362
|
requirements: []
|
355
363
|
|
356
364
|
rubyforge_project: rdoc
|
357
|
-
rubygems_version: 1.
|
365
|
+
rubygems_version: 1.5.0
|
358
366
|
signing_key:
|
359
367
|
specification_version: 3
|
360
368
|
summary: RDoc produces HTML and command-line documentation for Ruby projects
|
@@ -367,6 +375,7 @@ test_files:
|
|
367
375
|
- test/test_rdoc_code_object.rb
|
368
376
|
- test/test_rdoc_constant.rb
|
369
377
|
- test/test_rdoc_context.rb
|
378
|
+
- test/test_rdoc_context_section.rb
|
370
379
|
- test/test_rdoc_encoding.rb
|
371
380
|
- test/test_rdoc_generator_darkfish.rb
|
372
381
|
- test/test_rdoc_generator_ri.rb
|
metadata.gz.sig
CHANGED
Binary file
|