Get your Cape on

Over Thanksgiving Day weekend I released a new RubyGem called Cape. You may find it useful if you’re a user of both Capistrano and Rake.

Install Cape by typing gem install cape at the command line, or make it a dependency of your project by using Bundler.

What can Cape do?

  • Mirror Rake tasks as Capistrano recipes, optionally filtered by namespace or name
  • Embed Rake tasks in a Capistrano namespace
  • Pass arguments to Rake tasks by setting environment variables with the same names
  • Override the default executables for local and remote Rake installations (/usr/bin/env rake is the default)
  • Enumerate Rake tasks for your own purposes

If you’ve ever wanted to execute a Rake task remotely, Cape can help. In your Capistrano recipes, include the following:

   require 'cape'

   Cape do
     # Create Capistrano recipes for all Rake tasks.
     mirror_rake_tasks
   end

Now all your Rake tasks can be invoked as Capistrano recipes. See the readme for more Cape-abilities.

Up, up, and away! end of article

Follow Me on GitHub