diff options
author | Ralph Amissah <ralph@amissah.com> | 2011-04-19 21:37:52 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2011-04-19 21:37:52 -0400 |
commit | 44464e284ee840ee0ef7eae2d3f8d589680b18ca (patch) | |
tree | 7967e499e253737a4d8573e9c903ee714be1e762 /lib/sisu/v3/sysenv.rb | |
parent | v3: options, hub, introduce opt.act booleans, more setting in options (diff) |
v3: param, md remove md.cmd and md.mod shortcut methods, use use md.opt
* affects many files that now use @md.opt.cmd & @md.opt.mod
(instead of @md.cmd & @md.mod)
Diffstat (limited to 'lib/sisu/v3/sysenv.rb')
-rw-r--r-- | lib/sisu/v3/sysenv.rb | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/lib/sisu/v3/sysenv.rb b/lib/sisu/v3/sysenv.rb index a573a6c0..e3aee003 100644 --- a/lib/sisu/v3/sysenv.rb +++ b/lib/sisu/v3/sysenv.rb @@ -191,7 +191,6 @@ module SiSU_Env PROCESSING_TUNE => 'tune', PROCESSING_LATEX => 'tex', PROCESSING_TEXINFO => 'texinfo', - PROCESSING_LOUT => 'lout', PROCESSING_SQLITE => 'sqlite', PROCESSING_POSTGRESQL=> 'postgresql', PROCESSING_ENCODING => 'encoding', @@ -225,7 +224,8 @@ module SiSU_Env : ["#{@@home}/.sisu",@@sisu_etc] attr_accessor :user,:home,:hostname,:pwd,:host,:arch,:rbver,:dir_arch,:dir_sitearch,:dir_bin,:locale,:webserv_path,:webserv_host_cgi,:webserv_port_cgi,:default_dir,:rc_path,:yamlrc_path,:ad_path def initialize - @user,@home,@hostname,@pwd,@sisu_etc,@host,@arch,@rbver,@dir_arch,@dir_sitearch,@dir_bin,@locale,@default_dir,@rc_path,@yamlrc_path,@ad_path=@@user,@@home,@@hostname,@@pwd,@@sisu_etc,@@host,@@arch,@@rbver,@@dir_arch,@@dir_sitearch,@@dir_bin,@@locale,@@default_dir,@@rc_path,@@yamlrc_path,@@ad_path + @user,@home,@hostname,@pwd,@sisu_etc,@host,@arch,@rbver,@dir_arch,@dir_sitearch,@dir_bin,@locale,@default_dir,@rc_path,@yamlrc_path,@ad_path=\ + @@user,@@home,@@hostname,@@pwd,@@sisu_etc,@@host,@@arch,@@rbver,@@dir_arch,@@dir_sitearch,@@dir_bin,@@locale,@@default_dir,@@rc_path,@@yamlrc_path,@@ad_path #note rbver is duplicated in Info_version end end @@ -890,7 +890,6 @@ module SiSU_Env @fnb ||=@@fb #clean up this... used primarily for zap which is not passed normal parameters @fixed_websev_root='' # @home @pwd=@@pwd=Dir.pwd -# @pwd=@@pwd||=Dir.pwd m=/.+\/(?:src\/)?(\S+)/m # m=/.+?\/(?:src\/)?([^\/]+)$/im # m=/.+\/(\S+)/m @stub_pwd=@@pwd[m,1] @stub_txt= @stub_pwd + '/txt' @@ -1815,15 +1814,15 @@ WOK end def webrick_port if @md \ - and @md.cmd.inspect=~/-F/ \ - and @md.mod.inspect=~/port=(\d+)/ + and @md.opt.cmd.inspect=~/-F/ \ + and @md.opt.mod.inspect=~/port=(\d+)/ $1 else if defined? @rc['webserv_cgi']['port'] if @rc['webserv_cgi']['port'].nil? \ - and (defined? @md.mod \ - and not @md.mod.nil? \ - and @md.mod.inspect=~/webrick/) + and (defined? @md.opt.mod \ + and not @md.opt.mod.nil? \ + and @md.opt.mod.inspect=~/webrick/) defaults[:webserv_port_cgi] elsif not @rc['webserv_cgi']['port'].nil? @rc['webserv_cgi']['port'] @@ -1835,15 +1834,16 @@ WOK end def webserv_port_cgi if @md \ - and @md.cmd.inspect=~/-F/ \ - and @md.mod.inspect=~/port=(\d+)/ + and defined? @md.opt \ + and @md.opt.cmd.inspect=~/-F/ \ + and @md.opt.mod.inspect=~/port=(\d+)/ $1 else if defined? @rc['webserv_cgi']['port'] if @rc['webserv_cgi']['port'].nil? \ - and (defined? @md.mod \ - and not @md.mod.nil? \ - and @md.mod.inspect=~/webrick/) + and (defined? @md.opt.mod \ + and not @md.opt.mod.nil? \ + and @md.opt.mod.inspect=~/webrick/) defaults[:webserv_port_cgi] elsif not @rc['webserv_cgi']['port'].nil? @rc['webserv_cgi']['port'] @@ -2304,44 +2304,44 @@ WOK if @md \ and defined? @md.fn \ and @md.fn # used for by_language_code? - if @md.cmd =~ /[hH]/ + if @md.opt.cmd =~ /[hH]/ ft << @md.fn[:html] end - if @md.cmd =~ /w/ \ - and @md.cmd !~ /[hH]/ + if @md.opt.cmd =~ /w/ \ + and @md.opt.cmd !~ /[hH]/ ft << @md.fn[:concordance] end - if @md.cmd =~ /y/ \ - and @md.cmd !~ /[hH]/ + if @md.opt.cmd =~ /y/ \ + and @md.opt.cmd !~ /[hH]/ ft << @md.fn[:manifest] end - if @md.cmd =~ /[at]/; ft << @md.fn[:plain] + if @md.opt.cmd =~ /[at]/; ft << @md.fn[:plain] end - if @md.cmd =~ /b/; ft << @md.fn[:xhtml] + if @md.opt.cmd =~ /b/; ft << @md.fn[:xhtml] end - if @md.cmd =~ /e/; ft << @md.fn[:epub] + if @md.opt.cmd =~ /e/; ft << @md.fn[:epub] end - if @md.cmd =~ /g/; ft << @md.fn[:wiki] + if @md.opt.cmd =~ /g/; ft << @md.fn[:wiki] end - if @md.cmd =~ /i/; ft << @md.fn[:manpage] + if @md.opt.cmd =~ /i/; ft << @md.fn[:manpage] end - if @md.cmd =~ /N/; ft << @md.fn[:digest] + if @md.opt.cmd =~ /N/; ft << @md.fn[:digest] end - if @md.cmd =~ /o/; ft << @md.fn[:odf] + if @md.opt.cmd =~ /o/; ft << @md.fn[:odf] end - if @md.cmd =~ /O/; ft << @md.fn[:oai_pmh] + if @md.opt.cmd =~ /O/; ft << @md.fn[:oai_pmh] end - if @md.cmd =~ /p/; ft << @md.fn[:pdf_l] << @md.fn[:pdf_p] + if @md.opt.cmd =~ /p/; ft << @md.fn[:pdf_l] << @md.fn[:pdf_p] end - if @md.cmd =~ /s/; ft << @md.fns + if @md.opt.cmd =~ /s/; ft << @md.fns end - if @md.cmd =~ /S/; ft << @md.fn[:sisupod] << '.kdi' + if @md.opt.cmd =~ /S/; ft << @md.fn[:sisupod] << '.kdi' end - if @md.cmd =~ /x/; ft << @md.fn[:sax] + if @md.opt.cmd =~ /x/; ft << @md.fn[:sax] end - if @md.cmd =~ /X/; ft << @md.fn[:dom] + if @md.opt.cmd =~ /X/; ft << @md.fn[:dom] end - if @md.cmd =~ /G/; ft << @md.fn[:pot] + if @md.opt.cmd =~ /G/; ft << @md.fn[:pot] end @fnb=@md.fnb else # still needed where/when param is not parsed @@ -3744,7 +3744,7 @@ WOK skin_path << "#{@env.processing_path.processing}/external_document/skin" skin=true if @pwd_stub =~/^sisupod$/ \ - and @md.mod.inspect !~/--trust/ + and @md.opt.mod.inspect !~/--trust/ skin=false #security only run skins on sisupod if --trust flag is provided end doc_skin,dir_skin=nil,nil |