aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v5/remote.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2013-10-23 23:40:45 -0400
committerRalph Amissah <ralph@amissah.com>2013-10-23 23:40:45 -0400
commitedd89902036bde18c91031470e19c871a182cf6d (patch)
tree1269e7b1660aa64896fc21768002e837233c2c24 /lib/sisu/v5/remote.rb
parentv4 v5: version & changelog (diff)
v5: options & downstream, more use of opt.act instead of opt.cmd
* opt.act.*.set==:on instead of opt.cmd =~/\S/
Diffstat (limited to 'lib/sisu/v5/remote.rb')
-rw-r--r--lib/sisu/v5/remote.rb22
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/sisu/v5/remote.rb b/lib/sisu/v5/remote.rb
index 19160826..7af2e823 100644
--- a/lib/sisu/v5/remote.rb
+++ b/lib/sisu/v5/remote.rb
@@ -72,35 +72,35 @@ module SiSU_Remote
@remote=SiSU_Env::InfoRemote.new(opt)
end
def rsync
- SiSU_Screen::Ansi.new(@opt.cmd,'Remote placement ->',@put).dark_grey_title_hi unless @opt.cmd =~/q/
+ SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'Remote placement ->',@put).dark_grey_title_hi unless @opt.act[:quiet][:set]==:on
@remote.rsync.document
end
def rsync_base
- SiSU_Screen::Ansi.new(@opt.cmd,'Remote placement ->','rsync').dark_grey_title_hi unless @opt.cmd =~/q/
+ SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'Remote placement ->','rsync').dark_grey_title_hi unless @opt.act[:quiet][:set]==:on
@remote.rsync.site_base
end
def rsync_base_sync
- SiSU_Screen::Ansi.new(@opt.cmd,'Remote placement ->','rsync and sync').dark_grey_title_hi unless @opt.cmd =~/q/
+ SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'Remote placement ->','rsync and sync').dark_grey_title_hi unless @opt.act[:quiet][:set]==:on
@remote.rsync.site_base_sync
end
def rsync_sitemaps
- SiSU_Screen::Ansi.new(@opt.cmd,'Remote placement sitemaps ->','rsync').dark_grey_title_hi unless @opt.cmd =~/q/
+ SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'Remote placement sitemaps ->','rsync').dark_grey_title_hi unless @opt.act[:quiet][:set]==:on
@remote.rsync_sitemaps
end
def rsync_harvest
- SiSU_Screen::Ansi.new(@opt.cmd,'Remote placement metadata harvest ->','rsync_harvest').dark_grey_title_hi unless @opt.cmd =~/q/
+ SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'Remote placement metadata harvest ->','rsync_harvest').dark_grey_title_hi unless @opt.act[:quiet][:set]==:on
@remote.rsync.site_harvest
end
def scp
- SiSU_Screen::Ansi.new(@opt.cmd,'Remote placement ->',@put).dark_grey_title_hi unless @opt.cmd =~/q/
+ SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'Remote placement ->',@put).dark_grey_title_hi unless @opt.act[:quiet][:set]==:on
@remote.scp.document
end
def scp_base
- SiSU_Screen::Ansi.new(@opt.cmd,'Remote placement of base site ->','excluding images').dark_grey_title_hi unless @opt.cmd =~/q/
+ SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'Remote placement of base site ->','excluding images').dark_grey_title_hi unless @opt.act[:quiet][:set]==:on
@remote.scp.site_base
end
def scp_base_all
- SiSU_Screen::Ansi.new(@opt.cmd,'Remote placement ->','complete').dark_grey_title_hi unless @opt.cmd =~/q/
+ SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'Remote placement ->','complete').dark_grey_title_hi unless @opt.act[:quiet][:set]==:on
@remote.scp.site_base_all
end
end
@@ -108,7 +108,7 @@ module SiSU_Remote
def initialize(opt,get_s)
@opt,@get_s=opt,get_s
@msg,@msgs='',nil
- @tell=lambda { SiSU_Screen::Ansi.new(@opt.cmd,@msg,"#{@msgs.inspect if @msgs}") }
+ @tell=lambda { SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],@msg,"#{@msgs.inspect if @msgs}") }
end
def fns
require 'open-uri'
@@ -141,12 +141,12 @@ module SiSU_Remote
images.delete_if {|x| x =~/https?:\/\// }
images=images.sort
@msg,@msgs='downloading images:', [ images.join(',') ]
- @tell.call.warn unless @opt.cmd =~/q/
+ @tell.call.warn unless @opt.act[:quiet][:set]==:on
image_info=image_download_url + images
SiSU_Assemble::RemoteImage.new.download_images(image_info)
#SiSU_Assemble::RemoteImage.new.download_images(image_download_url,images)
@msg,@msgs='downloading done',nil
- @tell.call.warn unless @opt.cmd =~/q/
+ @tell.call.warn unless @opt.act[:quiet][:set]==:on
end
downloaded_file.close
end