From f09f45a113ebe9dffb65618a53d38f15c4f89d5d Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 1 Mar 2011 20:36:05 -0500 Subject: v3: use rb1.9.2 "require_relative" syntax --- CHANGELOG_v3 | 2 ++ data/doc/sisu/v3/CHANGELOG | 2 ++ lib/sisu/v3/air.rb | 5 +--- lib/sisu/v3/cgi.rb | 6 ++-- lib/sisu/v3/cgi_pgsql.rb | 4 +-- lib/sisu/v3/cgi_sqlite.rb | 4 +-- lib/sisu/v3/character_encoding.rb | 2 +- lib/sisu/v3/composite.rb | 2 +- lib/sisu/v3/concordance.rb | 20 ++++++------- lib/sisu/v3/conf.rb | 8 ++--- lib/sisu/v3/css.rb | 4 +-- lib/sisu/v3/dal.rb | 34 ++++++++++----------- lib/sisu/v3/dal_hash_digest.rb | 2 +- lib/sisu/v3/db_columns.rb | 4 +-- lib/sisu/v3/db_create.rb | 4 +-- lib/sisu/v3/db_dbi.rb | 18 ++++++------ lib/sisu/v3/db_drop.rb | 2 +- lib/sisu/v3/db_import.rb | 10 +++---- lib/sisu/v3/db_load_tuple.rb | 4 +-- lib/sisu/v3/dbi.rb | 10 +++---- lib/sisu/v3/defaults.rb | 4 +-- lib/sisu/v3/digests.rb | 6 ++-- lib/sisu/v3/embedded.rb | 4 +-- lib/sisu/v3/epub.rb | 14 ++++----- lib/sisu/v3/epub_concordance.rb | 16 +++++----- lib/sisu/v3/epub_segments.rb | 6 ++-- lib/sisu/v3/epub_tune.rb | 6 ++-- lib/sisu/v3/errors.rb | 2 +- lib/sisu/v3/git.rb | 6 ++-- lib/sisu/v3/harvest.rb | 12 ++++---- lib/sisu/v3/harvest_authors.rb | 2 +- lib/sisu/v3/harvest_topics.rb | 2 +- lib/sisu/v3/help.rb | 4 +-- lib/sisu/v3/html.rb | 16 +++++----- lib/sisu/v3/html_format.rb | 2 +- lib/sisu/v3/html_minitoc.rb | 2 +- lib/sisu/v3/html_promo.rb | 2 +- lib/sisu/v3/html_scroll.rb | 8 ++--- lib/sisu/v3/html_segments.rb | 8 ++--- lib/sisu/v3/html_table.rb | 4 +-- lib/sisu/v3/html_tune.rb | 6 ++-- lib/sisu/v3/hub.rb | 54 +++++++++++++++++----------------- lib/sisu/v3/i18n.rb | 2 +- lib/sisu/v3/manifest.rb | 12 ++++---- lib/sisu/v3/manpage.rb | 14 ++++----- lib/sisu/v3/manpage_format.rb | 2 +- lib/sisu/v3/odf.rb | 16 +++++----- lib/sisu/v3/odf_format.rb | 2 +- lib/sisu/v3/options.rb | 2 +- lib/sisu/v3/param.rb | 6 ++-- lib/sisu/v3/particulars.rb | 6 ++-- lib/sisu/v3/plaintext.rb | 14 ++++----- lib/sisu/v3/plaintext_format.rb | 2 +- lib/sisu/v3/po4a.rb | 14 ++++----- lib/sisu/v3/relaxng.rb | 2 +- lib/sisu/v3/remote.rb | 4 +-- lib/sisu/v3/rexml.rb | 4 +-- lib/sisu/v3/share_src.rb | 2 +- lib/sisu/v3/share_src_kdissert.rb | 2 +- lib/sisu/v3/shared_html.rb | 4 +-- lib/sisu/v3/shared_html_lite.rb | 6 ++-- lib/sisu/v3/shared_sem.rb | 2 +- lib/sisu/v3/shared_xhtml.rb | 4 +-- lib/sisu/v3/shared_xml.rb | 6 ++-- lib/sisu/v3/sisupod_make.rb | 6 ++-- lib/sisu/v3/sitemaps.rb | 6 ++-- lib/sisu/v3/sst_convert_markup.rb | 14 ++++----- lib/sisu/v3/sst_do_inline_footnotes.rb | 10 +++---- lib/sisu/v3/sst_from_xml.rb | 2 +- lib/sisu/v3/sst_to_s_xml_sax.rb | 22 +++++++------- lib/sisu/v3/sysenv.rb | 8 ++--- lib/sisu/v3/termsheet.rb | 6 ++-- lib/sisu/v3/texinfo.rb | 6 ++-- lib/sisu/v3/texinfo_format.rb | 2 +- lib/sisu/v3/texpdf.rb | 12 ++++---- lib/sisu/v3/texpdf_format.rb | 4 +-- lib/sisu/v3/update.rb | 2 +- lib/sisu/v3/urls.rb | 4 +-- lib/sisu/v3/webrick.rb | 4 +-- lib/sisu/v3/wikispeak.rb | 12 ++++---- lib/sisu/v3/xhtml.rb | 20 ++++++------- lib/sisu/v3/xhtml_table.rb | 2 +- lib/sisu/v3/xml.rb | 20 ++++++------- lib/sisu/v3/xml_dom.rb | 20 ++++++------- lib/sisu/v3/xml_fictionbook.rb | 8 ++--- lib/sisu/v3/xml_format.rb | 2 +- lib/sisu/v3/xml_md_oai_pmh_dc.rb | 4 +-- lib/sisu/v3/xml_scaffold.rb | 6 ++-- lib/sisu/v3/xml_tables.rb | 2 +- lib/sisu/v3/zap.rb | 2 +- 90 files changed, 332 insertions(+), 335 deletions(-) diff --git a/CHANGELOG_v3 b/CHANGELOG_v3 index 4cb76ca1..8ec043c4 100644 --- a/CHANGELOG_v3 +++ b/CHANGELOG_v3 @@ -27,6 +27,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.0.2.orig.tar.gz * make sisu: v3 require >=ruby1.9.2 (v2 require >=ruby1.8.7) bin/sisu bin/sisu3 modified accordingly + * use rb1.9.2 "require_relative" syntax + * use "encoding: utf-8" (instead of coding) * urls, param, two unrelated regex fixes, check diff --git a/data/doc/sisu/v3/CHANGELOG b/data/doc/sisu/v3/CHANGELOG index 128e8fb9..6ec4ab8c 100644 --- a/data/doc/sisu/v3/CHANGELOG +++ b/data/doc/sisu/v3/CHANGELOG @@ -27,6 +27,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.0.2.orig.tar.gz * make sisu: v3 require >=ruby1.9.2 (v2 require >=ruby1.8.7) bin/sisu bin/sisu3 modified accordingly + * use rb1.9.2 "require_relative" syntax + * use "encoding: utf-8" (instead of coding) * urls, param, two unrelated regex fixes, check diff --git a/lib/sisu/v3/air.rb b/lib/sisu/v3/air.rb index 7c29e6ec..2e678f45 100644 --- a/lib/sisu/v3/air.rb +++ b/lib/sisu/v3/air.rb @@ -57,10 +57,7 @@ =end module SiSU_Air - require "#{SiSU_lib}/particulars" # particulars.rb - #require "#{SiSU_lib}/defaults" # defaults.rb - #require "#{SiSU_lib}/sysenv" # sysenv.rb - #require "#{SiSU_lib}/param" # param.rb + require_relative 'particulars' # particulars.rb class Source @@dal_array=[] @@fns=nil diff --git a/lib/sisu/v3/cgi.rb b/lib/sisu/v3/cgi.rb index d83a1233..7b01ae98 100644 --- a/lib/sisu/v3/cgi.rb +++ b/lib/sisu/v3/cgi.rb @@ -58,10 +58,10 @@ =end module SiSU_CGI #% database building documents - require "#{SiSU_lib}/sysenv" # sysenv.rb - require "#{SiSU_lib}/cgi_pgsql" # cgi_pgsql.rb + require_relative 'sysenv' # sysenv.rb + require_relative 'cgi_pgsql' # cgi_pgsql.rb include SiSU_CGI_pgsql - require "#{SiSU_lib}/cgi_sqlite" # cgi_sqlite.rb + require_relative 'cgi_sqlite' # cgi_sqlite.rb class SiSU_search def initialize(opt) @opt=opt diff --git a/lib/sisu/v3/cgi_pgsql.rb b/lib/sisu/v3/cgi_pgsql.rb index bca98b5f..9e8cff4a 100644 --- a/lib/sisu/v3/cgi_pgsql.rb +++ b/lib/sisu/v3/cgi_pgsql.rb @@ -57,8 +57,8 @@ =end module SiSU_CGI_pgsql #% database building documents - require "#{SiSU_lib}/sysenv" # sysenv.rb - require "#{SiSU_lib}/cgi_sql_common" # cgi_sql_common.rb + require_relative 'sysenv' # sysenv.rb + require_relative 'cgi_sql_common' # cgi_sql_common.rb include SiSU_CGI_sql class SiSU_search_pgsql < SiSU_CGI_common def initialize(opt,webserv) diff --git a/lib/sisu/v3/cgi_sqlite.rb b/lib/sisu/v3/cgi_sqlite.rb index 3022a166..fd33b52a 100644 --- a/lib/sisu/v3/cgi_sqlite.rb +++ b/lib/sisu/v3/cgi_sqlite.rb @@ -57,8 +57,8 @@ =end module SiSU_CGI_sqlite #% database building documents - require "#{SiSU_lib}/sysenv" # sysenv.rb - require "#{SiSU_lib}/cgi_sql_common" # cgi_sql_common.rb + require_relative 'sysenv' # sysenv.rb + require_relative 'cgi_sql_common' # cgi_sql_common.rb include SiSU_CGI_sql class SiSU_search_sqlite < SiSU_CGI_common def initialize(opt,webserv) diff --git a/lib/sisu/v3/character_encoding.rb b/lib/sisu/v3/character_encoding.rb index 1a940798..f62d1dc3 100644 --- a/lib/sisu/v3/character_encoding.rb +++ b/lib/sisu/v3/character_encoding.rb @@ -59,7 +59,7 @@ =end module SiSU_character_encode require 'kirbybase' - require "#{SiSU_lib}/sysenv" # sysenv.rb + require_relative 'sysenv' # sysenv.rb class Characters attr_accessor(:character_encoding,:glyph,:dec,:hex,:rb,:html,:html_name,:tex,:tex_licr,:tex_alt,:name) def initialize(&block) diff --git a/lib/sisu/v3/composite.rb b/lib/sisu/v3/composite.rb index 26c1e819..664bfeb9 100644 --- a/lib/sisu/v3/composite.rb +++ b/lib/sisu/v3/composite.rb @@ -59,7 +59,7 @@ =end module SiSU_Assemble require 'fileutils' - require "#{SiSU_lib}/sysenv" # sysenv.rb + require_relative 'sysenv' # sysenv.rb class Remote_image include FileUtils def initialize diff --git a/lib/sisu/v3/concordance.rb b/lib/sisu/v3/concordance.rb index 870196d1..d979a6c9 100644 --- a/lib/sisu/v3/concordance.rb +++ b/lib/sisu/v3/concordance.rb @@ -58,15 +58,15 @@ =end module SiSU_Concordance - require "#{SiSU_lib}/particulars" # particulars.rb + require_relative 'particulars' # particulars.rb include SiSU_Particulars - require "#{SiSU_lib}/sysenv" # sysenv.rb + require_relative 'sysenv' # sysenv.rb include SiSU_Env - require "#{SiSU_lib}/defaults" # defaults.rb + require_relative 'defaults' # defaults.rb include SiSU_Viz - require "#{SiSU_lib}/html_format" # html_format.rb + require_relative 'html_format' # html_format.rb include SiSU_HTML_Format - require "#{SiSU_lib}/html_minitoc" # html_minitoc.rb + require_relative 'html_minitoc' # html_minitoc.rb class Source def initialize(opt) @opt=opt @@ -101,8 +101,8 @@ module SiSU_Concordance class Doc_title include SiSU_Viz #revisit, both requires (html & shared_xml) needed for stand alone operation (sisu -w [filename]) - require "#{SiSU_lib}/shared_xml" # shared_xml.rb - require "#{SiSU_lib}/html" # html.rb + require_relative 'shared_xml' # shared_xml.rb + require_relative 'html' # html.rb def initialize(particulars) @particulars,@md=particulars,particulars.md @data=SiSU_HTML::Source::Html_environment.new(particulars).tuned_file_instructions @@ -171,11 +171,11 @@ WOK end end class Words - require "#{SiSU_lib}/defaults" # defaults.rb + require_relative 'defaults' # defaults.rb include SiSU_Viz - require "#{SiSU_lib}/html_format" # html_format.rb + require_relative 'html_format' # html_format.rb include SiSU_HTML_Format - require "#{SiSU_lib}/sysenv" # sysenv.rb + require_relative 'sysenv' # sysenv.rb include SiSU_Screen @@dp=nil def initialize(particulars) diff --git a/lib/sisu/v3/conf.rb b/lib/sisu/v3/conf.rb index 766484e5..ecda22e8 100644 --- a/lib/sisu/v3/conf.rb +++ b/lib/sisu/v3/conf.rb @@ -57,12 +57,12 @@ =end module SiSU_Initialize - require "#{SiSU_lib}/sysenv" # sysenv.rb + require_relative 'sysenv' # sysenv.rb include SiSU_Env include SiSU_Screen - require "#{SiSU_lib}/relaxng" # relaxng.rb + require_relative 'relaxng' # relaxng.rb include SiSU_relaxng - require "#{SiSU_lib}/css" # css.rb + require_relative 'css' # css.rb include SiSU_Style class Source def initialize(opt) @@ -79,7 +79,7 @@ module SiSU_Initialize end class SiSU_Config #config files such as css are not updated if they already exist unless forced using the --init=site modifier require 'fileutils' - require "#{SiSU_lib}/sysenv" # sysenv.rb + require_relative 'sysenv' # sysenv.rb include FileUtils #::Verbose def initialize(opt) @opt=opt diff --git a/lib/sisu/v3/css.rb b/lib/sisu/v3/css.rb index 61b32f3d..463492af 100644 --- a/lib/sisu/v3/css.rb +++ b/lib/sisu/v3/css.rb @@ -57,8 +57,8 @@ =end module SiSU_Style - require "#{SiSU_lib}/sysenv" # sysenv.rb - require "#{SiSU_lib}/defaults" # defaults.rb + require_relative 'sysenv' # sysenv.rb + require_relative 'defaults' # defaults.rb class CSS def initialize @vz=SiSU_Env::Get_init.instance.skin diff --git a/lib/sisu/v3/dal.rb b/lib/sisu/v3/dal.rb index c9e7c072..0c9ff607 100644 --- a/lib/sisu/v3/dal.rb +++ b/lib/sisu/v3/dal.rb @@ -58,27 +58,27 @@ =end module SiSU_DAL - require "#{SiSU_lib}/defaults" # defaults.rb + require_relative 'defaults' # defaults.rb include SiSU_Viz - require "#{SiSU_lib}/sysenv" # sysenv.rb + require_relative 'sysenv' # sysenv.rb include SiSU_Env - require "#{SiSU_lib}/param" # param.rb + require_relative 'param' # param.rb include SiSU_Param - require "#{SiSU_lib}/dal_doc_objects" # dal_doc_objects.rb - require "#{SiSU_lib}/dal_syntax" # dal_syntax.rb + require_relative 'dal_doc_objects' # dal_doc_objects.rb + require_relative 'dal_syntax' # dal_syntax.rb include SiSU_Syntax - require "#{SiSU_lib}/dal_doc_str" # dal_doc_str.rb - require "#{SiSU_lib}/dal_idx" # dal_idx.rb - require "#{SiSU_lib}/dal_numbering" # dal_numbering.rb - require "#{SiSU_lib}/dal_hash_digest" # dal_hash_digest.rb - require "#{SiSU_lib}/dal_endnotes" # dal_endnotes.rb - require "#{SiSU_lib}/dal_images" # dal_images.rb - require "#{SiSU_lib}/dal_metadata" # dal_metadata.rb - require "#{SiSU_lib}/dal_character_check" # dal_character_check.rb - require "#{SiSU_lib}/dal_substitutions_and_insertions" # dal_substitutions_and_insertions.rb - require "#{SiSU_lib}/dal_expand_insertions" # dal_expand_insertions.rb - require "#{SiSU_lib}/i18n" # i18n.rb - require "#{SiSU_lib}/shared_sem" # shared_sem.rb + require_relative 'dal_doc_str' # dal_doc_str.rb + require_relative 'dal_idx' # dal_idx.rb + require_relative 'dal_numbering' # dal_numbering.rb + require_relative 'dal_hash_digest' # dal_hash_digest.rb + require_relative 'dal_endnotes' # dal_endnotes.rb + require_relative 'dal_images' # dal_images.rb + require_relative 'dal_metadata' # dal_metadata.rb + require_relative 'dal_character_check' # dal_character_check.rb + require_relative 'dal_substitutions_and_insertions' # dal_substitutions_and_insertions.rb + require_relative 'dal_expand_insertions' # dal_expand_insertions.rb + require_relative 'i18n' # i18n.rb + require_relative 'shared_sem' # shared_sem.rb class Instantiate < SiSU_Param::Parameters::Instructions def initialize @@flag_vocab=0 diff --git a/lib/sisu/v3/dal_hash_digest.rb b/lib/sisu/v3/dal_hash_digest.rb index 766bd70c..fe432974 100644 --- a/lib/sisu/v3/dal_hash_digest.rb +++ b/lib/sisu/v3/dal_hash_digest.rb @@ -57,7 +57,7 @@ =end module SiSU_hash - require "#{SiSU_lib}/shared_markup_alt.rb" #shared_markup_alt.rb + require_relative 'shared_markup_alt.rb' #shared_markup_alt.rb class Object_digest def initialize(md,data,env=nil) @md,@data,@env=md,data,env diff --git a/lib/sisu/v3/db_columns.rb b/lib/sisu/v3/db_columns.rb index cb8e09c6..268463e2 100644 --- a/lib/sisu/v3/db_columns.rb +++ b/lib/sisu/v3/db_columns.rb @@ -58,8 +58,8 @@ =end module SiSU_DB_columns - require "#{SiSU_lib}/sysenv" # sysenv.rb - require "#{SiSU_lib}/db_sqltxt" # db_sqltxt.rb + require_relative 'sysenv' # sysenv.rb + require_relative 'db_sqltxt' # db_sqltxt.rb class Columns < SiSU_DB_text::Prepare def initialize(md=nil) @md=md diff --git a/lib/sisu/v3/db_create.rb b/lib/sisu/v3/db_create.rb index ce4a8606..35750c4b 100644 --- a/lib/sisu/v3/db_create.rb +++ b/lib/sisu/v3/db_create.rb @@ -58,9 +58,9 @@ =end module SiSU_DB_create - require "#{SiSU_lib}/db_columns" # db_columns.rb + require_relative 'db_columns' # db_columns.rb class Create < SiSU_DB_columns::Columns - require "#{SiSU_lib}/sysenv" # sysenv.rb + require_relative 'sysenv' # sysenv.rb @@dl=nil def initialize(opt,conn,file,sql_type='pg') @opt,@conn,@file,@sql_type=opt,conn,file,sql_type diff --git a/lib/sisu/v3/db_dbi.rb b/lib/sisu/v3/db_dbi.rb index abb028f2..f4d5c891 100644 --- a/lib/sisu/v3/db_dbi.rb +++ b/lib/sisu/v3/db_dbi.rb @@ -58,15 +58,15 @@ =end module SiSU_DB_DBI - require "#{SiSU_lib}/db_columns" # db_columns.rb - require "#{SiSU_lib}/db_tests" # db_tests.rb - require "#{SiSU_lib}/db_create" # db_create.rb - require "#{SiSU_lib}/db_select" # db_select.rb - require "#{SiSU_lib}/db_indexes" # db_indexes.rb - require "#{SiSU_lib}/db_drop" # db_drop.rb - require "#{SiSU_lib}/db_remove" # db_remove.rb - require "#{SiSU_lib}/db_load_tuple" # db_load_tuple.rb - require "#{SiSU_lib}/db_import" # db_import.rb + require_relative 'db_columns' # db_columns.rb + require_relative 'db_tests' # db_tests.rb + require_relative 'db_create' # db_create.rb + require_relative 'db_select' # db_select.rb + require_relative 'db_indexes' # db_indexes.rb + require_relative 'db_drop' # db_drop.rb + require_relative 'db_remove' # db_remove.rb + require_relative 'db_load_tuple' # db_load_tuple.rb + require_relative 'db_import' # db_import.rb class Column_size < SiSU_DB_columns::Column_size # db_columns.rb end class Test < SiSU_DB_tests::Test # db_tests.rb diff --git a/lib/sisu/v3/db_drop.rb b/lib/sisu/v3/db_drop.rb index b4e90c0f..cbe604e8 100644 --- a/lib/sisu/v3/db_drop.rb +++ b/lib/sisu/v3/db_drop.rb @@ -59,7 +59,7 @@ =end module SiSU_DB_drop class Drop - require "#{SiSU_lib}/response" # response.rb + require_relative 'response' # response.rb def initialize(opt,conn,db_info,sql_type='') @opt,@conn,@db_info,@sql_type=opt,conn,db_info,sql_type @ans=SiSU_Response::Response.new diff --git a/lib/sisu/v3/db_import.rb b/lib/sisu/v3/db_import.rb index 732e6e00..2f0ae117 100644 --- a/lib/sisu/v3/db_import.rb +++ b/lib/sisu/v3/db_import.rb @@ -58,10 +58,10 @@ =end module SiSU_DB_import - require "#{SiSU_lib}/db_columns" # db_columns.rb - require "#{SiSU_lib}/db_load_tuple" # db_load_tuple.rb - require "#{SiSU_lib}/db_sqltxt" # db_sqltxt.rb - require "#{SiSU_lib}/shared_html_lite" # shared_html_lite.rb + require_relative 'db_columns' # db_columns.rb + require_relative 'db_load_tuple' # db_load_tuple.rb + require_relative 'db_sqltxt' # db_sqltxt.rb + require_relative 'shared_html_lite' # shared_html_lite.rb require 'sqlite3' class Import < SiSU_DB_text::Prepare include SiSU_Param @@ -116,7 +116,7 @@ module SiSU_DB_import @@dl ||=SiSU_Env::Info_env.new.digest.length end def marshal_load - require "#{SiSU_lib}/dal" # dal.rb + require_relative 'dal' # dal.rb @dal_array=SiSU_DAL::Source.new(@opt).get # dal file drawn here SiSU_Screen::Ansi.new(@opt.cmd,"#{@db.psql.db}::#{@opt.fns}").puts_blue if @opt.cmd =~/vVM/ SiSU_Screen::Ansi.new(@opt.cmd,'Marshal Load',@fnc).puts_grey if @opt.cmd =~/v/ diff --git a/lib/sisu/v3/db_load_tuple.rb b/lib/sisu/v3/db_load_tuple.rb index 6a3e252b..183f8fc4 100644 --- a/lib/sisu/v3/db_load_tuple.rb +++ b/lib/sisu/v3/db_load_tuple.rb @@ -58,9 +58,9 @@ =end module SiSU_DB_tuple - require "#{SiSU_lib}/db_columns" # db_columns.rb + require_relative 'db_columns' # db_columns.rb class Load_documents - require "#{SiSU_lib}/param" # param.rb + require_relative 'param' # param.rb include SiSU_Param def initialize(conn,col,opt,file) @conn,@col,@opt,@file=conn,col,opt,file diff --git a/lib/sisu/v3/dbi.rb b/lib/sisu/v3/dbi.rb index a841a260..7d4a5445 100644 --- a/lib/sisu/v3/dbi.rb +++ b/lib/sisu/v3/dbi.rb @@ -57,14 +57,14 @@ =end module SiSU_DBI #% database building - require "#{SiSU_lib}/help" # help.rb - require "#{SiSU_lib}/sysenv" # sysenv.rb + require_relative 'help' # help.rb + require_relative 'sysenv' # sysenv.rb include SiSU_Env; include SiSU_Screen - require "#{SiSU_lib}/param" # param.rb + require_relative 'param' # param.rb include SiSU_Param - require "#{SiSU_lib}/db_dbi" # db_dbi.rb + require_relative 'db_dbi' # db_dbi.rb include SiSU_DB_DBI - require "#{SiSU_lib}/shared_html_lite" # shared_html_lite.rb + require_relative 'shared_html_lite' # shared_html_lite.rb include SiSU_Format_Shared class SiSU_SQL def initialize(opt) diff --git a/lib/sisu/v3/defaults.rb b/lib/sisu/v3/defaults.rb index 85fd574d..37793633 100644 --- a/lib/sisu/v3/defaults.rb +++ b/lib/sisu/v3/defaults.rb @@ -59,9 +59,9 @@ $latex_run=nil module SiSU_Viz require 'uri' - require "#{SiSU_lib}/sysenv" # sysenv.rb + require_relative 'sysenv' # sysenv.rb include SiSU_Env - require "#{SiSU_lib}/css" # css.rb + require_relative 'css' # css.rb include SiSU_Style class Skin def initialize diff --git a/lib/sisu/v3/digests.rb b/lib/sisu/v3/digests.rb index 59dd11c0..3d35fbd7 100644 --- a/lib/sisu/v3/digests.rb +++ b/lib/sisu/v3/digests.rb @@ -57,9 +57,9 @@ =end module SiSU_Digest_view - require "#{SiSU_lib}/particulars" # particulars.rb - require "#{SiSU_lib}/i18n" # i18n.rb - require "#{SiSU_lib}/shared_markup_alt.rb" # shared_markup_alt.rb + require_relative 'particulars' # particulars.rb + require_relative 'i18n' # i18n.rb + require_relative 'shared_markup_alt.rb' # shared_markup_alt.rb pwd=Dir.pwd class Source @@dg=nil diff --git a/lib/sisu/v3/embedded.rb b/lib/sisu/v3/embedded.rb index c488d6f5..29a71f6b 100644 --- a/lib/sisu/v3/embedded.rb +++ b/lib/sisu/v3/embedded.rb @@ -57,9 +57,9 @@ =end module SiSU_Embedded - require "#{SiSU_lib}/param" # param.rb + require_relative 'param' # param.rb include SiSU_Param - require "#{SiSU_lib}/sysenv" # sysenv.rb + require_relative 'sysenv' # sysenv.rb include SiSU_Env class Source require 'fileutils' diff --git a/lib/sisu/v3/epub.rb b/lib/sisu/v3/epub.rb index 3285730a..0465ff86 100644 --- a/lib/sisu/v3/epub.rb +++ b/lib/sisu/v3/epub.rb @@ -58,18 +58,18 @@ =end module SiSU_EPUB require 'pstore' - require "#{SiSU_lib}/particulars" # particulars.rb + require_relative 'particulars' # particulars.rb include SiSU_Particulars - require "#{SiSU_lib}/defaults" # defaults.rb + require_relative 'defaults' # defaults.rb include SiSU_Viz - require "#{SiSU_lib}/xhtml_table" # xhtml_table.rb - require "#{SiSU_lib}/epub_format" # epub_format.rb + require_relative 'xhtml_table' # xhtml_table.rb + require_relative 'epub_format' # epub_format.rb include SiSU_EPUB_Format - require "#{SiSU_lib}/epub_segments" # epub_segments.rb + require_relative 'epub_segments' # epub_segments.rb include SiSU_EPUB_seg - require "#{SiSU_lib}/epub_tune" # epub_tune.rb + require_relative 'epub_tune' # epub_tune.rb include SiSU_EPUB_Tune - require "#{SiSU_lib}/epub_concordance" # epub_concordance.rb + require_relative 'epub_concordance' # epub_concordance.rb class Source def initialize(opt) @opt=opt diff --git a/lib/sisu/v3/epub_concordance.rb b/lib/sisu/v3/epub_concordance.rb index c08ad4e0..7ced16f0 100644 --- a/lib/sisu/v3/epub_concordance.rb +++ b/lib/sisu/v3/epub_concordance.rb @@ -58,13 +58,13 @@ =end module SiSU_EPUB_Concordance - require "#{SiSU_lib}/particulars" # particulars.rb + require_relative 'particulars' # particulars.rb include SiSU_Particulars - require "#{SiSU_lib}/sysenv" # sysenv.rb + require_relative 'sysenv' # sysenv.rb include SiSU_Env - require "#{SiSU_lib}/defaults" # defaults.rb + require_relative 'defaults' # defaults.rb include SiSU_Viz - require "#{SiSU_lib}/epub_format" # epub_format.rb + require_relative 'epub_format' # epub_format.rb include SiSU_EPUB_Format class Source def initialize(opt) @@ -96,7 +96,7 @@ module SiSU_EPUB_Concordance class Doc_title include SiSU_Viz #revisit, both requires (html & shared_xml) needed for stand alone operation (sisu -w [filename]) - require "#{SiSU_lib}/epub" # epub.rb + require_relative 'epub' # epub.rb def initialize(particulars) @particulars,@md=particulars,particulars.md @data=SiSU_EPUB::Source::XHtml_environment.new(particulars).tuned_file_instructions @@ -145,11 +145,11 @@ WOK end end class Words - require "#{SiSU_lib}/defaults" # defaults.rb + require_relative 'defaults' # defaults.rb include SiSU_Viz - require "#{SiSU_lib}/epub_format" # epub_format.rb + require_relative 'epub_format' # epub_format.rb include SiSU_EPUB_Format - require "#{SiSU_lib}/sysenv" # sysenv.rb + require_relative 'sysenv' # sysenv.rb include SiSU_Screen def initialize(particulars) @particulars=particulars diff --git a/lib/sisu/v3/epub_segments.rb b/lib/sisu/v3/epub_segments.rb index 9ec5916c..b6a84bd1 100644 --- a/lib/sisu/v3/epub_segments.rb +++ b/lib/sisu/v3/epub_segments.rb @@ -57,9 +57,9 @@ =end module SiSU_EPUB_seg - require "#{SiSU_lib}/shared_xhtml" # shared_xhtml.rb - require "#{SiSU_lib}/epub" # epub.rb - require "#{SiSU_lib}/shared_metadata" # shared_metadata.rb + require_relative 'shared_xhtml' # shared_xhtml.rb + require_relative 'epub' # epub.rb + require_relative 'shared_metadata' # shared_metadata.rb class Seg_output def initialize(md,outputfile,seg,minitoc,type='') @md,@output_epub_cont_seg,@seg,@minitoc,@type=md,outputfile,seg,minitoc,type diff --git a/lib/sisu/v3/epub_tune.rb b/lib/sisu/v3/epub_tune.rb index 853b130e..8190a7f6 100644 --- a/lib/sisu/v3/epub_tune.rb +++ b/lib/sisu/v3/epub_tune.rb @@ -56,11 +56,11 @@ ** Description: epub generation, epub pre-processing =end -require "#{SiSU_lib}/param" +require_relative 'param' module SiSU_EPUB_Tune - require "#{SiSU_lib}/sysenv" # sysenv.rb + require_relative 'sysenv' # sysenv.rb include SiSU_Env; include SiSU_Screen - require "#{SiSU_lib}/epub_format" # epub_format.rb #watch + require_relative 'epub_format' # epub_format.rb #watch @@line_mode='' @@endnote_array=[] @@endnote_call_counter=1 diff --git a/lib/sisu/v3/errors.rb b/lib/sisu/v3/errors.rb index fb3d8b22..57b961bd 100644 --- a/lib/sisu/v3/errors.rb +++ b/lib/sisu/v3/errors.rb @@ -57,7 +57,7 @@ =end module SiSU_Errors - require "#{SiSU_lib}/sysenv" # sysenv.rb + require_relative 'sysenv' # sysenv.rb include SiSU_Env; include SiSU_Screen class Info_error 0 #% remote markup file .sst - require "#{SiSU_lib}/remote" # remote.rb + require_relative 'remote' # remote.rb SiSU_Remote::Get.new(@opt,@get_s).fns Operations.new.counter end if @get_p.length > 0 #% remote sisupod - require "#{SiSU_lib}/remote" # remote.rb + require_relative 'remote' # remote.rb SiSU_Remote::Get.new(@opt,@get_p).sisupod end rescue @@ -512,10 +512,10 @@ p "here #{__FILE__} #{__LINE__}" if @opt =~/M/ rm_rf(@@env.user) unless @opt.cmd =~/M/ end end elsif @opt.mod.inspect =~/--query/ - require "#{SiSU_lib}/sst_identify_markup" # sst_identify_markup.rb + require_relative 'sst_identify_markup' # sst_identify_markup.rb puts SiSU_Markup::Markup_history.new(@opt).query elsif @opt.mod.inspect =~/--identify/ - require "#{SiSU_lib}/sst_identify_markup" # sst_identify_markup.rb + require_relative 'sst_identify_markup' # sst_identify_markup.rb markup_version=SiSU_Markup::Markup_identify.new(@opt).markup_version? elsif @opt.mod.inspect =~/--about/ #% help instructions if @opt.mod.inspect =~/--about/ \ @@ -524,10 +524,10 @@ p "here #{__FILE__} #{__LINE__}" if @opt =~/M/ else SiSU_Help::Help.new('list','color_off').help_request end elsif @opt.mod.inspect =~/--sitemaps/ #% sitemaps - require "#{SiSU_lib}/sitemaps" # sitemaps.rb + require_relative 'sitemaps' # sitemaps.rb SiSU_Sitemaps::Source.new(@opt).read if @opt.cmd =~/R/ - require "#{SiSU_lib}/remote" # remote.rb + require_relative 'remote' # remote.rb SiSU_Remote::Put.new(@opt).rsync_sitemaps end else #% help instructions @@ -571,15 +571,15 @@ p "here #{__FILE__} #{__LINE__}" if @opt =~/M/ require 'jcode' $KCODE='UTF8' end - require "#{SiSU_lib}/constants" # constants.rb - require "#{SiSU_lib}/options" # options.rb - require "#{SiSU_lib}/sysenv" # sysenv.rb + require_relative 'constants' # constants.rb + require_relative 'options' # options.rb + require_relative 'sysenv' # sysenv.rb include SiSU_Env; include SiSU_Screen - require "#{SiSU_lib}/param" # param.rb + require_relative 'param' # param.rb include SiSU_Param - require "#{SiSU_lib}/defaults" # defaults.rb + require_relative 'defaults' # defaults.rb include SiSU_Viz - require "#{SiSU_lib}/help" # help.rb + require_relative 'help' # help.rb include SiSU_Help require 'uri' home=ENV['HOME'] diff --git a/lib/sisu/v3/i18n.rb b/lib/sisu/v3/i18n.rb index 9e54f684..9fbe8c3e 100644 --- a/lib/sisu/v3/i18n.rb +++ b/lib/sisu/v3/i18n.rb @@ -141,7 +141,7 @@ module SiSU_i18n end end module SiSU_Translate - require "#{SiSU_lib}/sysenv" # sysenv.rb + require_relative 'sysenv' # sysenv.rb include SiSU_Env; include SiSU_Param class Source def initialize(md,doc_lang,trans_str='') diff --git a/lib/sisu/v3/manifest.rb b/lib/sisu/v3/manifest.rb index b09048ab..79e3eb8a 100644 --- a/lib/sisu/v3/manifest.rb +++ b/lib/sisu/v3/manifest.rb @@ -57,15 +57,15 @@ =end module SiSU_Manifest - require "#{SiSU_lib}/sysenv" # sysenv.rb + require_relative 'sysenv' # sysenv.rb include SiSU_Env - require "#{SiSU_lib}/i18n" # i18n.rb - require "#{SiSU_lib}/particulars" # particulars.rb + require_relative 'i18n' # i18n.rb + require_relative 'particulars' # particulars.rb include SiSU_Particulars - require "#{SiSU_lib}/html_minitoc" # html_minitoc.rb - require "#{SiSU_lib}/html" # html.rb + require_relative 'html_minitoc' # html_minitoc.rb + require_relative 'html' # html.rb include SiSU_HTML_Format - require "#{SiSU_lib}/param" # param.rb + require_relative 'param' # param.rb include SiSU_Param include SiSU_Viz class Source diff --git a/lib/sisu/v3/manpage.rb b/lib/sisu/v3/manpage.rb index 8f904355..5c6bfd99 100644 --- a/lib/sisu/v3/manpage.rb +++ b/lib/sisu/v3/manpage.rb @@ -58,15 +58,15 @@ =end module SiSU_Manpage - require "#{SiSU_lib}/dal" # dal.rb - require "#{SiSU_lib}/sysenv" # sysenv.rb + require_relative 'dal' # dal.rb + require_relative 'sysenv' # sysenv.rb include SiSU_Env include SiSU_Param include SiSU_Viz - require "#{SiSU_lib}/manpage_format" # manpage_format.rb + require_relative 'manpage_format' # manpage_format.rb include SiSU_Manpage_format - require "#{SiSU_lib}/shared_metadata" # shared_metadata.rb - require "#{SiSU_lib}/shared_txt" # shared_txt.rb + require_relative 'shared_metadata' # shared_metadata.rb + require_relative 'shared_txt' # shared_txt.rb pwd=Dir.pwd @@alt_id_count,@@alt_id_count,@@tablehead,@@number_of_cols=0,0,0,0 @@tablefoot='' @@ -97,8 +97,8 @@ module SiSU_Manpage end private class Scroll [],:end=>[] } def initialize(md,data) diff --git a/lib/sisu/v3/manpage_format.rb b/lib/sisu/v3/manpage_format.rb index 87c2e34b..3751258a 100644 --- a/lib/sisu/v3/manpage_format.rb +++ b/lib/sisu/v3/manpage_format.rb @@ -57,7 +57,7 @@ =end module SiSU_Manpage_format - require "#{SiSU_lib}/param" # param.rb + require_relative 'param' # param.rb include SiSU_Param include SiSU_Viz class Paragraph_number diff --git a/lib/sisu/v3/odf.rb b/lib/sisu/v3/odf.rb index deca92f1..7ed00e21 100644 --- a/lib/sisu/v3/odf.rb +++ b/lib/sisu/v3/odf.rb @@ -57,16 +57,16 @@ =end module SiSU_ODF - require "#{SiSU_lib}/particulars" # particulars.rb + require_relative 'particulars' # particulars.rb include SiSU_Particulars - require "#{SiSU_lib}/dal" # dal.rb - require "#{SiSU_lib}/sysenv" # sysenv.rb + require_relative 'dal' # dal.rb + require_relative 'sysenv' # sysenv.rb include SiSU_Env include SiSU_Viz - require "#{SiSU_lib}/odf_format" # odf_format.rb + require_relative 'odf_format' # odf_format.rb include SiSU_ODF_format - require "#{SiSU_lib}/shared_metadata" # shared_metadata.rb - require "#{SiSU_lib}/shared_txt" # shared_txt.rb + require_relative 'shared_metadata' # shared_metadata.rb + require_relative 'shared_txt' # shared_txt.rb @@alt_id_count,@@alt_id_count,@@tablehead,@@number_of_cols=0,0,0,0 class Source require 'zlib' @@ -101,8 +101,8 @@ module SiSU_ODF end private class Scroll [],:open=>[],:close=>[],:head=>[],:metadata=>[],:tail=>[],:endnotes=>[] } @@docstart=true diff --git a/lib/sisu/v3/odf_format.rb b/lib/sisu/v3/odf_format.rb index 2b4efa7a..8736d7d1 100644 --- a/lib/sisu/v3/odf_format.rb +++ b/lib/sisu/v3/odf_format.rb @@ -57,7 +57,7 @@ =end module SiSU_ODF_format - require "#{SiSU_lib}/param" # param.rb + require_relative 'param' # param.rb include SiSU_Param include SiSU_Viz class Paragraph_number diff --git a/lib/sisu/v3/options.rb b/lib/sisu/v3/options.rb index 427580fa..ebb39774 100644 --- a/lib/sisu/v3/options.rb +++ b/lib/sisu/v3/options.rb @@ -59,7 +59,7 @@ =end module SiSU_commandline require "pathname" - require "#{SiSU_lib}/sysenv" # sysenv.rb + require_relative 'sysenv' # sysenv.rb class Options attr_accessor :cmd,:mod,:f_pths,:files,:paths,:f_pth,:pth,:fns,:fnb,:fnc,:fncb,:what def initialize(a) diff --git a/lib/sisu/v3/param.rb b/lib/sisu/v3/param.rb index 7774dab2..5d4c3daa 100644 --- a/lib/sisu/v3/param.rb +++ b/lib/sisu/v3/param.rb @@ -59,10 +59,10 @@ module SiSU_Param require 'uri' require 'pstore' - require "#{SiSU_lib}/sysenv" # sysenv.rb + require_relative 'sysenv' # sysenv.rb include SiSU_Env - require "#{SiSU_lib}/param_identify_markup" # param_identify_markup.rb - require "#{SiSU_lib}/help" # help.rb + require_relative 'param_identify_markup' # param_identify_markup.rb + require_relative 'help' # help.rb include SiSU_Help @@date=SiSU_Env::Info_date.new @@symlnk=Create_system_link.new diff --git a/lib/sisu/v3/particulars.rb b/lib/sisu/v3/particulars.rb index 8e69141f..1c03d304 100644 --- a/lib/sisu/v3/particulars.rb +++ b/lib/sisu/v3/particulars.rb @@ -59,11 +59,11 @@ =end module SiSU_Particulars require 'singleton' - require "#{SiSU_lib}/sysenv" # sysenv.rb + require_relative 'sysenv' # sysenv.rb include SiSU_Env - require "#{SiSU_lib}/param" # param.rb + require_relative 'param' # param.rb include SiSU_Param - require "#{SiSU_lib}/dal" # dal.rb + require_relative 'dal' # dal.rb class Combined_singleton include Singleton def get_all(opt) diff --git a/lib/sisu/v3/plaintext.rb b/lib/sisu/v3/plaintext.rb index 01e1a4f2..8ed1c3cd 100644 --- a/lib/sisu/v3/plaintext.rb +++ b/lib/sisu/v3/plaintext.rb @@ -58,13 +58,13 @@ =end module SiSU_Plaintext - require "#{SiSU_lib}/dal" # dal.rb - require "#{SiSU_lib}/sysenv" # sysenv.rb + require_relative 'dal' # dal.rb + require_relative 'sysenv' # sysenv.rb include SiSU_Env - require "#{SiSU_lib}/plaintext_format" # plaintext_format.rb + require_relative 'plaintext_format' # plaintext_format.rb include SiSU_Plaintext_format - require "#{SiSU_lib}/shared_metadata" # shared_metadata.rb - require "#{SiSU_lib}/shared_txt" # shared_txt.rb + require_relative 'shared_metadata' # shared_metadata.rb + require_relative 'shared_txt' # shared_txt.rb include SiSU_Param include SiSU_Viz pwd=Dir.pwd @@ -109,8 +109,8 @@ module SiSU_Plaintext end private class Scroll [],:end=>[] } def initialize(data,md,wrap_width) diff --git a/lib/sisu/v3/plaintext_format.rb b/lib/sisu/v3/plaintext_format.rb index 0083e66c..61e43db1 100644 --- a/lib/sisu/v3/plaintext_format.rb +++ b/lib/sisu/v3/plaintext_format.rb @@ -57,7 +57,7 @@ =end module SiSU_Plaintext_format - require "#{SiSU_lib}/param" # param.rb + require_relative 'param' # param.rb include SiSU_Param include SiSU_Viz class Paragraph_number diff --git a/lib/sisu/v3/po4a.rb b/lib/sisu/v3/po4a.rb index 0c5694d1..9ac98f00 100644 --- a/lib/sisu/v3/po4a.rb +++ b/lib/sisu/v3/po4a.rb @@ -58,11 +58,11 @@ =end module SiSU_po4a - require "#{SiSU_lib}/dal" # dal.rb - require "#{SiSU_lib}/sysenv" # sysenv.rb + require_relative 'dal' # dal.rb + require_relative 'sysenv' # sysenv.rb include SiSU_Env - require "#{SiSU_lib}/shared_metadata" # shared_metadata.rb - require "#{SiSU_lib}/po4a_set" # po4a_set.rb + require_relative 'shared_metadata' # shared_metadata.rb + require_relative 'po4a_set' # po4a_set.rb include SiSU_Param include SiSU_Viz pwd=Dir.pwd @@ -160,8 +160,8 @@ module SiSU_po4a end private class Scroll [],:end=>[] } def initialize(fn,data_src,data_trn,md_src,md_trn,wrap_width) @@ -944,7 +944,7 @@ GSUB end def po4a_git unless @md.cmd =~/M/ - require "#{SiSU_lib}/git" # git.rb + require_relative 'git' # git.rb git=SiSU_Git::Source.new(@md.opt) git.create_file_structure_git unless FileTest.directory?(@file.output_path.pot_git) if @md.opt.f_pth[:lng] =='en' diff --git a/lib/sisu/v3/relaxng.rb b/lib/sisu/v3/relaxng.rb index 688d91bf..b26fd6f5 100644 --- a/lib/sisu/v3/relaxng.rb +++ b/lib/sisu/v3/relaxng.rb @@ -57,7 +57,7 @@ =end module SiSU_relaxng - require "#{SiSU_lib}/sysenv" # sysenv.rb + require_relative 'sysenv' # sysenv.rb class RelaxNG def gpl3_or_later @gpl3_or_later =< -require "#{SiSU_lib}/options" # options.rb +require_relative 'options' # options.rb argv=$* @opt=SiSU_commandline::Options.new(argv) case @opt.mod.inspect diff --git a/lib/sisu/v3/sst_do_inline_footnotes.rb b/lib/sisu/v3/sst_do_inline_footnotes.rb index 171a5df3..d22cf096 100644 --- a/lib/sisu/v3/sst_do_inline_footnotes.rb +++ b/lib/sisu/v3/sst_do_inline_footnotes.rb @@ -59,15 +59,15 @@ =end module SiSU_Convert_footnotes - require "#{SiSU_lib}/defaults" # defaults.rb + require_relative 'defaults' # defaults.rb include SiSU_Viz - require "#{SiSU_lib}/sysenv" # sysenv.rb + require_relative 'sysenv' # sysenv.rb include SiSU_Env - require "#{SiSU_lib}/param" # param.rb + require_relative 'param' # param.rb include SiSU_Param - require "#{SiSU_lib}/dal_syntax" # dal_syntax.rb + require_relative 'dal_syntax' # dal_syntax.rb include SiSU_Syntax - require "#{SiSU_lib}/i18n" # i18n.rb + require_relative 'i18n' # i18n.rb class Instantiate < SiSU_Param::Parameters::Instructions @@flag={} #Beware!! def initialize diff --git a/lib/sisu/v3/sst_from_xml.rb b/lib/sisu/v3/sst_from_xml.rb index a0f57f8f..a948357a 100644 --- a/lib/sisu/v3/sst_from_xml.rb +++ b/lib/sisu/v3/sst_from_xml.rb @@ -58,7 +58,7 @@ =end module SiSU_sst_from_xml - require "#{SiSU_lib}/sysenv" # sysenv.rb + require_relative 'sysenv' # sysenv.rb class Convert require 'rexml/document' include REXML diff --git a/lib/sisu/v3/sst_to_s_xml_sax.rb b/lib/sisu/v3/sst_to_s_xml_sax.rb index 933ea667..ee38d9a7 100644 --- a/lib/sisu/v3/sst_to_s_xml_sax.rb +++ b/lib/sisu/v3/sst_to_s_xml_sax.rb @@ -57,21 +57,21 @@ =end module SiSU_simple_xml_model_sax - require "#{SiSU_lib}/particulars" # particulars.rb + require_relative 'particulars' # particulars.rb include SiSU_Particulars - require "#{SiSU_lib}/defaults" # defaults.rb + require_relative 'defaults' # defaults.rb include SiSU_Viz - require "#{SiSU_lib}/param" # param.rb + require_relative 'param' # param.rb include SiSU_Param - require "#{SiSU_lib}/sysenv" # sysenv.rb + require_relative 'sysenv' # sysenv.rb include SiSU_Env - require "#{SiSU_lib}/dal_doc_str" # dal_doc_str.rb - require "#{SiSU_lib}/shared_xml" # shared_xml.rb + require_relative 'dal_doc_str' # dal_doc_str.rb + require_relative 'shared_xml' # shared_xml.rb include SiSU_XML_munge - require "#{SiSU_lib}/shared_sem" # shared_sem.rb - require "#{SiSU_lib}/xml_format" # xml_format.rb + require_relative 'shared_sem' # shared_sem.rb + require_relative 'xml_format' # xml_format.rb include SiSU_XML_format - require "#{SiSU_lib}/rexml" # rexml.rb + require_relative 'rexml' # rexml.rb include SiSU_Rexml @@alt_id_count,@@tablehead,@@number_of_cols=0,0,0 @@tablefoot='' @@ -128,8 +128,8 @@ module SiSU_simple_xml_model_sax end end class Scroll - require "#{SiSU_lib}/shared_txt" # shared_txt.rb - require "#{SiSU_lib}/css" # css.rb + require_relative 'shared_txt' # shared_txt.rb + require_relative 'css' # css.rb include SiSU_text_utils @@xml={ :body=>[],:open=>[],:close=>[],:head=>[] } def initialize(data='',particulars='') diff --git a/lib/sisu/v3/sysenv.rb b/lib/sisu/v3/sysenv.rb index 344847b6..ba401cfa 100644 --- a/lib/sisu/v3/sysenv.rb +++ b/lib/sisu/v3/sysenv.rb @@ -59,7 +59,7 @@ @@cX=nil @@current_document=Dir.pwd #nil #'' module SiSU_Env - require "#{SiSU_lib}/constants" # constants.rb + require_relative 'constants' # constants.rb require 'fileutils' include FileUtils::Verbose require 'singleton' @@ -3900,7 +3900,7 @@ WOK end end class Create_site < Info_env - require "#{SiSU_lib}/css" # css.rb + require_relative 'css' # css.rb include SiSU_Style def initialize(cmd) @cmd=cmd @@ -4026,10 +4026,10 @@ WOK end end module SiSU_Screen - require "#{SiSU_lib}/screen_text_color" # screen_text_color.rb + require_relative 'screen_text_color' # screen_text_color.rb end module SiSU_Errors - require "#{SiSU_lib}/errors" # errors.rb + require_relative 'errors' # errors.rb end __END__ https? intro check 2007-09-22 diff --git a/lib/sisu/v3/termsheet.rb b/lib/sisu/v3/termsheet.rb index d1d6150e..b09bd5ac 100644 --- a/lib/sisu/v3/termsheet.rb +++ b/lib/sisu/v3/termsheet.rb @@ -58,8 +58,8 @@ sample files must be provided - (saved till later as may confuse) =end -require "#{SiSU_lib}/sysenv" # sysenv.rb -require "#{SiSU_lib}/param" # param.rb +require_relative 'sysenv' # sysenv.rb +require_relative 'param' # param.rb include SiSU_Param @do,@done,@used,@html_output,@txt_input,@txt_output,@@report=Array.new(7){[]} @@info=nil @@ -121,7 +121,7 @@ WOK @@report << @done << @used << "\n" @done,@used=[],[] end -require "#{SiSU_lib}/param" # param.rb +require_relative 'param' # param.rb @argv=$* @proc="#{@argv[0].to_s}" if @proc =~ /^-?[wft]/ diff --git a/lib/sisu/v3/texinfo.rb b/lib/sisu/v3/texinfo.rb index 3de5feef..5720e939 100644 --- a/lib/sisu/v3/texinfo.rb +++ b/lib/sisu/v3/texinfo.rb @@ -57,12 +57,12 @@ =end module SiSU_TexInfo - require "#{SiSU_lib}/html" # html.rb - require "#{SiSU_lib}/param" # param.rb + require_relative 'html' # html.rb + require_relative 'param' # param.rb include SiSU_Param include SiSU_Viz #include Stamp ... needed removed arbitrarily 2005w05/1 (warnings about undefined flags) - require "#{SiSU_lib}/texinfo_format" # texinfo_format.rb + require_relative 'texinfo_format' # texinfo_format.rb include SiSU_Texinfo_format @tex_file=[] @@tabular="{tabular}" diff --git a/lib/sisu/v3/texinfo_format.rb b/lib/sisu/v3/texinfo_format.rb index 617b34d2..b9fb3256 100644 --- a/lib/sisu/v3/texinfo_format.rb +++ b/lib/sisu/v3/texinfo_format.rb @@ -58,7 +58,7 @@ =end module SiSU_Texinfo_format @@table_pg_break_counter=1 - require "#{SiSU_lib}/param" # param.rb + require_relative 'param' # param.rb include SiSU_Param include SiSU_Viz class Texinfo diff --git a/lib/sisu/v3/texpdf.rb b/lib/sisu/v3/texpdf.rb index 0ecd9c36..0843f22f 100644 --- a/lib/sisu/v3/texpdf.rb +++ b/lib/sisu/v3/texpdf.rb @@ -58,13 +58,13 @@ =end module SiSU_TeX require 'pstore' - require "#{SiSU_lib}/defaults" # defaults.rb + require_relative 'defaults' # defaults.rb include SiSU_Viz - require "#{SiSU_lib}/particulars" # particulars.rb + require_relative 'particulars' # particulars.rb include SiSU_Particulars - require "#{SiSU_lib}/texpdf_format" # texpdf_format.rb + require_relative 'texpdf_format' # texpdf_format.rb include SiSU_TeX_Pdf - require "#{SiSU_lib}/shared_metadata" # shared_metadata.rb + require_relative 'shared_metadata' # shared_metadata.rb @tex_file=@@tex_footnote_array=@@tex_col_w=[] @@tabular="{tabular}" @@column_instruct=@@squigle_close=@@tex_line_mode=@@tex_word_mode=@@line_mode='' @@ -74,10 +74,10 @@ module SiSU_TeX @@date ||=SiSU_Env::Info_date.new class Source require 'pstore' - require "#{SiSU_lib}/sysenv" # sysenv.rb + require_relative 'sysenv' # sysenv.rb include SiSU_Env include SiSU_Viz - require "#{SiSU_lib}/dal" # dal.rb + require_relative 'dal' # dal.rb include SiSU_DAL include SiSU_TeX def initialize(opt) diff --git a/lib/sisu/v3/texpdf_format.rb b/lib/sisu/v3/texpdf_format.rb index 559c3060..d2afa5bd 100644 --- a/lib/sisu/v3/texpdf_format.rb +++ b/lib/sisu/v3/texpdf_format.rb @@ -79,7 +79,7 @@ module SiSU_TeX_Pdf end class Format_text_object require 'iconv' - require "#{SiSU_lib}/defaults" # defaults.rb + require_relative 'defaults' # defaults.rb attr_accessor :string,:string1,:orientation,:url,:dir,:tex @@sys=SiSU_Env::System_call.new @@tex_pattern_margin_number=/\\begin\{tiny\}\\hspace\{0mm\}\\end\{tiny\}\{\\marginpar.+?\}\}\}/ @@ -612,7 +612,7 @@ module SiSU_TeX_Pdf end end class Format_head - require "#{SiSU_lib}/i18n" # defaults.rb + require_relative 'i18n' # defaults.rb def initialize(md,t_o) @md,@t_o=md,t_o @env=SiSU_Env::Info_env.new(@md.fns) diff --git a/lib/sisu/v3/update.rb b/lib/sisu/v3/update.rb index 82a241b2..7c35a5aa 100644 --- a/lib/sisu/v3/update.rb +++ b/lib/sisu/v3/update.rb @@ -57,7 +57,7 @@ =end module SiSU_Update_control_flag - require "#{SiSU_lib}/sysenv" # sysenv.rb + require_relative 'sysenv' # sysenv.rb include SiSU_Env include SiSU_Param class Check diff --git a/lib/sisu/v3/urls.rb b/lib/sisu/v3/urls.rb index fbee0eb5..65e00f52 100644 --- a/lib/sisu/v3/urls.rb +++ b/lib/sisu/v3/urls.rb @@ -57,9 +57,9 @@ =end module SiSU_urls - require "#{SiSU_lib}/particulars" # particulars.rb + require_relative 'particulars' # particulars.rb include SiSU_Particulars - require "#{SiSU_lib}/sysenv" # sysenv.rb + require_relative 'sysenv' # sysenv.rb include SiSU_Env; include SiSU_Screen class Source attr_reader :opt diff --git a/lib/sisu/v3/webrick.rb b/lib/sisu/v3/webrick.rb index a20111d4..fbe5bda3 100644 --- a/lib/sisu/v3/webrick.rb +++ b/lib/sisu/v3/webrick.rb @@ -85,7 +85,7 @@ begin # require 'time' require 'fileutils' include FileUtils - require "#{SiSU_lib}/sysenv" # sysenv.rb + require_relative 'sysenv' # sysenv.rb include SiSU_Env; include SiSU_Screen @cX=SiSU_Screen::Ansi.new('yes').cX @env=SiSU_Env::Info_env.new @@ -169,7 +169,7 @@ WOK get=@argv.shift if @argv[0] =~/pwd/ #% argv brick(@port,get) rescue; - require "#{SiSU_lib}/sysenv" # sysenv.rb + require_relative 'sysenv' # sysenv.rb SiSU_Errors::Info_error.new($!,$@,'-W',nil).error #fix ensure end diff --git a/lib/sisu/v3/wikispeak.rb b/lib/sisu/v3/wikispeak.rb index ea8197ba..33cf65bc 100644 --- a/lib/sisu/v3/wikispeak.rb +++ b/lib/sisu/v3/wikispeak.rb @@ -57,14 +57,14 @@ =end module SiSU_Wikispeak - require "#{SiSU_lib}/dal" # dal.rb - require "#{SiSU_lib}/sysenv" # sysenv.rb + require_relative 'dal' # dal.rb + require_relative 'sysenv' # sysenv.rb include SiSU_Env include SiSU_Param include SiSU_Viz - require "#{SiSU_lib}/plaintext_format" # plaintext_format.rb + require_relative 'plaintext_format' # plaintext_format.rb include Format - require "#{SiSU_lib}/shared_txt" + require_relative 'shared_txt' pwd=Dir.pwd @@alt_id_count,@@alt_id_count,@@tablehead,@@number_of_cols=0,0,0,0 @@tablefoot='' @@ -92,7 +92,7 @@ module SiSU_Wikispeak end private class Split_text_object [],:open=>[],:close=>[],:head=>[],:metadata=>[],:tail=>[],:endnotes=>[] } diff --git a/lib/sisu/v3/xhtml.rb b/lib/sisu/v3/xhtml.rb index 0ed9af9e..ab1156e1 100644 --- a/lib/sisu/v3/xhtml.rb +++ b/lib/sisu/v3/xhtml.rb @@ -57,19 +57,19 @@ ** Notes: tidy -xml scroll.xhtml >> index.tidy =end module SiSU_XHTML - require "#{SiSU_lib}/defaults" # defaults.rb + require_relative 'defaults' # defaults.rb include SiSU_Viz - require "#{SiSU_lib}/particulars" # particulars.rb + require_relative 'particulars' # particulars.rb include SiSU_Particulars - require "#{SiSU_lib}/sysenv" # sysenv.rb + require_relative 'sysenv' # sysenv.rb include SiSU_Env - require "#{SiSU_lib}/shared_xml" # shared_xml.rb + require_relative 'shared_xml' # shared_xml.rb include SiSU_XML_munge - require "#{SiSU_lib}/xml_format" # xml_format.rb + require_relative 'xml_format' # xml_format.rb include SiSU_XML_format - require "#{SiSU_lib}/rexml" # rexml.rb + require_relative 'rexml' # rexml.rb include SiSU_Rexml - require "#{SiSU_lib}/shared_metadata" # shared_metadata.rb + require_relative 'shared_metadata' # shared_metadata.rb @@alt_id_count,@@tablehead,@@number_of_cols=0,0,0 @@tablefoot='' class Source @@ -115,10 +115,10 @@ module SiSU_XHTML end end class Scroll - require "#{SiSU_lib}/shared_xhtml" # shared_xhtml.rb #check already called - require "#{SiSU_lib}/shared_txt" # shared_txt.rb + require_relative 'shared_xhtml' # shared_xhtml.rb #check already called + require_relative 'shared_txt' # shared_txt.rb include SiSU_text_utils - require "#{SiSU_lib}/css" # css.rb + require_relative 'css' # css.rb @@xml={ :body=>[],:sisu=>[],:open=>[],:close=>[],:head=>[] } def initialize(particulars) @env,@md,@dal_array=particulars.env,particulars.md,particulars.dal_array diff --git a/lib/sisu/v3/xhtml_table.rb b/lib/sisu/v3/xhtml_table.rb index be007889..8aa0f753 100644 --- a/lib/sisu/v3/xhtml_table.rb +++ b/lib/sisu/v3/xhtml_table.rb @@ -57,7 +57,7 @@ =end module SiSU_XHTML_table - require "#{SiSU_lib}/defaults" # defaults.rb + require_relative 'defaults' # defaults.rb class Table_xhtml @@tablehead=0 @@tablefoot=[] #watch diff --git a/lib/sisu/v3/xml.rb b/lib/sisu/v3/xml.rb index ff83b47f..e5cc9374 100644 --- a/lib/sisu/v3/xml.rb +++ b/lib/sisu/v3/xml.rb @@ -57,19 +57,19 @@ =end module SiSU_XML_SAX - require "#{SiSU_lib}/defaults" # defaults.rb + require_relative 'defaults' # defaults.rb include SiSU_Viz - require "#{SiSU_lib}/particulars" # particulars.rb + require_relative 'particulars' # particulars.rb include SiSU_Particulars - require "#{SiSU_lib}/sysenv" # sysenv.rb + require_relative 'sysenv' # sysenv.rb include SiSU_Env - require "#{SiSU_lib}/shared_xml" # shared_xml.rb + require_relative 'shared_xml' # shared_xml.rb include SiSU_XML_munge - require "#{SiSU_lib}/xml_format" # xml_format.rb + require_relative 'xml_format' # xml_format.rb include SiSU_XML_format - require "#{SiSU_lib}/rexml" # rexml.rb + require_relative 'rexml' # rexml.rb include SiSU_Rexml - require "#{SiSU_lib}/shared_metadata" # shared_metadata.rb + require_relative 'shared_metadata' # shared_metadata.rb @@alt_id_count,@@tablehead,@@number_of_cols=0,0,0 @@tablefoot='' class Source @@ -115,10 +115,10 @@ module SiSU_XML_SAX end end class Scroll - require "#{SiSU_lib}/shared_txt" # shared_txt.rb + require_relative 'shared_txt' # shared_txt.rb include SiSU_text_utils - require "#{SiSU_lib}/css" # css.rb - require "#{SiSU_lib}/shared_xhtml" # decide use, whether xml rather than xhtml + require_relative 'css' # css.rb + require_relative 'shared_xhtml' # decide use, whether xml rather than xhtml @@xml={ :body=>[],:open=>[],:close=>[],:head=>[] } def initialize(particulars) @env,@md,@dal_array=particulars.env,particulars.md,particulars.dal_array diff --git a/lib/sisu/v3/xml_dom.rb b/lib/sisu/v3/xml_dom.rb index eb69df2d..ea792b04 100644 --- a/lib/sisu/v3/xml_dom.rb +++ b/lib/sisu/v3/xml_dom.rb @@ -54,20 +54,20 @@ ** Notes: tidy -xml dom.xml >> index.tidy =end module SiSU_XML_DOM - require "#{SiSU_lib}/defaults" # defaults.rb + require_relative 'defaults' # defaults.rb include SiSU_Viz - require "#{SiSU_lib}/particulars" # particulars.rb + require_relative 'particulars' # particulars.rb include SiSU_Particulars - require "#{SiSU_lib}/sysenv" # sysenv.rb + require_relative 'sysenv' # sysenv.rb include SiSU_Env - require "#{SiSU_lib}/dal" # dal.rb - require "#{SiSU_lib}/shared_xml" # shared_xml.rb + require_relative 'dal' # dal.rb + require_relative 'shared_xml' # shared_xml.rb include SiSU_XML_munge - require "#{SiSU_lib}/xml_format" # xml_format.rb + require_relative 'xml_format' # xml_format.rb include SiSU_XML_format - require "#{SiSU_lib}/rexml" # rexml.rb + require_relative 'rexml' # rexml.rb include SiSU_Rexml - require "#{SiSU_lib}/shared_metadata" # shared_metadata.rb + require_relative 'shared_metadata' # shared_metadata.rb @@alt_id_count,@@tablehead,@@number_of_cols=0,0,0 @@tablefoot='' class Source @@ -112,9 +112,9 @@ module SiSU_XML_DOM end end class Scroll - require "#{SiSU_lib}/shared_txt" # shared_txt.rb + require_relative 'shared_txt' # shared_txt.rb include SiSU_text_utils - require "#{SiSU_lib}/shared_xhtml" # decide use, whether xml rather than xhtml + require_relative 'shared_xhtml' # decide use, whether xml rather than xhtml @@xml={ :body=>[],:open=>[],:close=>[],:head=>[],:sc=>[] } def initialize(particulars) @env,@md,@dal_array=particulars.env,particulars.md,particulars.dal_array diff --git a/lib/sisu/v3/xml_fictionbook.rb b/lib/sisu/v3/xml_fictionbook.rb index 7d2620aa..09a9e5aa 100644 --- a/lib/sisu/v3/xml_fictionbook.rb +++ b/lib/sisu/v3/xml_fictionbook.rb @@ -57,12 +57,12 @@ =end module SiSU_XML_Fictionbook - require "#{SiSU_lib}/dal" # dal.rb - require "#{SiSU_lib}/sysenv" # sysenv.rb + require_relative 'dal' # dal.rb + require_relative 'sysenv' # sysenv.rb include SiSU_Env - require "#{SiSU_lib}/shared_txt" # shared_txt.rb + require_relative 'shared_txt' # shared_txt.rb include SiSU_text_utils - require "#{SiSU_lib}/shared_xml" # shared_xml.rb + require_relative 'shared_xml' # shared_xml.rb include SiSU_XML_munge include SiSU_Param pwd=Dir.pwd diff --git a/lib/sisu/v3/xml_format.rb b/lib/sisu/v3/xml_format.rb index b78c23c0..dd41a094 100644 --- a/lib/sisu/v3/xml_format.rb +++ b/lib/sisu/v3/xml_format.rb @@ -58,7 +58,7 @@ =end module SiSU_XML_format - require "#{SiSU_lib}/param" # param.rb + require_relative 'param' # param.rb include SiSU_Param include SiSU_Viz class Paragraph_number diff --git a/lib/sisu/v3/xml_md_oai_pmh_dc.rb b/lib/sisu/v3/xml_md_oai_pmh_dc.rb index 23b64e8c..392be4fd 100644 --- a/lib/sisu/v3/xml_md_oai_pmh_dc.rb +++ b/lib/sisu/v3/xml_md_oai_pmh_dc.rb @@ -57,9 +57,9 @@ =end module SiSU_XML_metadata - require "#{SiSU_lib}/sysenv" # sysenv.rb + require_relative 'sysenv' # sysenv.rb include SiSU_Env - require "#{SiSU_lib}/param" # param.rb + require_relative 'param' # param.rb include SiSU_Param class OAI_PMH def initialize(opt) diff --git a/lib/sisu/v3/xml_scaffold.rb b/lib/sisu/v3/xml_scaffold.rb index 20e59f19..1e423bea 100644 --- a/lib/sisu/v3/xml_scaffold.rb +++ b/lib/sisu/v3/xml_scaffold.rb @@ -57,10 +57,10 @@ =end module SiSU_XML_scaffold - require "#{SiSU_lib}/particulars" # particulars.rb + require_relative 'particulars' # particulars.rb include SiSU_Particulars - require "#{SiSU_lib}/dal" # dal.rb - require "#{SiSU_lib}/sysenv" # sysenv.rb + require_relative 'dal' # dal.rb + require_relative 'sysenv' # sysenv.rb include SiSU_Env pwd=Dir.pwd class Source diff --git a/lib/sisu/v3/xml_tables.rb b/lib/sisu/v3/xml_tables.rb index 7ff4da98..c762a282 100644 --- a/lib/sisu/v3/xml_tables.rb +++ b/lib/sisu/v3/xml_tables.rb @@ -57,7 +57,7 @@ =end module SiSU_Tables - require "#{SiSU_lib}/defaults" # defaults.rb + require_relative 'defaults' # defaults.rb include SiSU_Viz class Table #_xml @@tablehead=0 diff --git a/lib/sisu/v3/zap.rb b/lib/sisu/v3/zap.rb index 57aaaa5f..1cb176d0 100644 --- a/lib/sisu/v3/zap.rb +++ b/lib/sisu/v3/zap.rb @@ -57,7 +57,7 @@ =end module SiSU_Zap - require "#{SiSU_lib}/sysenv" # sysenv.rb + require_relative 'sysenv' # sysenv.rb include SiSU_Env pwd=Dir.pwd class Source -- cgit v1.2.3