Sha256: 9b1f2987f01c2e183e4f796f2cb25016bdf797f4fc46e892b367f5bebc64e5b2

Contents?: true

Size: 751 Bytes

Versions: 4

Compression:

Stored size: 751 Bytes

Contents

##
# Manifest plugin for hoe.
#
# === Tasks Provided:
#
# manifest::  Recreate the Manifest.txt

module Hoe::Manifest

  ##
  # Define tasks for plugin.
  def define_manifest_tasks
    desc 'Recreate Manifest.txt to include ALL files to be deployed'
    task :manifest => :clean do
      require 'find'
      files = []
      with_config do |config, _|
        exclusions = config["exclude"]
        abort "exclude entry missing from .hoerc. Aborting." if exclusions.nil?
        Find.find '.' do |path|
          next unless File.file? path
          next if path =~ exclusions
          files << path[2..-1]
        end
        files = files.sort.join "\n"
        File.open 'Manifest.txt', 'w' do |fp| fp.puts files end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
newgem-1.5.3 lib/hoe/manifest.rb
newgem-1.5.0 lib/hoe/manifest.rb
newgem-1.5.1 lib/hoe/manifest.rb
newgem-1.5.2 lib/hoe/manifest.rb