Rake hooks let you add callbacks to rake tasks.
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib/rake
test Add ignore_exceptions to after_hook Mar 4, 2012
.gitignore Improve gitignore Sep 4, 2011
.travis.yml Test in different infraestructures Feb 13, 2012
Gemfile Bump the version Oct 25, 2011
Gemfile.rake-0.8.7 Test in different infraestructures Feb 13, 2012
Gemfile.rake-0.9.2.2 Test in different infraestructures Feb 13, 2012
LICENSE Initial version Jun 22, 2010
README.md Add endorse button Feb 13, 2012
Rakefile Add bundler to the development Sep 4, 2011
rake-hooks.gemspec Make it works with several version of rake Dec 1, 2011

README.md

rake-hooks

Rake hooks let you add callbacks to rake:

Build Status endorse

Usage

For example in your Rakefile

require 'rake/hooks'

task :say_hello do
  puts "Good Morning !"
end

after :say_hello do
  puts "GoodBye"
end

after :say_hello do
  puts "Now go to bed !"
end

before :say_hello do
  puts "Hi !"
end

Now run with rake

$ rake say_hello
Hi !
Good Morning !
GoodBye
Now go to bed !

You can also pass more than one task and each task will be setup with the callback

before :say_hello, :say_goodbye do
  puts "Hi !"
end

Installation

With rubygems use:

$ gem install rake-hooks

With other systems Add lib dir to load path.

Dependencies

  • Rake

Author

Web

http://github.com/guillermo/rake-hooks

Date of writing

9 Sep 2011