summaryrefslogtreecommitdiff
path: root/lib/rubygems/install_update_options.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-06-09 21:38:59 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-06-09 21:38:59 +0000
commit31c94ffeb5f09d09ac2c86fc9e6614e38251a43d (patch)
tree10e44506238c7af3d7c9d822111996731726e38d /lib/rubygems/install_update_options.rb
parenta6afbaeb3be396c0fdea3b9077d9256c59edcfca (diff)
Update to RubyGems 1.3.4 r2223
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/install_update_options.rb')
-rw-r--r--lib/rubygems/install_update_options.rb14
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/rubygems/install_update_options.rb b/lib/rubygems/install_update_options.rb
index dd35acb176..a43a2a171c 100644
--- a/lib/rubygems/install_update_options.rb
+++ b/lib/rubygems/install_update_options.rb
@@ -9,9 +9,12 @@ require 'rubygems/security'
##
# Mixin methods for install and update options for Gem::Commands
+
module Gem::InstallUpdateOptions
+ ##
# Add the install/update options to the option parser.
+
def add_install_update_options
OptionParser.accept Gem::Security::Policy do |value|
value = Gem::Security::Policies[value]
@@ -92,7 +95,7 @@ module Gem::InstallUpdateOptions
add_option(:"Install/Update", '--[no-]user-install',
'Install in user\'s home directory instead',
- 'of GEM_HOME. Defaults to using home directory',
+ 'of GEM_HOME. Defaults to using home',
'only if GEM_HOME is not writable.') do |value, options|
options[:user_install] = value
end
@@ -102,9 +105,18 @@ module Gem::InstallUpdateOptions
"dependencies") do |value, options|
options[:development] = true
end
+
+ add_option(:"Install/Update", "--prerelease",
+ "Install prerelease versions of a gem if",
+ "available. Defaults to skipping",
+ "prereleases.") do |value, options|
+ options[:prerelease] = true
+ end
end
+ ##
# Default options for the gem install command.
+
def install_update_defaults_str
'--rdoc --no-force --no-test --wrappers'
end