1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/rubygems/commands/rdoc_command.rb: When overwriting

documentation, remove existing documentation first.

* lib/rubygems/server.rb:  Fixed documentation links.
* test/rubygems/test_gem_server.rb:  Test for the above.

* lib/rubygems/rdoc.rb:  Reduced diff with RDoc::RubyGemsHook
* test/rubygems/test_gem_rdoc.rb:  ditto


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
drbrain 2012-12-14 05:09:37 +00:00
parent 497f8904cb
commit 1dfe3d93fa
6 changed files with 145 additions and 95 deletions

View file

@ -1,6 +1,7 @@
require 'rubygems/command'
require 'rubygems/version_option'
require 'rubygems/rdoc'
require 'fileutils'
class Gem::Commands::RdocCommand < Gem::Command
include Gem::VersionOption
@ -72,6 +73,11 @@ The rdoc command builds RDoc and RI documentation for installed gems. Use
doc.force = options[:overwrite]
if options[:overwrite] then
FileUtils.rm_rf File.join(spec.doc_dir, 'ri')
FileUtils.rm_rf File.join(spec.doc_dir, 'rdoc')
end
begin
doc.generate
rescue Errno::ENOENT => e