summaryrefslogtreecommitdiff
path: root/lib/rubygems/commands
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-10-22 00:27:02 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-10-22 00:27:02 +0000
commit615ac3593499f54fde4b1eb0fba66b6bd944821b ()
tree1f0b0e97ee3dd51798658d53cee7eec976a83a97 /lib/rubygems/commands
parentff31b35f6a66f3c1548e3356d506ff65a574be7f (diff)
Merge rubygems master branch from .com/rubygems/rubygems.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--lib/rubygems/commands/build_command.rb6
-rw-r--r--lib/rubygems/commands/cert_command.rb16
-rw-r--r--lib/rubygems/commands/help_command.rb8
-rw-r--r--lib/rubygems/commands/setup_command.rb6
-rw-r--r--lib/rubygems/commands/uninstall_command.rb2
-rw-r--r--lib/rubygems/commands/update_command.rb6
6 files changed, 22 insertions, 22 deletions
@@ -55,7 +55,11 @@ with gem spec:
spec = Gem::Specification.load File.basename(gemspec)
if spec then
- Gem::Package.build spec, options[:force], options[:strict]
else
alert_error "Error loading gemspec. Aborting."
terminate_interaction 1
@@ -149,15 +149,15 @@ class Gem::Commands::CertCommand < Gem::Command
end
def build_cert email, key # :nodoc:
- expiration_length_days = options[:expiration_length_days]
- age =
- if expiration_length_days.nil? || expiration_length_days == 0
- Gem::Security::ONE_YEAR
- else
- Gem::Security::ONE_DAY * expiration_length_days
- end
- cert = Gem::Security.create_cert_email email, key, age
Gem::Security.write cert, "gem-public_cert.pem"
end
@@ -4,7 +4,7 @@ require 'rubygems/command'
class Gem::Commands::HelpCommand < Gem::Command
# :stopdoc:
- EXAMPLES = <<-EOF
Some examples of 'gem' usage.
* Install 'rake', either from local directory or remote server:
@@ -53,7 +53,7 @@ Some examples of 'gem' usage.
gem update --system
EOF
- GEM_DEPENDENCIES = <<-EOF
A gem dependencies file allows installation of a consistent set of gems across
multiple environments. The RubyGems implementation is designed to be
compatible with Bundler's Gemfile format. You can see additional
@@ -230,7 +230,7 @@ default. This may be overridden with the :development_group option:
EOF
- PLATFORMS = <<-'EOF'
RubyGems platforms are composed of three parts, a CPU, an OS, and a
version. These values are taken from values in rbconfig.rb. You can view
your current platform by running `gem environment`.
@@ -277,7 +277,7 @@ platform.
["examples", EXAMPLES],
["gem_dependencies", GEM_DEPENDENCIES],
["platforms", PLATFORMS],
- ]
# :startdoc:
def initialize
@@ -9,7 +9,7 @@ class Gem::Commands::SetupCommand < Gem::Command
HISTORY_HEADER = /^===\s*[\d.a-zA-Z]+\s*\/\s*\d{4}-\d{2}-\d{2}\s*$/
VERSION_MATCHER = /^===\s*([\d.a-zA-Z]+)\s*\/\s*\d{4}-\d{2}-\d{2}\s*$/
- ENV_PATHS = %w[/usr/bin/env /bin/env]
def initialize
require 'tmpdir'
@@ -84,8 +84,8 @@ class Gem::Commands::SetupCommand < Gem::Command
add_option '--[no-]regenerate-binstubs',
'Regenerate gem binstubs' do |value, options|
- options[:regenerate_binstubs] = value
- end
add_option('-E', '--[no-]env-shebang',
'Rewrite executables with a shebang',
@@ -20,7 +20,7 @@ class Gem::Commands::UninstallCommand < Gem::Command
add_option('-a', '--[no-]all',
'Uninstall all matching versions'
- ) do |value, options|
options[:all] = value
end
@@ -168,12 +168,8 @@ command to remove old versions.
Dir.chdir update_dir do
say "Installing RubyGems #{version}"
- # Make sure old rubygems isn't loaded
- old = ENV["RUBYOPT"]
- ENV.delete("RUBYOPT") if old
- installed = system Gem.ruby, 'setup.rb', *args
say "RubyGems system software updated" if installed
- ENV["RUBYOPT"] = old if old
end
end