module Bundler::CLI::Common

def self.ask_for_spec_from(specs)

def self.ask_for_spec_from(specs)
  specs.each_with_index do |spec, index|
    Bundler.ui.info "#{index.succ} : #{spec.name}", true
  end
  Bundler.ui.info "0 : - exit -", true
  num = Bundler.ui.ask("> ").to_i
  num > 0 ? specs[num - 1] : nil
end