From 71badaf7b2374edcc05268ee79db2fbfd2d7fbb1 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 5 Dec 2014 23:41:05 -0500 Subject: c&d: version & branch info, changes related to move of lib dirs --- lib/sisu/current/constants.rb | 4 ++-- lib/sisu/current/se_get_init.rb | 16 ++++++++-------- lib/sisu/current/se_info_env.rb | 3 ++- lib/sisu/current/se_info_system.rb | 2 +- lib/sisu/current/se_version.rb | 5 ++++- lib/sisu/develop/constants.rb | 6 +++--- lib/sisu/develop/se_get_init.rb | 34 ++++++++++++++++++++++------------ lib/sisu/develop/se_info_env.rb | 7 ------- lib/sisu/develop/se_info_system.rb | 2 +- lib/sisu/develop/se_version.rb | 8 ++++---- 10 files changed, 47 insertions(+), 40 deletions(-) (limited to 'lib') diff --git a/lib/sisu/current/constants.rb b/lib/sisu/current/constants.rb index 73534567..aa0b368e 100644 --- a/lib/sisu/current/constants.rb +++ b/lib/sisu/current/constants.rb @@ -260,8 +260,8 @@ else } end Db={ - name_prefix: "SiSU#{SiSU_is[:version_dir]}c_", - name_prefix_db: "sisu_#{SiSU_is[:version_dir]}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_get_init.rb b/lib/sisu/current/se_get_init.rb index a6e30edc..478bc3a2 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[:version_dir]}", + "#{$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[:version_dir]}", + "#{$sisu_document_markup_directory_base_fixed_path}/_sisu/#{SiSU_is[:branch_version]}", "#{$sisu_document_markup_directory_base_fixed_path}/_sisu", - "#{@@home}/.sisu/#{SiSU_is[:version_dir]}", + "#{@@home}/.sisu/#{SiSU_is[:branch_version]}", "#{@@home}/.sisu", - "#{@@sisu_etc}/#{SiSU_is[:version_dir]}", + "#{@@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[:version_dir]}/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[:version_dir]}/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[:version_dir]}/skin/yml", + "#{@@home}/.sisu/#{SiSU_is[:branch_version]}/skin/yml", "#{@@home}/.sisu/skin/yml", - "#{@@sisu_etc}/#{SiSU_is[:version_dir]}/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 42288f7e..8917a1d2 100644 --- a/lib/sisu/current/se_info_env.rb +++ b/lib/sisu/current/se_info_env.rb @@ -2104,7 +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[:version_dir]}/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 62fe4d6d..6fe0e33a 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[:version_dir] + 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 59b2e4eb..834c9aed 100644 --- a/lib/sisu/current/se_version.rb +++ b/lib/sisu/current/se_version.rb @@ -88,10 +88,13 @@ module SiSU_Info_Version @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[:version_dir]}/,'')) == 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_number]=/^v([0-9]+)$/.match(@version[:branch_version])[1] @version end def rbversion diff --git a/lib/sisu/develop/constants.rb b/lib/sisu/develop/constants.rb index 072f5085..ae086b88 100644 --- a/lib/sisu/develop/constants.rb +++ b/lib/sisu/develop/constants.rb @@ -260,8 +260,8 @@ else } end Db={ - name_prefix: "SiSU#{SiSU_is[:version_dir]}c_", - name_prefix_db: "sisu_#{SiSU_is[:version_dir]}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, @@ -352,7 +352,7 @@ check: #˝ " λ Ω β α π Ѫ Ж Я Ѳ ѳ Ф ✠ ㈣ Ѳ ѳ Ф ♩ ♭  ✠  ▭ ▬ ▪ -【】〖〗◢ ◣ ◀ ▶ ◘ ◙ +【】〖〗◢ ◣ ◀ ▶ ◘ ◙ « ▲ » 《》「」 ‹ › ∗  ∴ ∷ '〔lv1〕','〔lv2〕','〔lv3〕','〔lv4〕','〔lv5〕','〔lv6〕','〔lv7〕','〔lv8〕','〔lv9〕' diff --git a/lib/sisu/develop/se_get_init.rb b/lib/sisu/develop/se_get_init.rb index 9bdafae3..569ea95e 100644 --- a/lib/sisu/develop/se_get_init.rb +++ b/lib/sisu/develop/se_get_init.rb @@ -81,30 +81,36 @@ module SiSU_Get_Init def rc_path_options v=SiSU_Env::InfoVersion.instance.get_version [ - $sisu_document_markup_directory_base_fixed_path \ - + '/.sisu/v' \ - + v[:branch_number], $sisu_document_markup_directory_base_fixed_path \ + '/.sisu/' \ + v[:branch_name], $sisu_document_markup_directory_base_fixed_path \ - + '/.sisu', + + '/.sisu/' \ + + v[:branch_version], $sisu_document_markup_directory_base_fixed_path \ - + '/_sisu/v' \ - + v[:branch_number], + + '/.sisu', $sisu_document_markup_directory_base_fixed_path \ + '/_sisu/' \ + v[:branch_name], $sisu_document_markup_directory_base_fixed_path \ + + '/_sisu/' \ + + v[:branch_version], + $sisu_document_markup_directory_base_fixed_path \ + '/_sisu', @@home \ + '/.sisu/' \ - + SiSU_is[:version_dir], + + v[:branch_name], + @@home \ + + '/.sisu/' \ + + v[:branch_version], @@home \ + '/.sisu', \ @@sisu_etc \ + '/' \ - + SiSU_is[:version_dir], + + v[:branch_name], + @@sisu_etc \ + + '/' \ + + v[:branch_version], @@sisu_etc, ] end @@ -185,13 +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[:version_dir]}/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[:version_dir]}/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[:version_dir]}/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[:version_dir]}/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_env.rb b/lib/sisu/develop/se_info_env.rb index 992d978e..3a2329dd 100644 --- a/lib/sisu/develop/se_info_env.rb +++ b/lib/sisu/develop/se_info_env.rb @@ -2100,13 +2100,6 @@ WOK ? @rc['default']['papersize'].downcase : (defaults[:papersize].downcase) end - def odf_structure - 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[:version_dir]}/odf/odt.zip -d #{processing_path.odf_pth}" - ) - end def sisupod_gen(fns_pod) sisupod_gen_v3(fns_pod) end diff --git a/lib/sisu/develop/se_info_system.rb b/lib/sisu/develop/se_info_system.rb index c616ec47..1c5019b2 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[:version_dir] + 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 b0bb693c..04c61c32 100644 --- a/lib/sisu/develop/se_version.rb +++ b/lib/sisu/develop/se_version.rb @@ -88,13 +88,13 @@ module SiSU_Info_Version 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[:version_dir]}/,'')) == gem_root) \ + (File.dirname(__FILE__.gsub(/\/lib\/sisu\/#{SiSU_is[:branch_name]}/,'')) == gem_root) \ ? ' (ruby gem install)' : '' else '' end - version[:branch_name]=SiSU_is[:version_dir] - version[:branch]=version[:branch_name] - version[:branch_number]=/^([0-9]+)\./.match(version[:version])[1] + 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 def rbversion -- cgit v1.2.3