Class: KnifeSolo::Librarian

Inherits:
Object
  • Object
show all
Includes:
CookbookManager
Defined in:
lib/knife-solo/librarian.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from CookbookManager

included

Class Method Details

.conf_file_nameObject



11
12
13
# File 'lib/knife-solo/librarian.rb', line 11

def self.conf_file_name
  'Cheffile'
end

.gem_librariesObject



7
8
9
# File 'lib/knife-solo/librarian.rb', line 7

def self.gem_libraries
  %w[librarian/action librarian/chef]
end

.gem_nameObject



15
16
17
# File 'lib/knife-solo/librarian.rb', line 15

def self.gem_name
  'librarian-chef'
end

Instance Method Details

#envObject



26
27
28
# File 'lib/knife-solo/librarian.rb', line 26

def env
  @env ||= ::Librarian::Chef::Environment.new
end

#gitignoresObject

Returns an array of strings to gitignore when bootstrapping



35
36
37
# File 'lib/knife-solo/librarian.rb', line 35

def gitignores
  %w[/tmp/librarian/]
end

#initial_configObject



30
31
32
# File 'lib/knife-solo/librarian.rb', line 30

def initial_config
  "site 'https://supermarket.chef.io/api/v1'"
end

#install!Object



19
20
21
22
23
24
# File 'lib/knife-solo/librarian.rb', line 19

def install!
  ui.msg "Installing Librarian cookbooks..."
  ::Librarian::Action::Resolve.new(env).run
  ::Librarian::Action::Install.new(env).run
  env.install_path
end