Sha256: 2be85c90f69513cd0f9223dfa36e1aea55a68ec8072e73081ca27b40d6b095e0

Contents?: true

Size: 1 KB

Versions: 6

Compression:

Stored size: 1 KB

Contents

require 'vagrant'
require 'berkshelf'
require 'berkshelf/vagrant/version'
require 'berkshelf/vagrant/errors'
require 'tmpdir'
require 'fileutils'

module Berkshelf
  # @author Jamie Winsor <reset@riotgames.com>
  module Vagrant
    autoload :Action, 'berkshelf/vagrant/action'
    autoload :Config, 'berkshelf/vagrant/config'
    autoload :Env, 'berkshelf/vagrant/env'
    autoload :EnvHelpers, 'berkshelf/vagrant/env_helpers'

    class << self
      # The path to where shelfs are created on the host machine to be mounted in
      # Vagrant guests
      #
      # @return [String]
      def shelf_path
        File.join(Berkshelf.berkshelf_path, 'vagrant')
      end

      # Generate a new shelf to be mounted in a Vagrant guest
      #
      # @return [String]
      #   path to the generated shelf
      def mkshelf
        unless File.exist?(shelf_path)
          FileUtils.mkdir_p(shelf_path)
        end

        Dir.mktmpdir('berkshelf-', shelf_path)
      end
    end
  end
end

require 'berkshelf/vagrant/plugin'

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
berkshelf-vagrant-1.1.2 lib/berkshelf/vagrant.rb
berkshelf-vagrant-1.1.0 lib/berkshelf/vagrant.rb
berkshelf-vagrant-1.0.6 lib/berkshelf/vagrant.rb
berkshelf-vagrant-1.0.4 lib/berkshelf/vagrant.rb
berkshelf-vagrant-1.0.3 lib/berkshelf/vagrant.rb
berkshelf-vagrant-1.0.0.rc1 lib/berkshelf/vagrant.rb