From bd5efa7ff6e790a07c8eaa6221e9f063d5e3e3b0 Mon Sep 17 00:00:00 2001 From: drbrain Date: Tue, 5 Feb 2013 08:24:20 +0000 Subject: * lib/rdoc/servlet.rb: Fixed root search paths, filesystem paths instead of HTTP paths were returned. * test/rdoc/test_rdoc_servlet.rb: Test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/rdoc/servlet.rb | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) (limited to 'lib') diff --git a/lib/rdoc/servlet.rb b/lib/rdoc/servlet.rb index 4fe2f139cc..1dca7596db 100644 --- a/lib/rdoc/servlet.rb +++ b/lib/rdoc/servlet.rb @@ -326,21 +326,25 @@ version. If you're viewing Ruby's documentation, include the version of ruby. search_index << name - comment = case type - when :gem - gemspec = path.gsub(%r%/doc/([^/]*?)/ri$%, - '/specifications/\1.gemspec') - - spec = Gem::Specification.load gemspec - - spec.summary - when :system then - 'Documentation for the Ruby standard library' - when :site then - 'Documentation for non-gem libraries' - when :home then - 'Documentation from your home directory' - end + case type + when :gem + gemspec = path.gsub(%r%/doc/([^/]*?)/ri$%, + '/specifications/\1.gemspec') + + spec = Gem::Specification.load gemspec + + path = spec.full_name + comment = spec.summary + when :system then + path = 'ruby' + comment = 'Documentation for the Ruby standard library' + when :site then + path = 'site' + comment = 'Documentation for non-gem libraries' + when :home then + path = 'home' + comment = 'Documentation from your home directory' + end info << [name, '', path, '', comment] end -- cgit v1.2.3