Remove remaining Vagrant.config references. There a still a couple left...

This commit is contained in:
Mitchell Hashimoto 2010-04-25 17:17:18 -07:00
parent c28195ed26
commit fee901a899
4 changed files with 5 additions and 5 deletions

View File

@ -28,7 +28,7 @@ module Vagrant
logger.info "Waiting for VM to boot..." logger.info "Waiting for VM to boot..."
@runner.env.config.ssh.max_tries.to_i.times do |i| @runner.env.config.ssh.max_tries.to_i.times do |i|
logger.info "Trying to connect (attempt ##{i+1} of #{Vagrant.config[:ssh][:max_tries]})..." logger.info "Trying to connect (attempt ##{i+1} of #{@runner.env.config[:ssh][:max_tries]})..."
if @runner.env.ssh.up? if @runner.env.ssh.up?
logger.info "VM booted and ready for use!" logger.info "VM booted and ready for use!"

View File

@ -11,7 +11,7 @@ module Vagrant
end end
def prepare def prepare
provisioner = Vagrant.config.vm.provisioner provisioner = @runner.env.config.vm.provisioner
if provisioner.nil? if provisioner.nil?
logger.info("Provisioning not enabled, ignoring this step") logger.info("Provisioning not enabled, ignoring this step")

View File

@ -241,10 +241,10 @@ module Vagrant
require_root_path require_root_path
if !box if !box
if !Vagrant.config.vm.box if !config.vm.box
error_and_exit(:box_not_specified) error_and_exit(:box_not_specified)
else else
error_and_exit(:box_specified_doesnt_exist, :box_name => Vagrant.config.vm.box) error_and_exit(:box_specified_doesnt_exist, :box_name => config.vm.box)
end end
end end
end end

View File

@ -49,7 +49,7 @@ class BootActionTest < Test::Unit::TestCase
end end
should "ping the max number of times then just return" do should "ping the max number of times then just return" do
@runner.env.ssh.expects(:up?).times(Vagrant.config.ssh.max_tries.to_i).returns(false) @runner.env.ssh.expects(:up?).times(@runner.env.config.ssh.max_tries.to_i).returns(false)
assert !@action.wait_for_boot(0) assert !@action.wait_for_boot(0)
end end
end end