aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v3/sysenv.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v3/sysenv.rb')
-rw-r--r--lib/sisu/v3/sysenv.rb19
1 files changed, 8 insertions, 11 deletions
diff --git a/lib/sisu/v3/sysenv.rb b/lib/sisu/v3/sysenv.rb
index 40880701..c4b364ad 100644
--- a/lib/sisu/v3/sysenv.rb
+++ b/lib/sisu/v3/sysenv.rb
@@ -973,7 +973,7 @@ module SiSU_Env
include FileUtils
attr_accessor :filename,:sys,:home,:hostname,:user,:env,:rc,:www,:fnb,:fnn,:fnt,:flv,:webserv_path,:stub_pwd,:stub_src,:webserv_host_cgi,:webserv_port_cgi,:processing,:processing_git,:etc,:yamlrc_dir
@@image_flag,@@local_image=true,true #warning on @@image_flag
- @@fb=@@man_path=nil,nil
+ @@fb,@@man_path=nil,nil
def initialize(fns='',md=nil)
super() #you may not want to re-execute this static info so frequently!
@fns,@md=fns,md
@@ -1739,18 +1739,15 @@ WOK
self
end
def read_source_file(fns)
- fns_array=if RUBY_VERSION < '1.9'
- x=unless fns =~/\.ssm.sst$/
- IO.readlines(fns,'')
- else IO.readlines("#{processing_path.composite_file}/#{fns}",'')
- end
- else #ruby version >= '1.9'
- x=unless fns =~/\.ssm.sst$/
- IO.readlines(fns,'r:utf-8')
- else IO.readlines("#{processing_path.composite_file}/#{fns}",'r:utf-8')
- end
+ fns_array=unless fns =~/\.ssm.sst$/
+ IO.readlines(fns, mode: 'r:utf-8', cr_newline: true)
+ else
+ IO.readlines("#{processing_path.composite_file}/#{fns}", mode: 'r:utf-8', cr_newline: true)
end
end
+ def source_file_processing_array(fns)
+ sf=read_source_file(fns).join.split(/\s*\n\s*\n/m)
+ end
def path #dir
def home
@sys.home