Shorten shared folders further [see GH-50]
This commit is contained in:
parent
1245a0c1c8
commit
40e823d90a
|
@ -3,7 +3,7 @@ module Vagrant
|
||||||
module VM
|
module VM
|
||||||
class Boot < Base
|
class Boot < Base
|
||||||
def prepare
|
def prepare
|
||||||
@runner.env.config.vm.share_folder("vagrant-root", @runner.env.config.vm.project_directory, @runner.env.root_path)
|
@runner.env.config.vm.share_folder("v-root", @runner.env.config.vm.project_directory, @runner.env.root_path)
|
||||||
end
|
end
|
||||||
|
|
||||||
def execute!
|
def execute!
|
||||||
|
|
|
@ -16,13 +16,13 @@ module Vagrant
|
||||||
|
|
||||||
def share_cookbook_folders
|
def share_cookbook_folders
|
||||||
host_cookbook_paths.each_with_index do |cookbook, i|
|
host_cookbook_paths.each_with_index do |cookbook, i|
|
||||||
env.config.vm.share_folder("vagrant-csc-#{i}", cookbook_path(i), cookbook)
|
env.config.vm.share_folder("v-csc-#{i}", cookbook_path(i), cookbook)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def share_role_folders
|
def share_role_folders
|
||||||
host_role_paths.each_with_index do |role, i|
|
host_role_paths.each_with_index do |role, i|
|
||||||
env.config.vm.share_folder("vagrant-csr-#{i}", role_path(i), role)
|
env.config.vm.share_folder("v-csr-#{i}", role_path(i), role)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ class BootActionTest < Test::Unit::TestCase
|
||||||
|
|
||||||
context "preparing" do
|
context "preparing" do
|
||||||
should "add the root shared folder" do
|
should "add the root shared folder" do
|
||||||
@runner.env.config.vm.expects(:share_folder).with("vagrant-root", @runner.env.config.vm.project_directory, @runner.env.root_path).once
|
@runner.env.config.vm.expects(:share_folder).with("v-root", @runner.env.config.vm.project_directory, @runner.env.root_path).once
|
||||||
@action.prepare
|
@action.prepare
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -38,7 +38,7 @@ class ChefSoloProvisionerTest < Test::Unit::TestCase
|
||||||
should "share each cookbook folder" do
|
should "share each cookbook folder" do
|
||||||
share_seq = sequence("share_seq")
|
share_seq = sequence("share_seq")
|
||||||
@host_cookbook_paths.each_with_index do |cookbook, i|
|
@host_cookbook_paths.each_with_index do |cookbook, i|
|
||||||
@env.config.vm.expects(:share_folder).with("vagrant-csc-#{i}", @action.cookbook_path(i), cookbook).in_sequence(share_seq)
|
@env.config.vm.expects(:share_folder).with("v-csc-#{i}", @action.cookbook_path(i), cookbook).in_sequence(share_seq)
|
||||||
end
|
end
|
||||||
|
|
||||||
@action.share_cookbook_folders
|
@action.share_cookbook_folders
|
||||||
|
@ -54,7 +54,7 @@ class ChefSoloProvisionerTest < Test::Unit::TestCase
|
||||||
should "share each role folder" do
|
should "share each role folder" do
|
||||||
share_seq = sequence("share_seq")
|
share_seq = sequence("share_seq")
|
||||||
@host_role_paths.each_with_index do |role, i|
|
@host_role_paths.each_with_index do |role, i|
|
||||||
@env.config.vm.expects(:share_folder).with("vagrant-csr-#{i}", @action.role_path(i), role).in_sequence(share_seq)
|
@env.config.vm.expects(:share_folder).with("v-csr-#{i}", @action.role_path(i), role).in_sequence(share_seq)
|
||||||
end
|
end
|
||||||
|
|
||||||
@action.share_role_folders
|
@action.share_role_folders
|
||||||
|
|
Loading…
Reference in New Issue