Sha256: 96be233af6f1d72e56df1538937dc3f65d4eca759868a6f94f65e1a12ed21ef8

Contents?: true

Size: 569 Bytes

Versions: 47

Compression:

Stored size: 569 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}$/   # I'm commenting out this sleep, it doesn't seem to do anything.
  end
  task :run => target
end

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

Version data entries

47 entries across 34 versions & 5 rubygems

Version Path
dirty_history-0.7.3 dirty_history/ruby/1.9.1/gems/rake-0.9.2/test/data/file_creation_task/Rakefile
dirty_history-0.7.2 dirty_history/ruby/1.9.1/gems/rake-0.9.2/test/data/file_creation_task/Rakefile
dirty_history-0.7.1 dirty_history/ruby/1.9.1/gems/rake-0.9.2/test/data/file_creation_task/Rakefile
dirty_history-0.7.0 dirty_history/ruby/1.9.1/gems/rake-0.9.2/test/data/file_creation_task/Rakefile
dirty_history-0.6.7 dirty_history/ruby/1.9.1/gems/rake-0.9.2/test/data/file_creation_task/Rakefile
dirty_history-0.6.6 dirty_history/ruby/1.9.1/gems/rake-0.9.2/test/data/file_creation_task/Rakefile
dirty_history-0.6.5 dirty_history/ruby/1.9.1/gems/rake-0.9.2/test/data/file_creation_task/Rakefile
dirty_history-0.6.4 dirty_history/ruby/1.9.1/gems/rake-0.9.2/test/data/file_creation_task/Rakefile
dirty_history-0.6.3 dirty_history/ruby/1.9.1/gems/rake-0.9.2/test/data/file_creation_task/Rakefile
dirty_history-0.6.2 dirty_history/ruby/1.9.1/gems/rake-0.9.2/test/data/file_creation_task/Rakefile
dirty_history-0.6.1 dirty_history/ruby/1.9.1/gems/rake-0.9.2/test/data/file_creation_task/Rakefile
dirty_history-0.6.0 dirty_history/ruby/1.9.1/gems/rake-0.9.2/test/data/file_creation_task/Rakefile
dirty_history-0.5.4 dirty_history/ruby/1.9.1/gems/rake-0.9.2/test/data/file_creation_task/Rakefile
dirty_history-0.5.3 dirty_history/ruby/1.9.1/gems/rake-0.9.2/test/data/file_creation_task/Rakefile
dirty_history-0.5.2 dirty_history/ruby/1.9.1/gems/dirty_history-0.2.0/dirty_history/ruby/1.9.1/gems/rake-0.9.2/test/data/file_creation_task/Rakefile
dirty_history-0.5.2 dirty_history/ruby/1.9.1/gems/rake-0.9.2/test/data/file_creation_task/Rakefile
dirty_history-0.5.1 dirty_history/ruby/1.9.1/gems/rake-0.9.2/test/data/file_creation_task/Rakefile
dirty_history-0.5.1 dirty_history/ruby/1.9.1/gems/dirty_history-0.2.0/dirty_history/ruby/1.9.1/gems/rake-0.9.2/test/data/file_creation_task/Rakefile
dirty_history-0.5.0 dirty_history/ruby/1.9.1/gems/dirty_history-0.2.0/dirty_history/ruby/1.9.1/gems/rake-0.9.2/test/data/file_creation_task/Rakefile
dirty_history-0.5.0 dirty_history/ruby/1.9.1/gems/rake-0.9.2/test/data/file_creation_task/Rakefile