Sha256: b7fa9816ad4b76e3260a5c3fbd96a8959016adfc711b931aa3e1ef8e3119236f

Contents?: true

Size: 633 Bytes

Versions: 7

Compression:

Stored size: 633 Bytes

Contents

module Berkshelf
  module Vagrant
    module Action
      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

7 entries across 7 versions & 1 rubygems

Version Path
vagrant-berkshelf-3.0.1 lib/berkshelf/vagrant/action/configure_chef.rb
vagrant-berkshelf-3.0.0 lib/berkshelf/vagrant/action/configure_chef.rb
vagrant-berkshelf-3.0.0.rc2 lib/berkshelf/vagrant/action/configure_chef.rb
vagrant-berkshelf-3.0.0.rc1 lib/berkshelf/vagrant/action/configure_chef.rb
vagrant-berkshelf-2.0.1 lib/berkshelf/vagrant/action/configure_chef.rb
vagrant-berkshelf-2.0.0.rc4 lib/berkshelf/vagrant/action/configure_chef.rb
vagrant-berkshelf-2.0.0.rc3 lib/berkshelf/vagrant/action/configure_chef.rb