Created
August 31, 2012 00:41
-
-
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)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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