Sha256: eb69ede21955297b5fcc6e8a7dab67cc739fcd564c21aacdc83535062ae4bdda
Contents?: true
Size: 333 Bytes
Versions: 12
Compression:
Stored size: 333 Bytes
Contents
require "json" require "open-uri" class LatestInSpecVersion # fetches the latest version from rubygems server def latest uri = URI("https://rubygems.org/api/v1/gems/inspec.json") inspec_info = JSON.parse(uri.read(open_timeout: 1.5, read_timeout: 1.5)) inspec_info["version"] rescue StandardError nil end end
Version data entries
12 entries across 12 versions & 2 rubygems