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,76 +0,0 @@
|
|
1
|
-
require File.expand_path('../helper', __FILE__)
|
2
|
-
|
3
|
-
class TestRakeTopLevelFunctions < Rake::TestCase
|
4
|
-
|
5
|
-
def setup
|
6
|
-
super
|
7
|
-
|
8
|
-
@app = Rake.application
|
9
|
-
Rake.application = flexmock("app")
|
10
|
-
Rake.application.should_receive(:deprecate).
|
11
|
-
and_return { |old, new, call| @app.deprecate(old, new, call) }
|
12
|
-
end
|
13
|
-
|
14
|
-
def teardown
|
15
|
-
Rake.application = @app
|
16
|
-
|
17
|
-
super
|
18
|
-
end
|
19
|
-
|
20
|
-
def test_namespace
|
21
|
-
Rake.application.should_receive(:in_namespace).with("xyz", any).once
|
22
|
-
namespace "xyz" do end
|
23
|
-
end
|
24
|
-
|
25
|
-
def test_import
|
26
|
-
Rake.application.should_receive(:add_import).with("x").once.ordered
|
27
|
-
Rake.application.should_receive(:add_import).with("y").once.ordered
|
28
|
-
Rake.application.should_receive(:add_import).with("z").once.ordered
|
29
|
-
import('x', 'y', 'z')
|
30
|
-
end
|
31
|
-
|
32
|
-
def test_when_writing
|
33
|
-
out, = capture_io do
|
34
|
-
when_writing("NOTWRITING") do
|
35
|
-
puts "WRITING"
|
36
|
-
end
|
37
|
-
end
|
38
|
-
assert_equal "WRITING\n", out
|
39
|
-
end
|
40
|
-
|
41
|
-
def test_when_not_writing
|
42
|
-
Rake::FileUtilsExt.nowrite_flag = true
|
43
|
-
_, err = capture_io do
|
44
|
-
when_writing("NOTWRITING") do
|
45
|
-
puts "WRITING"
|
46
|
-
end
|
47
|
-
end
|
48
|
-
assert_equal "DRYRUN: NOTWRITING\n", err
|
49
|
-
ensure
|
50
|
-
Rake::FileUtilsExt.nowrite_flag = false
|
51
|
-
end
|
52
|
-
|
53
|
-
def test_missing_constants_task
|
54
|
-
Rake.application.should_receive(:const_warning).with(:Task).once
|
55
|
-
Object.const_missing(:Task)
|
56
|
-
end
|
57
|
-
|
58
|
-
def test_missing_constants_file_task
|
59
|
-
Rake.application.should_receive(:const_warning).with(:FileTask).once
|
60
|
-
Object.const_missing(:FileTask)
|
61
|
-
end
|
62
|
-
|
63
|
-
def test_missing_constants_file_creation_task
|
64
|
-
Rake.application.should_receive(:const_warning).with(:FileCreationTask).once
|
65
|
-
Object.const_missing(:FileCreationTask)
|
66
|
-
end
|
67
|
-
|
68
|
-
def test_missing_constants_rake_app
|
69
|
-
Rake.application.should_receive(:const_warning).with(:RakeApp).once
|
70
|
-
Object.const_missing(:RakeApp)
|
71
|
-
end
|
72
|
-
|
73
|
-
def test_missing_other_constant
|
74
|
-
assert_raises(NameError) do Object.const_missing(:Xyz) end
|
75
|
-
end
|
76
|
-
end
|
data/test/test_rake_win32.rb
DELETED
@@ -1,83 +0,0 @@
|
|
1
|
-
require File.expand_path('../helper', __FILE__)
|
2
|
-
|
3
|
-
class TestRakeWin32 < Rake::TestCase
|
4
|
-
include InEnvironment
|
5
|
-
|
6
|
-
Win32 = Rake::Win32
|
7
|
-
|
8
|
-
def test_win32_system_dir_uses_home_if_defined
|
9
|
-
in_environment('RAKE_SYSTEM' => nil, 'HOME' => 'C:\\HP') do
|
10
|
-
assert_equal "C:/HP/Rake", Win32.win32_system_dir
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
def test_win32_system_dir_uses_homedrive_homepath_when_no_home_defined
|
15
|
-
in_environment(
|
16
|
-
'RAKE_SYSTEM' => nil,
|
17
|
-
'HOME' => nil,
|
18
|
-
'HOMEDRIVE' => "C:",
|
19
|
-
'HOMEPATH' => "\\HP"
|
20
|
-
) do
|
21
|
-
assert_equal "C:/HP/Rake", Win32.win32_system_dir
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
def test_win32_system_dir_uses_appdata_when_no_home_or_home_combo
|
26
|
-
in_environment(
|
27
|
-
'RAKE_SYSTEM' => nil,
|
28
|
-
'HOME' => nil,
|
29
|
-
'HOMEDRIVE' => nil,
|
30
|
-
'HOMEPATH' => nil,
|
31
|
-
'APPDATA' => "C:\\Documents and Settings\\HP\\Application Data"
|
32
|
-
) do
|
33
|
-
assert_equal "C:/Documents and Settings/HP/Application Data/Rake", Win32.win32_system_dir
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
|
-
def test_win32_system_dir_fallback_to_userprofile_otherwise
|
38
|
-
in_environment(
|
39
|
-
'RAKE_SYSTEM' => nil,
|
40
|
-
'HOME' => nil,
|
41
|
-
'HOMEDRIVE' => nil,
|
42
|
-
'HOMEPATH' => nil,
|
43
|
-
'APPDATA' => nil,
|
44
|
-
'USERPROFILE' => "C:\\Documents and Settings\\HP"
|
45
|
-
) do
|
46
|
-
assert_equal "C:/Documents and Settings/HP/Rake", Win32.win32_system_dir
|
47
|
-
end
|
48
|
-
end
|
49
|
-
|
50
|
-
def test_win32_system_dir_nil_of_no_env_vars
|
51
|
-
in_environment(
|
52
|
-
'RAKE_SYSTEM' => nil,
|
53
|
-
'HOME' => nil,
|
54
|
-
'HOMEDRIVE' => nil,
|
55
|
-
"HOMEPATH" => nil,
|
56
|
-
'APPDATA' => nil,
|
57
|
-
"USERPROFILE" => nil
|
58
|
-
) do
|
59
|
-
assert_raises(Rake::Win32::Win32HomeError) do
|
60
|
-
Win32.win32_system_dir
|
61
|
-
end
|
62
|
-
end
|
63
|
-
end
|
64
|
-
|
65
|
-
def test_win32_backtrace_with_different_case
|
66
|
-
ex = nil
|
67
|
-
begin
|
68
|
-
raise 'test exception'
|
69
|
-
rescue => ex
|
70
|
-
end
|
71
|
-
|
72
|
-
ex.set_backtrace ['abc', 'rakefile']
|
73
|
-
|
74
|
-
rake = Rake::Application.new
|
75
|
-
rake.options.trace = true
|
76
|
-
rake.instance_variable_set(:@rakefile, 'Rakefile')
|
77
|
-
|
78
|
-
_, err = capture_io { rake.display_error_message(ex) }
|
79
|
-
|
80
|
-
assert_match(/rakefile/, err)
|
81
|
-
end
|
82
|
-
|
83
|
-
end
|
data/test/test_sys.rb
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
require File.expand_path('../helper', __FILE__)
|
2
|
-
begin
|
3
|
-
old_verbose = $VERBOSE
|
4
|
-
$VERBOSE = nil
|
5
|
-
require 'rake/contrib/sys'
|
6
|
-
ensure
|
7
|
-
$VERBOSE = old_verbose
|
8
|
-
end
|
9
|
-
|
10
|
-
class TestSys < Rake::TestCase
|
11
|
-
|
12
|
-
def test_split_all
|
13
|
-
assert_equal ['a'], Sys.split_all('a')
|
14
|
-
assert_equal ['..'], Sys.split_all('..')
|
15
|
-
assert_equal ['/'], Sys.split_all('/')
|
16
|
-
assert_equal ['a', 'b'], Sys.split_all('a/b')
|
17
|
-
assert_equal ['/', 'a', 'b'], Sys.split_all('/a/b')
|
18
|
-
assert_equal ['..', 'a', 'b'], Sys.split_all('../a/b')
|
19
|
-
end
|
20
|
-
end
|