rake 0.8.7 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (124) hide show
  1. data/.gemtest +0 -0
  2. data/CHANGES +77 -9
  3. data/{README → README.rdoc} +14 -10
  4. data/Rakefile +129 -118
  5. data/TODO +1 -1
  6. data/doc/command_line_usage.rdoc +18 -6
  7. data/doc/glossary.rdoc +2 -2
  8. data/doc/jamis.rb +2 -2
  9. data/doc/proto_rake.rdoc +22 -22
  10. data/doc/rake.1.gz +0 -0
  11. data/doc/rakefile.rdoc +55 -32
  12. data/doc/rational.rdoc +6 -6
  13. data/doc/release_notes/rake-0.4.15.rdoc +1 -1
  14. data/doc/release_notes/rake-0.5.0.rdoc +1 -1
  15. data/doc/release_notes/rake-0.7.0.rdoc +1 -1
  16. data/doc/release_notes/rake-0.7.2.rdoc +3 -3
  17. data/doc/release_notes/rake-0.7.3.rdoc +2 -2
  18. data/doc/release_notes/rake-0.8.0.rdoc +1 -1
  19. data/doc/release_notes/rake-0.8.2.rdoc +3 -3
  20. data/doc/release_notes/rake-0.8.3.rdoc +2 -2
  21. data/doc/release_notes/rake-0.8.4.rdoc +1 -1
  22. data/doc/release_notes/rake-0.8.5.rdoc +1 -1
  23. data/doc/release_notes/rake-0.8.6.rdoc +1 -1
  24. data/doc/release_notes/rake-0.8.7.rdoc +1 -1
  25. data/doc/release_notes/rake-0.9.0.rdoc +112 -0
  26. data/install.rb +14 -12
  27. data/lib/rake/alt_system.rb +7 -6
  28. data/lib/rake/application.rb +589 -0
  29. data/lib/rake/classic_namespace.rb +1 -0
  30. data/lib/rake/clean.rb +2 -4
  31. data/lib/rake/cloneable.rb +25 -0
  32. data/lib/rake/contrib/compositepublisher.rb +2 -5
  33. data/lib/rake/contrib/ftptools.rb +5 -8
  34. data/lib/rake/contrib/publisher.rb +2 -8
  35. data/lib/rake/contrib/rubyforgepublisher.rb +2 -4
  36. data/lib/rake/contrib/sshpublisher.rb +4 -6
  37. data/lib/rake/contrib/sys.rb +7 -25
  38. data/lib/rake/default_loader.rb +10 -0
  39. data/lib/rake/dsl.rb +2 -0
  40. data/lib/rake/dsl_definition.rb +143 -0
  41. data/lib/rake/early_time.rb +18 -0
  42. data/lib/rake/ext/core.rb +27 -0
  43. data/lib/rake/ext/module.rb +39 -0
  44. data/lib/rake/ext/string.rb +167 -0
  45. data/lib/rake/ext/time.rb +14 -0
  46. data/lib/rake/file_creation_task.rb +24 -0
  47. data/lib/rake/file_list.rb +403 -0
  48. data/lib/rake/file_task.rb +47 -0
  49. data/lib/rake/file_utils.rb +112 -0
  50. data/lib/rake/file_utils_ext.rb +142 -0
  51. data/lib/rake/gempackagetask.rb +6 -90
  52. data/lib/rake/invocation_chain.rb +51 -0
  53. data/lib/rake/invocation_exception_mixin.rb +16 -0
  54. data/lib/rake/loaders/makefile.rb +13 -15
  55. data/lib/rake/multi_task.rb +16 -0
  56. data/lib/rake/name_space.rb +25 -0
  57. data/lib/rake/packagetask.rb +13 -12
  58. data/lib/rake/pathmap.rb +1 -0
  59. data/lib/rake/pseudo_status.rb +24 -0
  60. data/lib/rake/rake_module.rb +29 -0
  61. data/lib/rake/rake_test_loader.rb +10 -2
  62. data/lib/rake/rdoctask.rb +211 -190
  63. data/lib/rake/ruby182_test_unit_fix.rb +9 -7
  64. data/lib/rake/rule_recursion_overflow_error.rb +20 -0
  65. data/lib/rake/runtest.rb +4 -6
  66. data/lib/rake/task.rb +327 -0
  67. data/lib/rake/task_argument_error.rb +7 -0
  68. data/lib/rake/task_arguments.rb +74 -0
  69. data/lib/rake/task_manager.rb +307 -0
  70. data/lib/rake/tasklib.rb +1 -2
  71. data/lib/rake/testtask.rb +57 -27
  72. data/lib/rake/version.rb +10 -0
  73. data/lib/rake/win32.rb +4 -4
  74. data/lib/rake.rb +29 -2470
  75. data/test/contrib/test_sys.rb +8 -31
  76. data/test/data/access/Rakefile +33 -0
  77. data/test/data/comments/Rakefile +18 -0
  78. data/test/data/default/Rakefile +1 -1
  79. data/test/data/deprecated_import/Rakefile +1 -0
  80. data/test/data/dryrun/Rakefile +1 -1
  81. data/test/data/file_creation_task/Rakefile +1 -1
  82. data/test/data/namespace/Rakefile +9 -0
  83. data/test/data/rakelib/test1.rb +1 -0
  84. data/test/data/verbose/Rakefile +34 -0
  85. data/test/{filecreation.rb → file_creation.rb} +11 -7
  86. data/test/functional/functional_test.rb +25 -0
  87. data/test/{session_functional.rb → functional/session_based_tests.rb} +141 -23
  88. data/test/in_environment.rb +7 -5
  89. data/test/{test_application.rb → lib/application_test.rb} +331 -143
  90. data/test/{test_clean.rb → lib/clean_test.rb} +1 -0
  91. data/test/{test_definitions.rb → lib/definitions_test.rb} +3 -3
  92. data/test/lib/dsl_test.rb +52 -0
  93. data/test/{test_earlytime.rb → lib/earlytime_test.rb} +1 -2
  94. data/test/{test_extension.rb → lib/extension_test.rb} +2 -2
  95. data/test/{test_file_creation_task.rb → lib/file_creation_task_test.rb} +1 -1
  96. data/test/{test_file_task.rb → lib/file_task_test.rb} +4 -4
  97. data/test/{test_filelist.rb → lib/filelist_test.rb} +38 -24
  98. data/test/{test_fileutils.rb → lib/fileutils_test.rb} +27 -22
  99. data/test/{test_multitask.rb → lib/multitask_test.rb} +14 -6
  100. data/test/lib/package_task_test.rb +82 -0
  101. data/test/{test_pathmap.rb → lib/pathmap_test.rb} +3 -2
  102. data/test/{test_rake.rb → lib/rake_test.rb} +1 -1
  103. data/test/{test_rdoc_task.rb → lib/rdoc_task_test.rb} +19 -23
  104. data/test/{test_require.rb → lib/require_test.rb} +8 -2
  105. data/test/{test_rules.rb → lib/rules_test.rb} +2 -3
  106. data/test/{test_task_arguments.rb → lib/task_arguments_test.rb} +5 -5
  107. data/test/{test_task_manager.rb → lib/task_manager_test.rb} +15 -5
  108. data/test/{test_tasks.rb → lib/task_test.rb} +84 -21
  109. data/test/{test_test_task.rb → lib/test_task_test.rb} +3 -3
  110. data/test/lib/testtask_test.rb +49 -0
  111. data/test/{test_top_level_functions.rb → lib/top_level_functions_test.rb} +5 -3
  112. data/test/{test_win32.rb → lib/win32_test.rb} +19 -0
  113. data/test/rake_test_setup.rb +5 -9
  114. data/test/ruby_version_test.rb +3 -0
  115. data/test/test_helper.rb +19 -0
  116. metadata +108 -49
  117. data/test/functional.rb +0 -15
  118. data/test/test_package_task.rb +0 -118
  119. /data/test/{test_ftp.rb → lib/ftp_test.rb} +0 -0
  120. /data/test/{test_invocation_chain.rb → lib/invocation_chain_test.rb} +0 -0
  121. /data/test/{test_makefile_loader.rb → lib/makefile_loader_test.rb} +0 -0
  122. /data/test/{test_namespace.rb → lib/namespace_test.rb} +0 -0
  123. /data/test/{test_pseudo_status.rb → lib/pseudo_status_test.rb} +0 -0
  124. /data/test/{test_tasklib.rb → lib/tasklib_test.rb} +0 -0
