From 7d4665f60be31a0481416cfc152bac4442cc6e74 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 1 Oct 2012 15:33:55 -0400 Subject: v3: cosmetic code, true ? x : y --- lib/sisu/v3/manifest.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lib/sisu/v3/manifest.rb') diff --git a/lib/sisu/v3/manifest.rb b/lib/sisu/v3/manifest.rb index 20983d7f..446a8716 100644 --- a/lib/sisu/v3/manifest.rb +++ b/lib/sisu/v3/manifest.rb @@ -155,9 +155,9 @@ module SiSU_Manifest end def summarize_sources(id,file,pth,rel,url) sys=SiSU_Env::SystemCall.new - dgst =if @dg =~/^sha(?:2|256)$/; sys.sha256("#{pth}/#{file}") - else sys.md5("#{pth}/#{file}") - end + dgst=(@dg =~/^sha(?:2|256)$/) \ + ? sys.sha256("#{pth}/#{file}") + : sys.md5("#{pth}/#{file}") SiSU_Screen::Ansi.new(@md.opt.cmd,"#{dgst[1]} #{file}").warn if @md.opt.cmd =~/[vVM]/ size=(File.size("#{pth}/#{file}")/1024.00).to_s kb=/([0-9]+\.[0-9]{0,1})/m.match(size)[1] @@ -749,9 +749,9 @@ WOK and @md.lnk @md.lnk.each do |l| if defined? l[:say] - target=if l[:url] !~/^\.(\.)?\//; 'external' - else '_top' - end + target=(l[:url] !~/^\.(\.)?\//) \ + ? 'external' + : '_top' url,lnk=l[:url],l[:say] unless url.nil? \ or url.empty? -- cgit v1.2.3