Sha256: d22f424395af374c9864daa969d223bc3db8702a0592963b4cedbe7facebe7ab

Contents?: true

Size: 1.96 KB

Versions: 14

Compression:

Stored size: 1.96 KB

Contents

module Berkshelf
  module Vagrant
    # @author Jamie Winsor <jamie@vialstudios.com>
    #
    # Middleware stacks for use with Vagrant
    module Middleware
      class << self
        # Return the Berkshelf install middleware stack. When placed in the action chain
        # this stack will find retrieve and resolve the cookbook dependencies describe
        # in your configured Berksfile.
        #
        # Cookbooks will installed into a temporary directory, called a Shelf, and mounted
        # into the VM. This mounted path will be appended to the chef_solo.cookbooks_path value.
        #
        # @return [::Vagrant::Action::Builder]
        def install
          @install ||= ::Vagrant::Action::Builder.new do
            use Berkshelf::Vagrant::Action::SetUI
            use Berkshelf::Vagrant::Action::Install
          end
        end

        # Return the Berkshelf upload middleware stack. When placed in the action chain
        # this stack will upload cookbooks to a Chef Server if the Chef-Client provisioner
        # is used. The Chef Server where the cookbooks will be uploaded to is the same Chef
        # Server used in the Chef-Client provisioner.
        #
        # Nothing will be done if the Chef-Solo provisioner is used.
        #
        # @return [::Vagrant::Action::Builder]
        def upload
          @upload ||= ::Vagrant::Action::Builder.new do
            use Berkshelf::Vagrant::Action::SetUI
            use Berkshelf::Vagrant::Action::Upload
          end
        end

        # Return the Berkshelf clean middleware stack. When placed in the action chain
        # this stack will clean up any temporary directories or files created by the other
        # middleware stacks.
        #
        # @return [::Vagrant::Action::Builder]
        def clean
          @clean ||= ::Vagrant::Action::Builder.new do
            use Berkshelf::Vagrant::Action::SetUI
            use Berkshelf::Vagrant::Action::Clean
          end
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
berkshelf-1.1.6 lib/berkshelf/vagrant/middleware.rb
berkshelf-1.1.5 lib/berkshelf/vagrant/middleware.rb
berkshelf-1.1.4 lib/berkshelf/vagrant/middleware.rb
berkshelf-1.1.3 lib/berkshelf/vagrant/middleware.rb
berkshelf-1.1.2 lib/berkshelf/vagrant/middleware.rb
berkshelf-1.1.1 lib/berkshelf/vagrant/middleware.rb
berkshelf-1.1.0 lib/berkshelf/vagrant/middleware.rb
berkshelf-1.1.0.rc1 lib/berkshelf/vagrant/middleware.rb
berkshelf-1.0.4 lib/berkshelf/vagrant/middleware.rb
berkshelf-1.0.3 lib/berkshelf/vagrant/middleware.rb
berkshelf-1.0.2 lib/berkshelf/vagrant/middleware.rb
berkshelf-1.0.0 lib/berkshelf/vagrant/middleware.rb
berkshelf-1.0.0.rc3 lib/berkshelf/vagrant/middleware.rb
berkshelf-1.0.0.rc2 lib/berkshelf/vagrant/middleware.rb