drake 0.9.0.0.3.0 → 0.9.1.0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. data/CHANGES +9 -8
  2. data/CHANGES-drake +4 -0
  3. data/Rakefile +14 -49
  4. data/Rakefile-drake +2 -1
  5. data/bin/drake +4 -3
  6. data/doc/release_notes/rake-0.9.1.rdoc +52 -0
  7. data/lib/rake/dsl_definition.rb +19 -0
  8. data/lib/rake/version.rb +1 -1
  9. data/test/data/access/Rakefile +3 -1
  10. data/test/data/default/Rakefile +0 -2
  11. data/test/data/file_creation_task/Rakefile +0 -2
  12. data/test/data/multidesc/Rakefile +0 -2
  13. data/test/data/namespace/Rakefile +0 -2
  14. data/test/data/statusreturn/Rakefile +0 -2
  15. data/test/file_creation.rb +0 -2
  16. data/test/helper.rb +63 -0
  17. data/test/in_environment.rb +4 -1
  18. data/test/{parallel_setup.rb → setup_parallel.rb} +0 -0
  19. data/test/{serial_setup.rb → setup_serial.rb} +0 -0
  20. data/test/{lib/parallel_test.rb → test_parallel.rb} +3 -1
  21. data/test/{lib/rake_test.rb → test_rake.rb} +2 -5
  22. data/test/test_rake_application.rb +365 -0
  23. data/test/test_rake_application_options.rb +383 -0
  24. data/test/test_rake_clean.rb +14 -0
  25. data/test/{lib/definitions_test.rb → test_rake_definitions.rb} +5 -10
  26. data/test/test_rake_directory_task.rb +55 -0
  27. data/test/test_rake_dsl.rb +53 -0
  28. data/test/{lib/earlytime_test.rb → test_rake_early_time.rb} +2 -5
  29. data/test/{lib/extension_test.rb → test_rake_extension.rb} +2 -6
  30. data/test/{lib/file_creation_task_test.rb → test_rake_file_creation_task.rb} +7 -7
  31. data/test/{lib/filelist_test.rb → test_rake_file_list.rb} +18 -22
  32. data/test/test_rake_file_list_path_map.rb +8 -0
  33. data/test/{lib/file_task_test.rb → test_rake_file_task.rb} +22 -61
  34. data/test/{lib/fileutils_test.rb → test_rake_file_utils.rb} +11 -15
  35. data/test/{lib/ftp_test.rb → test_rake_ftp_file.rb} +5 -5
  36. data/test/{functional/session_based_tests.rb → test_rake_functional.rb} +35 -24
  37. data/test/test_rake_invocation_chain.rb +52 -0
  38. data/test/{lib/makefile_loader_test.rb → test_rake_makefile_loader.rb} +2 -5
  39. data/test/{lib/multitask_test.rb → test_rake_multi_task.rb} +5 -7
  40. data/test/{lib/namespace_test.rb → test_rake_name_space.rb} +4 -16
  41. data/test/{lib/package_task_test.rb → test_rake_package_task.rb} +2 -6
  42. data/test/{lib/pathmap_test.rb → test_rake_path_map.rb} +4 -58
  43. data/test/test_rake_path_map_explode.rb +31 -0
  44. data/test/test_rake_path_map_partial.rb +18 -0
  45. data/test/{lib/pseudo_status_test.rb → test_rake_pseudo_status.rb} +2 -8
  46. data/test/{lib/rdoc_task_test.rb → test_rake_rdoc_task.rb} +4 -7
  47. data/test/{lib/require_test.rb → test_rake_require.rb} +3 -9
  48. data/test/{lib/rules_test.rb → test_rake_rules.rb} +11 -13
  49. data/test/{lib/task_test.rb → test_rake_task.rb} +16 -183
  50. data/test/test_rake_task_argument_parsing.rb +126 -0
  51. data/test/{lib/task_arguments_test.rb → test_rake_task_arguments.rb} +2 -5
  52. data/test/{lib/tasklib_test.rb → test_rake_task_lib.rb} +2 -5
  53. data/test/{lib/task_manager_test.rb → test_rake_task_manager.rb} +7 -45
  54. data/test/test_rake_task_manager_argument_resolution.rb +36 -0
  55. data/test/test_rake_task_with_arguments.rb +162 -0
  56. data/test/{lib/test_task_test.rb → test_rake_test_task.rb} +52 -7
  57. data/test/{lib/top_level_functions_test.rb → test_rake_top_level_functions.rb} +8 -20
  58. data/test/{lib/win32_test.rb → test_rake_win32.rb} +5 -12
  59. data/test/{contrib/test_sys.rb → test_sys.rb} +2 -6
  60. metadata +62 -47
  61. data/lib/rake/dsl.rb +0 -2
  62. data/test/capture_stdout.rb +0 -26
  63. data/test/functional/functional_test.rb +0 -25
  64. data/test/lib/application_test.rb +0 -871
  65. data/test/lib/clean_test.rb +0 -15
  66. data/test/lib/dsl_test.rb +0 -52
  67. data/test/lib/invocation_chain_test.rb +0 -81
  68. data/test/lib/testtask_test.rb +0 -49
  69. data/test/rake_test_setup.rb +0 -41
  70. data/test/ruby_version_test.rb +0 -3
  71. data/test/test_helper.rb +0 -19
