Skip to content

Commit

Permalink
use terminal-notifier binary if detected via which
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamil Bou Kheir committed Nov 16, 2013
1 parent d71141e commit 0da066c
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
6 changes: 5 additions & 1 deletion Ruby/lib/terminal_notifier/guard/failed.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
module TerminalNotifier
module Guard
module Failed
BIN_PATH = File.expand_path('../../../../vendor/terminal-notifier-failed.app/Contents/MacOS/terminal-notifier', __FILE__)
terminal_notifier_path = `which terminal-notifier`
BIN_PATH = terminal_notifier_path.empty? ?
File.expand_path('../../../../vendor/terminal-notifier-failed.app/Contents/MacOS/terminal-notifier', __FILE__)
:
terminal_notifier_path
end
end
end
6 changes: 5 additions & 1 deletion Ruby/lib/terminal_notifier/guard/notify.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
module TerminalNotifier
module Guard
module Notify
BIN_PATH = File.expand_path('../../../../vendor/terminal-notifier-notify.app/Contents/MacOS/terminal-notifier', __FILE__)
terminal_notifier_path = `which terminal-notifier`
BIN_PATH = terminal_notifier_path.empty? ?
File.expand_path('../../../../vendor/terminal-notifier-failed.app/Contents/MacOS/terminal-notifier', __FILE__)
:
terminal_notifier_path
end
end
end
6 changes: 5 additions & 1 deletion Ruby/lib/terminal_notifier/guard/pending.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
module TerminalNotifier
module Guard
module Pending
BIN_PATH = File.expand_path('../../../../vendor/terminal-notifier-pending.app/Contents/MacOS/terminal-notifier', __FILE__)
terminal_notifier_path = `which terminal-notifier`
BIN_PATH = terminal_notifier_path.empty? ?
File.expand_path('../../../../vendor/terminal-notifier-failed.app/Contents/MacOS/terminal-notifier', __FILE__)
:
terminal_notifier_path
end
end
end
6 changes: 5 additions & 1 deletion Ruby/lib/terminal_notifier/guard/success.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
module TerminalNotifier
module Guard
module Success
BIN_PATH = File.expand_path('../../../../vendor/terminal-notifier-success.app/Contents/MacOS/terminal-notifier', __FILE__)
terminal_notifier_path = `which terminal-notifier`
BIN_PATH = terminal_notifier_path.empty? ?
File.expand_path('../../../../vendor/terminal-notifier-failed.app/Contents/MacOS/terminal-notifier', __FILE__)
:
terminal_notifier_path
end
end
end

0 comments on commit 0da066c

Please sign in to comment.