Module: Rakegrowl

Defined in:
lib/rakegrowl.rb

Defined Under Namespace

Modules: Growl

Constant Summary collapse

GEM_PATH =
File.expand_path(File.join(File.dirname(__FILE__), '..'))
COMPLETE_IMG =
File.join(GEM_PATH, 'img', 'complete.png')
ABORT_IMG =
File.join(GEM_PATH, 'img', 'abort.png')

Class Method Summary collapse

Class Method Details

.enhance_tasksObject



23
24
25
26
27
28
29
30
31
# File 'lib/rakegrowl.rb', line 23

def self.enhance_tasks
  if Growl.exists?
    Rake::Task.tasks.each do |task|
      task.enhance do
        Growl.notify "Rake", "Task #{task.name} finished", COMPLETE_IMG if Rake.application.top_level_tasks.include?(task.name)
      end
    end
  end
end

.notify_fail(top_level_tasks) ⇒ Object



33
34
35
# File 'lib/rakegrowl.rb', line 33

def self.notify_fail(top_level_tasks)
  Growl.notify "Rake", "Task #{top_level_tasks} failed", ABORT_IMG
end