From 802bf61f72cf3cff29298b1816a79bb2b8d1dacf Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sun, 11 Jan 2015 21:18:06 -0500 Subject: bin/sisu + c&d: SiSU_is now methods (instead of hash) --- bin/sisu | 51 +++++++++++++++++++++++++++++++++++---------------- 1 file changed, 35 insertions(+), 16 deletions(-) (limited to 'bin') diff --git a/bin/sisu b/bin/sisu index 80436d2a..b5751d66 100644 --- a/bin/sisu +++ b/bin/sisu @@ -90,7 +90,7 @@ class Orient self end def sisu_lib - "sisu/#{branch_name?}" + "sisu/#{branch_name_}" end def sisu_path_lib if sisu_path_specified_lib \ @@ -102,7 +102,7 @@ class Orient def sisu_version_info_path "#{sisu_path_base_system_data}/version/#{branch_name?}.yml" end - def branch_name? + def branch_name_ if sisu_run_from? == :full_path_to_sisu_bin_in_sisu_dir_tree \ or sisu_run_from? == :system_install case processing.called_as @@ -124,7 +124,7 @@ class Orient else processing.current end end - def branch_version? + def branch_version_ if sisu_run_from? == :full_path_to_sisu_bin_in_sisu_dir_tree \ or sisu_run_from? == :system_install case processing.called_as @@ -205,18 +205,37 @@ class Orient self end def sisu_is - { - run_from: sisu_run_from?, - branch_name: branch_name?, - branch_version: branch_version?, - path_base: sisu_path_base, - path_base_system_data: sisu_path_base_system_data, - path_lib: sisu_path_lib, - version_info_path: sisu_version_info_path, - language_list: language_list.codes, - language_list_regex: language_list.regex, - called_from: sisu_called_from_directory, - } + def run_from? + sisu_run_from? + end + def branch_name? + branch_name_ + end + def branch_version? + branch_version_ + end + def path_base? + sisu_path_base + end + def path_base_system_data? + sisu_path_base_system_data + end + def path_lib? + sisu_path_lib + end + def version_info_path? + sisu_version_info_path + end + def language_list? + language_list.codes + end + def language_list_regex? + language_list.regex + end + def called_from? + sisu_called_from_directory + end + self end def get_processing_info def sortout @@ -258,7 +277,7 @@ class Orient self end def control - require "#{sisu_is[:path_lib]}/hub" + require "#{sisu_is.path_lib?}/hub" sisu_called_from_directory begin if get_processing_info.processing_files.length > 0 -- cgit v1.2.3