Sha256: 3c13da527da59ef4ceeccbd2f92fbc9d22cf03942980b10d1fd90e8f4fd814f7

Contents?: true

Size: 994 Bytes

Versions: 18

Compression:

Stored size: 994 Bytes

Contents

module Rake
  module Funnel
    module Support
      module AssemblyVersion
        class FromVersionFiles
          include Rake::Funnel::Support
          include Enumerable

          attr_reader :search_pattern, :metadata

          def initialize(args = {})
            @search_pattern = args[:search_pattern] || %w(**/VERSION)
            @metadata = args[:metadata]
          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),
                metadata: metadata
              )

              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
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
rake-funnel-0.18.0 lib/rake/funnel/support/assembly_version/from_version_files.rb
rake-funnel-0.17.0 lib/rake/funnel/support/assembly_version/from_version_files.rb
rake-funnel-0.16.1 lib/rake/funnel/support/assembly_version/from_version_files.rb
rake-funnel-0.16.0 lib/rake/funnel/support/assembly_version/from_version_files.rb
rake-funnel-0.15.0.pre lib/rake/funnel/support/assembly_version/from_version_files.rb
rake-funnel-0.14.0.pre lib/rake/funnel/support/assembly_version/from_version_files.rb
rake-funnel-0.13.0.pre lib/rake/funnel/support/assembly_version/from_version_files.rb
rake-funnel-0.12.0.pre lib/rake/funnel/support/assembly_version/from_version_files.rb
rake-funnel-0.11.0.pre lib/rake/funnel/support/assembly_version/from_version_files.rb
rake-funnel-0.10.0.pre lib/rake/funnel/support/assembly_version/from_version_files.rb
rake-funnel-0.9.1.pre lib/rake/funnel/support/assembly_version/from_version_files.rb
rake-funnel-0.9.0.pre lib/rake/funnel/support/assembly_version/from_version_files.rb
rake-funnel-0.8.0.pre lib/rake/funnel/support/assembly_version/from_version_files.rb
rake-funnel-0.7.0.pre lib/rake/funnel/support/assembly_version/from_version_files.rb
rake-funnel-0.6.1.pre lib/rake/funnel/support/assembly_version/from_version_files.rb
rake-funnel-0.6.0.pre lib/rake/funnel/support/assembly_version/from_version_files.rb
rake-funnel-0.5.0.pre lib/rake/funnel/support/assembly_version/from_version_files.rb
rake-funnel-0.4.0.pre lib/rake/funnel/support/assembly_version/from_version_files.rb