lib/guard/rake.rb in guard-rake-0.0.8 vs lib/guard/rake.rb in guard-rake-0.0.9
- old
+ new
@@ -52,17 +52,26 @@
def run_rake_task(paths=[])
UI.info "running #{@task}"
::Rake::Task.tasks.each { |t| t.reenable }
::Rake::Task[@task].invoke(*@options[:task_args], paths)
+
+ Notifier.notify(
+ "watched files: #{paths}",
+ :title => "running rake task: #{@task}",
+ :image => :success
+ )
rescue Exception => e
UI.error "#{self.class.name} failed to run rake task <#{@task}>, exception was:\n\t#{e.class}: #{e.message}"
UI.debug "\n#{e.backtrace.join("\n")}"
+ Notifier.notify(
+ " #{e.class}: #{e.message}", :title => "fail to run rake task: #{@task}", :image => :failed)
throw :task_has_failed
end
def load_rakefile
+ ARGV.clear
::Rake.application.init
::Rake.application.load_rakefile
self.class.rakefile_loaded = true
end
end