lib/tmg/cli/version.rb
# Displays the latest versions of gems
Displays the latest versions of gems
Displays the latest versions of gems
def version(*gems)
      (puts 'No gems provided'.red.bold; exit ) if gems.empty?
      gems_versions = {}
      gems.each do |gem_name|
        gems_versions[gem_name] = Thread.new {
          Thread.current[gem_name] = Gems.latest_version(gem_name)['version']
        }
      end
      puts "\nGems:".upcase.yellow.bold
      gems_versions.each do |gem_name, version|
        version.join
        if version[gem_name] != 'unknown'
          puts '✔ '.green.bold + gem_name.bold + ' → '.green.bold + version[gem_name].green
        else
          puts "✘ #{gem_name} → ".red.bold + version[gem_name].yellow if options[:invalid]
        end
      end
      puts
    end
def version ( * gems ) ( puts 'No gems provided' . red . bold ; exit ) if gems . empty? gems_versions = { } gems . each do | gem_name | gems_versions [ gem_name ] = Thread . new { Thread . current [ gem_name ] = Gems . latest_version ( gem_name ) [ 'version' ] } end puts "\nGems:" . upcase . yellow . bold gems_versions . each do | gem_name , version | version . join if version [ gem_name ] != 'unknown' puts '✔ '.g r een.b o ld + g m_name.b o ld + ' → '.gre e n.bol d  + v r ion[gem _ name].gr e e n else puts "✘ #{gem_name} → ".red . bol d  + v r ion[gem _ name].ye l l ow if  pt ons[:in v alid] end end puts end
Displays the latest versions of gems
Displays the latest versions of gems
gems