aboutsummaryrefslogtreecommitdiffhomepage
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rw-r--r--bin/sisu36
1 files changed, 23 insertions, 13 deletions
diff --git a/bin/sisu b/bin/sisu
index b5751d66..dc399737 100644
--- a/bin/sisu
+++ b/bin/sisu
@@ -30,11 +30,11 @@ class Orient
@@sisu_called_from_directory ||= Dir.pwd
end
def sisu_run_from?
- if processing.called_as == processing.file_full_path \
- and File.dirname(processing.file_full_path) != RbConfig::CONFIG['bindir']
+ if processing.called_as == processing.sisu_runtime_path \
+ and File.dirname(processing.sisu_runtime_path) != RbConfig::CONFIG['bindir']
:full_path_to_sisu_bin_in_sisu_dir_tree
- elsif processing.file_full_path =~/\/gems\// \
- and processing.file_full_path \
+ elsif processing.sisu_runtime_path =~/\/gems\// \
+ and processing.sisu_runtime_path \
=~ /\/sisu-[#{version.stable}#{version.unstable}]\.(?:\d+|[a-z])\.(?:\d+|[a-z])\//
:gem_install
else
@@ -51,7 +51,7 @@ class Orient
def argv_str
argv.inspect
end
- def file_full_path
+ def sisu_runtime_path
__FILE__
end
def stable
@@ -116,7 +116,7 @@ class Orient
end
end
elsif sisu_run_from? == :gem_install
- case processing.file_full_path
+ case processing.sisu_runtime_path
when processing.stable_gem_regex then processing.current
when processing.unstable_gem_regex then processing.next
else processing.current
@@ -138,7 +138,7 @@ class Orient
end
end
elsif sisu_run_from? == :gem_install
- case processing.file_full_path
+ case processing.sisu_runtime_path
when processing.stable_gem_regex then processing.stable
when processing.unstable_gem_regex then processing.unstable
else processing.stable
@@ -205,9 +205,15 @@ class Orient
self
end
def sisu_is
- def run_from?
+ def runtime_path?
+ sisu_runtime_path
+ end
+ def runtime_type?
sisu_run_from?
end
+ def called_from?
+ sisu_called_from_directory
+ end
def branch_name?
branch_name_
end
@@ -232,8 +238,12 @@ class Orient
def language_list_regex?
language_list.regex
end
- def called_from?
- sisu_called_from_directory
+ def runtime?
+ {
+ call_path: called_from?,
+ runtime_path: runtime_path?,
+ runtime_type: runtime_type?,
+ }
end
self
end
@@ -290,7 +300,7 @@ class Orient
Dir.chdir(markup_dir)
$sisu_document_markup_directory_base_fixed_path=
Dir.pwd.gsub(/\/(?:#{language_list.regex})$/,'')
- SiSU::HubMaster.new(argv_sub,sisu_called_from_directory)
+ SiSU::HubMaster.new(argv_sub,sisu_is.runtime?)
elsif markup_dir =~/https?:/
markup_file.each do |mf|
(FileTest.file?(mf)) \
@@ -301,7 +311,7 @@ class Orient
$sisu_document_markup_directory_base_fixed_path=
Dir.pwd.gsub(/\/(?:#{language_list.regex})$/,'')
argv_sub=command_line_modifiers + markup_file
- SiSU::HubMaster.new(argv_sub,sisu_called_from_directory)
+ SiSU::HubMaster.new(argv_sub,sisu_is.runtime?)
else p "Error directory specified #{markup_dir} not found"
end
ensure
@@ -313,7 +323,7 @@ class Orient
$sisu_document_markup_directory=Dir.pwd.gsub(/\/$/,'')
$sisu_document_markup_directory_base_fixed_path=
Dir.pwd.gsub(/(^|\/)(?:#{language_list.regex})$/,'')
- SiSU::HubMaster.new(processing.argv,sisu_called_from_directory)
+ SiSU::HubMaster.new(processing.argv,sisu_is.runtime?)
end
rescue
ensure