ruby-changes:27019
From: drbrain <ko1@a...>
Date: Tue, 5 Feb 2013 17:24:32 +0900 (JST)
Subject: [ruby-changes:27019] drbrain:r39071 (trunk): * lib/rdoc/servlet.rb: Fixed root search paths, filesystem paths
drbrain 2013-02-05 17:24:20 +0900 (Tue, 05 Feb 2013) New Revision: 39071 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=39071 Log: * 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. Modified files: trunk/ChangeLog trunk/lib/rdoc/servlet.rb trunk/test/rdoc/test_rdoc_servlet.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 39070) +++ ChangeLog (revision 39071) @@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Tue Feb 5 17:24:02 2013 Eric Hodel <drbrain@s...> + + * 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@s...> * lib/rubygems/config_file.rb: Ignore permissions check on windows. Index: lib/rdoc/servlet.rb =================================================================== --- lib/rdoc/servlet.rb (revision 39070) +++ lib/rdoc/servlet.rb (revision 39071) @@ -326,21 +326,25 @@ version. If you're viewing Ruby's docum https://github.com/ruby/ruby/blob/trunk/lib/rdoc/servlet.rb#L326 search_index << name - comment = case type - when :gem - gemspec = path.gsub(%r%/doc/([^/]*?)/ri$%, - '/specifications/\1.gemspec') + case type + when :gem + gemspec = path.gsub(%r%/doc/([^/]*?)/ri$%, + '/specifications/\1.gemspec') - spec = Gem::Specification.load 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 + 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 Index: test/rdoc/test_rdoc_servlet.rb =================================================================== --- test/rdoc/test_rdoc_servlet.rb (revision 39070) +++ test/rdoc/test_rdoc_servlet.rb (revision 39071) @@ -365,7 +365,7 @@ class TestRDocServlet < RDoc::TestCase https://github.com/ruby/ruby/blob/trunk/test/rdoc/test_rdoc_servlet.rb#L365 Ruby\ Documentation ], 'info' => [ - ['Ruby Documentation', '', @system_dir, '', + ['Ruby Documentation', '', 'ruby', '', 'Documentation for the Ruby standard library'], ], } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/