Skip to content

Instantly share code, notes, and snippets.

@mpapis
Created August 31, 2012 00:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mpapis/3546691 to your computer and use it in GitHub Desktop.
Save mpapis/3546691 to your computer and use it in GitHub Desktop.
A ruby script to check latest available version of rvm (github tags api)
require 'open-uri'
require 'json'
open("https://api.github.com/repos/wayneeseguin/rvm/git/refs/tags") do |temp|
puts JSON.parse(temp.read).map do |line|
line["ref"].gsub(/.*\//,"").split(".").map(&:to_i)
end.sort.last.join(".")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment