Sha256: cc159b95425c3a86ee841689154a52ae8f3919d41defec94bc8b2252e72f155d
Contents?: true
Size: 680 Bytes
Versions: 83
Compression:
Stored size: 680 Bytes
Contents
# frozen_string_literal: true class Gem::Resolver::APISet::GemParser def parse(line) version_and_platform, rest = line.split(" ", 2) version, platform = version_and_platform.split("-", 2) dependencies, requirements = rest.split("|", 2).map {|s| s.split(",") } if rest dependencies = dependencies ? dependencies.map {|d| parse_dependency(d) } : [] requirements = requirements ? requirements.map {|d| parse_dependency(d) } : [] [version, platform, dependencies, requirements] end private def parse_dependency(string) dependency = string.split(":") dependency[-1] = dependency[-1].split("&") if dependency.size > 1 dependency end end
Version data entries
83 entries across 83 versions & 1 rubygems