From b2ccc63796ce0bf17a8c75e857073c8440ee3955 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 12 Jan 2015 09:59:35 -0500 Subject: bin + c&d: RbConfig (instead of Config, switch) --- lib/sisu/current/rexml.rb | 4 ++-- lib/sisu/current/se_info_system.rb | 10 +++++----- lib/sisu/develop/rexml.rb | 4 ++-- lib/sisu/develop/se_info_system.rb | 10 +++++----- 4 files changed, 14 insertions(+), 14 deletions(-) (limited to 'lib') diff --git a/lib/sisu/current/rexml.rb b/lib/sisu/current/rexml.rb index 8a0e62b5..9a11305c 100644 --- a/lib/sisu/current/rexml.rb +++ b/lib/sisu/current/rexml.rb @@ -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)') diff --git a/lib/sisu/current/se_info_system.rb b/lib/sisu/current/se_info_system.rb index 6fe0e33a..d1c9380f 100644 --- a/lib/sisu/current/se_info_system.rb +++ b/lib/sisu/current/se_info_system.rb @@ -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 diff --git a/lib/sisu/develop/rexml.rb b/lib/sisu/develop/rexml.rb index 07fabc93..977bf33c 100644 --- a/lib/sisu/develop/rexml.rb +++ b/lib/sisu/develop/rexml.rb @@ -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)') diff --git a/lib/sisu/develop/se_info_system.rb b/lib/sisu/develop/se_info_system.rb index 1c5019b2..be9e9d48 100644 --- a/lib/sisu/develop/se_info_system.rb +++ b/lib/sisu/develop/se_info_system.rb @@ -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 -- cgit v1.2.3