diff options
author | Ralph Amissah <ralph@amissah.com> | 2014-08-29 19:31:58 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2014-08-29 19:44:07 -0400 |
commit | 967a86f0fa0c96f5816dc14e3f5208b9fb21944a (patch) | |
tree | 547d8689642491c88eac097962b775074f8bdbe7 /lib | |
parent | sisurc, minor (diff) |
v5 v6: cosmetic code
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sisu/v5/se_programs.rb | 6 | ||||
-rw-r--r-- | lib/sisu/v5/sitemaps.rb | 6 | ||||
-rw-r--r-- | lib/sisu/v5/sst_to_s_xml_sax.rb | 4 | ||||
-rw-r--r-- | lib/sisu/v5/xhtml.rb | 4 | ||||
-rw-r--r-- | lib/sisu/v5/xml_dom.rb | 4 | ||||
-rw-r--r-- | lib/sisu/v5/xml_sax.rb | 4 | ||||
-rw-r--r-- | lib/sisu/v6/se_programs.rb | 6 | ||||
-rw-r--r-- | lib/sisu/v6/sitemaps.rb | 6 | ||||
-rw-r--r-- | lib/sisu/v6/sst_to_s_xml_sax.rb | 4 | ||||
-rw-r--r-- | lib/sisu/v6/xhtml.rb | 4 | ||||
-rw-r--r-- | lib/sisu/v6/xml_dom.rb | 4 | ||||
-rw-r--r-- | lib/sisu/v6/xml_sax.rb | 4 |
12 files changed, 34 insertions, 22 deletions
diff --git a/lib/sisu/v5/se_programs.rb b/lib/sisu/v5/se_programs.rb index 4eef1ce9..66d61036 100644 --- a/lib/sisu/v5/se_programs.rb +++ b/lib/sisu/v5/se_programs.rb @@ -113,8 +113,10 @@ module SiSU_Sys_Call and locale !~/utf-?8/i true else - program_ref="(not available)" unless program_found?(program) - program_ref="(UTF-8)" if locale =~/utf-?8/i + program_ref="(not available)" \ + unless program_found?(program) + program_ref="(UTF-8)" \ + if locale =~/utf-?8/i false end end diff --git a/lib/sisu/v5/sitemaps.rb b/lib/sisu/v5/sitemaps.rb index fd2d58c6..d04dd382 100644 --- a/lib/sisu/v5/sitemaps.rb +++ b/lib/sisu/v5/sitemaps.rb @@ -86,7 +86,8 @@ module SiSU_Sitemaps # @file=SiSU_Env::FileOp.new(@md) @rdf=SiSU_XML_Tags::RDF.new(@md) @fnb_utf8_xml=@md.fnb.dup - @trans.char_enc.utf8(@fnb_utf8_xml) if @sys.locale =~/utf-?8/i #% utf8 + @trans.char_enc.utf8(@fnb_utf8_xml) \ + if @sys.locale =~/utf-?8/i output_map(sitemap) elsif @opt.selections.str =~/--sitemaps/ @sitemap_idx_fn='sitemapindex.xml' @@ -144,7 +145,8 @@ module SiSU_Sitemaps WOK sitemap_files.each do |s| f=s.gsub(/.+?\/sitemap_([^\/]+?)\.xml$/,'\1') - @trans.char_enc.utf8(f) if @sys.locale =~/utf-?8/i #% utf8 + @trans.char_enc.utf8(f) \ + if @sys.locale =~/utf-?8/i sitemap_idx << <<WOK <sitemap> <loc>#{@env.path.url.remote}/#{f}/sitemap.xml</loc> diff --git a/lib/sisu/v5/sst_to_s_xml_sax.rb b/lib/sisu/v5/sst_to_s_xml_sax.rb index fe685983..b72868a1 100644 --- a/lib/sisu/v5/sst_to_s_xml_sax.rb +++ b/lib/sisu/v5/sst_to_s_xml_sax.rb @@ -395,8 +395,8 @@ WOK dir=SiSU_Env::InfoEnv.new @@xml[:head],@@xml[:body]=[],[] css=SiSU_Env::CSS_Select.new(@md).xml_sax - encoding=if @sys.locale =~/utf-?8/i; '<?xml version="1.0" encoding="UTF-8" standalone="no"?>' - else '<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>' + encoding=if @sys.locale =~/utf-?8/i then '<?xml version="1.0" encoding="UTF-8" standalone="no"?>' + else '<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>' end @@xml[:open] =<<WOK #{encoding} diff --git a/lib/sisu/v5/xhtml.rb b/lib/sisu/v5/xhtml.rb index 14c6bfe9..138ccf6d 100644 --- a/lib/sisu/v5/xhtml.rb +++ b/lib/sisu/v5/xhtml.rb @@ -392,7 +392,9 @@ WOK rdf=SiSU_XML_Tags::RDF.new(@md) @@xml[:head],@@xml[:body]=[],[] stylesheet=SiSU_Style::CSS_HeadInfo.new(@md,'xhtml').stylesheet - encoding=(@sys.locale =~/utf-?8/i) ? '<?xml version="1.0" encoding="UTF-8" standalone="no"?>' : '<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>' + encoding=(@sys.locale =~/utf-?8/i) \ + ? '<?xml version="1.0" encoding="UTF-8" standalone="no"?>' + : '<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>' @@xml[:open] =<<WOK #{encoding} #{stylesheet.css_head_xml} diff --git a/lib/sisu/v5/xml_dom.rb b/lib/sisu/v5/xml_dom.rb index fb7d3cb9..b78fb67a 100644 --- a/lib/sisu/v5/xml_dom.rb +++ b/lib/sisu/v5/xml_dom.rb @@ -534,8 +534,8 @@ WOK def pre rdf=SiSU_XML_Tags::RDF.new(@md) stylesheet=SiSU_Style::CSS_HeadInfo.new(@md,'xml_dom').stylesheet - encoding=if @sys.locale =~/utf-?8/i; '<?xml version="1.0" encoding="UTF-8" standalone="no"?>' - else '<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>' + encoding=if @sys.locale =~/utf-?8/i then '<?xml version="1.0" encoding="UTF-8" standalone="no"?>' + else '<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>' end @@xml[:open] =<<WOK #{encoding} diff --git a/lib/sisu/v5/xml_sax.rb b/lib/sisu/v5/xml_sax.rb index 69dc39a3..ea3f7175 100644 --- a/lib/sisu/v5/xml_sax.rb +++ b/lib/sisu/v5/xml_sax.rb @@ -430,8 +430,8 @@ WOK rdf=SiSU_XML_Tags::RDF.new(@md) @@xml[:head],@@xml[:body]=[],[] stylesheet=SiSU_Style::CSS_HeadInfo.new(@md,'xml_sax').stylesheet - encoding=if @sys.locale =~/utf-?8/i; '<?xml version="1.0" encoding="UTF-8" standalone="no"?>' - else '<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>' + encoding=if @sys.locale =~/utf-?8/i then '<?xml version="1.0" encoding="UTF-8" standalone="no"?>' + else '<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>' end @@xml[:open] =<<WOK #{encoding} diff --git a/lib/sisu/v6/se_programs.rb b/lib/sisu/v6/se_programs.rb index 448ac98e..646878d4 100644 --- a/lib/sisu/v6/se_programs.rb +++ b/lib/sisu/v6/se_programs.rb @@ -113,8 +113,10 @@ module SiSU_Sys_Call and locale !~/utf-?8/i true else - program_ref="(not available)" unless program_found?(program) - program_ref="(UTF-8)" if locale =~/utf-?8/i + program_ref="(not available)" \ + unless program_found?(program) + program_ref="(UTF-8)" \ + if locale =~/utf-?8/i false end end diff --git a/lib/sisu/v6/sitemaps.rb b/lib/sisu/v6/sitemaps.rb index 1b2cabef..ad9e5951 100644 --- a/lib/sisu/v6/sitemaps.rb +++ b/lib/sisu/v6/sitemaps.rb @@ -86,7 +86,8 @@ module SiSU_Sitemaps # @file=SiSU_Env::FileOp.new(@md) @rdf=SiSU_XML_Tags::RDF.new(@md) @fnb_utf8_xml=@md.fnb.dup - @trans.char_enc.utf8(@fnb_utf8_xml) if @sys.locale =~/utf-?8/i #% utf8 + @trans.char_enc.utf8(@fnb_utf8_xml) \ + if @sys.locale =~/utf-?8/i output_map(sitemap) elsif @opt.selections.str =~/--sitemaps/ @sitemap_idx_fn='sitemapindex.xml' @@ -144,7 +145,8 @@ module SiSU_Sitemaps WOK sitemap_files.each do |s| f=s.gsub(/.+?\/sitemap_([^\/]+?)\.xml$/,'\1') - @trans.char_enc.utf8(f) if @sys.locale =~/utf-?8/i #% utf8 + @trans.char_enc.utf8(f) \ + if @sys.locale =~/utf-?8/i sitemap_idx << <<WOK <sitemap> <loc>#{@env.path.url.remote}/#{f}/sitemap.xml</loc> diff --git a/lib/sisu/v6/sst_to_s_xml_sax.rb b/lib/sisu/v6/sst_to_s_xml_sax.rb index 0be6ffa0..a780e810 100644 --- a/lib/sisu/v6/sst_to_s_xml_sax.rb +++ b/lib/sisu/v6/sst_to_s_xml_sax.rb @@ -395,8 +395,8 @@ WOK dir=SiSU_Env::InfoEnv.new @@xml[:head],@@xml[:body]=[],[] css=SiSU_Env::CSS_Select.new(@md).xml_sax - encoding=if @sys.locale =~/utf-?8/i; '<?xml version="1.0" encoding="UTF-8" standalone="no"?>' - else '<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>' + encoding=if @sys.locale =~/utf-?8/i then '<?xml version="1.0" encoding="UTF-8" standalone="no"?>' + else '<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>' end @@xml[:open] =<<WOK #{encoding} diff --git a/lib/sisu/v6/xhtml.rb b/lib/sisu/v6/xhtml.rb index 409a2b6c..17f3a335 100644 --- a/lib/sisu/v6/xhtml.rb +++ b/lib/sisu/v6/xhtml.rb @@ -392,7 +392,9 @@ WOK rdf=SiSU_XML_Tags::RDF.new(@md) @@xml[:head],@@xml[:body]=[],[] stylesheet=SiSU_Style::CSS_HeadInfo.new(@md,'xhtml').stylesheet - encoding=(@sys.locale =~/utf-?8/i) ? '<?xml version="1.0" encoding="UTF-8" standalone="no"?>' : '<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>' + encoding=(@sys.locale =~/utf-?8/i) \ + ? '<?xml version="1.0" encoding="UTF-8" standalone="no"?>' + : '<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>' @@xml[:open] =<<WOK #{encoding} #{stylesheet.css_head_xml} diff --git a/lib/sisu/v6/xml_dom.rb b/lib/sisu/v6/xml_dom.rb index 1285a1cc..60141195 100644 --- a/lib/sisu/v6/xml_dom.rb +++ b/lib/sisu/v6/xml_dom.rb @@ -534,8 +534,8 @@ WOK def pre rdf=SiSU_XML_Tags::RDF.new(@md) stylesheet=SiSU_Style::CSS_HeadInfo.new(@md,'xml_dom').stylesheet - encoding=if @sys.locale =~/utf-?8/i; '<?xml version="1.0" encoding="UTF-8" standalone="no"?>' - else '<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>' + encoding=if @sys.locale =~/utf-?8/i then '<?xml version="1.0" encoding="UTF-8" standalone="no"?>' + else '<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>' end @@xml[:open] =<<WOK #{encoding} diff --git a/lib/sisu/v6/xml_sax.rb b/lib/sisu/v6/xml_sax.rb index d595e4a4..9555d2de 100644 --- a/lib/sisu/v6/xml_sax.rb +++ b/lib/sisu/v6/xml_sax.rb @@ -430,8 +430,8 @@ WOK rdf=SiSU_XML_Tags::RDF.new(@md) @@xml[:head],@@xml[:body]=[],[] stylesheet=SiSU_Style::CSS_HeadInfo.new(@md,'xml_sax').stylesheet - encoding=if @sys.locale =~/utf-?8/i; '<?xml version="1.0" encoding="UTF-8" standalone="no"?>' - else '<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>' + encoding=if @sys.locale =~/utf-?8/i then '<?xml version="1.0" encoding="UTF-8" standalone="no"?>' + else '<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>' end @@xml[:open] =<<WOK #{encoding} |