RakeNotification
Notification of status for rake
Installation
Add this line to your application's Gemfile:
gem 'rake_notification'
And then execute:
$ bundle
Execution
$ bundle exec rake_notify awesome_task
Usage
Ikachan Notifier
# config/rake_notification.rb
endpoint = 'https://irc.example.com:4979/'
channel = '#rake_notification'
ikachan = RakeNotifier::Ikachan.new(endpoint, channel)
Rake.application.register_interceptor ikachan
Rake.application.register_observer ikachan
Custom Notifier
# config/rake_notification.rb
notifier = Object.new.tap do |o|
def o.started_task(task)
CustomNotifier.started(task).deliver
end
def o.completed_task(task, system_exit)
if !system_exit.success?
CustomNotifier.failed(task, system_exit)
end
end
end
Rake.application.register_interceptor notifier
Rake.application.register_observer notifier
Contributing
- Fork it ( https://github.com/mizoR/rake_notification/fork )
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request