21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
# File 'lib/hoe/ignore.rb', line 21
def check_manifest
dirs, fmatch = File.read(".hoeignore").split("\n").partition { |x| x[-1,1] == "/" }
f = "Manifest.tmp"
require 'find'
files = []
with_config do |config, _|
exclusions = config["exclude"]
Find.find '.' do |path|
if File.directory? path
Find.prune if dirs.index("#{path[2..-1]}/")
next
end
next unless File.file? path
next if fmatch.find { |x| File.fnmatch?(x, path[2..-1]) }
files << path[2..-1]
end
files = files.sort.join "\n"
File.open f, 'w' do |fp| fp.puts files end
verbose = { :verbose => Rake.application.options.verbose }
begin
sh "#{Hoe::Debug::DIFF} -du Manifest.txt #{f}", verbose
ensure
rm f, verbose
end
end
end
|