aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2007-05-23 23:36:19 +0100
committerRalph Amissah <ralph.amissah@gmail.com>2007-05-23 23:36:19 +0100
commitc94f591946a0436767f2fa0637f1cfd2c22ff3d6 (patch)
tree2e5c006a2b5c0d90e668d7563b0f4ef132a0603f
parentsisu-0.52.7 + md5s (diff)
restrict use to ruby1.8, plus some minor housekeeping changes file exist? instead of exists?
-rw-r--r--bin/sisu2
-rw-r--r--bin/sisu_termsheet2
-rw-r--r--bin/sisu_webrick2
-rw-r--r--lib/sisu/0.52/dal.rb6
-rw-r--r--lib/sisu/0.52/hub.rb2
-rw-r--r--lib/sisu/0.52/sst_convert_markup.rb4
-rw-r--r--lib/sisu/0.52/sysenv.rb24
-rw-r--r--lib/sisu/0.52/texpdf.rb2
-rw-r--r--lib/sisu/0.52/texpdf_format.rb2
9 files changed, 23 insertions, 23 deletions
diff --git a/bin/sisu b/bin/sisu
index 45873483..843ed721 100644
--- a/bin/sisu
+++ b/bin/sisu
@@ -1,6 +1,6 @@
#!/usr/bin/env ruby
#SiSU: copyright (C) 1997..2007 Ralph Amissah; License GPL, see appended program information
-raise "Please, use Ruby 1.8.4 or later, current Ruby #{RUBY_VERSION}" if RUBY_VERSION < '1.8.4'
+raise "Please, use Ruby1.8, 1.8.4 or later, current Ruby #{RUBY_VERSION}" if RUBY_VERSION < '1.8.4' or RUBY_VERSION > '1.9.0'
$VERBOSE=nil
$KCODE='u'
Version='0.52'
diff --git a/bin/sisu_termsheet b/bin/sisu_termsheet
index 0ac11b6f..b998018e 100644
--- a/bin/sisu_termsheet
+++ b/bin/sisu_termsheet
@@ -1,6 +1,6 @@
#!/usr/bin/env ruby
#SiSU: copyright (C) 1997..2007 Ralph Amissah; License GPL, see appended program information
-raise "Please, use Ruby 1.8.4 or later, current Ruby #{RUBY_VERSION}" if RUBY_VERSION < '1.8.4'
+raise "Please, use Ruby1.8, 1.8.4 or later, current Ruby #{RUBY_VERSION}" if RUBY_VERSION < '1.8.4' or RUBY_VERSION > '1.9.0'
$VERBOSE=nil
Version='0.52'
SiSU_lib='sisu/' + Version
diff --git a/bin/sisu_webrick b/bin/sisu_webrick
index b6d64e59..bd4e31a7 100644
--- a/bin/sisu_webrick
+++ b/bin/sisu_webrick
@@ -1,6 +1,6 @@
#!/usr/bin/env ruby
#SiSU: copyright (C) 1997..2007 Ralph Amissah; License GPL, see appended program information
-raise "Please, use Ruby 1.8.4 or later, current Ruby #{RUBY_VERSION}" if RUBY_VERSION < '1.8.4'
+raise "Please, use Ruby1.8, 1.8.4 or later, current Ruby #{RUBY_VERSION}" if RUBY_VERSION < '1.8.4' or RUBY_VERSION > '1.9.0'
$VERBOSE=nil
Version='0.52'
SiSU_lib='sisu/' + Version
diff --git a/lib/sisu/0.52/dal.rb b/lib/sisu/0.52/dal.rb
index 43a4f015..130dbf87 100644
--- a/lib/sisu/0.52/dal.rb
+++ b/lib/sisu/0.52/dal.rb
@@ -278,9 +278,9 @@ module SiSU_DAL
path_image=[dir.path.image_source_local_tex,dir.path.image_source_remote_tex,dir.path.image_source_tex]
image_path=nil
path_image.each do |image_path|
- break if FileTest.exists?("#{image_path}/#{image}")
+ break if FileTest.exist?("#{image_path}/#{image}")
end
- if FileTest.exists?("#{image_path}/#{image}")
+ if FileTest.exist?("#{image_path}/#{image}")
img=Magick::ImageList.new("#{image_path}/#{image}")
img_col,img_row=img.columns,img.rows
if img_col > img_row #landscape
@@ -997,7 +997,7 @@ module SiSU_DAL
else ''
end
para_plus_en << para_tail
- para_plus_en.each {|e_p| en_and_para_digest << SiSU_DAL::Make.new(@md,e_p).endnote_digest }
+ en_and_para_digest << SiSU_DAL::Make.new(@md,para_plus_en).endnote_digest
para_new=en_and_para_digest.join(' ')
@tuned << para_new + '<' + digest_strip + ':' + digest_all + '>' unless para.nil?
else @tuned << para + '<' + digest_strip + ':' + digest_all + '>' unless para.nil?
diff --git a/lib/sisu/0.52/hub.rb b/lib/sisu/0.52/hub.rb
index 939b70a5..1f2df5f6 100644
--- a/lib/sisu/0.52/hub.rb
+++ b/lib/sisu/0.52/hub.rb
@@ -540,7 +540,7 @@ p "here #{__FILE__} #{__LINE__}" if @opt =~/M/
if @opt.fns =~/\._sst$/ and @opt.cmd !~/[S_M]/ # rework necessry, revist, the _ flag is a hack, to keep ._sst files
@msg,@msgs='temporary file removed',nil
@tell.call.warn unless @opt.cmd =~/V/
- File.unlink(@opt.fns) if File.exists?(@opt.fns) #CONSIDER
+ File.unlink(@opt.fns) if File.exist?(@opt.fns) #CONSIDER
end
else #Operations.new(fns,'html').not_found
end
diff --git a/lib/sisu/0.52/sst_convert_markup.rb b/lib/sisu/0.52/sst_convert_markup.rb
index d1c337cf..bf1c10c8 100644
--- a/lib/sisu/0.52/sst_convert_markup.rb
+++ b/lib/sisu/0.52/sst_convert_markup.rb
@@ -232,9 +232,9 @@ WOK
if y =~m and y =~w
if @new
@new=false
- File.unlink(o) if File.exists?(o)
+ File.unlink(o) if File.exist?(o)
File.rename(i,o)
- File.unlink(i) if File.exists?(i)
+ File.unlink(i) if File.exist?(i)
@file=File.new(i,'w')
@matched=true
break
diff --git a/lib/sisu/0.52/sysenv.rb b/lib/sisu/0.52/sysenv.rb
index 9bd2e977..56171c06 100644
--- a/lib/sisu/0.52/sysenv.rb
+++ b/lib/sisu/0.52/sysenv.rb
@@ -205,7 +205,7 @@ module SiSU_Env
def prog
load_prog=false
$:.each do |reqpath|
- if FileTest.exists?("#{reqpath}/#@prog.rb")
+ if FileTest.exist?("#{reqpath}/#@prog.rb")
load_prog=true
break
end
@@ -224,7 +224,7 @@ module SiSU_Env
def prog?
load_prog=false
$:.each do |reqpath|
- if FileTest.exists?("#{reqpath}/#@prog.rb"); load_prog=true
+ if FileTest.exist?("#{reqpath}/#@prog.rb"); load_prog=true
break
end
end
@@ -249,12 +249,12 @@ module SiSU_Env
def yamlrc
unless @@rc
@yamlrc_path.each do |v|
- if @@noyaml or FileTest.exists?("#{v}/noyaml")
+ if @@noyaml or FileTest.exist?("#{v}/noyaml")
puts "WARNING - YAML loading switched off, to enable delete the file:\n\t#{v}/noyaml\n\n" unless @@noyaml
@@noyaml=true
break
else
- if FileTest.exists?("#{v}/sisurc.yml")
+ if FileTest.exist?("#{v}/sisurc.yml")
unless @@rc
require 'yaml'
@@rc ||= YAML::load(File::open("#{v}/sisurc.yml"))
@@ -262,7 +262,7 @@ module SiSU_Env
break
end
unless @@rc
- if FileTest.exists?("#{v}/sisurc.yaml")
+ if FileTest.exist?("#{v}/sisurc.yaml")
unless @@rc
require 'yaml'
@@rc ||= YAML::load(File::open("#{v}/sisurc.yaml"))
@@ -278,13 +278,13 @@ module SiSU_Env
def ads #WORK AREA
tell_no_yaml='WARNING - YAML loading switched off, to enable delete the file:'
@ad_path.each do |v|
- if @@noyaml or FileTest.exists?("#{v}/noyaml")
+ if @@noyaml or FileTest.exist?("#{v}/noyaml")
puts tell_no_yaml + "\n\t#{v}/noyaml\n" unless @@noyaml
@@noyaml=true
break
else
#tell=SiSU_Screen::Ansi.new('','promo off (file not found): list.yml')
- if FileTest.exists?("#{v}/list.yml")
+ if FileTest.exist?("#{v}/list.yml")
unless @@ad[:promo_list]
require 'yaml'
@@ad[:promo_list] ||= YAML::load(File::open("#{v}/list.yml"))
@@ -297,13 +297,13 @@ module SiSU_Env
end
end
@ad_path.each do |v|
- if @@noyaml or FileTest.exists?("#{v}/noyaml")
+ if @@noyaml or FileTest.exist?("#{v}/noyaml")
puts tell_no_yaml + "\n\t#{v}/noyaml\n" unless @@noyaml
@@noyaml=true
break
else
#tell=SiSU_Screen::Ansi.new('','promo off (file not found): promo.yml')
- if FileTest.exists?("#{v}/promo.yml")
+ if FileTest.exist?("#{v}/promo.yml")
unless @@ad[:promo]
require 'yaml'
@@ad[:promo] ||= YAML::load(File::open("#{v}/promo.yml"))
@@ -752,7 +752,7 @@ module SiSU_Env
@sys.locale
end
def concord_max
- concord_max=if defined? @rc['processing']['concord_max'] and @rc['processing']['concord_max']:
+ concord_max=if defined? @rc['processing']['concord_max'] and @rc['processing']['concord_max']
@rc['processing']['concord_max']
else defaults[:concord_max]
end
@@ -1051,14 +1051,14 @@ module SiSU_Env
end
def yamlrc
rc.each do |v|
- if FileTest.exists?("#{v}/sisurc.yml")
+ if FileTest.exist?("#{v}/sisurc.yml")
@yamlrc_dir="#{v}/sisurc.yml"
break
end
end
unless @yamlrc_dir
rc.each do |v|
- if FileTest.exists?("#{v}/sisurc.yaml")
+ if FileTest.exist?("#{v}/sisurc.yaml")
@yamlrc_dir="#{v}/sisurc.yaml"
break
end
diff --git a/lib/sisu/0.52/texpdf.rb b/lib/sisu/0.52/texpdf.rb
index 27c4f3bf..c4df0611 100644
--- a/lib/sisu/0.52/texpdf.rb
+++ b/lib/sisu/0.52/texpdf.rb
@@ -204,7 +204,7 @@ module SiSU_TeX
@dir_sisu=@dirout.path.output
texfile=@md.fns.gsub(/$/,'.tex')
texfile=texfile.gsub(/~/,'-')
- if File.exists?(texfile) and File.size(texfile) > 0
+ if File.exist?(texfile) and File.size(texfile) > 0
@tex_f_no+=1
latex_do(texfile)
else
diff --git a/lib/sisu/0.52/texpdf_format.rb b/lib/sisu/0.52/texpdf_format.rb
index db18ce61..50945af4 100644
--- a/lib/sisu/0.52/texpdf_format.rb
+++ b/lib/sisu/0.52/texpdf_format.rb
@@ -381,7 +381,7 @@ WOK
@row_break='\\\\\\\\'
@break_page="#@row_break\n#@row_break \n"
if @string[/<!Th?ยก\s+c(\d+);(.+?)!>/]
- no_of_cols, cols_width=$1,$2
+ no_of_cols,cols_width=$1,$2
@w=cols_width.split(/;\s*/)
@colW=[]
@w.each do |x|