check_release.rb 254 B

123456789101112
  1. #!/usr/bin/env ruby
  2. require 'net/http'
  3. require "open-uri"
  4. require "json"
  5. apiurl = "http://moodle.ngtech.co.il/squid/squid-version-api/versions.cgi"
  6. uri = URI(apiurl)
  7. response = Net::HTTP.get(uri)
  8. versions = JSON.parse(response)
  9. puts versions[ARGV[0]]