lib/docker-sync/sync_strategy/rsync.rb in docker-sync-0.0.14 vs lib/docker-sync/sync_strategy/rsync.rb in docker-sync-0.0.15
- old
+ new
@@ -1,7 +1,8 @@
require 'thor/shell'
require 'docker-sync/preconditions'
+require 'terminal-notifier'
module Docker_Sync
module SyncStrategy
class Rsync
include Thor::Shell
@@ -43,9 +44,12 @@
out = `#{cmd}`
if $?.exitstatus > 0
say_status 'error', "Error starting sync, exit code #{$?.exitstatus}", :red
say_status 'message', out
else
+ TerminalNotifier.notify(
+ "Synced #{@options['src']}", :title => @sync_name
+ ) if @options['notify_terminal']
say_status 'ok', "Synced #{@options['src']}", :white
if @options['verbose']
say_status 'output', out
end
end