Module: KnifeSolo::CookbookManager::ClassMethods

Includes:
Chef::Mixin::ConvertToClassName
Defined in:
lib/knife-solo/cookbook_manager.rb

Instance Method Summary collapse

Instance Method Details

#conf_file_nameObject

Returns the base name of the configuration file



34
35
36
# File 'lib/knife-solo/cookbook_manager.rb', line 34

def conf_file_name
  raise "Must be overridden by the including class"
end

#config_keyObject

Key in Chef::Config and CLI options



29
30
31
# File 'lib/knife-solo/cookbook_manager.rb', line 29

def config_key
  snake_case_basename(name).to_sym
end

#gem_librariesObject

Returns an Array of libraries to load



16
17
18
# File 'lib/knife-solo/cookbook_manager.rb', line 16

def gem_libraries
  raise "Must be overridden by the including class"
end

#gem_nameObject



20
21
22
# File 'lib/knife-solo/cookbook_manager.rb', line 20

def gem_name
  gem_libraries.first
end

#load_gemObject



24
25
26
# File 'lib/knife-solo/cookbook_manager.rb', line 24

def load_gem
  gem_libraries.each { |lib| require lib }
end