@@ -1,15 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'test/unit'
4
- require 'rake'
5
- require 'rake/clean'
6
-
7
- class TestClean < Test::Unit::TestCase
8
- include Rake
9
- def test_clean
10
- assert Task['clean'], "Should define clean"
11
- assert Task['clobber'], "Should define clobber"
12
- assert Task['clobber'].prerequisites.include?("clean"),
13
- "Clobber should require clean"
14
- end
15
- end
@@ -1,52 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- begin
4
- require 'rubygems'
5
- rescue LoadError
6
- # got no gems
7
- end
8
-
9
- require 'test/unit'
10
- require 'flexmock/test_unit'
11
- require 'rake'
12
- require 'test/rake_test_setup'
13
-
14
- class DslTest < Test::Unit::TestCase
15
-
16
- def test_namespace_command
17
- namespace "n" do
18
- task "t"
19
- end
20
- assert_not_nil Rake::Task["n:t"]
21
- end
22
-
23
- def test_namespace_command_with_bad_name
24
- ex = assert_raise(ArgumentError) do
25
- namespace 1 do end
26
- end
27
- assert_match(/string/i, ex.message)
28
- assert_match(/symbol/i, ex.message)
29
- end
30
-
31
- def test_namespace_command_with_a_string_like_object
32
- name = Object.new
33
- def name.to_str
34
- "bob"
35
- end
36
- namespace name do
37
- task "t"
38
- end
39
- assert_not_nil Rake::Task["bob:t"]
40
- end
41
-
42
- def test_dsl_not_toplevel_by_default
43
- actual = TOPLEVEL_BINDING.instance_eval { defined?(task) }
44
- assert_nil actual
45
- end
46
-
47
- def test_dsl_toplevel_when_require_rake_dsl
48
- assert_nothing_raised {
49
- ruby '-I./lib', '-rrake/dsl', '-e', 'task(:x) { }', :verbose => false
50
- }
51
- end
52
- end
@@ -1,81 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'test/unit'
4
- require 'rake'
5
- require 'test/rake_test_setup'
6
-
7
- ######################################################################
8
- class TestAnEmptyInvocationChain < Test::Unit::TestCase
9
- include TestMethods
10
-
11
- def setup
12
- @empty = Rake::InvocationChain::EMPTY
13
- end
14
-
15
- def test_should_be_able_to_add_members
16
- assert_nothing_raised do
17
- @empty.append("A")
18
- end
19
- end
20
-
21
- def test_to_s
22
- assert_equal "TOP", @empty.to_s
23
- end
24
- end
25
-
26
- ######################################################################
27
- class TestAnInvocationChainWithOneMember < Test::Unit::TestCase
28
- include TestMethods
29
-
30
- def setup
31
- @empty = Rake::InvocationChain::EMPTY
32
- @first_member = "A"
33
- @chain = @empty.append(@first_member)
34
- end
35
-
36
- def test_should_report_first_member_as_a_member
37
- assert @chain.member?(@first_member)
38
- end
39
-
40
- def test_should_fail_when_adding_original_member
41
- ex = assert_exception RuntimeError do
42
- @chain.append(@first_member)
43
- end
44
- assert_match(/circular +dependency/i, ex.message)
45
- assert_match(/A.*=>.*A/, ex.message)
46
- end
47
-
48
- def test_to_s
49
- assert_equal "TOP => A", @chain.to_s
50
- end
51
-
52
- end
53
-
54
- ######################################################################
55
- class TestAnInvocationChainWithMultipleMember < Test::Unit::TestCase
56
- include TestMethods
57
-
58
- def setup
59
- @first_member = "A"
60
- @second_member = "B"
61
- ch = Rake::InvocationChain::EMPTY.append(@first_member)
62
- @chain = ch.append(@second_member)
63
- end
64
-
65
- def test_should_report_first_member_as_a_member
66
- assert @chain.member?(@first_member)
67
- end
68
-
69
- def test_should_report_second_member_as_a_member
70
- assert @chain.member?(@second_member)
71
- end
72
-
73
- def test_should_fail_when_adding_original_member
74
- ex = assert_exception RuntimeError do
75
- @chain.append(@first_member)
76
- end
77
- assert_match(/A.*=>.*B.*=>.*A/, ex.message)
78
- end
79
- end
80
-
81
-
@@ -1,49 +0,0 @@
1
- require 'test/test_helper'
2
- require 'rake/testtask'
3
-
4
- class TestTaskTest < Test::Unit::TestCase
5
- def test_direct_run_has_quoted_paths
6
- test_task = Rake::TestTask.new(:tx) do |t|
7
- t.loader = :direct
8
- end
9
- assert_match(/-e ".*"/, test_task.run_code)
10
- end
11
-
12
- def test_testrb_run_has_quoted_paths_on_ruby_182
13
- test_task = Rake::TestTask.new(:tx) do |t|
14
- t.loader = :testrb
15
- end
16
- flexmock(test_task).should_receive(:ruby_version).and_return('1.8.2')
17
- assert_match(/^-S testrb +".*"$/, test_task.run_code)
18
- end
19
-
20
- def test_testrb_run_has_quoted_paths_on_ruby_186
21
- test_task = Rake::TestTask.new(:tx) do |t|
22
- t.loader = :testrb
23
- end
24
- flexmock(test_task).should_receive(:ruby_version).and_return('1.8.6')
25
- assert_match(/^-S testrb +$/, test_task.run_code)
26
- end
27
-
28
- def test_rake_run_has_quoted_paths
29
- test_task = Rake::TestTask.new(:tx) do |t|
30
- t.loader = :rake
31
- end
32
- assert_match(/".*"/, test_task.run_code)
33
- end
34
-
35
- def test_nested_libs_will_be_flattened
36
- test_task = Rake::TestTask.new(:tx) do |t|
37
- t.libs << ["A", "B"]
38
- end
39
- sep = File::PATH_SEPARATOR
40
- assert_match(/lib#{sep}A#{sep}B/, test_task.ruby_opts_string)
41
- end
42
-
43
- def test_empty_lib_path_implies_no_dash_I_option
44
- test_task = Rake::TestTask.new(:tx) do |t|
45
- t.libs = []
46
- end
47
- assert_no_match(/-I/, test_task.ruby_opts_string)
48
- end
49
- end
@@ -1,41 +0,0 @@
1
- # Common setup for all test files.
2
-
3
- begin
4
- require 'rubygems'
5
- gem 'flexmock'
6
- rescue LoadError
7
- # got no gems
8
- end
9
-
10
- require 'thread'
11
- require 'flexmock/test_unit'
12
- require 'test/file_creation'
13
- require 'test/capture_stdout'
14
- require 'test/test_helper'
15
-
16
- module TestMethods
17
- # Shim method for compatibility
18
- def assert_exception(ex, msg="", &block)
19
- assert_raise(ex, msg, &block)
20
- end
21
- end
22
-
23
- class ThreadSafeArray
24
- def initialize
25
- @mutex = Mutex.new
26
- @array = Array.new
27
- end
28
-
29
- Array.public_instance_methods.each do |method_name|
30
- unless method_name =~ %r!\A__! or method_name =~ %r!\A(object_)?id\Z!
31
- # TODO: jettison 1.8.6; use define_method with |&block|
32
- eval %{
33
- def #{method_name}(*args, &block)
34
- @mutex.synchronize {
35
- @array.send('#{method_name}', *args, &block)
36
- }
37
- end
38
- }
39
- end
40
- end
41
- end
@@ -1,3 +0,0 @@
1
- require 'test/unit'
2
-
3
- puts "\nRUBY VERSION = #{RUBY_VERSION}"
@@ -1,19 +0,0 @@
1
- begin
2
- require 'rubygems'
3
- rescue LoadError
4
- end
5
- require 'test/unit'
6
- require 'flexmock/test_unit'
7
-
8
- require 'rake'
9
-
10
- class Test::Unit::TestCase
11
- include Rake::DSL
12
-
13
- def ignore_deprecations
14
- Rake.application.options.ignore_deprecate = true
15
- yield
16
- ensure
17
- Rake.application.options.ignore_deprecate = false
18
- end
19
- end