vagrant-windows 1.2.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.DS_Store +0 -0
- data/CHANGELOG.md +38 -0
- data/Gemfile +2 -1
- data/LICENSE +13 -0
- data/README.md +78 -110
- data/coverage/.last_run.json +1 -1
- data/coverage/.resultset.json +685 -210
- data/coverage/index.html +5333 -2355
- data/init.pp +5 -0
- data/lib/vagrant-windows/communication/winrmcommunicator.rb +49 -61
- data/lib/vagrant-windows/communication/winrmfinder.rb +23 -17
- data/lib/vagrant-windows/communication/winrmshell.rb +34 -16
- data/lib/vagrant-windows/communication/winrmshell_factory.rb +34 -0
- data/lib/vagrant-windows/config/winrm.rb +1 -2
- data/lib/vagrant-windows/errors.rb +2 -2
- data/lib/vagrant-windows/guest/cap/configure_networks.rb +33 -29
- data/lib/vagrant-windows/guest/cap/halt.rb +4 -0
- data/lib/vagrant-windows/guest/cap/mount_shared_folder.rb +31 -0
- data/lib/vagrant-windows/guest/windows.rb +13 -11
- data/lib/vagrant-windows/helper.rb +22 -1
- data/lib/vagrant-windows/monkey_patches/plugins/provisioners/chef/provisioner/chef_solo.rb +17 -5
- data/lib/vagrant-windows/monkey_patches/plugins/provisioners/puppet/provisioner/puppet.rb +54 -17
- data/lib/vagrant-windows/monkey_patches/plugins/provisioners/shell/provisioner.rb +36 -22
- data/lib/vagrant-windows/plugin.rb +4 -4
- data/lib/vagrant-windows/scripts/cheftask.ps1.erb +13 -12
- data/lib/vagrant-windows/scripts/cheftask.xml.erb +1 -1
- data/lib/vagrant-windows/scripts/cheftaskrun.ps1.erb +3 -1
- data/lib/vagrant-windows/scripts/{mount_volume.vmware.ps1.erb → mount_volume.ps1.erb} +2 -1
- data/lib/vagrant-windows/scripts/reboot_detect.ps1 +43 -0
- data/lib/vagrant-windows/version.rb +1 -1
- data/lib/vagrant-windows/windows_machine.rb +87 -0
- data/locales/en.yml +2 -5
- data/puppet-3.3.2.msi +0 -0
- data/spec/vagrant-windows/guestnetwork_spec.rb +14 -2
- data/spec/vagrant-windows/helper_spec.rb +1 -0
- data/spec/vagrant-windows/mount_shared_folder_spec.rb +34 -0
- data/spec/vagrant-windows/windows_config_spec.rb +26 -0
- data/spec/vagrant-windows/windows_machine_spec.rb +65 -0
- data/spec/vagrant-windows/{config_spec.rb → winrm_config_spec.rb} +2 -28
- data/spec/vagrant-windows/winrmcommunicator_spec.rb +29 -8
- data/spec/vagrant-windows/winrmfinder_spec.rb +42 -0
- data/spec/vagrant-windows/winrmshell_spec.rb +39 -0
- data/test.ps1 +1 -0
- data/vagrant-windows.gemspec +6 -5
- metadata +59 -19
- checksums.yaml +0 -7
- data/lib/vagrant-windows/guest/cap/mount_virtualbox_shared_folder.rb +0 -17
- data/lib/vagrant-windows/guest/cap/mount_vmware_shared_folder.rb +0 -15
- data/lib/vagrant-windows/scripts/mount_volume.virtualbox.ps1.erb +0 -49
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
require 'mocha/api'
|
|
3
|
+
require 'vagrant-windows/windows_machine'
|
|
4
|
+
|
|
5
|
+
describe VagrantWindows::WindowsMachine , :unit => true do
|
|
6
|
+
|
|
7
|
+
describe "is_vmware?" do
|
|
8
|
+
it "should be true for vmware_fusion" do
|
|
9
|
+
machine = stub(:provider_name => :vmware_fusion)
|
|
10
|
+
windows_machine = VagrantWindows::WindowsMachine.new(machine)
|
|
11
|
+
expect(windows_machine.is_vmware?()).to be_true
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
it "should be true for vmware_workstation" do
|
|
15
|
+
machine = stub(:provider_name => :vmware_workstation)
|
|
16
|
+
windows_machine = VagrantWindows::WindowsMachine.new(machine)
|
|
17
|
+
expect(windows_machine.is_vmware?()).to be_true
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
it "should be false for virtual_box" do
|
|
21
|
+
machine = stub(:provider_name => :virtual_box)
|
|
22
|
+
windows_machine = VagrantWindows::WindowsMachine.new(machine)
|
|
23
|
+
expect(windows_machine.is_vmware?()).to be_false
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
describe "is_virtualbox?" do
|
|
28
|
+
it "should be true for virtualbox" do
|
|
29
|
+
machine = stub(:provider_name => :virtualbox)
|
|
30
|
+
windows_machine = VagrantWindows::WindowsMachine.new(machine)
|
|
31
|
+
expect(windows_machine.is_virtualbox?()).to be_true
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
it "should be false for vmware_workstation" do
|
|
35
|
+
machine = stub(:provider_name => :vmware_workstation)
|
|
36
|
+
windows_machine = VagrantWindows::WindowsMachine.new(machine)
|
|
37
|
+
expect(windows_machine.is_virtualbox?()).to be_false
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
describe "is_windows?" do
|
|
42
|
+
it "should return true when config vm guest is windows" do
|
|
43
|
+
vm = stub(:guest => :windows)
|
|
44
|
+
config = stub(:vm => vm)
|
|
45
|
+
machine = stub(:config => config)
|
|
46
|
+
expect(VagrantWindows::WindowsMachine.is_windows?(machine)).to be_true
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
it "should return false when config vm guest is not windows" do
|
|
50
|
+
vm = stub(:guest => :ubuntu)
|
|
51
|
+
config = stub(:vm => vm)
|
|
52
|
+
machine = stub(:config => config)
|
|
53
|
+
expect(VagrantWindows::WindowsMachine.is_windows?(machine)).to be_false
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
describe "read_forwarded_ports" do
|
|
58
|
+
it "should return empty array for vmware provider" do
|
|
59
|
+
machine = stub(:provider_name => :vmware_fusion)
|
|
60
|
+
windows_machine = VagrantWindows::WindowsMachine.new(machine)
|
|
61
|
+
expect(windows_machine.read_forwarded_ports()).to eq([])
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
end
|
|
@@ -1,32 +1,6 @@
|
|
|
1
1
|
require 'spec_helper'
|
|
2
2
|
|
|
3
|
-
describe VagrantWindows::Config::
|
|
4
|
-
let(:instance) { described_class.new }
|
|
5
|
-
|
|
6
|
-
describe "defaults" do
|
|
7
|
-
subject do
|
|
8
|
-
instance.tap do |o|
|
|
9
|
-
o.finalize!
|
|
10
|
-
end
|
|
11
|
-
end
|
|
12
|
-
|
|
13
|
-
its("halt_timeout") { should == 30 }
|
|
14
|
-
its("halt_check_interval") { should == 1 }
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
describe "overriding defaults" do
|
|
18
|
-
[:halt_timeout, :halt_check_interval].each do |attribute|
|
|
19
|
-
it "should not default #{attribute} if overridden" do
|
|
20
|
-
instance.send("#{attribute}=".to_sym, 10)
|
|
21
|
-
instance.finalize!
|
|
22
|
-
instance.send(attribute).should == 10
|
|
23
|
-
end
|
|
24
|
-
end
|
|
25
|
-
end
|
|
26
|
-
end
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
describe VagrantWindows::Config::WinRM do
|
|
3
|
+
describe VagrantWindows::Config::WinRM, :unit => true do
|
|
30
4
|
let(:instance) { described_class.new }
|
|
31
5
|
|
|
32
6
|
describe "defaults" do
|
|
@@ -38,7 +12,7 @@ describe VagrantWindows::Config::WinRM do
|
|
|
38
12
|
|
|
39
13
|
its("username") { should == "vagrant" }
|
|
40
14
|
its("password") { should == "vagrant" }
|
|
41
|
-
its("host") { should ==
|
|
15
|
+
its("host") { should == nil }
|
|
42
16
|
its("port") { should == 5985 }
|
|
43
17
|
its("guest_port") { should == 5985 }
|
|
44
18
|
its("max_tries") { should == 20 }
|
|
@@ -5,21 +5,42 @@ describe VagrantWindows::Communication::WinRMCommunicator, :integration => true
|
|
|
5
5
|
before(:all) do
|
|
6
6
|
# This test requires you already have a running Windows Server 2008 R2 Vagrant VM
|
|
7
7
|
# Not ideal, but you have to start somewhere
|
|
8
|
-
@shell = VagrantWindows::Communication::WinRMShell.new("localhost", "vagrant", "vagrant")
|
|
9
8
|
@communicator = VagrantWindows::Communication::WinRMCommunicator.new({})
|
|
10
|
-
@communicator.
|
|
9
|
+
@communicator.winrmshell = VagrantWindows::Communication::WinRMShell.new("127.0.0.1", "vagrant", "vagrant")
|
|
11
10
|
end
|
|
12
11
|
|
|
13
12
|
describe "execute" do
|
|
14
|
-
it "should return 1" do
|
|
15
|
-
expect(@communicator.execute("exit 1")).to eq(1)
|
|
13
|
+
it "should return 1 when error_check is false" do
|
|
14
|
+
expect(@communicator.execute("exit 1", { :error_check => false })).to eq(1)
|
|
16
15
|
end
|
|
17
16
|
|
|
18
|
-
it "should
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
it "should raise WinRMExecutionError when error_check is true" do
|
|
18
|
+
expect { @communicator.execute("exit 1") }.to raise_error(VagrantWindows::Errors::WinRMExecutionError)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
it "should raise specified error type when specified and error_check is true" do
|
|
22
|
+
opts = { :error_class => VagrantWindows::Errors::WinRMInvalidShell }
|
|
23
|
+
expect { @communicator.execute("exit 1", opts) }.to raise_error(VagrantWindows::Errors::WinRMInvalidShell)
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
describe "upload" do
|
|
28
|
+
it "should upload the file and overwrite it if it exists" do
|
|
29
|
+
test_file = Tempfile.new("uploadtest")
|
|
30
|
+
IO.write(test_file, "hello world")
|
|
31
|
+
@communicator.upload(test_file, "c:\\vagrantuploadtest.txt")
|
|
32
|
+
|
|
33
|
+
# ensure we can overwrite
|
|
34
|
+
IO.write(test_file, "goodbye cruel world")
|
|
35
|
+
@communicator.upload(test_file, "c:\\vagrantuploadtest.txt")
|
|
36
|
+
|
|
37
|
+
# get the uploaded file's contents to ensure it uploaded properly
|
|
38
|
+
uploaded_file_content = ''
|
|
39
|
+
@communicator.execute("cat c:\\vagrantuploadtest.txt", {}) do |type, line|
|
|
40
|
+
uploaded_file_content = uploaded_file_content + line
|
|
21
41
|
end
|
|
22
|
-
|
|
42
|
+
|
|
43
|
+
expect(uploaded_file_content.chomp).to eq("goodbye cruel world")
|
|
23
44
|
end
|
|
24
45
|
end
|
|
25
46
|
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
describe VagrantWindows::Communication::WinRMFinder, :unit => true do
|
|
4
|
+
|
|
5
|
+
before(:each) do
|
|
6
|
+
@machine = stub()
|
|
7
|
+
@winrmfinder = VagrantWindows::Communication::WinRMFinder.new(@machine)
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
describe 'winrm_host_address' do
|
|
11
|
+
it 'should raise WinRMNotReady exception when ssh_info is nil' do
|
|
12
|
+
@machine.stubs(:ssh_info).returns(nil)
|
|
13
|
+
expect { @winrmfinder.winrm_host_address() }.to raise_error(VagrantWindows::Errors::WinRMNotReady)
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
it 'should return ssh_info host if config host has no value' do
|
|
17
|
+
# setup the winrm config to return nil for the host (i.e. the default)
|
|
18
|
+
winrm_config = VagrantWindows::Config::WinRM.new()
|
|
19
|
+
winrm_config.finalize!()
|
|
20
|
+
@machine.stubs(:winrm_config).returns(winrm_config)
|
|
21
|
+
|
|
22
|
+
# setup the machine ssh_info to return a 10.0.0.1
|
|
23
|
+
@machine.stubs(:ssh_info).returns({ :host => '10.0.0.1' })
|
|
24
|
+
|
|
25
|
+
expect(@winrmfinder.winrm_host_address()).to eq('10.0.0.1')
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
it 'should return host config if set (issue 104)' do
|
|
29
|
+
# setup the winrm config to return nil for the host (i.e. the default)
|
|
30
|
+
winrm_config = VagrantWindows::Config::WinRM.new()
|
|
31
|
+
winrm_config.host = '10.0.0.1'
|
|
32
|
+
winrm_config.finalize!()
|
|
33
|
+
@machine.stubs(:winrm_config).returns(winrm_config)
|
|
34
|
+
|
|
35
|
+
# setup the machine ssh_info to return a 10.0.0.1
|
|
36
|
+
@machine.stubs(:ssh_info).returns({ :host => '127.0.0.1' })
|
|
37
|
+
|
|
38
|
+
expect(@winrmfinder.winrm_host_address()).to eq('10.0.0.1')
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
end
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
describe VagrantWindows::Communication::WinRMShell, :integration => true do
|
|
4
|
+
|
|
5
|
+
before(:all) do
|
|
6
|
+
# This test requires you already have a running Windows Server 2008 R2 Vagrant VM
|
|
7
|
+
# Not ideal, but you have to start somewhere
|
|
8
|
+
@shell = VagrantWindows::Communication::WinRMShell.new("127.0.0.1", "vagrant", "vagrant")
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
describe "powershell" do
|
|
12
|
+
it "should return exit code of 0" do
|
|
13
|
+
expect(@shell.powershell("exit 0")[:exitcode]).to eq(0)
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
it "should return exit code greater than 0" do
|
|
17
|
+
expect(@shell.powershell("exit 1")[:exitcode]).to eq(1)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
it "should return stdout" do
|
|
21
|
+
result = @shell.powershell("dir") do |type, line|
|
|
22
|
+
expect(type).to eq(:stdout)
|
|
23
|
+
expect(line.length).to be > 1
|
|
24
|
+
end
|
|
25
|
+
expect(result[:exitcode]).to eq(0)
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
describe "cmd" do
|
|
30
|
+
it "should return stdout" do
|
|
31
|
+
result = @shell.cmd("dir") do |type, line|
|
|
32
|
+
expect(type).to eq(:stdout)
|
|
33
|
+
expect(line.length).to be > 1
|
|
34
|
+
end
|
|
35
|
+
expect(result[:exitcode]).to eq(0)
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
end
|
data/test.ps1
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
echo 'hi'
|
data/vagrant-windows.gemspec
CHANGED
|
@@ -2,11 +2,14 @@
|
|
|
2
2
|
require File.expand_path('../lib/vagrant-windows/version', __FILE__)
|
|
3
3
|
|
|
4
4
|
Gem::Specification.new do |gem|
|
|
5
|
-
gem.
|
|
6
|
-
gem.
|
|
5
|
+
gem.name = "vagrant-windows"
|
|
6
|
+
gem.version = VagrantWindows::VERSION
|
|
7
|
+
gem.authors = ["Paul Morton", "Shawn Neal"]
|
|
8
|
+
gem.email = ["pmorton@biaprotect.com", "sneal@sneal.net"]
|
|
7
9
|
gem.description = %q{Windows Guest Support for Vagrant}
|
|
8
10
|
gem.summary = %q{A small gem that adds windows guest support to vagrant, uses WinRM as the Communication Channel}
|
|
9
|
-
gem.homepage = ""
|
|
11
|
+
gem.homepage = "https://github.com/WinRb/vagrant-windows"
|
|
12
|
+
gem.license = "APACHE2"
|
|
10
13
|
|
|
11
14
|
# The following block of code determines the files that should be included
|
|
12
15
|
# in the gem. It does this by reading all the files in the directory where
|
|
@@ -42,9 +45,7 @@ Gem::Specification.new do |gem|
|
|
|
42
45
|
gem.files = unignored_files
|
|
43
46
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
|
44
47
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
|
45
|
-
gem.name = "vagrant-windows"
|
|
46
48
|
gem.require_paths = ["lib"]
|
|
47
|
-
gem.version = VagrantWindows::VERSION
|
|
48
49
|
|
|
49
50
|
gem.add_runtime_dependency "winrm", "~> 1.1.1"
|
|
50
51
|
|
metadata
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: vagrant-windows
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.3.1
|
|
5
|
+
prerelease:
|
|
5
6
|
platform: ruby
|
|
6
7
|
authors:
|
|
7
8
|
- Paul Morton
|
|
9
|
+
- Shawn Neal
|
|
8
10
|
autorequire:
|
|
9
11
|
bindir: bin
|
|
10
12
|
cert_chain: []
|
|
11
|
-
date: 2013-
|
|
13
|
+
date: 2013-12-02 00:00:00.000000000 Z
|
|
12
14
|
dependencies:
|
|
13
15
|
- !ruby/object:Gem::Dependency
|
|
14
16
|
name: winrm
|
|
15
17
|
requirement: !ruby/object:Gem::Requirement
|
|
18
|
+
none: false
|
|
16
19
|
requirements:
|
|
17
20
|
- - ~>
|
|
18
21
|
- !ruby/object:Gem::Version
|
|
@@ -20,6 +23,7 @@ dependencies:
|
|
|
20
23
|
type: :runtime
|
|
21
24
|
prerelease: false
|
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
|
26
|
+
none: false
|
|
23
27
|
requirements:
|
|
24
28
|
- - ~>
|
|
25
29
|
- !ruby/object:Gem::Version
|
|
@@ -27,20 +31,23 @@ dependencies:
|
|
|
27
31
|
- !ruby/object:Gem::Dependency
|
|
28
32
|
name: rake
|
|
29
33
|
requirement: !ruby/object:Gem::Requirement
|
|
34
|
+
none: false
|
|
30
35
|
requirements:
|
|
31
|
-
- - '>='
|
|
36
|
+
- - ! '>='
|
|
32
37
|
- !ruby/object:Gem::Version
|
|
33
38
|
version: '0'
|
|
34
39
|
type: :development
|
|
35
40
|
prerelease: false
|
|
36
41
|
version_requirements: !ruby/object:Gem::Requirement
|
|
42
|
+
none: false
|
|
37
43
|
requirements:
|
|
38
|
-
- - '>='
|
|
44
|
+
- - ! '>='
|
|
39
45
|
- !ruby/object:Gem::Version
|
|
40
46
|
version: '0'
|
|
41
47
|
- !ruby/object:Gem::Dependency
|
|
42
48
|
name: rspec-core
|
|
43
49
|
requirement: !ruby/object:Gem::Requirement
|
|
50
|
+
none: false
|
|
44
51
|
requirements:
|
|
45
52
|
- - ~>
|
|
46
53
|
- !ruby/object:Gem::Version
|
|
@@ -48,6 +55,7 @@ dependencies:
|
|
|
48
55
|
type: :development
|
|
49
56
|
prerelease: false
|
|
50
57
|
version_requirements: !ruby/object:Gem::Requirement
|
|
58
|
+
none: false
|
|
51
59
|
requirements:
|
|
52
60
|
- - ~>
|
|
53
61
|
- !ruby/object:Gem::Version
|
|
@@ -55,6 +63,7 @@ dependencies:
|
|
|
55
63
|
- !ruby/object:Gem::Dependency
|
|
56
64
|
name: rspec-expectations
|
|
57
65
|
requirement: !ruby/object:Gem::Requirement
|
|
66
|
+
none: false
|
|
58
67
|
requirements:
|
|
59
68
|
- - ~>
|
|
60
69
|
- !ruby/object:Gem::Version
|
|
@@ -62,6 +71,7 @@ dependencies:
|
|
|
62
71
|
type: :development
|
|
63
72
|
prerelease: false
|
|
64
73
|
version_requirements: !ruby/object:Gem::Requirement
|
|
74
|
+
none: false
|
|
65
75
|
requirements:
|
|
66
76
|
- - ~>
|
|
67
77
|
- !ruby/object:Gem::Version
|
|
@@ -69,6 +79,7 @@ dependencies:
|
|
|
69
79
|
- !ruby/object:Gem::Dependency
|
|
70
80
|
name: rspec-mocks
|
|
71
81
|
requirement: !ruby/object:Gem::Requirement
|
|
82
|
+
none: false
|
|
72
83
|
requirements:
|
|
73
84
|
- - ~>
|
|
74
85
|
- !ruby/object:Gem::Version
|
|
@@ -76,6 +87,7 @@ dependencies:
|
|
|
76
87
|
type: :development
|
|
77
88
|
prerelease: false
|
|
78
89
|
version_requirements: !ruby/object:Gem::Requirement
|
|
90
|
+
none: false
|
|
79
91
|
requirements:
|
|
80
92
|
- - ~>
|
|
81
93
|
- !ruby/object:Gem::Version
|
|
@@ -83,24 +95,28 @@ dependencies:
|
|
|
83
95
|
- !ruby/object:Gem::Dependency
|
|
84
96
|
name: simplecov
|
|
85
97
|
requirement: !ruby/object:Gem::Requirement
|
|
98
|
+
none: false
|
|
86
99
|
requirements:
|
|
87
|
-
- - '>='
|
|
100
|
+
- - ! '>='
|
|
88
101
|
- !ruby/object:Gem::Version
|
|
89
102
|
version: '0'
|
|
90
103
|
type: :development
|
|
91
104
|
prerelease: false
|
|
92
105
|
version_requirements: !ruby/object:Gem::Requirement
|
|
106
|
+
none: false
|
|
93
107
|
requirements:
|
|
94
|
-
- - '>='
|
|
108
|
+
- - ! '>='
|
|
95
109
|
- !ruby/object:Gem::Version
|
|
96
110
|
version: '0'
|
|
97
111
|
description: Windows Guest Support for Vagrant
|
|
98
112
|
email:
|
|
99
113
|
- pmorton@biaprotect.com
|
|
114
|
+
- sneal@sneal.net
|
|
100
115
|
executables: []
|
|
101
116
|
extensions: []
|
|
102
117
|
extra_rdoc_files: []
|
|
103
118
|
files:
|
|
119
|
+
- CHANGELOG.md
|
|
104
120
|
- coverage/assets/0.7.1/application.css
|
|
105
121
|
- coverage/assets/0.7.1/application.js
|
|
106
122
|
- coverage/assets/0.7.1/fancybox/blank.gif
|
|
@@ -143,18 +159,19 @@ files:
|
|
|
143
159
|
- coverage/assets/0.7.1/smoothness/images/ui-icons_cd0a0a_256x240.png
|
|
144
160
|
- coverage/index.html
|
|
145
161
|
- Gemfile
|
|
162
|
+
- init.pp
|
|
146
163
|
- lib/vagrant-windows/communication/guestnetwork.rb
|
|
147
164
|
- lib/vagrant-windows/communication/winrmcommunicator.rb
|
|
148
165
|
- lib/vagrant-windows/communication/winrmfinder.rb
|
|
149
166
|
- lib/vagrant-windows/communication/winrmshell.rb
|
|
167
|
+
- lib/vagrant-windows/communication/winrmshell_factory.rb
|
|
150
168
|
- lib/vagrant-windows/config/windows.rb
|
|
151
169
|
- lib/vagrant-windows/config/winrm.rb
|
|
152
170
|
- lib/vagrant-windows/errors.rb
|
|
153
171
|
- lib/vagrant-windows/guest/cap/change_host_name.rb
|
|
154
172
|
- lib/vagrant-windows/guest/cap/configure_networks.rb
|
|
155
173
|
- lib/vagrant-windows/guest/cap/halt.rb
|
|
156
|
-
- lib/vagrant-windows/guest/cap/
|
|
157
|
-
- lib/vagrant-windows/guest/cap/mount_vmware_shared_folder.rb
|
|
174
|
+
- lib/vagrant-windows/guest/cap/mount_shared_folder.rb
|
|
158
175
|
- lib/vagrant-windows/guest/windows.rb
|
|
159
176
|
- lib/vagrant-windows/helper.rb
|
|
160
177
|
- lib/vagrant-windows/monkey_patches/lib/vagrant/machine.rb
|
|
@@ -170,52 +187,75 @@ files:
|
|
|
170
187
|
- lib/vagrant-windows/scripts/cheftask.xml.erb
|
|
171
188
|
- lib/vagrant-windows/scripts/cheftaskrun.ps1.erb
|
|
172
189
|
- lib/vagrant-windows/scripts/command_alias.ps1
|
|
173
|
-
- lib/vagrant-windows/scripts/mount_volume.
|
|
174
|
-
- lib/vagrant-windows/scripts/
|
|
190
|
+
- lib/vagrant-windows/scripts/mount_volume.ps1.erb
|
|
191
|
+
- lib/vagrant-windows/scripts/reboot_detect.ps1
|
|
175
192
|
- lib/vagrant-windows/scripts/set_work_network.ps1
|
|
176
193
|
- lib/vagrant-windows/scripts/winrs_v3_get_adapters.ps1
|
|
177
194
|
- lib/vagrant-windows/version.rb
|
|
195
|
+
- lib/vagrant-windows/windows_machine.rb
|
|
178
196
|
- lib/vagrant-windows.rb
|
|
197
|
+
- LICENSE
|
|
179
198
|
- locales/en.yml
|
|
199
|
+
- puppet-3.3.2.msi
|
|
180
200
|
- Rakefile
|
|
181
201
|
- README.md
|
|
182
202
|
- spec/spec_helper.rb
|
|
183
|
-
- spec/vagrant-windows/config_spec.rb
|
|
184
203
|
- spec/vagrant-windows/guestnetwork_spec.rb
|
|
185
204
|
- spec/vagrant-windows/helper_spec.rb
|
|
205
|
+
- spec/vagrant-windows/mount_shared_folder_spec.rb
|
|
206
|
+
- spec/vagrant-windows/windows_config_spec.rb
|
|
207
|
+
- spec/vagrant-windows/windows_machine_spec.rb
|
|
208
|
+
- spec/vagrant-windows/winrm_config_spec.rb
|
|
186
209
|
- spec/vagrant-windows/winrmcommunicator_spec.rb
|
|
210
|
+
- spec/vagrant-windows/winrmfinder_spec.rb
|
|
211
|
+
- spec/vagrant-windows/winrmshell_spec.rb
|
|
212
|
+
- test.ps1
|
|
187
213
|
- vagrant-windows.gemspec
|
|
214
|
+
- .DS_Store
|
|
188
215
|
- .gitignore
|
|
189
216
|
- .travis.yml
|
|
190
217
|
- coverage/.last_run.json
|
|
191
218
|
- coverage/.resultset.json
|
|
192
|
-
homepage:
|
|
193
|
-
licenses:
|
|
194
|
-
|
|
219
|
+
homepage: https://github.com/WinRb/vagrant-windows
|
|
220
|
+
licenses:
|
|
221
|
+
- APACHE2
|
|
195
222
|
post_install_message:
|
|
196
223
|
rdoc_options: []
|
|
197
224
|
require_paths:
|
|
198
225
|
- lib
|
|
199
226
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
227
|
+
none: false
|
|
200
228
|
requirements:
|
|
201
|
-
- - '>='
|
|
229
|
+
- - ! '>='
|
|
202
230
|
- !ruby/object:Gem::Version
|
|
203
231
|
version: '0'
|
|
232
|
+
segments:
|
|
233
|
+
- 0
|
|
234
|
+
hash: -417370087256644247
|
|
204
235
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
236
|
+
none: false
|
|
205
237
|
requirements:
|
|
206
|
-
- - '>='
|
|
238
|
+
- - ! '>='
|
|
207
239
|
- !ruby/object:Gem::Version
|
|
208
240
|
version: '0'
|
|
241
|
+
segments:
|
|
242
|
+
- 0
|
|
243
|
+
hash: -417370087256644247
|
|
209
244
|
requirements: []
|
|
210
245
|
rubyforge_project:
|
|
211
|
-
rubygems_version:
|
|
246
|
+
rubygems_version: 1.8.23
|
|
212
247
|
signing_key:
|
|
213
|
-
specification_version:
|
|
248
|
+
specification_version: 3
|
|
214
249
|
summary: A small gem that adds windows guest support to vagrant, uses WinRM as the
|
|
215
250
|
Communication Channel
|
|
216
251
|
test_files:
|
|
217
252
|
- spec/spec_helper.rb
|
|
218
|
-
- spec/vagrant-windows/config_spec.rb
|
|
219
253
|
- spec/vagrant-windows/guestnetwork_spec.rb
|
|
220
254
|
- spec/vagrant-windows/helper_spec.rb
|
|
255
|
+
- spec/vagrant-windows/mount_shared_folder_spec.rb
|
|
256
|
+
- spec/vagrant-windows/windows_config_spec.rb
|
|
257
|
+
- spec/vagrant-windows/windows_machine_spec.rb
|
|
258
|
+
- spec/vagrant-windows/winrm_config_spec.rb
|
|
221
259
|
- spec/vagrant-windows/winrmcommunicator_spec.rb
|
|
260
|
+
- spec/vagrant-windows/winrmfinder_spec.rb
|
|
261
|
+
- spec/vagrant-windows/winrmshell_spec.rb
|
checksums.yaml
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
SHA1:
|
|
3
|
-
metadata.gz: cecfc851c351d99894540e03b595c9ed93fb313b
|
|
4
|
-
data.tar.gz: 325c6d920df52dc61f4db48e64337b88480a1b0d
|
|
5
|
-
SHA512:
|
|
6
|
-
metadata.gz: c5d93cd182875294ee9c50911b272363752039d8ab1ccae5c620291b109eb7c04a3ec8073901982e64fa040b04678197936fc8f2fe97d925ebb71fb8c230c438
|
|
7
|
-
data.tar.gz: 9932265ce43b14f7b942146291e1696d861c2070d8b79b147bda0b02bc4e41ac486b8996e20fac232802ddea0b083f276e2dddd7f7692cd5e49a711033fc2582
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
require_relative '../../helper'
|
|
2
|
-
|
|
3
|
-
module VagrantWindows
|
|
4
|
-
module Guest
|
|
5
|
-
module Cap
|
|
6
|
-
class MountVirtualBoxSharedFolder
|
|
7
|
-
|
|
8
|
-
def self.mount_virtualbox_shared_folder(machine, name, guestpath, options)
|
|
9
|
-
share_name = VagrantWindows::Helper.win_friendly_share_id(name)
|
|
10
|
-
mount_script = VagrantWindows.load_script_template("mount_volume.virtualbox.ps1",
|
|
11
|
-
:options => {:mount_point => guestpath, :share_name => share_name})
|
|
12
|
-
machine.communicate.execute(mount_script, {:shell => :powershell})
|
|
13
|
-
end
|
|
14
|
-
end
|
|
15
|
-
end
|
|
16
|
-
end
|
|
17
|
-
end
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
module VagrantWindows
|
|
2
|
-
module Guest
|
|
3
|
-
module Cap
|
|
4
|
-
class MountVMwareSharedFolder
|
|
5
|
-
|
|
6
|
-
def self.mount_vmware_shared_folder(machine, name, guestpath, options)
|
|
7
|
-
share_name = VagrantWindows::Helper.win_friendly_share_id(name)
|
|
8
|
-
mount_script = VagrantWindows.load_script_template("mount_volume.vmware.ps1",
|
|
9
|
-
:options => {:mount_point => guestpath, :share_name => share_name})
|
|
10
|
-
machine.communicate.execute(mount_script, {:shell => :powershell})
|
|
11
|
-
end
|
|
12
|
-
end
|
|
13
|
-
end
|
|
14
|
-
end
|
|
15
|
-
end
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
function Test-ReparsePoint([string]$path) {
|
|
3
|
-
$file = Get-Item $path -Force -ea 0
|
|
4
|
-
return [bool]($file.Attributes -band [IO.FileAttributes]::ReparsePoint)
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
$MountPoint = [System.IO.Path]::GetFullPath("<%= options[:mount_point] %>")
|
|
9
|
-
$ShareName = "<%= options[:share_name] %>"
|
|
10
|
-
|
|
11
|
-
# https://github.com/BIAINC/vagrant-windows/issues/4
|
|
12
|
-
# Not sure why this works, but it does.
|
|
13
|
-
|
|
14
|
-
& net use $ShareName 2>&1 | Out-Null
|
|
15
|
-
|
|
16
|
-
Write-Debug "Attempting to mount $ShareName to $MountPoint"
|
|
17
|
-
if( (Test-Path "$MountPoint") -and (Test-ReparsePoint "$MountPoint") )
|
|
18
|
-
{
|
|
19
|
-
Write-Debug "Junction already exists, so I will delete it"
|
|
20
|
-
# Powershell refuses to delete junctions, oh well use cmd
|
|
21
|
-
cmd /c rd "$MountPoint"
|
|
22
|
-
|
|
23
|
-
if ( $LASTEXITCODE -ne 0 )
|
|
24
|
-
{
|
|
25
|
-
Write-Error "Failed to delete symbolic link at $MountPoint"
|
|
26
|
-
exit 1
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
elseif(Test-Path $MountPoint)
|
|
31
|
-
{
|
|
32
|
-
Write-Debug "Mount point already exists and is not a symbolic link"
|
|
33
|
-
exit 1
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
$BaseDirectory = [System.IO.Path]::GetDirectoryName($MountPoint)
|
|
37
|
-
|
|
38
|
-
if (-not (Test-Path $BaseDirectory))
|
|
39
|
-
{
|
|
40
|
-
Write-Debug "Creating parent directory for mount point $BaseDirectory"
|
|
41
|
-
New-Item $BaseDirectory -Type Directory -Force | Out-Null
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
cmd /c mklink /D "$MountPoint" "\\vboxsrv\$ShareName" | out-null
|
|
45
|
-
|
|
46
|
-
if ( $LASTEXITCODE -ne 0 )
|
|
47
|
-
{
|
|
48
|
-
exit 1
|
|
49
|
-
}
|