From c00345b2e7cf7041a01a84e51e77ce88dceaa6e1 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 17 Jan 2014 21:35:12 -0500 Subject: bin/sisu experimentation * start preparing for ruby changes * work on fix for bug related to gem path & system installed sisu --- lib/sisu/v4/sysenv.rb | 21 +++++++++++++-------- lib/sisu/v5/sysenv.rb | 23 ++++++++++++++--------- 2 files changed, 27 insertions(+), 17 deletions(-) (limited to 'lib') diff --git a/lib/sisu/v4/sysenv.rb b/lib/sisu/v4/sysenv.rb index b216089d..341a29f7 100644 --- a/lib/sisu/v4/sysenv.rb +++ b/lib/sisu/v4/sysenv.rb @@ -3599,11 +3599,13 @@ WOK if File.exist?(yst_ver) @version=YAML::load(File::open(yst_ver)) #unless @@noyaml end - spec = Gem::Specification.find_by_name("sisu") - gem_root = spec.gem_dir - @version[:install_method]=(File.dirname(__FILE__.gsub(/\/lib\/sisu\/#{SiSU_version_dir}/,'')) == gem_root) \ - ? ' (ruby gem install)' - : '' + @version[:install_method]=if SiSU_is==:gem_install + spec = Gem::Specification.find_by_name("sisu") + gem_root = spec.gem_dir + (File.dirname(__FILE__.gsub(/\/lib\/sisu\/#{SiSU_version_dir}/,'')) == gem_root) \ + ? ' (ruby gem install)' : '' + else '' + end @version end def rbversion @@ -6320,9 +6322,12 @@ WOK cp_images(src,dest) if FileTest.directory?(src) end def cp_base_images #fix images - src=SiSU_path_base \ - ? SiSU_path_base + '/data/sisu/image' - : "#{@env.path.share}/image" + src=if SiSU_path_base == :system_default \ + or SiSU_path_base == nil + @env.path.share + '/image' + else + SiSU_path_base + '/data/sisu/image' + end dest_arr=[ "#{@env.path.webserv}/_sisu/image_sys", "#{@env.path.webserv}/#{@env.path.stub_pwd}/_sisu/image_sys" diff --git a/lib/sisu/v5/sysenv.rb b/lib/sisu/v5/sysenv.rb index 954fb179..e04882d7 100644 --- a/lib/sisu/v5/sysenv.rb +++ b/lib/sisu/v5/sysenv.rb @@ -117,7 +117,7 @@ module SiSU_Env processing_pth=tmp_processing_individual processing_dir=prcss_dir processing_git="#{Dir.pwd}/#{Gt[:grotto]}" - user=ENV['USER'] + #user=ENV['USER'] port_pgsql=if defined? ENV['PGPORT'] \ and not (ENV['PGPORT'].nil? \ || ENV['PGPORT'].empty?) \ @@ -3717,11 +3717,13 @@ WOK if File.exist?(yst_ver) @version=YAML::load(File::open(yst_ver)) #unless @@noyaml end - spec = Gem::Specification.find_by_name("sisu") - gem_root = spec.gem_dir - @version[:install_method]=(File.dirname(__FILE__.gsub(/\/lib\/sisu\/#{SiSU_version_dir}/,'')) == gem_root) \ - ? ' (ruby gem install)' - : '' + @version[:install_method]=if SiSU_is==:gem_install + spec = Gem::Specification.find_by_name("sisu") + gem_root = spec.gem_dir + (File.dirname(__FILE__.gsub(/\/lib\/sisu\/#{SiSU_version_dir}/,'')) == gem_root) \ + ? ' (ruby gem install)' : '' + else '' + end @version end def rbversion @@ -6932,9 +6934,12 @@ WOK cp_images(src,dest) if FileTest.directory?(src) end def cp_base_images #fix images - src=SiSU_path_base \ - ? SiSU_path_base + '/data/sisu/image' - : "#{@env.path.share}/image" + src=if SiSU_path_base == :system_default \ + or SiSU_path_base == nil + @env.path.share + '/image' + else + SiSU_path_base + '/data/sisu/image' + end dest_arr=[ "#{@env.path.webserv}/_sisu/image_sys", "#{@env.path.webserv}/#{@env.path.stub_pwd}/_sisu/image_sys" -- cgit v1.2.3