diff options
author | Ralph Amissah <ralph@amissah.com> | 2014-07-22 21:30:56 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2014-07-22 21:30:56 -0400 |
commit | 41796e30e4597c74e7e42c3144dbe5d4fb0687c5 (patch) | |
tree | d0615cafae5362873706f04595ee5b9333a758c3 /lib/sisu/v5/manifest.rb | |
parent | v5 v6: version & changelog (& rakefile) (diff) |
v5 v6: cosmetic code
Diffstat (limited to 'lib/sisu/v5/manifest.rb')
-rw-r--r-- | lib/sisu/v5/manifest.rb | 34 |
1 files changed, 28 insertions, 6 deletions
diff --git a/lib/sisu/v5/manifest.rb b/lib/sisu/v5/manifest.rb index 3216194d..faca95af 100644 --- a/lib/sisu/v5/manifest.rb +++ b/lib/sisu/v5/manifest.rb @@ -88,15 +88,29 @@ module SiSU_Manifest browser=@env.program.console_web_browser # webserv_url=@env.path.url.output_tell #fix in sysenv unless @opt.act[:quiet][:set]==:on - url_html="file://#{@md.file.output_path.manifest.dir}/#{@md.file.base_filename.manifest}" + url_html='file://' \ + + @md.file.output_path.manifest.dir + '/' \ + + @md.file.base_filename.manifest (@opt.act[:verbose][:set]==:on \ || @opt.act[:verbose_plus][:set]==:on \ || @opt.act[:maintenance][:set]==:on) \ - ? SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'Manifest',"#{xbrowser} #{url_html}").green_hi_blue - : SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'Manifest',"[#{@opt.f_pth[:lng_is]}]", "#{url_html}").grey_title_grey_blue + ? SiSU_Screen::Ansi.new( + @opt.act[:color_state][:set], + 'Manifest', + "#{xbrowser} #{url_html}" + ).green_hi_blue + : SiSU_Screen::Ansi.new( + @opt.act[:color_state][:set], + 'Manifest', + "[#{@opt.f_pth[:lng_is]}]", + "#{url_html}" + ).grey_title_grey_blue if (@md.opt.act[:verbose][:set]==:on \ || @md.opt.act[:verbose_plus][:set]==:on) - SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],"#{browser} #{url_html}").grey_tab + SiSU_Screen::Ansi.new( + @opt.act[:color_state][:set], + "#{browser} #{url_html}" + ).grey_tab end end data=SiSU_HTML::Source::HTML_Environment.new(@particulars).tuned_file_instructions @@ -177,12 +191,20 @@ module SiSU_Manifest if (@md.opt.act[:verbose][:set]==:on \ || @md.opt.act[:verbose_plus][:set]==:on \ || @md.opt.act[:maintenance][:set]==:on) - SiSU_Screen::Ansi.new(@md.opt.act[:color_state][:set],"#{dgst[1]} #{file}").warn + SiSU_Screen::Ansi.new( + @md.opt.act[:color_state][:set], + "#{dgst[1]} #{file}" + ).warn end size=(File.size("#{pth}/#{file}")/1024.00).to_s kb=/([0-9]+\.[0-9]{0,1})/m.match(size)[1] @manifest[:txt] << "#{file} #{id} #{kb}\n" - @manifest[:html] << %{<tr><th class="left"><p class="norm"><a href="#{rel}/#{file}">#{id}</a></p></th><td class="right"><p class="tiny"><a href="#{rel}/#{file}">#{file}</a> #{dgst[1]}#{url_make(url,file,:src)}</p></td><td class="right"><p class="right">#{kb}</p></td></tr>\n} if kb and kb =~/\d+/ + @manifest[:html] << %{<tr>} \ + + %{<th class="left"><p class="norm"><a href="#{rel}/#{file}">#{id}</a></p></th>} \ + + %{<td class="right"><p class="tiny"><a href="#{rel}/#{file}">#{file}</a> #{dgst[1]}#{url_make(url,file,:src)}</p></td>} \ + + %{<td class="right"><p class="right">#{kb}</p></td>} \ + + %{</tr>\n} \ + if kb and kb =~/\d+/ end def published_manifests? @f=SiSU_Env::FileOp.new(@md) #.base_filename |