aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2011-09-24 07:39:11 -0400
committerRalph Amissah <ralph@amissah.com>2011-09-24 07:39:11 -0400
commit5048519fbbe92da19a395e79561cb2bcd6542e7d (patch)
treedaf780be791187f6f8fa89b11cd1f5e311bc7443
parentv2 v3: param, matching of date, years 1400 - 21\d\d (diff)
v3: cosmetic, minor
-rw-r--r--lib/sisu/v3/html_segments.rb3
-rw-r--r--lib/sisu/v3/param.rb7
-rw-r--r--lib/sisu/v3/remote.rb6
-rw-r--r--lib/sisu/v3/sysenv.rb6
4 files changed, 13 insertions, 9 deletions
diff --git a/lib/sisu/v3/html_segments.rb b/lib/sisu/v3/html_segments.rb
index 67bfa319..60b4312e 100644
--- a/lib/sisu/v3/html_segments.rb
+++ b/lib/sisu/v3/html_segments.rb
@@ -435,7 +435,8 @@ module SiSU_HTML_seg
dob=format_seg.no_paranum
end
end
- if (dob.is=='heading' or dob.is=='heading_insert') \
+ if (dob.is=='heading' \
+ || dob.is=='heading_insert') \
and dob.ln==4
@@seg[:main] << %{\n<div class="content">\n}
@@seg[:main] << dob_html
diff --git a/lib/sisu/v3/param.rb b/lib/sisu/v3/param.rb
index 3911f85e..e2cffa9b 100644
--- a/lib/sisu/v3/param.rb
+++ b/lib/sisu/v3/param.rb
@@ -87,7 +87,8 @@ module SiSU_Param
@pstorefile="#{@env.processing_path.dal}/#{@fns}.pstore"
end
def get
- if @opt.f_pth[:pth] != Dir.pwd #BUG check
+ if @opt.f_pth \
+ and @opt.f_pth[:pth] != Dir.pwd #BUG check
# you may need to change Dir.pwd to @opt.f_pth[:pth] where the latter
# has a path value that is different, however, f_pth is not always set!
p '-- bug alert -- '
@@ -287,7 +288,9 @@ module SiSU_Param
a=@s.split(/\n%\s.+?$|[ ]*\n[ ]*/m)
@h=build_hash(a)
def author
- @h['author']=(@h['author'] ? @h['author'] : @h['main'])
+ @h['author']=(@h['author'] \
+ ? @h['author']
+ : @h['main'])
names=name_format(@h['author'])
s=names[:name_str]
l,n=Db[:col_name],'creator.author'
diff --git a/lib/sisu/v3/remote.rb b/lib/sisu/v3/remote.rb
index 1e974f9c..a3b9a62e 100644
--- a/lib/sisu/v3/remote.rb
+++ b/lib/sisu/v3/remote.rb
@@ -64,9 +64,9 @@ module SiSU_Remote
def initialize(opt)
@opt=opt
@dir=SiSU_Env::Info_env.new(@opt.fns)
- @put=unless @opt.fns =~/\.ssm\.sst$/; @opt.fns
- else @opt.fns.gsub(/(.+)?\.ssm\.sst$/,'\1.ssm')
- end
+ @put=(@opt.fns =~/\.ssm\.sst$/) \
+ ? @opt.fns.gsub(/(.+)?\.ssm\.sst$/,'\1.ssm')
+ : @opt.fns
@remote=SiSU_Env::Info_remote.new(@opt)
end
def rsync
diff --git a/lib/sisu/v3/sysenv.rb b/lib/sisu/v3/sysenv.rb
index 7463cb4b..79ae61af 100644
--- a/lib/sisu/v3/sysenv.rb
+++ b/lib/sisu/v3/sysenv.rb
@@ -3199,9 +3199,9 @@ WOK
fnb=@fns[m,1]
end
def make_file(path,filename)
- if File.writable?("#{path}/."); File.new("#{path}/#{filename}",'w+')
- else SiSU_Screen::Ansi.new('',"is the file or directory writable?, could not create #{filename}").warn
- end
+ (File.writable?("#{path}/.")) \
+ ? File.new("#{path}/#{filename}",'w+')
+ : (SiSU_Screen::Ansi.new('',"is the file or directory writable?, could not create #{filename}").warn)
end
def touch_file(path,filename)
if File.writable?("#{path}/.");