From 6811ac91f21a434fc7d967c11e1b20f33918c6ea Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 19 Mar 2012 22:07:29 -0400 Subject: v3: 3.2 branch is main (v3dv --> v3); dev (v3dv) branch directories removed * v3dv (3.2) "merged" into v3 (previously 3.1) (& removed) * conf/sisu/v3dv --> conf/sisu/v3 * data/sisu/v3dv --> data/sisu/v3 * lib/sisu/v3dv --> lib/sisu/v3 * bin/sisu* (v3dv references changed to v3) * (--dev modifier (superfluous for the time being) runs main v3 branch) --- lib/sisu/v3/composite.rb | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) (limited to 'lib/sisu/v3/composite.rb') diff --git a/lib/sisu/v3/composite.rb b/lib/sisu/v3/composite.rb index 95be6d1e..21adb030 100644 --- a/lib/sisu/v3/composite.rb +++ b/lib/sisu/v3/composite.rb @@ -59,9 +59,9 @@ =end module SiSU_Assemble require_relative 'sysenv' # sysenv.rb - class Remote_image + class RemoteImage def initialize - @env=SiSU_Env::Info_env.new + @env=SiSU_Env::InfoEnv.new end def image(dir) images=[] @@ -82,7 +82,7 @@ module SiSU_Assemble end output_path="#{@env.path.webserv}/#{@env.path.stub_pwd}/_sisu/image_external" FileUtils::mkdir_p(output_path) unless FileTest.directory?(output_path) - SiSU_Env::System_call.new("#{path}/*",output_path,'q').rsync + SiSU_Env::SystemCall.new("#{path}/*",output_path,'q').rsync end def download_doc_skin(doc_skin) #first element in array is source url path="#{@env.processing_path.processing}/external_document/skin/doc" @@ -104,14 +104,14 @@ module SiSU_Assemble @@imager={} def initialize(opt) @opt=opt - @env=SiSU_Env::Info_env.new + @env=SiSU_Env::InfoEnv.new end def read begin @fns_array=IO.readlines(@opt.fns,'') assembled=insertions? write(assembled) - rescue; SiSU_Errors::Info_error.new($!,$@,@opt.cmd,@opt.fns).error + rescue; SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error ensure end end @@ -161,11 +161,11 @@ module SiSU_Assemble end if not @code_flag \ and i !~/^%+\s/ - i.gsub!(/^([123]|:?[ABC])~\? /,'% [conditional heading:] \1~ ') #off conditional heading (consider syntax) + i=i.gsub(/^([123]|:?[ABC])~\? /,'% [conditional heading:] \1~ ') #off conditional heading (consider syntax) if i =~/^@\S+?:/ - i.gsub!(/\n/m,"\n% ") - i.gsub!(/\n%\s+$/m,'') - i.gsub!(/^@\S+?:/m,"\n% [imported header:] ") #off imported headers + i=i.gsub(/\n/m,"\n% "). + gsub(/\n%\s+$/m,''). + gsub(/^@\S+?:/m,"\n% [imported header:] ") #off imported headers end end file[:prepared] << i @@ -176,8 +176,7 @@ module SiSU_Assemble end file[:prepared] << "\n% end import" << "\n\n" if file[:images].length > 0 - file[:images].flatten! - file[:images].uniq! + file[:images]=file[:images].flatten.uniq file[:images].delete_if {|x| x =~/https?:\/\// } end file @@ -218,32 +217,30 @@ module SiSU_Assemble end else tuned_file << para end - tuned_file.flatten! - tuned_file.compact! + tuned_file=tuned_file.flatten.compact end if @@imager.length >0 @@imager.each do |d,i| - i.flatten! - i.uniq! + i=i.flatten.uniq image_info=d + i - download_images(mage_info.flatten) + download_images(image_info.flatten) end end tuned_file end end - class Composite_file_list + class CompositeFileList @@imager={} def initialize(opt) @opt=opt - @env=SiSU_Env::Info_env.new + @env=SiSU_Env::InfoEnv.new end def read begin @opt.fns=@opt.fns.gsub(/\.ssm\.sst$/,'.ssm') #FIX earlier, hub @fns_array=IO.readlines(@opt.fns,'') files=insertions? - rescue; SiSU_Errors::Info_error.new($!,$@,@opt.cmd,@opt.fns).error + rescue; SiSU_Errors::InfoError.new($!,$@,@opt.cmd,@opt.fns).error ensure end end -- cgit v1.2.3