From 4ef892c96f0e707085789ae4f2082565a9363c71 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 15 Oct 2007 11:06:50 +0100 Subject: remote server configuration info set in sisurc.yml for multiple hosts, sysenv and help sisurc.yml remote host settings takes both old and new configuration notation new being through use of Array for each host '-' separator, [example is provided] --- lib/sisu/v0/help.rb | 44 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 42 insertions(+), 2 deletions(-) (limited to 'lib/sisu/v0/help.rb') diff --git a/lib/sisu/v0/help.rb b/lib/sisu/v0/help.rb index e9f3906b..50539d9d 100644 --- a/lib/sisu/v0/help.rb +++ b/lib/sisu/v0/help.rb @@ -1015,6 +1015,47 @@ WOK else puts 'SiSU version information not available' end end + def rhost + @ls=leading_spaces=' '*49 + @rhost=SiSU_Env::Info_remote_host.new.rhost + def r1 + if @rhost.r1; @rhost.r1 + "\n" + else '' + end + end + def r2 + if @rhost.r2; @ls + @rhost.r2 + "\n" + else '' + end + end + def r3 + if @rhost.r3; @ls + @rhost.r3 + "\n" + else '' + end + end + def r4 + if @rhost.r4; @ls + @rhost.r4 + "\n" + else '' + end + end + def r5 + if @rhost.r5; @ls + @rhost.r5 + "\n" + else '' + end + end + def r6 + if @rhost.r6; @ls + @rhost.r6 + "\n" + else '' + end + end + def note + msg='(remote settings user and host set in sisurc.yml under remote:)' + if @rhost.r1; @ls + msg + else msg + end + end + self + end def environment cf_defaults=SiSU_Env::Info_processing_flag.new sisu_version @@ -1022,8 +1063,7 @@ WOK #{@cX.green}current and output directories#{@cX.off} user: #{@cX.blue}#{@env.user}#{@cX.off} home: #{@cX.blue}#{@env.path.home}#{@cX.off} - remote set [remote user]@[remote host]: #{@cX.blue}#{SiSU_Env::Info_remote_host.new.remote_host[:name]}#{@cX.off} - (remote settings user and host set in sisurc.yml under remote:) + remote set [remote user]@[remote host]: #{@cX.blue}#{rhost.r1}#{rhost.r2}#{rhost.r3}#{rhost.r4}#{rhost.r5}#{rhost.r6}#{@cX.off}#{rhost.note} locale (encoding, UTF-8 desired): #{@cX.blue}#{@env.locale}#{@cX.off} current directory: #{@cX.blue}#{@env.path.pwd}#{@cX.off} document output root directory set to: #{@cX.blue}#{@env.path.webserv}#{@cX.off} -- cgit v1.2.3 From e1ec4bd2dad2bd22ad97cea398ae1cfcfae183a2 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 15 Oct 2007 19:27:16 +0100 Subject: mostly the arrangement of conditionals --- lib/sisu/v0/help.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/sisu/v0/help.rb') diff --git a/lib/sisu/v0/help.rb b/lib/sisu/v0/help.rb index 50539d9d..1c1fd4d0 100644 --- a/lib/sisu/v0/help.rb +++ b/lib/sisu/v0/help.rb @@ -77,7 +77,8 @@ module SiSU_Help help_info=%{#{@cX.blue_hi}SiSU help#{@cX.off} #{@cX.ruby}~#{@cX.off} #{@request}} help_list=%{#{@cX.blue}sisu --help#{@cX.off} #{@cX.cyan}type keyword else "enter" to exit help:\n\tkeywords include:#{@cX.off} #{@cX.brown}list, (com)mands, short(cuts), (mod)ifiers, (env)ironment, markup, syntax, headers, headings, endnotes, tables, example, customise, skin, (dir)ectories, path, (lang)uage, db, install, setup, (conf)igure, convert, external_programs, dublincore, termsheet, search, sql, hyper(est)raier, features, external_programs, license#{@cX.off} \n} help_prompt=%{#{@cX.fuschia}exit, [or carriage return to exit help] #{@cX.off}\n#{@cX.blue_hi}SiSU help#{@cX.off} #{@cX.ruby}~#{@cX.off} } - until gotten =~/exit|quit|bye|q|^\s*$/ and ( @request.nil? or @request.empty? ) + until gotten =~/exit|quit|bye|q|^\s*$/ \ + and ( @request.nil? or @request.empty? ) @help=Help.new(@request,@color) if @request puts help_info @@ -1435,7 +1436,7 @@ WOK arch: #{@cX.blue}#{@env.arch}#{@cX.off} Directories for installation - bin: #{@cX.blue}#{Config::CONFIG['bindir']}#{@cX.off} or #{@cX.blue}#{Config::CONFIG['sitelibdir']}#{@cX.off} + bin: #{@cX.blue}#{Config::CONFIG['bindir']}#{@cX.off} or #{@cX.blue}#{Config::CONFIG['sitelibdir']}#{@cX.off} lib (site-ruby): #{@cX.blue}#{Config::CONFIG['rubylibdir']}/#{SiSU_lib}#{@cX.off} or #{@cX.blue}#{Config::CONFIG['sitelibdir']}/#{SiSU_lib}#{@cX.off} conf [etc]: #{@cX.blue}#{@env.path.etc}/sisu#{@cX.off} data (document samples, images, README): #{@cX.blue}#{@env.path.sample_data}#{@cX.off} -- cgit v1.2.3