rake 0.9.2 → 13.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (170) hide show
  1. checksums.yaml +7 -0
  2. data/CONTRIBUTING.rdoc +43 -0
  3. data/Gemfile +10 -0
  4. data/History.rdoc +2386 -0
  5. data/MIT-LICENSE +1 -1
  6. data/README.rdoc +64 -109
  7. data/Rakefile +22 -386
  8. data/bin/bundle +105 -0
  9. data/bin/console +7 -0
  10. data/bin/rake +20 -23
  11. data/bin/rdoc +29 -0
  12. data/bin/rubocop +29 -0
  13. data/bin/setup +6 -0
  14. data/doc/command_line_usage.rdoc +65 -21
  15. data/doc/glossary.rdoc +40 -49
  16. data/doc/jamis.rb +1 -0
  17. data/doc/rake.1 +156 -0
  18. data/doc/rakefile.rdoc +127 -62
  19. data/exe/rake +27 -0
  20. data/lib/rake.rb +37 -31
  21. data/lib/rake/application.rb +507 -272
  22. data/lib/rake/backtrace.rb +24 -0
  23. data/lib/rake/clean.rb +55 -8
  24. data/lib/rake/cloneable.rb +11 -19
  25. data/lib/rake/cpu_counter.rb +107 -0
  26. data/lib/rake/default_loader.rb +5 -0
  27. data/lib/rake/dsl_definition.rb +74 -46
  28. data/lib/rake/early_time.rb +5 -1
  29. data/lib/rake/ext/core.rb +5 -6
  30. data/lib/rake/ext/string.rb +61 -52
  31. data/lib/rake/file_creation_task.rb +4 -3
  32. data/lib/rake/file_list.rb +81 -49
  33. data/lib/rake/file_task.rb +15 -8
  34. data/lib/rake/file_utils.rb +69 -47
  35. data/lib/rake/file_utils_ext.rb +18 -26
  36. data/lib/rake/invocation_chain.rb +25 -19
  37. data/lib/rake/invocation_exception_mixin.rb +1 -0
  38. data/lib/rake/late_time.rb +18 -0
  39. data/lib/rake/linked_list.rb +112 -0
  40. data/lib/rake/loaders/makefile.rb +23 -9
  41. data/lib/rake/multi_task.rb +4 -6
  42. data/lib/rake/name_space.rb +36 -23
  43. data/lib/rake/packagetask.rb +71 -34
  44. data/lib/rake/phony.rb +16 -0
  45. data/lib/rake/private_reader.rb +21 -0
  46. data/lib/rake/promise.rb +100 -0
  47. data/lib/rake/pseudo_status.rb +8 -2
  48. data/lib/rake/rake_module.rb +41 -3
  49. data/lib/rake/rake_test_loader.rb +21 -7
  50. data/lib/rake/rule_recursion_overflow_error.rb +2 -2
  51. data/lib/rake/scope.rb +43 -0
  52. data/lib/rake/task.rb +186 -79
  53. data/lib/rake/task_argument_error.rb +1 -0
  54. data/lib/rake/task_arguments.rb +50 -15
  55. data/lib/rake/task_manager.rb +89 -65
  56. data/lib/rake/tasklib.rb +2 -12
  57. data/lib/rake/testtask.rb +61 -63
  58. data/lib/rake/thread_history_display.rb +49 -0
  59. data/lib/rake/thread_pool.rb +163 -0
  60. data/lib/rake/trace_output.rb +23 -0
  61. data/lib/rake/version.rb +7 -7
  62. data/lib/rake/win32.rb +14 -18
  63. data/rake.gemspec +43 -0
  64. metadata +82 -221
  65. data/.gemtest +0 -0
  66. data/CHANGES +0 -509
  67. data/RRR +0 -9
  68. data/TODO +0 -20
  69. data/doc/rake.1.gz +0 -0
  70. data/doc/release_notes/rake-0.4.14.rdoc +0 -23
  71. data/doc/release_notes/rake-0.4.15.rdoc +0 -35
  72. data/doc/release_notes/rake-0.5.0.rdoc +0 -53
  73. data/doc/release_notes/rake-0.5.3.rdoc +0 -78
  74. data/doc/release_notes/rake-0.5.4.rdoc +0 -46
  75. data/doc/release_notes/rake-0.6.0.rdoc +0 -141
  76. data/doc/release_notes/rake-0.7.0.rdoc +0 -119
  77. data/doc/release_notes/rake-0.7.1.rdoc +0 -59
  78. data/doc/release_notes/rake-0.7.2.rdoc +0 -121
  79. data/doc/release_notes/rake-0.7.3.rdoc +0 -47
  80. data/doc/release_notes/rake-0.8.0.rdoc +0 -114
  81. data/doc/release_notes/rake-0.8.2.rdoc +0 -165
  82. data/doc/release_notes/rake-0.8.3.rdoc +0 -112
  83. data/doc/release_notes/rake-0.8.4.rdoc +0 -147
  84. data/doc/release_notes/rake-0.8.5.rdoc +0 -53
  85. data/doc/release_notes/rake-0.8.6.rdoc +0 -55
  86. data/doc/release_notes/rake-0.8.7.rdoc +0 -55
  87. data/doc/release_notes/rake-0.9.0.rdoc +0 -112
  88. data/doc/release_notes/rake-0.9.1.rdoc +0 -52
  89. data/doc/release_notes/rake-0.9.2.rdoc +0 -49
  90. data/install.rb +0 -90
  91. data/lib/rake/alt_system.rb +0 -109
  92. data/lib/rake/classic_namespace.rb +0 -9
  93. data/lib/rake/contrib/compositepublisher.rb +0 -21
  94. data/lib/rake/contrib/ftptools.rb +0 -150
  95. data/lib/rake/contrib/publisher.rb +0 -69
  96. data/lib/rake/contrib/rubyforgepublisher.rb +0 -16
  97. data/lib/rake/contrib/sshpublisher.rb +0 -45
  98. data/lib/rake/contrib/sys.rb +0 -191
  99. data/lib/rake/ext/module.rb +0 -39
  100. data/lib/rake/ext/time.rb +0 -14
  101. data/lib/rake/gempackagetask.rb +0 -13
  102. data/lib/rake/pathmap.rb +0 -1
  103. data/lib/rake/rdoctask.rb +0 -230
  104. data/lib/rake/ruby182_test_unit_fix.rb +0 -25
  105. data/lib/rake/runtest.rb +0 -21
  106. data/test/check_expansion.rb +0 -5
  107. data/test/check_no_expansion.rb +0 -5
  108. data/test/data/access/Rakefile +0 -35
  109. data/test/data/chains/Rakefile +0 -15
  110. data/test/data/comments/Rakefile +0 -18
  111. data/test/data/default/Rakefile +0 -17
  112. data/test/data/deprecated_import/Rakefile +0 -1
  113. data/test/data/dryrun/Rakefile +0 -22
  114. data/test/data/extra/Rakefile +0 -1
  115. data/test/data/file_creation_task/Rakefile +0 -31
  116. data/test/data/imports/Rakefile +0 -19
  117. data/test/data/imports/deps.mf +0 -1
  118. data/test/data/multidesc/Rakefile +0 -15
  119. data/test/data/namespace/Rakefile +0 -64
  120. data/test/data/rakelib/test1.rb +0 -4
  121. data/test/data/rbext/rakefile.rb +0 -3
  122. data/test/data/sample.mf +0 -14
  123. data/test/data/statusreturn/Rakefile +0 -6
  124. data/test/data/unittest/Rakefile +0 -1
  125. data/test/data/verbose/Rakefile +0 -34
  126. data/test/file_creation.rb +0 -34
  127. data/test/helper.rb +0 -44
  128. data/test/in_environment.rb +0 -35
  129. data/test/reqfile.rb +0 -3
  130. data/test/reqfile2.rb +0 -3
  131. data/test/shellcommand.rb +0 -3
  132. data/test/test_rake.rb +0 -38
  133. data/test/test_rake_application.rb +0 -364
  134. data/test/test_rake_application_options.rb +0 -382
  135. data/test/test_rake_clean.rb +0 -12
  136. data/test/test_rake_definitions.rb +0 -80
  137. data/test/test_rake_directory_task.rb +0 -55
  138. data/test/test_rake_dsl.rb +0 -73
  139. data/test/test_rake_early_time.rb +0 -31
  140. data/test/test_rake_extension.rb +0 -59
  141. data/test/test_rake_file_creation_task.rb +0 -62
  142. data/test/test_rake_file_list.rb +0 -633
  143. data/test/test_rake_file_list_path_map.rb +0 -8
  144. data/test/test_rake_file_task.rb +0 -104
  145. data/test/test_rake_file_utils.rb +0 -252
  146. data/test/test_rake_ftp_file.rb +0 -59
  147. data/test/test_rake_functional.rb +0 -468
  148. data/test/test_rake_invocation_chain.rb +0 -52
  149. data/test/test_rake_makefile_loader.rb +0 -23
  150. data/test/test_rake_multi_task.rb +0 -51
  151. data/test/test_rake_name_space.rb +0 -43
  152. data/test/test_rake_package_task.rb +0 -78
  153. data/test/test_rake_path_map.rb +0 -157
  154. data/test/test_rake_path_map_explode.rb +0 -31
  155. data/test/test_rake_path_map_partial.rb +0 -18
  156. data/test/test_rake_pseudo_status.rb +0 -20
  157. data/test/test_rake_rdoc_task.rb +0 -81
  158. data/test/test_rake_require.rb +0 -35
  159. data/test/test_rake_rules.rb +0 -346
  160. data/test/test_rake_task.rb +0 -271
  161. data/test/test_rake_task_argument_parsing.rb +0 -116
  162. data/test/test_rake_task_arguments.rb +0 -86
  163. data/test/test_rake_task_lib.rb +0 -9
  164. data/test/test_rake_task_manager.rb +0 -145
  165. data/test/test_rake_task_manager_argument_resolution.rb +0 -36
  166. data/test/test_rake_task_with_arguments.rb +0 -162
  167. data/test/test_rake_test_task.rb +0 -122
  168. data/test/test_rake_top_level_functions.rb +0 -76
  169. data/test/test_rake_win32.rb +0 -83
  170. data/test/test_sys.rb +0 -20
