diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-14 05:09:37 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-14 05:09:37 +0000 |
commit | 1dfe3d93fa5d9ddabae8db067c5705ea6e551442 (patch) | |
tree | f5d79304d50c36811dd97167236e01c69b8cfb5e /lib/rubygems/commands | |
parent | 497f8904cb3f90a3abf5340a129811aceb96ee33 (diff) | |
download | ruby-1dfe3d93fa5d9ddabae8db067c5705ea6e551442.tar.gz |
* 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
Diffstat (limited to 'lib/rubygems/commands')
-rw-r--r-- | lib/rubygems/commands/rdoc_command.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/rubygems/commands/rdoc_command.rb b/lib/rubygems/commands/rdoc_command.rb index 9bb07245cd..df00f3a5df 100644 --- a/lib/rubygems/commands/rdoc_command.rb +++ b/lib/rubygems/commands/rdoc_command.rb @@ -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 |