moved hanging dotfile_name under Vagrant.config.vagrant
This commit is contained in:
parent
66bc5a19e2
commit
0cdc6b5eaa
|
@ -1,6 +1,7 @@
|
|||
Vagrant::Config.run do |config|
|
||||
# default config goes here
|
||||
config.vagrant.log_output = STDOUT
|
||||
config.vagrant.dotfile_name = ".vagrant"
|
||||
config.vagrant.home = "~/.vagrant"
|
||||
|
||||
config.ssh.username = "vagrant"
|
||||
|
@ -9,8 +10,6 @@ Vagrant::Config.run do |config|
|
|||
config.ssh.forwarded_port_key = "ssh"
|
||||
config.ssh.max_tries = 10
|
||||
|
||||
config.dotfile_name = ".vagrant"
|
||||
|
||||
config.vm.box_ovf = "box.ovf"
|
||||
config.vm.base_mac = "0800279C2E42"
|
||||
config.vm.project_directory = "/vagrant"
|
||||
|
|
|
@ -118,6 +118,7 @@ module Vagrant
|
|||
end
|
||||
|
||||
class VagrantConfig < Base
|
||||
attr_accessor :dotfile_name
|
||||
attr_accessor :log_output
|
||||
attr_accessor :home
|
||||
|
||||
|
@ -127,7 +128,6 @@ module Vagrant
|
|||
end
|
||||
|
||||
class Top < Base
|
||||
attr_accessor :dotfile_name
|
||||
attr_reader :package
|
||||
attr_reader :ssh
|
||||
attr_reader :vm
|
||||
|
|
|
@ -14,7 +14,7 @@ module Vagrant
|
|||
def box; @@box; end
|
||||
def persisted_vm; @@persisted_vm; end
|
||||
def root_path; @@root_path; end
|
||||
def dotfile_path; File.join(root_path, Vagrant.config.dotfile_name); end
|
||||
def dotfile_path; File.join(root_path, Vagrant.config.vagrant.dotfile_name); end
|
||||
def home_path; File.expand_path(Vagrant.config.vagrant.home); end
|
||||
def tmp_path; File.join(home_path, "tmp"); end
|
||||
def boxes_path; File.join(home_path, "boxes"); end
|
||||
|
|
|
@ -24,7 +24,7 @@ class Test::Unit::TestCase
|
|||
Vagrant::Config.instance_variable_set(:@config, nil)
|
||||
|
||||
Vagrant::Config.run do |config|
|
||||
config.dotfile_name = ".hobo"
|
||||
config.vagrant.dotfile_name = ".hobo"
|
||||
|
||||
config.ssh.username = "foo"
|
||||
config.ssh.password = "bar"
|
||||
|
|
|
@ -151,7 +151,7 @@ class EnvTest < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
test "should build up the dotfile out of the root path and the dotfile name" do
|
||||
assert_equal File.join(Vagrant::Env.root_path, Vagrant.config.dotfile_name), Vagrant::Env.dotfile_path
|
||||
assert_equal File.join(Vagrant::Env.root_path, Vagrant.config.vagrant.dotfile_name), Vagrant::Env.dotfile_path
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue