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.

@@ -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
+
@@ -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
- Dir.chdir dir do
24
- FileUtils.touch 'unreadable'
25
- FileUtils.chmod 0, 'unreadable'
26
-
27
- @options.files = %w[nonexistent unreadable]
28
-
29
- @options.check_files
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
@@ -2,8 +2,13 @@ XREF_DATA = <<-XREF_DATA
2
2
  class C1
3
3
 
4
4
  attr :attr
5
+
6
+ # :section: separate
7
+
5
8
  attr_reader :attr_reader
6
9
  attr_writer :attr_writer
10
+
11
+ # :section:
7
12
  attr_accessor :attr_accessor
8
13
 
9
14
  CONST = :const
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: 17
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 3
8
8
  - 5
9
- - 1
10
- version: 3.5.1
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-01-30 00:00:00 -08:00
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: 47
111
+ hash: 43
112
112
  segments:
113
113
  - 2
114
- - 8
114
+ - 9
115
115
  - 0
116
- version: 2.8.0
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
- RDoc 2.5 did not save method parameters, so you should upgrade your rdoc-data
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
- To have ri data for core and stdlib you'll need to:
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: 3
346
+ hash: 57
341
347
  segments:
342
- - 0
343
- version: "0"
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.4.2
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