summaryrefslogtreecommitdiff
path: root/lib/rubygems/commands/environment_command.rb
diff options
context:
space:
mode:
-rw-r--r--lib/rubygems/commands/environment_command.rb20
1 files changed, 11 insertions, 9 deletions
@@ -25,19 +25,18 @@ class Gem::Commands::EnvironmentCommand < Gem::Command
def execute
out = ''
arg = options[:args][0]
- if begins?("packageversion", arg) then
out << Gem::RubyGemsPackageVersion
- elsif begins?("version", arg) then
out << Gem::RubyGemsVersion
- elsif begins?("gemdir", arg) then
out << Gem.dir
- elsif begins?("gempath", arg) then
- out << Gem.path.join("\n")
- elsif begins?("remotesources", arg) then
out << Gem.sources.join("\n")
- elsif arg then
- fail Gem::CommandLineError, "Unknown enviroment option [#{arg}]"
- else
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
end
say out
true