vagrant-windows 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +13 -0
- data/README.md +4 -4
- data/lib/vagrant-windows/communication/winrmcommunicator.rb +33 -6
- data/lib/vagrant-windows/communication/winrmfinder.rb +7 -4
- data/lib/vagrant-windows/communication/winrmshell.rb +14 -16
- data/lib/vagrant-windows/config/winrm.rb +1 -2
- data/lib/vagrant-windows/errors.rb +2 -2
- data/lib/vagrant-windows/guest/windows.rb +2 -2
- data/lib/vagrant-windows/monkey_patches/plugins/provisioners/puppet/provisioner/puppet.rb +23 -10
- data/lib/vagrant-windows/version.rb +1 -1
- data/locales/en.yml +2 -5
- data/spec/vagrant-windows/windows_config_spec.rb +26 -0
- data/spec/vagrant-windows/{config_spec.rb → winrm_config_spec.rb} +2 -28
- data/spec/vagrant-windows/winrmcommunicator_spec.rb +9 -7
- data/spec/vagrant-windows/winrmfinder_spec.rb +44 -0
- data/spec/vagrant-windows/winrmshell_spec.rb +39 -0
- data/vagrant-windows.gemspec +6 -5
- metadata +18 -8
data/LICENSE
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
Copyright (c) 2013 Paul Morton, Shawn Neal
|
2
|
+
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
you may not use this file except in compliance with the License.
|
5
|
+
You may obtain a copy of the License at
|
6
|
+
|
7
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
|
9
|
+
Unless required by applicable law or agreed to in writing, software
|
10
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
See the License for the specific language governing permissions and
|
13
|
+
limitations under the License.
|
data/README.md
CHANGED
@@ -20,12 +20,12 @@ Use Windows guests with Vagrant
|
|
20
20
|
|
21
21
|
Supported Guest Operating Systems:
|
22
22
|
- Windows 7
|
23
|
-
- Windows 2008
|
24
|
-
- Windows 2008 R2
|
25
|
-
- Windows 2012
|
26
23
|
- Windows 8
|
24
|
+
- Windows Server 2008
|
25
|
+
- Windows Server 2008 R2
|
26
|
+
- Windows Server 2012
|
27
27
|
|
28
|
-
Windows Server 2003 and Windows XP are not supported.
|
28
|
+
Windows Server 2003 and Windows XP are not supported by the maintainers of this project. Any issues regarding any unsupported guest OS will be closed. If you still insist on using XP or Server 2003, [this](http://stackoverflow.com/a/18593425/18475) may help.
|
29
29
|
|
30
30
|
You'll need to create a new Vagrant base box. Create a new Windows VM in VirtualBox, configure some Windows settings (see below) then follow the [Vagrant packaging instructions](http://docs.vagrantup.com/v2/cli/package.html).
|
31
31
|
|
@@ -42,19 +42,29 @@ module VagrantWindows
|
|
42
42
|
end
|
43
43
|
|
44
44
|
def execute(command, opts={}, &block)
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
45
|
+
opts = {
|
46
|
+
:error_check => true,
|
47
|
+
:error_class => VagrantWindows::Errors::WinRMExecutionError,
|
48
|
+
:error_key => :winrm_execution_error,
|
49
|
+
:command => command,
|
50
|
+
:shell => :powershell
|
51
|
+
}.merge(opts || {})
|
52
|
+
exit_status = do_execute(command, opts[:shell], &block)
|
53
|
+
if opts[:error_check] && exit_status != 0
|
54
|
+
raise_execution_error(opts, exit_status)
|
50
55
|
end
|
56
|
+
exit_status
|
51
57
|
end
|
52
58
|
alias_method :sudo, :execute
|
53
59
|
|
54
60
|
def test(command, opts=nil)
|
61
|
+
@logger.debug("Testing: #{command}")
|
62
|
+
|
55
63
|
# HACK: to speed up Vagrant 1.2 OS detection, skip checking for *nix OS
|
56
64
|
return false unless (command =~ /^uname|^cat \/etc|^cat \/proc|grep 'Fedora/).nil?
|
57
|
-
|
65
|
+
|
66
|
+
opts = { :error_check => false }.merge(opts || {})
|
67
|
+
execute(command, opts) == 0
|
58
68
|
end
|
59
69
|
|
60
70
|
def upload(from, to)
|
@@ -103,6 +113,23 @@ module VagrantWindows
|
|
103
113
|
|
104
114
|
protected
|
105
115
|
|
116
|
+
def do_execute(command, shell, &block)
|
117
|
+
if shell.eql? :cmd
|
118
|
+
session.cmd(command, &block)[:exitcode]
|
119
|
+
else
|
120
|
+
command = VagrantWindows.load_script("command_alias.ps1") << "\r\n" << command
|
121
|
+
session.powershell(command, &block)[:exitcode]
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
125
|
+
def raise_execution_error(opts, exit_code)
|
126
|
+
# The error classes expect the translation key to be _key, but that makes for an ugly
|
127
|
+
# configuration parameter, so we set it here from `error_key`
|
128
|
+
msg = "Command execution failed with an exit code of #{exit_code}"
|
129
|
+
error_opts = opts.merge(:_key => opts[:error_key], :message => msg)
|
130
|
+
raise opts[:error_class], error_opts
|
131
|
+
end
|
132
|
+
|
106
133
|
def new_session
|
107
134
|
WinRMShell.new(
|
108
135
|
@winrm_finder.winrm_host_address(),
|
@@ -15,11 +15,14 @@ module VagrantWindows
|
|
15
15
|
|
16
16
|
def winrm_host_address
|
17
17
|
# Get the SSH info for the machine, raise an exception if the
|
18
|
-
# provider is saying that
|
18
|
+
# provider is saying that the machine is not ready.
|
19
19
|
ssh_info = @machine.ssh_info
|
20
|
-
raise
|
21
|
-
|
22
|
-
|
20
|
+
raise VagrantWindows::Errors::WinRMNotReady if ssh_info.nil?
|
21
|
+
|
22
|
+
# if the configuration has a host value, that takes precedence
|
23
|
+
host = @machine.config.winrm.host || ssh_info[:host]
|
24
|
+
@logger.info("WinRM host: #{host}")
|
25
|
+
host
|
23
26
|
end
|
24
27
|
|
25
28
|
def winrm_host_port
|
@@ -60,26 +60,24 @@ module VagrantWindows
|
|
60
60
|
protected
|
61
61
|
|
62
62
|
def execute_shell(command, shell=:powershell, &block)
|
63
|
+
raise Errors::WinRMInvalidShell, :shell => shell unless shell == :cmd || shell == :powershell
|
64
|
+
begin
|
65
|
+
execute_shell_with_retry(command, shell, &block)
|
66
|
+
rescue => e
|
67
|
+
raise_winrm_exception(e, shell, command)
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
def execute_shell_with_retry(command, shell, &block)
|
63
72
|
retryable(:tries => @max_tries, :on => @@exceptions_to_retry_on, :sleep => 10) do
|
64
73
|
@logger.debug("#{shell} executing:\n#{command}")
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
block.call(:stderr, err) if block_given? && err
|
69
|
-
end
|
70
|
-
elsif shell.eql? :powershell
|
71
|
-
output = session.powershell(command) do |out, err|
|
72
|
-
block.call(:stdout, out) if block_given? && out
|
73
|
-
block.call(:stderr, err) if block_given? && err
|
74
|
-
end
|
75
|
-
else
|
76
|
-
raise Errors::WinRMInvalidShell, :shell => shell
|
74
|
+
output = session.send(shell, command) do |out, err|
|
75
|
+
block.call(:stdout, out) if block_given? && out
|
76
|
+
block.call(:stderr, err) if block_given? && err
|
77
77
|
end
|
78
78
|
@logger.debug("Exit status: #{output[:exitcode].inspect}")
|
79
79
|
return output
|
80
80
|
end
|
81
|
-
rescue => e
|
82
|
-
handle_winrm_exception(e, shell, command)
|
83
81
|
end
|
84
82
|
|
85
83
|
def execute_wql(query)
|
@@ -90,10 +88,10 @@ module VagrantWindows
|
|
90
88
|
return output
|
91
89
|
end
|
92
90
|
rescue => e
|
93
|
-
|
91
|
+
raise_winrm_exception(e, :wql, query)
|
94
92
|
end
|
95
93
|
|
96
|
-
def
|
94
|
+
def raise_winrm_exception(winrm_exception, shell, command)
|
97
95
|
if winrm_exception.message.include?("401") # return a more specific auth error for 401 errors
|
98
96
|
raise Errors::WinRMAuthorizationError,
|
99
97
|
:user => @username,
|
@@ -27,7 +27,6 @@ module VagrantWindows
|
|
27
27
|
|
28
28
|
errors << "winrm.username cannot be nil." if machine.config.winrm.username.nil?
|
29
29
|
errors << "winrm.password cannot be nil." if machine.config.winrm.password.nil?
|
30
|
-
errors << "winrm.host cannot be nil." if machine.config.winrm.host.nil?
|
31
30
|
errors << "winrm.port cannot be nil." if machine.config.winrm.port.nil?
|
32
31
|
errors << "winrm.guest_port cannot be nil." if machine.config.winrm.guest_port.nil?
|
33
32
|
errors << "winrm.max_tries cannot be nil." if machine.config.winrm.max_tries.nil?
|
@@ -39,7 +38,7 @@ module VagrantWindows
|
|
39
38
|
def finalize!
|
40
39
|
@username = "vagrant" if @username == UNSET_VALUE
|
41
40
|
@password = "vagrant" if @password == UNSET_VALUE
|
42
|
-
@host =
|
41
|
+
@host = nil if @host == UNSET_VALUE
|
43
42
|
@port = 5985 if @port == UNSET_VALUE
|
44
43
|
@guest_port = 5985 if @guest_port == UNSET_VALUE
|
45
44
|
@max_tries = 20 if @max_tries == UNSET_VALUE
|
@@ -7,8 +7,8 @@ module VagrantWindows
|
|
7
7
|
error_namespace("vagrant_windows.errors")
|
8
8
|
end
|
9
9
|
|
10
|
-
class
|
11
|
-
error_key(:
|
10
|
+
class WinRMNotReady < VagrantWindowsError
|
11
|
+
error_key(:winrm_not_ready)
|
12
12
|
end
|
13
13
|
|
14
14
|
class WinRMInvalidShell < VagrantWindowsError
|
@@ -9,7 +9,7 @@ module VagrantWindows
|
|
9
9
|
module Guest
|
10
10
|
class Windows < Vagrant.plugin("2", :guest)
|
11
11
|
|
12
|
-
# Vagrant 1.1.x
|
12
|
+
# Vagrant 1.1.x compatibility methods
|
13
13
|
# Implement the 1.1.x methods and call through to the new 1.2.x capabilities
|
14
14
|
|
15
15
|
attr_reader :machine
|
@@ -46,7 +46,7 @@ module VagrantWindows
|
|
46
46
|
end
|
47
47
|
|
48
48
|
|
49
|
-
# Vagrant 1.2.x
|
49
|
+
# Vagrant 1.2.x compatibility methods
|
50
50
|
|
51
51
|
def detect?(machine)
|
52
52
|
|
@@ -4,19 +4,19 @@ module VagrantPlugins
|
|
4
4
|
module Puppet
|
5
5
|
module Provisioner
|
6
6
|
class Puppet < Vagrant.plugin("2", :provisioner)
|
7
|
-
|
7
|
+
|
8
8
|
# This patch is needed until Vagrant supports Puppet on Windows guests
|
9
9
|
run_puppet_apply_on_linux = instance_method(:run_puppet_apply)
|
10
10
|
configure_on_linux = instance_method(:configure)
|
11
|
-
|
11
|
+
|
12
12
|
define_method(:run_puppet_apply) do
|
13
13
|
is_windows ? run_puppet_apply_on_windows() : run_puppet_apply_on_linux.bind(self).()
|
14
14
|
end
|
15
|
-
|
15
|
+
|
16
16
|
define_method(:configure) do |root_config|
|
17
17
|
is_windows ? configure_on_windows(root_config) : configure_on_linux.bind(self).(root_config)
|
18
18
|
end
|
19
|
-
|
19
|
+
|
20
20
|
def run_puppet_apply_on_windows
|
21
21
|
options = [config.options].flatten
|
22
22
|
module_paths = @module_paths.map { |_, to| to }
|
@@ -28,6 +28,16 @@ module VagrantPlugins
|
|
28
28
|
options << "--modulepath '#{module_paths.join(';')}'"
|
29
29
|
end
|
30
30
|
|
31
|
+
if @hiera_config_path
|
32
|
+
options << "--hiera_config=#{@hiera_config_path}"
|
33
|
+
end
|
34
|
+
|
35
|
+
if !@machine.env.ui.is_a?(Vagrant::UI::Colored)
|
36
|
+
options << "--color=false"
|
37
|
+
end
|
38
|
+
|
39
|
+
options << "--manifestdir #{manifests_guest_path}"
|
40
|
+
options << "--detailed-exitcodes"
|
31
41
|
options << @manifest_file
|
32
42
|
options = options.join(" ")
|
33
43
|
|
@@ -41,9 +51,12 @@ module VagrantPlugins
|
|
41
51
|
|
42
52
|
facter = "#{facts.join(" ")} "
|
43
53
|
end
|
44
|
-
|
45
|
-
command = "
|
46
|
-
|
54
|
+
|
55
|
+
command = "#{facter} puppet apply #{options}"
|
56
|
+
if config.working_directory
|
57
|
+
command = "cd #{config.working_directory}; if($?) \{ #{command} \}"
|
58
|
+
end
|
59
|
+
|
47
60
|
@machine.env.ui.info I18n.t("vagrant.provisioners.puppet.running_puppet",
|
48
61
|
:manifest => @manifest_file)
|
49
62
|
|
@@ -53,13 +66,13 @@ module VagrantPlugins
|
|
53
66
|
end
|
54
67
|
end
|
55
68
|
end
|
56
|
-
|
69
|
+
|
57
70
|
def configure_on_windows(root_config)
|
58
71
|
# Calculate the paths we're going to use based on the environment
|
59
72
|
root_path = @machine.env.root_path
|
60
73
|
@expanded_manifests_path = @config.expanded_manifests_path(root_path)
|
61
74
|
@expanded_module_paths = @config.expanded_module_paths(root_path)
|
62
|
-
@manifest_file = @config.manifest_file
|
75
|
+
@manifest_file = File.join(manifests_guest_path, @config.manifest_file)
|
63
76
|
|
64
77
|
# Setup the module paths
|
65
78
|
@module_paths = []
|
@@ -70,7 +83,7 @@ module VagrantPlugins
|
|
70
83
|
@logger.debug("Syncing folders from puppet configure")
|
71
84
|
@logger.debug("manifests_guest_path = #{manifests_guest_path}")
|
72
85
|
@logger.debug("expanded_manifests_path = #{@expanded_manifests_path}")
|
73
|
-
|
86
|
+
|
74
87
|
# Windows guest volume mounting fails without an "id" specified
|
75
88
|
# This hacks around that problem and allows the PS mount script to work
|
76
89
|
root_config.vm.synced_folder(
|
data/locales/en.yml
CHANGED
@@ -2,11 +2,8 @@ en:
|
|
2
2
|
vagrant_windows:
|
3
3
|
|
4
4
|
errors:
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
Host port: %{port}
|
9
|
-
Guest port: %{guest_port}
|
5
|
+
winrm_not_ready: |-
|
6
|
+
The box is not ready for WinRM connections yet.
|
10
7
|
winrm_invalid_shell: |-
|
11
8
|
%{shell} is not a supported type of Windows shell.
|
12
9
|
winrm_execution_error: |-
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe VagrantWindows::Config::Windows , :unit => true do
|
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
|
@@ -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 }
|
@@ -11,15 +11,17 @@ describe VagrantWindows::Communication::WinRMCommunicator, :integration => true
|
|
11
11
|
end
|
12
12
|
|
13
13
|
describe "execute" do
|
14
|
-
it "should return 1" do
|
15
|
-
expect(@communicator.execute("exit 1")).to eq(1)
|
14
|
+
it "should return 1 when error_check is false" do
|
15
|
+
expect(@communicator.execute("exit 1", { :error_check => false })).to eq(1)
|
16
16
|
end
|
17
17
|
|
18
|
-
it "should
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
18
|
+
it "should raise WinRMExecutionError when error_check is true" do
|
19
|
+
expect { @communicator.execute("exit 1") }.to raise_error(VagrantWindows::Errors::WinRMExecutionError)
|
20
|
+
end
|
21
|
+
|
22
|
+
it "should raise specified error type when specified and error_check is true" do
|
23
|
+
opts = { :error_class => VagrantWindows::Errors::WinRMInvalidShell }
|
24
|
+
expect { @communicator.execute("exit 1", opts) }.to raise_error(VagrantWindows::Errors::WinRMInvalidShell)
|
23
25
|
end
|
24
26
|
end
|
25
27
|
|
@@ -0,0 +1,44 @@
|
|
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_config = stub(:winrm => winrm_config)
|
21
|
+
@machine.stubs(:config).returns(machine_config)
|
22
|
+
|
23
|
+
# setup the machine ssh_info to return a 10.0.0.1
|
24
|
+
@machine.stubs(:ssh_info).returns({ :host => '10.0.0.1' })
|
25
|
+
|
26
|
+
expect(@winrmfinder.winrm_host_address()).to eq('10.0.0.1')
|
27
|
+
end
|
28
|
+
|
29
|
+
it 'should return host config if set (issue 104)' do
|
30
|
+
# setup the winrm config to return nil for the host (i.e. the default)
|
31
|
+
winrm_config = VagrantWindows::Config::WinRM.new()
|
32
|
+
winrm_config.host = '10.0.0.1'
|
33
|
+
winrm_config.finalize!()
|
34
|
+
machine_config = stub(:winrm => winrm_config)
|
35
|
+
@machine.stubs(:config).returns(machine_config)
|
36
|
+
|
37
|
+
# setup the machine ssh_info to return a 10.0.0.1
|
38
|
+
@machine.stubs(:ssh_info).returns({ :host => '127.0.0.1' })
|
39
|
+
|
40
|
+
expect(@winrmfinder.winrm_host_address()).to eq('10.0.0.1')
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
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("localhost", "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/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,15 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-windows
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Paul Morton
|
9
|
+
- Shawn Neal
|
9
10
|
autorequire:
|
10
11
|
bindir: bin
|
11
12
|
cert_chain: []
|
12
|
-
date: 2013-
|
13
|
+
date: 2013-10-21 00:00:00.000000000 Z
|
13
14
|
dependencies:
|
14
15
|
- !ruby/object:Gem::Dependency
|
15
16
|
name: winrm
|
@@ -110,6 +111,7 @@ dependencies:
|
|
110
111
|
description: Windows Guest Support for Vagrant
|
111
112
|
email:
|
112
113
|
- pmorton@biaprotect.com
|
114
|
+
- sneal@sneal.net
|
113
115
|
executables: []
|
114
116
|
extensions: []
|
115
117
|
extra_rdoc_files: []
|
@@ -188,23 +190,28 @@ files:
|
|
188
190
|
- lib/vagrant-windows/scripts/winrs_v3_get_adapters.ps1
|
189
191
|
- lib/vagrant-windows/version.rb
|
190
192
|
- lib/vagrant-windows.rb
|
193
|
+
- LICENSE
|
191
194
|
- locales/en.yml
|
192
195
|
- Rakefile
|
193
196
|
- README.md
|
194
197
|
- spec/spec_helper.rb
|
195
|
-
- spec/vagrant-windows/config_spec.rb
|
196
198
|
- spec/vagrant-windows/guestnetwork_spec.rb
|
197
199
|
- spec/vagrant-windows/helper_spec.rb
|
198
200
|
- spec/vagrant-windows/mount_shared_folder_spec.rb
|
201
|
+
- spec/vagrant-windows/windows_config_spec.rb
|
202
|
+
- spec/vagrant-windows/winrm_config_spec.rb
|
199
203
|
- spec/vagrant-windows/winrmcommunicator_spec.rb
|
204
|
+
- spec/vagrant-windows/winrmfinder_spec.rb
|
205
|
+
- spec/vagrant-windows/winrmshell_spec.rb
|
200
206
|
- vagrant-windows.gemspec
|
201
207
|
- .DS_Store
|
202
208
|
- .gitignore
|
203
209
|
- .travis.yml
|
204
210
|
- coverage/.last_run.json
|
205
211
|
- coverage/.resultset.json
|
206
|
-
homepage:
|
207
|
-
licenses:
|
212
|
+
homepage: https://github.com/WinRb/vagrant-windows
|
213
|
+
licenses:
|
214
|
+
- APACHE2
|
208
215
|
post_install_message:
|
209
216
|
rdoc_options: []
|
210
217
|
require_paths:
|
@@ -217,7 +224,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
217
224
|
version: '0'
|
218
225
|
segments:
|
219
226
|
- 0
|
220
|
-
hash:
|
227
|
+
hash: -3356460021389253902
|
221
228
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
222
229
|
none: false
|
223
230
|
requirements:
|
@@ -226,7 +233,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
226
233
|
version: '0'
|
227
234
|
segments:
|
228
235
|
- 0
|
229
|
-
hash:
|
236
|
+
hash: -3356460021389253902
|
230
237
|
requirements: []
|
231
238
|
rubyforge_project:
|
232
239
|
rubygems_version: 1.8.23
|
@@ -236,8 +243,11 @@ summary: A small gem that adds windows guest support to vagrant, uses WinRM as t
|
|
236
243
|
Communication Channel
|
237
244
|
test_files:
|
238
245
|
- spec/spec_helper.rb
|
239
|
-
- spec/vagrant-windows/config_spec.rb
|
240
246
|
- spec/vagrant-windows/guestnetwork_spec.rb
|
241
247
|
- spec/vagrant-windows/helper_spec.rb
|
242
248
|
- spec/vagrant-windows/mount_shared_folder_spec.rb
|
249
|
+
- spec/vagrant-windows/windows_config_spec.rb
|
250
|
+
- spec/vagrant-windows/winrm_config_spec.rb
|
243
251
|
- spec/vagrant-windows/winrmcommunicator_spec.rb
|
252
|
+
- spec/vagrant-windows/winrmfinder_spec.rb
|
253
|
+
- spec/vagrant-windows/winrmshell_spec.rb
|