bin + c&d: RbConfig (instead of Config, switch)
authorRalph Amissah <ralph@amissah.com>
Mon, 12 Jan 2015 14:59:35 +0000 (09:59 -0500)
committerRalph Amissah <ralph@amissah.com>
Tue, 20 Jan 2015 04:46:16 +0000 (23:46 -0500)
bin/sisu
data/doc/sisu/CHANGELOG_v5
data/doc/sisu/CHANGELOG_v6
lib/sisu/current/rexml.rb
lib/sisu/current/se_info_system.rb
lib/sisu/develop/rexml.rb
lib/sisu/develop/se_info_system.rb

index 276b8ed885f4f7feb0fff9418bdf2d1845dd736a..80436d2a617c195ae9ddd7e0145b47a097415a2f 100644 (file)
--- a/bin/sisu
+++ b/bin/sisu
@@ -31,7 +31,7 @@ class Orient
   end
   def sisu_run_from?
     if processing.called_as == processing.file_full_path \
-    and File.dirname(processing.file_full_path) != Config::CONFIG['bindir']
+    and File.dirname(processing.file_full_path) != RbConfig::CONFIG['bindir']
       :full_path_to_sisu_bin_in_sisu_dir_tree
     elsif processing.file_full_path =~/\/gems\// \
     and processing.file_full_path \
@@ -149,11 +149,11 @@ class Orient
   def paths_set
     if sisu_run_from? == :system_install \
     and processing.called_as \
-    =~ /^#{Config::CONFIG['bindir']}\/sisu[#{version.stable}#{version.unstable}]?$/
+    =~ /^#{RbConfig::CONFIG['bindir']}\/sisu[#{version.stable}#{version.unstable}]?$/
       :set_path_system
     elsif sisu_run_from? == :full_path_to_sisu_bin_in_sisu_dir_tree \
     and processing.called_as \
