Method: Gem::Commands::InfoCommand#execute

Defined in:
lib/rubygems_plugin.rb

#executeObject



108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
# File 'lib/rubygems_plugin.rb', line 108

def execute
  begin
    GemInfo::Runner.run(options, *options[:args])
  rescue GemInfo::UsageError
    STDERR.puts "USAGE: #{usage}"
    terminate_interaction(1)
  rescue GemInfo::Error => e
    STDERR.puts e.message
    terminate_interaction(1)
  rescue Object => e
    puts "Unexpected error!  Debug with DEBUG=1"
    if ENV['DEBUG']
      STDERR.puts "#{exception.class}: #{exception.message}"
      exception.backtrace.each do |line|
        STDERR.puts "  #{line}"
      end
    end
    raise
  end
end