Sha256: 81314695eb563b39bb03ddbf1ea58f54050908fb633064dc290e50a1d30eaebc
Contents?: true
Size: 678 Bytes
Versions: 18
Compression:
Stored size: 678 Bytes
Contents
require 'ostruct' require 'albacore/semver' module Albacore module Paket def self.parse_line line if (m = line.match /^\s*(?<id>[\w\-\.]+) \((?<ver>[\.\d\w\-]+)\)( - framework: >= (?<tf>\w+))?$/i) ver = Albacore::SemVer.parse(m[:ver], '%M.%m.%p', false) OpenStruct.new(:id => m[:id], :version => m[:ver], :target_framework => m[:tf] || 'net40', :semver => ver) end end def self.parse_paket_lock data data.map { |line| parse_line line }. compact. map { |package| [package.id, package] } end end end
Version data entries
18 entries across 18 versions & 1 rubygems