Sha256: caaf2865f004af5d1270716b82ef62da7994c1b57331468fa930e25cab804d07

Contents?: true

Size: 591 Bytes

Versions: 126

Compression:

Stored size: 591 Bytes

Contents

#!/usr/bin/env ruby

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

126 entries across 98 versions & 11 rubygems

Version Path
craigmarksmith-rake-0.8.3.100 test/data/file_creation_task/Rakefile
craigmarksmith-rake-0.8.4.101 test/data/file_creation_task/Rakefile
craigmarksmith-rake-0.8.4.102 test/data/file_creation_task/Rakefile
craigmarksmith-rake-0.8.4.103 test/data/file_creation_task/Rakefile
elliottcable-echoe-3.1.1 vendor/rake/test/data/file_creation_task/Rakefile
elliottcable-echoe-3.1.2 vendor/rake/test/data/file_creation_task/Rakefile
jimweirich-rake-0.8.1.10 test/data/file_creation_task/Rakefile
jimweirich-rake-0.8.1.11 test/data/file_creation_task/Rakefile
jimweirich-rake-0.8.2.99 test/data/file_creation_task/Rakefile
jimweirich-rake-0.8.2 test/data/file_creation_task/Rakefile
jimweirich-rake-0.8.3.1 test/data/file_creation_task/Rakefile
jimweirich-rake-0.8.3.100 test/data/file_creation_task/Rakefile
jimweirich-rake-0.8.3.99 test/data/file_creation_task/Rakefile
jimweirich-rake-0.8.3 test/data/file_creation_task/Rakefile
jimweirich-rake-0.8.4.99 test/data/file_creation_task/Rakefile
jimweirich-rake-0.8.5 test/data/file_creation_task/Rakefile
luislavena-rake-0.8.3.99 test/data/file_creation_task/Rakefile
dirty_history-0.7.3 dirty_history/ruby/1.9.1/gems/rake-0.8.7/test/data/file_creation_task/Rakefile
dirty_history-0.7.2 dirty_history/ruby/1.9.1/gems/rake-0.8.7/test/data/file_creation_task/Rakefile
dirty_history-0.7.1 dirty_history/ruby/1.9.1/gems/rake-0.8.7/test/data/file_creation_task/Rakefile