README.rdoc 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. = RAKE -- Ruby Make
  2. This package contains Rake, a simple ruby build program with capabilities
  3. similar to make.
  4. Rake has the following features:
  5. * Rakefiles (rake's version of Makefiles) are completely defined in
  6. standard Ruby syntax. No XML files to edit. No quirky Makefile
  7. syntax to worry about (is that a tab or a space?)
  8. * Users can specify tasks with prerequisites.
  9. * Rake supports rule patterns to synthesize implicit tasks.
  10. * Flexible FileLists that act like arrays but know about manipulating
  11. file names and paths.
  12. * A library of prepackaged tasks to make building rakefiles easier. For example,
  13. tasks for building tarballs and publishing to FTP or SSH sites. (Formerly
  14. tasks for building RDoc and Gems were included in rake but they're now
  15. available in RDoc and RubyGems respectively.)
  16. * Supports parallel execution of tasks.
  17. == Installation
  18. === Gem Installation
  19. Download and install rake with the following.
  20. gem install rake
  21. === Normal Installation
  22. You can download the source tarball of the latest version of Rake from
  23. * http://rubyforge.org/project/showfiles.php?group_id=50
  24. Extract the tarball and run
  25. % ruby install.rb
  26. from its distribution directory.
  27. == Usage
  28. === Simple Example
  29. First, you must write a "Rakefile" file which contains the build rules. Here's
  30. a simple example:
  31. task :default => [:test]
  32. task :test do
  33. ruby "test/unittest.rb"
  34. end
  35. This Rakefile has two tasks:
  36. * A task named "test", which - upon invocation - will run a unit test file in
  37. Ruby.
  38. * A task named "default". This task does nothing by itself, but it has exactly
  39. one dependency, namely the "test" task. Invoking the "default" task will
  40. cause Rake to invoke the "test" task as well.
  41. Running the "rake" command without any options will cause it to run the
  42. "default" task in the Rakefile:
  43. % ls
  44. Rakefile test/
  45. % rake
  46. (in /home/some_user/Projects/rake)
  47. ruby test/unittest.rb
  48. ....unit test output here...
  49. Type "rake --help" for all available options.
  50. === More Information
  51. * For details on Rake's command-line invocation, read
  52. doc/command_line_usage.rdoc[http://rake.rubyforge.org/files/doc/command_line_usage_rdoc.html]
  53. * For details on writing Rakefiles, see
  54. doc/rakefile.rdoc[http://rake.rubyforge.org/files/doc/rakefile_rdoc.html].
  55. * For the original announcement of Rake, see
  56. doc/rational.rdoc[http://rake.rubyforge.org/files/doc/rational_rdoc.html].
  57. * For a glossary of terms, see
  58. doc/glossary.rdoc[http://rake.rubyforge.org/files/doc/glossary_rdoc.html].
  59. == Development
  60. === Source Repository
  61. Rake is currently hosted at github. The github web page is
  62. http://github.com/jimweirich/rake. The public git clone URL is
  63. * git://github.com/jimweirich/rake.git
  64. === Running the Rake Test Suite
  65. If you wish to run the unit and functional tests that come with Rake:
  66. * Install the 'flexmock' gem
  67. * Install the 'session' gem in order to run the functional tests.
  68. * CD into the top project directory of rake.
  69. * Type one of the following:
  70. rake # If you have a version of rake installed
  71. ruby -Ilib bin/rake # If you do not have a version of rake installed.
  72. === Issues and Bug Reports
  73. Feature requests and bug reports can be made here
  74. * https://github.com/jimweirich/rake/issues
  75. Issues and bug reports can also be tracked here:
  76. * http://www.pivotaltracker.com/projects/28469
  77. == Online Resources
  78. === Rake References
  79. * Rake Documentation Home: http://docs.rubyrake.org
  80. * Rake Project Page: http://rubyforge.org/projects/rake
  81. * Rake API Documents: http://rake.rubyforge.org
  82. * Rake Source Code Repo: http://github.com/jimweirich/rake
  83. * Rake Git Repo Clone URL: git://github.com/jimweirich/rake.git
  84. * Rake Issue Tracking: http://www.pivotaltracker.com/projects/28469
  85. * Rake Bug Reports: https://github.com/jimweirich/rake/issues
  86. === Presentations and Articles about Rake
  87. * Jim Weirich's 2003 RubyConf presentation:
  88. http://onestepback.org/articles/buildingwithrake/
  89. * Martin Fowler's article on Rake: http://martinfowler.com/articles/rake.html
  90. == Other Make Reinvisionings ...
  91. Rake is a late entry in the make replacement field. Here are links to
  92. other projects with similar (and not so similar) goals.
  93. * http://directory.fsf.org/bras.html -- Bras, one of earliest
  94. implementations of "make in a scripting language".
  95. * http://www.a-a-p.org -- Make in Python
  96. * http://www.aromatic.com/tools/jam.txt -- JAM, Java Automated Make
  97. * http://ant.apache.org -- The Ant project
  98. * http://ppt.perl.org/commands/make/index.html -- Make from the Perl
  99. Power Tools implementation.
  100. * http://search.cpan.org/search?query=PerlBuildSystem -- The Perl Build System
  101. * http://make.rubyforge.org -- Rant, another Ruby make tool.
  102. == Credits
  103. [<b>Ryan Dlugosz</b>] For the initial conversation that sparked Rake.
  104. [<b>nobu.nokada@softhome.net</b>] For the initial patch for rule support.
  105. [<b>Tilman Sauerbeck <tilman@code-monkey.de></b>] For the recursive rule patch.
  106. == License
  107. Rake is available under an MIT-style license.
  108. :include: MIT-LICENSE
  109. == Support
  110. The Rake homepage is http://rake.rubyforge.org. You can find the Rake
  111. RubyForge page at http://rubyforge.org/projects/rake.
  112. Feel free to submit commits or feature requests. If you send a patch,
  113. remember to update the corresponding unit tests. In fact, I prefer
  114. new feature to be submitted in the form of new unit tests.
  115. For other information, feel free to ask on the ruby-talk mailing list
  116. (which is mirrored to comp.lang.ruby) or contact
  117. jim dot weirich at gmail.com.
  118. ---
  119. = Other stuff
  120. Author:: Jim Weirich <jim.weirich@gmail.com>
  121. Requires:: Ruby 1.8.6 or later
  122. License:: Copyright 2003-2008 by Jim Weirich.
  123. Released under an MIT-style license. See the LICENSE file
  124. included in the distribution.
  125. == Warranty
  126. This software is provided "as is" and without any express or
  127. implied warranties, including, without limitation, the implied
  128. warranties of merchantibility and fitness for a particular
  129. purpose.