module Gitomator::ScriptUtil
Constants
- DEFAULT_CONTEXT_ENV_VAR_NAME
Public Class Methods
default_context_file()
click to toggle source
# File lib/gitomator/util/script_util.rb, line 10 def self.default_context_file return ENV[DEFAULT_CONTEXT_ENV_VAR_NAME] || File.expand_path('~/.gitomator') end
run_task(task)
click to toggle source
@param task [Gitomator::Task::*] An object with a run() method.
# File lib/gitomator/util/script_util.rb, line 48 def self.run_task(task) begin task.run rescue => e abort "ERROR: #{e}.\n\n#{e.backtrace.join("\n\t")}" end end
run_tasks(tasks)
click to toggle source
@param tasks [Array<Gitomator::Task::*>]
# File lib/gitomator/util/script_util.rb, line 59 def self.run_tasks(tasks) begin tasks.each { |task| task.run } rescue => e abort "ERROR: #{e}.\n\n#{e.backtrace.join("\n\t")}" end end