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

Version Path
albacore-2.6.0 ./lib/albacore/paket.rb
albacore-2.5.14 ./lib/albacore/paket.rb
albacore-2.5.13 ./lib/albacore/paket.rb
albacore-2.5.11 ./lib/albacore/paket.rb
albacore-2.5.10 ./lib/albacore/paket.rb
albacore-2.5.9 ./lib/albacore/paket.rb
albacore-2.5.8 ./lib/albacore/paket.rb
albacore-2.5.6 lib/albacore/paket.rb
albacore-2.5.5 lib/albacore/paket.rb
albacore-2.5.4 lib/albacore/paket.rb
albacore-2.5.3 lib/albacore/paket.rb
albacore-2.5.2 lib/albacore/paket.rb
albacore-2.5.1 lib/albacore/paket.rb
albacore-2.5.0 lib/albacore/paket.rb
albacore-2.4.3 lib/albacore/paket.rb
albacore-2.4.2 lib/albacore/paket.rb
albacore-2.4.1 lib/albacore/paket.rb
albacore-2.4.0 lib/albacore/paket.rb