@@ -1,59 +0,0 @@
1
- = Rake 0.7.1 Released
2
-
3
- Version 0.7.1 supplies a bug fix and a few minor enhancements.
4
-
5
- == Changes
6
-
7
- === Bug Fixes in 0.7.1
8
-
9
- * Changes in the exception reported for the FileUtils.ln caused
10
- safe_ln to fail with a NotImplementedError. Rake 0.7.1 will now
11
- catch that error or any StandardError and properly fall back to
12
- using +cp+.
13
-
14
- === New Features in 0.7.1
15
-
16
- * You can filter the results of the --task option by supplying an
17
- optional regular expression. This allows the user to easily find a
18
- particular task name in a long list of possible names.
19
-
20
- * Transforming procs in a rule may now return a list of prerequisites.
21
- This allows more flexible rule formation.
22
-
23
- * FileList and String now support a +pathmap+ melthod that makes the
24
- transforming paths a bit easier. See the API docs for +pathmap+ for
25
- details.
26
-
27
- * The -f option without a value will disable the search for a
28
- Rakefile. This allows the Rakefile to be defined entirely in a
29
- library (and loaded with the -r option). The current working
30
- directory is not changed when this is done.
31
-
32
- == What is Rake
33
-
34
- Rake is a build tool similar to the make program in many ways. But
35
- instead of cryptic make recipes, Rake uses standard Ruby code to
36
- declare tasks and dependencies. You have the full power of a modern
37
- scripting language built right into your build tool.
38
-
39
- == Availability
40
-
41
- The easiest way to get and install rake is via RubyGems ...
42
-
43
- gem install rake (you may need root/admin privileges)
44
-
45
- Otherwise, you can get it from the more traditional places:
46
-
47
- Home Page:: http://rake.rubyforge.org/
48
- Download:: http://rubyforge.org/project/showfiles.php?group_id=50
49
-
50
- == Thanks
51
-
52
- As usual, it was input from users that drove a alot of these changes.
53
- The following people either contributed patches, made suggestions or
54
- made otherwise helpful comments. Thanks to ...
55
-
56
- * James Britt and Assaph Mehr for reporting and helping to debug the
57
- safe_ln issue.
58
-
59
- -- Jim Weirich
@@ -1,121 +0,0 @@
1
- = Rake 0.7.2 Released
2
-
3
- Version 0.7.2 supplies a bug fix and a few minor enhancements. In
4
- particular, the new version fixes an incompatibility with the soon to
5
- be released Ruby 1.8.6. We strongly recommend upgrading to Rake 0.7.2
6
- in order to be compatible with the new version of Ruby.
7
-
8
- == Changes
9
-
10
- === Bug Fixes in 0.7.2
11
-
12
- There are quite a number of bug fixes in the new 0.7.2 version of
13
- Rake:
14
-
15
- * Removed dependency on internal fu_xxx functions from FileUtils.
16
-
17
- * Error messages are now send to stderr rather than stdout (from
18
- Payton Quackenbush).
19
-
20
- * Better error handling on invalid command line arguments (from Payton
21
- Quackenbush).
22
-
23
- * Fixed some bugs where the application object was going to the global
24
- appliation instead of using its own data.
25
-
26
- * Fixed the method name leak from FileUtils (bug found by Glenn
27
- Vanderburg).
28
-
29
- * Added test for noop, bad_option and verbose flags to sh command.
30
-
31
- * Added a description to the gem task in GemPackageTask.
32
-
33
- * Fixed a bug when rules have multiple prerequisites (patch by Joel
34
- VanderWerf)
35
-
36
- * Added the handful of RakeFileUtils to the private method as well.
37
-
38
- === New Features in 0.7.2
39
-
40
- The following new features are available in Rake version 0.7.2:
41
-
42
- * Added square and curly bracket patterns to FileList#include (Tilman
43
- Sauerbeck).
44
-
45
- * FileLists can now pass a block to FileList#exclude to exclude files
46
- based on calculated values.
47
-
48
- * Added plain filename support to rule dependents (suggested by Nobu
49
- Nakada).
50
-
51
- * Added pathmap support to rule dependents. In other words, if a
52
- pathmap format (beginning with a '%') is given as a Rake rule
53
- dependent, then the name of the depend will be the name of the
54
- target with the pathmap format applied.
55
-
56
- * Added a 'tasks' method to a namespace to get a list of tasks
57
- associated with the namespace.
58
-
59
- * Added tar_command and zip_command options to the Package task.
60
-
61
- * The clean task will no longer delete 'core' if it is a directory.
62
-
63
- === Internal Rake Improvements
64
-
65
- The following changes will are mainly internal improvements and
66
- refactorings and have little effect on the end user. But they may be
67
- of interest to the general public.
68
-
69
- * Added rcov task and updated unit testing for better code coverage.
70
-
71
- * Added a 'shame' task to the Rakefile.
72
-
73
- * Added rake_extension to handle detection of extension collisions.
74
-
75
- * Added a protected 'require "rubygems"' to test/test_application to
76
- unbreak cruisecontrol.rb.
77
-
78
- * Removed rake_dup. Now we just simply rescue a bad dup.
79
-
80
- * Refactored the FileList reject logic to remove duplication.
81
-
82
- * Removed if __FILE__ at the end of the rake.rb file.
83
-
84
- == What is Rake
85
-
86
- Rake is a build tool similar to the make program in many ways. But
87
- instead of cryptic make recipes, Rake uses standard Ruby code to
88
- declare tasks and dependencies. You have the full power of a modern
89
- scripting language built right into your build tool.
90
-
91
- == Availability
92
-
93
- The easiest way to get and install rake is via RubyGems ...
94
-
95
- gem install rake (you may need root/admin privileges)
96
-
97
- Otherwise, you can get it from the more traditional places:
98
-
99
- Home Page:: http://rake.rubyforge.org/
100
- Download:: http://rubyforge.org/project/showfiles.php?group_id=50
101
-
102
- == Thanks
103
-
104
- As usual, it was input from users that drove a alot of these changes.
105
- The following people either contributed patches, made suggestions or
106
- made otherwise helpful comments. Thanks to ...
107
-
108
- * Payton Quackenbush -- For several error handling improvements.
109
-
110
- * Glenn Vanderburg -- For finding and fixing the method name leak from
111
- FileUtils.
112
-
113
- * Joel VanderWerf -- for finding and fixing a bug in the handling of
114
- multiple prerequisites.
115
-
116
- * Tilman Sauerbeck -- For some enhancing FileList to support more
117
- advanced file globbing.
118
-
119
- * Nobu Nakada -- For suggesting plain file name support to rule dependents.
120
-
121
- -- Jim Weirich
@@ -1,47 +0,0 @@
1
- = Rake 0.7.3 Released
2
-
3
- Rake version 0.7.3 is a minor release that includes some refactoring to better
4
- support custom Rake applications.
5
-
6
- == Changes
7
-
8
- === New Features in Version 0.7.3
9
-
10
- * Added the +init+ and +top_level+ methods to make the creation of custom Rake applications a bit easier. E.g.
11
-
12
- gem 'rake', ">= 0.7.3"
13
- require 'rake'
14
-
15
- Rake.application.init('myrake')
16
-
17
- task :default do
18
- something_interesting
19
- end
20
-
21
- Rake.application.top_level
22
-
23
- == What is Rake
24
-
25
- Rake is a build tool similar to the make program in many ways. But instead of
26
- cryptic make recipes, Rake uses standard Ruby code to declare tasks and
27
- dependencies. You have the full power of a modern scripting language built
28
- right into your build tool.
29
-
30
- == Availability
31
-
32
- The easiest way to get and install rake is via RubyGems ...
33
-
34
- gem install rake (you may need root/admin privileges)
35
-
36
- Otherwise, you can get it from the more traditional places:
37
-
38
- Home Page:: http://rake.rubyforge.org/
39
- Download:: http://rubyforge.org/project/showfiles.php?group_id=50
40
-
41
- == Thanks
42
-
43
- As usual, it was input from users that drove a alot of these changes. The
44
- following people either contributed patches, made suggestions or made
45
- otherwise helpful comments. Thanks to ...
46
-
47
- -- Jim Weirich
@@ -1,114 +0,0 @@
1
- = Rake 0.8.0/0.8.1 Released
2
-
3
- Rake version 0.8.0 is a new release of rake that includes serveral new
4
- features.
5
-
6
- == Changes
7
-
8
- === New Features in Version 0.8.0
9
-
10
- * Tasks can now receive command line parameters. See the examples
11
- below for more details.
12
-
13
- * Comments are limited to 80 columns on output, but full comments can
14
- be seen by using the -D parameter. (feature suggested by Jamis
15
- Buck).
16
-
17
- * Explicit exit(n) calls will now set the exit status to n. (patch
18
- provided by Stephen Touset).
19
-
20
- * Rake is now compatible with Ruby 1.9.
21
-
22
- Version 0.8.1 is a minor update that includes additional Ruby 1.9
23
- compatibility fixes.
24
-
25
- == What is Rake
26
-
27
- Rake is a build tool similar to the make program in many ways. But
28
- instead of cryptic make recipes, Rake uses standard Ruby code to
29
- declare tasks and dependencies. You have the full power of a modern
30
- scripting language built right into your build tool.
31
-
32
- == Availability
33
-
34
- The easiest way to get and install rake is via RubyGems ...
35
-
36
- gem install rake (you may need root/admin privileges)
37
-
38
- Otherwise, you can get it from the more traditional places:
39
-
40
- Home Page:: http://rake.rubyforge.org/
41
- Download:: http://rubyforge.org/project/showfiles.php?group_id=50
42
-
43
- == Task Argument Examples
44
-
45
- Prior to version 0.8.0, rake was only able to handle command line
46
- arguments of the form NAME=VALUE that were passed into Rake via the
47
- ENV hash. Many folks had asked for some kind of simple command line
48
- arguments, perhaps using "--" to separate regular task names from
49
- argument values on the command line. The problem is that there was no
50
- easy way to associate positional arguments on the command line with
51
- different tasks. Suppose both tasks :a and :b expect a command line
52
- argument: does the first value go with :a? What if :b is run first?
53
- Should it then get the first command line argument.
54
-
55
- Rake 0.8.0 solves this problem by explicitly passing values directly
56
- to the tasks that need them. For example, if I had a release task
57
- that required a version number, I could say:
58
-
59
- rake release[0.8.0]
60
-
61
- And the string "0.8.0" will be passed to the :release task. Multiple
62
- arguments can be passed by separating them with a comma, for example:
63
-
64
- rake name[john,doe]
65
-
66
- Just a few words of caution. The rake task name and its arguments
67
- need to be a single command line argument to rake. This generally
68
- means no spaces. If spaces are needed, then the entire rake +
69
- argument string should be quoted. Something like this:
70
-
71
- rake "name[billy bob, smith]"
72
-
73
- (Quoting rules vary between operating systems and shells, so make sure
74
- you consult the proper docs for your OS/shell).
75
-
76
- === Tasks that Expect Parameters
77
-
78
- Parameters are only given to tasks that are setup to expect them. In
79
- order to handle named parameters, the task declaration syntax for
80
- tasks has been extended slightly.
81
-
82
- For example, a task that needs a first name and last name might be
83
- declared as:
84
-
85
- task :name, :first_name, :last_name
86
-
87
- The first argument is still the name of the task (:name in this case).
88
- The next to argumements are the names of the parameters expected by
89
- :name (:first_name and :last_name in the example).
90
-
91
- To access the values of the paramters, the block defining the task
92
- behaviour can now accept a second parameter:
93
-
94
- task :name, :first_name, :last_name do |t, args|
95
- puts "First name is #{args.first_name}"
96
- puts "Last name is #{args.last_name}"
97
- end
98
-
99
- The first argument of the block "t" is always bound to the current
100
- task object. The second argument "args" is an open-struct like object
101
- that allows access to the task arguments. Extra command line
102
- arguments to a task are ignored. Missing command line arguments are
103
- given the nil value.
104
-
105
- == Thanks
106
-
107
- As usual, it was input from users that drove a alot of these changes. The
108
- following people either contributed patches, made suggestions or made
109
- otherwise helpful comments. Thanks to ...
110
-
111
- * Jamis Buck (for comment formatting suggestions)
112
- * Stephen Touset (for exit status patch).
113
-
114
- -- Jim Weirich
@@ -1,165 +0,0 @@
1
- = Rake 0.8.2 Released
2
-
3
- Rake version 0.8.2 is a new release of rake that includes a number of
4
- new features and numerous bug fixes.
5
-
6
- == Changes
7
-
8
- === New Features in Version 0.8.2
9
-
10
- * Switched from getoptlong to optparse (patches supplied by Edwin
11
- Pratomo).
12
-
13
- * The -T option will now attempt to dynamically sense the size of the
14
- terminal. The -T output will only self-truncate if the output is a
15
- tty. However, if RAKE_COLUMNS is explicitly set, it will be honored
16
- in any case. (Patch provided by Gavin Stark).
17
-
18
- * The following public methods have been added to rake task objects:
19
-
20
- * task.clear -- Clear both the prerequisites and actions of the
21
- target rake task.
22
- * task.clear_prerequisites -- Clear all the existing prerequisites
23
- from the target rake task.
24
- * task.clear_actions -- Clear all the existing actions from the
25
- target rake task.
26
- * task.reenable -- Re-enable a task, allowing its actions to be
27
- executed again if the task is invoked.
28
-
29
- * Changed RDoc test task to have no default template. This makes it
30
- easier for the tempate to pick up the template from the environment.
31
-
32
- * Default values for task arguments can easily be specified with the
33
- :with_defaults method. (Idea for default argument merging supplied
34
- by (Adam Q. Salter)
35
-
36
- === Bug Fixes in Version 0.8.2
37
-
38
- * Fixed bug in package task so that it will include the subdir
39
- directory in the package for testing. (Bug found by Adam Majer)
40
-
41
- * Fixed filename dependency order bug in test_inspect_pending and
42
- test_to_s_pending. (Bug found by Adam Majer)
43
-
44
- * Fixed check for file utils options to make them immune to the
45
- symbol/string differences. (Patch supplied by Edwin Pratomo)
46
-
47
- * Fixed bug with rules involving multiple source, where only the first
48
- dependency of a rule has any effect (Patch supplied by Emanuel
49
- Indermühle)
50
-
51
- * FileList#clone and FileList#dup have better sematics w.r.t. taint
52
- and freeze.
53
-
54
- * Changed from using Mutex to Monitor. Evidently Mutex causes thread
55
- join errors when Ruby is compiled with -disable-pthreads. (Patch
56
- supplied by Ittay Dror)
57
-
58
- * Fixed bug in makefile parser that had problems with extra spaces in
59
- file task names. (Patch supplied by Ittay Dror)
60
-
61
- == Other changes in Version 0.8.2
62
-
63
- * Added ENV var to rake's own Rakefile to prevent OS X from including
64
- extended attribute junk in the rake package tar file. (Bug found by
65
- Adam Majer)
66
-
67
- * Added a performance patch for reading large makefile dependency
68
- files. (Patch supplied by Ittay Dror)
69
-
70
- == What is Rake
71
-
72
- Rake is a build tool similar to the make program in many ways. But
73
- instead of cryptic make recipes, Rake uses standard Ruby code to
74
- declare tasks and dependencies. You have the full power of a modern
75
- scripting language built right into your build tool.
76
-
77
- == Availability
78
-
79
- The easiest way to get and install rake is via RubyGems ...
80
-
81
- gem install rake (you may need root/admin privileges)
82
-
83
- Otherwise, you can get it from the more traditional places:
84
-
85
- Home Page:: http://rake.rubyforge.org/
86
- Download:: http://rubyforge.org/project/showfiles.php?group_id=50
87
-
88
- == Task Argument Examples
89
-
90
- Prior to version 0.8.0, rake was only able to handle command line
91
- arguments of the form NAME=VALUE that were passed into Rake via the
92
- ENV hash. Many folks had asked for some kind of simple command line
93
- arguments, perhaps using "--" to separate regular task names from
94
- argument values on the command line. The problem is that there was no
95
- easy way to associate positional arguments on the command line with
96
- different tasks. Suppose both tasks :a and :b expect a command line
97
- argument: does the first value go with :a? What if :b is run first?
98
- Should it then get the first command line argument.
99
-
100
- Rake 0.8.0 solves this problem by explicitly passing values directly
101
- to the tasks that need them. For example, if I had a release task
102
- that required a version number, I could say:
103
-
104
- rake release[0.8.2]
105
-
106
- And the string "0.8.2" will be passed to the :release task. Multiple
107
- arguments can be passed by separating them with a comma, for example:
108
-
109
- rake name[john,doe]
110
-
111
- Just a few words of caution. The rake task name and its arguments
112
- need to be a single command line argument to rake. This generally
113
- means no spaces. If spaces are needed, then the entire rake +
114
- argument string should be quoted. Something like this:
115
-
116
- rake "name[billy bob, smith]"
117
-
118
- (Quoting rules vary between operating systems and shells, so make sure
119
- you consult the proper docs for your OS/shell).
120
-
121
- === Tasks that Expect Parameters
122
-
123
- Parameters are only given to tasks that are setup to expect them. In
124
- order to handle named parameters, the task declaration syntax for
125
- tasks has been extended slightly.
126
-
127
- For example, a task that needs a first name and last name might be
128
- declared as:
129
-
130
- task :name, :first_name, :last_name
131
-
132
- The first argument is still the name of the task (:name in this case).
133
- The next to argumements are the names of the parameters expected by
134
- :name (:first_name and :last_name in the example).
135
-
136
- To access the values of the paramters, the block defining the task
137
- behaviour can now accept a second parameter:
138
-
139
- task :name, :first_name, :last_name do |t, args|
140
- puts "First name is #{args.first_name}"
141
- puts "Last name is #{args.last_name}"
142
- end
143
-
144
- The first argument of the block "t" is always bound to the current
145
- task object. The second argument "args" is an open-struct like object
146
- that allows access to the task arguments. Extra command line
147
- arguments to a task are ignored. Missing command line arguments are
148
- given the nil value.
149
-
150
- == Thanks
151
-
152
- As usual, it was input from users that drove a alot of these changes. The
153
- following people either contributed patches, made suggestions or made
154
- otherwise helpful comments. Thanks to ...
155
-
156
- * Edwin Pratomo
157
- * Gavin Stark
158
- * Adam Q. Salter
159
- * Adam Majer
160
- * Emanuel Indermühle
161
- * Ittay Dror
162
- * Bheeshmar Redheendran (for spending an afternoon with me debugging
163
- windows issues)
164
-
165
- -- Jim Weirich