Skip to content

Commit d9cc9a2

Browse files
author
Zachary Scott
committed
Merge pull request ruby#365 from postmodern/doc_dir
Changed the default output directory of the rdoc task to 'doc'.
2 parents aa82272 + 1ad9178 commit d9cc9a2

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

lib/rdoc/task.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ class RDoc::Task < Rake::TaskLib
107107
attr_accessor :markup
108108

109109
##
110-
# Name of directory to receive the html output files. (default is "html")
110+
# Name of directory to receive the html output files. (default is "doc")
111111

112112
attr_accessor :rdoc_dir
113113

@@ -192,7 +192,7 @@ def clobber_task_description
192192
def defaults
193193
@name = :rdoc
194194
@rdoc_files = Rake::FileList.new
195-
@rdoc_dir = 'html'
195+
@rdoc_dir = 'doc'
196196
@main = nil
197197
@title = nil
198198
@template = nil

test/test_rdoc_task.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,15 @@ def test_markup_option
4141
rd.markup = "tomdoc"
4242
end
4343

44-
assert_equal %w[-o html --markup tomdoc], rdoc_task.option_list
44+
assert_equal %w[-o doc --markup tomdoc], rdoc_task.option_list
4545
end
4646

4747
def test_tasks_creation
4848
RDoc::Task.new
4949
assert Rake::Task[:rdoc]
5050
assert Rake::Task[:clobber_rdoc]
5151
assert Rake::Task[:rerdoc]
52-
assert_equal ["html/created.rid"], Rake::Task[:rdoc].prerequisites
52+
assert_equal ["doc/created.rid"], Rake::Task[:rdoc].prerequisites
5353
end
5454

5555
def test_tasks_creation_with_custom_name_symbol
@@ -73,7 +73,7 @@ def test_tasks_option_parser
7373
assert rdoc_task.rdoc_files.include?("README.md")
7474
assert rdoc_task.options.include?("--all")
7575

76-
args = %w[--all -o html --main README.md] << "--title" << "Test Tasks Option Parser" << "README.md"
76+
args = %w[--all -o doc --main README.md] << "--title" << "Test Tasks Option Parser" << "README.md"
7777
assert_equal args, rdoc_task.option_list + rdoc_task.rdoc_files
7878
end
7979

@@ -82,15 +82,15 @@ def test_generator_option
8282
rd.generator = "ri"
8383
end
8484

85-
assert_equal %w[-o html -f ri], rdoc_task.option_list
85+
assert_equal %w[-o doc -f ri], rdoc_task.option_list
8686
end
8787

8888
def test_main_option
8989
rdoc_task = RDoc::Task.new do |rd|
9090
rd.main = "README.md"
9191
end
9292

93-
assert_equal %w[-o html --main README.md], rdoc_task.option_list
93+
assert_equal %w[-o doc --main README.md], rdoc_task.option_list
9494
end
9595

9696
def test_output_dir_option
@@ -158,15 +158,15 @@ def test_template_option
158158
rd.template = "foo"
159159
end
160160

161-
assert_equal %w[-o html -T foo], rdoc_task.option_list
161+
assert_equal %w[-o doc -T foo], rdoc_task.option_list
162162
end
163163

164164
def test_title_option
165165
rdoc_task = RDoc::Task.new do |rd|
166166
rd.title = "Test Title Option"
167167
end
168168

169-
assert_equal %w[-o html] << "--title" << "Test Title Option", rdoc_task.option_list
169+
assert_equal %w[-o doc] << "--title" << "Test Title Option", rdoc_task.option_list
170170
end
171171

172172
end if defined?(Rake::Task)

0 commit comments

Comments
 (0)