module TinyCI::PathUtils
Methods for computing paths.
Private Class Methods
included(base)
click to toggle source
# File lib/tinyci/path_utils.rb, line 39 def self.included(base) base.include TinyCI::Subprocesses base.include TinyCI::GitUtils end
Public Instance Methods
builds_path()
click to toggle source
# File lib/tinyci/path_utils.rb, line 10 def builds_path File.absolute_path("#{@working_dir}/builds") end
export_path()
click to toggle source
Build the export path
# File lib/tinyci/path_utils.rb, line 20 def export_path File.join(target_path, 'export') end
target_path()
click to toggle source
Build the absolute target path
# File lib/tinyci/path_utils.rb, line 15 def target_path File.join(builds_path, "#{time.to_i}_#{@commit}") end
Private Instance Methods
ensure_path(path)
click to toggle source
Ensure a path exists
# File lib/tinyci/path_utils.rb, line 35 def ensure_path(path) FileUtils.mkdir_p path end
logfile_path()
click to toggle source
# File lib/tinyci/path_utils.rb, line 26 def logfile_path File.join(target_path, 'tinyci.log') end
repo_logfile_path()
click to toggle source
# File lib/tinyci/path_utils.rb, line 30 def repo_logfile_path File.join(builds_path, 'tinyci.log') end