diff options
author | Ralph Amissah <ralph@amissah.com> | 2012-05-06 23:57:48 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2012-05-06 23:57:48 -0400 |
commit | e3e9d55838d36fe07116c5a78fb1a1e5ff38f69b (patch) | |
tree | f99176d021ff9a42c9b6ec9bf6e68ebfc4ff30c1 /lib/sisu/v3/hub.rb | |
parent | debian/changelog (3.2.6-1) (diff) | |
parent | v3: hub, options, fixes: dbi: pgsql, sqlite (diff) |
Merge tag 'sisu_3.2.7' into debian/sid
Diffstat (limited to 'lib/sisu/v3/hub.rb')
-rw-r--r-- | lib/sisu/v3/hub.rb | 42 |
1 files changed, 31 insertions, 11 deletions
diff --git a/lib/sisu/v3/hub.rb b/lib/sisu/v3/hub.rb index ce8446e5..1e86db71 100644 --- a/lib/sisu/v3/hub.rb +++ b/lib/sisu/v3/hub.rb @@ -272,22 +272,22 @@ module SiSU @@n_do=0 end def remote_put_base_site_rsync # -CR -p "here #{__FILE__} #{__LINE__}" if @opt =~/M/ +p "#{__LINE__}:#{__FILE__}" if @opt =~/M/ require_relative 'remote' # remote.rb SiSU_Remote::Put.new(@opt).rsync_base end def remote_put_base_site_rsync_match # -CCRZ -p "here #{__FILE__} #{__LINE__}" if @opt =~/M/ +p "#{__LINE__}:#{__FILE__}" if @opt =~/M/ require_relative 'remote' # remote.rb SiSU_Remote::Put.new(@opt).rsync_base_sync end def remote_put_base_site # -Cr -p "here #{__FILE__} #{__LINE__}" if @opt =~/M/ +p "#{__LINE__}:#{__FILE__}" if @opt =~/M/ require_relative 'remote' # remote.rb SiSU_Remote::Put.new(@opt).scp_base end def remote_put_base_site_all # -CCr -p "here #{__FILE__} #{__LINE__}" if @opt =~/M/ +p "#{__LINE__}:#{__FILE__}" if @opt =~/M/ require_relative 'remote' # remote.rb SiSU_Remote::Put.new(@opt).scp_base_all end @@ -469,7 +469,9 @@ p "here #{__FILE__} #{__LINE__}" if @opt =~/M/ SiSU_Remote::Get.new(@opt,@get_p).sisupod end rescue - SiSU_Errors::InfoError.new($!,$@,@opt,@fns).error #ok + SiSU_Errors::InfoError.new($!,$@,@opt,@fns).error do + __LINE__.to_s + ':' + __FILE__ + end @retry_count +=1 retry unless @retry_count > 1 ensure @@ -618,10 +620,24 @@ p "here #{__FILE__} #{__LINE__}" if @opt =~/M/ end end if @opt.act[:psql][:bool] #% --pg, -D DB postgresql - op('dbi','postgresql') + requires('dbi') + if @opt.files.length > 0 #switch test to actual commands + OptionLoopFiles.new(@opt).loop_files_on_given_option do + SiSU_DBI::SQL.new(@opt).connect # -D -d dbi.rb + end + else + SiSU_DBI::SQL.new(@opt).connect # -D -d dbi.rb + end end if @opt.act[:sqlite][:bool] #% --sqlite, -d DB sqlite - op('dbi','sqlite') + requires('dbi') + if @opt.files.length > 0 #switch test to actual commands + OptionLoopFiles.new(@opt).loop_files_on_given_option do + SiSU_DBI::SQL.new(@opt).connect # -D -d dbi.rb + end + else + SiSU_DBI::SQL.new(@opt).connect # -D -d dbi.rb + end end if @opt.act[:manifest][:bool] #% --manifest, -y OptionLoopFiles.new(@opt).manifest_on_files_translated do @@ -673,7 +689,8 @@ p "here #{__FILE__} #{__LINE__}" if @opt =~/M/ if @opt.mod.inspect =~/--about/ \ and not @opt.what.empty? SiSU_Help::Help.new(@opt.what,'color_off').help_request - else SiSU_Help::Help.new('list','color_off').help_request + else + SiSU_Help::Help.new('list','color_off').help_request end elsif @opt.mod.inspect =~/--sitemaps/ #% sitemaps require_relative 'sitemaps' # sitemaps.rb @@ -687,9 +704,12 @@ p "here #{__FILE__} #{__LINE__}" if @opt =~/M/ if @opt.mod.inspect =~/--help/ \ and not @opt.what.empty? SiSU_Help::Help.new(@opt.what).help_request - elsif @opt.mod.inspect =~/--help/; SiSU_Help::Help.new('list').help_request - else SiSU_Help::Help.new('env',@opt).sisu_version - tell=SiSU_Screen::Ansi.new(''," for HELP type:\n\tsisu --help [help request]\n\tman sisu\n or see the system or online documentation on SiSU:\n #{Config::CONFIG['datadir']}/doc/sisu/\n <http://www.jus.uio.no/sisu/>\n <http://sisudoc.org/>"); tell.puts_grey + elsif @opt.mod.inspect =~/--help/ + SiSU_Help::Help.new('list').help_request + else + SiSU_Help::Help.new('env',@opt).sisu_version + tell=SiSU_Screen::Ansi.new(''," for HELP type:\n\tsisu --help [help request]\n\tman sisu\n or see the system or online documentation on SiSU:\n #{Config::CONFIG['datadir']}/doc/sisu/\n <http://www.jus.uio.no/sisu/>\n <http://sisudoc.org/>") + tell.puts_grey end end end |