@@ -0,0 +1,112 @@
1
+ = Rake 0.9.0 Released
2
+
3
+ Rake version 0.9.0 has a number of bug fixes and enhancments (see
4
+ below for more details). Additionally, the internals have be slightly
5
+ restructured and improved.
6
+
7
+ == Changes
8
+
9
+ === New Features / Enhancements / Bug Fixes in Version 0.9.0
10
+
11
+ * Rake now warns when the deprecated :needs syntax used (and suggests
12
+ the proper syntax in the warning).
13
+
14
+ * Moved Rake DSL commands to top level ruby object 'main'. Rake DSL
15
+ commands are no longer private methods in Object. (Suggested by
16
+ James M. Lawrence/quix)
17
+
18
+ * Rake now uses case-insensitive comparisons to find the Rakefile on Windows.
19
+ Based on patch by Roger Pack.
20
+
21
+ * Rake now requires (instead of loads) files in the test task. Patch by Cezary
22
+ Baginski.
23
+
24
+ * Fixed typos. Patches by Sean Scot August Moon and R.T. Lechow.
25
+
26
+ * Rake now prints the Rakefile directory only when it's different from the
27
+ current directory. Patch by Alex Chaffee.
28
+
29
+ * Improved rakefile_location discovery on Windows. Patch by James Tucker.
30
+
31
+ * Rake now recognizes "Windows Server" as a windows system. Patch by Matthias
32
+ Lüdtke
33
+
34
+ * Rake::RDocTask is deprecated. Use RDoc::Task from RDoc 2.4.2+ (require
35
+ 'rdoc/task')
36
+
37
+ * Rake::GemPackageTask is deprecated. Use Gem::PackageTask (require
38
+ 'rubygems/package_task')
39
+
40
+ * Rake now outputs various messages to $stderr instead of $stdout.
41
+
42
+ * Rake no longer emits warnings for Config. Patch by Santiago Pastorino.
43
+
44
+ * Removed Rake's DSL methods from the top level scope. If you need to
45
+ call 'task :xzy' in your code, include Rake::DSL into your class, or
46
+ put the code in a Rake::DSL.environment do ... end block.
47
+
48
+ * Split rake.rb into individual files.
49
+
50
+ * Support for the --where (-W) flag for showing where a task is defined.
51
+
52
+ * Fixed quoting in test task.
53
+ (http://onestepback.org/redmine/issues/show/44,
54
+ http://www.pivotaltracker.com/story/show/1223138)
55
+
56
+ * Fixed the silent option parsing problem.
57
+ (http://onestepback.org/redmine/issues/show/47)
58
+
59
+ * Fixed :verbose=>false flag on sh and ruby commands.
60
+
61
+ * Rake command line options may be given by default in a RAKEOPT
62
+ environment variable.
63
+
64
+ * Errors in Rake will now display the task invocation chain in effect
65
+ at the time of the error.
66
+
67
+ * Accepted change by warnickr to not expand test patterns in shell
68
+ (allowing more files in the test suite).
69
+
70
+ * Fixed that file tasks did not perform prereq lookups in scope
71
+ (Redmine #57).
72
+
73
+ == What is Rake
74
+
75
+ Rake is a build tool similar to the make program in many ways. But
76
+ instead of cryptic make recipes, Rake uses standard Ruby code to
77
+ declare tasks and dependencies. You have the full power of a modern
78
+ scripting language built right into your build tool.
79
+
80
+ == Availability
81
+
82
+ The easiest way to get and install rake is via RubyGems ...
83
+
84
+ gem install rake (you may need root/admin privileges)
85
+
86
+ Otherwise, you can get it from the more traditional places:
87
+
88
+ Home Page:: http://rake.rubyforge.org/
89
+ Download:: http://rubyforge.org/project/showfiles.php?group_id=50
90
+ GitHub:: git://github.com/jimweirich/rake.git
91
+
92
+ == Thanks
93
+
94
+ As usual, it was input from users that drove a alot of these changes. The
95
+ following people either contributed patches, made suggestions or made
96
+ otherwise helpful comments. Thanks to ...
97
+
98
+ * James M. Lawrence (quix)
99
+ * Roger Pack
100
+ * Cezary Baginski
101
+ * Sean Scot August Moon
102
+ * R.T. Lechow
103
+ * Alex Chaffee
104
+ * James Tucker
105
+ * Matthias Lüdtke
106
+ * Santiago Pastorino
107
+
108
+ Also, bit thanks to Eric Hodel for assisting with getting this release
109
+ out the door (where "assisting" includes, but is not by any means
110
+ limited to, "pushing" me to get it done).
111
+
112
+ -- Jim Weirich
data/install.rb CHANGED
@@ -1,8 +1,8 @@
1
1
  require 'rbconfig'
2
2
  require 'find'
3
- require 'ftools'
3
+ require 'fileutils'
4
4
 
5
- include Config
5
+ include RbConfig
6
6
 
7
7
  $ruby = CONFIG['ruby_install_name']
8
8
 
@@ -27,7 +27,7 @@ def installBIN(from, opfile)
27
27
 
28
28
  fail "Cannot find a temporary directory" unless tmp_dir
29
29
  tmp_file = File.join(tmp_dir, "_tmp")
30
-
30
+
31
31
  File.open(from) do |ip|
32
32
  File.open(tmp_file, "w") do |op|
33
33
  ruby = File.join($realbindir, $ruby)
@@ -37,8 +37,9 @@ def installBIN(from, opfile)
37
37
  end
38
38
 
39
39
  opfile += ".rb" if CONFIG["target_os"] =~ /mswin/i
40
- File::install(tmp_file, File.join($bindir, opfile), 0755, true)
41
- File::unlink(tmp_file)
40
+ FileUtils.install(tmp_file, File.join($bindir, opfile),
41
+ {:mode => 0755, :verbose => true})
42
+ File.unlink(tmp_file)
42
43
  end
43
44
 
44
45
  $sitedir = CONFIG["sitelibdir"]
@@ -61,14 +62,14 @@ bindir = CONFIG["bindir"]
61
62
  if (destdir = ENV['DESTDIR'])
62
63
  $bindir = destdir + $bindir
63
64
  $sitedir = destdir + $sitedir
64
-
65
- File::makedirs($bindir)
66
- File::makedirs($sitedir)
65
+
66
+ FileUtils.mkdir_p($bindir)
67
+ FileUtils.mkdir_p($sitedir)
67
68
  end
68
69
 
69
70
  rake_dest = File.join($sitedir, "rake")
70
- File::makedirs(rake_dest, true)
71
- File::chmod(0755, rake_dest)
71
+ FileUtils.mkdir_p(rake_dest, {:verbose => true})
72
+ File.chmod(0755, rake_dest)
72
73
 
73
74
  # The library files
74
75
 
@@ -78,9 +79,10 @@ for fn in files
78
79
  fn_dir = File.dirname(fn)
79
80
  target_dir = File.join($sitedir, fn_dir)
80
81
  if ! File.exist?(target_dir)
81
- File.makedirs(target_dir)
82
+ FileUtils.mkdir_p(target_dir)
82
83
  end
83
- File::install(File.join('lib', fn), File.join($sitedir, fn), 0644, true)
84
+ FileUtils.install(File.join('lib', fn), File.join($sitedir, fn),
85
+ {:mode => 0644, :verbose => true})
84
86
  end
85
87
 
86
88
  # and the executable
@@ -1,6 +1,6 @@
1
1
  #
2
2
  # Copyright (c) 2008 James M. Lawrence
3
- #
3
+ #
4
4
  # Permission is hereby granted, free of charge, to any person
5
5
  # obtaining a copy of this software and associated documentation files
6
6
  # (the "Software"), to deal in the Software without restriction,
@@ -8,10 +8,10 @@
8
8
  # publish, distribute, sublicense, and/or sell copies of the Software,
9
9
  # and to permit persons to whom the Software is furnished to do so,
10
10
  # subject to the following conditions:
11
- #
11
+ #
12
12
  # The above copyright notice and this permission notice shall be
13
13
  # included in all copies or substantial portions of the Software.
14
- #
14
+ #
15
15
  # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
16
  # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17
17
  # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -27,9 +27,10 @@ require 'rbconfig'
27
27
  #
28
28
  # Alternate implementations of system() and backticks `` on Windows
29
29
  # for ruby-1.8 and earlier.
30
- #
30
+ #
31
31
  module Rake::AltSystem
32
- WINDOWS = Config::CONFIG["host_os"] =~ %r!(msdos|mswin|djgpp|mingw)!
32
+ WINDOWS = RbConfig::CONFIG["host_os"] =~
33
+ %r!(msdos|mswin|djgpp|mingw|[Ww]indows)!
33
34
 
34
35
  class << self
35
36
  def define_module_function(name, &block)
@@ -37,7 +38,7 @@ module Rake::AltSystem
37
38
  module_function(name)
38
39
  end
39
40
  end
40
-
41
+
41
42
  if WINDOWS and RUBY_VERSION < "1.9.0"
42
43
  RUNNABLE_EXTS = %w[com exe bat cmd]
43
44
  RUNNABLE_PATTERN = %r!\.(#{RUNNABLE_EXTS.join('|')})\Z!i