Module: Elzar

Defined in:
lib/elzar.rb,
lib/elzar/version.rb,
lib/elzar/chef_dna.rb,
lib/elzar/template.rb,
lib/elzar/assistant.rb

Defined Under Namespace

Modules: Assistant, ChefDNA, Template

Constant Summary collapse

ROOT_DIR =
File.expand_path File.dirname(__FILE__) + '/../'
CHEF_DIR =
"#{ROOT_DIR}/chef"
ROLES_DIR =
"#{CHEF_DIR}/roles"
COOKBOOK_DIRS =

order matters

['site-cookbooks', 'cookbooks']
VERSION =
'0.1.1'

Class Method Summary collapse

Class Method Details

.create_provision_directory(destination, options = {}) ⇒ Object



16
17
18
19
# File 'lib/elzar.rb', line 16

def self.create_provision_directory(destination, options={})
  Assistant.create_user_provision_dir destination.to_s, options[:local]
  Assistant.generate_files destination.to_s, options
end

.merge_and_create_temp_directory(user_dir) ⇒ Object



21
22
23
# File 'lib/elzar.rb', line 21

def self.merge_and_create_temp_directory(user_dir)
  Assistant.merge_and_create_temp_directory user_dir
end

.templates_dirObject



12
13
14
# File 'lib/elzar.rb', line 12

def self.templates_dir
  @templates_dir ||= "#{ROOT_DIR}/lib/elzar/templates"
end

.vagrant_cookbooks_pathObject



25
26
27
# File 'lib/elzar.rb', line 25

def self.vagrant_cookbooks_path
  COOKBOOK_DIRS.map {|dir| "#{CHEF_DIR}/#{dir}" }
end

.vagrant_roles_pathObject



29
30
31
# File 'lib/elzar.rb', line 29

def self.vagrant_roles_path
  ROLES_DIR
end