Class: RightScale::CookbookPathMapping

Inherits:
Object
  • Object
show all
Defined in:
lib/instance/cook/cookbook_path_mapping.rb

Overview

helpers for constructing various paths related to coookbooks

Class Method Summary collapse

Class Method Details

.checkout_path(repo_dir, position) ⇒ Object

Constructs a cookbook checkout path for a given cookbook

Parameters

checkout_root (String)

the root of all checked out cookbooks

repo_dir (String)

root directory for all cookbooks in a the repo

position (String)

the relative path of the cookbook within the repo

Return

(String):: full path to the checked out location for the given cookbook


48
49
50
# File 'lib/instance/cook/cookbook_path_mapping.rb', line 48

def self.checkout_path(repo_dir, position)
  build_path(repo_dir, position)
end

.repose_path(repose_root, repo_sha, position) ⇒ Object

Constructs a repose download path for a given cookbook

Parameters

repose_root (String)

the root for all cookbooks downloaded with repose

repo_sha (String)

unique identifier for the repo containig the cookbook

position (String)

the relative path of the cookbook within the repo

Return

(String):: full path to the repose download location for the given cookbook


35
36
37
# File 'lib/instance/cook/cookbook_path_mapping.rb', line 35

def self.repose_path(repose_root, repo_sha, position)
  build_path(repose_root, repo_sha, position)
end