aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rdoc/servlet.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-01-23 01:02:24 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-01-23 01:02:24 +0000
commit5864dbc9f16ea388f0038669c86ac79f2a0ac432 (patch)
treed602899b4f3f2f1465688123acd05dce7ad9fe84 /lib/rdoc/servlet.rb
parent95548d9dc32238fc2134ceefb7efd8450fe793d7 (diff)
downloadruby-5864dbc9f16ea388f0038669c86ac79f2a0ac432.tar.gz
* lib/rdoc/servlet.rb: Fixed display of site and home documentation.
Fixes rdoc issue #170 by Thomas Leitner. * test/rdoc/test_rdoc_servlet.rb: Test for above. * lib/rdoc/code_object.rb: Split #initialize_visibility from #initialize for reuse when loading a stored object. Fixes rdoc issue #171 by Thomas Leitner. * lib/rdoc/any_method.rb: Initialize visibility for #display? For rdoc issue #171 * lib/rdoc/attr.rb: ditto. * lib/rdoc/class_module.rb: ditto. * lib/rdoc/top_level.rb: ditto. * test/rdoc/test_rdoc_any_method.rb: Test for above. * test/rdoc/test_rdoc_attr.rb: ditto. * test/rdoc/test_rdoc_class_module.rb: ditto. * test/rdoc/test_rdoc_constant.rb: ditto. * test/rdoc/test_rdoc_top_level.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38899 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc/servlet.rb')
-rw-r--r--lib/rdoc/servlet.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/rdoc/servlet.rb b/lib/rdoc/servlet.rb
index 71b2911fc0..4fe2f139cc 100644
--- a/lib/rdoc/servlet.rb
+++ b/lib/rdoc/servlet.rb
@@ -387,8 +387,12 @@ version. If you're viewing Ruby's documentation, include the version of ruby.
def store_for source_name
case source_name
+ when 'home' then
+ RDoc::Store.new RDoc::RI::Paths.home_dir, :home
when 'ruby' then
RDoc::Store.new RDoc::RI::Paths.system_dir, :system
+ when 'site' then
+ RDoc::Store.new RDoc::RI::Paths.site_dir, :site
else
ri_dir, type = ri_paths.find do |dir, dir_type|
next unless dir_type == :gem
@@ -396,7 +400,8 @@ version. If you're viewing Ruby's documentation, include the version of ruby.
source_name == dir[%r%/([^/]*)/ri$%, 1]
end
- raise "could not find ri documentation for #{source_name}" unless
+ raise RDoc::Error,
+ "could not find ri documentation for #{source_name}" unless
ri_dir
RDoc::Store.new ri_dir, type