diff options
| author | Ralph Amissah <ralph@amissah.com> | 2011-03-30 23:31:00 -0400 | 
|---|---|---|
| committer | Ralph Amissah <ralph@amissah.com> | 2011-03-30 23:31:00 -0400 | 
| commit | 145381985237e83c633550b7dd562d86896b1b5e (patch) | |
| tree | 5d4a4c18aaf37ef58d83a7f145747ca0498ef6f7 /lib | |
| parent | debian/changelog (3.0.5-3) (diff) | |
| parent | vim colorscheme slate, rearrange (diff) | |
Merge branch 'upstream' into debian/sid
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/sisu/v2/cgi.rb | 2 | ||||
| -rw-r--r-- | lib/sisu/v2/cgi_pgsql.rb | 2 | ||||
| -rw-r--r-- | lib/sisu/v2/cgi_sqlite.rb | 2 | ||||
| -rw-r--r-- | lib/sisu/v2/dal_doc_str.rb | 18 | ||||
| -rw-r--r-- | lib/sisu/v2/dal_images.rb | 5 | ||||
| -rw-r--r-- | lib/sisu/v2/param.rb | 2 | ||||
| -rw-r--r-- | lib/sisu/v2/sysenv.rb | 3 | ||||
| -rw-r--r-- | lib/sisu/v3/cgi.rb | 2 | ||||
| -rw-r--r-- | lib/sisu/v3/cgi_pgsql.rb | 2 | ||||
| -rw-r--r-- | lib/sisu/v3/cgi_sqlite.rb | 2 | ||||
| -rw-r--r-- | lib/sisu/v3/dal_doc_str.rb | 20 | ||||
| -rw-r--r-- | lib/sisu/v3/dal_images.rb | 5 | ||||
| -rw-r--r-- | lib/sisu/v3/sysenv.rb | 3 | 
13 files changed, 36 insertions, 32 deletions
| diff --git a/lib/sisu/v2/cgi.rb b/lib/sisu/v2/cgi.rb index a375282f..d9bbc9ed 100644 --- a/lib/sisu/v2/cgi.rb +++ b/lib/sisu/v2/cgi.rb @@ -71,8 +71,6 @@ module  SiSU_CGI       a=%{            For help on sisu search, type:              sisu --help search -          For help on setting up hyperestraier for sisu, type: -            sisu --help hyperestraier      }          SiSU_Screen::Ansi.new(@opt.cmd,a).print_grey      end diff --git a/lib/sisu/v2/cgi_pgsql.rb b/lib/sisu/v2/cgi_pgsql.rb index 7a948366..416a7d88 100644 --- a/lib/sisu/v2/cgi_pgsql.rb +++ b/lib/sisu/v2/cgi_pgsql.rb @@ -83,7 +83,7 @@ module  SiSU_CGI_pgsql          else put "WARNING: no postgresql database available, (have you created one?)"          end          serve.sort! -        f1,f2,f3=[],[],[] +        f1,f2,f3='','',''          serve.each do |x|            f1 << %{              <option value="#{Db[:name_prefix]}#{x}">#{x}</option>\n} unless x =~/apache|sisu\/image/ #check          end diff --git a/lib/sisu/v2/cgi_sqlite.rb b/lib/sisu/v2/cgi_sqlite.rb index 5c20b072..d7e131d3 100644 --- a/lib/sisu/v2/cgi_sqlite.rb +++ b/lib/sisu/v2/cgi_sqlite.rb @@ -78,7 +78,7 @@ module  SiSU_CGI_sqlite          end        end        serve.sort! -      f1,f2,f3=[],[],[] +      f1,f2,f3='','',''        serve.each do |x|          f1 << %{              <option value="#{Db[:name_prefix]}#{x}">#{x}</option>\n}        end diff --git a/lib/sisu/v2/dal_doc_str.rb b/lib/sisu/v2/dal_doc_str.rb index 56bf205f..6fd7eff2 100644 --- a/lib/sisu/v2/dal_doc_str.rb +++ b/lib/sisu/v2/dal_doc_str.rb @@ -178,8 +178,10 @@ module SiSU_document_structure_extract                image=image_test(obj)                note=endnote_test?(obj)                obj,tags=extract_tags(obj) -              h={:bullet_=>bullet,:indent=>indent,:obj=>obj,:idx=>idx,:note_=>note,:image_=>image,:tags=>tags} -              SiSU_document_structure::Object_para.new.paragraph(h) +              unless obj=~/\A\s*\Z/m +                h={:bullet_=>bullet,:indent=>indent,:obj=>obj,:idx=>idx,:note_=>note,:image_=>image,:tags=>tags} +                SiSU_document_structure::Object_para.new.paragraph(h) +              end              else nil              end            when /^<?:p[bn]>?\s*$/ @@ -193,8 +195,10 @@ module SiSU_document_structure_extract              image=image_test(t_o)              note=endnote_test?(t_o)              obj,tags=extract_tags(t_o) -            h={:bullet_=>false,:indent=>0,:obj=>obj,:idx=>idx,:note_=>note,:image_=>image,:tags=>tags} -            SiSU_document_structure::Object_para.new.paragraph(h) +            unless obj=~/\A\s*\Z/m +              h={:bullet_=>false,:indent=>0,:obj=>obj,:idx=>idx,:note_=>note,:image_=>image,:tags=>tags} +              SiSU_document_structure::Object_para.new.paragraph(h) +            end            end          elsif not @@flag['code']            if t_o =~/^code\{/ @@ -306,7 +310,9 @@ module SiSU_document_structure_extract              t_o=SiSU_document_structure::Object_comment.new.comment(h) #t_o=SiSU_document_structure::Object_layout.new.insert(h)              t_o            else -            if t_o !~/^table\{/ and not t_o.nil? +            if t_o !~/^table\{/ \ +            and not t_o.nil? +              t_o.gsub!(/^\n+/m,'') #check added for ruby 1.9.2 not needed in 1.8 series                t_o.gsub!(/\n/m,"#{Mx[:tc_p]}")                @rows += t_o + Mx[:tc_c]              end @@ -786,7 +792,7 @@ module SiSU_document_structure_extract        @o_array=[]        node=ocn=ocn_dv=ocn_sp=ocnh=ocnh1=ocnh2=ocnh3=ocnh4=ocnh5=ocnh6=ocno=ocnp=ocnt=ocnc=ocng=ocni=ocnm=ocnu=ocnk=nm=0 # h heading, o other, t table, g group, i image        node_count_flag=false -      regex_exclude_ocn_and_node = /#{Rx[:meta]}|^@\S+?:\s|^4~endnotes|^#{Mx[:lv_o]}4:endnotes#{Mx[:lv_c]}|^\^~ |<:e[:_]\d+?>|^<:\#|<:- |<[:!]!4|<hr width|#{Mx[:br_endnotes]}/i #ocn here #  added with Tune.code #¡ +      regex_exclude_ocn_and_node = /#{Rx[:meta]}|^@\S+?:\s|^4~endnotes|^#{Mx[:lv_o]}4:endnotes#{Mx[:lv_c]}|^\^~ |<:e[:_]\d+?>|^<:\#|<:- |<[:!]!4|<hr width|#{Mx[:br_endnotes]}|\A\s*\Z/mi #ocn here #  added with Tune.code #¡        parent=node1=node2=node3=node4=node5=node6=nil        data.each do |dob|          h={} diff --git a/lib/sisu/v2/dal_images.rb b/lib/sisu/v2/dal_images.rb index ed537f22..2f9eb79d 100644 --- a/lib/sisu/v2/dal_images.rb +++ b/lib/sisu/v2/dal_images.rb @@ -92,8 +92,9 @@ module SiSU_images                    dir=SiSU_Env::Info_env.new(@md.fns)                    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.exist?("#{image_path}/#{image}") +                  path_image.each do |img_pth| +                    image_path=img_pth +                    break if FileTest.exist?("#{img_pth}/#{image}")                    end                    if FileTest.exist?("#{image_path}/#{image}")                      if @rmgk diff --git a/lib/sisu/v2/param.rb b/lib/sisu/v2/param.rb index 655177a7..c500c282 100644 --- a/lib/sisu/v2/param.rb +++ b/lib/sisu/v2/param.rb @@ -908,7 +908,7 @@ module SiSU_Param          skip unless fns_array                                                    # consider          @markup_version=SiSU_Markup_type::Markup_identify.new(fns_array,@opt).markup_version?                          #% determine markup version          if fns_array[0] =~ /^(?:%\s+)?(?:SiSU\s+(?:master\s+)?[\d.]*|sisu-[\d.]+)$/                                    #check markup and markup version -          if fns_array[0] =~ /^(?:%\s+)?(?:SiSU\s+(?:master\s+)?|sisu-)(?:[0-9]+)?(?:\.[0-9]+)?(?:\.[0-9]+)?$/         #check markup and markup version +          if fns_array[0] =~ /^(?:%\s+)?(?:SiSU\s+(?:master\s+)?|sisu-)(?:(?:[0-9]+?)(?:\.[0-9]+?)(?:\.[0-9]+))?$/     #check markup and markup version              @markup_version_declared=fns_array[0].match(/^(?:%\s+)?(?:SiSU\s+(?:master\s+)?|sisu-)([\d.]+)$/)[1]              sm_a,sm_b,sm_c=fns_array[0].match(/^(?:%\s+)?(?:SiSU\s+(?:master\s+)?|sisu-)([0-9]+)?(?:\.([0-9]+))?(?:\.([0-9]+))?$/)[1..3]              sm_c ||=0 diff --git a/lib/sisu/v2/sysenv.rb b/lib/sisu/v2/sysenv.rb index ef6d86c7..72b1ffc7 100644 --- a/lib/sisu/v2/sysenv.rb +++ b/lib/sisu/v2/sysenv.rb @@ -2757,9 +2757,6 @@ WOK          ? @rc['db']['postgresql']['port'] \          : (@defaults[:postgresql_port])        end -      def dbi -        "DBI:Pg:database=#{psql.db};port=#{psql.port}" -      end        def password          ((defined? @rc['db']['postgresql']['password']) \          && @rc['db']['postgresql']['password']=~/\S+/) \ diff --git a/lib/sisu/v3/cgi.rb b/lib/sisu/v3/cgi.rb index 7b01ae98..357a4332 100644 --- a/lib/sisu/v3/cgi.rb +++ b/lib/sisu/v3/cgi.rb @@ -71,8 +71,6 @@ module  SiSU_CGI       a=%{            For help on sisu search, type:              sisu --help search -          For help on setting up hyperestraier for sisu, type: -            sisu --help hyperestraier      }          SiSU_Screen::Ansi.new(@opt.cmd,a).print_grey      end diff --git a/lib/sisu/v3/cgi_pgsql.rb b/lib/sisu/v3/cgi_pgsql.rb index 5f23f22d..3821f402 100644 --- a/lib/sisu/v3/cgi_pgsql.rb +++ b/lib/sisu/v3/cgi_pgsql.rb @@ -83,7 +83,7 @@ module  SiSU_CGI_pgsql          else put "WARNING: no postgresql database available, (have you created one?)"          end          serve.sort! -        f1,f2,f3=[],[],[] +        f1,f2,f3='','',''          serve.each do |x|            f1 << %{              <option value="#{Db[:name_prefix]}#{x}">#{x}</option>\n} unless x =~/apache|sisu\/image/ #check          end diff --git a/lib/sisu/v3/cgi_sqlite.rb b/lib/sisu/v3/cgi_sqlite.rb index 8d2ff53d..7251c81a 100644 --- a/lib/sisu/v3/cgi_sqlite.rb +++ b/lib/sisu/v3/cgi_sqlite.rb @@ -78,7 +78,7 @@ module  SiSU_CGI_sqlite          end        end        serve.sort! -      f1,f2,f3=[],[],[] +      f1,f2,f3='','',''        serve.each do |x|          f1 << %{              <option value="#{Db[:name_prefix]}#{x}">#{x}</option>\n}        end diff --git a/lib/sisu/v3/dal_doc_str.rb b/lib/sisu/v3/dal_doc_str.rb index 6ce77057..09635066 100644 --- a/lib/sisu/v3/dal_doc_str.rb +++ b/lib/sisu/v3/dal_doc_str.rb @@ -179,8 +179,10 @@ module SiSU_document_structure_extract                image=image_test(obj)                note=endnote_test?(obj)                obj,tags=extract_tags(obj) -              h={ bullet_: bullet, indent: indent, obj: obj, idx: idx, note_: note, image_: image, tags: tags } -              SiSU_document_structure::Object_para.new.paragraph(h) +              unless obj=~/\A\s*\Z/m +                h={ bullet_: bullet, indent: indent, obj: obj, idx: idx, note_: note, image_: image, tags: tags } +                SiSU_document_structure::Object_para.new.paragraph(h) +              end              else nil              end            when /^[<\[](?:br)?:(?:pa?r|o(?:bj|---)?)[>\]]\s*$/                  #[br:par] #[br:obj] @@ -193,8 +195,10 @@ module SiSU_document_structure_extract              image=image_test(t_o)              note=endnote_test?(t_o)              obj,tags=extract_tags(t_o) -            h={ bullet_: false, indent: 0, obj: obj, idx: idx, note_: note, image_: image, tags: tags } -            SiSU_document_structure::Object_para.new.paragraph(h) +            unless obj=~/\A\s*\Z/m +              h={ bullet_: false, indent: 0, obj: obj, idx: idx, note_: note, image_: image, tags: tags } +              SiSU_document_structure::Object_para.new.paragraph(h) +            end            end          elsif not @@flag['code']            if t_o =~/^code\{/ @@ -311,8 +315,10 @@ module SiSU_document_structure_extract              t_o=SiSU_document_structure::Object_comment.new.comment(h) #t_o=SiSU_document_structure::Object_layout.new.insert(h)              t_o            else -            if t_o !~/^table\{/ and not t_o.nil? -              t_o.gsub!(/\n/m,"#{Mx[:tc_p]}") +            if t_o !~/^table\{/ \ +            and not t_o.nil? +              t_o.gsub!(/^\n+/m,'') #check added for ruby 1.9.2 not needed in 1.8 series (tested in v2) +              t_o.gsub!(/\n+/m,"#{Mx[:tc_p]}")                @rows += t_o + Mx[:tc_c]              end              t_o=nil @@ -803,7 +809,7 @@ module SiSU_document_structure_extract        @o_array=[]        node=ocn=ocn_dv=ocn_sp=ocnh=ocnh1=ocnh2=ocnh3=ocnh4=ocnh5=ocnh6=ocno=ocnp=ocnt=ocnc=ocng=ocni=ocnm=ocnu=ocnk=nm=0 # h heading, o other, t table, g group, i image        node_count_flag=false -      regex_exclude_ocn_and_node = /#{Rx[:meta]}|^@\S+?:\s|^4~endnotes|^#{Mx[:lv_o]}4:endnotes#{Mx[:lv_c]}|^\^~ |<:e[:_]\d+?>|^<:\#|<:- |<[:!]!4|<hr width|#{Mx[:br_endnotes]}/i #ocn here #  added with Tune.code #¡ +      regex_exclude_ocn_and_node = /#{Rx[:meta]}|^@\S+?:\s|^4~endnotes|^#{Mx[:lv_o]}4:endnotes#{Mx[:lv_c]}|^\^~ |<:e[:_]\d+?>|^<:\#|<:- |<[:!]!4|<hr width|#{Mx[:br_endnotes]}|\A\s*\Z/mi #ocn here #  added with Tune.code #¡        parent=node1=node2=node3=node4=node5=node6=nil        data.each do |dob|          h={} diff --git a/lib/sisu/v3/dal_images.rb b/lib/sisu/v3/dal_images.rb index 0d541a13..8c7e9f94 100644 --- a/lib/sisu/v3/dal_images.rb +++ b/lib/sisu/v3/dal_images.rb @@ -92,8 +92,9 @@ module SiSU_images                    dir=SiSU_Env::Info_env.new(@md.fns)                    path_image=[dir.path.image_source_include_local,dir.path.image_source_include_remote,dir.path.image_source_include]                    image_path=nil -                  path_image.each do |image_path| -                    break if FileTest.exist?("#{image_path}/#{image}") +                  path_image.each do |img_pth| +                    image_path=img_pth +                    break if FileTest.exist?("#{img_pth}/#{image}")                    end                    if FileTest.exist?("#{image_path}/#{image}")                      if @rmgk diff --git a/lib/sisu/v3/sysenv.rb b/lib/sisu/v3/sysenv.rb index d4d0f16d..7cc2a327 100644 --- a/lib/sisu/v3/sysenv.rb +++ b/lib/sisu/v3/sysenv.rb @@ -3647,9 +3647,6 @@ WOK          ? @rc['db']['postgresql']['port'] \          : (@defaults[:postgresql_port])        end -      def dbi -        "DBI:Pg:database=#{psql.db};port=#{psql.port}" -      end        def password          ((defined? @rc['db']['postgresql']['password']) \          && @rc['db']['postgresql']['password']=~/\S+/) \ | 
