rdoc 4.1.0 → 4.1.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0819c40fa54344a9bfad2ebcad36dbb0f5230345
4
- data.tar.gz: 20484e07c670f704600a3a2ae4f1708984256f18
3
+ metadata.gz: e988b11410d57700687c89834e6074da186bf845
4
+ data.tar.gz: 8dca91d7c35a7145976a31304e408f51d3f361fe
5
5
  SHA512:
6
- metadata.gz: 6f481cd483af36f9c8954874d035e4436dcc7e0ca654be6032b321f15aa560918c699b020eb8512d4acb96d4304c73b7bea68d2d385c03334560772cc95d8f5f
7
- data.tar.gz: 2037b1742a963cd6d78afbda235235b12db016053e410071c765ca95e1e7d7680f765ac274b19f37135fbbb88bcd8c5f7fa1e936bf200010e5213277036a75f2
6
+ metadata.gz: 57e0b3e2182fbdf7058f6fba5a6f7fe96bbdcc1990be0b646757d73713306be9e09ce6af7bcbe5f4e84cb26e836bab8e41cee59658e84106f0081bb12e2c815e
7
+ data.tar.gz: 32a2e6177e836b68ecccc47ebcf5555f17baa72f59dac17d2e976423fc7cdc8e70ba92478f1a6912061e72124f7dbb8007922ccd955dbfd5b1ca6a8e03aeef83
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -1,3 +1,14 @@
1
+ === 4.1.1 / 2014-01-09
2
+
3
+ * Bug fixes
4
+ * Fixed reporting of undocumented method parameters when including when
5
+ yield and &block are present. Pull request #281 by Victor Bilyk.
6
+ * Fixed merging of rd-style and hash-style comments at the top of a file.
7
+ Bug #266 by Zachary Scott.
8
+ * Fixed Document-attr in the C parser. Bug #271 by Hanmac.
9
+ * Removed duplicated condition in superclass fixup. Pull request #282 by
10
+ Benoit Daloze.
11
+
1
12
  === 4.1.0 / 2013-12-26
2
13
 
3
14
  * Notable changes
data/Rakefile CHANGED
@@ -63,7 +63,7 @@ Depending on your version of ruby, you may need to install ruby rdoc/ri data:
63
63
 
64
64
  require_ruby_version '>= 1.8.7'
65
65
  extra_deps << ['json', '~> 1.4']
66
- extra_dev_deps << ['racc', '~> 1.4', '!= 1.4.10']
66
+ extra_dev_deps << ['racc', '~> 1.4', '> 1.4.10']
67
67
  extra_dev_deps << ['minitest', '~> 4']
68
68
 
69
69
  extra_rdoc_files << 'Rakefile'
@@ -64,7 +64,7 @@ module RDoc
64
64
  ##
65
65
  # RDoc version you are using
66
66
 
67
- VERSION = '4.1.0'
67
+ VERSION = '4.1.1'
68
68
 
69
69
  ##
70
70
  # Method visibilities
@@ -240,7 +240,15 @@ class RDoc::AnyMethod < RDoc::MethodAttr
240
240
  return []
241
241
  end
242
242
 
243
- params = params.gsub(/\s+/, '').split ','
243
+ if @block_params then
244
+ # If this method has explicit block parameters, remove any explicit
245
+ # &block
246
+ params.sub!(/,?\s*&\w+/, '')
247
+ else
248
+ params.sub!(/\&(\w+)/, '\1')
249
+ end
250
+
251
+ params = params.gsub(/\s+/, '').split(',').reject(&:empty?)
244
252
 
245
253
  params.map { |param| param.sub(/=.*/, '') }
246
254
  end
@@ -321,10 +321,11 @@ class RDoc::Context < RDoc::CodeObject
321
321
  end
322
322
 
323
323
  # fix up superclass
324
- superclass = nil if full_name == 'BasicObject'
325
- superclass = nil if full_name == 'Object' and defined?(::BasicObject)
326
- superclass = '::BasicObject' if
327
- defined?(::BasicObject) and full_name == 'Object'
324
+ if full_name == 'BasicObject' then
325
+ superclass = nil
326
+ elsif full_name == 'Object' then
327
+ superclass = defined?(::BasicObject) ? '::BasicObject' : nil
328
+ end
328
329
 
329
330
  # find the superclass full name
330
331
  if superclass then
@@ -594,9 +594,10 @@ class RDoc::Parser::C < RDoc::Parser
594
594
  \s*#{attr_name}\s*,
