Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add rdoc, rake, and rake-compiler and preinstalled gems

  • Loading branch information...
commit 56edbcab2841afa1e9685d05667845bdd25fff89 1 parent 599d883
Evan Phoenix authored
Showing with 24,075 additions and 1 deletion.
  1. +9 −1 Rakefile
  2. BIN  preinstalled-gems/0.13/cache/rake-0.8.7.gem
  3. BIN  preinstalled-gems/0.13/cache/rake-compiler-0.6.0.gem
  4. BIN  preinstalled-gems/0.13/cache/rdoc-2.4.3.gem
  5. +440 −0 preinstalled-gems/0.13/gems/rake-0.8.7/CHANGES
  6. +21 −0 preinstalled-gems/0.13/gems/rake-0.8.7/MIT-LICENSE
  7. +196 −0 preinstalled-gems/0.13/gems/rake-0.8.7/README
  8. +430 −0 preinstalled-gems/0.13/gems/rake-0.8.7/Rakefile
  9. +20 −0 preinstalled-gems/0.13/gems/rake-0.8.7/TODO
  10. +31 −0 preinstalled-gems/0.13/gems/rake-0.8.7/bin/rake
  11. +88 −0 preinstalled-gems/0.13/gems/rake-0.8.7/install.rb
  12. +2,506 −0 preinstalled-gems/0.13/gems/rake-0.8.7/lib/rake.rb
  13. +108 −0 preinstalled-gems/0.13/gems/rake-0.8.7/lib/rake/alt_system.rb
  14. +8 −0 preinstalled-gems/0.13/gems/rake-0.8.7/lib/rake/classic_namespace.rb
  15. +33 −0 preinstalled-gems/0.13/gems/rake-0.8.7/lib/rake/clean.rb
  16. +24 −0 preinstalled-gems/0.13/gems/rake-0.8.7/lib/rake/contrib/compositepublisher.rb
  17. +153 −0 preinstalled-gems/0.13/gems/rake-0.8.7/lib/rake/contrib/ftptools.rb
  18. +75 −0 preinstalled-gems/0.13/gems/rake-0.8.7/lib/rake/contrib/publisher.rb
  19. +18 −0 preinstalled-gems/0.13/gems/rake-0.8.7/lib/rake/contrib/rubyforgepublisher.rb
  20. +47 −0 preinstalled-gems/0.13/gems/rake-0.8.7/lib/rake/contrib/sshpublisher.rb
  21. +209 −0 preinstalled-gems/0.13/gems/rake-0.8.7/lib/rake/contrib/sys.rb
  22. +97 −0 preinstalled-gems/0.13/gems/rake-0.8.7/lib/rake/gempackagetask.rb
  23. +42 −0 preinstalled-gems/0.13/gems/rake-0.8.7/lib/rake/loaders/makefile.rb
  24. +184 −0 preinstalled-gems/0.13/gems/rake-0.8.7/lib/rake/packagetask.rb
  25. +5 −0 preinstalled-gems/0.13/gems/rake-0.8.7/lib/rake/rake_test_loader.rb
  26. +209 −0 preinstalled-gems/0.13/gems/rake-0.8.7/lib/rake/rdoctask.rb
  27. +23 −0 preinstalled-gems/0.13/gems/rake-0.8.7/lib/rake/ruby182_test_unit_fix.rb
  28. +23 −0 preinstalled-gems/0.13/gems/rake-0.8.7/lib/rake/runtest.rb
  29. +23 −0 preinstalled-gems/0.13/gems/rake-0.8.7/lib/rake/tasklib.rb
  30. +161 −0 preinstalled-gems/0.13/gems/rake-0.8.7/lib/rake/testtask.rb
  31. +55 −0 preinstalled-gems/0.13/gems/rake-0.8.7/lib/rake/win32.rb
  32. +115 −0 preinstalled-gems/0.13/gems/rake-compiler-0.6.0/History.txt
  33. +20 −0 preinstalled-gems/0.13/gems/rake-compiler-0.6.0/LICENSE.txt
  34. +273 −0 preinstalled-gems/0.13/gems/rake-compiler-0.6.0/README.rdoc
  35. +23 −0 preinstalled-gems/0.13/gems/rake-compiler-0.6.0/Rakefile
  36. +24 −0 preinstalled-gems/0.13/gems/rake-compiler-0.6.0/bin/rake-compiler
  37. +1 −0  preinstalled-gems/0.13/gems/rake-compiler-0.6.0/cucumber.yml
  38. +71 −0 preinstalled-gems/0.13/gems/rake-compiler-0.6.0/features/compile.feature
  39. +22 −0 preinstalled-gems/0.13/gems/rake-compiler-0.6.0/features/cross-compile.feature
  40. +15 −0 preinstalled-gems/0.13/gems/rake-compiler-0.6.0/features/cross-package-multi.feature
  41. +14 −0 preinstalled-gems/0.13/gems/rake-compiler-0.6.0/features/cross-package.feature
  42. +40 −0 preinstalled-gems/0.13/gems/rake-compiler-0.6.0/features/package.feature
  43. +54 −0 preinstalled-gems/0.13/gems/rake-compiler-0.6.0/features/step_definitions/compilation.rb
  44. +32 −0 preinstalled-gems/0.13/gems/rake-compiler-0.6.0/features/step_definitions/cross_compilation.rb
  45. +30 −0 preinstalled-gems/0.13/gems/rake-compiler-0.6.0/features/step_definitions/execution.rb
  46. +32 −0 preinstalled-gems/0.13/gems/rake-compiler-0.6.0/features/step_definitions/folders.rb
  47. +30 −0 preinstalled-gems/0.13/gems/rake-compiler-0.6.0/features/step_definitions/gem.rb
  48. +7 −0 preinstalled-gems/0.13/gems/rake-compiler-0.6.0/features/support/env.rb
  49. +102 −0 preinstalled-gems/0.13/gems/rake-compiler-0.6.0/features/support/file_template_helpers.rb
  50. +96 −0 preinstalled-gems/0.13/gems/rake-compiler-0.6.0/features/support/generator_helpers.rb
  51. +14 −0 preinstalled-gems/0.13/gems/rake-compiler-0.6.0/features/support/platform_extension_helpers.rb
  52. +53 −0 preinstalled-gems/0.13/gems/rake-compiler-0.6.0/lib/rake/extensioncompiler.rb
  53. +376 −0 preinstalled-gems/0.13/gems/rake-compiler-0.6.0/lib/rake/extensiontask.rb
  54. +440 −0 preinstalled-gems/0.13/gems/rake-compiler-0.6.0/spec/lib/rake/extensiontask_spec.rb
  55. +20 −0 preinstalled-gems/0.13/gems/rake-compiler-0.6.0/spec/spec_helper.rb
  56. +22 −0 preinstalled-gems/0.13/gems/rake-compiler-0.6.0/spec/support/capture_output_helper.rb
  57. +185 −0 preinstalled-gems/0.13/gems/rake-compiler-0.6.0/tasks/bin/cross-ruby.rake
  58. +16 −0 preinstalled-gems/0.13/gems/rake-compiler-0.6.0/tasks/common.rake
  59. +15 −0 preinstalled-gems/0.13/gems/rake-compiler-0.6.0/tasks/cucumber.rake
  60. +57 −0 preinstalled-gems/0.13/gems/rake-compiler-0.6.0/tasks/gem.rake
  61. +82 −0 preinstalled-gems/0.13/gems/rake-compiler-0.6.0/tasks/news.rake
  62. +15 −0 preinstalled-gems/0.13/gems/rake-compiler-0.6.0/tasks/rdoc.rake
  63. +44 −0 preinstalled-gems/0.13/gems/rake-compiler-0.6.0/tasks/rdoc_publish.rake
  64. +74 −0 preinstalled-gems/0.13/gems/rake-compiler-0.6.0/tasks/release.rake
  65. +34 −0 preinstalled-gems/0.13/gems/rake-compiler-0.6.0/tasks/rspec.rake
  66. +14 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/.autotest
  67. +4 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/.document
  68. +260 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/History.txt
  69. +126 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/Manifest.txt
  70. +47 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/README.txt
  71. +58 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/RI.txt
  72. +71 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/Rakefile
  73. +35 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/bin/rdoc
  74. +5 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/bin/ri
  75. +398 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc.rb
  76. +54 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/alias.rb
  77. +10 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/anon_class.rb
  78. +190 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/any_method.rb
  79. +79 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/attr.rb
  80. +41 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/cache.rb
  81. +87 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/class_module.rb
  82. +152 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/code_object.rb
  83. +23 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/code_objects.rb
  84. +36 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/constant.rb
  85. +712 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/context.rb
  86. +340 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/diagram.rb
  87. +249 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/dot.rb
  88. +8 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/generator.rb
  89. +455 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/generator/darkfish.rb
  90. +194 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/generator/markup.rb
  91. +230 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/generator/ri.rb
  92. 0  preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/generator/template/darkfish/.document
  93. +281 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/generator/template/darkfish/classpage.rhtml
  94. +114 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/generator/template/darkfish/filepage.rhtml
  95. BIN  preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/generator/template/darkfish/images/brick.png
  96. BIN  preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/generator/template/darkfish/images/brick_link.png
  97. BIN  preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/generator/template/darkfish/images/bug.png
  98. BIN  preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/generator/template/darkfish/images/bullet_black.png
  99. BIN  preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/generator/template/darkfish/images/bullet_toggle_minus.png
  100. BIN  preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/generator/template/darkfish/images/bullet_toggle_plus.png
  101. BIN  preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/generator/template/darkfish/images/date.png
  102. BIN  preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/generator/template/darkfish/images/find.png
  103. BIN  preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/generator/template/darkfish/images/loadingAnimation.gif
  104. BIN  preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/generator/template/darkfish/images/macFFBgHack.png
  105. BIN  preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/generator/template/darkfish/images/package.png
  106. BIN  preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/generator/template/darkfish/images/page_green.png
  107. BIN  preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/generator/template/darkfish/images/page_white_text.png
  108. BIN  preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/generator/template/darkfish/images/page_white_width.png
  109. BIN  preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/generator/template/darkfish/images/plugin.png
  110. BIN  preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/generator/template/darkfish/images/ruby.png
  111. BIN  preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/generator/template/darkfish/images/tag_green.png
  112. BIN  preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/generator/template/darkfish/images/wrench.png
  113. BIN  preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/generator/template/darkfish/images/wrench_orange.png
  114. BIN  preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/generator/template/darkfish/images/zoom.png
  115. +64 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/generator/template/darkfish/index.rhtml
  116. +116 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/generator/template/darkfish/js/darkfish.js
  117. +32 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/generator/template/darkfish/js/jquery.js
  118. +114 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/generator/template/darkfish/js/quicksearch.js
  119. +10 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/generator/template/darkfish/js/thickbox-compressed.js
  120. +696 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/generator/template/darkfish/rdoc.css
  121. +8 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/ghost_method.rb
  122. +39 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/include.rb
  123. +68 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/known_classes.rb
  124. +378 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/markup.rb
  125. +311 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/markup/attribute_manager.rb
  126. +25 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/markup/formatter.rb
  127. +377 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/markup/fragments.rb
  128. +126 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/markup/inline.rb
  129. +156 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/markup/lines.rb
  130. +80 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/markup/preprocess.rb
  131. +211 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/markup/to_flow.rb
  132. +406 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/markup/to_html.rb
  133. +140 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/markup/to_html_crossref.rb
  134. +328 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/markup/to_latex.rb
  135. +53 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/markup/to_test.rb
  136. +73 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/markup/to_texinfo.rb
  137. +8 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/meta_method.rb
  138. +18 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/normal_class.rb
  139. +34 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/normal_module.rb
  140. +542 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/options.rb
  141. +138 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/parser.rb
  142. +678 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/parser/c.rb
  143. +165 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/parser/perl.rb
  144. +2,904 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/parser/ruby.rb
  145. +39 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/parser/simple.rb
  146. +375 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/rdoc.rb
  147. +32 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/require.rb
  148. +8 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/ri.rb
  149. +187 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/ri/cache.rb
  150. +156 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/ri/descriptions.rb
  151. +340 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/ri/display.rb
  152. +828 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/ri/driver.rb
  153. +654 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/ri/formatter.rb
  154. +93 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/ri/paths.rb
  155. +106 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/ri/reader.rb
  156. +79 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/ri/util.rb
  157. +68 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/ri/writer.rb
  158. +8 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/single_class.rb
  159. +178 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/stats.rb
  160. +276 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/task.rb
  161. +33 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/tokenstream.rb
  162. +242 −0 preinstalled-gems/0.13/gems/rdoc-2.4.3/lib/rdoc/top_level.rb
  163. +32 −0 preinstalled-gems/0.13/specifications/rake-0.8.7.gemspec
  164. +37 −0 preinstalled-gems/0.13/specifications/rake-compiler-0.6.0.gemspec
  165. +47 −0 preinstalled-gems/0.13/specifications/rdoc-2.4.3.gemspec
