lib/berkshelf/vagrant/action/install.rb in berkshelf-0.6.0.beta4 vs lib/berkshelf/vagrant/action/install.rb in berkshelf-1.0.0.rc1

- old
+ new

@@ -2,21 +2,17 @@ module Vagrant module Action # @author Jamie Winsor <jamie@vialstudios.com> # @author Andrew Garson <andrew.garson@gmail.com> class Install - attr_reader :config attr_reader :shelf attr_reader :berksfile def initialize(app, env) - @app = app - @shelf = Berkshelf::Vagrant.shelf_for(env) - @config = env[:vm].config.berkshelf - Berkshelf.config_path = @config.config_path - Berkshelf.load_config - @berksfile = Berksfile.from_file(@config.berksfile_path) + @app = app + @shelf = Berkshelf::Vagrant.shelf_for(env) + @berksfile = Berksfile.from_file(env[:vm].config.berkshelf.berksfile_path) end def call(env) if Berkshelf::Vagrant.chef_solo?(env[:vm].config) configure_cookbooks_path(env) @@ -30,10 +26,10 @@ def install(env) Berkshelf.formatter.msg "installing cookbooks..." opts = { path: self.shelf - }.merge(self.config.to_hash).symbolize_keys! + }.merge(env[:vm].config.berkshelf.to_hash).symbolize_keys! berksfile.install(opts) end def configure_cookbooks_path(env) Berkshelf::Vagrant.provisioners(:chef_solo, env[:vm].config).each do |provisioner|