aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2014-01-17 21:35:12 -0500
committerRalph Amissah <ralph@amissah.com>2014-01-17 21:36:09 -0500
commitc00345b2e7cf7041a01a84e51e77ce88dceaa6e1 (patch)
tree47345e98ca88d03f2dfece3c77449b482b1cafef /lib
parentREADME clean info related to unsupported --help option (diff)
bin/sisu experimentationsisu_4.2.19
* start preparing for ruby changes * work on fix for bug related to gem path & system installed sisu
Diffstat (limited to 'lib')
-rw-r--r--lib/sisu/v4/sysenv.rb21
-rw-r--r--lib/sisu/v5/sysenv.rb23
2 files changed, 27 insertions, 17 deletions
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"