Skip to content

Commit 729b62a

Browse files
committed
Fixed rdoc --ri-site
RDoc::Options used the removed RDoc::RI::Paths::SITE_DIR which broke this feature. Now site_dir is used.
1 parent 72ff004 commit 729b62a

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

History.rdoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
Pull request #184 by Carlos Agarie
1515
* RDoc::Servlet no longer ignores extra directories from -d. Pull request
1616
#173 by Thomas Leitner
17+
* Fixed `rdoc --ri-site`. Bug #193 by Michal Papis.
1718

1819
=== 4.0.0 / 2013-02-24
1920

lib/rdoc/options.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -928,7 +928,7 @@ def parse argv
928928
check_generator
929929

930930
@generator_name = "ri"
931-
@op_dir = RDoc::RI::Paths::SITEDIR
931+
@op_dir = RDoc::RI::Paths.site_dir
932932
setup_generator
933933
end
934934

test/test_rdoc_options.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,13 @@ def test_parse_page_dir_root
501501
end
502502
end
503503

504+
def test_parse_ri_site
505+
@options.parse %w[--ri-site]
506+
507+
assert_equal RDoc::Generator::RI, @options.generator
508+
assert_equal RDoc::RI::Paths.site_dir, @options.op_dir
509+
end
510+
504511
def test_parse_root
505512
assert_equal Pathname(Dir.pwd), @options.root
506513

0 commit comments

Comments
 (0)