diff options
author | Ralph Amissah <ralph@amissah.com> | 2012-01-23 21:40:41 -0500 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2012-01-23 21:40:54 -0500 |
commit | 3d6deb1d4a0e3a8ab8294e441cf2c0ff1075e4c6 (patch) | |
tree | db49ede3ba9b0b8e23789441f31a2510a9219807 /lib/sisu/v3dv/hub.rb | |
parent | v3dv: sysenv, use "which" instead of "whereis" to locate programs, test (diff) |
v3dv: call most methods by full name (include associated module & class names)
* messing with code, merge back now likely to become v3.2
Diffstat (limited to 'lib/sisu/v3dv/hub.rb')
-rw-r--r-- | lib/sisu/v3dv/hub.rb | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/lib/sisu/v3dv/hub.rb b/lib/sisu/v3dv/hub.rb index dbcf3c8e..c2477267 100644 --- a/lib/sisu/v3dv/hub.rb +++ b/lib/sisu/v3dv/hub.rb @@ -233,7 +233,7 @@ module SiSU else if @req !~/^conf$/ \ and @opt.fns !~/http:\/\// - Operations.new(@opt).not_found + SiSU::Operations.new(@opt).not_found end end elsif FileTest.file?(put) @@ -250,14 +250,14 @@ module SiSU @n_do=@n_do+1 SiSU_Screen::Ansi.new(@opt.cmd,@n_do,"#{@req.upcase} processed").files_processed if @opt.cmd =~/[MVv]/ end - else Operations.new(@opt).not_found + else SiSU::Operations.new(@opt).not_found end end end elsif @req =~/^dbi$/; SiSU_DBI::SQL.new(@opt).connect # -D -d elsif @req=~/^sisupod_make$/; SiSU_Doc::Source.new(@opt).read # -S end - Operations.new.counter + SiSU::Operations.new.counter end end class Operations @@ -346,7 +346,7 @@ p "here #{__FILE__} #{__LINE__}" if @opt =~/M/ @tell=lambda { SiSU_Screen::Ansi.new(@opt.cmd,@msg,"#{@msgs.inspect if @msgs}") } end def op(req,msg) - Op.new(@opt,req,msg).select if req and msg + SiSU::Op.new(@opt,req,msg).select if req and msg end def actions if @opt.cmd =~/E/ # re-assign character @@ -407,22 +407,22 @@ p "here #{__FILE__} #{__LINE__}" if @opt =~/M/ if @opt.cmd =~/R/ if @opt.mod.inspect =~/--init(?:ialize)?=site/ \ and @opt.cmd =~/RZ/ - Operations.new(@opt).remote_put_base_site_rsync_match - else Operations.new(@opt).remote_put_base_site_rsync + SiSU::Operations.new(@opt).remote_put_base_site_rsync_match + else SiSU::Operations.new(@opt).remote_put_base_site_rsync end elsif @opt.cmd =~/r/ if @opt.mod.inspect =~/--init(?:ialize)?=site/ \ and @opt.cmd =~/CCr/ - Operations.new(@opt).remote_put_base_site_all - else Operations.new(@opt).remote_put_base_site + SiSU::Operations.new(@opt).remote_put_base_site_all + else SiSU::Operations.new(@opt).remote_put_base_site end end end if @opt.act[:sample_search_form][:bool] #% --sample-search-form, -F cgi sample search form - Operations.new(@opt).cgi + SiSU::Operations.new(@opt).cgi end if @opt.act[:webrick][:bool] #% --webrick, -W webrick - Operations.new(@opt).webrick + SiSU::Operations.new(@opt).webrick end if @opt.cmd =~/Z/ #% -Z wipe previous output clean op('zap','Zap, deletions') @@ -463,7 +463,7 @@ p "here #{__FILE__} #{__LINE__}" if @opt =~/M/ if @get_s.length > 0 #% remote markup file .sst require_relative 'remote' # remote.rb SiSU_Remote::Get.new(@opt,@get_s).fns - Operations.new.counter + SiSU::Operations.new.counter end if @get_p.length > 0 #% remote sisupod require_relative 'remote' # remote.rb @@ -536,13 +536,14 @@ p "here #{__FILE__} #{__LINE__}" if @opt =~/M/ if FileTest.file?(fns) @opt.fns=fns case @opt.fns - when /\.(termsheet.rb)$/; Operations.new(@opt).termsheet + when /\.(termsheet.rb)$/ + SiSU::Operations.new(@opt).termsheet else #print "not processed --> ", fns, "\n" end - else Operations.new(@opt).not_found + else SiSU::Operations.new(@opt).not_found end end - Operations.new.counter + SiSU::Operations.new.counter end if @opt.cmd =~/k/ #% -T temporary tests op('xml_scaffold','XML scaffold') @@ -632,7 +633,7 @@ p "here #{__FILE__} #{__LINE__}" if @opt =~/M/ and @opt.mod.inspect =~/--(?:(?:convert(?:-from)?|from)[=-])?(?:xml2sst|sxml)/ elsif @opt.fns=~/\.ssi$/ \ and @opt.mod.inspect =~/--identify/ - else Operations.new(@opt).not_recognised + else SiSU::Operations.new(@opt).not_recognised end end if @opt.fns =~/\.ssm\.sst$/ \ @@ -641,7 +642,7 @@ p "here #{__FILE__} #{__LINE__}" if @opt =~/M/ @tell.call.warn unless @opt.cmd =~/V/ File.unlink(@opt.fns) if File.exist?(@opt.fns) #CONSIDER end - else #Operations.new(fns,'html').not_found + else #SiSU::Operations.new(fns,'html').not_found end end end @@ -665,7 +666,7 @@ p "here #{__FILE__} #{__LINE__}" if @opt =~/M/ home=ENV['HOME'] argv=$* @opt=SiSU_Commandline::Options.new(argv) - Processing.new(@opt).actions + SiSU::Processing.new(@opt).actions rescue; STDERR.puts SiSU_Screen::Ansi.new(@opt,$!,$@,nil).rescue #fix ensure Dir.chdir(@@pwd_the) |