Sha256: 3e3485c0ca4ee7c84a2e6ce9aff649f821c64bdae8fa11201a5cf6a4a32aa63d

Contents?: true

Size: 576 Bytes

Versions: 1

Compression:

Stored size: 576 Bytes

Contents

#! /usr/bin/env ruby
# encoding: UTF-8

$:.push File.expand_path("../../lib", __FILE__)

require "latest"

if ARGV.first =~ /^-(v|-version)$/
  puts "Latest v" + Latest::VERSION
else
  ARGV.each_with_index do |name, index|
    print name + " "
    begin
      gem = Latest.lookup(name)
      if ARGV[index + 1] == "--pre"
        ARGV.slice!(index + 1, 1)
        print "--pre "
        puts gem.last_prerelease_version
      else
        puts gem.last_stable_version
      end
    rescue Latest::GemNotFoundError => e
      print "<- "
      puts e.message
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
latest-0.2.0 bin/latest