Sha256: 99da14a638e4948b2d643748f4a0410702fcc51aaba459b2065058ed2b1652a0
Contents?: true
Size: 739 Bytes
Versions: 57
Compression:
Stored size: 739 Bytes
Contents
# -*- encoding: utf-8 -*- require 'albacore/logging' require 'albacore/package' module Albacore # a package repository is a location where the nugets or wraps are stored class PackageRepo include Logging # initialize that package repository with a path to all the packages def initialize path @paths = (path.respond_to?(:map) ? path : [ path ]) || [] end # find the latest package based on the package id def find_latest pkg_id @paths.map do |path| trace "finding latest from #{path}, id: #{pkg_id}" sorted = Dir.glob(File.join(path, "#{pkg_id}*/**/*.dll")) # find the latest path = sorted.first Package.new pkg_id, path end.compact.first end end end
Version data entries
57 entries across 57 versions & 1 rubygems