595
595
  #{rw},.*?\)\s*;%xm then
596
596
  $1
597
- elsif @content =~ %r%Document-attr:\s#{attr_name}\s*?\n
598
- ((?>.*?\*/))%xm then
599
- $1
597
+ elsif @content =~ %r%(/\*.*?(?:\s*\*\s*)?)
598
+ Document-attr:\s#{attr_name}\s*?\n
599
+ ((?>(.|\n)*?\*/))%x then
600
+ "#{$1}\n#{$2}"
600
601
  else
601
602
  ''
602
603
  end
@@ -226,6 +226,7 @@ class RDoc::Parser::Ruby < RDoc::Parser
226
226
  comment = ''
227
227
  comment.force_encoding @encoding if @encoding
228
228
  first_line = true
229
+ first_comment_tk_class = nil
229
230
 
230
231
  tk = get_tk
231
232
 
@@ -238,6 +239,9 @@ class RDoc::Parser::Ruby < RDoc::Parser
238
239
  skip_tkspace
239
240
  tk = get_tk
240
241
  else
242
+ break if first_comment_tk_class and not first_comment_tk_class === tk
243
+ first_comment_tk_class = tk.class
244
+
241
245
  first_line = false
242
246
  comment << tk.text << "\n"
243
247
  tk = get_tk
@@ -1,6 +1,6 @@
1
1
  #
2
2
  # DO NOT MODIFY!!!!
3
- # This file is automatically generated by Racc 1.4.9
3
+ # This file is automatically generated by Racc 1.4.11
4
4
  # from Racc grammer file "".
5
5
  #
6
6
 
@@ -1,6 +1,6 @@
1
1
  #
2
2
  # DO NOT MODIFY!!!!
3
- # This file is automatically generated by Racc 1.4.9
3
+ # This file is automatically generated by Racc 1.4.11
4
4
  # from Racc grammer file "".
5
5
  #
6
6
 
@@ -153,7 +153,13 @@ class RDoc::RubygemsHook
153
153
  options = nil
154
154
 
155
155
  args = @spec.rdoc_options
156
- args.concat @spec.require_paths
156
+
157
+ if @spec.respond_to? :source_paths then
158
+ args.concat @spec.source_paths
159
+ else
160
+ args.concat @spec.require_paths
161
+ end
162
+
157
163
  args.concat @spec.extra_rdoc_files
158
164
 
159
165
  case config_args = Gem.configuration[:rdoc]
@@ -334,6 +334,35 @@ method(a, b) { |c, d| ... }
334
334
  assert_equal %w[a b c d], m.param_list
335
335
  end
336
336
 
337
+ def test_param_list_empty_params_with_block
338
+ m = RDoc::AnyMethod.new nil, 'method'
339
+ m.parent = @c1
340
+
341
+ m.params = '()'
342
+ m.block_params = 'a, b'
343
+
344
+ assert_equal %w[a b], m.param_list
345
+ end
346
+
347
+ def test_param_list_ampersand_param_block_params
348
+ m = RDoc::AnyMethod.new nil, 'method'
349
+ m.parent = @c1
350
+
351
+ m.params = '(a, b, &block)'
352
+ m.block_params = 'c, d'
353
+
354
+ assert_equal %w[a b c d], m.param_list
355
+ end
356
+
357
+ def test_param_list_ampersand_param
358
+ m = RDoc::AnyMethod.new nil, 'method'
359
+ m.parent = @c1
360
+
361
+ m.params = '(a, b, &block)'
362
+
363
+ assert_equal %w[a b block], m.param_list
364
+ end
365
+
337
366
  def test_param_seq
338
367
  m = RDoc::AnyMethod.new nil, 'method'
339
368
  m.parent = @c1
@@ -8,6 +8,36 @@ class TestRDocConstant < XrefTestCase
8
8
  @const = @c1.constants.first
9
9
  end
10
10
 
11
+ def test_documented_eh
12
+ top_level = @store.add_file 'file.rb'
13
+
14
+ const = RDoc::Constant.new 'CONST', nil, nil
15
+ top_level.add_constant const
16
+
17
+ refute const.documented?
18
+
19
+ const.comment = comment 'comment'
20
+
21
+ assert const.documented?
22
+ end
23
+
24
+ def test_documented_eh_alias
25
+ top_level = @store.add_file 'file.rb'
26
+
27
+ const = RDoc::Constant.new 'CONST', nil, nil
28
+ top_level.add_constant const
29
+
30
+ refute const.documented?
31
+
32
+ const.is_alias_for = 'C1'
33
+
34
+ refute const.documented?
35
+
36
+ @c1.add_comment comment('comment'), @top_level
37
+
38
+ assert const.documented?
39
+ end
40
+
11
41
  def test_full_name
