rdoc 3.1 → 3.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.
- data.tar.gz.sig +0 -0
- data/.autotest +1 -0
- data/History.txt +11 -1
- data/Manifest.txt +3 -0
- data/README.txt +2 -2
- data/Rakefile +4 -2
- data/lib/rdoc.rb +1 -1
- data/lib/rdoc/options.rb +6 -0
- data/lib/rdoc/rdoc.rb +1 -1
- data/lib/rdoc/task.rb +57 -19
- data/test/test.ja.large.rdoc +3 -0
- data/test/test_rdoc_options.rb +8 -0
- data/test/test_rdoc_rdoc.rb +11 -0
- data/test/test_rdoc_task.rb +25 -6
- metadata +23 -8
- metadata.gz.sig +0 -0
data.tar.gz.sig
CHANGED
Binary file
|
data/.autotest
CHANGED
data/History.txt
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
=== 3.2 / 2010-12-29
|
2
|
+
|
3
|
+
* Minor enhancements
|
4
|
+
* RDoc generator authors may now suppress updating the output dir (creating
|
5
|
+
a created.rid file) by setting RDoc::Options#update_output_dir to false.
|
6
|
+
* RDoc::Task has been refactored to ease creating subclasses.
|
7
|
+
* Bug fixes
|
8
|
+
* RDoc's gitignore now ignores .DS_Store files. Pull Request #3 by Shane
|
9
|
+
Becker.
|
10
|
+
|
1
11
|
=== 3.1 / 2010-12-28
|
2
12
|
|
3
13
|
RDoc has moved to github. Releases after 3.1 reference github unless
|
@@ -27,7 +37,7 @@ otherwise noted.
|
|
27
37
|
* RDoc::Markup::ToHtml#gen_url now initializes #from_path to ''.
|
28
38
|
Additionally, #from_path is now settable. RubyForge bug #27838 by Claus
|
29
39
|
Folke Brobak.
|
30
|
-
* Comments in the C parser
|
40
|
+
* Comments in the C parser are now normalized before being combined.
|
31
41
|
RubyForge patch #28646 by Sven Herzberg.
|
32
42
|
* RDoc::Parser::C no longer requires a comment and finds more method bodies.
|
33
43
|
RubyForge patch #28643 by Sven Herzberg.
|
data/Manifest.txt
CHANGED
@@ -111,6 +111,7 @@ lib/rdoc/top_level.rb
|
|
111
111
|
test/README
|
112
112
|
test/binary.dat
|
113
113
|
test/hidden.zip.txt
|
114
|
+
test/test.ja.large.rdoc
|
114
115
|
test/test.ja.rdoc
|
115
116
|
test/test.ja.txt
|
116
117
|
test/test.txt
|
@@ -151,6 +152,8 @@ test/test_rdoc_require.rb
|
|
151
152
|
test/test_rdoc_ri_driver.rb
|
152
153
|
test/test_rdoc_ri_paths.rb
|
153
154
|
test/test_rdoc_ri_store.rb
|
155
|
+
test/test_rdoc_ruby_lex.rb
|
156
|
+
test/test_rdoc_stats.rb
|
154
157
|
test/test_rdoc_task.rb
|
155
158
|
test/test_rdoc_text.rb
|
156
159
|
test/test_rdoc_top_level.rb
|
data/README.txt
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
= \RDoc - Ruby Documentation System
|
2
2
|
|
3
|
-
* {RDoc Project Page}[
|
3
|
+
* {RDoc Project Page}[https://github.com/rdoc/rdoc/]
|
4
4
|
* {RDoc Documentation}[http://rdoc.rubyforge.org/]
|
5
|
-
* {RDoc Bug Tracker}[
|
5
|
+
* {RDoc Bug Tracker}[https://github.com/rdoc/rdoc/issues]
|
6
6
|
|
7
7
|
== DESCRIPTION:
|
8
8
|
|
data/Rakefile
CHANGED
@@ -17,10 +17,12 @@ Hoe.spec 'rdoc' do
|
|
17
17
|
self.remote_rdoc_dir = ''
|
18
18
|
self.rsync_args = '-avz'
|
19
19
|
self.testlib = :minitest
|
20
|
-
self.isolate_dir = 'tmp/
|
20
|
+
self.isolate_dir = 'tmp/isolate'
|
21
21
|
|
22
22
|
extra_dev_deps << ['minitest', '~> 2']
|
23
23
|
extra_dev_deps << ['isolate', '~> 3']
|
24
|
+
extra_dev_deps << ['ZenTest', '~> 4'] # for autotest/isolate
|
25
|
+
|
24
26
|
extra_rdoc_files << 'Rakefile'
|
25
27
|
spec_extras['required_rubygems_version'] = '>= 1.3'
|
26
28
|
spec_extras['homepage'] = 'http://rdoc.rubyforge.org'
|
@@ -58,7 +60,7 @@ diff_options = "-urpN --exclude '*svn*' --exclude '*swp' --exclude '*rbc'"
|
|
58
60
|
rsync_options = "-avP --exclude '*svn*' --exclude '*swp' --exclude '*rbc' --exclude '*.rej' --exclude '*.orig'"
|
59
61
|
|
60
62
|
rubinius_dir = ENV['RUBINIUS_PATH'] || '../../../git/git.rubini.us/code'
|
61
|
-
ruby_dir = ENV['RUBY_PATH'] || '../../ruby/trunk'
|
63
|
+
ruby_dir = ENV['RUBY_PATH'] || '../../svn/ruby/trunk'
|
62
64
|
|
63
65
|
desc "Updates Ruby HEAD with the currently checked-out copy of RDoc."
|
64
66
|
task :update_ruby do
|
data/lib/rdoc.rb
CHANGED
data/lib/rdoc/options.rb
CHANGED
@@ -148,6 +148,11 @@ class RDoc::Options
|
|
148
148
|
|
149
149
|
attr_accessor :title
|
150
150
|
|
151
|
+
##
|
152
|
+
# Should RDoc update the timestamps in the output dir?
|
153
|
+
|
154
|
+
attr_accessor :update_output_dir
|
155
|
+
|
151
156
|
##
|
152
157
|
# Verbosity, zero means quiet
|
153
158
|
|
@@ -188,6 +193,7 @@ class RDoc::Options
|
|
188
193
|
@template = nil
|
189
194
|
@template_dir = nil
|
190
195
|
@title = nil
|
196
|
+
@update_output_dir = true
|
191
197
|
@verbosity = 1
|
192
198
|
@visibility = :protected
|
193
199
|
@webcvs = nil
|
data/lib/rdoc/rdoc.rb
CHANGED
@@ -206,7 +206,7 @@ option)
|
|
206
206
|
# Update the flag file in an output directory.
|
207
207
|
|
208
208
|
def update_output_dir(op_dir, time, last = {})
|
209
|
-
return if @options.dry_run
|
209
|
+
return if @options.dry_run or not @options.update_output_dir
|
210
210
|
|
211
211
|
open output_flag_file(op_dir), "w" do |f|
|
212
212
|
f.puts time.rfc2822
|
data/lib/rdoc/task.rb
CHANGED
@@ -149,17 +149,45 @@ class RDoc::Task < Rake::TaskLib
|
|
149
149
|
# Create an RDoc task with the given name. See the RDoc::Task class overview
|
150
150
|
# for documentation.
|
151
151
|
|
152
|
-
def initialize
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
unless invalid_options.empty? then
|
158
|
-
raise ArgumentError, "invalid options: #{invalid_options.join(", ")}"
|
159
|
-
end
|
160
|
-
end
|
152
|
+
def initialize name = :rdoc # :yield: self
|
153
|
+
defaults
|
154
|
+
|
155
|
+
check_names name
|
161
156
|
|
162
157
|
@name = name
|
158
|
+
|
159
|
+
yield self if block_given?
|
160
|
+
|
161
|
+
define
|
162
|
+
end
|
163
|
+
|
164
|
+
##
|
165
|
+
# Ensures that +names+ only includes names for the :rdoc, :clobber_rdoc and
|
166
|
+
# :rerdoc. If other names are given an ArgumentError is raised.
|
167
|
+
|
168
|
+
def check_names names
|
169
|
+
return unless Hash === names
|
170
|
+
|
171
|
+
invalid_options =
|
172
|
+
names.keys.map { |k| k.to_sym } - [:rdoc, :clobber_rdoc, :rerdoc]
|
173
|
+
|
174
|
+
unless invalid_options.empty? then
|
175
|
+
raise ArgumentError, "invalid options: #{invalid_options.join ', '}"
|
176
|
+
end
|
177
|
+
end
|
178
|
+
|
179
|
+
##
|
180
|
+
# Task description for the clobber rdoc task or its renamed equivalent
|
181
|
+
|
182
|
+
def clobber_task_description
|
183
|
+
"Remove RDoc HTML files"
|
184
|
+
end
|
185
|
+
|
186
|
+
##
|
187
|
+
# Sets default task values
|
188
|
+
|
189
|
+
def defaults
|
190
|
+
@name = :rdoc
|
163
191
|
@rdoc_files = Rake::FileList.new
|
164
192
|
@rdoc_dir = 'html'
|
165
193
|
@main = nil
|
@@ -167,14 +195,12 @@ class RDoc::Task < Rake::TaskLib
|
|
167
195
|
@template = nil
|
168
196
|
@generator = nil
|
169
197
|
@options = []
|
170
|
-
yield self if block_given?
|
171
|
-
define
|
172
198
|
end
|
173
199
|
|
174
200
|
##
|
175
201
|
# All source is inline now. This method is deprecated
|
176
202
|
|
177
|
-
def inline_source
|
203
|
+
def inline_source # :nodoc:
|
178
204
|
warn "RDoc::Task#inline_source is deprecated"
|
179
205
|
true
|
180
206
|
end
|
@@ -190,13 +216,13 @@ class RDoc::Task < Rake::TaskLib
|
|
190
216
|
# Create the tasks defined by this task lib.
|
191
217
|
|
192
218
|
def define
|
193
|
-
desc
|
219
|
+
desc rdoc_task_description
|
194
220
|
task rdoc_task_name
|
195
221
|
|
196
|
-
desc
|
222
|
+
desc rerdoc_task_description
|
197
223
|
task rerdoc_task_name => [clobber_task_name, rdoc_task_name]
|
198
224
|
|
199
|
-
desc
|
225
|
+
desc clobber_task_description
|
200
226
|
task clobber_task_name do
|
201
227
|
rm_r @rdoc_dir rescue nil
|
202
228
|
end
|
@@ -215,11 +241,9 @@ class RDoc::Task < Rake::TaskLib
|
|
215
241
|
@before_running_rdoc.call if @before_running_rdoc
|
216
242
|
args = option_list + @rdoc_files
|
217
243
|
|
218
|
-
if Rake.application.options.trace
|
219
|
-
$stderr.puts "rdoc #{args.join ' '}"
|
220
|
-
end
|
244
|
+
$stderr.puts "rdoc #{args.join ' '}" if Rake.application.options.trace
|
221
245
|
require 'rdoc/rdoc'
|
222
|
-
RDoc::RDoc.new.document
|
246
|
+
RDoc::RDoc.new.document args
|
223
247
|
end
|
224
248
|
|
225
249
|
self
|
@@ -247,6 +271,20 @@ class RDoc::Task < Rake::TaskLib
|
|
247
271
|
@before_running_rdoc = block
|
248
272
|
end
|
249
273
|
|
274
|
+
##
|
275
|
+
# Task description for the rdoc task or its renamed equivalent
|
276
|
+
|
277
|
+
def rdoc_task_description
|
278
|
+
'Build RDoc HTML files'
|
279
|
+
end
|
280
|
+
|
281
|
+
##
|
282
|
+
# Task description for the rerdoc task or its renamed description
|
283
|
+
|
284
|
+
def rerdoc_task_description
|
285
|
+
"Rebuild RDoc HTML files"
|
286
|
+
end
|
287
|
+
|
250
288
|
private
|
251
289
|
|
252
290
|
def rdoc_target
|
@@ -0,0 +1,3 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
吾輩(わがはい)は猫である。名前はまだ無い。
|
3
|
+
どこで生れたかとんと見当(けんとう)がつかぬ。何でも薄暗いじめじめした所でニャーニャー泣いていた事だけは記憶している。吾輩はここで始めて人間というものを見た。しかもあとで聞くとそれは書生という人間中で一番獰悪(どうあく)な種族であったそうだ。この書生というのは時々我々を捕(つかま)えて煮(に)て食うという話である。しかしその当時は何という考もなかったから別段恐しいとも思わなかった。ただ彼の掌(てのひら)に載せられてスーと持ち上げられた時何だかフワフワした感じがあったばかりである。掌の上で少し落ちついて書生の顔を見たのがいわゆる人間というものの見始(みはじめ)であろう。この時妙なものだと思った感じが今でも残っている。第一毛をもって装飾されべきはずの顔がつるつるしてまるで薬缶(やかん)だ。その後(ご)猫にもだいぶ逢(あ)ったがこんな片輪(かたわ)には一度も出会(でく)わした事がない。のみならず顔の真中があまりに突起している。そうしてその穴の中から時々ぷうぷうと煙(けむり)を吹く。どうも咽(む)せぽくて実に弱った。これが人間の飲む煙草(たばこ)というものである事はようやくこの頃知った。
|
data/test/test_rdoc_options.rb
CHANGED
@@ -338,5 +338,13 @@ file 'unreadable' not readable
|
|
338
338
|
RDoc::RDoc::GENERATORS.delete 'TestGenerator'
|
339
339
|
end
|
340
340
|
|
341
|
+
def test_update_output_dir
|
342
|
+
assert @options.update_output_dir
|
343
|
+
|
344
|
+
@options.update_output_dir = false
|
345
|
+
|
346
|
+
refute @options.update_output_dir
|
347
|
+
end
|
348
|
+
|
341
349
|
end
|
342
350
|
|
data/test/test_rdoc_rdoc.rb
CHANGED
@@ -149,6 +149,17 @@ class TestRDocRDoc < MiniTest::Unit::TestCase
|
|
149
149
|
end
|
150
150
|
end
|
151
151
|
|
152
|
+
def test_update_output_dir_dont
|
153
|
+
skip "No Dir::mktmpdir, upgrade your ruby" unless Dir.respond_to? :mktmpdir
|
154
|
+
|
155
|
+
Dir.mktmpdir do |d|
|
156
|
+
@rdoc.options.update_output_dir = false
|
157
|
+
@rdoc.update_output_dir d, Time.now, {}
|
158
|
+
|
159
|
+
refute File.exist? "#{d}/created.rid"
|
160
|
+
end
|
161
|
+
end
|
162
|
+
|
152
163
|
def test_update_output_dir_dry_run
|
153
164
|
skip "No Dir::mktmpdir, upgrade your ruby" unless Dir.respond_to? :mktmpdir
|
154
165
|
|
data/test/test_rdoc_task.rb
CHANGED
@@ -6,25 +6,29 @@ class TestRDocTask < MiniTest::Unit::TestCase
|
|
6
6
|
|
7
7
|
def setup
|
8
8
|
Rake::Task.clear
|
9
|
+
|
10
|
+
@t = RDoc::Task.new
|
9
11
|
end
|
10
12
|
|
11
|
-
def
|
12
|
-
|
13
|
+
def test_clobber_task_description
|
14
|
+
assert_equal 'Remove RDoc HTML files', @t.clobber_task_description
|
15
|
+
end
|
13
16
|
|
17
|
+
def test_inline_source
|
14
18
|
_, err = capture_io do
|
15
|
-
assert t.inline_source
|
19
|
+
assert @t.inline_source
|
16
20
|
end
|
17
21
|
|
18
22
|
assert_equal "RDoc::Task#inline_source is deprecated\n", err
|
19
23
|
|
20
24
|
_, err = capture_io do
|
21
|
-
t.inline_source = false
|
25
|
+
@t.inline_source = false
|
22
26
|
end
|
23
27
|
|
24
28
|
assert_equal "RDoc::Task#inline_source is deprecated\n", err
|
25
29
|
|
26
30
|
capture_io do
|
27
|
-
assert t.inline_source
|
31
|
+
assert @t.inline_source
|
28
32
|
end
|
29
33
|
end
|
30
34
|
|
@@ -51,6 +55,14 @@ class TestRDocTask < MiniTest::Unit::TestCase
|
|
51
55
|
assert_equal %w[-o html -f ri], rdoc_task.option_list
|
52
56
|
end
|
53
57
|
|
58
|
+
def test_rdoc_task_description
|
59
|
+
assert_equal 'Build RDoc HTML files', @t.rdoc_task_description
|
60
|
+
end
|
61
|
+
|
62
|
+
def test_rerdoc_task_description
|
63
|
+
assert_equal 'Rebuild RDoc HTML files', @t.rerdoc_task_description
|
64
|
+
end
|
65
|
+
|
54
66
|
def test_tasks_creation_with_custom_name_string
|
55
67
|
rd = RDoc::Task.new("rdoc_dev")
|
56
68
|
assert Rake::Task[:rdoc_dev]
|
@@ -60,7 +72,14 @@ class TestRDocTask < MiniTest::Unit::TestCase
|
|
60
72
|
end
|
61
73
|
|
62
74
|
def test_tasks_creation_with_custom_name_hash
|
63
|
-
options = {
|
75
|
+
options = {
|
76
|
+
:rdoc => "rdoc",
|
77
|
+
:clobber_rdoc => "rdoc:clean",
|
78
|
+
:rerdoc => "rdoc:force"
|
79
|
+
}
|
80
|
+
|
81
|
+
Rake::Task.clear
|
82
|
+
|
64
83
|
rd = RDoc::Task.new(options)
|
65
84
|
assert Rake::Task[:"rdoc"]
|
66
85
|
assert Rake::Task[:"rdoc:clean"]
|
metadata
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rdoc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 3
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 3
|
8
|
-
-
|
9
|
-
version: "3.
|
8
|
+
- 2
|
9
|
+
version: "3.2"
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Eric Hodel
|
@@ -38,7 +38,7 @@ cert_chain:
|
|
38
38
|
x52qPcexcYZR7w==
|
39
39
|
-----END CERTIFICATE-----
|
40
40
|
|
41
|
-
date: 2010-12-
|
41
|
+
date: 2010-12-29 00:00:00 -08:00
|
42
42
|
default_executable:
|
43
43
|
dependencies:
|
44
44
|
- !ruby/object:Gem::Dependency
|
@@ -102,9 +102,23 @@ dependencies:
|
|
102
102
|
type: :development
|
103
103
|
version_requirements: *id004
|
104
104
|
- !ruby/object:Gem::Dependency
|
105
|
-
name:
|
105
|
+
name: ZenTest
|
106
106
|
prerelease: false
|
107
107
|
requirement: &id005 !ruby/object:Gem::Requirement
|
108
|
+
none: false
|
109
|
+
requirements:
|
110
|
+
- - ~>
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
hash: 11
|
113
|
+
segments:
|
114
|
+
- 4
|
115
|
+
version: "4"
|
116
|
+
type: :development
|
117
|
+
version_requirements: *id005
|
118
|
+
- !ruby/object:Gem::Dependency
|
119
|
+
name: hoe
|
120
|
+
prerelease: false
|
121
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
108
122
|
none: false
|
109
123
|
requirements:
|
110
124
|
- - ">="
|
@@ -116,7 +130,7 @@ dependencies:
|
|
116
130
|
- 0
|
117
131
|
version: 2.7.0
|
118
132
|
type: :development
|
119
|
-
version_requirements: *
|
133
|
+
version_requirements: *id006
|
120
134
|
description: |-
|
121
135
|
RDoc produces HTML and command-line documentation for Ruby projects. RDoc
|
122
136
|
includes the +rdoc+ and +ri+ tools for generating and displaying online
|
@@ -254,6 +268,7 @@ files:
|
|
254
268
|
- test/README
|
255
269
|
- test/binary.dat
|
256
270
|
- test/hidden.zip.txt
|
271
|
+
- test/test.ja.large.rdoc
|
257
272
|
- test/test.ja.rdoc
|
258
273
|
- test/test.ja.txt
|
259
274
|
- test/test.txt
|
@@ -294,13 +309,13 @@ files:
|
|
294
309
|
- test/test_rdoc_ri_driver.rb
|
295
310
|
- test/test_rdoc_ri_paths.rb
|
296
311
|
- test/test_rdoc_ri_store.rb
|
312
|
+
- test/test_rdoc_ruby_lex.rb
|
313
|
+
- test/test_rdoc_stats.rb
|
297
314
|
- test/test_rdoc_task.rb
|
298
315
|
- test/test_rdoc_text.rb
|
299
316
|
- test/test_rdoc_top_level.rb
|
300
317
|
- test/xref_data.rb
|
301
318
|
- test/xref_test_case.rb
|
302
|
-
- test/test_rdoc_ruby_lex.rb
|
303
|
-
- test/test_rdoc_stats.rb
|
304
319
|
has_rdoc: true
|
305
320
|
homepage: http://rdoc.rubyforge.org
|
306
321
|
licenses: []
|
metadata.gz.sig
CHANGED
Binary file
|