lib/travis/tools/notification.rb in travis-1.6.2 vs lib/travis/tools/notification.rb in travis-1.6.3.travis.373.4

- old
+ new

@@ -39,10 +39,14 @@ def notify(title, body) system BIN_PATH, '-message', body.to_s, '-title', title.to_s, '-sender', 'org.travis-ci.Travis-CI' end def available? - System.mac? and System.os_version.to_s >= '10.8' + System.mac? and System.os_version.to_s >= '10.8' and nc_running? + end + + def nc_running? + system 'pgrep -u $(whoami) NotificationCenter >/dev/null' end end class Growl def initialize