View
10 Rakefile
@@ -65,7 +65,7 @@ end
# See vm.rake for more information
desc "Build everything that needs to be built at default level."
-task :build => "build:normal"
+task :build => ["build:normal", "gem_bootstrap"]
desc "Recompile all ruby system files"
task :rebuild => %w[clean build]
@@ -85,6 +85,14 @@ task :distclean => %w[
vm:distclean
]
+desc 'Move the preinstalled gem setup into place'
+task :gem_bootstrap do
+ unless File.directory?("gems/rubinius")
+ sh "mkdir gems"
+ sh "cp -r preinstalled-gems gems/rubinius"
+ end
+end
+
def install_bin
File.join RBX_BINPATH, 'rbx'
end
View
BIN  preinstalled-gems/0.13/cache/rake-0.8.7.gem
Binary file not shown
View
BIN  preinstalled-gems/0.13/cache/rake-compiler-0.6.0.gem
Binary file not shown
View
BIN  preinstalled-gems/0.13/cache/rdoc-2.4.3.gem
Binary file not shown
View
440 preinstalled-gems/0.13/gems/rake-0.8.7/CHANGES
@@ -0,0 +1,440 @@
+
+= Rake Changelog
+
+== Version 0.8.7
+
+* Fixed EXEEXT for JRuby on windows.
+
+== Version 0.8.6
+
+* Minor fixes to the RDoc generation (removed dependency on darkfish
+ and removed inline source option).
+
+== Version 0.8.5
+
+* Better support for the system command on Windows.
+
+== Version 0.8.4
+
+* Preserve case when locating rakefiles (patch from James
+ M. Lawrence/quix)
+
+* Better support for windows paths in the test task (patch from Simon
+ Chiang/bahuvrihi)
+
+* Windows system dir search order is now: HOME, HOMEDRIVE + HOMEPATH,
+ APPDATA, USERPROFILE (patch from Luis Lavena)
+
+* MingGW is now recognized as a windows platform. (patch from Luis
+ Lavena)
+
+* Numerous fixes to the windows test suite (patch from Luis Lavena).
+
+* Improved Rakefile case insensitivity testing (patch from Luis
+ Lavena).
+
+* Fixed stray ARGV option problem that was interfering with
+ Test::Unit::Runner.
+
+* Fixed default verbose mode (was accidently changed to false).
+
+* Removed reference to manage_gem to fix the warning produced by the
+ gem package task.
+
+== Version 0.8.3
+
+* Enhanced the system directory detection in windows. We now check
+ HOMEDRIVE/HOMEPATH and USERPROFILE if APPDATA isn't found. (Patch
+ supplied by James Tucker). Rake no long aborts if it can't find the
+ directory.
+
+* Added fix to handle ruby installations in directories with spaces in
+ their name.
+
+== Version 0.8.2
+
+* Fixed bug in package task so that it will include the subdir
+ directory in the package for testing. (Bug found by Adam Majer)
+
+* Added ENV var to rakefile to prevent OS X from including extended
+ attribute junk in a tar file. (Bug found by Adam Majer)
+
+* Fixed filename dependency order bug in test_inspect_pending and
+ test_to_s_pending. (Bug found by Adam Majer)
+
+* Fixed check for file utils options to make them immune to the
+ symbol/string differences. (Patch supplied by Edwin Pratomo)
+
+* Fixed bug with rules involving multiple source (Patch supplied by
+ Emanuel Inderm�hle)
+
+* Switched from getoptlong to optparse (patches supplied by Edwin
+ Pratomo)
+
+* The -T option will now attempt to dynamically sense the size of the
+ terminal. RAKE_COLUMNS will override any dynamic sensing.
+
+* FileList#clone and FileList#dup have better sematics w.r.t. taint
+ and freeze.
+
+* Added ability clear prerequisites, and/or actions from an existing
+ task.
+
+* Added the ability to reenable a task to be invoked a second time.
+
+* Changed RDoc test task to have no default template. This makes it
+ easier for the tempate to pick up the template from the environment.
+
+* Changed from using Mutex to Monitor. Evidently Mutex causes thread
+ join errors when Ruby is compiled with -disable-pthreads. (Patch
+ supplied by Ittay Dror)
+
+* Fixed bug in makefile parser that had problems with extra spaces in
+ file task names. (Patch supplied by Ittay Dror)
+
+* Added a performance patch for reading large makefile dependency
+ files. (Patch supplied by Ittay Dror)
+
+* Default values for task arguments can easily be specified with the
+ :with_defaults method. (Idea for default argument merging supplied
+ by (Adam Q. Salter)
+
+* The -T output will only self-truncate if the output is a tty.
+ However, if RAKE_COLUMNS is explicitly set, it will be honored in
+ any case. (Patch provided by Gavin Stark).
+
+* Numerous fixes for running under windows. A big thanks to Bheeshmar
+ Redheendran for spending a good part of the afternoon at the
+ Lonestar Ruby Conference to help me work out these issues.
+
+== Version 0.8.1
+
+* Removed requires on parsedate.rb (in Ftptools)
+* Removed ftools from rake.rb. Made it options in sys.rb
+
+== Version 0.8.0
+
+* Added task parameters (e.g. "rake build[version7]")
+* Made task parameters passable to prerequisites.
+* Comments are limited to 80 columns or so (suggested by Jamis Buck).
+* Added -D to display full comments (suggested by Jamis Buck).
+* The rake program will set the status value used in any explicit
+ exit(n) calls. (patch provided by Stephen Touset)
+* Fixed error in functional tests that were not including session (and
+ silently skipping the functionl tests.
+* Removed --usage and make -h the same as -H.
+* Make a prettier inspect for tasks.
+
+== Version 0.7.3
+
+* Added existing and existing! methods to FileList
+* FileLists now claim to be Arrays (via is_a?) to get better support
+ from the FileUtil module.
+* Added init and top_level for custom rake applications.
+
+== Version 0.7.2
+
+* Error messages are now send to stderr rather than stdout (from
+ Payton Quackenbush).
+* Better error handling on invalid command line arguments (from Payton
+ Quackenbush).
+* Added rcov task and updated unit testing for better code coverage.
+* Fixed some bugs where the application object was going to the global
+ appliation instead of using its own data.
+* Added square and curly bracket patterns to FileList#include (Tilman
+ Sauerbeck).
+* Added plain filename support to rule dependents (suggested by Nobu
+ Nakada).
+* Added pathmap support to rule dependents.
+* Added a 'tasks' method to a namespace to get a list of tasks
+ associated with the namespace.
+* Fixed the method name leak from FileUtils (bug found by Glenn
+ Vanderburg).
+* Added rake_extension to handle detection of extension collisions.
+* Added test for noop, bad_option and verbose flags to sh command.
+* Removed dependency on internal fu_xxx functions from FileUtils.
+* Added a 'shame' task to the Rakefile.
+* Added tar_command and zip_command options to the Package task.
+* Added a description to the gem task in GemPackageTask.
+* Fixed a bug when rules have multiple prerequisites (patch by Joel
+ VanderWerf)
+* Added a protected 'require "rubygems"' to test/test_application to
+ unbreak cruisecontrol.rb.
+* Added the handful of RakeFileUtils to the private method as well.
+* Added block based exclusion.
+* The clean task will no longer delete 'core' if it is a directory.
+* Removed rake_dup. Now we just simply rescue a bad dup.
+* Refactored the FileList reject logic to remove duplication.
+* Removed if __FILE__ at the end of the rake.rb file.
+
+== Version 0.7.1
+
+* Added optional filter parameter to the --tasks command line option.
+* Added flatten to allow rule transform procs to return lists of
+ prereqs (Joel VanderWerf provided patch).
+* Added pathmap to String and FileList.
+* The -r option will now load .rake files (but a straight require
+ doesn't yet). NOTE: This is experimental ... it may be
+ discontinued.
+* The -f option without a value will disable the search for a
+ Rakefile. The assumption is that the -r files are adequate.
+* Fixed the safe_ln function to fall back to cp in more error
+ scenarios.
+
+== Version 0.7.0
+
+* Added Rake.original_dir to return the original starting directory of
+ the rake application.
+* Added safe_ln support for openAFS (from Ludvig Omholt).
+* Added --trace reminder on short exception messages (David Heinemeier
+ Hansson suggestion).
+* Added multitask declaration that executes prerequisites in
+ parallel. (Doug Young providied an initial implementation).
+* Fixed missing_const hack to be compatible with Rails. (Jamis Buck
+ supplied test case).
+* Made the RDoc task default to internal (in-process) RDoc formatting.
+ The old behavior is still available by setting the +external+ flag
+ to true.
+* Rakefiles are now loaded with the expanded path to prevent
+ accidental polution from the Ruby load path.
+* The +namespace+ command now returns a NameSpace object that can be
+ used to lookup tasks defined in that namespace. This allows for
+ better anonymous namespace behavior.
+* Task objects my now be used in prerequisite lists directly.
+
+== Version 0.6.1
+
+* Rebuilt 0.6.0 gem without signing.
+
+== Version 0.6.0
+
+* Fixed file creation bug in the unit tests (caused infinite loop on
+ windows).
+* Fixed bug where session based functional tests were run under
+ windows.
+* Fixed bug in directory tasks so that updating a directory will not
+ retrigger file tasks depending on the directory (see
+ FileCreationTask and EarlyTime).
+* Added egrep to FileList
+* ruby command now runs same ruby version as rake.
+* Added investigation to task object. (suggested by Martin Fowler)
+* Added ruby_opts to the test task to allow arbitrary ruby options to
+ be passed to the test script. (Greg Fast)
+* Fixed the test loader to ignore options. (Greg Fast)
+* Moved Task, FileTask, FileCreationTask and RakeApp into the Rake
+ module namespace. Old style namespace behavior can be invoked via
+ the --classic-namespace option. (requested by Kelly Felkins).
+* GemTask is now sensitive to the gem platform (Masao Mutoh).
+* A non-existing file prerequisite will no longer cause an exception
+ (Philipp Neubeck).
+* Multiple prerequisites on Rake rules now allowed (initial patch
+ supplied by Stuart Jansen).
+
+== Version 0.5.4
+
+* Added double quotes to the test runner.
+* Added .svn to default ignore list.
+* Updated FileList#include to support nested arrays and filelists.
+
+== Version 0.5.3
+
+* Added support for importing Rakefile and other dependencies.
+* Fixed bug so that now rules can chain off of existing tasks as well
+ as existing files.
+* Fixed verbose flag bug in the testing task. Shortened some failure
+ messages.
+* Make FileUtils methods private at the top level module to avoid
+ accidental method leaking into other objects.
+* Added test loader option to test task. "testrb" is no longer the
+ default test loader. It is now eating syntax errors that should
+ halt the unit tests.
+* Revamped FileList so that it works more like and array (addressed
+ flatten bug). Added many tests around file list.
+* Added +ext+ method to both String and FileList.
+
+== Version 0.5.0
+
+* Fixed documentation that was lacking the Rake module name (Tilman
+ Sauerbeck).
+* Added tar.gz and tar.bz2 support to package task (Tilman Sauerbeck).
+* Recursive rules are now supported (Tilman Sauerbeck).
+* Added warning option for the Test Task (requested by Eric Hodel).
+* The jamis rdoc template is only used if it exists.
+* Added fix for Ruby 1.8.2 test/unit and rails problem.
+* Added contributed rake man file (Jani Monoses).
+* Added Brian Candler's fix for problems in --trace and --dry-run
+ mode.
+
+== Version 0.4.15
+
+* Fixed a bug that prevented the TESTOPTS flag from working with the
+ revised for 1.8.2 test task.
+* Updated the docs on --trace to indicate that it also enables a full
+ backtrace on errors.
+
+== Version 0.4.14
+
+* Modified the TestTask to workaround the Ruby 1.8.2 change in
+ autoexecuting unit tests.
+
+== Version 0.4.13
+
+* Fixed the dry-run flag so it is operating again.
+* Multiple arguments to sh and ruby commands will not be interpreted
+ by the shell (patch provided by Jonathan Paisley).
+
+== Version 0.4.12
+
+* Added --silent (-s) to suppress the (in directory) rake message.
+
+== Version 0.4.11
+
+* Changed the "don't know how to rake" message (finally)
+* Changes references to a literal "Rakefile" to reference the global
+ variable $rakefile (which contains the actual name of the rakefile).
+
+== Version 0.4.10
+
+* Added block support to the "sh" command, allowing users to take
+ special actions on the result of the system call. E.g.
+
+ sh "shell_command" do |ok, res|
+ puts "Program returned #{res.exitstatus}" if ! ok
+ end
+
+== Version 0.4.9
+
+* Switched to Jamis Buck's RDoc template.
+* Removed autorequire from Rake's gem spec. This prevents the Rake
+ libraries from loading while using rails.
+
+== Version 0.4.8
+
+* Added support for .rb versions of Rakefile.
+* Removed \\\n's from test task.
+* Fixed Ruby 1.9 compatibility issue with FileList.
+
+== Version 0.4.7
+
+* Fixed problem in FileList that caused Ruby 1.9 to go into infinite
+ recursion. Since to_a was removed from Object, it does not need to
+ added back into the list of methods to rewrite in FileList. (Thanks
+ to Kent Sibilev for pointing this out).
+
+== Version 0.4.6
+* Removed test version of ln in FileUtils that prevented safe_ln from
+ using ln.
+
+== Version 0.4.5
+* Upgraded comments in TestTask.
+* FileList to_s and inspect now automatically resolve pending changes.
+* FileList#exclude properly returns the FileList.
+
+== Version 0.4.4
+* Fixed initialization problem with @comment.
+* Now using multi -r technique in TestTask. Switch Rakefile back to
+ using the built-in test task macros because the rake runtime is no
+ longer needed.
+* Added 'TEST=filename' and 'TESTOPTS=options' to the Test Task
+ macros.
+* Allow a +test_files+ attribute in test tasks. This allows more
+ flexibility in specifying test files.
+
+== Version 0.4.3
+* Fixed Comment leakage.
+
+== Version 0.4.2
+* Added safe_ln that falls back to a copy if a file link is not supported.
+* Package builder now uses safe_ln.
+
+== Version 0.4.1
+* Task comments are now additive, combined with "/".
+* Works with (soon to be released) rubygems 0.6.2 (or 0.7.0)
+
+== Version 0.4.0
+* FileList now uses deferred loading. The file system is not searched
+ until the first call that needs the file names.
+* VAR=VALUE options are now accepted on the command line and are
+ treated like environment variables. The values may be tested in a
+ Rakefile by referencing ENV['VAR'].
+* File.mtime is now used (instead of File.new().mtime).
+
+== Version 0.3.2.x
+
+* Removed some hidden dependencies on rubygems. Tests now will test
+ gems only if they are installed.
+* Removed Sys from some example files. I believe that is that last
+ reference to Sys outside of the contrib area.
+* Updated all copyright notices to include 2004.
+
+== Version 0.3.2
+
+* GEM Installation now works with the application stub.
+
+== Version 0.3.1
+
+* FileLists now automatically ignore CVS, .bak, !
+* GEM Installation now works.
+
+== Version 0.3.0
+
+Promoted 0.2.10.
+
+== Version 0.2.10
+General
+
+* Added title to Rake's rdocs
+* Contrib packages are no longer included in the documentation.
+
+RDoc Issues
+
+* Removed default for the '--main' option
+* Fixed rendering of the rdoc options
+* Fixed clean/clobber confusion with rerdoc
+* 'title' attribute added
+
+Package Task Library Issues
+
+* Version (or explicit :noversion) is required.
+* +package_file+ attribute is now writable
+
+FileList Issues
+
+* Dropped bang version of exclude. Now using ant-like include/exclude semantics.
+* Enabled the "yield self" idiom in FileList#initialize.
+
+== Version 0.2.9
+
+This version contains numerous changes as the RubyConf.new(2003)
+presentation was being prepared. The changes include:
+
+* The monolithic rubyapp task library is in the process of being
+ dropped in favor of lighter weight task libraries.
+
+== Version 0.2.7
+
+* Added "desc" for task descriptions.
+* -T will now display tasks with descriptions.
+* -P will display tasks and prerequisites.
+* Dropped the Sys module in favor of the 1.8.x FileUtils module. Sys
+ is still supported in the contrib area.
+
+== Version 0.2.6
+
+* Moved to RubyForge
+
+== Version 0.2.5
+
+* Switched to standard ruby app builder.
+* Added no_match option to file matcher.
+
+== Version 0.2.4
+
+* Fixed indir, which neglected to actually change directories.
+
+== Version 0.2.3
+
+* Added rake module for a help target
+* Added 'for_files' to Sys
+* Added a $rakefile constant
+* Added test for selecting proper rule with multiple targets.
View
21 preinstalled-gems/0.13/gems/rake-0.8.7/MIT-LICENSE
@@ -0,0 +1,21 @@
+Copyright (c) 2003, 2004 Jim Weirich
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
View
196 preinstalled-gems/0.13/gems/rake-0.8.7/README
@@ -0,0 +1,196 @@
+= RAKE -- Ruby Make
+
+Supporting Rake version: 0.8.6
+
+This package contains Rake, a simple ruby build program with
+capabilities similar to make.
+
+Rake has the following features:
+
+* Rakefiles (rake's version of Makefiles) are completely defined in
+ standard Ruby syntax. No XML files to edit. No quirky Makefile
+ syntax to worry about (is that a tab or a space?)
+
+* Users can specify tasks with prerequisites.
+
+* Rake supports rule patterns to synthesize implicit tasks.
+
+* Flexible FileLists that act like arrays but know about manipulating
+ file names and paths.
+
+* A library of prepackaged tasks to make building rakefiles easier. For example,
+ tasks for building tarballs, gems and RDoc output are provided.
+
+* Supports parallel execution of tasks.
+
+
+== Installation
+
+=== Gem Installation
+
+Download and install rake with the following.
+
+ gem install rake
+
+=== Normal Installation
+
+You can download the source tarball of the latest version of Rake from
+
+* http://rubyforge.org/project/showfiles.php?group_id=50
+
+Extract the tarball and run
+
+ % ruby install.rb
+
+from its distribution directory.
+
+== Usage
+
+=== Simple Example
+
+First, you must write a "Rakefile" file which contains the build rules. Here's
+a simple example:
+
+ task :default => [:test]
+
+ task :test do
+ ruby "test/unittest.rb"
+ end
+
+This Rakefile has two tasks:
+
+* A task named "test", which - upon invocation - will run a unit test file in
+ Ruby.
+* A task named "default". This task does nothing by itself, but it has exactly
+ one dependency, namely the "test" task. Invoking the "default" task will
+ cause Rake to invoke the "test" task as well.
+
+Running the "rake" command without any options will cause it to run the
+"default" task in the Rakefile:
+
+ % ls
+ Rakefile test/
+ % rake
+ (in /home/some_user/Projects/rake)
+ ruby test/unittest.rb
+ ....unit test output here...
+
+Type "rake --help" for all available options.
+
+
+=== More Information
+
+* For details on Rake's command-line invocation, read
+ doc/command_line_usage.rdoc[http://rake.rubyforge.org/files/doc/command_line_usage_rdoc.html]
+* For details on writing Rakefiles, see
+ doc/rakefile.rdoc[http://rake.rubyforge.org/files/doc/rakefile_rdoc.html].
+* For the original announcement of Rake, see
+ doc/rational.rdoc[http://rake.rubyforge.org/files/doc/rational_rdoc.html].
+* For a glossary of terms, see
+ doc/glossary.rdoc[http://rake.rubyforge.org/files/doc/glossary_rdoc.html].
+
+
+== Development
+
+=== Source Repository
+
+Rake is currently hosted at github. The github web page is
+http://github.com/jimweirich/rake. The public git clone URL is
+
+* git://github.com/jimweirich/rake.git
+
+=== Running the Rake Test Suite
+
+If you wish to run the unit and functional tests that come with Rake:
+
+* Install the 'session' gem in order to run the functional tests.
+* CD into the top project directory of rake.
+* Type one of the following:
+
+ rake # If you have a version of rake installed
+ ruby -Ilib bin/rake # If you do not have a version of rake installed.
+
+=== Issues and Bug Reports
+
+Bugs, features requests and other issues can be logged at
+
+* http://onestepback.org/redmine/projects/show/rake
+
+You will need an account to before you can post issues. Register at
+http://onestepback.org/redmine/account/register. Or you can send me
+an email (at jim dot weirich at gmail dot com)
+
+
+== Online Resources
+
+=== Rake References
+
+* Rake Documentation Home: http://docs.rubyrake.org
+* Rake Project Page: http://rubyforge.org/projects/rake
+* Rake API Documents: http://rake.rubyforge.org
+* Rake Source Code Repo: http://github.com/jimweirich/rake
+* Rake Git Repo Clone URL: git://github.com/jimweirich/rake.git
+
+=== Presentations and Articles about Rake
+
+* Jim Weirich's 2003 RubyConf presentation: http://onestepback.org/articles/buildingwithrake/
+* Martin Fowler's article on Rake: http://martinfowler.com/articles/rake.html
+
+== Other Make Reinvisionings ...
+
+Rake is a late entry in the make replacement field. Here are links to
+other projects with similar (and not so similar) goals.
+
+* http://directory.fsf.org/bras.html -- Bras, one of earliest
+ implementations of "make in a scripting language".
+* http://www.a-a-p.org -- Make in Python
+* http://www.aromatic.com/tools/jam.txt -- JAM, Java Automated Make
+* http://ant.apache.org -- The Ant project
+* http://ppt.perl.org/commands/make/index.html -- Make from the Perl
+ Power Tools implementation.
+* http://search.cpan.org/search?query=PerlBuildSystem -- The Perl Build System
+* http://make.rubyforge.org -- Rant, another Ruby make tool.
+
+== Credits
+
+[<b>Ryan Dlugosz</b>] For the initial conversation that sparked Rake.
+
+[<b>nobu.nokada@softhome.net</b>] For the initial patch for rule support.
+
+[<b>Tilman Sauerbeck <tilman@code-monkey.de></b>] For the recursive rule patch.
+
+== License
+
+Rake is available under an MIT-style license.
+
+:include: MIT-LICENSE
+
+== Support
+
+The Rake homepage is http://rake.rubyforge.org. You can find the Rake
+RubyForge page at http://rubyforge.org/projects/rake.
+
+Feel free to submit commits or feature requests. If you send a patch,
+remember to update the corresponding unit tests. If fact, I prefer
+new feature to be submitted in the form of new unit tests.
+
+For other information, feel free to ask on the ruby-talk mailing list
+(which is mirrored to comp.lang.ruby) or contact
+jim dot weirich at gmail.com.
+
+---
+
+= Other stuff
+
+Author:: Jim Weirich <jim.weirich@gmail.com>
+Requires:: Ruby 1.8.0 or later
+License:: Copyright 2003-2008 by Jim Weirich.
+ Released under an MIT-style license. See the LICENSE file
+ included in the distribution.
+
+== Warranty
+
+This software is provided "as is" and without any express or
+implied warranties, including, without limitation, the implied
+warranties of merchantibility and fitness for a particular
+purpose.
View
430 preinstalled-gems/0.13/gems/rake-0.8.7/Rakefile
@@ -0,0 +1,430 @@
+# Rakefile for rake -*- ruby -*-
+
+# Copyright 2003, 2004, 2005 by Jim Weirich (jim@weirichhouse.org)
+# All rights reserved.
+
+# This file may be distributed under an MIT style license. See
+# MIT-LICENSE for details.
+
+begin
+ require 'rubygems'
+ require 'rake/gempackagetask'
+rescue Exception
+ nil
+end
+require 'rake/clean'
+require 'rake/testtask'
+require 'rake/rdoctask'
+
+CLEAN.include('**/*.o', '*.dot', '**/.*.rbc')
+CLOBBER.include('doc/example/main', 'testdata')
+CLOBBER.include('test/data/**/temp_*')
+CLOBBER.include('test/data/chains/play.*')
+CLOBBER.include('test/data/file_creation_task/build')
+CLOBBER.include('test/data/file_creation_task/src')
+CLOBBER.include('TAGS')
+CLOBBER.include('coverage', 'rcov_aggregate')
+
+# Prevent OS X from including extended attribute junk in the tar output
+ENV['COPY_EXTENDED_ATTRIBUTES_DISABLE'] = 'true'
+
+def announce(msg='')
+ STDERR.puts msg
+end
+
+# Determine the current version of the software
+
+if `ruby -Ilib ./bin/rake --version` =~ /rake, version ([0-9.]+)$/
+ CURRENT_VERSION = $1
+else
+ CURRENT_VERSION = "0.0.0"
+end
+
+$package_version = CURRENT_VERSION
+
+SRC_RB = FileList['lib/**/*.rb']
+
+# The default task is run if rake is given no explicit arguments.
+
+desc "Default Task"
+task :default => :test_all
+
+# Test Tasks ---------------------------------------------------------
+task :dbg do |t|
+ puts "Arguments are: #{t.args.join(', ')}"
+end
+
+# Common Abbreviations ...
+
+task :ta => :test_all
+task :tf => :test_functional
+task :tu => :test_units
+task :tc => :test_contribs
+task :test => :test_units
+
+Rake::TestTask.new(:test_all) do |t|
+ t.test_files = FileList[
+ 'test/test*.rb',
+ 'test/contrib/test*.rb',
+ 'test/fun*.rb'
+ ]
+ t.warning = true
+ t.verbose = false
+end
+
+Rake::TestTask.new(:test_units) do |t|
+ t.test_files = FileList['test/test*.rb']
+ t.warning = true
+ t.verbose = false
+end
+
+Rake::TestTask.new(:test_functional) do |t|
+ t.test_files = FileList['test/fun*.rb']
+ t.warning = true
+ t.verbose = false
+end
+
+Rake::TestTask.new(:test_contribs) do |t|
+ t.test_files = FileList['test/contrib/test*.rb']
+ t.warning = true
+ t.verbose = false
+end
+
+begin
+ require 'rcov/rcovtask'
+
+ Rcov::RcovTask.new do |t|
+ t.libs << "test"
+ dot_rakes =
+ t.rcov_opts = [
+ '-xRakefile', '-xrakefile', '-xpublish.rf',
+ '-xlib/rake/contrib', '-x/Library',
+ '--text-report',
+ '--sort coverage'
+ ] + FileList['rakelib/*.rake'].pathmap("-x%p")
+ t.test_files = FileList[
+ 'test/test*.rb', 'test/functional.rb'
+ ]
+ t.output_dir = 'coverage'
+ t.verbose = true
+ end
+rescue LoadError
+ puts "RCov is not available"
+end
+
+directory 'testdata'
+[:test_all, :test_units, :test_contribs, :test_functional].each do |t|
+ task t => ['testdata']
+end
+
+# CVS Tasks ----------------------------------------------------------
+
+# Install rake using the standard install.rb script.
+
+desc "Install the application"
+task :install do
+ ruby "install.rb"
+end
+
+# Create a task to build the RDOC documentation tree.
+
+begin
+ require 'darkfish-rdoc'
+ DARKFISH_ENABLED = true
+rescue LoadError => ex
+ DARKFISH_ENABLED = false
+end
+
+BASE_RDOC_OPTIONS = [
+ '--line-numbers',
+ '--main', 'README',
+ '--title', 'Rake -- Ruby Make',
+]
+
+rd = Rake::RDocTask.new("rdoc") do |rdoc|
+ rdoc.rdoc_dir = 'html'
+ rdoc.template = 'doc/jamis.rb'
+ rdoc.title = "Rake -- Ruby Make"
+ rdoc.options = BASE_RDOC_OPTIONS.dup
+ rdoc.options << '-SHN' << '-f' << 'darkfish' if DARKFISH_ENABLED
+
+ rdoc.rdoc_files.include('README', 'MIT-LICENSE', 'TODO', 'CHANGES')
+ rdoc.rdoc_files.include('lib/**/*.rb', 'doc/**/*.rdoc')
+ rdoc.rdoc_files.exclude(/\bcontrib\b/)
+end
+
+# ====================================================================
+# Create a task that will package the Rake software into distributable
+# tar, zip and gem files.
+
+PKG_FILES = FileList[
+ 'install.rb',
+ '[A-Z]*',
+ 'bin/**/*',
+ 'lib/**/*.rb',
+ 'test/**/*.rb',
+ 'test/**/*.rf',
+ 'test/**/*.mf',
+ 'test/**/Rakefile',
+ 'test/**/subdir',
+ 'doc/**/*'
+]
+PKG_FILES.exclude('doc/example/*.o')
+PKG_FILES.exclude('TAGS')
+PKG_FILES.exclude(%r{doc/example/main$})
+
+if ! defined?(Gem)
+ puts "Package Target requires RubyGEMs"
+else
+ SPEC = Gem::Specification.new do |s|
+
+ #### Basic information.
+
+ s.name = 'rake'
+ s.version = $package_version
+ s.summary = "Ruby based make-like utility."
+ s.description = <<-EOF
+ Rake is a Make-like program implemented in Ruby. Tasks
+ and dependencies are specified in standard Ruby syntax.
+ EOF
+
+ #### Dependencies and requirements.
+
+ #s.add_dependency('log4r', '> 1.0.4')
+ #s.requirements << ""
+
+ #### Which files are to be included in this gem? Everything! (Except CVS directories.)
+
+ s.files = PKG_FILES.to_a
+
+ #### C code extensions.
+
+ #s.extensions << "ext/rmagic/extconf.rb"
+
+ #### Load-time details: library and application (you will need one or both).
+
+ s.require_path = 'lib' # Use these for libraries.
+
+ s.bindir = "bin" # Use these for applications.
+ s.executables = ["rake"]
+ s.default_executable = "rake"
+
+ #### Documentation and testing.
+
+ s.has_rdoc = true
+ s.extra_rdoc_files = rd.rdoc_files.reject { |fn| fn =~ /\.rb$/ }.to_a
+ s.rdoc_options = BASE_RDOC_OPTIONS
+
+ #### Author and project details.
+
+ s.author = "Jim Weirich"
+ s.email = "jim@weirichhouse.org"
+ s.homepage = "http://rake.rubyforge.org"
+ s.rubyforge_project = "rake"
+# if ENV['CERT_DIR']
+# s.signing_key = File.join(ENV['CERT_DIR'], 'gem-private_key.pem')
+# s.cert_chain = [File.join(ENV['CERT_DIR'], 'gem-public_cert.pem')]
+# end
+ end
+
+ package_task = Rake::GemPackageTask.new(SPEC) do |pkg|
+ pkg.need_zip = true
+ pkg.need_tar = true
+ end
+
+ file "rake.gemspec" => ["Rakefile", "lib/rake.rb"] do |t|
+ require 'yaml'
+ open(t.name, "w") { |f| f.puts SPEC.to_yaml }
+ end
+
+ desc "Create a stand-alone gemspec"
+ task :gemspec => "rake.gemspec"
+end
+
+# Misc tasks =========================================================
+
+def count_lines(filename)
+ lines = 0
+ codelines = 0
+ open(filename) { |f|
+ f.each do |line|
+ lines += 1
+ next if line =~ /^\s*$/
+ next if line =~ /^\s*#/
+ codelines += 1
+ end
+ }
+ [lines, codelines]
+end
+
+def show_line(msg, lines, loc)
+ printf "%6s %6s %s\n", lines.to_s, loc.to_s, msg
+end
+
+desc "Count lines in the main rake file"
+task :lines do
+ total_lines = 0
+ total_code = 0
+ show_line("File Name", "LINES", "LOC")
+ SRC_RB.each do |fn|
+ lines, codelines = count_lines(fn)
+ show_line(fn, lines, codelines)
+ total_lines += lines
+ total_code += codelines
+ end
+ show_line("TOTAL", total_lines, total_code)
+end
+
+# Define an optional publish target in an external file. If the
+# publish.rf file is not found, the publish targets won't be defined.
+
+load "publish.rf" if File.exist? "publish.rf"
+
+# Support Tasks ------------------------------------------------------
+
+RUBY_FILES = FileList['**/*.rb'].exclude('pkg')
+
+desc "Look for TODO and FIXME tags in the code"
+task :todo do
+ RUBY_FILES.egrep(/#.*(FIXME|TODO|TBD)/)
+end
+
+desc "Look for Debugging print lines"
+task :dbg do
+ RUBY_FILES.egrep(/\bDBG|\bbreakpoint\b/)
+end
+
+desc "List all ruby files"
+task :rubyfiles do
+ puts RUBY_FILES
+ puts FileList['bin/*'].exclude('bin/*.rb')
+end
+task :rf => :rubyfiles
+
+desc "Create a TAGS file"
+task :tags => "TAGS"
+
+TAGS = 'xctags -e'
+
+file "TAGS" => RUBY_FILES do
+ puts "Makings TAGS"
+ sh "#{TAGS} #{RUBY_FILES}", :verbose => false
+end
+
+# --------------------------------------------------------------------
+# Creating a release
+
+def plugin(plugin_name)
+ require "rake/plugins/#{plugin_name}"
+end
+
+task :noop
+#plugin "release_manager"
+
+desc "Make a new release"
+task :release, :rel, :reuse, :reltest,
+ :needs => [
+ :prerelease,
+ :clobber,
+ :test_all,
+ :update_version,
+ :package,
+ :tag
+ ] do
+ announce
+ announce "**************************************************************"
+ announce "* Release #{$package_version} Complete."
+ announce "* Packages ready to upload."
+ announce "**************************************************************"
+ announce
+end
+
+# Validate that everything is ready to go for a release.
+task :prerelease, :rel, :reuse, :reltest do |t, args|
+ $package_version = args.rel
+ announce
+ announce "**************************************************************"
+ announce "* Making RubyGem Release #{$package_version}"
+ announce "* (current version #{CURRENT_VERSION})"
+ announce "**************************************************************"
+ announce
+
+ # Is a release number supplied?
+ unless args.rel
+ fail "Usage: rake release[X.Y.Z] [REUSE=tag_suffix]"
+ end
+
+ # Is the release different than the current release.
+ # (or is REUSE set?)
+ if $package_version == CURRENT_VERSION && ! args.reuse
+ fail "Current version is #{$package_version}, must specify REUSE=tag_suffix to reuse version"
+ end
+
+ # Are all source files checked in?
+ if args.reltest
+ announce "Release Task Testing, skipping checked-in file test"
+ else
+ announce "Checking for unchecked-in files..."
+ data = `svn st`
+ unless data =~ /^$/
+ abort "svn status is not clean ... do you have unchecked-in files?"
+ end
+ announce "No outstanding checkins found ... OK"
+ end
+end
+
+task :update_version, :rel, :reuse, :reltest,
+ :needs => [:prerelease] do |t, args|
+ if args.rel == CURRENT_VERSION
+ announce "No version change ... skipping version update"
+ else
+ announce "Updating Rake version to #{args.rel}"
+ open("lib/rake.rb") do |rakein|
+ open("lib/rake.rb.new", "w") do |rakeout|
+ rakein.each do |line|
+ if line =~ /^RAKEVERSION\s*=\s*/
+ rakeout.puts "RAKEVERSION = '#{args.rel}'"
+ else
+ rakeout.puts line
+ end
+ end
+ end
+ end
+ mv "lib/rake.rb.new", "lib/rake.rb"
+ if args.reltest
+ announce "Release Task Testing, skipping commiting of new version"
+ else
+ sh %{svn commit -m "Updated to version #{args.rel}" lib/rake.rb} # "
+ end
+ end
+end
+
+desc "Tag all the CVS files with the latest release number (REL=x.y.z)"
+task :tag, :rel, :reuse, :reltest,
+ :needs => [:prerelease] do |t, args|
+ reltag = "REL_#{args.rel.gsub(/\./, '_')}"
+ reltag << args.reuse.gsub(/\./, '_') if args.reuse
+ announce "Tagging Repository with [#{reltag}]"
+ if args.reltest
+ announce "Release Task Testing, skipping CVS tagging"
+ else
+ sh %{svn copy svn+ssh://rubyforge.org/var/svn/rake/trunk svn+ssh://rubyforge.org/var/svn/rake/tags/#{reltag} -m 'Commiting release #{reltag}'} ###'
+ end
+end
+
+desc "Install the jamis RDoc template"
+task :install_jamis_template do
+ require 'rbconfig'
+ dest_dir = File.join(Config::CONFIG['rubylibdir'], "rdoc/generators/template/html")
+ fail "Unabled to write to #{dest_dir}" unless File.writable?(dest_dir)
+ install "doc/jamis.rb", dest_dir, :verbose => true
+end
+
+# Require experimental XForge/Metaproject support.
+
+load 'xforge.rf' if File.exist?('xforge.rf')
+
+desc "Where is the current directory. This task displays\nthe current rake directory"
+task :where_am_i do
+ puts Rake.original_dir
+end
View
20 preinstalled-gems/0.13/gems/rake-0.8.7/TODO
@@ -0,0 +1,20 @@
+= Rake Project -- To Do List
+
+Send suggestions for this list to mailto:jim@weirichhouse.org or on
+the rake-devel@rubyforge.org mailing list.
+
+=== To Do
+* Need a nice API for accessing tasks in namespaces, namespaces in an app, etc.
+* Provide a way to disable -w warning mode.
+* Define a set of default rules that work in the absense of any Rakefile
+* What about cyclic dependencies?
+* Java support utilities
+* Installation support utilities
+ * Check out installpkg.rb
+* Autogenerate Dependencies
+* Rules should apply to existing tasks if no actions are defined.
+* How to create multiple package tasks without task name collision?
+* Trap "ln -s" commands that fail and use "cp" instead (SMB mounted
+ drives have problems with "ln -s".
+
+(moved DONE list to CHANGES file)
View
31 preinstalled-gems/0.13/gems/rake-0.8.7/bin/rake
@@ -0,0 +1,31 @@
+#!/usr/bin/env ruby
+
+#--
+# Copyright (c) 2003, 2004, 2005, 2006, 2007 Jim Weirich
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+# IN THE SOFTWARE.
+#++
+
+begin
+ require 'rake'
+rescue LoadError
+ require 'rubygems'
+ require 'rake'
+end
+Rake.application.run
View
88 preinstalled-gems/0.13/gems/rake-0.8.7/install.rb
@@ -0,0 +1,88 @@
+require 'rbconfig'
+require 'find'
+require 'ftools'
+
+include Config
+
+$ruby = CONFIG['ruby_install_name']
+
+##
+# Install a binary file. We patch in on the way through to
+# insert a #! line. If this is a Unix install, we name
+# the command (for example) 'rake' and let the shebang line
+# handle running it. Under windows, we add a '.rb' extension
+# and let file associations to their stuff
+#
+
+def installBIN(from, opfile)
+
+ tmp_dir = nil
+ for t in [".", "/tmp", "c:/temp", $bindir]
+ stat = File.stat(t) rescue next
+ if stat.directory? and stat.writable?
+ tmp_dir = t
+ break
+ end
+ end
+
+ fail "Cannot find a temporary directory" unless tmp_dir
+ tmp_file = File.join(tmp_dir, "_tmp")
+
+ File.open(from) do |ip|
+ File.open(tmp_file, "w") do |op|
+ ruby = File.join($realbindir, $ruby)
+ op.puts "#!#{ruby} -w"
+ op.write ip.read
+ end
+ end
+
+ opfile += ".rb" if CONFIG["target_os"] =~ /mswin/i
+ File::install(tmp_file, File.join($bindir, opfile), 0755, true)
+ File::unlink(tmp_file)
+end
+
+$sitedir = CONFIG["sitelibdir"]
+unless $sitedir
+ version = CONFIG["MAJOR"]+"."+CONFIG["MINOR"]
+ $libdir = File.join(CONFIG["libdir"], "ruby", version)
+ $sitedir = $:.find {|x| x =~ /site_ruby/}
+ if !$sitedir
+ $sitedir = File.join($libdir, "site_ruby")
+ elsif $sitedir !~ Regexp.quote(version)
+ $sitedir = File.join($sitedir, version)
+ end
+end
+
+$bindir = CONFIG["bindir"]
+
+$realbindir = $bindir
+
+bindir = CONFIG["bindir"]
+if (destdir = ENV['DESTDIR'])
+ $bindir = destdir + $bindir
+ $sitedir = destdir + $sitedir
+
+ File::makedirs($bindir)
+ File::makedirs($sitedir)
+end
+
+rake_dest = File.join($sitedir, "rake")
+File::makedirs(rake_dest, true)
+File::chmod(0755, rake_dest)
+
+# The library files
+
+files = Dir.chdir('lib') { Dir['**/*.rb'] }
+
+for fn in files
+ fn_dir = File.dirname(fn)
+ target_dir = File.join($sitedir, fn_dir)
+ if ! File.exist?(target_dir)
+ File.makedirs(target_dir)
+ end
+ File::install(File.join('lib', fn), File.join($sitedir, fn), 0644, true)
+end
+
+# and the executable
+
+installBIN("bin/rake", "rake")
View
2,506 preinstalled-gems/0.13/gems/rake-0.8.7/lib/rake.rb
@@ -0,0 +1,2506 @@
+#!/usr/bin/env ruby
+
+#--
+
+# Copyright 2003, 2004, 2005, 2006, 2007, 2008 by Jim Weirich (jim@weirichhouse.org)
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+# IN THE SOFTWARE.
+#++
+#
+# = Rake -- Ruby Make
+#
+# This is the main file for the Rake application. Normally it is referenced
+# as a library via a require statement, but it can be distributed
+# independently as an application.
+
+RAKEVERSION = '0.8.7'
+
+require 'rbconfig'
+require 'fileutils'
+require 'singleton'
+require 'monitor'
+require 'optparse'
+require 'ostruct'
+
+require 'rake/win32'
+
+$trace = false
+
+######################################################################
+# Rake extensions to Module.
+#
+class Module
+ # Check for an existing method in the current class before extending. IF
+ # the method already exists, then a warning is printed and the extension is
+ # not added. Otherwise the block is yielded and any definitions in the
+ # block will take effect.
+ #
+ # Usage:
+ #
+ # class String
+ # rake_extension("xyz") do
+ # def xyz
+ # ...
+ # end
+ # end
+ # end
+ #
+ def rake_extension(method)
+ if method_defined?(method)
+ $stderr.puts "WARNING: Possible conflict with Rake extension: #{self}##{method} already exists"
+ else
+ yield
+ end
+ end
+end # module Module
+
+
+######################################################################
+# User defined methods to be added to String.
+#
+class String
+ rake_extension("ext") do
+ # Replace the file extension with +newext+. If there is no extension on
+ # the string, append the new extension to the end. If the new extension
+ # is not given, or is the empty string, remove any existing extension.
+ #
+ # +ext+ is a user added method for the String class.
+ def ext(newext='')
+ return self.dup if ['.', '..'].include? self
+ if newext != ''
+ newext = (newext =~ /^\./) ? newext : ("." + newext)
+ end
+ self.chomp(File.extname(self)) << newext
+ end
+ end
+
+ rake_extension("pathmap") do
+ # Explode a path into individual components. Used by +pathmap+.
+ def pathmap_explode
+ head, tail = File.split(self)
+ return [self] if head == self
+ return [tail] if head == '.' || tail == '/'
+ return [head, tail] if head == '/'
+ return head.pathmap_explode + [tail]
+ end
+ protected :pathmap_explode
+
+ # Extract a partial path from the path. Include +n+ directories from the
+ # front end (left hand side) if +n+ is positive. Include |+n+|
+ # directories from the back end (right hand side) if +n+ is negative.
+ def pathmap_partial(n)
+ dirs = File.dirname(self).pathmap_explode
+ partial_dirs =
+ if n > 0
+ dirs[0...n]
+ elsif n < 0
+ dirs.reverse[0...-n].reverse
+ else
+ "."
+ end
+ File.join(partial_dirs)
+ end
+ protected :pathmap_partial
+
+ # Preform the pathmap replacement operations on the given path. The
+ # patterns take the form 'pat1,rep1;pat2,rep2...'.
+ def pathmap_replace(patterns, &block)
+ result = self
+ patterns.split(';').each do |pair|
+ pattern, replacement = pair.split(',')
+ pattern = Regexp.new(pattern)
+ if replacement == '*' && block_given?
+ result = result.sub(pattern, &block)
+ elsif replacement
+ result = result.sub(pattern, replacement)
+ else
+ result = result.sub(pattern, '')
+ end
+ end
+ result
+ end
+ protected :pathmap_replace
+
+ # Map the path according to the given specification. The specification
+ # controls the details of the mapping. The following special patterns are
+ # recognized:
+ #
+ # * <b>%p</b> -- The complete path.
+ # * <b>%f</b> -- The base file name of the path, with its file extension,
+ # but without any directories.
+ # * <b>%n</b> -- The file name of the path without its file extension.
+ # * <b>%d</b> -- The directory list of the path.
+ # * <b>%x</b> -- The file extension of the path. An empty string if there
+ # is no extension.
+ # * <b>%X</b> -- Everything *but* the file extension.
+ # * <b>%s</b> -- The alternate file separater if defined, otherwise use
+ # the standard file separator.
+ # * <b>%%</b> -- A percent sign.
+ #
+ # The %d specifier can also have a numeric prefix (e.g. '%2d'). If the
+ # number is positive, only return (up to) +n+ directories in the path,
+ # starting from the left hand side. If +n+ is negative, return (up to)
+ # |+n+| directories from the right hand side of the path.
+ #
+ # Examples:
+ #
+ # 'a/b/c/d/file.txt'.pathmap("%2d") => 'a/b'
+ # 'a/b/c/d/file.txt'.pathmap("%-2d") => 'c/d'
+ #
+ # Also the %d, %p, %f, %n, %x, and %X operators can take a
+ # pattern/replacement argument to perform simple string substititions on a
+ # particular part of the path. The pattern and replacement are speparated
+ # by a comma and are enclosed by curly braces. The replacement spec comes
+ # after the % character but before the operator letter. (e.g.
+ # "%{old,new}d"). Muliple replacement specs should be separated by
+ # semi-colons (e.g. "%{old,new;src,bin}d").
+ #
+ # Regular expressions may be used for the pattern, and back refs may be
+ # used in the replacement text. Curly braces, commas and semi-colons are
+ # excluded from both the pattern and replacement text (let's keep parsing
+ # reasonable).
+ #
+ # For example:
+ #
+ # "src/org/onestepback/proj/A.java".pathmap("%{^src,bin}X.class")
+ #
+ # returns:
+ #
+ # "bin/org/onestepback/proj/A.class"
+ #
+ # If the replacement text is '*', then a block may be provided to perform
+ # some arbitrary calculation for the replacement.
+ #
+ # For example:
+ #
+ # "/path/to/file.TXT".pathmap("%X%{.*,*}x") { |ext|
+ # ext.downcase
+ # }
+ #
+ # Returns:
+ #
+ # "/path/to/file.txt"
+ #
+ def pathmap(spec=nil, &block)
+ return self if spec.nil?
+ result = ''
+ spec.scan(/%\{[^}]*\}-?\d*[sdpfnxX%]|%-?\d+d|%.|[^%]+/) do |frag|
+ case frag
+ when '%f'
+ result << File.basename(self)
+ when '%n'
+ result << File.basename(self).ext
+ when '%d'
+ result << File.dirname(self)
+ when '%x'
+ result << File.extname(self)
+ when '%X'
+ result << self.ext
+ when '%p'
+ result << self
+ when '%s'
+ result << (File::ALT_SEPARATOR || File::SEPARATOR)
+ when '%-'
+ # do nothing
+ when '%%'
+ result << "%"
+ when /%(-?\d+)d/
+ result << pathmap_partial($1.to_i)
+ when /^%\{([^}]*)\}(\d*[dpfnxX])/
+ patterns, operator = $1, $2
+ result << pathmap('%' + operator).pathmap_replace(patterns, &block)
+ when /^%/
+ fail ArgumentError, "Unknown pathmap specifier #{frag} in '#{spec}'"
+ else
+ result << frag
+ end
+ end
+ result
+ end
+ end
+end # class String
+
+##############################################################################
+module Rake
+
+ # Errors -----------------------------------------------------------
+
+ # Error indicating an ill-formed task declaration.
+ class TaskArgumentError < ArgumentError
+ end
+
+ # Error indicating a recursion overflow error in task selection.
+ class RuleRecursionOverflowError < StandardError
+ def initialize(*args)
+ super
+ @targets = []
+ end
+
+ def add_target(target)
+ @targets << target
+ end
+
+ def message
+ super + ": [" + @targets.reverse.join(' => ') + "]"
+ end
+ end
+
+ # --------------------------------------------------------------------------
+ # Rake module singleton methods.
+ #
+ class << self
+ # Current Rake Application
+ def application
+ @application ||= Rake::Application.new
+ end
+
+ # Set the current Rake application object.
+ def application=(app)
+ @application = app
+ end
+
+ # Return the original directory where the Rake application was started.
+ def original_dir
+ application.original_dir
+ end
+
+ end
+
+ ####################################################################
+ # Mixin for creating easily cloned objects.
+ #
+ module Cloneable
+ # Clone an object by making a new object and setting all the instance
+ # variables to the same values.
+ def dup
+ sibling = self.class.new
+ instance_variables.each do |ivar|
+ value = self.instance_variable_get(ivar)
+ new_value = value.clone rescue value
+ sibling.instance_variable_set(ivar, new_value)
+ end
+ sibling.taint if tainted?
+ sibling
+ end
+
+ def clone
+ sibling = dup
+ sibling.freeze if frozen?
+ sibling
+ end
+ end
+
+ ####################################################################
+ # Exit status class for times the system just gives us a nil.
+ class PseudoStatus
+ attr_reader :exitstatus
+ def initialize(code=0)
+ @exitstatus = code
+ end
+ def to_i
+ @exitstatus << 8
+ end
+ def >>(n)
+ to_i >> n
+ end
+ def stopped?
+ false
+ end
+ def exited?
+ true
+ end
+ end
+
+ ####################################################################
+ # TaskAguments manage the arguments passed to a task.
+ #
+ class TaskArguments
+ include Enumerable
+
+ attr_reader :names
+
+ # Create a TaskArgument object with a list of named arguments
+ # (given by :names) and a set of associated values (given by
+ # :values). :parent is the parent argument object.
+ def initialize(names, values, parent=nil)
+ @names = names
+ @parent = parent
+ @hash = {}
+ names.each_with_index { |name, i|
+ @hash[name.to_sym] = values[i] unless values[i].nil?
+ }
+ end
+
+ # Create a new argument scope using the prerequisite argument
+ # names.
+ def new_scope(names)
+ values = names.collect { |n| self[n] }
+ self.class.new(names, values, self)
+ end
+
+ # Find an argument value by name or index.
+ def [](index)
+ lookup(index.to_sym)
+ end
+
+ # Specify a hash of default values for task arguments. Use the
+ # defaults only if there is no specific value for the given
+ # argument.
+ def with_defaults(defaults)
+ @hash = defaults.merge(@hash)
+ end
+
+ def each(&block)
+ @hash.each(&block)
+ end
+
+ def method_missing(sym, *args, &block)
+ lookup(sym.to_sym)
+ end
+
+ def to_hash
+ @hash
+ end
+
+ def to_s
+ @hash.inspect
+ end
+
+ def inspect
+ to_s
+ end
+
+ protected
+
+ def lookup(name)
+ if @hash.has_key?(name)
+ @hash[name]
+ elsif ENV.has_key?(name.to_s)
+ ENV[name.to_s]
+ elsif ENV.has_key?(name.to_s.upcase)
+ ENV[name.to_s.upcase]
+ elsif @parent
+ @parent.lookup(name)
+ end
+ end
+ end
+
+ EMPTY_TASK_ARGS = TaskArguments.new([], [])
+
+ ####################################################################
+ # InvocationChain tracks the chain of task invocations to detect
+ # circular dependencies.
+ class InvocationChain
+ def initialize(value, tail)
+ @value = value
+ @tail = tail
+ end
+
+ def member?(obj)
+ @value == obj || @tail.member?(obj)
+ end
+
+ def append(value)
+ if member?(value)
+ fail RuntimeError, "Circular dependency detected: #{to_s} => #{value}"
+ end
+ self.class.new(value, self)
+ end
+
+ def to_s
+ "#{prefix}#{@value}"
+ end
+
+ def self.append(value, chain)
+ chain.append(value)
+ end
+
+ private
+
+ def prefix
+ "#{@tail.to_s} => "
+ end
+
+ class EmptyInvocationChain
+ def member?(obj)
+ false
+ end
+ def append(value)
+ InvocationChain.new(value, self)
+ end
+ def to_s
+ "TOP"
+ end
+ end
+
+ EMPTY = EmptyInvocationChain.new
+
+ end # class InvocationChain
+
+end # module Rake
+
+module Rake
+
+ ###########################################################################
+ # A Task is the basic unit of work in a Rakefile. Tasks have associated
+ # actions (possibly more than one) and a list of prerequisites. When
+ # invoked, a task will first ensure that all of its prerequisites have an
+ # opportunity to run and then it will execute its own actions.
+ #
+ # Tasks are not usually created directly using the new method, but rather
+ # use the +file+ and +task+ convenience methods.
+ #
+ class Task
+ # List of prerequisites for a task.
+ attr_reader :prerequisites
+
+ # List of actions attached to a task.
+ attr_reader :actions
+
+ # Application owning this task.
+ attr_accessor :application
+
+ # Comment for this task. Restricted to a single line of no more than 50
+ # characters.
+ attr_reader :comment
+
+ # Full text of the (possibly multi-line) comment.
+ attr_reader :full_comment
+
+ # Array of nested namespaces names used for task lookup by this task.
+ attr_reader :scope
+
+ # Return task name
+ def to_s
+ name
+ end
+
+ def inspect
+ "<#{self.class} #{name} => [#{prerequisites.join(', ')}]>"
+ end
+
+ # List of sources for task.
+ attr_writer :sources
+ def sources
+ @sources ||= []
+ end
+
+ # First source from a rule (nil if no sources)
+ def source
+ @sources.first if defined?(@sources)
+ end
+
+ # Create a task named +task_name+ with no actions or prerequisites. Use
+ # +enhance+ to add actions and prerequisites.
+ def initialize(task_name, app)
+ @name = task_name.to_s
+ @prerequisites = []
+ @actions = []
+ @already_invoked = false
+ @full_comment = nil
+ @comment = nil
+ @lock = Monitor.new
+ @application = app
+ @scope = app.current_scope
+ @arg_names = nil
+ end
+
+ # Enhance a task with prerequisites or actions. Returns self.
+ def enhance(deps=nil, &block)
+ @prerequisites |= deps if deps
+ @actions << block if block_given?
+ self
+ end
+
+ # Name of the task, including any namespace qualifiers.
+ def name
+ @name.to_s
+ end
+
+ # Name of task with argument list description.
+ def name_with_args # :nodoc:
+ if arg_description
+ "#{name}#{arg_description}"
+ else
+ name
+ end
+ end
+
+ # Argument description (nil if none).
+ def arg_description # :nodoc:
+ @arg_names ? "[#{(arg_names || []).join(',')}]" : nil
+ end
+
+ # Name of arguments for this task.
+ def arg_names
+ @arg_names || []
+ end
+
+ # Reenable the task, allowing its tasks to be executed if the task
+ # is invoked again.
+ def reenable
+ @already_invoked = false
+ end
+
+ # Clear the existing prerequisites and actions of a rake task.
+ def clear
+ clear_prerequisites
+ clear_actions
+ self
+ end
+
+ # Clear the existing prerequisites of a rake task.
+ def clear_prerequisites
+ prerequisites.clear
+ self
+ end
+
+ # Clear the existing actions on a rake task.
+ def clear_actions
+ actions.clear
+ self
+ end
+
+ # Invoke the task if it is needed. Prerequites are invoked first.
+ def invoke(*args)
+ task_args = TaskArguments.new(arg_names, args)
+ invoke_with_call_chain(task_args, InvocationChain::EMPTY)
+ end
+
+ # Same as invoke, but explicitly pass a call chain to detect
+ # circular dependencies.
+ def invoke_with_call_chain(task_args, invocation_chain) # :nodoc:
+ new_chain = InvocationChain.append(self, invocation_chain)
+ @lock.synchronize do
+ if application.options.trace
+ puts "** Invoke #{name} #{format_trace_flags}"
+ end
+ return if @already_invoked
+ @already_invoked = true
+ invoke_prerequisites(task_args, new_chain)
+ execute(task_args) if needed?
+ end
+ end
+ protected :invoke_with_call_chain
+
+ # Invoke all the prerequisites of a task.
+ def invoke_prerequisites(task_args, invocation_chain) # :nodoc:
+ @prerequisites.each { |n|
+ prereq = application[n, @scope]
+ prereq_args = task_args.new_scope(prereq.arg_names)
+ prereq.invoke_with_call_chain(prereq_args, invocation_chain)
+ }
+ end
+
+ # Format the trace flags for display.
+ def format_trace_flags
+ flags = []
+ flags << "first_time" unless @already_invoked
+ flags << "not_needed" unless needed?
+ flags.empty? ? "" : "(" + flags.join(", ") + ")"
+ end
+ private :format_trace_flags
+
+ # Execute the actions associated with this task.
+ def execute(args=nil)
+ args ||= EMPTY_TASK_ARGS
+ if application.options.dryrun
+ puts "** Execute (dry run) #{name}"
+ return
+ end
+ if application.options.trace
+ puts "** Execute #{name}"
+ end
+ application.enhance_with_matching_rule(name) if @actions.empty?
+ @actions.each do |act|
+ case act.arity
+ when 1
+ act.call(self)
+ else
+ act.call(self, args)
+ end
+ end
+ end
+
+ # Is this task needed?
+ def needed?
+ true
+ end
+
+ # Timestamp for this task. Basic tasks return the current time for their
+ # time stamp. Other tasks can be more sophisticated.
+ def timestamp
+ @prerequisites.collect { |p| application[p].timestamp }.max || Time.now
+ end
+
+ # Add a description to the task. The description can consist of an option
+ # argument list (enclosed brackets) and an optional comment.
+ def add_description(description)
+ return if ! description
+ comment = description.strip
+ add_comment(comment) if comment && ! comment.empty?
+ end
+
+ # Writing to the comment attribute is the same as adding a description.
+ def comment=(description)
+ add_description(description)
+ end
+
+ # Add a comment to the task. If a comment alread exists, separate
+ # the new comment with " / ".
+ def add_comment(comment)
+ if @full_comment
+ @full_comment << " / "
+ else
+ @full_comment = ''
+ end
+ @full_comment << comment
+ if @full_comment =~ /\A([^.]+?\.)( |$)/
+ @comment = $1
+ else
+ @comment = @full_comment
+ end
+ end
+ private :add_comment
+
+ # Set the names of the arguments for this task. +args+ should be
+ # an array of symbols, one for each argument name.
+ def set_arg_names(args)
+ @arg_names = args.map { |a| a.to_sym }
+ end
+
+ # Return a string describing the internal state of a task. Useful for
+ # debugging.
+ def investigation
+ result = "------------------------------\n"
+ result << "Investigating #{name}\n"
+ result << "class: #{self.class}\n"
+ result << "task needed: #{needed?}\n"
+ result << "timestamp: #{timestamp}\n"
+ result << "pre-requisites: \n"
+ prereqs = @prerequisites.collect {|name| application[name]}
+ prereqs.sort! {|a,b| a.timestamp <=> b.timestamp}
+ prereqs.each do |p|
+ result << "--#{p.name} (#{p.timestamp})\n"
+ end
+ latest_prereq = @prerequisites.collect{|n| application[n].timestamp}.max
+ result << "latest-prerequisite time: #{latest_prereq}\n"
+ result << "................................\n\n"
+ return result
+ end
+
+ # ----------------------------------------------------------------
+ # Rake Module Methods
+ #
+ class << self
+
+ # Clear the task list. This cause rake to immediately forget all the
+ # tasks that have been assigned. (Normally used in the unit tests.)
+ def clear
+ Rake.application.clear
+ end
+
+ # List of all defined tasks.
+ def tasks
+ Rake.application.tasks
+ end
+
+ # Return a task with the given name. If the task is not currently
+ # known, try to synthesize one from the defined rules. If no rules are
+ # found, but an existing file matches the task name, assume it is a file
+ # task with no dependencies or actions.
+ def [](task_name)
+ Rake.application[task_name]
+ end
+
+ # TRUE if the task name is already defined.
+ def task_defined?(task_name)
+ Rake.application.lookup(task_name) != nil
+ end
+
+ # Define a task given +args+ and an option block. If a rule with the
+ # given name already exists, the prerequisites and actions are added to
+ # the existing task. Returns the defined task.
+ def define_task(*args, &block)
+ Rake.application.define_task(self, *args, &block)
+ end
+
+ # Define a rule for synthesizing tasks.
+ def create_rule(*args, &block)
+ Rake.application.create_rule(*args, &block)
+ end
+
+ # Apply the scope to the task name according to the rules for
+ # this kind of task. Generic tasks will accept the scope as
+ # part of the name.
+ def scope_name(scope, task_name)
+ (scope + [task_name]).join(':')
+ end
+
+ end # class << Rake::Task
+ end # class Rake::Task
+
+
+ ###########################################################################
+ # A FileTask is a task that includes time based dependencies. If any of a
+ # FileTask's prerequisites have a timestamp that is later than the file
+ # represented by this task, then the file must be rebuilt (using the
+ # supplied actions).
+ #
+ class FileTask < Task
+
+ # Is this file task needed? Yes if it doesn't exist, or if its time stamp
+ # is out of date.
+ def needed?
+ ! File.exist?(name) || out_of_date?(timestamp)
+ end
+
+ # Time stamp for file task.
+ def timestamp
+ if File.exist?(name)
+ File.mtime(name.to_s)
+ else
+ Rake::EARLY
+ end
+ end
+
+ private
+
+ # Are there any prerequisites with a later time than the given time stamp?
+ def out_of_date?(stamp)
+ @prerequisites.any? { |n| application[n].timestamp > stamp}
+ end
+
+ # ----------------------------------------------------------------
+ # Task class methods.
+ #
+ class << self
+ # Apply the scope to the task name according to the rules for this kind
+ # of task. File based tasks ignore the scope when creating the name.
+ def scope_name(scope, task_name)
+ task_name
+ end
+ end
+ end # class Rake::FileTask
+
+ ###########################################################################
+ # A FileCreationTask is a file task that when used as a dependency will be
+ # needed if and only if the file has not been created. Once created, it is
+ # not re-triggered if any of its dependencies are newer, nor does trigger
+ # any rebuilds of tasks that depend on it whenever it is updated.
+ #
+ class FileCreationTask < FileTask
+ # Is this file task needed? Yes if it doesn't exist.
+ def needed?
+ ! File.exist?(name)
+ end
+
+ # Time stamp for file creation task. This time stamp is earlier
+ # than any other time stamp.
+ def timestamp
+ Rake::EARLY
+ end
+ end
+
+ ###########################################################################
+ # Same as a regular task, but the immediate prerequisites are done in
+ # parallel using Ruby threads.
+ #
+ class MultiTask < Task
+ private
+ def invoke_prerequisites(args, invocation_chain)
+ threads = @prerequisites.collect { |p|
+ Thread.new(p) { |r| application[r].invoke_with_call_chain(args, invocation_chain) }
+ }
+ threads.each { |t| t.join }
+ end
+ end
+end # module Rake
+
+## ###########################################################################
+# Task Definition Functions ...
+
+# Declare a basic task.
+#
+# Example:
+# task :clobber => [:clean] do
+# rm_rf "html"
+# end
+#
+def task(*args, &block)
+ Rake::Task.define_task(*args, &block)
+end
+
+
+# Declare a file task.
+#
+# Example:
+# file "config.cfg" => ["config.template"] do
+# open("config.cfg", "w") do |outfile|
+# open("config.template") do |infile|
+# while line = infile.gets
+# outfile.puts line
+# end
+# end
+# end
+# end
+#
+def file(*args, &block)
+ Rake::FileTask.define_task(*args, &block)
+end
+
+# Declare a file creation task.
+# (Mainly used for the directory command).
+def file_create(args, &block)
+ Rake::FileCreationTask.define_task(args, &block)
+end
+
+# Declare a set of files tasks to create the given directories on demand.
+#
+# Example:
+# directory "testdata/doc"
+#
+def directory(dir)
+ Rake.each_dir_parent(dir) do |d|
+ file_create d do |t|
+ mkdir_p t.name if ! File.exist?(t.name)
+ end
+ end
+end
+
+# Declare a task that performs its prerequisites in parallel. Multitasks does
+# *not* guarantee that its prerequisites will execute in any given order
+# (which is obvious when you think about it)
+#
+# Example:
+# multitask :deploy => [:deploy_gem, :deploy_rdoc]
+#
+def multitask(args, &block)
+ Rake::MultiTask.define_task(args, &block)
+end
+
+# Create a new rake namespace and use it for evaluating the given block.
+# Returns a NameSpace object that can be used to lookup tasks defined in the
+# namespace.
+#
+# E.g.
+#
+# ns = namespace "nested" do
+# task :run
+# end
+# task_run = ns[:run] # find :run in the given namespace.
+#
+def namespace(name=nil, &block)
+ Rake.application.in_namespace(name, &block)
+end
+
+# Declare a rule for auto-tasks.
+#
+# Example:
+# rule '.o' => '.c' do |t|
+# sh %{cc -o #{t.name} #{t.source}}
+# end
+#
+def rule(*args, &block)
+ Rake::Task.create_rule(*args, &block)
+end
+
+# Describe the next rake task.
+#
+# Example:
+# desc "Run the Unit Tests"
+# task :test => [:build]
+# runtests
+# end
+#
+def desc(description)
+ Rake.application.last_description = description
+end
+
+# Import the partial Rakefiles +fn+. Imported files are loaded _after_ the
+# current file is completely loaded. This allows the import statement to
+# appear anywhere in the importing file, and yet allowing the imported files
+# to depend on objects defined in the importing file.
+#
+# A common use of the import statement is to include files containing
+# dependency declarations.
+#
+# See also the --rakelibdir command line option.
+#
+# Example:
+# import ".depend", "my_ru