rdtool 0.6.36 → 0.6.37

Sign up to get free protection for your applications and to get access to all the features.
data/HISTORY CHANGED
@@ -70,6 +70,8 @@ RDtool include files which is copyrighted by somebody elses.
70
70
  Please read these files for those lisence info.
71
71
 
72
72
  = CHANGES
73
+ :0.6.37
74
+ * Fix rd2man-lib for Ruby1.9.1
73
75
  :0.6.36
74
76
  * Fix rd2man-lib for Ruby1.9.1, remove invalid @filename.
75
77
  :0.6.35
@@ -7,7 +7,7 @@
7
7
  <title>Untitled</title>
8
8
  </head>
9
9
  <body>
10
- <h1><a name="label-0" id="label-0">RDtool 0.6.36</a></h1><!-- RDLabel: "RDtool 0.6.36" -->
10
+ <h1><a name="label-0" id="label-0">RDtool 0.6.37</a></h1><!-- RDLabel: "RDtool 0.6.37" -->
11
11
  <h2><a name="label-1" id="label-1">What is RDtool</a></h2><!-- RDLabel: "What is RDtool" -->
12
12
  <p>RD is Ruby's POD. RDtool is formatter for RD.</p>
13
13
  <h2><a name="label-2" id="label-2">What is Changed</a></h2><!-- RDLabel: "What is Changed" -->
@@ -7,7 +7,7 @@
7
7
  <title>Untitled</title>
8
8
  </head>
9
9
  <body>
10
- <h1><a name="label-0" id="label-0">RDtool 0.6.36</a></h1><!-- RDLabel: "RDtool 0.6.36" -->
10
+ <h1><a name="label-0" id="label-0">RDtool 0.6.37</a></h1><!-- RDLabel: "RDtool 0.6.37" -->
11
11
  <h2><a name="label-1" id="label-1">RDってなに?</a></h2><!-- RDLabel: "RDってなに?" -->
12
12
  <p>RDはRubyにおけるPOD(Plain Old Documentation)のようなものです。
13
13
  RDtoolはRDのフォーマッタであり、RDをHTMLなどに変換できます。</p>
data/README.rd CHANGED
@@ -1,6 +1,6 @@
1
1
  # -*- mode: rd; coding: utf-8; indent-tabs-mode: nil -*-
2
2
  =begin
3
- = RDtool 0.6.36
3
+ = RDtool 0.6.37
4
4
  == What is RDtool
5
5
 
6
6
  RD is Ruby's POD. RDtool is formatter for RD.
@@ -1,6 +1,6 @@
1
1
  # -*- mode: rd; coding: utf-8; indent-tabs-mode: nil -*-
2
2
  =begin
3
- = RDtool 0.6.36
3
+ = RDtool 0.6.37
4
4
  == RDってなに?
5
5
 
6
6
  RDはRubyにおけるPOD(Plain Old Documentation)のようなものです。
@@ -3,6 +3,7 @@
3
3
  =end
4
4
 
5
5
  require "rd/rdvisitor"
6
+ require "rd/version"
6
7
 
7
8
  unless [].respond_to? :collect!
8
9
  class Array
@@ -30,6 +31,7 @@ module RD
30
31
  def initialize
31
32
  @enumcounter = 0
32
33
  @index = {}
34
+ @filename = nil
33
35
  end
34
36
 
35
37
  def visit(tree)
@@ -39,7 +41,7 @@ module RD
39
41
 
40
42
  def apply_to_DocumentElement(element, content)
41
43
  content = content.join
42
- title = File.basename(@filename) || "Untilled"
44
+ title = guess_title
43
45
  title = title.sub(/\.rd$/i, '').upcase
44
46
  <<"EOT"
45
47
  .\\" DO NOT MODIFY THIS FILE! it was generated by rd2
@@ -227,6 +229,14 @@ EOT
227
229
  end
228
230
  private :meta_char_escape
229
231
 
232
+ def guess_title
233
+ return ARGF.filename unless ARGF.filename == "-"
234
+ return @filename if @filename
235
+ "Untitled"
236
+ end
237
+ private :guess_title
238
+
239
+
230
240
  end # RD2MANVisitor
231
241
  end # RD
232
242
 
@@ -1,6 +1,6 @@
1
1
  module RD
2
2
 
3
- VERSION = '0.6.36'
3
+ VERSION = '0.6.37'
4
4
 
5
5
  class Version
6
6
  attr_reader :name
@@ -4,7 +4,7 @@ Gem::Specification.new do |s|
4
4
  s.rubygems_version = "1.3.5"
5
5
 
6
6
  s.name = 'rdtool'
7
- s.version = '0.6.36'
7
+ s.version = '0.6.37'
8
8
  s.date = '2012-06-12'
9
9
 
10
10
  s.summary = "RDtool is formatter for RD."
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rdtool
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.36
4
+ version: 0.6.37
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: