mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Import RubyGems 1.1.0
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
dc8359969e
commit
8cc45aae94
82 changed files with 5776 additions and 2928 deletions
|
@ -25,19 +25,18 @@ class Gem::Commands::EnvironmentCommand < Gem::Command
|
|||
def execute
|
||||
out = ''
|
||||
arg = options[:args][0]
|
||||
if begins?("packageversion", arg) then
|
||||
case arg
|
||||
when /^packageversion/ then
|
||||
out << Gem::RubyGemsPackageVersion
|
||||
elsif begins?("version", arg) then
|
||||
when /^version/ then
|
||||
out << Gem::RubyGemsVersion
|
||||
elsif begins?("gemdir", arg) then
|
||||
when /^gemdir/, /^gemhome/, /^home/, /^GEM_HOME/ then
|
||||
out << Gem.dir
|
||||
elsif begins?("gempath", arg) then
|
||||
out << Gem.path.join("\n")
|
||||
elsif begins?("remotesources", arg) then
|
||||
when /^gempath/, /^path/, /^GEM_PATH/ then
|
||||
out << Gem.path.join(File::PATH_SEPARATOR)
|
||||
when /^remotesources/ then
|
||||
out << Gem.sources.join("\n")
|
||||
elsif arg then
|
||||
fail Gem::CommandLineError, "Unknown enviroment option [#{arg}]"
|
||||
else
|
||||
when nil then
|
||||
out = "RubyGems Environment:\n"
|
||||
|
||||
out << " - RUBYGEMS VERSION: #{Gem::RubyGemsVersion} (#{Gem::RubyGemsPackageVersion})\n"
|
||||
|
@ -75,6 +74,9 @@ class Gem::Commands::EnvironmentCommand < Gem::Command
|
|||
Gem.sources.each do |s|
|
||||
out << " - #{s}\n"
|
||||
end
|
||||
|
||||
else
|
||||
fail Gem::CommandLineError, "Unknown enviroment option [#{arg}]"
|
||||
end
|
||||
say out
|
||||
true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue