Sha256: f6bae1b2d05f068a41c8644f3ac38eeb035fcad4bcb476e9382c5a6804fc3fd8

Contents?: true

Size: 686 Bytes

Versions: 8

Compression:

Stored size: 686 Bytes

Contents

module Berkshelf
  module Vagrant
    module Action
      # @author Jamie Winsor <jamie@vialstudios.com>
      class ConfigureChef
        include Berkshelf::Vagrant::EnvHelpers

        def initialize(app, env)
          @app = app
        end

        def call(env)
          unless berkshelf_enabled?(env)
            return @app.call(env)
          end

          if chef_solo?(env) && shelf = env[:berkshelf].shelf
            provisioners(:chef_solo, env).each do |provisioner|
              provisioner.config.cookbooks_path = provisioner.config.send(:prepare_folders_config, shelf)
            end
          end

          @app.call(env)
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
vagrant-berkshelf-2.0.0.rc2 lib/berkshelf/vagrant/action/configure_chef.rb
vagrant-berkshelf-2.0.0.rc1 lib/berkshelf/vagrant/action/configure_chef.rb
vagrant-berkshelf-1.3.7 lib/berkshelf/vagrant/action/configure_chef.rb
vagrant-berkshelf-1.3.6 lib/berkshelf/vagrant/action/configure_chef.rb
vagrant-berkshelf-1.3.5 lib/berkshelf/vagrant/action/configure_chef.rb
vagrant-berkshelf-1.4.0.dev1 lib/berkshelf/vagrant/action/configure_chef.rb
vagrant-berkshelf-1.3.4 lib/berkshelf/vagrant/action/configure_chef.rb
vagrant-berkshelf-1.3.3 lib/berkshelf/vagrant/action/configure_chef.rb