elliottcable-echoe 3.1.2 → 3.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +3 -1
- data/Manifest +1 -93
- data/Rakefile +1 -2
- data/echoe.gemspec +7 -7
- data/lib/echoe.rb +50 -22
- data/lib/echoe/net.rb +7 -0
- data/lib/echoe/platform.rb +27 -25
- data/vendor/rake/lib/rake/contrib/sshpublisher.rb +0 -4
- metadata +7 -96
- data/vendor/rake/CHANGES +0 -400
- data/vendor/rake/README +0 -285
- data/vendor/rake/Rakefile +0 -418
- data/vendor/rake/TODO +0 -20
- data/vendor/rake/bin/rake +0 -31
- data/vendor/rake/doc/example/Rakefile1 +0 -38
- data/vendor/rake/doc/example/Rakefile2 +0 -35
- data/vendor/rake/doc/example/a.c +0 -6
- data/vendor/rake/doc/example/b.c +0 -6
- data/vendor/rake/doc/example/main.c +0 -11
- data/vendor/rake/doc/glossary.rdoc +0 -51
- data/vendor/rake/doc/jamis.rb +0 -591
- data/vendor/rake/doc/proto_rake.rdoc +0 -127
- data/vendor/rake/doc/rake.1.gz +0 -0
- data/vendor/rake/doc/rakefile.rdoc +0 -534
- data/vendor/rake/doc/rational.rdoc +0 -151
- data/vendor/rake/doc/release_notes/rake-0.4.14.rdoc +0 -23
- data/vendor/rake/doc/release_notes/rake-0.4.15.rdoc +0 -35
- data/vendor/rake/doc/release_notes/rake-0.5.0.rdoc +0 -53
- data/vendor/rake/doc/release_notes/rake-0.5.3.rdoc +0 -78
- data/vendor/rake/doc/release_notes/rake-0.5.4.rdoc +0 -46
- data/vendor/rake/doc/release_notes/rake-0.6.0.rdoc +0 -141
- data/vendor/rake/doc/release_notes/rake-0.7.0.rdoc +0 -119
- data/vendor/rake/doc/release_notes/rake-0.7.1.rdoc +0 -59
- data/vendor/rake/doc/release_notes/rake-0.7.2.rdoc +0 -121
- data/vendor/rake/doc/release_notes/rake-0.7.3.rdoc +0 -47
- data/vendor/rake/doc/release_notes/rake-0.8.0.rdoc +0 -114
- data/vendor/rake/doc/release_notes/rake-0.8.2.rdoc +0 -165
- data/vendor/rake/doc/release_notes/rake-0.8.3.rdoc +0 -112
- data/vendor/rake/install.rb +0 -88
- data/vendor/rake/lib/rake.rb +0 -2468
- data/vendor/rake/lib/rake/classic_namespace.rb +0 -8
- data/vendor/rake/lib/rake/clean.rb +0 -33
- data/vendor/rake/lib/rake/gempackagetask.rb +0 -103
- data/vendor/rake/lib/rake/loaders/makefile.rb +0 -35
- data/vendor/rake/lib/rake/packagetask.rb +0 -185
- data/vendor/rake/lib/rake/rake_test_loader.rb +0 -5
- data/vendor/rake/lib/rake/rdoctask.rb +0 -147
- data/vendor/rake/lib/rake/ruby182_test_unit_fix.rb +0 -23
- data/vendor/rake/lib/rake/runtest.rb +0 -23
- data/vendor/rake/lib/rake/tasklib.rb +0 -23
- data/vendor/rake/lib/rake/testtask.rb +0 -161
- data/vendor/rake/lib/rake/win32.rb +0 -54
- data/vendor/rake/test/capture_stdout.rb +0 -26
- data/vendor/rake/test/check_expansion.rb +0 -5
- data/vendor/rake/test/contrib/test_sys.rb +0 -47
- data/vendor/rake/test/data/chains/Rakefile +0 -15
- data/vendor/rake/test/data/default/Rakefile +0 -19
- data/vendor/rake/test/data/dryrun/Rakefile +0 -22
- data/vendor/rake/test/data/file_creation_task/Rakefile +0 -33
- data/vendor/rake/test/data/imports/Rakefile +0 -19
- data/vendor/rake/test/data/imports/deps.mf +0 -1
- data/vendor/rake/test/data/multidesc/Rakefile +0 -17
- data/vendor/rake/test/data/namespace/Rakefile +0 -57
- data/vendor/rake/test/data/rakelib/test1.rb +0 -3
- data/vendor/rake/test/data/rbext/rakefile.rb +0 -3
- data/vendor/rake/test/data/sample.mf +0 -12
- data/vendor/rake/test/data/statusreturn/Rakefile +0 -8
- data/vendor/rake/test/data/unittest/Rakefile +0 -1
- data/vendor/rake/test/filecreation.rb +0 -32
- data/vendor/rake/test/functional.rb +0 -15
- data/vendor/rake/test/in_environment.rb +0 -30
- data/vendor/rake/test/rake_test_setup.rb +0 -10
- data/vendor/rake/test/reqfile.rb +0 -3
- data/vendor/rake/test/reqfile2.rb +0 -3
- data/vendor/rake/test/session_functional.rb +0 -337
- data/vendor/rake/test/shellcommand.rb +0 -3
- data/vendor/rake/test/test_application.rb +0 -694
- data/vendor/rake/test/test_clean.rb +0 -14
- data/vendor/rake/test/test_definitions.rb +0 -82
- data/vendor/rake/test/test_earlytime.rb +0 -35
- data/vendor/rake/test/test_extension.rb +0 -63
- data/vendor/rake/test/test_file_creation_task.rb +0 -62
- data/vendor/rake/test/test_file_task.rb +0 -139
- data/vendor/rake/test/test_filelist.rb +0 -618
- data/vendor/rake/test/test_fileutils.rb +0 -250
- data/vendor/rake/test/test_ftp.rb +0 -59
- data/vendor/rake/test/test_invocation_chain.rb +0 -75
- data/vendor/rake/test/test_makefile_loader.rb +0 -25
- data/vendor/rake/test/test_multitask.rb +0 -45
- data/vendor/rake/test/test_namespace.rb +0 -36
- data/vendor/rake/test/test_package_task.rb +0 -116
- data/vendor/rake/test/test_pathmap.rb +0 -209
- data/vendor/rake/test/test_rake.rb +0 -41
- data/vendor/rake/test/test_require.rb +0 -33
- data/vendor/rake/test/test_rules.rb +0 -347
- data/vendor/rake/test/test_task_arguments.rb +0 -89
- data/vendor/rake/test/test_task_manager.rb +0 -170
- data/vendor/rake/test/test_tasklib.rb +0 -12
- data/vendor/rake/test/test_tasks.rb +0 -371
- data/vendor/rake/test/test_test_task.rb +0 -75
- data/vendor/rake/test/test_top_level_functions.rb +0 -84
- data/vendor/rake/test/test_win32.rb +0 -57
@@ -1,23 +0,0 @@
|
|
1
|
-
module Test
|
2
|
-
module Unit
|
3
|
-
module Collector
|
4
|
-
class Dir
|
5
|
-
undef collect_file
|
6
|
-
def collect_file(name, suites, already_gathered)
|
7
|
-
# loadpath = $:.dup
|
8
|
-
dir = File.dirname(File.expand_path(name))
|
9
|
-
$:.unshift(dir) unless $:.first == dir
|
10
|
-
if(@req)
|
11
|
-
@req.require(name)
|
12
|
-
else
|
13
|
-
require(name)
|
14
|
-
end
|
15
|
-
find_test_cases(already_gathered).each{|t| add_suite(suites, t.suite)}
|
16
|
-
ensure
|
17
|
-
# $:.replace(loadpath)
|
18
|
-
$:.delete_at $:.rindex(dir)
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
@@ -1,23 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require 'test/unit'
|
4
|
-
require 'test/unit/assertions'
|
5
|
-
|
6
|
-
module Rake
|
7
|
-
include Test::Unit::Assertions
|
8
|
-
|
9
|
-
def run_tests(pattern='test/test*.rb', log_enabled=false)
|
10
|
-
Dir["#{pattern}"].each { |fn|
|
11
|
-
puts fn if log_enabled
|
12
|
-
begin
|
13
|
-
load fn
|
14
|
-
rescue Exception => ex
|
15
|
-
puts "Error in #{fn}: #{ex.message}"
|
16
|
-
puts ex.backtrace
|
17
|
-
assert false
|
18
|
-
end
|
19
|
-
}
|
20
|
-
end
|
21
|
-
|
22
|
-
extend self
|
23
|
-
end
|
@@ -1,23 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require 'rake'
|
4
|
-
|
5
|
-
module Rake
|
6
|
-
|
7
|
-
# Base class for Task Libraries.
|
8
|
-
class TaskLib
|
9
|
-
include Cloneable
|
10
|
-
|
11
|
-
# Make a symbol by pasting two strings together.
|
12
|
-
#
|
13
|
-
# NOTE: DEPRECATED! This method is kinda stupid. I don't know why
|
14
|
-
# I didn't just use string interpolation. But now other task
|
15
|
-
# libraries depend on this so I can't remove it without breaking
|
16
|
-
# other people's code. So for now it stays for backwards
|
17
|
-
# compatibility. BUT DON'T USE IT.
|
18
|
-
def paste(a,b) # :nodoc:
|
19
|
-
(a.to_s + b.to_s).intern
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
end
|
@@ -1,161 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
# Define a task library for running unit tests.
|
4
|
-
|
5
|
-
require 'rake'
|
6
|
-
require 'rake/tasklib'
|
7
|
-
|
8
|
-
module Rake
|
9
|
-
|
10
|
-
# Create a task that runs a set of tests.
|
11
|
-
#
|
12
|
-
# Example:
|
13
|
-
#
|
14
|
-
# Rake::TestTask.new do |t|
|
15
|
-
# t.libs << "test"
|
16
|
-
# t.test_files = FileList['test/test*.rb']
|
17
|
-
# t.verbose = true
|
18
|
-
# end
|
19
|
-
#
|
20
|
-
# If rake is invoked with a "TEST=filename" command line option,
|
21
|
-
# then the list of test files will be overridden to include only the
|
22
|
-
# filename specified on the command line. This provides an easy way
|
23
|
-
# to run just one test.
|
24
|
-
#
|
25
|
-
# If rake is invoked with a "TESTOPTS=options" command line option,
|
26
|
-
# then the given options are passed to the test process after a
|
27
|
-
# '--'. This allows Test::Unit options to be passed to the test
|
28
|
-
# suite.
|
29
|
-
#
|
30
|
-
# Examples:
|
31
|
-
#
|
32
|
-
# rake test # run tests normally
|
33
|
-
# rake test TEST=just_one_file.rb # run just one test file.
|
34
|
-
# rake test TESTOPTS="-v" # run in verbose mode
|
35
|
-
# rake test TESTOPTS="--runner=fox" # use the fox test runner
|
36
|
-
#
|
37
|
-
class TestTask < TaskLib
|
38
|
-
|
39
|
-
# Name of test task. (default is :test)
|
40
|
-
attr_accessor :name
|
41
|
-
|
42
|
-
# List of directories to added to $LOAD_PATH before running the
|
43
|
-
# tests. (default is 'lib')
|
44
|
-
attr_accessor :libs
|
45
|
-
|
46
|
-
# True if verbose test output desired. (default is false)
|
47
|
-
attr_accessor :verbose
|
48
|
-
|
49
|
-
# Test options passed to the test suite. An explicit
|
50
|
-
# TESTOPTS=opts on the command line will override this. (default
|
51
|
-
# is NONE)
|
52
|
-
attr_accessor :options
|
53
|
-
|
54
|
-
# Request that the tests be run with the warning flag set.
|
55
|
-
# E.g. warning=true implies "ruby -w" used to run the tests.
|
56
|
-
attr_accessor :warning
|
57
|
-
|
58
|
-
# Glob pattern to match test files. (default is 'test/test*.rb')
|
59
|
-
attr_accessor :pattern
|
60
|
-
|
61
|
-
# Style of test loader to use. Options are:
|
62
|
-
#
|
63
|
-
# * :rake -- Rake provided test loading script (default).
|
64
|
-
# * :testrb -- Ruby provided test loading script.
|
65
|
-
# * :direct -- Load tests using command line loader.
|
66
|
-
#
|
67
|
-
attr_accessor :loader
|
68
|
-
|
69
|
-
# Array of commandline options to pass to ruby when running test loader.
|
70
|
-
attr_accessor :ruby_opts
|
71
|
-
|
72
|
-
# Explicitly define the list of test files to be included in a
|
73
|
-
# test. +list+ is expected to be an array of file names (a
|
74
|
-
# FileList is acceptable). If both +pattern+ and +test_files+ are
|
75
|
-
# used, then the list of test files is the union of the two.
|
76
|
-
def test_files=(list)
|
77
|
-
@test_files = list
|
78
|
-
end
|
79
|
-
|
80
|
-
# Create a testing task.
|
81
|
-
def initialize(name=:test)
|
82
|
-
@name = name
|
83
|
-
@libs = ["lib"]
|
84
|
-
@pattern = nil
|
85
|
-
@options = nil
|
86
|
-
@test_files = nil
|
87
|
-
@verbose = false
|
88
|
-
@warning = false
|
89
|
-
@loader = :rake
|
90
|
-
@ruby_opts = []
|
91
|
-
yield self if block_given?
|
92
|
-
@pattern = 'test/test*.rb' if @pattern.nil? && @test_files.nil?
|
93
|
-
define
|
94
|
-
end
|
95
|
-
|
96
|
-
# Create the tasks defined by this task lib.
|
97
|
-
def define
|
98
|
-
lib_path = @libs.join(File::PATH_SEPARATOR)
|
99
|
-
desc "Run tests" + (@name==:test ? "" : " for #{@name}")
|
100
|
-
task @name do
|
101
|
-
run_code = ''
|
102
|
-
RakeFileUtils.verbose(@verbose) do
|
103
|
-
run_code =
|
104
|
-
case @loader
|
105
|
-
when :direct
|
106
|
-
"-e 'ARGV.each{|f| load f}'"
|
107
|
-
when :testrb
|
108
|
-
"-S testrb #{fix}"
|
109
|
-
when :rake
|
110
|
-
rake_loader
|
111
|
-
end
|
112
|
-
@ruby_opts.unshift( "-I#{lib_path}" )
|
113
|
-
@ruby_opts.unshift( "-w" ) if @warning
|
114
|
-
ruby @ruby_opts.join(" ") +
|
115
|
-
" \"#{run_code}\" " +
|
116
|
-
file_list.collect { |fn| "\"#{fn}\"" }.join(' ') +
|
117
|
-
" #{option_list}"
|
118
|
-
end
|
119
|
-
end
|
120
|
-
self
|
121
|
-
end
|
122
|
-
|
123
|
-
def option_list # :nodoc:
|
124
|
-
ENV['TESTOPTS'] || @options || ""
|
125
|
-
end
|
126
|
-
|
127
|
-
def file_list # :nodoc:
|
128
|
-
if ENV['TEST']
|
129
|
-
FileList[ ENV['TEST'] ]
|
130
|
-
else
|
131
|
-
result = []
|
132
|
-
result += @test_files.to_a if @test_files
|
133
|
-
result += FileList[ @pattern ].to_a if @pattern
|
134
|
-
FileList[result]
|
135
|
-
end
|
136
|
-
end
|
137
|
-
|
138
|
-
def fix # :nodoc:
|
139
|
-
case RUBY_VERSION
|
140
|
-
when '1.8.2'
|
141
|
-
find_file 'rake/ruby182_test_unit_fix'
|
142
|
-
else
|
143
|
-
nil
|
144
|
-
end || ''
|
145
|
-
end
|
146
|
-
|
147
|
-
def rake_loader # :nodoc:
|
148
|
-
find_file('rake/rake_test_loader') or
|
149
|
-
fail "unable to find rake test loader"
|
150
|
-
end
|
151
|
-
|
152
|
-
def find_file(fn) # :nodoc:
|
153
|
-
$LOAD_PATH.each do |path|
|
154
|
-
file_path = File.join(path, "#{fn}.rb")
|
155
|
-
return file_path if File.exist? file_path
|
156
|
-
end
|
157
|
-
nil
|
158
|
-
end
|
159
|
-
|
160
|
-
end
|
161
|
-
end
|
@@ -1,54 +0,0 @@
|
|
1
|
-
module Rake
|
2
|
-
|
3
|
-
# Win 32 interface methods for Rake. Windows specific functionality
|
4
|
-
# will be placed here to collect that knowledge in one spot.
|
5
|
-
module Win32
|
6
|
-
|
7
|
-
# Error indicating a problem in locating the home directory on a
|
8
|
-
# Win32 system.
|
9
|
-
class Win32HomeError < RuntimeError
|
10
|
-
end
|
11
|
-
|
12
|
-
class << self
|
13
|
-
# True if running on a windows system.
|
14
|
-
def windows?
|
15
|
-
Config::CONFIG['host_os'] =~ /mswin/
|
16
|
-
end
|
17
|
-
|
18
|
-
# Run a command line on windows.
|
19
|
-
def rake_system(*cmd)
|
20
|
-
if cmd.size == 1
|
21
|
-
system("call #{cmd}")
|
22
|
-
else
|
23
|
-
system(*cmd)
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
|
-
# The standard directory containing system wide rake files on
|
28
|
-
# Win 32 systems. Try the following environment variables (in
|
29
|
-
# order):
|
30
|
-
#
|
31
|
-
# * APPDATA
|
32
|
-
# * HOMEDRIVE + HOMEPATH
|
33
|
-
# * USERPROFILE
|
34
|
-
#
|
35
|
-
# If the above are not defined, the return nil.
|
36
|
-
def win32_system_dir #:nodoc:
|
37
|
-
win32_shared_path = ENV['APPDATA']
|
38
|
-
if win32_shared_path.nil? && ENV['HOMEDRIVE'] && ENV['HOMEPATH']
|
39
|
-
win32_shared_path = ENV['HOMEDRIVE'] + ENV['HOMEPATH']
|
40
|
-
end
|
41
|
-
win32_shared_path ||= ENV['USERPROFILE']
|
42
|
-
raise Win32HomeError, "Unable to determine home path environment variable." if
|
43
|
-
win32_shared_path.nil? or win32_shared_path.empty?
|
44
|
-
normalize(File.join(win32_shared_path, 'Rake'))
|
45
|
-
end
|
46
|
-
|
47
|
-
# Normalize a win32 path so that the slashes are all forward slashes.
|
48
|
-
def normalize(path)
|
49
|
-
path.gsub(/\\/, '/')
|
50
|
-
end
|
51
|
-
|
52
|
-
end
|
53
|
-
end
|
54
|
-
end
|
@@ -1,26 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require 'stringio'
|
4
|
-
|
5
|
-
# Mix-in for capturing standard output.
|
6
|
-
module CaptureStdout
|
7
|
-
def capture_stdout
|
8
|
-
s = StringIO.new
|
9
|
-
oldstdout = $stdout
|
10
|
-
$stdout = s
|
11
|
-
yield
|
12
|
-
s.string
|
13
|
-
ensure
|
14
|
-
$stdout = oldstdout
|
15
|
-
end
|
16
|
-
|
17
|
-
def capture_stderr
|
18
|
-
s = StringIO.new
|
19
|
-
oldstderr = $stderr
|
20
|
-
$stderr = s
|
21
|
-
yield
|
22
|
-
s.string
|
23
|
-
ensure
|
24
|
-
$stderr = oldstderr
|
25
|
-
end
|
26
|
-
end
|
@@ -1,47 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require 'test/unit'
|
4
|
-
require 'test/filecreation'
|
5
|
-
require 'rake/contrib/sys'
|
6
|
-
|
7
|
-
class TestSys < Test::Unit::TestCase
|
8
|
-
include FileCreation
|
9
|
-
|
10
|
-
# def test_delete
|
11
|
-
# create_file("testdata/a")
|
12
|
-
# Sys.delete_all("testdata/a")
|
13
|
-
# assert ! File.exist?("testdata/a")
|
14
|
-
# end
|
15
|
-
|
16
|
-
# def test_copy
|
17
|
-
# create_file("testdata/a")
|
18
|
-
# Sys.copy("testdata/a", "testdata/b")
|
19
|
-
# assert File.exist?("testdata/b")
|
20
|
-
# end
|
21
|
-
|
22
|
-
# def test_for_files
|
23
|
-
# test_files = ["testdata/a.pl", "testdata/c.pl", "testdata/b.rb"]
|
24
|
-
# test_files.each { |fn| create_file(fn) }
|
25
|
-
# list = []
|
26
|
-
# Sys.for_files("testdata/*.pl", "testdata/*.rb") { |fn|
|
27
|
-
# list << fn
|
28
|
-
# }
|
29
|
-
# assert_equal test_files.sort, list.sort
|
30
|
-
# end
|
31
|
-
|
32
|
-
# def test_indir
|
33
|
-
# here = Dir.pwd
|
34
|
-
# Sys.makedirs("testdata/dir")
|
35
|
-
# assert_equal "#{here}/testdata/dir", Sys.indir("testdata/dir") { Dir.pwd }
|
36
|
-
# assert_equal here, Dir.pwd
|
37
|
-
# end
|
38
|
-
|
39
|
-
def test_split_all
|
40
|
-
assert_equal ['a'], Sys.split_all('a')
|
41
|
-
assert_equal ['..'], Sys.split_all('..')
|
42
|
-
assert_equal ['/'], Sys.split_all('/')
|
43
|
-
assert_equal ['a', 'b'], Sys.split_all('a/b')
|
44
|
-
assert_equal ['/', 'a', 'b'], Sys.split_all('/a/b')
|
45
|
-
assert_equal ['..', 'a', 'b'], Sys.split_all('../a/b')
|
46
|
-
end
|
47
|
-
end
|
@@ -1,19 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
if ENV['TESTTOPSCOPE']
|
4
|
-
puts "TOPSCOPE"
|
5
|
-
end
|
6
|
-
|
7
|
-
task :default do
|
8
|
-
puts "DEFAULT"
|
9
|
-
end
|
10
|
-
|
11
|
-
task :other => [:default] do
|
12
|
-
puts "OTHER"
|
13
|
-
end
|
14
|
-
|
15
|
-
task :task_scope do
|
16
|
-
if ENV['TESTTASKSCOPE']
|
17
|
-
puts "TASKSCOPE"
|
18
|
-
end
|
19
|
-
end
|
@@ -1,22 +0,0 @@
|
|
1
|
-
#
|
2
|
-
|
3
|
-
task :default => ["temp_main"]
|
4
|
-
|
5
|
-
file "temp_main" => [:all_apps] do touch "temp_main" end
|
6
|
-
|
7
|
-
task :all_apps => [:one, :two]
|
8
|
-
task :one => ["temp_one"]
|
9
|
-
task :two => ["temp_two"]
|
10
|
-
|
11
|
-
file "temp_one" do |t|
|
12
|
-
touch "temp_one"
|
13
|
-
end
|
14
|
-
file "temp_two" do |t|
|
15
|
-
touch "temp_two"
|
16
|
-
end
|
17
|
-
|
18
|
-
task :clean do
|
19
|
-
["temp_one", "temp_two", "temp_main"].each do |file|
|
20
|
-
rm_f file
|
21
|
-
end
|
22
|
-
end
|
@@ -1,33 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
N = 2
|
4
|
-
|
5
|
-
task :default => :run
|
6
|
-
|
7
|
-
BUILD_DIR = 'build'
|
8
|
-
task :clean do
|
9
|
-
rm_rf 'build'
|
10
|
-
rm_rf 'src'
|
11
|
-
end
|
12
|
-
|
13
|
-
task :run
|
14
|
-
|
15
|
-
TARGET_DIR = 'build/copies'
|
16
|
-
|
17
|
-
FileList['src/*'].each do |src|
|
18
|
-
directory TARGET_DIR
|
19
|
-
target = File.join TARGET_DIR, File.basename(src)
|
20
|
-
file target => [src, TARGET_DIR] do
|
21
|
-
cp src, target
|
22
|
-
# sleep 3 if src !~ /foo#{N-1}$/ # I'm commenting out this sleep, it doesn't seem to do anything.
|
23
|
-
end
|
24
|
-
task :run => target
|
25
|
-
end
|
26
|
-
|
27
|
-
task :prep => :clean do
|
28
|
-
mkdir_p 'src'
|
29
|
-
N.times do |n|
|
30
|
-
puts "DBG: Touching src/foo#{n}"
|
31
|
-
touch "src/foo#{n}"
|
32
|
-
end
|
33
|
-
end
|