From cd01cd76e133dce0708fcfedf3e62fc6fbae83af Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 6 Feb 2013 21:19:27 -0500 Subject: v4 (v3): utils (debug renamed), SiSU_Utils::CodeMarker (from Debug::Mark) --- lib/sisu/v4/sysenv.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/sisu/v4/sysenv.rb') diff --git a/lib/sisu/v4/sysenv.rb b/lib/sisu/v4/sysenv.rb index d8b6f4fd..c5a1cebb 100644 --- a/lib/sisu/v4/sysenv.rb +++ b/lib/sisu/v4/sysenv.rb @@ -1067,7 +1067,7 @@ module SiSU_Env elsif output_dir_structure.by_filename? '' else - puts SiSU_Debug::Mark.new(__LINE__,__FILE__).set(:fuschia) + puts SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).set(:fuschia) puts 'set output type, by: language, filetype or filename' end @stub_set_manifest=stub + '/manifest' -- cgit v1.2.3 From 9729605b3202aa4c808be01fe65faf88fd353df4 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 6 Feb 2013 21:20:53 -0500 Subject: v4: utils, SiSU_Utils::Path.new.base_markup provides base markup directory * base markup directory contains sisu markup files, any language sub-directories (with sisu markup files) and sisu resource configuration sub-directory, if any (./_sisu) (identifies when needed in runtime) --- lib/sisu/v4/sysenv.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/sisu/v4/sysenv.rb') diff --git a/lib/sisu/v4/sysenv.rb b/lib/sisu/v4/sysenv.rb index c5a1cebb..2ac8897f 100644 --- a/lib/sisu/v4/sysenv.rb +++ b/lib/sisu/v4/sysenv.rb @@ -60,6 +60,7 @@ @@lang_info=nil module SiSU_Env require_relative 'constants' # constants.rb + require_relative 'utils' # utils.rb require 'fileutils' include FileUtils::Verbose require 'singleton' @@ -213,7 +214,7 @@ module SiSU_Env } @@default_dir=DEFAULT_DIR m=/.+\/(?:src\/)?(\S+)/m # m=/.+?\/(?:src\/)?([^\/]+)$/im # m=/.+\/(\S+)/m - @@pwd=@pwd=(/(\S+?)(?:\/(?:#{Px[:lng_lst_rgx]}))?$/).match(Dir.pwd)[1] + @@pwd=@pwd=SiSU_Utils::Path.new.base_markup stub_pwd=@pwd[m,1] 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,:ad_path def initialize @@ -3926,7 +3927,7 @@ WOK class InfoDb < InfoEnv @@rc=nil def initialize - @@pwd=@pwd=(/(\S+?)(?:\/(?:#{Px[:lng_lst_rgx]}))?$/).match(Dir.pwd)[1] + @@pwd=@pwd=SiSU_Utils::Path.new.base_markup @env=SiSU_Env::InfoEnv.new pt=Pathname.new(@pwd) r=Px[:lng_lst_rgx] -- cgit v1.2.3 From 83a88c716a3577de0667f49cce77699790eb3686 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 6 Feb 2013 21:21:41 -0500 Subject: v4: sysenv, webserv dir (output dir), ensure is determined from base markup dir * where relative path provided (remove possibility of path expansion being done from a language sub-directory), fix --- lib/sisu/v4/sysenv.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/sisu/v4/sysenv.rb') diff --git a/lib/sisu/v4/sysenv.rb b/lib/sisu/v4/sysenv.rb index 2ac8897f..728f4fc4 100644 --- a/lib/sisu/v4/sysenv.rb +++ b/lib/sisu/v4/sysenv.rb @@ -1941,7 +1941,11 @@ WOK man_path=if @@man_path.nil? man_path=if defined? @rc['webserv']['path'] \ and @rc['webserv']['path'] =~/\S\S+/ + pwd=Dir.pwd + Dir.chdir(SiSU_Utils::Path.new.base_markup) man_path=@@man_path=File.expand_path(@rc['webserv']['path']) + Dir.chdir(pwd) + man_path else defaults[:webserv_path] end else @@man_path -- cgit v1.2.3