rdoc 2.5.8 → 2.5.9

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 CHANGED
Binary file
@@ -1,3 +1,10 @@
1
+ === 2.5.9 / 2010-07-06
2
+
3
+ * Bug Fixes
4
+ * Look up pager correctly.
5
+ * Fixed handling of bullets in verbatim sections. Partial patch by
6
+ Juha-Jarmo Heinonen.
7
+
1
8
  === 2.5.8 / 2010-04-27
2
9
 
3
10
  *NOTE*:
@@ -383,7 +383,7 @@ module RDoc
383
383
  ##
384
384
  # RDoc version you are using
385
385
 
386
- VERSION = '2.5.8'
386
+ VERSION = '2.5.9'
387
387
 
388
388
  ##
389
389
  # Name of the dotfile that contains the description of files to be processed
@@ -276,7 +276,7 @@ class RDoc::Markup::Parser
276
276
  end
277
277
 
278
278
  list_marker = case type
279
- when :BULLET then '*'
279
+ when :BULLET then data
280
280
  when :LABEL then "[#{data}]"
281
281
  when :LALPHA, :NUMBER, :UALPHA then "#{data}."
282
282
  when :NOTE then "#{data}::"
@@ -474,7 +474,7 @@ class RDoc::Markup::Parser
474
474
  when s.scan(/^(-{3,}) *$/) then
475
475
  [:RULE, s[1].length - 2, *token_pos(pos)]
476
476
  when s.scan(/([*-])\s+/) then
477
- @tokens << [:BULLET, :BULLET, *token_pos(pos)]
477
+ @tokens << [:BULLET, s[1], *token_pos(pos)]
478
478
  [:SPACE, s.matched_size, *token_pos(pos)]
479
479
  when s.scan(/([a-z]|\d+)\.[ \t]+\S/i) then
480
480
  list_label = s[1]
@@ -841,6 +841,17 @@ Options may also be set in the 'RI' environment variable.
841
841
  exit
842
842
  end
843
843
 
844
+ ##
845
+ # Is +file+ in ENV['PATH']?
846
+
847
+ def in_path? file
848
+ return true if file =~ %r%\A/% and File.exist? file
849
+
850
+ ENV['PATH'].split(File::PATH_SEPARATOR).any? do |path|
851
+ File.exist? File.join(path, file)
852
+ end
853
+ end
854
+
844
855
  ##
845
856
  # Lists classes known to ri
846
857
 
@@ -1034,9 +1045,11 @@ Options may also be set in the 'RI' environment variable.
1034
1045
  pagers = [ENV['RI_PAGER'], ENV['PAGER'], 'pager', 'less', 'more']
1035
1046
 
1036
1047
  pagers.compact.uniq.each do |pager|
1037
- next unless File.exist? pager
1048
+ pager_cmd = pager.split.first
1049
+
1050
+ next unless in_path? pager_cmd
1038
1051
 
1039
- io = IO.popen pager, "w" rescue next
1052
+ io = IO.popen(pager, 'w') rescue next
1040
1053
 
1041
1054
  next if $? and $?.exited? # pager didn't work
1042
1055
 
@@ -594,6 +594,17 @@ the time
594
594
  assert_equal expected, @RMP.parse(str).parts
595
595
  end
596
596
 
597
+ def test_parse_verbatim_dash
598
+ str = <<-STR
599
+ - blah
600
+ STR
601
+
602
+ expected = [
603
+ @RM::Verbatim.new(' ', '-', ' ', 'blah', "\n")]
604
+
605
+ assert_equal expected, @RMP.parse(str).parts
606
+ end
607
+
597
608
  def test_parse_verbatim_fold
598
609
  str = <<-STR
599
610
  now is
@@ -942,7 +953,7 @@ the time
942
953
  STR
943
954
 
944
955
  expected = [
945
- [:BULLET, :BULLET, 0, 0],
956
+ [:BULLET, '*', 0, 0],
946
957
  [:SPACE, 2, 0, 0],
947
958
  [:TEXT, 'l1', 2, 0],
948
959
  [:NEWLINE, "\n", 4, 0],
@@ -958,12 +969,12 @@ the time
958
969
  STR
959
970
 
960
971
  expected = [
961
- [:BULLET, :BULLET, 0, 0],
972
+ [:BULLET, '*', 0, 0],
962
973
  [:SPACE, 2, 0, 0],
963
974
  [:TEXT, 'l1', 2, 0],
964
975
  [:NEWLINE, "\n", 4, 0],
965
976
  [:INDENT, 2, 0, 1],
966
- [:BULLET, :BULLET, 2, 1],
977
+ [:BULLET, '*', 2, 1],
967
978
  [:SPACE, 2, 2, 1],
968
979
  [:TEXT, 'l1.1', 4, 1],
969
980
  [:NEWLINE, "\n", 8, 1],
@@ -509,6 +509,18 @@ Foo::Bar#bother
509
509
  assert_instance_of @RM::ToHtml, driver.formatter
510
510
  end
511
511
 
512
+ def test_in_path_eh
513
+ path = ENV['PATH']
514
+
515
+ refute @driver.in_path?('/nonexistent')
516
+
517
+ ENV['PATH'] = File.expand_path '..', __FILE__
518
+
519
+ assert @driver.in_path?(File.basename(__FILE__))
520
+ ensure
521
+ ENV['PATH'] = path
522
+ end
523
+
512
524
  def test_method_type
513
525
  assert_equal :both, @driver.method_type(nil)
514
526
  assert_equal :both, @driver.method_type('.')
@@ -520,7 +532,7 @@ Foo::Bar#bother
520
532
  util_store
521
533
 
522
534
  out, err = capture_io do
523
- @driver.list_known_classes
535
+ @driver.list_known_classes
524
536
  end
525
537
 
526
538
  assert_equal "Ambiguous\nFoo\nFoo::Bar\nFoo::Baz\nInc\n", out
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: 11
4
+ hash: 9
5
5
  prerelease: false
6
6
  segments:
7
7
  - 2
8
8
  - 5
9
- - 8
10
- version: 2.5.8
9
+ - 9
10
+ version: 2.5.9
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: 2010-04-27 00:00:00 -07:00
42
+ date: 2010-07-06 00:00:00 -07:00
43
43
  default_executable:
44
44
  dependencies:
45
45
  - !ruby/object:Gem::Dependency
@@ -331,7 +331,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
331
331
  requirements: []
332
332
 
333
333
  rubyforge_project: rdoc
334
- rubygems_version: 1.3.7.pre.1
334
+ rubygems_version: 1.3.7
335
335
  signing_key:
336
336
  specification_version: 3
337
337
  summary: RDoc is an application that produces documentation for one or more Ruby source files
metadata.gz.sig CHANGED
@@ -1 +1,2 @@
1
- :��� ���&x���lK͸�X��n ��
1
+
2
+ ;] ���j$eA