summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--lib/rdoc/servlet.rb34
-rw-r--r--test/rdoc/test_rdoc_servlet.rb2
3 files changed, 26 insertions, 16 deletions
diff --git a/ChangeLog b/ChangeLog
index d8e85345f3..b6e7805a8f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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'],
],
}