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/chef_config.rb,
lib/berkshelf/vagrant/env_helpers.rb,
lib/berkshelf/vagrant/action/clean.rb,
lib/berkshelf/vagrant/berks_config.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
Defined Under Namespace
Modules: Action, EnvHelpers Classes: BerksConfig, ChefConfig, Config, Env, Plugin
Constant Summary collapse
- TESTED_REQUIREMENTS =
[">= 1.1", "< 1.5.0"]
- VERSION =
"3.0.1"
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
51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/berkshelf/vagrant.rb', line 51 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
43 44 45 |
# File 'lib/berkshelf/vagrant.rb', line 43 def shelf_path File.join(Berkshelf.berkshelf_path, 'vagrant') end |