12
42
  assert_equal 'C1::CONST', @const.full_name
13
43
  end
@@ -736,6 +736,47 @@ rb_define_alias(C, "[]", "index");
736
736
  assert_equal "/*\n * comment\n */\n\n", comment.text
737
737
  end
738
738
 
739
+ def test_find_attr_comment_document_attr
740
+ parser= util_parser <<-C
741
+ /*
742
+ * Document-attr: y
743
+ * comment
744
+ */
745
+ C
746
+
747
+ comment = parser.find_attr_comment nil, 'y'
748
+
749
+ assert_equal "/*\n * \n * comment\n */", comment.text
750
+ end
751
+
752
+ def test_find_attr_comment_document_attr_oneline
753
+ parser= util_parser <<-C
754
+ /* Document-attr: y
755
+ * comment
756
+ */
757
+ C
758
+
759
+ comment = parser.find_attr_comment nil, 'y'
760
+
761
+ assert_equal "/* \n * comment\n */", comment.text
762
+ end
763
+
764
+ def test_find_attr_comment_document_attr_overlap
765
+ parser= util_parser <<-C
766
+ /* Document-attr: x
767
+ * comment
768
+ */
769
+
770
+ /* Document-attr: y
771
+ * comment
772
+ */
773
+ C
774
+
775
+ comment = parser.find_attr_comment nil, 'y'
776
+
777
+ assert_equal "/* \n * comment\n */", comment.text
778
+ end
779
+
739
780
  def test_find_class_comment
740
781
  @options.rdoc_include << File.dirname(__FILE__)
741
782
 
@@ -63,6 +63,21 @@ class C; end
63
63
  assert_equal Encoding::CP852, comment.text.encoding
64
64
  end
65
65
 
66
+ def test_collect_first_comment_rd_hash
67
+ parser = util_parser <<-CONTENT
68
+ =begin
69
+ first
70
+ =end
71
+
72
+ # second
73
+ class C; end
74
+ CONTENT
75
+
76
+ comment = parser.collect_first_comment
77
+
78
+ assert_equal RDoc::Comment.new("first\n\n", @top_level), comment
79
+ end
80
+
66
81
  def test_get_class_or_module
67
82
  ctxt = RDoc::Context.new
68
83
  ctxt.store = @store
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rdoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.0
4
+ version: 4.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Hodel
@@ -33,96 +33,96 @@ cert_chain:
33
33
  KDyY1VIazVgoC8XvR4h/95/iScPiuglzA+DBG1hip1xScAtw05BrXyUNrc9CEMYU
34
34
  wgF94UVoHRp6ywo8I7NP3HcwFQDFNEZPNGXsng==
35
35
  -----END CERTIFICATE-----
36
- date: 2013-12-26 00:00:00.000000000 Z
36
+ date: 2014-01-09 00:00:00.000000000 Z
37
37
  dependencies:
38
38
  - !ruby/object:Gem::Dependency
39
39
  name: json
40
40
  requirement: !ruby/object:Gem::Requirement
41
41
  requirements:
42
- - - ~>
42
+ - - "~>"
43
43
  - !ruby/object:Gem::Version
44
44
  version: '1.4'
45
45
  type: :runtime
46
46
  prerelease: false
47
47
  version_requirements: !ruby/object:Gem::Requirement
48
48
  requirements:
49
- - - ~>
49
+ - - "~>"
50
50
  - !ruby/object:Gem::Version
51
51
  version: '1.4'
52
52
  - !ruby/object:Gem::Dependency
53
53
  name: kpeg
54
54
  requirement: !ruby/object:Gem::Requirement
55
55
  requirements:
56
- - - ~>
56
+ - - "~>"
57
57
  - !ruby/object:Gem::Version
58
58
  version: '0.9'
59
59
  type: :development
60
60
  prerelease: false
61
61
  version_requirements: !ruby/object:Gem::Requirement
62
62
  requirements:
63
- - - ~>
63
+ - - "~>"
64
64
  - !ruby/object:Gem::Version
65
65
  version: '0.9'
