aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v5
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2014-01-06 22:03:06 -0500
committerRalph Amissah <ralph@amissah.com>2014-01-06 22:03:28 -0500
commit42aae8da2b103b4038cfb2fc24591b9004972d4a (patch)
tree43664a21f64de59ca4fd0a241603260e3b7de04a /lib/sisu/v5
parentv5: date 2014: headers bin/sisu & lib/; code constants.rb (diff)
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
Diffstat (limited to 'lib/sisu/v5')
-rw-r--r--lib/sisu/v5/manifest.rb2
-rw-r--r--lib/sisu/v5/screen_text_color.rb5
-rw-r--r--lib/sisu/v5/sysenv.rb7
3 files changed, 9 insertions, 5 deletions
diff --git a/lib/sisu/v5/manifest.rb b/lib/sisu/v5/manifest.rb
index 0ba7bd0f..d70ad4ba 100644
--- a/lib/sisu/v5/manifest.rb
+++ b/lib/sisu/v5/manifest.rb
@@ -829,7 +829,7 @@ WOK
metadata(id,info)
end
if @md.sisu_version
- id,info=@translate.sisu_version,"#{@md.sisu_version[:project]} #{@md.sisu_version[:version]} #{@md.sisu_version[:date_stamp]} (#{@md.sisu_version[:date]})"
+ id,info=@translate.sisu_version,"#{@md.sisu_version[:project]} #{@md.sisu_version[:version]} #{@md.sisu_version[:date_stamp]} (#{@md.sisu_version[:date]})#{@md.sisu_version[:install_method]}"
metadata(id,info)
end
if @md.ruby_version
diff --git a/lib/sisu/v5/screen_text_color.rb b/lib/sisu/v5/screen_text_color.rb
index 2bdbb4a3..18ed9926 100644
--- a/lib/sisu/v5/screen_text_color.rb
+++ b/lib/sisu/v5/screen_text_color.rb
@@ -71,8 +71,7 @@ module SiSU_Screen
attr_reader :cX
def initialize(color_state,*txt)
@color_state,@txt=color_state,txt
- @color_instruct=txt[0] ####
- #flag=SiSU_Env::InfoProcessingFlag.new
+ @color_instruct=txt[0]
@cX=@@cX=if color_state==:on
Color.new do
self.off=self.white=self.white_bold=self.marker=self.bold=self.underline=self.invert=self.darkgrey_hi=self.grey_hi=self.pink_hi=self.fuchsia_hi=self.red_hi=self.orange_hi=self.yellow_hi=self.brown_hi=self.lightgreen_hi=self.green_hi=self.cyan_hi=self.blue_hi=self.navy_hi=self.grey=self.pink=self.fuchsia=self.ruby=self.red=self.orange=self.yellow=self.brown=self.green=self.darkgreen=self.cyan=self.blue=self.navy=self.black=''
@@ -208,7 +207,7 @@ module SiSU_Screen
STDERR.puts "\t #{@cX.grey}#{@txt[0]}#{@cX.off} #{@cX.fuchsia}#{@txt[1]}#{@cX.off} #{@cX.grey}#{@txt[2]}#{@cX.off}"
end
def version
- puts "#{@cX.blue_hi}#{@txt[0]} #{@txt[1]}#{@cX.off} #{@cX.grey} (#{@txt[3]} [#{@txt[2]}]) &#{@cX.off} #{@cX.ruby}Ruby#{@cX.off} #{@cX.grey}(#{@txt[4]})#{@cX.off}\n"
+ puts "#{@cX.blue_hi}#{@txt[0]} #{@txt[1]}#{@cX.off} #{@cX.grey} (#{@txt[3]} [#{@txt[2]}])#{@txt[4]} &#{@cX.off} #{@cX.ruby}Ruby#{@cX.off} #{@cX.grey}(#{@txt[5]})#{@cX.off}\n"
end
def html3numbers
puts %{\t#{@cX.green}#{@txt[0]}#{@cX.off} #{@cX.cyan}files processed#{@cX.off}. } +
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