diff options
-rw-r--r-- | lib/rubygems/commands/help_command.rb | 219 |
1 files changed, 199 insertions, 20 deletions
@@ -52,6 +52,183 @@ Some examples of 'gem' usage. gem update --system 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 @@ -90,6 +267,16 @@ When building platform gems, set the platform in the gem specification to Gem::Platform::CURRENT. This will correctly mark the gem with your ruby's platform. EOF # :startdoc: def initialize @@ -98,15 +285,6 @@ platform. @command_manager = Gem::CommandManager.instance end - def arguments # :nodoc: - args = <<-EOF - commands List all 'gem' commands - examples Show examples of 'gem' usage - <command> Show specific help for <command> - EOF - return args.gsub(/^\s+/, '') - end - def usage # :nodoc: "#{program_name} ARGUMENT" end @@ -114,19 +292,20 @@ platform. def execute arg = options[:args][0] - if begins? "commands", arg then - show_commands - - elsif begins? "options", arg then - say Gem::Command::HELP - - elsif begins? "examples", arg then - say EXAMPLES - elsif begins? "platforms", arg then - say PLATFORMS - elsif options[:help] then show_help elsif arg then |