rdoc 3.9.2 → 3.9.3
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 +10 -0
- data/Manifest.txt +1 -0
- data/lib/rdoc.rb +1 -1
- data/lib/rdoc/encoding.rb +2 -0
- data/lib/rdoc/markup.rb +13 -1
- data/lib/rdoc/markup/formatter.rb +3 -1
- data/lib/rdoc/markup/to_html.rb +1 -1
- data/lib/rdoc/ruby_lex.rb +2 -0
- data/test/test_rdoc_code_object.rb +2 -0
- data/test/test_rdoc_encoding.rb +2 -0
- data/test/test_rdoc_markup_formatter.rb +57 -0
- data/test/test_rdoc_markup_to_html.rb +8 -0
- metadata +11 -11
- metadata.gz.sig +0 -0
data.tar.gz.sig
CHANGED
Binary file
|
data/History.txt
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
=== 3.9.3 / 2011-08-23
|
2
|
+
|
3
|
+
* Bug fixes
|
4
|
+
* Add US-ASCII magic comments to work with <tt>ruby -Ku</tt>. Issue #63 by
|
5
|
+
Travis D. Warlick, Jr.
|
6
|
+
* Image paths at HTTPS URLs are now turned into +<img>+ tags. Pull
|
7
|
+
Request #60 by James Mead
|
8
|
+
* Markup defined by RDoc::Markup#add_special inside a <tt><tt></tt> is no
|
9
|
+
longer converted.
|
10
|
+
|
1
11
|
=== 3.9.2 / 2011-08-11
|
2
12
|
|
3
13
|
* Bug fix
|
data/Manifest.txt
CHANGED
@@ -136,6 +136,7 @@ test/test_rdoc_include.rb
|
|
136
136
|
test/test_rdoc_markup.rb
|
137
137
|
test/test_rdoc_markup_attribute_manager.rb
|
138
138
|
test/test_rdoc_markup_document.rb
|
139
|
+
test/test_rdoc_markup_formatter.rb
|
139
140
|
test/test_rdoc_markup_indented_paragraph.rb
|
140
141
|
test/test_rdoc_markup_paragraph.rb
|
141
142
|
test/test_rdoc_markup_parser.rb
|
data/lib/rdoc.rb
CHANGED
data/lib/rdoc/encoding.rb
CHANGED
data/lib/rdoc/markup.rb
CHANGED
@@ -284,7 +284,19 @@ require 'rdoc'
|
|
284
284
|
#
|
285
285
|
# Links can also be of the form <tt>label[url]</tt>, in which case +label+ is
|
286
286
|
# used in the displayed text, and +url+ is used as the target. If +label+
|
287
|
-
# contains multiple words, put it in braces: <tt>{multi word label}[url]
|
287
|
+
# contains multiple words, put it in braces: <tt>{multi word label}[url]</tt>.
|
288
|
+
# The +url+ may be an +http:+-type link or a cross-reference to a class,
|
289
|
+
# module or method with a label.
|
290
|
+
#
|
291
|
+
# Links with the <tt>rdoc-ref:</tt> scheme will link to the referenced class,
|
292
|
+
# module, method, file, etc. If the referenced item is does not exist
|
293
|
+
# no link will be generated and <tt>rdoc-ref:</tt> will be removed from the
|
294
|
+
# resulting text.
|
295
|
+
#
|
296
|
+
# Links starting with +link:+ refer to local files whose path is relative to
|
297
|
+
# the <tt>--op</tt> directory. Use <tt>rdoc-ref:</tt> instead of
|
298
|
+
# <tt>link:</tt> to link to files generated by RDoc as the link target may
|
299
|
+
# be different across RDoc generators.
|
288
300
|
#
|
289
301
|
# Example links:
|
290
302
|
#
|
@@ -88,7 +88,9 @@ class RDoc::Markup::Formatter
|
|
88
88
|
##
|
89
89
|
# Converts added specials. See RDoc::Markup#add_special
|
90
90
|
|
91
|
-
def convert_special
|
91
|
+
def convert_special special
|
92
|
+
return special.text if in_tt?
|
93
|
+
|
92
94
|
handled = false
|
93
95
|
|
94
96
|
RDoc::Markup::Attribute.each_name_of special.type do |name|
|
data/lib/rdoc/markup/to_html.rb
CHANGED
@@ -254,7 +254,7 @@ class RDoc::Markup::ToHtml < RDoc::Markup::Formatter
|
|
254
254
|
end
|
255
255
|
end
|
256
256
|
|
257
|
-
if (type == "http" or type == "link") and
|
257
|
+
if (type == "http" or type == "https" or type == "link") and
|
258
258
|
url =~ /\.(gif|png|jpg|jpeg|bmp)$/ then
|
259
259
|
"<img src=\"#{url}\" />"
|
260
260
|
else
|
data/lib/rdoc/ruby_lex.rb
CHANGED
data/test/test_rdoc_encoding.rb
CHANGED
@@ -0,0 +1,57 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'minitest/autorun'
|
3
|
+
require 'rdoc'
|
4
|
+
require 'rdoc/markup'
|
5
|
+
require 'rdoc/markup/formatter'
|
6
|
+
|
7
|
+
class TestRDocMarkupFormatter < MiniTest::Unit::TestCase
|
8
|
+
|
9
|
+
class ToTest < RDoc::Markup::Formatter
|
10
|
+
|
11
|
+
def initialize markup
|
12
|
+
super
|
13
|
+
|
14
|
+
add_tag :TT, '<tt>', '</tt>'
|
15
|
+
end
|
16
|
+
|
17
|
+
def accept_paragraph paragraph
|
18
|
+
@res << attributes(paragraph.text)
|
19
|
+
end
|
20
|
+
|
21
|
+
def attributes text
|
22
|
+
convert_flow @am.flow text.dup
|
23
|
+
end
|
24
|
+
|
25
|
+
def handle_special_CAPS special
|
26
|
+
"handled #{special.text}"
|
27
|
+
end
|
28
|
+
|
29
|
+
def start_accepting
|
30
|
+
@res = ""
|
31
|
+
end
|
32
|
+
|
33
|
+
def end_accepting
|
34
|
+
@res
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
38
|
+
|
39
|
+
def setup
|
40
|
+
@markup = RDoc::Markup.new
|
41
|
+
@markup.add_special(/[A-Z]+/, :CAPS)
|
42
|
+
|
43
|
+
@to = ToTest.new @markup
|
44
|
+
|
45
|
+
@caps = RDoc::Markup::Attribute.bitmap_for :CAPS
|
46
|
+
@special = RDoc::Markup::Attribute.bitmap_for :_SPECIAL_
|
47
|
+
@tt = RDoc::Markup::Attribute.bitmap_for :TT
|
48
|
+
end
|
49
|
+
|
50
|
+
def test_convert_tt_special
|
51
|
+
converted = @to.convert '<tt>AAA</tt>'
|
52
|
+
|
53
|
+
assert_equal '<tt>AAA</tt>', converted
|
54
|
+
end
|
55
|
+
|
56
|
+
end
|
57
|
+
|
@@ -306,6 +306,14 @@ class TestRDocMarkupToHtml < RDoc::Markup::FormatterTestCase
|
|
306
306
|
@to.gen_url('link:example', 'example')
|
307
307
|
end
|
308
308
|
|
309
|
+
def test_gem_url_image_url
|
310
|
+
assert_equal '<img src="http://example.com/image.png" />', @to.gen_url('http://example.com/image.png', 'ignored')
|
311
|
+
end
|
312
|
+
|
313
|
+
def test_gem_url_ssl_image_url
|
314
|
+
assert_equal '<img src="https://example.com/image.png" />', @to.gen_url('https://example.com/image.png', 'ignored')
|
315
|
+
end
|
316
|
+
|
309
317
|
def test_handle_special_HYPERLINK_link
|
310
318
|
special = RDoc::Markup::Special.new 0, 'link:README.txt'
|
311
319
|
|
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: 37
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 3
|
8
8
|
- 9
|
9
|
-
-
|
10
|
-
version: 3.9.
|
9
|
+
- 3
|
10
|
+
version: 3.9.3
|
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-08-
|
42
|
+
date: 2011-08-23 00:00:00 Z
|
43
43
|
dependencies:
|
44
44
|
- !ruby/object:Gem::Dependency
|
45
45
|
name: minitest
|
@@ -107,11 +107,11 @@ dependencies:
|
|
107
107
|
requirements:
|
108
108
|
- - ~>
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
hash:
|
110
|
+
hash: 27
|
111
111
|
segments:
|
112
112
|
- 2
|
113
|
-
-
|
114
|
-
version: "2.
|
113
|
+
- 12
|
114
|
+
version: "2.12"
|
115
115
|
type: :development
|
116
116
|
version_requirements: *id005
|
117
117
|
description: |-
|
@@ -276,6 +276,7 @@ files:
|
|
276
276
|
- test/test_rdoc_markup.rb
|
277
277
|
- test/test_rdoc_markup_attribute_manager.rb
|
278
278
|
- test/test_rdoc_markup_document.rb
|
279
|
+
- test/test_rdoc_markup_formatter.rb
|
279
280
|
- test/test_rdoc_markup_indented_paragraph.rb
|
280
281
|
- test/test_rdoc_markup_paragraph.rb
|
281
282
|
- test/test_rdoc_markup_parser.rb
|
@@ -313,8 +314,6 @@ files:
|
|
313
314
|
homepage: http://docs.seattlerb.org/rdoc
|
314
315
|
licenses: []
|
315
316
|
|
316
|
-
metadata: {}
|
317
|
-
|
318
317
|
post_install_message: |
|
319
318
|
Depending on your version of ruby, you may need to install ruby rdoc/ri data:
|
320
319
|
|
@@ -352,9 +351,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
352
351
|
requirements: []
|
353
352
|
|
354
353
|
rubyforge_project: rdoc
|
355
|
-
rubygems_version: 1.8.
|
354
|
+
rubygems_version: 1.8.8
|
356
355
|
signing_key:
|
357
|
-
specification_version:
|
356
|
+
specification_version: 3
|
358
357
|
summary: RDoc produces HTML and command-line documentation for Ruby projects
|
359
358
|
test_files:
|
360
359
|
- test/test_attribute_manager.rb
|
@@ -374,6 +373,7 @@ test_files:
|
|
374
373
|
- test/test_rdoc_markup.rb
|
375
374
|
- test/test_rdoc_markup_attribute_manager.rb
|
376
375
|
- test/test_rdoc_markup_document.rb
|
376
|
+
- test/test_rdoc_markup_formatter.rb
|
377
377
|
- test/test_rdoc_markup_indented_paragraph.rb
|
378
378
|
- test/test_rdoc_markup_paragraph.rb
|
379
379
|
- test/test_rdoc_markup_parser.rb
|
metadata.gz.sig
CHANGED
Binary file
|