From dc3eeb6d98a48ab1834dc2d76514664a204b3619 Mon Sep 17 00:00:00 2001
From: elijah <elijah@riseup.net>
Date: Sun, 4 Nov 2012 01:22:23 -0800
Subject: better reporting of puppet progress (supply_drop hack)

---
 lib/leap_cli/commands/deploy.rb | 5 ++---
 lib/leap_cli/util.rb            | 9 +++++----
 2 files changed, 7 insertions(+), 7 deletions(-)

(limited to 'lib/leap_cli')

diff --git a/lib/leap_cli/commands/deploy.rb b/lib/leap_cli/commands/deploy.rb
index f820e5a..13fcb1d 100644
--- a/lib/leap_cli/commands/deploy.rb
+++ b/lib/leap_cli/commands/deploy.rb
@@ -39,11 +39,10 @@ module LeapCli
           #
           ssh.set :puppet_source, [Path.platform, 'puppet'].join('/')
           ssh.set :puppet_destination, '/srv/leap'
-          ssh.set :puppet_command, '/usr/bin/puppet apply'
+          ssh.set :puppet_command, '/usr/bin/puppet apply --color=false'
           ssh.set :puppet_lib, "puppet/modules"
           ssh.set :puppet_parameters, '--confdir puppet puppet/manifests/site.pp'
-          #cap.set :puppet_stream_output, false
-          #puppet_cmd = "cd #{puppet_destination} && #{sudo_cmd} #{puppet_command} --modulepath=#{puppet_lib} #{puppet_parameters}"
+          ssh.set :puppet_stream_output, true
           ssh.apply_puppet
         end
       end
diff --git a/lib/leap_cli/util.rb b/lib/leap_cli/util.rb
index 909dc0a..ba88891 100644
--- a/lib/leap_cli/util.rb
+++ b/lib/leap_cli/util.rb
@@ -1,4 +1,5 @@
 require 'digest/md5'
+require 'paint'
 
 module LeapCli
 
@@ -112,19 +113,19 @@ module LeapCli
     end
 
     def progress_created(path)
-      progress 'created %s' % relative_path(path)
+      progress Paint['created', :green, :bold] + ' ' + relative_path(path)
     end
 
     def progress_updated(path)
-      progress 'updated %s' % relative_path(path)
+      progress Paint['updated', :cyan, :bold] + ' ' + relative_path(path)
     end
 
     def progress_nochange(path)
-      progress2 'no change %s' % relative_path(path)
+      progress2 Paint['no change', :white, :bold] + ' ' + relative_path(path)
     end
 
     def progress_removed(path)
-      progress 'removed %s' % relative_path(path)
+      progress Paint['removed', :red, :bold] + ' ' + relative_path(path)
     end
 
     #
-- 
cgit v1.2.3