Sha256: 8713ab55f22481d50d74b89e34dff2a04c6feebde601e289f1331bcf1b17f5c8
Contents?: true
Size: 941 Bytes
Versions: 3
Compression:
Stored size: 941 Bytes
Contents
# $Id$ require 'find' namespace :manifest do desc 'Verify the manifest' task :check do fn = 'Manifest.tmp' files = [] exclude = Regexp.new(PROJ.exclude.join('|')) Find.find '.' do |path| path.sub! %r/^(\.\/|\/)/o, '' next unless test ?f, path next if path =~ exclude files << path end File.open(fn, 'w') {|fp| fp.puts files.sort} system "#{DIFF} -du Manifest.txt #{fn}" rm fn rescue nil end desc 'Create a new manifest' task :create do fn = 'Manifest.txt' files = [] exclude = Regexp.new(PROJ.exclude.join('|')) Find.find '.' do |path| path.sub! %r/^(\.\/|\/)/o, '' next unless test ?f, path next if path =~ exclude files << path end files << fn unless test ?f, fn File.open(fn, 'w') {|fp| fp.puts files.sort} end end # namespace :manifest desc 'Alias to manifest:check' task :manifest => 'manifest:check' # EOF
Version data entries
3 entries across 3 versions & 3 rubygems
Version | Path |
---|---|
bones-1.3.1 | data/tasks/manifest.rake |
rmmseg-0.1.1 | tasks/manifest.rake |
webby-0.7.2 | tasks/manifest.rake |