forked from ruby/rake
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
version 0.5.4.3 -- fowler directory fixes
git-svn-id: svn+ssh://rubyforge.org/var/svn/rake/trunk@436 5af023f1-ac1a-0410-98d6-829a145c37ef
- Loading branch information
jimweirich
committed
Jul 2, 2005
1 parent
308f355
commit ceb84f1
Showing
9 changed files
with
183 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
src | ||
build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/usr/bin/env ruby | ||
|
||
require 'test/unit' | ||
require 'rake' | ||
|
||
class TestEarlyTime < Test::Unit::TestCase | ||
def test_create | ||
early = Rake::EarlyTime.instance | ||
time = Time.mktime(1920, 1, 1, 0, 0, 0) | ||
assert early <= Time.now | ||
assert early < Time.now | ||
assert early != Time.now | ||
assert Time.now > early | ||
assert Time.now >= early | ||
assert Time.now != early | ||
end | ||
|
||
def test_original_time_compare_is_not_messed_up | ||
t1 = Time.mktime(1920, 1, 1, 0, 0, 0) | ||
t2 = Time.now | ||
assert t1 < t2 | ||
assert t2 > t1 | ||
assert t1 == t1 | ||
assert t2 == t2 | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters