drake 0.8.7.0.2.4 → 0.9.0.0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (132) hide show
  1. data/.gemtest +0 -0
  2. data/CHANGES +77 -9
  3. data/{CHANGES.drake → CHANGES-drake} +6 -2
  4. data/MIT-LICENSE +2 -0
  5. data/{README → README.rdoc} +30 -18
  6. data/Rakefile +144 -130
  7. data/Rakefile-drake +67 -0
  8. data/TODO +1 -1
  9. data/bin/drake +2 -0
  10. data/doc/command_line_usage.rdoc +25 -11
  11. data/doc/glossary.rdoc +2 -2
  12. data/doc/jamis.rb +2 -2
  13. data/doc/parallel.rdoc +37 -29
  14. data/doc/proto_rake.rdoc +22 -22
  15. data/doc/rake.1.gz +0 -0
  16. data/doc/rakefile.rdoc +56 -33
  17. data/doc/rational.rdoc +6 -6
  18. data/doc/release_notes/rake-0.4.15.rdoc +1 -1
  19. data/doc/release_notes/rake-0.5.0.rdoc +1 -1
  20. data/doc/release_notes/rake-0.7.0.rdoc +1 -1
  21. data/doc/release_notes/rake-0.7.2.rdoc +3 -3
  22. data/doc/release_notes/rake-0.7.3.rdoc +2 -2
  23. data/doc/release_notes/rake-0.8.0.rdoc +1 -1
  24. data/doc/release_notes/rake-0.8.2.rdoc +3 -3
  25. data/doc/release_notes/rake-0.8.3.rdoc +2 -2
  26. data/doc/release_notes/rake-0.8.4.rdoc +1 -1
  27. data/doc/release_notes/rake-0.8.5.rdoc +1 -1
  28. data/doc/release_notes/rake-0.8.6.rdoc +1 -1
  29. data/doc/release_notes/rake-0.8.7.rdoc +1 -1
  30. data/doc/release_notes/rake-0.9.0.rdoc +112 -0
  31. data/install.rb +14 -12
  32. data/lib/rake.rb +31 -2527
  33. data/lib/rake/alt_system.rb +7 -6
  34. data/lib/rake/application.rb +626 -0
  35. data/lib/rake/classic_namespace.rb +1 -0
  36. data/lib/rake/clean.rb +2 -4
  37. data/lib/rake/cloneable.rb +25 -0
  38. data/lib/rake/contrib/compositepublisher.rb +2 -5
  39. data/lib/rake/contrib/ftptools.rb +5 -8
  40. data/lib/rake/contrib/publisher.rb +2 -8
  41. data/lib/rake/contrib/rubyforgepublisher.rb +2 -4
  42. data/lib/rake/contrib/sshpublisher.rb +4 -6
  43. data/lib/rake/contrib/sys.rb +7 -25
  44. data/lib/rake/default_loader.rb +10 -0
  45. data/lib/rake/dsl.rb +2 -0
  46. data/lib/rake/dsl_definition.rb +143 -0
  47. data/lib/rake/early_time.rb +18 -0
  48. data/lib/rake/ext/core.rb +27 -0
  49. data/lib/rake/ext/module.rb +39 -0
  50. data/lib/rake/ext/string.rb +167 -0
  51. data/lib/rake/ext/time.rb +14 -0
  52. data/lib/rake/file_creation_task.rb +24 -0
  53. data/lib/rake/file_list.rb +403 -0
  54. data/lib/rake/file_task.rb +47 -0
  55. data/lib/rake/file_utils.rb +112 -0
  56. data/lib/rake/file_utils_ext.rb +142 -0
  57. data/lib/rake/gempackagetask.rb +6 -90
  58. data/lib/rake/invocation_chain.rb +51 -0
  59. data/lib/rake/invocation_exception_mixin.rb +16 -0
  60. data/lib/rake/loaders/makefile.rb +13 -15
  61. data/lib/rake/multi_task.rb +16 -0
  62. data/lib/rake/name_space.rb +25 -0
  63. data/lib/rake/packagetask.rb +13 -12
  64. data/lib/rake/parallel.rb +17 -28
  65. data/lib/rake/pathmap.rb +1 -0
  66. data/lib/rake/pseudo_status.rb +24 -0
  67. data/lib/rake/rake_module.rb +29 -0
  68. data/lib/rake/rake_test_loader.rb +10 -2
  69. data/lib/rake/rdoctask.rb +211 -190
  70. data/lib/rake/ruby182_test_unit_fix.rb +9 -7
  71. data/lib/rake/rule_recursion_overflow_error.rb +20 -0
  72. data/lib/rake/runtest.rb +4 -6
  73. data/lib/rake/task.rb +351 -0
  74. data/lib/rake/task_argument_error.rb +7 -0
  75. data/lib/rake/task_arguments.rb +74 -0
  76. data/lib/rake/task_manager.rb +307 -0
  77. data/lib/rake/tasklib.rb +1 -2
  78. data/lib/rake/testtask.rb +57 -27
  79. data/lib/rake/version.rb +13 -0
  80. data/lib/rake/win32.rb +4 -4
  81. data/test/contrib/test_sys.rb +8 -31
  82. data/test/data/access/Rakefile +33 -0
  83. data/test/data/comments/Rakefile +18 -0
  84. data/test/data/default/Rakefile +1 -1
  85. data/test/data/deprecated_import/Rakefile +1 -0
  86. data/test/data/dryrun/Rakefile +1 -1
  87. data/test/data/file_creation_task/Rakefile +1 -1
  88. data/test/data/namespace/Rakefile +9 -0
  89. data/test/data/rakelib/test1.rb +1 -0
  90. data/test/data/verbose/Rakefile +34 -0
  91. data/test/{filecreation.rb → file_creation.rb} +11 -7
  92. data/test/functional/functional_test.rb +25 -0
  93. data/test/{session_functional.rb → functional/session_based_tests.rb} +141 -23
  94. data/test/in_environment.rb +7 -5
  95. data/test/{test_application.rb → lib/application_test.rb} +331 -143
  96. data/test/{test_clean.rb → lib/clean_test.rb} +1 -0
  97. data/test/{test_definitions.rb → lib/definitions_test.rb} +4 -4
  98. data/test/lib/dsl_test.rb +52 -0
  99. data/test/{test_earlytime.rb → lib/earlytime_test.rb} +1 -2
  100. data/test/{test_extension.rb → lib/extension_test.rb} +2 -2
  101. data/test/{test_file_creation_task.rb → lib/file_creation_task_test.rb} +1 -1
  102. data/test/{test_file_task.rb → lib/file_task_test.rb} +9 -5
  103. data/test/{test_filelist.rb → lib/filelist_test.rb} +38 -24
  104. data/test/{test_fileutils.rb → lib/fileutils_test.rb} +27 -22
  105. data/test/{test_ftp.rb → lib/ftp_test.rb} +0 -0
  106. data/test/{test_invocation_chain.rb → lib/invocation_chain_test.rb} +0 -0
  107. data/test/{test_makefile_loader.rb → lib/makefile_loader_test.rb} +0 -0
  108. data/test/{test_multitask.rb → lib/multitask_test.rb} +3 -2
  109. data/test/{test_namespace.rb → lib/namespace_test.rb} +0 -0
  110. data/test/lib/package_task_test.rb +82 -0
  111. data/test/{test_parallel.rb → lib/parallel_test.rb} +5 -5
  112. data/test/{test_pathmap.rb → lib/pathmap_test.rb} +3 -2
  113. data/test/{test_pseudo_status.rb → lib/pseudo_status_test.rb} +0 -0
  114. data/test/{test_rake.rb → lib/rake_test.rb} +1 -1
  115. data/test/{test_rdoc_task.rb → lib/rdoc_task_test.rb} +19 -23
  116. data/test/{test_require.rb → lib/require_test.rb} +8 -2
  117. data/test/{test_rules.rb → lib/rules_test.rb} +4 -5
  118. data/test/{test_task_arguments.rb → lib/task_arguments_test.rb} +5 -5
  119. data/test/{test_task_manager.rb → lib/task_manager_test.rb} +15 -5
  120. data/test/{test_tasks.rb → lib/task_test.rb} +91 -28
  121. data/test/{test_tasklib.rb → lib/tasklib_test.rb} +0 -0
  122. data/test/{test_test_task.rb → lib/test_task_test.rb} +3 -3
  123. data/test/lib/testtask_test.rb +49 -0
  124. data/test/{test_top_level_functions.rb → lib/top_level_functions_test.rb} +5 -3
  125. data/test/{test_win32.rb → lib/win32_test.rb} +19 -0
  126. data/test/rake_test_setup.rb +6 -10
  127. data/test/ruby_version_test.rb +3 -0
  128. data/test/test_helper.rb +19 -0
  129. metadata +108 -66
  130. data/Rakefile.drake +0 -73
  131. data/test/functional.rb +0 -15
  132. data/test/test_package_task.rb +0 -118
