Browse files

optionally send a notification on start

  • Loading branch information...
1 parent 75f7e6e commit 97aa76a94157f78344fb9df916ce7146c454e89c Lawrence Wang committed Feb 1, 2012
Showing with 5 additions and 1 deletion.
  1. +2 −1 README.md
  2. +3 −0 lib/guard/spork/runner.rb
View
3 README.md
@@ -105,7 +105,8 @@ Available options:
:test_unit_env => { 'RAILS_ENV' => 'baz' } # Default: nil
:rspec_env => { 'RAILS_ENV' => 'foo' } # Default: nil
:cucumber_env => { 'RAILS_ENV' => 'bar' } # Default: nil
-:aggressive_kill => false # Default: true, will search Spork pids from `ps aux` and kill them all on start.
+:aggressive_kill => false # Default: true, will search Spork pids from `ps aux` and kill them all on start.
+:notify_on_start => true # Default: false, will notify as soon as starting begins.
```
## Common troubleshooting
View
3 lib/guard/spork/runner.rb
@@ -22,6 +22,9 @@ def initialize(options={})
def launch_sporks(action, type = nil)
instances = find_instances(type)
UI.info "#{action.capitalize}ing Spork for #{instances.join(', ')}", :reset => true
+ if options[:notify_on_start]
+ Notifier.notify "#{action.capitalize}ing #{instances.join(', ')}", :title => "Spork", :image => :success
+ end
instances.each(&:start)
verify_launches(action, instances)
end

0 comments on commit 97aa76a

Please sign in to comment.