rake 0.9.2 → 13.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CONTRIBUTING.rdoc +43 -0
- data/Gemfile +10 -0
- data/History.rdoc +2386 -0
- data/MIT-LICENSE +1 -1
- data/README.rdoc +64 -109
- data/Rakefile +22 -386
- data/bin/bundle +105 -0
- data/bin/console +7 -0
- data/bin/rake +20 -23
- data/bin/rdoc +29 -0
- data/bin/rubocop +29 -0
- data/bin/setup +6 -0
- data/doc/command_line_usage.rdoc +65 -21
- data/doc/glossary.rdoc +40 -49
- data/doc/jamis.rb +1 -0
- data/doc/rake.1 +156 -0
- data/doc/rakefile.rdoc +127 -62
- data/exe/rake +27 -0
- data/lib/rake.rb +37 -31
- data/lib/rake/application.rb +507 -272
- data/lib/rake/backtrace.rb +24 -0
- data/lib/rake/clean.rb +55 -8
- data/lib/rake/cloneable.rb +11 -19
- data/lib/rake/cpu_counter.rb +107 -0
- data/lib/rake/default_loader.rb +5 -0
- data/lib/rake/dsl_definition.rb +74 -46
- data/lib/rake/early_time.rb +5 -1
- data/lib/rake/ext/core.rb +5 -6
- data/lib/rake/ext/string.rb +61 -52
- data/lib/rake/file_creation_task.rb +4 -3
- data/lib/rake/file_list.rb +81 -49
- data/lib/rake/file_task.rb +15 -8
- data/lib/rake/file_utils.rb +69 -47
- data/lib/rake/file_utils_ext.rb +18 -26
- data/lib/rake/invocation_chain.rb +25 -19
- data/lib/rake/invocation_exception_mixin.rb +1 -0
- data/lib/rake/late_time.rb +18 -0
- data/lib/rake/linked_list.rb +112 -0
- data/lib/rake/loaders/makefile.rb +23 -9
- data/lib/rake/multi_task.rb +4 -6
- data/lib/rake/name_space.rb +36 -23
- data/lib/rake/packagetask.rb +71 -34
- data/lib/rake/phony.rb +16 -0
- data/lib/rake/private_reader.rb +21 -0
- data/lib/rake/promise.rb +100 -0
- data/lib/rake/pseudo_status.rb +8 -2
- data/lib/rake/rake_module.rb +41 -3
- data/lib/rake/rake_test_loader.rb +21 -7
- data/lib/rake/rule_recursion_overflow_error.rb +2 -2
- data/lib/rake/scope.rb +43 -0
- data/lib/rake/task.rb +186 -79
- data/lib/rake/task_argument_error.rb +1 -0
- data/lib/rake/task_arguments.rb +50 -15
- data/lib/rake/task_manager.rb +89 -65
- data/lib/rake/tasklib.rb +2 -12
- data/lib/rake/testtask.rb +61 -63
- data/lib/rake/thread_history_display.rb +49 -0
- data/lib/rake/thread_pool.rb +163 -0
- data/lib/rake/trace_output.rb +23 -0
- data/lib/rake/version.rb +7 -7
- data/lib/rake/win32.rb +14 -18
- data/rake.gemspec +43 -0
- metadata +82 -221
- data/.gemtest +0 -0
- data/CHANGES +0 -509
- data/RRR +0 -9
- data/TODO +0 -20
- data/doc/rake.1.gz +0 -0
- data/doc/release_notes/rake-0.4.14.rdoc +0 -23
- data/doc/release_notes/rake-0.4.15.rdoc +0 -35
- data/doc/release_notes/rake-0.5.0.rdoc +0 -53
- data/doc/release_notes/rake-0.5.3.rdoc +0 -78
- data/doc/release_notes/rake-0.5.4.rdoc +0 -46
- data/doc/release_notes/rake-0.6.0.rdoc +0 -141
- data/doc/release_notes/rake-0.7.0.rdoc +0 -119
- data/doc/release_notes/rake-0.7.1.rdoc +0 -59
- data/doc/release_notes/rake-0.7.2.rdoc +0 -121
- data/doc/release_notes/rake-0.7.3.rdoc +0 -47
- data/doc/release_notes/rake-0.8.0.rdoc +0 -114
- data/doc/release_notes/rake-0.8.2.rdoc +0 -165
- data/doc/release_notes/rake-0.8.3.rdoc +0 -112
- data/doc/release_notes/rake-0.8.4.rdoc +0 -147
- data/doc/release_notes/rake-0.8.5.rdoc +0 -53
- data/doc/release_notes/rake-0.8.6.rdoc +0 -55
- data/doc/release_notes/rake-0.8.7.rdoc +0 -55
- data/doc/release_notes/rake-0.9.0.rdoc +0 -112
- data/doc/release_notes/rake-0.9.1.rdoc +0 -52
- data/doc/release_notes/rake-0.9.2.rdoc +0 -49
- data/install.rb +0 -90
- data/lib/rake/alt_system.rb +0 -109
- data/lib/rake/classic_namespace.rb +0 -9
- data/lib/rake/contrib/compositepublisher.rb +0 -21
- data/lib/rake/contrib/ftptools.rb +0 -150
- data/lib/rake/contrib/publisher.rb +0 -69
- data/lib/rake/contrib/rubyforgepublisher.rb +0 -16
- data/lib/rake/contrib/sshpublisher.rb +0 -45
- data/lib/rake/contrib/sys.rb +0 -191
- data/lib/rake/ext/module.rb +0 -39
- data/lib/rake/ext/time.rb +0 -14
- data/lib/rake/gempackagetask.rb +0 -13
- data/lib/rake/pathmap.rb +0 -1
- data/lib/rake/rdoctask.rb +0 -230
- data/lib/rake/ruby182_test_unit_fix.rb +0 -25
- data/lib/rake/runtest.rb +0 -21
- data/test/check_expansion.rb +0 -5
- data/test/check_no_expansion.rb +0 -5
- data/test/data/access/Rakefile +0 -35
- data/test/data/chains/Rakefile +0 -15
- data/test/data/comments/Rakefile +0 -18
- data/test/data/default/Rakefile +0 -17
- data/test/data/deprecated_import/Rakefile +0 -1
- data/test/data/dryrun/Rakefile +0 -22
- data/test/data/extra/Rakefile +0 -1
- data/test/data/file_creation_task/Rakefile +0 -31
- data/test/data/imports/Rakefile +0 -19
- data/test/data/imports/deps.mf +0 -1
- data/test/data/multidesc/Rakefile +0 -15
- data/test/data/namespace/Rakefile +0 -64
- data/test/data/rakelib/test1.rb +0 -4
- data/test/data/rbext/rakefile.rb +0 -3
- data/test/data/sample.mf +0 -14
- data/test/data/statusreturn/Rakefile +0 -6
- data/test/data/unittest/Rakefile +0 -1
- data/test/data/verbose/Rakefile +0 -34
- data/test/file_creation.rb +0 -34
- data/test/helper.rb +0 -44
- data/test/in_environment.rb +0 -35
- data/test/reqfile.rb +0 -3
- data/test/reqfile2.rb +0 -3
- data/test/shellcommand.rb +0 -3
- data/test/test_rake.rb +0 -38
- data/test/test_rake_application.rb +0 -364
- data/test/test_rake_application_options.rb +0 -382
- data/test/test_rake_clean.rb +0 -12
- data/test/test_rake_definitions.rb +0 -80
- data/test/test_rake_directory_task.rb +0 -55
- data/test/test_rake_dsl.rb +0 -73
- data/test/test_rake_early_time.rb +0 -31
- data/test/test_rake_extension.rb +0 -59
- data/test/test_rake_file_creation_task.rb +0 -62
- data/test/test_rake_file_list.rb +0 -633
- data/test/test_rake_file_list_path_map.rb +0 -8
- data/test/test_rake_file_task.rb +0 -104
- data/test/test_rake_file_utils.rb +0 -252
- data/test/test_rake_ftp_file.rb +0 -59
- data/test/test_rake_functional.rb +0 -468
- data/test/test_rake_invocation_chain.rb +0 -52
- data/test/test_rake_makefile_loader.rb +0 -23
- data/test/test_rake_multi_task.rb +0 -51
- data/test/test_rake_name_space.rb +0 -43
- data/test/test_rake_package_task.rb +0 -78
- data/test/test_rake_path_map.rb +0 -157
- data/test/test_rake_path_map_explode.rb +0 -31
- data/test/test_rake_path_map_partial.rb +0 -18
- data/test/test_rake_pseudo_status.rb +0 -20
- data/test/test_rake_rdoc_task.rb +0 -81
- data/test/test_rake_require.rb +0 -35
- data/test/test_rake_rules.rb +0 -346
- data/test/test_rake_task.rb +0 -271
- data/test/test_rake_task_argument_parsing.rb +0 -116
- data/test/test_rake_task_arguments.rb +0 -86
- data/test/test_rake_task_lib.rb +0 -9
- data/test/test_rake_task_manager.rb +0 -145
- data/test/test_rake_task_manager_argument_resolution.rb +0 -36
- data/test/test_rake_task_with_arguments.rb +0 -162
- data/test/test_rake_test_task.rb +0 -122
- data/test/test_rake_top_level_functions.rb +0 -76
- data/test/test_rake_win32.rb +0 -83
- data/test/test_sys.rb +0 -20
@@ -1,25 +0,0 @@
|
|
1
|
-
# Local Rake override to fix bug in Ruby 0.8.2
|
2
|
-
module Test # :nodoc:
|
3
|
-
# Local Rake override to fix bug in Ruby 0.8.2
|
4
|
-
module Unit # :nodoc:
|
5
|
-
# Local Rake override to fix bug in Ruby 0.8.2
|
6
|
-
module Collector # :nodoc:
|
7
|
-
# Local Rake override to fix bug in Ruby 0.8.2
|
8
|
-
class Dir # :nodoc:
|
9
|
-
undef collect_file
|
10
|
-
def collect_file(name, suites, already_gathered) # :nodoc:
|
11
|
-
dir = File.dirname(File.expand_path(name))
|
12
|
-
$:.unshift(dir) unless $:.first == dir
|
13
|
-
if(@req)
|
14
|
-
@req.require(name)
|
15
|
-
else
|
16
|
-
require(name)
|
17
|
-
end
|
18
|
-
find_test_cases(already_gathered).each{|t| add_suite(suites, t.suite)}
|
19
|
-
ensure
|
20
|
-
$:.delete_at $:.rindex(dir)
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
data/lib/rake/runtest.rb
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
require 'test/unit'
|
2
|
-
require 'test/unit/assertions'
|
3
|
-
|
4
|
-
module Rake
|
5
|
-
include Test::Unit::Assertions
|
6
|
-
|
7
|
-
def run_tests(pattern='test/test*.rb', log_enabled=false)
|
8
|
-
Dir["#{pattern}"].each { |fn|
|
9
|
-
$stderr.puts fn if log_enabled
|
10
|
-
begin
|
11
|
-
require fn
|
12
|
-
rescue Exception => ex
|
13
|
-
$stderr.puts "Error in #{fn}: #{ex.message}"
|
14
|
-
$stderr.puts ex.backtrace
|
15
|
-
assert false
|
16
|
-
end
|
17
|
-
}
|
18
|
-
end
|
19
|
-
|
20
|
-
extend self
|
21
|
-
end
|
data/test/check_expansion.rb
DELETED
data/test/check_no_expansion.rb
DELETED
data/test/data/access/Rakefile
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
TOP_LEVEL_CONSTANT = 0
|
2
|
-
|
3
|
-
def a_top_level_function
|
4
|
-
end
|
5
|
-
|
6
|
-
task :default => [:work, :obj, :const]
|
7
|
-
|
8
|
-
task :work do
|
9
|
-
begin
|
10
|
-
a_top_level_function
|
11
|
-
puts "GOOD:M Top level methods can be called in tasks"
|
12
|
-
rescue NameError => ex
|
13
|
-
puts "BAD:M Top level methods can not be called in tasks"
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
# TODO: remove `disabled_' when DeprecatedObjectDSL removed
|
18
|
-
task :obj
|
19
|
-
task :disabled_obj do
|
20
|
-
begin
|
21
|
-
Object.new.instance_eval { task :xyzzy }
|
22
|
-
puts "BAD:D Rake DSL are polluting objects"
|
23
|
-
rescue StandardError => ex
|
24
|
-
puts "GOOD:D Rake DSL are not polluting objects"
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
28
|
-
task :const do
|
29
|
-
begin
|
30
|
-
TOP_LEVEL_CONSTANT
|
31
|
-
puts "GOOD:C Top level constants are available in tasks"
|
32
|
-
rescue StandardError => ex
|
33
|
-
puts "BAD:C Top level constants are NOT available in tasks"
|
34
|
-
end
|
35
|
-
end
|
data/test/data/chains/Rakefile
DELETED
data/test/data/comments/Rakefile
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
# comment for t1
|
2
|
-
task :t1 do
|
3
|
-
end
|
4
|
-
|
5
|
-
# no comment or task because there's a blank line
|
6
|
-
|
7
|
-
task :t2 do
|
8
|
-
end
|
9
|
-
|
10
|
-
desc "override comment for t3"
|
11
|
-
# this is not the description
|
12
|
-
multitask :t3 do
|
13
|
-
end
|
14
|
-
|
15
|
-
# this is not the description
|
16
|
-
desc "override comment for t4"
|
17
|
-
file :t4 do
|
18
|
-
end
|
data/test/data/default/Rakefile
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
import "a"
|
data/test/data/dryrun/Rakefile
DELETED
@@ -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
|
data/test/data/extra/Rakefile
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
task :default
|
@@ -1,31 +0,0 @@
|
|
1
|
-
N = 2
|
2
|
-
|
3
|
-
task :default => :run
|
4
|
-
|
5
|
-
BUILD_DIR = 'build'
|
6
|
-
task :clean do
|
7
|
-
rm_rf 'build'
|
8
|
-
rm_rf 'src'
|
9
|
-
end
|
10
|
-
|
11
|
-
task :run
|
12
|
-
|
13
|
-
TARGET_DIR = 'build/copies'
|
14
|
-
|
15
|
-
FileList['src/*'].each do |src|
|
16
|
-
directory TARGET_DIR
|
17
|
-
target = File.join TARGET_DIR, File.basename(src)
|
18
|
-
file target => [src, TARGET_DIR] do
|
19
|
-
cp src, target
|
20
|
-
# sleep 3 if src !~ /foo#{N-1}$/ # I'm commenting out this sleep, it doesn't seem to do anything.
|
21
|
-
end
|
22
|
-
task :run => target
|
23
|
-
end
|
24
|
-
|
25
|
-
task :prep => :clean do
|
26
|
-
mkdir_p 'src'
|
27
|
-
N.times do |n|
|
28
|
-
puts "DBG: Touching src/foo#{n}"
|
29
|
-
touch "src/foo#{n}"
|
30
|
-
end
|
31
|
-
end
|
data/test/data/imports/Rakefile
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
# -*- ruby -*-
|
2
|
-
|
3
|
-
require 'rake/loaders/makefile'
|
4
|
-
|
5
|
-
task :default
|
6
|
-
|
7
|
-
task :other do
|
8
|
-
puts "OTHER"
|
9
|
-
end
|
10
|
-
|
11
|
-
file "dynamic_deps" do |t|
|
12
|
-
open(t.name, "w") do |f| f.puts "puts 'DYNAMIC'" end
|
13
|
-
end
|
14
|
-
|
15
|
-
import "dynamic_deps"
|
16
|
-
import "static_deps"
|
17
|
-
import "static_deps"
|
18
|
-
import "deps.mf"
|
19
|
-
puts "FIRST"
|
data/test/data/imports/deps.mf
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
default: other
|
@@ -1,64 +0,0 @@
|
|
1
|
-
desc "copy"
|
2
|
-
task :copy do
|
3
|
-
puts "COPY"
|
4
|
-
end
|
5
|
-
|
6
|
-
namespace "nest" do
|
7
|
-
desc "nest copy"
|
8
|
-
task :copy do
|
9
|
-
puts "NEST COPY"
|
10
|
-
end
|
11
|
-
task :xx => :copy
|
12
|
-
end
|
13
|
-
|
14
|
-
anon_ns = namespace do
|
15
|
-
desc "anonymous copy task"
|
16
|
-
task :copy do
|
17
|
-
puts "ANON COPY"
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
desc "Top level task to run the anonymous version of copy"
|
22
|
-
task :anon => anon_ns[:copy]
|
23
|
-
|
24
|
-
namespace "very" do
|
25
|
-
namespace "nested" do
|
26
|
-
task "run" => "rake:copy"
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
namespace "a" do
|
31
|
-
desc "Run task in the 'a' namespace"
|
32
|
-
task "run" do
|
33
|
-
puts "IN A"
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
|
-
namespace "b" do
|
38
|
-
desc "Run task in the 'b' namespace"
|
39
|
-
task "run" => "a:run" do
|
40
|
-
puts "IN B"
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
|
-
namespace "file1" do
|
45
|
-
file "xyz.rb" do
|
46
|
-
puts "XYZ1"
|
47
|
-
end
|
48
|
-
end
|
49
|
-
|
50
|
-
namespace "file2" do
|
51
|
-
file "xyz.rb" do
|
52
|
-
puts "XYZ2"
|
53
|
-
end
|
54
|
-
end
|
55
|
-
|
56
|
-
namespace "scopedep" do
|
57
|
-
task :prepare do
|
58
|
-
touch "scopedep.rb"
|
59
|
-
puts "PREPARE"
|
60
|
-
end
|
61
|
-
file "scopedep.rb" => [:prepare] do
|
62
|
-
puts "SCOPEDEP"
|
63
|
-
end
|
64
|
-
end
|
data/test/data/rakelib/test1.rb
DELETED
data/test/data/rbext/rakefile.rb
DELETED
data/test/data/sample.mf
DELETED
data/test/data/unittest/Rakefile
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
# Empty Rakefile for Unit Test
|
data/test/data/verbose/Rakefile
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
|
2
|
-
task :standalone_verbose_true do
|
3
|
-
verbose true
|
4
|
-
sh "ruby -e '0'"
|
5
|
-
end
|
6
|
-
|
7
|
-
task :standalone_verbose_false do
|
8
|
-
verbose false
|
9
|
-
sh "ruby -e '0'"
|
10
|
-
end
|
11
|
-
|
12
|
-
task :inline_verbose_default do
|
13
|
-
sh "ruby -e '0'"
|
14
|
-
end
|
15
|
-
|
16
|
-
task :inline_verbose_false do
|
17
|
-
sh "ruby -e '0'", :verbose => false
|
18
|
-
end
|
19
|
-
|
20
|
-
task :inline_verbose_true do
|
21
|
-
sh "ruby -e '0'", :verbose => true
|
22
|
-
end
|
23
|
-
|
24
|
-
task :block_verbose_true do
|
25
|
-
verbose(true) do
|
26
|
-
sh "ruby -e '0'"
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
task :block_verbose_false do
|
31
|
-
verbose(false) do
|
32
|
-
sh "ruby -e '0'"
|
33
|
-
end
|
34
|
-
end
|
data/test/file_creation.rb
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
module FileCreation
|
2
|
-
OLDFILE = "testdata/old"
|
3
|
-
NEWFILE = "testdata/new"
|
4
|
-
|
5
|
-
def create_timed_files(oldfile, *newfiles)
|
6
|
-
return if (File.exist?(oldfile) &&
|
7
|
-
newfiles.all? { |newfile|
|
8
|
-
File.exist?(newfile) && File.stat(newfile).mtime > File.stat(oldfile).mtime
|
9
|
-
})
|
10
|
-
now = Time.now
|
11
|
-
|
12
|
-
create_file(oldfile, now - 60)
|
13
|
-
|
14
|
-
newfiles.each do |newfile|
|
15
|
-
create_file(newfile, now)
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
def create_dir(dirname)
|
20
|
-
FileUtils.mkdir_p(dirname) unless File.exist?(dirname)
|
21
|
-
File.stat(dirname).mtime
|
22
|
-
end
|
23
|
-
|
24
|
-
def create_file(name, file_time=nil)
|
25
|
-
create_dir(File.dirname(name))
|
26
|
-
FileUtils.touch(name) unless File.exist?(name)
|
27
|
-
File.utime(file_time, file_time, name) unless file_time.nil?
|
28
|
-
File.stat(name).mtime
|
29
|
-
end
|
30
|
-
|
31
|
-
def delete_file(name)
|
32
|
-
File.delete(name) rescue nil
|
33
|
-
end
|
34
|
-
end
|
data/test/helper.rb
DELETED
@@ -1,44 +0,0 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
require 'minitest/unit'
|
3
|
-
require 'flexmock/test_unit_integration'
|
4
|
-
require 'minitest/autorun'
|
5
|
-
require 'rake'
|
6
|
-
require File.expand_path('../file_creation', __FILE__)
|
7
|
-
require File.expand_path('../in_environment', __FILE__)
|
8
|
-
|
9
|
-
class Rake::TestCase < MiniTest::Unit::TestCase
|
10
|
-
include FlexMock::ArgumentTypes
|
11
|
-
include FlexMock::MockContainer
|
12
|
-
|
13
|
-
include InEnvironment
|
14
|
-
include FileCreation
|
15
|
-
|
16
|
-
include Rake::DSL
|
17
|
-
|
18
|
-
class TaskManager
|
19
|
-
include Rake::TaskManager
|
20
|
-
end
|
21
|
-
|
22
|
-
def setup
|
23
|
-
@orig_PWD = Dir.pwd
|
24
|
-
end
|
25
|
-
|
26
|
-
def teardown
|
27
|
-
flexmock_teardown
|
28
|
-
|
29
|
-
Dir.chdir @orig_PWD
|
30
|
-
end
|
31
|
-
|
32
|
-
def ignore_deprecations
|
33
|
-
Rake.application.options.ignore_deprecate = true
|
34
|
-
yield
|
35
|
-
ensure
|
36
|
-
Rake.application.options.ignore_deprecate = false
|
37
|
-
end
|
38
|
-
|
39
|
-
end
|
40
|
-
|
41
|
-
# workarounds for 1.8
|
42
|
-
$" << 'test/helper.rb'
|
43
|
-
Test::Unit.run = true if Test::Unit.respond_to? :run=
|
44
|
-
|