Rake v0.7.0 Release Notes

  • These changes for Rake have been brewing for a long time. Here they are, I hope you enjoy them.

    ==== ๐Ÿ”„ Changes

    ===== ๐Ÿ†• New Features

    • ๐Ÿ‘€ Name space support for task names (see below).
    • ๐Ÿ‘€ Prerequisites can be executed in parallel (see below).
    • โž• Added safe_ln support for openAFS (via Ludvig Omholt).
    • 0๏ธโƒฃ RDoc defaults to internal (in-process) invocation. The old behavior is still available by setting the +external+ flag to true.
    • Rakefiles are now loaded with the expanded path to prevent accidental pollution from the Ruby load path.
    • Task objects my now be used in prerequisite lists directly.
    • Task objects (in addition to task names) may now be included in the prerequisite list of a task.
    • ๐Ÿ”จ Internals cleanup and refactoring.

    ===== ๐Ÿ› Bug Fixes

    • ๐Ÿ’Ž Compatibility fixes for Ruby 1.8.4 FileUtils changes.

    ===== Namespaces

    Tasks can now be nested inside their own namespaces. Tasks within one namespace will not accidentally interfer with tasks named in a different namespace.

    For example:

    namespace "main" do task :build do # Build the main program end end

    namespace "samples" do task :build do # Build the sample programs end end

    task :build_all => ["main:build", "samples:build"]

    ๐Ÿ— Even though both tasks are named :build, they are separate tasks in ๐Ÿ— their own namespaces. The :build_all task (defined in the toplevel ๐Ÿ— namespace) references both build tasks in its prerequisites.

    ๐Ÿ— You may invoke each of the individual build tasks with the following commands:

    rake main:build rake samples:build

    ๐Ÿ— Or invoke both via the :build_all command:

    rake build_all

    Namespaces may be nested arbitrarily. Since the name of file tasks correspond to the name of a file in the external file system, FileTasks are not affected by the namespaces.

    ๐Ÿ“š See the Rakefile format documentation (in the Rake API documents) for more information.

    ===== Parallel Tasks

    Sometimes you have several tasks that can be executed in parallel. By specifying these tasks as prerequisites to a +multitask+ task.

    In the following example the tasks copy_src, copy_doc and copy_bin will all execute in parallel in their own thread.

    multitask :copy_files => [:copy_src, :copy_doc, :copy_bin] do puts "All Copies Complete" end

    ==== Thanks

    As usual, it was input from users that drove a alot of these changes. The following people either contributed patches, made suggestions or made otherwise helpful comments. Thanks to ...

    • Doug Young (inspiration for the parallel task)
    • David Heinemeier Hansson (for --trace message enhancement and for pushing for namespace support).
    • Ludvig Omholt (for the openAFS fix)

    -- Jim Weirich