summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2015-01-12 02:18:06 +0000
committerRalph Amissah <ralph@amissah.com>2015-01-20 04:46:16 +0000
commit802bf61f72cf3cff29298b1816a79bb2b8d1dacf (patch)
tree4336251d54a99e80c8e2412e8ff561d04aefdc86 /lib
parentbin + c&d: RbConfig (instead of Config, switch) (diff)
downloadsisu-802bf61f72cf3cff29298b1816a79bb2b8d1dacf.zip
sisu-802bf61f72cf3cff29298b1816a79bb2b8d1dacf.tar.xz
bin/sisu + c&d: SiSU_is now methods (instead of hash)
Diffstat (limited to 'lib')
-rw-r--r--lib/sisu/current/constants.rb8
-rw-r--r--lib/sisu/current/se_createsite.rb2
-rw-r--r--lib/sisu/current/se_get_init.rb16
-rw-r--r--lib/sisu/current/se_info_env.rb4
-rw-r--r--lib/sisu/current/se_info_system.rb2
-rw-r--r--lib/sisu/current/se_version.rb12
-rw-r--r--lib/sisu/current/shared_images.rb2
-rw-r--r--lib/sisu/develop/constants.rb8
-rw-r--r--lib/sisu/develop/se_createsite.rb2
-rw-r--r--lib/sisu/develop/se_get_init.rb16
-rw-r--r--lib/sisu/develop/se_info_system.rb2
-rw-r--r--lib/sisu/develop/se_version.rb12
-rw-r--r--lib/sisu/develop/shared_images.rb2
13 files changed, 44 insertions, 44 deletions
diff --git a/lib/sisu/current/constants.rb b/lib/sisu/current/constants.rb
index aa0b368..7a23027 100644
--- a/lib/sisu/current/constants.rb
+++ b/lib/sisu/current/constants.rb
@@ -230,8 +230,8 @@ Px={
po_subscript_o: ',{', po_subscript_c: '},',
po_hilite_o: '*{', po_hilite_c: '}*',
po_monospace_o: '#{', po_monospace_c: '}#',
- lng_lst: SiSU_is[:language_list],
- lng_lst_rgx: SiSU_is[:language_list_regex],
+ lng_lst: SiSU_is.language_list?,
+ lng_lst_rgx: SiSU_is.language_list_regex?,
lv1: '*',
lv2: '=',
lv3: '=',
@@ -260,8 +260,8 @@ else
}
end
Db={
- name_prefix: "SiSU#{SiSU_is[:branch_version]}c_",
- name_prefix_db: "sisu_#{SiSU_is[:branch_version]}c_",
+ name_prefix: "SiSU#{SiSU_is.branch_version?}c_",
+ name_prefix_db: "sisu_#{SiSU_is.branch_version?}c_",
col_title: 800,
col_title_part: 400,
col_title_edition: 10,
diff --git a/lib/sisu/current/se_createsite.rb b/lib/sisu/current/se_createsite.rb
index 591c0d3..2d20007 100644
--- a/lib/sisu/current/se_createsite.rb
+++ b/lib/sisu/current/se_createsite.rb
@@ -163,7 +163,7 @@ module SiSU_Create_Site
cp_images(src,dest) if FileTest.directory?(src)
end
def cp_base_images #fix images
- src=SiSU_is[:path_base_system_data] + '/image'
+ src=SiSU_is.path_base_system_data? + '/image'
dest_arr=[
"#{@env.path.webserv}/_sisu/image_sys",
"#{@env.path.webserv}/#{@env.path.base_markup_dir_stub}/_sisu/image_sys"
diff --git a/lib/sisu/current/se_get_init.rb b/lib/sisu/current/se_get_init.rb
index 478bc3a..a299cd1 100644
--- a/lib/sisu/current/se_get_init.rb
+++ b/lib/sisu/current/se_get_init.rb
@@ -80,13 +80,13 @@ module SiSU_Get_Init
end
def rc_path_options
[
- "#{$sisu_document_markup_directory_base_fixed_path}/.sisu/#{SiSU_is[:branch_version]}",
+ "#{$sisu_document_markup_directory_base_fixed_path}/.sisu/#{SiSU_is.branch_version?}",
"#{$sisu_document_markup_directory_base_fixed_path}/.sisu",
- "#{$sisu_document_markup_directory_base_fixed_path}/_sisu/#{SiSU_is[:branch_version]}",
+ "#{$sisu_document_markup_directory_base_fixed_path}/_sisu/#{SiSU_is.branch_version?}",
"#{$sisu_document_markup_directory_base_fixed_path}/_sisu",
- "#{@@home}/.sisu/#{SiSU_is[:branch_version]}",
+ "#{@@home}/.sisu/#{SiSU_is.branch_version?}",
"#{@@home}/.sisu",
- "#{@@sisu_etc}/#{SiSU_is[:branch_version]}",
+ "#{@@sisu_etc}/#{SiSU_is.branch_version?}",
"#{@@sisu_etc}",
]
end
@@ -167,13 +167,13 @@ module SiSU_Get_Init
tell_no_yaml='WARNING - YAML loading switched off, to enable delete the file:'
if @markup_dir_changed_
@ad_path=[
- "#{$sisu_document_markup_directory_base_fixed_path}/.sisu/#{SiSU_is[:branch_version]}/skin/yml",
+ "#{$sisu_document_markup_directory_base_fixed_path}/.sisu/#{SiSU_is.branch_version?}/skin/yml",
"#{$sisu_document_markup_directory_base_fixed_path}/.sisu/skin/yml",
- "#{$sisu_document_markup_directory_base_fixed_path}/_sisu/#{SiSU_is[:branch_version]}/skin/yml",
+ "#{$sisu_document_markup_directory_base_fixed_path}/_sisu/#{SiSU_is.branch_version?}/skin/yml",
"#{$sisu_document_markup_directory_base_fixed_path}/_sisu/skin/yml",
- "#{@@home}/.sisu/#{SiSU_is[:branch_version]}/skin/yml",
+ "#{@@home}/.sisu/#{SiSU_is.branch_version?}/skin/yml",
"#{@@home}/.sisu/skin/yml",
- "#{@@sisu_etc}/#{SiSU_is[:branch_version]}/skin/yml",
+ "#{@@sisu_etc}/#{SiSU_is.branch_version?}/skin/yml",
"#{@@sisu_etc}/skin/yml",
]
@ad_path.each do |v|
diff --git a/lib/sisu/current/se_info_env.rb b/lib/sisu/current/se_info_env.rb
index 276f14e..0ddac47 100644
--- a/lib/sisu/current/se_info_env.rb
+++ b/lib/sisu/current/se_info_env.rb
@@ -2104,8 +2104,8 @@ WOK
FileUtils::rm_rf(processing_path.processing_path.odf_pth)
FileUtils::mkdir_p(processing_path.processing_path.odf_pth)
system(
- "unzip -q #{path.share}/#{SiSU_is[:branch_name]}/odf/odt.zip -d #{processing_path.odf_pth}"
- #"unzip -q #{path.share}/#{SiSU_is[:branch_version]}/odf/odt.zip -d #{processing_path.odf_pth}"
+ "unzip -q #{path.share}/#{SiSU_is.branch_name?}/odf/odt.zip -d #{processing_path.odf_pth}"
+ #"unzip -q #{path.share}/#{SiSU_is.branch_version?}/odf/odt.zip -d #{processing_path.odf_pth}"
)
end
def sisupod_gen(fns_pod)
diff --git a/lib/sisu/current/se_info_system.rb b/lib/sisu/current/se_info_system.rb
index d1c9380..969b508 100644
--- a/lib/sisu/current/se_info_system.rb
+++ b/lib/sisu/current/se_info_system.rb
@@ -73,7 +73,7 @@ module SiSU_Info_Sys_Gen
m=/.+\/(?:src\/)?(\S+)/m # m=/.+?\/(?:src\/)?([^\/]+)$/im # m=/.+\/(\S+)/m
@stub_pwd ||=@@pwd[m,1]
@base_markup_dir_stub=SiSU_Utils::Path.new.base_markup_stub
- prcss_dir='_sisu_processing_' + '.' + SiSU_is[:branch_version]
+ prcss_dir='_sisu_processing_' + '.' + SiSU_is.branch_version?
prcss_dir_tmp_root="/tmp/#{prcss_dir}"
prcss_dir_stub="#{prcss_dir}/#{@stub_pwd}"
if @@user
diff --git a/lib/sisu/current/se_version.rb b/lib/sisu/current/se_version.rb
index 834c9ae..156b440 100644
--- a/lib/sisu/current/se_version.rb
+++ b/lib/sisu/current/se_version.rb
@@ -82,18 +82,18 @@ module SiSU_Info_Version
? @@lib_path
: `echo $RUBYLIB`.split(':')
@@lib_path ||=lib_path
- if File.exist?(SiSU_is[:version_info_path])
- @version=YAML::load(File::open(SiSU_is[:version_info_path]))
+ if File.exist?(SiSU_is.version_info_path?)
+ @version=YAML::load(File::open(SiSU_is.version_info_path?))
end
- @version[:install_method]=if SiSU_is[:run_from]==:gem_install
+ @version[:install_method]=if SiSU_is.run_from? ==:gem_install
spec = Gem::Specification.find_by_name("sisu")
gem_root = spec.gem_dir
- (File.dirname(__FILE__.gsub(/\/lib\/sisu\/#{SiSU_is[:branch_name]}/,'')) == gem_root) \
+ (File.dirname(__FILE__.gsub(/\/lib\/sisu\/#{SiSU_is.branch_name?}/,'')) == gem_root) \
? ' (ruby gem install)' : ''
else ''
end
- @version[:branch_name]=SiSU_is[:branch_name]
- @version[:branch_version]=SiSU_is[:branch_version]
+ @version[:branch_name]=SiSU_is.branch_name?
+ @version[:branch_version]=SiSU_is.branch_version?
@version[:branch_number]=/^v([0-9]+)$/.match(@version[:branch_version])[1]
@version
end
diff --git a/lib/sisu/current/shared_images.rb b/lib/sisu/current/shared_images.rb
index 4357b0a..6d24494 100644
--- a/lib/sisu/current/shared_images.rb
+++ b/lib/sisu/current/shared_images.rb
@@ -125,7 +125,7 @@ module SiSU_Images
end
def select_sisu_base
images=%w[arrow_next_red.png arrow_prev_red.png arrow_up_red.png dot_clear.png dot_white.png b_doc.png b_epub.png b_odf.png b_pdf.png b_toc.png]
- src_path="#{SiSU_is[:path_base_system_data]}/image"
+ src_path="#{SiSU_is.path_base_system_data?}/image"
dest=dest_path(:image_sys)
copy(src_path,dest,images)
end
diff --git a/lib/sisu/develop/constants.rb b/lib/sisu/develop/constants.rb
index 8f108b7..0c4c258 100644
--- a/lib/sisu/develop/constants.rb
+++ b/lib/sisu/develop/constants.rb
@@ -241,8 +241,8 @@ Px={
subscript_o: '[', subscript_c: ']',
hilite_o: '*', hilite_c: '*',
monospace_o: '', monospace_c: '',
- lng_lst: SiSU_is[:language_list],
- lng_lst_rgx: SiSU_is[:language_list_regex],
+ lng_lst: SiSU_is.language_list?,
+ lng_lst_rgx: SiSU_is.language_list_regex?,
lv1: '*',
lv2: '=',
lv3: '=',
@@ -271,8 +271,8 @@ else
}
end
Db={
- name_prefix: "SiSU#{SiSU_is[:branch_version]}c_",
- name_prefix_db: "sisu_#{SiSU_is[:branch_version]}c_",
+ name_prefix: "SiSU#{SiSU_is.branch_version?}c_",
+ name_prefix_db: "sisu_#{SiSU_is.branch_version?}c_",
col_title: 800,
col_title_part: 400,
col_title_edition: 10,
diff --git a/lib/sisu/develop/se_createsite.rb b/lib/sisu/develop/se_createsite.rb
index d221062..4981eda 100644
--- a/lib/sisu/develop/se_createsite.rb
+++ b/lib/sisu/develop/se_createsite.rb
@@ -163,7 +163,7 @@ module SiSU_Create_Site
cp_images(src,dest) if FileTest.directory?(src)
end
def cp_base_images #fix images
- src=SiSU_is[:path_base_system_data] + '/image'
+ src=SiSU_is.path_base_system_data? + '/image'
dest_arr=[
"#{@env.path.webserv}/_sisu/image_sys",
"#{@env.path.webserv}/#{@env.path.base_markup_dir_stub}/_sisu/image_sys"
diff --git a/lib/sisu/develop/se_get_init.rb b/lib/sisu/develop/se_get_init.rb
index 0434aea..dd767d0 100644
--- a/lib/sisu/develop/se_get_init.rb
+++ b/lib/sisu/develop/se_get_init.rb
@@ -191,17 +191,17 @@ module SiSU_Get_Init
tell_no_yaml='WARNING - YAML loading switched off, to enable delete the file:'
if @markup_dir_changed_
@ad_path=[
- "#{$sisu_document_markup_directory_base_fixed_path}/.sisu/#{SiSU_is[:branch_name]}/skin/yml",
- "#{$sisu_document_markup_directory_base_fixed_path}/.sisu/#{SiSU_is[:branch_version]}/skin/yml",
+ "#{$sisu_document_markup_directory_base_fixed_path}/.sisu/#{SiSU_is.branch_name?}/skin/yml",
+ "#{$sisu_document_markup_directory_base_fixed_path}/.sisu/#{SiSU_is.branch_version?}/skin/yml",
"#{$sisu_document_markup_directory_base_fixed_path}/.sisu/skin/yml",
- "#{$sisu_document_markup_directory_base_fixed_path}/_sisu/#{SiSU_is[:branch_name]}/skin/yml",
- "#{$sisu_document_markup_directory_base_fixed_path}/_sisu/#{SiSU_is[:branch_version]}/skin/yml",
+ "#{$sisu_document_markup_directory_base_fixed_path}/_sisu/#{SiSU_is.branch_name?}/skin/yml",
+ "#{$sisu_document_markup_directory_base_fixed_path}/_sisu/#{SiSU_is.branch_version?}/skin/yml",
"#{$sisu_document_markup_directory_base_fixed_path}/_sisu/skin/yml",
- "#{@@home}/.sisu/#{SiSU_is[:branch_name]}/skin/yml",
- "#{@@home}/.sisu/#{SiSU_is[:branch_version]}/skin/yml",
+ "#{@@home}/.sisu/#{SiSU_is.branch_name?}/skin/yml",
+ "#{@@home}/.sisu/#{SiSU_is.branch_version?}/skin/yml",
"#{@@home}/.sisu/skin/yml",
- "#{@@sisu_etc}/#{SiSU_is[:branch_name]}/skin/yml",
- "#{@@sisu_etc}/#{SiSU_is[:branch_version]}/skin/yml",
+ "#{@@sisu_etc}/#{SiSU_is.branch_name?}/skin/yml",
+ "#{@@sisu_etc}/#{SiSU_is.branch_version?}/skin/yml",
"#{@@sisu_etc}/skin/yml",
]
@ad_path.each do |v|
diff --git a/lib/sisu/develop/se_info_system.rb b/lib/sisu/develop/se_info_system.rb
index be9e9d4..e688395 100644
--- a/lib/sisu/develop/se_info_system.rb
+++ b/lib/sisu/develop/se_info_system.rb
@@ -73,7 +73,7 @@ module SiSU_Info_Sys_Gen
m=/.+\/(?:src\/)?(\S+)/m # m=/.+?\/(?:src\/)?([^\/]+)$/im # m=/.+\/(\S+)/m
@stub_pwd ||=@@pwd[m,1]
@base_markup_dir_stub=SiSU_Utils::Path.new.base_markup_stub
- prcss_dir='_sisu_processing_' + '.' + SiSU_is[:branch_version]
+ prcss_dir='_sisu_processing_' + '.' + SiSU_is.branch_version?
prcss_dir_tmp_root="/tmp/#{prcss_dir}"
prcss_dir_stub="#{prcss_dir}/#{@stub_pwd}"
if @@user
diff --git a/lib/sisu/develop/se_version.rb b/lib/sisu/develop/se_version.rb
index 2ace68c..860faee 100644
--- a/lib/sisu/develop/se_version.rb
+++ b/lib/sisu/develop/se_version.rb
@@ -82,16 +82,16 @@ module SiSU_Info_Version
? @@lib_path
: `echo $RUBYLIB`.split(':')
@@lib_path ||=lib_path
- if File.exist?(SiSU_is[:version_info_path])
- version=YAML::load(File::open(SiSU_is[:version_info_path]))
+ if File.exist?(SiSU_is.version_info_path?)
+ version=YAML::load(File::open(SiSU_is.version_info_path?))
end
- version[:branch_version]=SiSU_is[:branch_version]
+ version[:branch_version]=SiSU_is.branch_version?
version[:branch_number]=/^v([0-9]+)/.match(version[:branch_version])[1]
- version[:branch_name]=SiSU_is[:branch_name]
- version[:install_method]=if SiSU_is[:run_from]==:gem_install
+ version[:branch_name]=SiSU_is.branch_name?
+ version[:install_method]=if SiSU_is.run_from? ==:gem_install
spec = Gem::Specification.find_by_name("sisu")
gem_root = spec.gem_dir
- (File.dirname(__FILE__.gsub(/\/lib\/sisu\/#{SiSU_is[:branch_name]}/,'')) == gem_root) \
+ (File.dirname(__FILE__.gsub(/\/lib\/sisu\/#{SiSU_is.branch_name?}/,'')) == gem_root) \
? ' (ruby gem install)' : ''
else ''
end
diff --git a/lib/sisu/develop/shared_images.rb b/lib/sisu/develop/shared_images.rb
index a4f0421..e617676 100644
--- a/lib/sisu/develop/shared_images.rb
+++ b/lib/sisu/develop/shared_images.rb
@@ -125,7 +125,7 @@ module SiSU_Images
end
def select_sisu_base
images=%w[arrow_next_red.png arrow_prev_red.png arrow_up_red.png dot_clear.png dot_white.png b_doc.png b_epub.png b_odf.png b_pdf.png b_toc.png]
- src_path="#{SiSU_is[:path_base_system_data]}/image"
+ src_path="#{SiSU_is.path_base_system_data?}/image"
dest=dest_path(:image_sys)
copy(src_path,dest,images)
end