lib/reap/class/manifest.rb in reap-6.0.0 vs lib/reap/class/manifest.rb in reap-6.0.1
- old
+ new
@@ -26,36 +26,32 @@
include TaskUtils
MUST_EXCLUDE = [ 'InstalledFiles', '**/CVS/**/*', '**/*~' ] #, 'dist', 'pkg' ]
- # Note that ++dir++ is not offset by ++trunk++. But ++include++ and ++exclude++ are offset.
+ attr_accessor :dir, :include, :exclude
- attr_accessor :trunk, :dir, :include, :exclude
-
def initialize( man )
@dir = '.'
@include = ['**/*']
@exclude = []
super
- @trunk = '.' unless @trunk
@exclude |= MUST_EXCLUDE
end
# Generate manifest file.
def generate #( type=nil )
manifest_file = File.join( File.expand_path( @dir ), 'MANIFEST' )
package_files = FileList.new
- Dir.chdir( @trunk ) do
- package_files.include(*@include)
- package_files.exclude(*@exclude) #if @exclude and not @exclude.empty?
- File.open( manifest_file, 'w+') do |f|
- package_files.each do |pf|
- f << "#{salt(pf)} #{pf}\n" if File.file?(pf)
- end
+
+ package_files.include(*@include)
+ package_files.exclude(*@exclude) #if @exclude and not @exclude.empty?
+ File.open( manifest_file, 'w+') do |f|
+ package_files.each do |pf|
+ f << "#{salt(pf)} #{pf}\n" if File.file?(pf)
end
end
end
alias_method :call, :generate