Sha256: ce3bb640b68fcc19a8d1db90df8e39fbb2d09c6ba8581d56f1051e555192dd6b
Contents?: true
Size: 911 Bytes
Versions: 5
Compression:
Stored size: 911 Bytes
Contents
module Rake::Funnel::Support::AssemblyVersion class FromVersionFiles include Rake::Funnel::Support include Enumerable attr_reader :search_pattern, :build_number, :sha def initialize(args = {}) @search_pattern = args[:search_pattern] || %w(**/VERSION) @build_number = args[:build_number] @sha = args[:sha] end def each block_given? or return enum_for(__method__) files.each do |file| Rake.rake_output_message("Reading #{file}") version_info = VersionInfo.parse({ version: VersionInfo.read_version_from(file), build_number: build_number, sha: sha }) yield({ source: file, version_info: version_info }) end end private def files Finder.new(search_pattern, self, 'No version files found.').all_or_default end end end
Version data entries
5 entries across 5 versions & 1 rubygems