Sha256: be4ddca741459fd217c4a48a6938d249f0af56e35314b69ba9a7cca84b02c611
Contents?: true
Size: 470 Bytes
Versions: 7
Compression:
Stored size: 470 Bytes
Contents
require 'rexml/document' module Latest class RubiniusRetriever include REXML def retrieve(rbx) page = Net::HTTP.get(URI(rbx.source)) xml = Document.new(page) all_versions = XPath.match(xml, '//Contents//Key').map(&:text) candidates = all_versions.find_all { |v| v =~ /\Arubinius-/ } stables = candidates.flat_map { |v| v.scan(/-(\d\.\d\.\d)\.tar/) }.flatten stables.map { |v| RubyVersion.new(v) }.max end end end
Version data entries
7 entries across 7 versions & 1 rubygems