-    !~ /^#{Config::CONFIG['bindir']}\/sisu[#{version.stable}#{version.unstable}]?$/ \
+    !~ /^#{RbConfig::CONFIG['bindir']}\/sisu[#{version.stable}#{version.unstable}]?$/ \
     && File.expand_path(processing.called_as) \
     =~ /bin\/sisu[#{version.stable}#{version.unstable}]?$/ \
     && FileTest.file?(processing.called_as)
@@ -166,7 +166,7 @@ class Orient
   def sisu_path_base
     case paths_set
     when :set_path_system
-      Config::CONFIG['datadir'] + '/sisu'
+      RbConfig::CONFIG['datadir'] + '/sisu'
     when :set_dir_tree_full_path
       File.expand_path(processing.called_as).
         sub(/\/bin\/sisu[#{version.stable}#{version.unstable}]?$/,'')
@@ -178,7 +178,7 @@ class Orient
   def sisu_path_base_system_data
     case paths_set
     when :set_path_system
-      Config::CONFIG['datadir'] + '/sisu'
+      RbConfig::CONFIG['datadir'] + '/sisu'
     when :set_dir_tree_full_path
       File.expand_path(processing.called_as).
         sub(/\/bin\/sisu[#{version.stable}#{version.unstable}]?$/,'/data/sisu')
@@ -189,7 +189,7 @@ class Orient
   end
   def sisu_path_specified_lib
     if (processing.called_as \
-    !~ /^#{Config::CONFIG['bindir']}\/sisu[#{version.stable}#{version.unstable}]?$/)
+    !~ /^#{RbConfig::CONFIG['bindir']}\/sisu[#{version.stable}#{version.unstable}]?$/)
       File.expand_path(processing.called_as).
         sub(/bin\/sisu[#{version.stable}#{version.unstable}]?$/,'lib')
     else nil
@@ -320,10 +320,10 @@ rescue #% -
   puts %{
                    #{%x{ruby -v}.strip.to_s}
                    #{RUBY_VERSION}
-    ruby version:  #{Config::CONFIG['RUBY_PROGRAM_VERSION']}p#{Config::CONFIG['PATCHLEVEL']}
-    ruby named:    #{Config::CONFIG['ruby_version']}
-    rubylib:       #{Config::CONFIG['rubylibdir']}
-    rubylib local: #{Config::CONFIG['sitelibdir']}
+    ruby version:  #{RbConfig::CONFIG['RUBY_PROGRAM_VERSION']}p#{RbConfig::CONFIG['PATCHLEVEL']}
+    ruby named:    #{RbConfig::CONFIG['ruby_version']}
+    rubylib:       #{RbConfig::CONFIG['rubylibdir']}
+    rubylib local: #{RbConfig::CONFIG['sitelibdir']}
     gem dir:       #{Gem.dir}
     gem path:      #{Gem.path}
   }
index f92646dbd3fbdbce7083cd85c661f2b7e2962f81..c0e9d59dcd0ffb00a289a7890999591c9b7116d3 100644 (file)
@@ -82,6 +82,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_5.8.0.orig.tar.xz
     marked up documents, i.e. to place translated versions of a sisu document
     under po4a management
 
+  * use RbConfig instead of Config
+
   * sisu.org addition, modification, consider
 
 ** SiSU "UnFrozen" - prior to end of Debian Freeze
index 33b82b20088dc88722056f05e1fa6f395d3273f7..6047115b1ee5010a0e896ac12c19cbde6656d262 100644 (file)
@@ -94,6 +94,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_6.4.0.orig.tar.xz
 
   * utils_composite, composite documents (.ssm) extract the list of insert files
 
+  * use RbConfig instead of Config
+
   * sisu.org addition, modification, consider
 
 ** SiSU "UnFrozen" - prior to end of Debian Freeze
index 8a0e62b59dba2cdaa6a3162ff277b1f0b5f5f60b..9a11305c494d912274053ec8f430242627822761 100644 (file)
@@ -58,7 +58,7 @@ module SiSU_Rexml
   # load XML file for REXML parsing
   begin
     require 'rexml/document' \
-      if FileTest.directory?("#{Config::CONFIG['rubylibdir']}/rexml") #Config::CONFIG['sitedir']
+      if FileTest.directory?("#{RbConfig::CONFIG['rubylibdir']}/rexml") #RbConfig::CONFIG['sitedir']
   rescue LoadError
     SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).
       error('rexml/document NOT FOUND (LoadError)')
@@ -70,7 +70,7 @@ module SiSU_Rexml
   class Rexml
     begin
       require 'rexml/document' \
-        if FileTest.directory?("#{Config::CONFIG['rubylibdir']}/rexml") #Config::CONFIG['sitedir']
+        if FileTest.directory?("#{RbConfig::CONFIG['rubylibdir']}/rexml") #RbConfig::CONFIG['sitedir']
     rescue LoadError
       SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).
         error('rexml/document NOT FOUND (LoadError)')
index 6fe0e33ad5a42db9389b912188b4af2065b27d04..d1c9380f41079499ad1035f754b39fe87c5514f2 100644 (file)
@@ -65,11 +65,11 @@ module SiSU_Info_Sys_Gen
         error('rbconfig NOT FOUND (LoadError)')
     end
     @@user,       @@home,     @@hostname,     @@pwd,     @@sisu_etc,                            @@host,                @@arch,                @@rbver,          @@dir_arch,               @@dir_sitearch,               @@dir_bin,               @@locale,                @@rc,@@sisurc_path,@@ad=
-      ENV['USER'],ENV['HOME'],ENV['HOSTNAME'],ENV['PWD'],Config::CONFIG['sysconfdir'] + '/sisu',Config::CONFIG['host'],Config::CONFIG['arch'],%x{ruby -v}.strip,Config::CONFIG['archdir'],Config::CONFIG['sitearchdir'],Config::CONFIG['bindir'],%x{locale charmap}.strip,nil, nil,          {} # %x{ruby -v}.strip # Config::CONFIG['rb_ver']
-    out=Config::CONFIG['localstatedir']
-    etc=Config::CONFIG['sysconfdir'] + '/sisu'
-    share=Config::CONFIG['datadir']  + '/sisu'
-    data=Config::CONFIG['datadir']   + '/doc/sisu'
+      ENV['USER'],ENV['HOME'],ENV['HOSTNAME'],ENV['PWD'],RbConfig::CONFIG['sysconfdir'] + '/sisu',RbConfig::CONFIG['host'],RbConfig::CONFIG['arch'],%x{ruby -v}.strip,RbConfig::CONFIG['archdir'],RbConfig::CONFIG['sitearchdir'],RbConfig::CONFIG['bindir'],%x{locale charmap}.strip,nil, nil,          {} # %x{ruby -v}.strip # RbConfig::CONFIG['rb_ver']
+    out=RbConfig::CONFIG['localstatedir']
+    etc=RbConfig::CONFIG['sysconfdir'] + '/sisu'
+    share=RbConfig::CONFIG['datadir']  + '/sisu'
+    data=RbConfig::CONFIG['datadir']   + '/doc/sisu'
     m=/.+\/(?:src\/)?(\S+)/m # m=/.+?\/(?:src\/)?([^\/]+)$/im # m=/.+\/(\S+)/m
     @stub_pwd ||=@@pwd[m,1]
     @base_markup_dir_stub=SiSU_Utils::Path.new.base_markup_stub
index 07fabc930f51bfc03020cb2442fc51e0d8d44cdd..977bf33c3f7c934ecc6a1f231f335bdc435ba690 100644 (file)
@@ -58,7 +58,7 @@ module SiSU_Rexml
   # load XML file for REXML parsing
   begin
     require 'rexml/document' \
-      if FileTest.directory?("#{Config::CONFIG['rubylibdir']}/rexml") #Config::CONFIG['sitedir']
+      if FileTest.directory?("#{RbConfig::CONFIG['rubylibdir']}/rexml") #RbConfig::CONFIG['sitedir']
   rescue LoadError
     SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).
       error('rexml/document NOT FOUND (LoadError)')
@@ -70,7 +70,7 @@ module SiSU_Rexml
   class Rexml
     begin
       require 'rexml/document' \
-        if FileTest.directory?("#{Config::CONFIG['rubylibdir']}/rexml") #Config::CONFIG['sitedir']
+        if FileTest.directory?("#{RbConfig::CONFIG['rubylibdir']}/rexml") #RbConfig::CONFIG['sitedir']
     rescue LoadError
       SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).
         error('rexml/document NOT FOUND (LoadError)')
index 1c5019b2ce02a56d4e2f1077d90a7fd171832baa..be9e9d48db4066786810f3d83b98bd34b73c61eb 100644 (file)
@@ -65,11 +65,11 @@ module SiSU_Info_Sys_Gen
         error('rbconfig NOT FOUND (LoadError)')
     end
     @@user,       @@home,     @@hostname,     @@pwd,     @@sisu_etc,                            @@host,                @@arch,                @@rbver,          @@dir_arch,               @@dir_sitearch,               @@dir_bin,               @@locale,                @@rc,@@sisurc_path,@@ad=
-      ENV['USER'],ENV['HOME'],ENV['HOSTNAME'],ENV['PWD'],Config::CONFIG['sysconfdir'] + '/sisu',Config::CONFIG['host'],Config::CONFIG['arch'],%x{ruby -v}.strip,Config::CONFIG['archdir'],Config::CONFIG['sitearchdir'],Config::CONFIG['bindir'],%x{locale charmap}.strip,nil, nil,          {} # %x{ruby -v}.strip # Config::CONFIG['rb_ver']
-    out=Config::CONFIG['localstatedir']
-    etc=Config::CONFIG['sysconfdir'] + '/sisu'
-    share=Config::CONFIG['datadir']  + '/sisu'
-    data=Config::CONFIG['datadir']   + '/doc/sisu'
+      ENV['USER'],ENV['HOME'],ENV['HOSTNAME'],ENV['PWD'],RbConfig::CONFIG['sysconfdir'] + '/sisu',RbConfig::CONFIG['host'],RbConfig::CONFIG['arch'],%x{ruby -v}.strip,RbConfig::CONFIG['archdir'],RbConfig::CONFIG['sitearchdir'],RbConfig::CONFIG['bindir'],%x{locale charmap}.strip,nil, nil,          {} # %x{ruby -v}.strip # RbConfig::CONFIG['rb_ver']
+    out=RbConfig::CONFIG['localstatedir']
+    etc=RbConfig::CONFIG['sysconfdir'] + '/sisu'
+    share=RbConfig::CONFIG['datadir']  + '/sisu'
+    data=RbConfig::CONFIG['datadir']   + '/doc/sisu'
     m=/.+\/(?:src\/)?(\S+)/m # m=/.+?\/(?:src\/)?([^\/]+)$/im # m=/.+\/(\S+)/m
     @stub_pwd ||=@@pwd[m,1]
     @base_markup_dir_stub=SiSU_Utils::Path.new.base_markup_stub