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