core: get rid of all uses of config_global
This commit is contained in:
parent
e2403c093d
commit
cdf1d7f318
|
@ -31,7 +31,7 @@ module VagrantPlugins
|
|||
raise Vagrant::Errors::BoxNotFound, :name => box_name, :provider => box_provider if !box
|
||||
|
||||
# Repackage the box
|
||||
output_name = @env.config_global.package.name || "package.box"
|
||||
output_name = @env.vagrantfile.config.package.name || "package.box"
|
||||
output_path = Pathname.new(File.expand_path(output_name, FileUtils.pwd))
|
||||
box.repackage(output_path)
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ module VagrantPlugins
|
|||
vm = Vagrant::Machine.new(
|
||||
options[:base],
|
||||
:virtualbox, provider[0], nil, provider[1],
|
||||
@env.config_global,
|
||||
@env.vagrantfile.config,
|
||||
nil, nil,
|
||||
@env, true)
|
||||
@logger.debug("Packaging base VM: #{vm.name}")
|
||||
|
|
|
@ -15,7 +15,7 @@ describe VagrantPlugins::ProviderVirtualBox::Action::PrepareNFSValidIds do
|
|||
provider_cls,
|
||||
provider_config,
|
||||
provider_options,
|
||||
environment.config_global,
|
||||
environment.vagrantfile.config,
|
||||
Pathname('data_dir'),
|
||||
double('box'),
|
||||
environment
|
||||
|
|
|
@ -833,7 +833,7 @@ VF
|
|||
end
|
||||
|
||||
env = environment.create_vagrant_env
|
||||
env.config_global.ssh.port.should == 200
|
||||
env.vagrantfile.config.ssh.port.should == 200
|
||||
end
|
||||
|
||||
it "should load from a custom Vagrantfile" do
|
||||
|
@ -846,7 +846,7 @@ VF
|
|||
end
|
||||
|
||||
env = environment.create_vagrant_env(:vagrantfile_name => "non_standard_name")
|
||||
env.config_global.ssh.port.should == 200
|
||||
env.vagrantfile.config.ssh.port.should == 200
|
||||
end
|
||||
|
||||
it "should load from a custom Vagrantfile specified by env var" do
|
||||
|
@ -862,7 +862,7 @@ VF
|
|||
environment.create_vagrant_env
|
||||
end
|
||||
|
||||
env.config_global.ssh.port.should == 400
|
||||
env.vagrantfile.config.ssh.port.should == 400
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ describe Vagrant::Machine do
|
|||
let(:provider_name) { :test }
|
||||
let(:provider_options) { {} }
|
||||
let(:box) { Object.new }
|
||||
let(:config) { env.config_global }
|
||||
let(:config) { env.vagrantfile.config }
|
||||
let(:data_dir) { Pathname.new(Dir.mktmpdir("vagrant")) }
|
||||
let(:env) do
|
||||
# We need to create a Vagrantfile so that this test environment
|
||||
|
|
Loading…
Reference in New Issue