vagrant-windows 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +7 -1
- data/Gemfile.lock +40 -7
- data/README.md +16 -0
- data/Rakefile +14 -1
- data/lib/vagrant-windows/guest/windows.rb +1 -8
- data/lib/vagrant-windows/monkey_patches/vbox_42_driver.rb +20 -0
- data/lib/vagrant-windows/plugin.rb +3 -0
- data/lib/vagrant-windows/version.rb +1 -1
- data/spec/vagrant-windows/config_spec.rb +58 -0
- data/vagrant-windows.gemspec +6 -1
- metadata +62 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e8275a55fe7f1a0a294fbe31a81a6e6e6a6014b2
|
4
|
+
data.tar.gz: dc9745a62fe13ee73cb65812e4698051f726508c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad5f812d845fce099340ba355bef6b6e041576125483e706b989c6b092005f0aa45375f0f4a24981834710eebaadde495eda90c499a943fded37783fe75e6b18
|
7
|
+
data.tar.gz: 7f504f4eb7aac168441142cb90225fbf22f6535f330c33c384f9eac2bc29238faddd886715235c4a4f3ed88760ddad13ab900e3a42f27774f972e1bb18e8b2e4
|
data/Gemfile
CHANGED
@@ -1,5 +1,11 @@
|
|
1
|
-
source
|
1
|
+
source "https://rubygems.org"
|
2
2
|
|
3
3
|
# Specify your gem's dependencies in my_gem.gemspec
|
4
4
|
gemspec
|
5
5
|
|
6
|
+
group :development do
|
7
|
+
# We depend on Vagrant for development, but we don't add it as a
|
8
|
+
# gem dependency because we expect to be installed within the
|
9
|
+
# Vagrant environment itself using `vagrant plugin`.
|
10
|
+
gem "vagrant", :git => "git://github.com/mitchellh/vagrant.git"
|
11
|
+
end
|
data/Gemfile.lock
CHANGED
@@ -1,32 +1,60 @@
|
|
1
|
+
GIT
|
2
|
+
remote: git://github.com/mitchellh/vagrant.git
|
3
|
+
revision: 52448c97cc1ee506bacdff4bd679ca497bd7cf1c
|
4
|
+
specs:
|
5
|
+
vagrant (1.2.3.dev)
|
6
|
+
childprocess (~> 0.3.7)
|
7
|
+
erubis (~> 2.7.0)
|
8
|
+
i18n (~> 0.6.0)
|
9
|
+
json (>= 1.5.1, < 1.8.0)
|
10
|
+
log4r (~> 1.1.9)
|
11
|
+
net-scp (~> 1.1.0)
|
12
|
+
net-ssh (~> 2.6.6)
|
13
|
+
|
1
14
|
PATH
|
2
15
|
remote: .
|
3
16
|
specs:
|
4
|
-
vagrant-windows (0.
|
17
|
+
vagrant-windows (1.0.1)
|
5
18
|
highline
|
6
19
|
winrm (~> 1.1.1)
|
7
20
|
|
8
21
|
GEM
|
9
|
-
remote:
|
22
|
+
remote: https://rubygems.org/
|
10
23
|
specs:
|
11
24
|
akami (1.2.0)
|
12
25
|
gyoku (>= 0.4.0)
|
13
26
|
nokogiri (>= 1.4.0)
|
14
|
-
builder (3.0
|
27
|
+
builder (3.2.0)
|
28
|
+
childprocess (0.3.9)
|
29
|
+
ffi (~> 1.0, >= 1.0.11)
|
30
|
+
diff-lcs (1.1.3)
|
31
|
+
erubis (2.7.0)
|
15
32
|
ffi (1.4.0)
|
16
33
|
gssapi (1.0.3)
|
17
34
|
ffi (>= 1.0.1)
|
18
|
-
gyoku (0.
|
35
|
+
gyoku (1.0.0)
|
19
36
|
builder (>= 2.1.2)
|
20
|
-
highline (1.6.
|
37
|
+
highline (1.6.16)
|
21
38
|
httpclient (2.2.0.2)
|
22
39
|
httpi (0.9.7)
|
23
40
|
rack
|
41
|
+
i18n (0.6.4)
|
42
|
+
json (1.7.7)
|
24
43
|
little-plugger (1.1.3)
|
44
|
+
log4r (1.1.10)
|
25
45
|
logging (1.6.2)
|
26
46
|
little-plugger (>= 1.1.3)
|
27
|
-
|
28
|
-
|
47
|
+
net-scp (1.1.0)
|
48
|
+
net-ssh (>= 2.6.5)
|
49
|
+
net-ssh (2.6.7)
|
50
|
+
nokogiri (1.5.9)
|
51
|
+
nori (1.1.5)
|
29
52
|
rack (1.5.2)
|
53
|
+
rake (10.0.4)
|
54
|
+
rspec-core (2.12.2)
|
55
|
+
rspec-expectations (2.12.1)
|
56
|
+
diff-lcs (~> 1.1.3)
|
57
|
+
rspec-mocks (2.12.2)
|
30
58
|
rubyntlm (0.1.1)
|
31
59
|
savon (0.9.5)
|
32
60
|
akami (~> 1.0)
|
@@ -52,4 +80,9 @@ PLATFORMS
|
|
52
80
|
ruby
|
53
81
|
|
54
82
|
DEPENDENCIES
|
83
|
+
rake
|
84
|
+
rspec-core (~> 2.12.2)
|
85
|
+
rspec-expectations (~> 2.12.1)
|
86
|
+
rspec-mocks (~> 2.12.1)
|
87
|
+
vagrant!
|
55
88
|
vagrant-windows!
|
data/README.md
CHANGED
@@ -138,6 +138,19 @@ Contributing
|
|
138
138
|
4. Push to the branch (git push origin my_feature_branch)
|
139
139
|
5. Create a pull requst from your branch into master (Please be sure to provide enough detail for us to cipher what this change is doing)
|
140
140
|
|
141
|
+
Running tests
|
142
|
+
=============
|
143
|
+
Clone this repository and use [Bundler](http://gembundler.com) to get the dependencies:
|
144
|
+
|
145
|
+
```
|
146
|
+
$ bundle install
|
147
|
+
```
|
148
|
+
|
149
|
+
Once you have the dependencies, you can run the tests with `rake`:
|
150
|
+
|
151
|
+
```
|
152
|
+
$ rake spec
|
153
|
+
```
|
141
154
|
|
142
155
|
References and Shout Outs
|
143
156
|
=========================
|
@@ -155,3 +168,6 @@ Changelog
|
|
155
168
|
0.1.3 - Added puppet provisioner.
|
156
169
|
|
157
170
|
1.0.0 - Converted to Vagrant 1.1.x plugin architecture.
|
171
|
+
|
172
|
+
1.1.1 - Fix #29 Monkey Patch the 4.2 driver to include read_mac_addresses.
|
173
|
+
use read_mac_addresses in all cases.
|
data/Rakefile
CHANGED
@@ -1,2 +1,15 @@
|
|
1
|
-
|
1
|
+
require 'rubygems'
|
2
|
+
require 'bundler/setup'
|
3
|
+
require 'rspec/core/rake_task'
|
4
|
+
|
5
|
+
# Change to the directory of this file.
|
6
|
+
Dir.chdir(File.expand_path("../", __FILE__))
|
7
|
+
|
8
|
+
# For gem creation and bundling
|
2
9
|
require "bundler/gem_tasks"
|
10
|
+
|
11
|
+
# Install the `spec` task so that we can run tests.
|
12
|
+
RSpec::Core::RakeTask.new
|
13
|
+
|
14
|
+
# Default task is to run the unit tests
|
15
|
+
task :default => "build"
|
@@ -67,14 +67,7 @@ module VagrantWindows
|
|
67
67
|
|
68
68
|
def configure_networks(networks)
|
69
69
|
@logger.info("configure_networks: #{networks.inspect}")
|
70
|
-
|
71
|
-
# The VBox driver 4.0 and 4.1 implement read_mac_addresses, but 4.2 does not?
|
72
|
-
begin
|
73
|
-
driver_mac_address = @machine.provider.driver.read_mac_addresses.invert
|
74
|
-
rescue NoMethodError
|
75
|
-
driver_mac_address = {}
|
76
|
-
driver_mac_address[@machine.provider.driver.read_mac_address] = "macaddress1"
|
77
|
-
end
|
70
|
+
driver_mac_address = @machine.provider.driver.read_mac_addresses.invert
|
78
71
|
|
79
72
|
vm_interface_map = {}
|
80
73
|
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module VagrantPlugins
|
2
|
+
module ProviderVirtualBox
|
3
|
+
module Driver
|
4
|
+
class Version_4_2
|
5
|
+
def read_mac_addresses
|
6
|
+
macs = {}
|
7
|
+
info = execute("showvminfo", @uuid, "--machinereadable", :retryable => true)
|
8
|
+
info.split("\n").each do |line|
|
9
|
+
if matcher = /^macaddress(\d+)="(.+?)"$/.match(line)
|
10
|
+
adapter = matcher[1].to_i
|
11
|
+
mac = matcher[2].to_s
|
12
|
+
macs[adapter] = mac
|
13
|
+
end
|
14
|
+
end
|
15
|
+
macs
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -16,6 +16,9 @@ require "vagrant-windows/errors"
|
|
16
16
|
# Add Vagrant WinRM communication channel
|
17
17
|
require "vagrant-windows/communication/winrmcommunicator"
|
18
18
|
|
19
|
+
# Monkey patch the Puppet provisioner to support PowerShell/Windows
|
20
|
+
require "vagrant-windows/monkey_patches/vbox_42_driver"
|
21
|
+
|
19
22
|
# Monkey Patch the VM object to support multiple channels, i.e. WinRM
|
20
23
|
require "vagrant-windows/monkey_patches/machine"
|
21
24
|
|
@@ -0,0 +1,58 @@
|
|
1
|
+
require "vagrant-windows/config/windows"
|
2
|
+
require "vagrant-windows/config/winrm"
|
3
|
+
|
4
|
+
describe VagrantWindows::Config::Windows do
|
5
|
+
let(:instance) { described_class.new }
|
6
|
+
|
7
|
+
describe "defaults" do
|
8
|
+
subject do
|
9
|
+
instance.tap do |o|
|
10
|
+
o.finalize!
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
its("halt_timeout") { should == 30 }
|
15
|
+
its("halt_check_interval") { should == 1 }
|
16
|
+
end
|
17
|
+
|
18
|
+
describe "overriding defaults" do
|
19
|
+
[:halt_timeout, :halt_check_interval].each do |attribute|
|
20
|
+
it "should not default #{attribute} if overridden" do
|
21
|
+
instance.send("#{attribute}=".to_sym, 10)
|
22
|
+
instance.finalize!
|
23
|
+
instance.send(attribute).should == 10
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
|
30
|
+
describe VagrantWindows::Config::WinRM do
|
31
|
+
let(:instance) { described_class.new }
|
32
|
+
|
33
|
+
describe "defaults" do
|
34
|
+
subject do
|
35
|
+
instance.tap do |o|
|
36
|
+
o.finalize!
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
its("username") { should == "vagrant" }
|
41
|
+
its("password") { should == "vagrant" }
|
42
|
+
its("host") { should == "localhost" }
|
43
|
+
its("port") { should == 5985 }
|
44
|
+
its("guest_port") { should == 5985 }
|
45
|
+
its("max_tries") { should == 12 }
|
46
|
+
its("timeout") { should == 1800 }
|
47
|
+
end
|
48
|
+
|
49
|
+
describe "overriding defaults" do
|
50
|
+
[:username, :password, :host, :port, :guest_port, :max_tries, :timeout].each do |attribute|
|
51
|
+
it "should not default #{attribute} if overridden" do
|
52
|
+
instance.send("#{attribute}=".to_sym, 10)
|
53
|
+
instance.finalize!
|
54
|
+
instance.send(attribute).should == 10
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
data/vagrant-windows.gemspec
CHANGED
@@ -17,4 +17,9 @@ Gem::Specification.new do |gem|
|
|
17
17
|
|
18
18
|
gem.add_runtime_dependency "winrm", "~> 1.1.1"
|
19
19
|
gem.add_runtime_dependency 'highline'
|
20
|
-
|
20
|
+
|
21
|
+
gem.add_development_dependency "rake"
|
22
|
+
gem.add_development_dependency "rspec-core", "~> 2.12.2"
|
23
|
+
gem.add_development_dependency "rspec-expectations", "~> 2.12.1"
|
24
|
+
gem.add_development_dependency "rspec-mocks", "~> 2.12.1"
|
25
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-windows
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paul Morton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-05-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: winrm
|
@@ -38,6 +38,62 @@ dependencies:
|
|
38
38
|
- - '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec-core
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 2.12.2
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ~>
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 2.12.2
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rspec-expectations
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ~>
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 2.12.1
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ~>
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 2.12.1
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rspec-mocks
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ~>
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 2.12.1
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ~>
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 2.12.1
|
41
97
|
description: Windows Guest Support for Vagrant
|
42
98
|
email:
|
43
99
|
- pmorton@biaprotect.com
|
@@ -59,12 +115,14 @@ files:
|
|
59
115
|
- lib/vagrant-windows/monkey_patches/chef_solo.rb
|
60
116
|
- lib/vagrant-windows/monkey_patches/machine.rb
|
61
117
|
- lib/vagrant-windows/monkey_patches/puppet.rb
|
118
|
+
- lib/vagrant-windows/monkey_patches/vbox_42_driver.rb
|
62
119
|
- lib/vagrant-windows/plugin.rb
|
63
120
|
- lib/vagrant-windows/scripts/command_alias.ps1
|
64
121
|
- lib/vagrant-windows/scripts/mount_volume.ps1.erb
|
65
122
|
- lib/vagrant-windows/scripts/ps_runas.ps1.erb
|
66
123
|
- lib/vagrant-windows/version.rb
|
67
124
|
- locales/en.yml
|
125
|
+
- spec/vagrant-windows/config_spec.rb
|
68
126
|
- vagrant-windows.gemspec
|
69
127
|
homepage: ''
|
70
128
|
licenses: []
|
@@ -90,4 +148,5 @@ signing_key:
|
|
90
148
|
specification_version: 4
|
91
149
|
summary: A small gem that adds windows guest support to vagrant, uses WinRM as the
|
92
150
|
Communication Channel
|
93
|
-
test_files:
|
151
|
+
test_files:
|
152
|
+
- spec/vagrant-windows/config_spec.rb
|