schubergphilis / vagrant-chef-zero

Vagrant Plugin for Chef Zero
Apache License 2.0
91 stars 42 forks source link

fixes #43 and vagrant 1.5 change from env[:global_config] to env[:machin... #45

Closed sysbot closed 10 years ago

sysbot commented 10 years ago

This fixes issue #41 [1] and pull request #43 since I haven't heard any update from the last commiter. Credit still to mjallday since he's the one with the original code. I just want to see this get pushed out since vagrant-chef-zero is unusable at Vagrant 1.5+ without this update.

Second resolve and issue with new config option for plugins in Vagrant [1]. Without such fix, you will see this message below.

[1] https://github.com/andrewgross/vagrant-chef-zero/issues/41 [2] https://github.com/andrewgross/vagrant-chef-zero/pull/43 [3] https://github.com/mitchellh/vagrant/issues/3317 [4] https://github.com/mjallday

---- Begin output of vagrant up --no-provision --provider=virtualbox ---- STDOUT: Bringing machine 'default' up with 'virtualbox' provider... STDERR: /Users/bao/.vagrant.d/gems/gems/vagrant-chef-zero-0.6.0/lib/vagrant-chef-zero/env_helpers.rb:105:in chef_zero_enabled?': undefined methodchef_zero' for nil:NilClass (NoMethodError) from /Users/bao/.vagrant.d/gems/gems/vagrant-chef-zero-0.6.0/lib/vagrant-chef-zero/action/reconfig.rb:13:in initialize' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:90:innew' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:90:in finalize_action' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:20:inblock in initialize' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:20:in map' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:20:ininitialize' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/builder.rb:170:in new' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/builder.rb:170:into_app' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/builder.rb:116:in call' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/runner.rb:69:inblock in run' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/util/busy.rb:19:in busy' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/runner.rb:69:inrun' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/machine.rb:157:in action' from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/batch_action.rb:72:inblock (2 levels) in run' ---- End output of vagrant up --no-provision --provider=virtualbox ---- Ran vagrant up --no-provision --provider=virtualbox returned 1]

andrewgross commented 10 years ago

Hey,

Thanks for bringing this up and porting the fix. I will see if I can get Vagrant 1.5 up and running to test this tomorrow.

Andrew

sysbot commented 10 years ago

Thanks for looking at it Andrew. I'm not sure how to get Travis CI bundle dependency working but the code is tested to work on my workstation.

andrewgross commented 10 years ago

Working on getting my vagrant environment working to test this, having some issues with the new plugin interface and ruby2.0.

andrewgross commented 10 years ago

Thanks, I have taken this code and merged it in (just not via this interface). Check out 0.7.0 and let me know how it works for you.