diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-02-05 08:24:20 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-02-05 08:24:20 +0000 |
commit | bd5efa7ff6e790a07c8eaa6221e9f063d5e3e3b0 (patch) | |
tree | 8ec32d8d40f0094a2e2518afecdea44342fe5deb | |
parent | 627a08251c2b2dab312307c0e9c51774c34ef016 (diff) |
* 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
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | lib/rdoc/servlet.rb | 34 | ||||
-rw-r--r-- | test/rdoc/test_rdoc_servlet.rb | 2 |
3 files changed, 26 insertions, 16 deletions
@@ -1,3 +1,9 @@ +Tue Feb 5 17:24:02 2013 Eric Hodel <drbrain@segment7.net> + + * 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. + Tue Feb 5 16:37:00 2013 Eric Hodel <drbrain@segment7.net> * lib/rubygems/config_file.rb: Ignore permissions check on windows. 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 diff --git a/test/rdoc/test_rdoc_servlet.rb b/test/rdoc/test_rdoc_servlet.rb index 7072a7dd86..3840c544aa 100644 --- a/test/rdoc/test_rdoc_servlet.rb +++ b/test/rdoc/test_rdoc_servlet.rb @@ -365,7 +365,7 @@ class TestRDocServlet < RDoc::TestCase Ruby\ Documentation ], 'info' => [ - ['Ruby Documentation', '', @system_dir, '', + ['Ruby Documentation', '', 'ruby', '', 'Documentation for the Ruby standard library'], ], } |