# rake-10.0.4 Documentation

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 and publishing to FTP or SSH sites. (Formerly tasks for building RDoc and Gems were included in rake but they're now available in RDoc and RubyGems respectively.)

- Supports parallel execution of tasks.

## Installation

### Gem Installation

Download and install rake with the following.

    gem install rake

## 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

- For details on writing Rakefiles, see doc/rakefile.rdoc.

- For the original announcement of Rake, see doc/rational.rdoc.

- For a glossary of terms, see doc/glossary.rdoc.

## Development

### Source Repository

Rake is currently hosted at github. The github web page is 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 'flexmock' gem

- 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

Feature requests and bug reports can be made here

- github.com/jimweirich/rake/issues

Issues and bug reports can also be tracked here:

- www.pivotaltracker.com/projects/28469

## Online Resources

### Rake References

- Rake Documentation Home: docs.rubyrake.org

- Rake Project Page: rubyforge.org/projects/rake

- Rake API Documents: rake.rubyforge.org

- Rake Source Code Repo: github.com/jimweirich/rake

- Rake Git Repo Clone URL: git://github.com/jimweirich/rake.git

- Rake Bug Reports: github.com/jimweirich/rake/issues

- Rake Continuous Build Server: travis-ci.org/#!/jimweirich/rake

### Presentations and Articles about Rake

- Jim Weirich's 2003 RubyConf presentation: onestepback.org/articles/buildingwithrake/

- Martin Fowler's article on Rake: 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.

- directory.fsf.org/bras.html -- Bras, one of earliest implementations of "make in a scripting language".

- www.a-a-p.org -- Make in Python

- www.aromatic.com/tools/jam.txt -- JAM, Java Automated Make

- ant.apache.org -- The Ant project

- ppt.perl.org/commands/make/index.html -- Make from the Perl Power Tools implementation.

- search.cpan.org/search?query=PerlBuildSystem -- The Perl Build System

- make.rubyforge.org -- Rant, another Ruby make tool.

## Credits

Ryan Dlugosz

  For the initial conversation that sparked Rake.

nobu.nokada@softhome.net

  For the initial patch for rule support.

Tilman Sauerbeck <tilman@code-monkey.de>

  For the recursive rule patch.

Eric Hodel

  For aid in maintaining rake.

## License

Rake is available under an MIT-style license.

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.

## Support

The Rake homepage is rake.rubyforge.org. You can find the Rake RubyForge page at rubyforge.org/projects/rake.

Feel free to submit commits or feature requests. If you send a patch, remember to update the corresponding unit tests. In 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.7 or later
License | Copyright 2003-2013 by Jim Weirich. Released under an MIT-style license. See the MIT-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.

## Files

- MIT-LICENSE
- README.rdoc
- TODO
- command_line_usage.rdoc
- glossary.rdoc
- proto_rake.rdoc
- rakefile.rdoc
- rational.rdoc
- rake-0.4.14.rdoc
- rake-0.4.15.rdoc
- rake-0.5.0.rdoc
- rake-0.5.3.rdoc
- rake-0.5.4.rdoc
- rake-0.6.0.rdoc
- rake-0.7.0.rdoc
- rake-0.7.1.rdoc
- rake-0.7.2.rdoc
- rake-0.7.3.rdoc
- rake-0.8.0.rdoc
- rake-0.8.4.rdoc
- rake-0.8.5.rdoc
- rake-0.8.6.rdoc
- rake-0.8.7.rdoc

## Classes/Modules

- Rake
- Rake::AltSystem
- Rake::Application
- Rake::Backtrace
- Rake::Cloneable
- Rake::CompositePublisher
- Rake::DSL
- Rake::DefaultLoader
- Rake::EarlyTime
- Rake::FileCreationTask
- Rake::FileList
- Rake::FileTask
- Rake::FileUtilsExt
- Rake::FtpFile
- Rake::FtpUploader
- Rake::InvocationChain
- Rake::InvocationChain::EmptyInvocationChain
- Rake::InvocationExceptionMixin
- Rake::MakefileLoader
- Rake::MultiTask
- Rake::NameSpace
- Rake::PackageTask
- Rake::PseudoStatus
- Rake::RubyForgePublisher
- Rake::RuleRecursionOverflowError
- Rake::SshDirPublisher
- Rake::SshFilePublisher
- Rake::SshFreshDirPublisher
- Rake::Task
- Rake::TaskArgumentError
- Rake::TaskArguments
- Rake::TaskLib
- Rake::TaskManager
- Rake::TestTask
- Rake::TraceOutput
- Rake::Win32
- Rake::Win32::Win32HomeError
- CompositePublisher
- FileUtils
- Module
- Object
- SshDirPublisher
- SshFilePublisher
- SshFreshDirPublisher
- String
- Time

## Methods

- ::[] — Rake::FileList
- ::[] — Rake::Task
- ::add_rakelib — Rake
- ::append — Rake::InvocationChain
- ::application — Rake
- ::application= — Rake
- ::clear — Rake::Task
- ::collapse — Rake::Backtrace
- ::connect — Rake::FtpUploader
- ::create_rule — Rake::Task
- ::date — Rake::FtpFile
- ::define_module_function — Rake::AltSystem
- ::define_task — Rake::Task
- ::glob — Rake::FileList
- ::load_rakefile — Rake
- ::new — Rake::PackageTask
- ::new — Rake::PseudoStatus
- ::new — Rake::RuleRecursionOverflowError
- ::new — Rake::NameSpace
- ::new — Rake::CompositePublisher
- ::new — Rake::Task
- ::new — Rake::InvocationChain
- ::new — Rake::TaskArguments
- ::new — Rake::TestTask
- ::new — Rake::FileList
- ::new — Rake::SshFilePublisher
- ::new — Rake::SshDirPublisher
- ::new — Rake::RubyForgePublisher
- ::new — SshFilePublisher
- ::new — SshDirPublisher
- ::new — CompositePublisher
- ::new — Rake::FtpUploader
- ::new — Rake::TaskManager
- ::new — Rake::FtpFile
- ::new — Rake::Application
- ::normalize — Rake::Win32
- ::original_dir — Rake
- ::rake_system — Rake::Win32
- ::scope_name — Rake::Task
- ::task_defined? — Rake::Task
- ::tasks — Rake::Task
- ::time — Rake::FtpFile
- ::windows? — Rake::Win32
- #* — Rake::FileList
- #<=> — Rake::EarlyTime
- #<=> — Time
- #== — Rake::FileList
- #>> — Rake::PseudoStatus
- #[] — Rake::TaskManager
- #[] — Rake::TaskArguments
- #[] — Rake::NameSpace
- #add — CompositePublisher
- #add — Rake::FileList
- #add — Rake::CompositePublisher
- #add_description — Rake::Task
- #add_import — Rake::Application
- #add_loader — Rake::Application
- #add_target — Rake::RuleRecursionOverflowError
- #all_prerequisite_tasks — Rake::Task
- #append — Rake::InvocationChain
- #append — Rake::InvocationChain::EmptyInvocationChain
- #arg_names — Rake::Task
- #backticks — Rake::AltSystem
- #chain — Rake::InvocationExceptionMixin
- #chain= — Rake::InvocationExceptionMixin
- #clear — Rake::TaskManager
- #clear — Rake::Task
- #clear_actions — Rake::Task
- #clear_comments — Rake::Task
- #clear_exclude — Rake::FileList
- #clear_prerequisites — Rake::Task
- #close — Rake::FtpUploader
- #collect_prerequisites — Rake::Task
- #collect_tasks — Rake::Application
- #comment= — Rake::Task
- #create_rule — Rake::TaskManager
- #current_scope — Rake::TaskManager
- #default_task_name — Rake::Application
- #define — Rake::PackageTask
- #define — Rake::TestTask
- #define_task — Rake::TaskManager
- #deprecate — Rake::Application
- #directory? — Rake::FtpFile
- #display_error_message — Rake::Application
- #display_prerequisites — Rake::Application
- #display_tasks_and_comments — Rake::Application
- #dynamic_width — Rake::Application
- #dynamic_width_stty — Rake::Application
- #dynamic_width_tput — Rake::Application
- #each — Rake::TaskArguments
- #egrep — Rake::FileList
- #enhance — Rake::Task
- #enhance_with_matching_rule — Rake::TaskManager
- #exclude — Rake::FileList
- #exclude? — Rake::FileList
- #execute — Rake::Task
- #existing — Rake::FileList
- #existing! — Rake::FileList
- #exit_because_of_exception — Rake::Application
- #exited? — Rake::PseudoStatus
- #ext — String
- #ext — Rake::FileList
- #file_list_string — Rake::TestTask
- #find_rakefile_location — Rake::Application
- #find_runnable — Rake::AltSystem
- #gsub — Rake::FileList
- #gsub! — Rake::FileList
- #handle_options — Rake::Application
- #have_rakefile — Rake::Application
- #import — Rake::FileList
- #in_namespace — Rake::TaskManager
- #include — Rake::FileList
- #init — Rake::Application
- #init — Rake::PackageTask
- #initialize_copy — Rake::Cloneable
- #inspect — Rake::TaskArguments
- #inspect — Rake::Task
- #intern — Rake::TaskManager
- #investigation — Rake::Task
- #invoke — Rake::Task
- #invoke_task — Rake::Application
- #is_a? — Rake::FileList
- #kind_of? — Rake::FileList
- #lib_path — Rake::TestTask
- #load — Rake::MakefileLoader
- #load — Rake::DefaultLoader
- #load_imports — Rake::Application
- #load_rakefile — Rake::Application
- #lookup — Rake::TaskManager
- #lookup — Rake::TaskArguments
- #makedirs — Rake::FtpUploader
- #member? — Rake::InvocationChain::EmptyInvocationChain
- #member? — Rake::InvocationChain
- #message — Rake::RuleRecursionOverflowError
- #method_missing — Rake::TaskArguments
- #mode — Rake::FtpFile
- #name — Rake::Task
- #needed? — Rake::Task
- #needed? — Rake::FileTask
- #needed? — Rake::FileCreationTask
- #new_scope — Rake::TaskArguments
- #nowrite — Rake::FileUtilsExt
- #options — Rake::Application
- #package_dir_path — Rake::PackageTask
- #package_name — Rake::PackageTask
- #parse_task_string — Rake::Application
- #path — Rake::FtpFile
- #pathmap — Rake::FileList
- #pathmap — String
- #pathmap_explode — String
- #pathmap_partial — String
- #pathmap_replace — String
- #prerequisite_tasks — Rake::Task
- #print_rakefile_directory — Rake::Application
- #rake_check_options — Rake::FileUtilsExt
- #rake_extension — Module
- #rake_merge_option — Rake::FileUtilsExt
- #rake_original_time_compare — Time
- #rake_output_message — Rake::FileUtilsExt
- #rake_require — Rake::Application
- #rakefile_location — Rake::Application
- #reenable — Rake::Task
- #repair_command — Rake::AltSystem
- #resolve — Rake::FileList
- #resolve_args — Rake::TaskManager
- #ruby — FileUtils
- #ruby_opts_string — Rake::TestTask
- #ruby_version — Rake::TestTask
- #run — Rake::Application
- #run_code — Rake::TestTask
- #run_tests — Rake
- #run_with_threads — Rake::Application
- #safe_ln — FileUtils
- #set_arg_names — Rake::Task
- #sh — FileUtils
- #source — Rake::Task
- #sources — Rake::Task
- #split_all — FileUtils
- #standard_exception_handling — Rake::Application
- #standard_rake_options — Rake::Application
- #stopped? — Rake::PseudoStatus
- #sub — Rake::FileList
- #sub! — Rake::FileList
- #symlink? — Rake::FtpFile
- #synthesize_file_task — Rake::TaskManager
- #system — Rake::AltSystem
- #system_dir — Rake::Application
- #tar_bz2_file — Rake::PackageTask
- #tar_gz_file — Rake::PackageTask
- #tasks — Rake::NameSpace
- #tasks — Rake::TaskManager
- #tasks_in_scope — Rake::TaskManager
- #terminal_width — Rake::Application
- #test_files= — Rake::TestTask
- #tgz_file — Rake::PackageTask
- #timestamp — Rake::FileCreationTask
- #timestamp — Rake::Task
- #timestamp — Rake::FileTask
- #to_a — Rake::FileList
- #to_ary — Rake::FileList
- #to_hash — Rake::TaskArguments
- #to_i — Rake::PseudoStatus
- #to_s — Rake::InvocationChain
- #to_s — Rake::TaskArguments
- #to_s — Rake::FileList
- #to_s — Rake::InvocationChain::EmptyInvocationChain
- #to_s — Rake::Task
- #to_s — Rake::EarlyTime
- #top_level — Rake::Application
- #trace — Rake::Application
- #trace_on — Rake::TraceOutput
- #truncate — Rake::Application
- #truncate_output? — Rake::Application
- #tty_output= — Rake::Application
- #tty_output? — Rake::Application
- #unix? — Rake::Application
- #upload — SshFreshDirPublisher
- #upload — Rake::SshFilePublisher
- #upload — Rake::CompositePublisher
- #upload — SshDirPublisher
- #upload — Rake::SshDirPublisher
- #upload — CompositePublisher
- #upload — Rake::SshFreshDirPublisher
- #upload — SshFilePublisher
- #upload_files — Rake::FtpUploader
- #values_at — Rake::TaskArguments
- #verbose — Rake::FileUtilsExt
- #when_writing — Rake::FileUtilsExt
- #windows? — Rake::Application
- #with_defaults — Rake::TaskArguments
- #zip_file — Rake::PackageTask

[Validate]

Generated with the Darkfish Rdoc Generator 2.