Module: KnifeCookbookDependencies

Defined in:
lib/kcd/dsl.rb,
lib/kcd/git.rb,
lib/kcd/shelf.rb,
lib/kcd/version.rb,
lib/kcd/cookbook.rb,
lib/kcd/lockfile.rb,
lib/kcd/knife_utils.rb,
lib/kcd/cookbookfile.rb,
lib/kcd/metacookbook.rb,
lib/kcd/error_messages.rb,
lib/knife_cookbook_dependencies.rb,
lib/chef/knife/cookbook_dependencies_clean.rb,
lib/chef/knife/cookbook_dependencies_update.rb,
lib/chef/knife/cookbook_dependencies_install.rb

Defined Under Namespace

Modules: DSL, ErrorMessages, KnifeUtils Classes: Cookbook, CookbookDependenciesClean, CookbookDependenciesInstall, CookbookDependenciesUpdate, CookbookDepsClean, CookbookDepsInstall, CookbookDepsUpdate, Cookbookfile, Git, Lockfile, MetaCookbook, Shelf

Constant Summary collapse

VERSION =
"0.0.8"
DEFAULT_FILENAME =
'Cookbookfile'
COOKBOOKS_DIRECTORY =
'cookbooks'
TMP_DIRECTORY =
File.join(ENV['TMPDIR'], 'knife_cookbook_dependencies')

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.uiObject

Returns the value of attribute ui.



10
11
12
# File 'lib/knife_cookbook_dependencies.rb', line 10

def ui
  @ui
end

Class Method Details

.cleanObject



28
29
30
31
32
33
# File 'lib/knife_cookbook_dependencies.rb', line 28

def clean
  clear_shelf!
  Lockfile.remove!
  FileUtils.rm_rf COOKBOOKS_DIRECTORY
  FileUtils.rm_rf TMP_DIRECTORY
end

.clear_shelf!Object



20
21
22
# File 'lib/knife_cookbook_dependencies.rb', line 20

def clear_shelf!
  @shelf = nil
end

.rootObject



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

def root
  File.join(File.dirname(__FILE__), '..')
end

.shelfObject



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

def shelf
  @shelf ||= KCD::Shelf.new
end