66
66
  - !ruby/object:Gem::Dependency
67
67
  name: minitest
68
68
  requirement: !ruby/object:Gem::Requirement
69
69
  requirements:
70
- - - ~>
70
+ - - "~>"
71
71
  - !ruby/object:Gem::Version
72
- version: '5.0'
72
+ version: '5.2'
73
73
  type: :development
74
74
  prerelease: false
75
75
  version_requirements: !ruby/object:Gem::Requirement
76
76
  requirements:
77
- - - ~>
77
+ - - "~>"
78
78
  - !ruby/object:Gem::Version
79
- version: '5.0'
79
+ version: '5.2'
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: rdoc
82
82
  requirement: !ruby/object:Gem::Requirement
83
83
  requirements:
84
- - - ~>
84
+ - - "~>"
85
85
  - !ruby/object:Gem::Version
86
86
  version: '4.0'
87
87
  type: :development
88
88
  prerelease: false
89
89
  version_requirements: !ruby/object:Gem::Requirement
90
90
  requirements:
91
- - - ~>
91
+ - - "~>"
92
92
  - !ruby/object:Gem::Version
93
93
  version: '4.0'
94
94
  - !ruby/object:Gem::Dependency
95
95
  name: racc
96
96
  requirement: !ruby/object:Gem::Requirement
97
97
  requirements:
98
- - - ~>
98
+ - - "~>"
99
99
  - !ruby/object:Gem::Version
100
100
  version: '1.4'
101
- - - '!='
101
+ - - ">"
102
102
  - !ruby/object:Gem::Version
103
103
  version: 1.4.10
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ~>
108
+ - - "~>"
109
109
  - !ruby/object:Gem::Version
110
110
  version: '1.4'
111
- - - '!='
111
+ - - ">"
112
112
  - !ruby/object:Gem::Version
113
113
  version: 1.4.10
114
114
  - !ruby/object:Gem::Dependency
115
115
  name: hoe
116
116
  requirement: !ruby/object:Gem::Requirement
117
117
  requirements:
118
- - - ~>
118
+ - - "~>"
119
119
  - !ruby/object:Gem::Version
120
120
  version: '3.7'
121
121
  type: :development
122
122
  prerelease: false
123
123
  version_requirements: !ruby/object:Gem::Requirement
124
124
  requirements:
125
- - - ~>
125
+ - - "~>"
126
126
  - !ruby/object:Gem::Version
127
127
  version: '3.7'
128
128
  description: |-
@@ -152,8 +152,9 @@ extra_rdoc_files:
152
152
  - TODO.rdoc
153
153
  - Rakefile
154
154
  files:
155
- - .autotest
156
- - .document
155
+ - ".autotest"
156
+ - ".document"
157
+ - ".gemtest"
157
158
  - CONTRIBUTING.rdoc
158
159
  - CVE-2013-0256.rdoc
159
160
  - ExampleMarkdown.md
@@ -449,7 +450,6 @@ files:
449
450
  - test/test_rdoc_top_level.rb
450
451
  - test/xref_data.rb
451
452
  - test/xref_test_case.rb
452
- - .gemtest
453
453
  homepage: http://docs.seattlerb.org/rdoc
454
454
  licenses:
455
455
  - Ruby
@@ -462,23 +462,23 @@ post_install_message: |
462
462
  = 1.9.1 : gem install rdoc-data; rdoc-data --install
463
463
  >= 1.9.2 : nothing to do! Yay!
464
464
  rdoc_options:
465
- - --main
465
+ - "--main"
466
466
  - README.rdoc
467
467
  require_paths:
468
468
  - lib
469
469
  required_ruby_version: !ruby/object:Gem::Requirement
470
470
  requirements:
471
- - - '>='
471
+ - - ">="
472
472
  - !ruby/object:Gem::Version
473
473
  version: 1.8.7
474
474
  required_rubygems_version: !ruby/object:Gem::Requirement
475
475
  requirements:
476
- - - '>='
476
+ - - ">="
477
477
  - !ruby/object:Gem::Version
478
478
  version: '1.3'
479
479
  requirements: []
480
480
  rubyforge_project: rdoc
481
- rubygems_version: 2.1.11
481
+ rubygems_version: 2.2.1
482
482
  signing_key:
483
483
  specification_version: 4
484
484
  summary: RDoc produces HTML and command-line documentation for Ruby projects
metadata.gz.sig CHANGED
Binary file