Module: Berkshelf::Vagrant
- Defined in:
- lib/berkshelf/vagrant.rb,
lib/berkshelf/vagrant/env.rb,
lib/berkshelf/vagrant/action.rb,
lib/berkshelf/vagrant/config.rb,
lib/berkshelf/vagrant/plugin.rb,
lib/berkshelf/vagrant/version.rb,
lib/berkshelf/vagrant/env_helpers.rb,
lib/berkshelf/vagrant/action/clean.rb,
lib/berkshelf/vagrant/action/set_ui.rb,
lib/berkshelf/vagrant/action/upload.rb,
lib/berkshelf/vagrant/action/install.rb,
lib/berkshelf/vagrant/action/load_shelf.rb,
lib/berkshelf/vagrant/action/configure_chef.rb
Overview
Defined Under Namespace
Modules: Action, EnvHelpers Classes: Config, Env, Plugin
Constant Summary collapse
- TESTED_CONSTRAINT =
"~> 1.2.0"
- VERSION =
"1.3.4"
Class Method Summary collapse
-
.mkshelf(machine_name = nil) ⇒ String
Generate a new shelf to be mounted in a Vagrant guest.
-
.shelf_path ⇒ String
The path to where shelfs are created on the host machine to be mounted in Vagrant guests.
Class Method Details
.mkshelf(machine_name = nil) ⇒ String
Generate a new shelf to be mounted in a Vagrant guest
38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/berkshelf/vagrant.rb', line 38 def mkshelf(machine_name = nil) unless File.exist?(shelf_path) FileUtils.mkdir_p(shelf_path) end if machine_name.nil? prefix_suffix = 'berkshelf-' else prefix_suffix = ['berkshelf-', "-#{machine_name}"] end Dir.mktmpdir(prefix_suffix, shelf_path) end |
.shelf_path ⇒ String
The path to where shelfs are created on the host machine to be mounted in Vagrant guests
30 31 32 |
# File 'lib/berkshelf/vagrant.rb', line 30 def shelf_path File.join(Berkshelf.berkshelf_path, 'vagrant') end |