data/Rakefile.drake DELETED
@@ -1,73 +0,0 @@
1
-
2
- def git(*args)
3
- sh("git", *args)
4
- end
5
-
6
- task :pull_mainline do
7
- git(*%w!pull --no-commit
8
- git://github.com/jimweirich/rake.git
9
- refs/heads/master:refs/heads/origin!)
10
- end
11
-
12
- task :drake_prerelease => [:clobber, :gemspec] do
13
- unless `git status` =~ %r!nothing to commit \(working directory clean\)!
14
- raise "Directory not clean"
15
- end
16
- #unless `git pull` =~ %r!Already up-to-date!
17
- # raise "New stuff from remote repository"
18
- #end
19
- %w[github.com rubyforge.org].each { |server|
20
- cmd = "ping " + (
21
- if Config::CONFIG["host"] =~ %r!darwin!
22
- "-c2 #{server}"
23
- else
24
- "#{server} 2 2"
25
- end
26
- )
27
- unless `#{cmd}` =~ %r!0% packet loss!
28
- raise "No ping for #{server}"
29
- end
30
- }
31
- end
32
-
33
- task :drake_publish => :rdoc do
34
- Dir.chdir("html") {
35
- sh(*%w(scp -r . quix@rubyforge.org:/var/www/gforge-projects/drake))
36
- }
37
- end
38
-
39
- def rubyforge(command, file, *args)
40
- sh("rubyforge",
41
- command,
42
- SPEC.rubyforge_project,
43
- SPEC.rubyforge_project,
44
- SPEC.version.to_s,
45
- file,
46
- *args)
47
- end
48
-
49
- task :drake_finish_release do
50
- changes = File.expand_path("CHANGES.drake")
51
- sh("rubyforge", "login")
52
- Dir.chdir("pkg") {
53
- gem = "#{SPEC.name}-#{SPEC.version}.gem"
54
- md5 = "#{gem}.md5"
55
- sh("md5sum #{gem} > #{md5}")
56
- rubyforge(
57
- *%W(add_release #{gem} --release_changes #{changes} --preformatted))
58
- rubyforge("add_file", md5)
59
- }
60
-
61
- git("tag", "drake-" + SPEC.version.to_s)
62
- git(*%w(push --tags origin))
63
- end
64
-
65
- task :drake_release =>
66
- [
67
- :drake_prerelease,
68
- :gem,
69
- :test_all,
70
- :drake_publish,
71
- :drake_finish_release,
72
- ]
73
-
data/test/functional.rb DELETED
@@ -1,15 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- begin
4
- require 'rubygems'
5
- gem 'session'
6
- require 'session'
7
- rescue LoadError
8
- puts "UNABLE TO RUN FUNCTIONAL TESTS"
9
- puts "No Session Found (gem install session)"
10
- end
11
-
12
- if defined?(Session)
13
- puts "RUNNING WITH SESSIONS"
14
- require 'test/session_functional'
15
- end
@@ -1,118 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'test/unit'
4
- require 'rake/packagetask'
5
- require 'test/rake_test_setup'
6
-
7
- class TestPackageTask < Test::Unit::TestCase
8
- include Rake
9
- include TestMethods
10
-
11
- def test_create
12
- pkg = Rake::PackageTask.new("pkgr", "1.2.3") { |p|
13
- p.package_files << "install.rb"
14
- p.package_files.include(
15
- '[A-Z]*',
16
- 'bin/**/*',
17
- 'lib/**/*.rb',
18
- 'test/**/*.rb',
19
- 'doc/**/*',
20
- 'build/rubyapp.rb',
21
- '*.blurb')
22
- p.package_files.exclude(/\bCVS\b/)
23
- p.package_files.exclude(/~$/)
24
- p.package_dir = 'pkg'
25
- p.need_tar = true
26
- p.need_tar_gz = true
27
- p.need_tar_bz2 = true
28
- p.need_zip = true
29
- }
30
- assert_equal "pkg", pkg.package_dir
31
- assert pkg.package_files.include?("bin/rake")
32
- assert "pkgr", pkg.name
33
- assert "1.2.3", pkg.version
34
- assert Task[:package]
35
- assert Task['pkg/pkgr-1.2.3.tgz']
36
- assert Task['pkg/pkgr-1.2.3.tar.gz']
37
- assert Task['pkg/pkgr-1.2.3.tar.bz2']
38
- assert Task['pkg/pkgr-1.2.3.zip']
39
- assert Task["pkg/pkgr-1.2.3"]
40
- assert Task[:clobber_package]
41
- assert Task[:repackage]
42
- end
43
-
44
- def test_missing_version
45
- assert_exception(RuntimeError) {
46
- pkg = Rake::PackageTask.new("pkgr") { |p| }
47
- }
48
- end
49
-
50
- def test_no_version
51
- pkg = Rake::PackageTask.new("pkgr", :noversion) { |p| }
52
- assert "pkgr", pkg.send(:package_name)
53
- end
54
-
55
- def test_clone
56
- pkg = Rake::PackageTask.new("x", :noversion)
57
- p2 = pkg.clone
58
- pkg.package_files << "y"
59
- p2.package_files << "x"
60
- assert_equal ["y"], pkg.package_files
61
- assert_equal ["x"], p2.package_files
62
- end
63
- end
64
-
65
-
66
- begin
67
- require 'rubygems'
68
- require 'rake/gempackagetask'
69
- rescue Exception
70
- puts "WARNING: RubyGems not installed"
71
- end
72
-
73
- if ! defined?(Gem)
74
- puts "WARNING: Unable to test GemPackaging ... requires RubyGems"
75
- else
76
- class TestGemPackageTask < Test::Unit::TestCase
77
- def test_gem_package
78
- gem = Gem::Specification.new do |g|
79
- g.name = "pkgr"
80
- g.version = "1.2.3"
81
- g.files = FileList["x"].resolve
82
- end
83
- pkg = Rake::GemPackageTask.new(gem) do |p|
84
- p.package_files << "y"
85
- end
86
- assert_equal ["x", "y"], pkg.package_files
87
- assert_equal "pkgr-1.2.3.gem", pkg.gem_file
88
- end
89
-
90
- def test_gem_package_with_current_platform
91
- gem = Gem::Specification.new do |g|
92
- g.name = "pkgr"
93
- g.version = "1.2.3"
94
- g.files = FileList["x"].resolve
95
- g.platform = Gem::Platform::CURRENT
96
- end
97
- pkg = Rake::GemPackageTask.new(gem) do |p|
98
- p.package_files << "y"
99
- end
100
- assert_equal ["x", "y"], pkg.package_files
101
- assert_match(/^pkgr-1\.2\.3-(\S+)\.gem$/, pkg.gem_file)
102
- end
103
-
104
- def test_gem_package_with_ruby_platform
105
- gem = Gem::Specification.new do |g|
106
- g.name = "pkgr"
107
- g.version = "1.2.3"
108
- g.files = FileList["x"].resolve
109
- g.platform = Gem::Platform::RUBY
110
- end
111
- pkg = Rake::GemPackageTask.new(gem) do |p|
112
- p.package_files << "y"
113
- end
114
- assert_equal ["x", "y"], pkg.package_files
115
- assert_equal "pkgr-1.2.3.gem", pkg.gem_file
116
- end
117
- end
118
- end