Sha256: 10076d007cd25baa0dfda5ca5a9d93aeba9f49b90c1d3a9ec784a24481f27df7

Contents?: true

Size: 464 Bytes

Versions: 13

Compression:

Stored size: 464 Bytes

Contents

N = 2

task :default => :run

BUILD_DIR = 'build'
task :clean do 
  rm_rf 'build'
  rm_rf 'src'
end

task :run

TARGET_DIR = 'build/copies'

FileList['src/*'].each do |src|
  directory TARGET_DIR
  target = File.join TARGET_DIR, File.basename(src)
  file target => [src, TARGET_DIR] do
    cp src, target
    sleep 3 if src !~ /foo#{N-1}$/
  end
  task :run => target
end

task :prep => :clean do
  mkdir_p 'src'
  N.times do |n|
    touch "src/foo#{n}"
  end
end

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
jimweirich-rake-0.8.1.5 test/data/file_creation_task/Rakefile
jimweirich-rake-0.8.1.6 test/data/file_creation_task/Rakefile
jimweirich-rake-0.8.1.7 test/data/file_creation_task/Rakefile
jimweirich-rake-0.8.1.8 test/data/file_creation_task/Rakefile
jimweirich-rake-0.8.1.9 test/data/file_creation_task/Rakefile
rake-0.7.3 test/data/file_creation_task/Rakefile
rake-0.7.1 test/data/file_creation_task/Rakefile
rake-0.8.1 test/data/file_creation_task/Rakefile
rake-0.8.0 test/data/file_creation_task/Rakefile
rake-0.7.0 test/data/file_creation_task/Rakefile
rake-0.6.0 test/data/file_creation_task/Rakefile
rake-0.6.2 test/data/file_creation_task/Rakefile
rake-0.7.2 test/data/file_creation_task/Rakefile