From 42aae8da2b103b4038cfb2fc24591b9004972d4a Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 6 Jan 2014 22:03:06 -0500 Subject: bin/sisu, version dir (fix) & version info * (ensure SiSU_version_dir) fix * sisu version info, yml info also when installed via ruby gem * downstream libs --- lib/sisu/v5/sysenv.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib/sisu/v5/sysenv.rb') diff --git a/lib/sisu/v5/sysenv.rb b/lib/sisu/v5/sysenv.rb index 1eaca0b8..1d0920f5 100644 --- a/lib/sisu/v5/sysenv.rb +++ b/lib/sisu/v5/sysenv.rb @@ -3717,6 +3717,11 @@ 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 end def rbversion @@ -3736,7 +3741,7 @@ WOK @color.cmd else '-v' end - SiSU_Screen::Ansi.new(opt_cmd,version[:project],version[:version],version[:date_stamp],version[:date],rb_ver).version + SiSU_Screen::Ansi.new(opt_cmd,version[:project],version[:version],version[:date_stamp],version[:date],version[:install_method],rb_ver).version else puts 'SiSU (version information not available)' end end -- cgit v1.2.3