vagrant-winrm 0.0.2 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +13 -5
- data/.gitignore +3 -0
- data/.travis.yml +12 -4
- data/Gemfile +1 -1
- data/README.md +5 -5
- data/lib/vagrant-winrm/commands/winrm.rb +7 -9
- data/lib/vagrant-winrm/commands/winrm_config.rb +0 -2
- data/lib/vagrant-winrm/commands/winrm_upload.rb +85 -14
- data/lib/vagrant-winrm/errors.rb +4 -0
- data/lib/version.rb +1 -1
- data/locales/en.yml +4 -0
- data/spec/vagrant-winrm/commands/winrm_config_spec.rb +112 -102
- data/spec/vagrant-winrm/commands/winrm_spec.rb +120 -120
- data/spec/vagrant-winrm/commands/winrm_upload_spec.rb +87 -87
- data/vagrant-winrm.gemspec +7 -5
- metadata +35 -20
checksums.yaml
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
OTEwOWNjNDY2ZjFjZmMzZGNlOGYwZDI2NjZhZmU0YTU3OWIwMWI3NA==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
MmVhYTJmZGY3YjkzNjgwNmM2ODY4YmMxMTNiNWM1OTZlNjg1MTc1Yw==
|
5
7
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
ODdhMWYyMDdmNjM2Mzk5MWM2N2QxYzJiYThjMDFiZmNjZGEyYTYxMDI4M2Ux
|
10
|
+
NDBkNzVlZTdhMDFjMmE3MzFlY2NiNjgwMWJlNWM4MjBjOTllNWVhODgxMDQ2
|
11
|
+
NGZkYTgxY2M3NTBjNzdiODVjMDE5MTE3Yjc3MjE4M2MzYTUzY2Y=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
OWJmMzZkMTFmOWFjNmExMWNmMzA4ZGZmM2NlY2NlYTQ2ZTIzOTlmNDU0ODA1
|
14
|
+
NTU0ZDhmZmNlOGI3OTgwODUzN2I2ZDNhMmMzYmU2NTY0NDg4MTg2NTJjZDI5
|
15
|
+
YzMyZDk1MTMxM2JkY2IwOGUzMTRjNzBkMDA2YTc3NTc2YWMwY2E=
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
@@ -1,4 +1,12 @@
|
|
1
|
-
language: ruby
|
2
|
-
rvm:
|
3
|
-
|
4
|
-
|
1
|
+
language: ruby
|
2
|
+
rvm:
|
3
|
+
- 2.0.0
|
4
|
+
deploy:
|
5
|
+
provider: rubygems
|
6
|
+
api_key:
|
7
|
+
secure: gzvD+LH/hVa7RmW3C9Vf6v+asnClSj3I5EHpghwnG7oxJNCiKW1N3zTHPE64M+GhOus9kXlL2/oy358kSNyKAv2eEiqifMs5+hrFAqIU8jEPG+jvaVhBsVpmKedEZEc4ZDgn0Y71Et3+U8+VAEK7iAOQmgKSlVWF1qJxMV7lXSw=
|
8
|
+
gem: vagrant-winrm
|
9
|
+
on:
|
10
|
+
tags: true
|
11
|
+
all_branches: true
|
12
|
+
repo: criteo/vagrant-winrm
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -47,8 +47,8 @@ Host CustomHostname
|
|
47
47
|
|
48
48
|
## <a name="development"></a> Development
|
49
49
|
|
50
|
-
* Source hosted at [
|
51
|
-
* Report issues/questions/feature requests on [
|
50
|
+
* Source hosted at [Github][repo]
|
51
|
+
* Report issues/questions/feature requests on [Github Issues][issues]
|
52
52
|
|
53
53
|
Pull requests are very welcome! Make sure your patches are well tested.
|
54
54
|
Ideally create a topic branch for every separate change you make. For
|
@@ -70,9 +70,9 @@ Apache 2.0 (see [LICENSE][license])
|
|
70
70
|
|
71
71
|
|
72
72
|
[author]: https://github.com/Annih
|
73
|
-
[issues]: https://
|
74
|
-
[license]: https://
|
75
|
-
[repo]: https://
|
73
|
+
[issues]: https://github.com/criteo/vagrant-winrm/issues
|
74
|
+
[license]: https://github.com/criteo/vagrant-winrm/blob/master/LICENSE
|
75
|
+
[repo]: https://github.com/criteo/vagrant-winrm
|
76
76
|
[plugin_usage]: http://docs.vagrantup.com/v2/plugins/usage.html
|
77
77
|
|
78
78
|
[vagrant_dl]: http://downloads.vagrantup.com/
|
@@ -9,19 +9,21 @@ module VagrantPlugins
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def execute
|
12
|
-
options = {}
|
12
|
+
options = { shell: :powershell }
|
13
13
|
|
14
14
|
opts = OptionParser.new do |o|
|
15
15
|
o.banner = 'Usage: vagrant winrm [options] [name]'
|
16
|
-
o.separator ''
|
17
16
|
o.separator 'Options:'
|
18
|
-
o.separator ''
|
19
17
|
|
20
18
|
o.on('-c', '--command COMMAND', 'Execute a WinRM command directly') do |c|
|
21
19
|
options[:command] = Array.new if options[:command].nil?
|
22
20
|
options[:command].push c
|
23
21
|
end
|
24
22
|
|
23
|
+
o.on('-s', '--shell SHELL', [:powershell, :cmd], 'Use the specified shell (powershell, cmd)') do |s|
|
24
|
+
options[:shell] = s
|
25
|
+
end
|
26
|
+
|
25
27
|
o.on('--plugin-version', 'Print the version of the plugin and exit') do
|
26
28
|
options[:version] = true
|
27
29
|
end
|
@@ -45,15 +47,11 @@ module VagrantPlugins
|
|
45
47
|
raise Errors::ConfigurationError, { :communicator => vm.config.vm.communicator } if vm.config.vm.communicator != :winrm
|
46
48
|
|
47
49
|
exit_code = 0
|
48
|
-
@logger.debug("Executing a batch of #{options[:command].length} on remote machine")
|
50
|
+
@logger.debug("Executing a batch of #{options[:command].length} on remote machine with #{options[:shell]}")
|
49
51
|
|
50
52
|
options[:command].each do |c|
|
51
53
|
@logger.debug("Executing command: #{c}")
|
52
|
-
c
|
53
|
-
exit_code |= vm.communicate.execute(c) do |type, data|
|
54
|
-
$stdout.print data if type == :stdout
|
55
|
-
$stderr.print data if type == :stderr
|
56
|
-
end
|
54
|
+
exit_code |= vm.communicate.execute(c, shell: options[:shell]) { |type, data| (type == :stderr ? $stderr : $stdout).print data }
|
57
55
|
end
|
58
56
|
return exit_code
|
59
57
|
end
|
@@ -15,9 +15,7 @@ module VagrantPlugins
|
|
15
15
|
|
16
16
|
opts = OptionParser.new do |o|
|
17
17
|
o.banner = 'Usage: vagrant winrm-config [options] [name]'
|
18
|
-
o.separator ''
|
19
18
|
o.separator 'Options:'
|
20
|
-
o.separator ''
|
21
19
|
|
22
20
|
o.on('--host NAME', 'Name the host for the config') do |h|
|
23
21
|
options[:host] = h
|
@@ -8,32 +8,103 @@ module VagrantPlugins
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def execute
|
11
|
+
options = { temporary: false, compress: false }
|
12
|
+
source, destination, argv = parse_args options
|
11
13
|
|
14
|
+
return unless source || destination
|
15
|
+
|
16
|
+
# Execute the actual WinRM
|
17
|
+
with_target_vms(argv, single_target: true) do |vm|
|
18
|
+
|
19
|
+
raise Errors::ConfigurationError, { :communicator => vm.config.vm.communicator } if vm.config.vm.communicator != :winrm
|
20
|
+
|
21
|
+
tmp_dest = get_remote_temp_folder(vm) if options[:temporary] || options[:compress]
|
22
|
+
|
23
|
+
dest_file = options[:temporary] ? ::File.join(tmp_dest, destination) : destination
|
24
|
+
$stdout.print dest_file if options[:temporary]
|
25
|
+
|
26
|
+
@logger.debug("Uploading #{source} to #{destination}")
|
27
|
+
if options[:compress]
|
28
|
+
source_is_dir = ::File.directory? source
|
29
|
+
source = compress(source, source_is_dir)
|
30
|
+
|
31
|
+
dest_dir = source_is_dir || dest_file.end_with?('/') || dest_file.end_with?('\\') ? dest_file : ::File.dirname(dest_file)
|
32
|
+
remote_tgz_path = ::File.join(::File.dirname(tmp_dest), ::File.basename(source))
|
33
|
+
vm.communicate.upload(source, remote_tgz_path)
|
34
|
+
return vm.communicate.execute("New-Item '#{dest_dir}' -type directory -force; tar -xzf '#{remote_tgz_path}' -C '#{dest_dir}'; ")
|
35
|
+
else
|
36
|
+
return vm.communicate.upload(source, dest_file)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
|
42
|
+
private
|
43
|
+
|
44
|
+
def compress(source, source_is_dir)
|
45
|
+
require 'zlib'
|
46
|
+
require 'tempfile'
|
47
|
+
require 'archive/tar/minitar'
|
48
|
+
|
49
|
+
cwd = Dir.pwd
|
50
|
+
begin
|
51
|
+
tmp = ::Tempfile.new(['script', '.tar.gz'])
|
52
|
+
tmp.binmode
|
53
|
+
tgz = Zlib::GzipWriter.new (tmp)
|
54
|
+
|
55
|
+
Dir.chdir source_is_dir ? source : ::File.dirname(source)
|
56
|
+
Archive::Tar::Minitar.pack(source_is_dir ? '.' : ::File.basename(source), tgz)
|
57
|
+
|
58
|
+
tmp.path # returns the temporary file path
|
59
|
+
ensure
|
60
|
+
tgz.close if tgz && !tgz.closed?
|
61
|
+
tmp.close if tmp && !tmp.closed?
|
62
|
+
Dir.chdir cwd
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
def parse_args(options)
|
12
67
|
opts = OptionParser.new do |o|
|
13
|
-
o.banner =
|
68
|
+
o.banner = <<-EOS
|
69
|
+
Usage:
|
70
|
+
\tvagrant winrm-upload [-c] <source> <destination> [name]
|
71
|
+
\tvagrant winrm-upload [-c] -t <source> [name]
|
72
|
+
EOS
|
73
|
+
o.separator 'Options:'
|
74
|
+
|
75
|
+
o.on('-t', '--temporary', 'Upload the source file to a temporary directory and return the path') do
|
76
|
+
options[:temporary] = true
|
77
|
+
end
|
78
|
+
|
79
|
+
o.on('-c', '--compress', 'Use gzip compression to speed up the upload') do
|
80
|
+
options[:compress] = true
|
81
|
+
end
|
14
82
|
end
|
15
83
|
|
16
84
|
# Parse the options and return if we don't have any target.
|
17
85
|
argv = parse_options opts
|
18
86
|
return unless argv
|
19
87
|
|
20
|
-
if argv.empty? || argv.length > 3 || argv.length < 2
|
21
|
-
raise Vagrant::Errors::CLIInvalidUsage,
|
22
|
-
help: opts.help.chomp
|
23
|
-
end
|
24
|
-
|
25
88
|
source = argv[0]
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
89
|
+
if options[:temporary]
|
90
|
+
min, max, destination = 1, 2, ::File.basename(argv[0])
|
91
|
+
else
|
92
|
+
min, max, destination = 2, 3, argv[1]
|
93
|
+
end
|
31
94
|
|
32
|
-
|
95
|
+
if argv.empty? || argv.length > max || argv.length < min
|
96
|
+
raise Vagrant::Errors::CLIInvalidUsage, help: opts.help.chomp
|
97
|
+
end
|
98
|
+
[source, destination, argv.drop(min)]
|
99
|
+
end
|
33
100
|
|
34
|
-
|
35
|
-
|
101
|
+
def get_remote_temp_folder(vm)
|
102
|
+
dir = nil
|
103
|
+
vm.communicate.execute('[System.IO.Path]::Combine([System.IO.Path]::GetTempPath(), [System.IO.Path]::GetRandomFileName()) | Write-Host -NoNewline') do |type, data|
|
104
|
+
raise Errors::TempFolderError, { :communicator => vm.config.vm.communicator } if type == :stderr || dir
|
105
|
+
dir = data
|
36
106
|
end
|
107
|
+
dir
|
37
108
|
end
|
38
109
|
end
|
39
110
|
end
|
data/lib/vagrant-winrm/errors.rb
CHANGED
data/lib/version.rb
CHANGED
data/locales/en.yml
CHANGED
@@ -1,102 +1,112 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'stringio'
|
3
|
-
|
4
|
-
describe VagrantPlugins::VagrantWinRM::WinRMConfig, :unit => true do
|
5
|
-
|
6
|
-
=begin ############
|
7
|
-
# Here we mock!
|
8
|
-
=end ##############
|
9
|
-
|
10
|
-
let(:idx) { double('idx') }
|
11
|
-
let(:winrm_config) { double('winrm_config', host: 'winrm_super_host', port: 32424, username: 'usern@me', password: 'p4ssw0rd') }
|
12
|
-
let(:machine_config) { double('machine_config', winrm: winrm_config) }
|
13
|
-
let(:machine) {
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
end
|
56
|
-
|
57
|
-
it '
|
58
|
-
c = VagrantPlugins::VagrantWinRM::WinRMConfig.new([], env)
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
$stdout
|
76
|
-
expect(
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
$stdout
|
91
|
-
expect(
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'stringio'
|
3
|
+
|
4
|
+
describe VagrantPlugins::VagrantWinRM::WinRMConfig, :unit => true do
|
5
|
+
|
6
|
+
=begin ############
|
7
|
+
# Here we mock!
|
8
|
+
=end ##############
|
9
|
+
|
10
|
+
let(:idx) { double('idx') }
|
11
|
+
let(:winrm_config) { double('winrm_config', host: 'winrm_super_host', port: 32424, username: 'usern@me', password: 'p4ssw0rd') }
|
12
|
+
let(:machine_config) { double('machine_config', winrm: winrm_config) }
|
13
|
+
let(:machine) {
|
14
|
+
double(
|
15
|
+
'machine',
|
16
|
+
config: machine_config,
|
17
|
+
name: 'vagrant',
|
18
|
+
provider: 'virtualbox',
|
19
|
+
config: machine_config,
|
20
|
+
ui: double('ui', opts: {}),
|
21
|
+
state: nil
|
22
|
+
)
|
23
|
+
}
|
24
|
+
let(:env) { double('env', root_path: '', home_path: '', ui_class: '', machine_names: [machine.name], active_machines: [machine], machine_index: idx, default_provider: 'virtualbox') }
|
25
|
+
|
26
|
+
before do
|
27
|
+
# Mock the local env creation
|
28
|
+
allow(machine).to receive(:vagrant_env).with('', { :ui_class => '' }).and_return env
|
29
|
+
|
30
|
+
# Mock the index to include only our machine
|
31
|
+
allow(idx).to receive(:release).with machine
|
32
|
+
allow(idx).to receive(:include?).with(any_args) do |name|
|
33
|
+
'vagrant' == name
|
34
|
+
end
|
35
|
+
allow(idx).to receive(:get).with(any_args) do |name|
|
36
|
+
env.machine(name.to_sym, :virtualbox)
|
37
|
+
end
|
38
|
+
|
39
|
+
# Add our machine to the environment
|
40
|
+
allow(env).to receive(:machine).with(any_args, :virtualbox) do |name, provider|
|
41
|
+
machine if :vagrant == name
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
=begin ############
|
46
|
+
# Here we test!
|
47
|
+
=end ##############
|
48
|
+
describe 'execute' do
|
49
|
+
|
50
|
+
it 'displays help message with option --help' do
|
51
|
+
c = VagrantPlugins::VagrantWinRM::WinRMConfig.new(['--help'], env)
|
52
|
+
expect {
|
53
|
+
expect(c.execute).to be_nil
|
54
|
+
}.to output.to_stdout
|
55
|
+
end
|
56
|
+
|
57
|
+
it 'raises error on unknown target' do
|
58
|
+
c = VagrantPlugins::VagrantWinRM::WinRMConfig.new(['unknownTarget'], env)
|
59
|
+
expect { c.execute }.to raise_error(Vagrant::Errors::VMNotFoundError)
|
60
|
+
end
|
61
|
+
|
62
|
+
it 'raises error ''invalid options'' on unknown option' do
|
63
|
+
c = VagrantPlugins::VagrantWinRM::WinRMConfig.new(['--unknown'], env)
|
64
|
+
expect { c.execute }.to raise_error(Vagrant::Errors::CLIInvalidOptions)
|
65
|
+
end
|
66
|
+
|
67
|
+
it 'ouputs the WinRMConfig with no Target' do
|
68
|
+
c = VagrantPlugins::VagrantWinRM::WinRMConfig.new([], env)
|
69
|
+
begin
|
70
|
+
$stdout = StringIO.new
|
71
|
+
expect(c.execute).to be_zero
|
72
|
+
expect($stdout.string).to match(/#{machine.name}/)
|
73
|
+
expect($stdout.string).to match(/#{winrm_config.host}/)
|
74
|
+
expect($stdout.string).to match(/#{winrm_config.port}/)
|
75
|
+
expect($stdout.string).to match(/#{winrm_config.username}/)
|
76
|
+
expect($stdout.string).to match(/#{winrm_config.password}/)
|
77
|
+
ensure
|
78
|
+
$stdout = STDOUT
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
it 'ouputs the WinRMConfig with target' do
|
83
|
+
c = VagrantPlugins::VagrantWinRM::WinRMConfig.new(['vagrant'], env)
|
84
|
+
begin
|
85
|
+
$stdout = StringIO.new
|
86
|
+
expect(c.execute).to be_zero
|
87
|
+
expect($stdout.string).to match(/#{machine.name}/)
|
88
|
+
expect($stdout.string).to match(/#{winrm_config.host}/)
|
89
|
+
expect($stdout.string).to match(/#{winrm_config.port}/)
|
90
|
+
expect($stdout.string).to match(/#{winrm_config.username}/)
|
91
|
+
expect($stdout.string).to match(/#{winrm_config.password}/)
|
92
|
+
ensure
|
93
|
+
$stdout = STDOUT
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
97
|
+
it 'ouputs the WinRMConfig with custom host key when --host is provided' do
|
98
|
+
c = VagrantPlugins::VagrantWinRM::WinRMConfig.new(['--host', 'custom_host_key', 'vagrant'], env)
|
99
|
+
begin
|
100
|
+
$stdout = StringIO.new
|
101
|
+
expect(c.execute).to be_zero
|
102
|
+
expect($stdout.string).to match(/custom_host_key/)
|
103
|
+
expect($stdout.string).to match(/#{winrm_config.host}/)
|
104
|
+
expect($stdout.string).to match(/#{winrm_config.port}/)
|
105
|
+
expect($stdout.string).to match(/#{winrm_config.username}/)
|
106
|
+
expect($stdout.string).to match(/#{winrm_config.password}/)
|
107
|
+
ensure
|
108
|
+
$stdout = STDOUT
|
109
|
+
end
|
110
|
+
end
|
111
|
+
end
|
112
|
+
end
|
@@ -1,120 +1,120 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'stringio'
|
3
|
-
|
4
|
-
describe VagrantPlugins::VagrantWinRM::WinRM, :unit => true do
|
5
|
-
|
6
|
-
=begin ############
|
7
|
-
# Here we mock!
|
8
|
-
=end ##############
|
9
|
-
|
10
|
-
let(:idx) { double('idx') }
|
11
|
-
let(:communicator) { double('communicator') }
|
12
|
-
let(:config_vm) { double('config_vm', communicator: :winrm) }
|
13
|
-
let(:machine_config) { double('machine_config', vm: config_vm) }
|
14
|
-
let(:machine) { double('machine', config: machine_config, name: 'vagrant', provider: 'virtualbox', config: machine_config, communicate: communicator, ui: double('ui', opts: {})) }
|
15
|
-
let(:env) { double('env', root_path: '', home_path: '', ui_class: '', machine_names: [machine.name], active_machines: [machine], machine_index: idx, default_provider: 'virtualbox') }
|
16
|
-
|
17
|
-
before do
|
18
|
-
# Mock the local env creation
|
19
|
-
allow(machine).to receive(:vagrant_env).with('', { :ui_class => '' }).and_return env
|
20
|
-
|
21
|
-
# Mock the index to include only our machine
|
22
|
-
allow(idx).to receive(:release).with machine
|
23
|
-
allow(idx).to receive(:include?).with(any_args) do |name|
|
24
|
-
'vagrant' == name
|
25
|
-
end
|
26
|
-
allow(idx).to receive(:get).with(any_args) do |name|
|
27
|
-
env.machine(name.to_sym, :virtualbox)
|
28
|
-
end
|
29
|
-
|
30
|
-
# Add our machine to the environment
|
31
|
-
allow(env).to receive(:machine).with(any_args, :virtualbox) do |name, provider|
|
32
|
-
machine if :vagrant == name
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
=begin ############
|
37
|
-
# Here we test!
|
38
|
-
=end ##############
|
39
|
-
describe 'execute' do
|
40
|
-
it 'does nothing with no option' do
|
41
|
-
c = VagrantPlugins::VagrantWinRM::WinRM.new([], env)
|
42
|
-
expect {
|
43
|
-
expect(c.execute).to be_zero
|
44
|
-
}.not_to output.to_stdout
|
45
|
-
end
|
46
|
-
|
47
|
-
it 'gives proper version with option --plugin-version' do
|
48
|
-
c = VagrantPlugins::VagrantWinRM::WinRM.new(['--plugin-version'], env)
|
49
|
-
expect {
|
50
|
-
expect(c.execute).to be_zero
|
51
|
-
}.to output("Vagrant-winrm plugin
|
52
|
-
end
|
53
|
-
|
54
|
-
it 'displays help message with option --help' do
|
55
|
-
c = VagrantPlugins::VagrantWinRM::WinRM.new(['--help'], env)
|
56
|
-
expect {
|
57
|
-
expect(c.execute).to be_nil
|
58
|
-
}.to output.to_stdout
|
59
|
-
end
|
60
|
-
|
61
|
-
it 'raises error when communicator not winrm' do
|
62
|
-
c = VagrantPlugins::VagrantWinRM::WinRM.new(['-c', 'dummyCommand'], env)
|
63
|
-
expect(config_vm).to receive(:communicator).and_return :ssh
|
64
|
-
|
65
|
-
expect { c.execute }.to raise_error(VagrantPlugins::VagrantWinRM::Errors::ConfigurationError, /not configured to communicate through WinRM/)
|
66
|
-
end
|
67
|
-
|
68
|
-
it 'raises error on unknown target' do
|
69
|
-
c = VagrantPlugins::VagrantWinRM::WinRM.new(['-c', 'command1', 'unknownTarget'], env)
|
70
|
-
expect { c.execute }.to raise_error(Vagrant::Errors::VMNotFoundError)
|
71
|
-
end
|
72
|
-
|
73
|
-
it 'raises error ''invalid options'' on unknown option' do
|
74
|
-
c = VagrantPlugins::VagrantWinRM::WinRM.new(['--unknown'], env)
|
75
|
-
expect { c.execute }.to raise_error(Vagrant::Errors::CLIInvalidOptions)
|
76
|
-
end
|
77
|
-
|
78
|
-
it 'passes commands to communicator with no target' do
|
79
|
-
c = VagrantPlugins::VagrantWinRM::WinRM.new(['-c', 'command1', '--command', 'command2', '-c', 'command3', '--command', 'command4'], env)
|
80
|
-
|
81
|
-
expect(communicator).to receive(:execute).ordered.with('command1').and_return 0
|
82
|
-
expect(communicator).to receive(:execute).ordered.with('command2').and_return 0
|
83
|
-
expect(communicator).to receive(:execute).ordered.with('command3').and_return 0
|
84
|
-
expect(communicator).to receive(:execute).ordered.with('command4').and_return 0
|
85
|
-
|
86
|
-
expect {
|
87
|
-
expect(c.execute).to be_zero
|
88
|
-
}.not_to output.to_stdout
|
89
|
-
end
|
90
|
-
|
91
|
-
it 'passes commands to communicator even with a specific target' do
|
92
|
-
c = VagrantPlugins::VagrantWinRM::WinRM.new(['-c', 'command5', '--command', 'command6', '-c', 'command7', '--command', 'command8', 'vagrant'], env)
|
93
|
-
expect(communicator).to receive(:execute).ordered.with('command5').and_return 0
|
94
|
-
expect(communicator).to receive(:execute).ordered.with('command6').and_return 0
|
95
|
-
expect(communicator).to receive(:execute).ordered.with('command7').and_return 0
|
96
|
-
expect(communicator).to receive(:execute).ordered.with('command8').and_return 0
|
97
|
-
expect {
|
98
|
-
expect(c.execute).to be_zero
|
99
|
-
}.not_to output.to_stdout
|
100
|
-
end
|
101
|
-
|
102
|
-
it 'redirects winrm outputs to stdout' do
|
103
|
-
c = VagrantPlugins::VagrantWinRM::WinRM.new(['-c', 'command'], env)
|
104
|
-
|
105
|
-
expect(communicator).to receive(:execute).with('command').and_yield(:stdout, 'output message').and_return 0
|
106
|
-
expect {
|
107
|
-
expect(c.execute).to be_zero
|
108
|
-
}.to output('output message').to_stdout
|
109
|
-
end
|
110
|
-
|
111
|
-
it 'redirects winrm errors to stderr' do
|
112
|
-
c = VagrantPlugins::VagrantWinRM::WinRM.new(['-c', 'command'], env)
|
113
|
-
|
114
|
-
expect(communicator).to receive(:execute).with('command').and_yield(:stderr, 'error message').and_return 0
|
115
|
-
expect {
|
116
|
-
expect(c.execute).to be_zero
|
117
|
-
}.to output('error message').to_stderr
|
118
|
-
end
|
119
|
-
end
|
120
|
-
end
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'stringio'
|
3
|
+
|
4
|
+
describe VagrantPlugins::VagrantWinRM::WinRM, :unit => true do
|
5
|
+
|
6
|
+
=begin ############
|
7
|
+
# Here we mock!
|
8
|
+
=end ##############
|
9
|
+
|
10
|
+
let(:idx) { double('idx') }
|
11
|
+
let(:communicator) { double('communicator') }
|
12
|
+
let(:config_vm) { double('config_vm', communicator: :winrm) }
|
13
|
+
let(:machine_config) { double('machine_config', vm: config_vm) }
|
14
|
+
let(:machine) { double('machine', config: machine_config, name: 'vagrant', provider: 'virtualbox', config: machine_config, communicate: communicator, ui: double('ui', opts: {})) }
|
15
|
+
let(:env) { double('env', root_path: '', home_path: '', ui_class: '', machine_names: [machine.name], active_machines: [machine], machine_index: idx, default_provider: 'virtualbox') }
|
16
|
+
|
17
|
+
before do
|
18
|
+
# Mock the local env creation
|
19
|
+
allow(machine).to receive(:vagrant_env).with('', { :ui_class => '' }).and_return env
|
20
|
+
|
21
|
+
# Mock the index to include only our machine
|
22
|
+
allow(idx).to receive(:release).with machine
|
23
|
+
allow(idx).to receive(:include?).with(any_args) do |name|
|
24
|
+
'vagrant' == name
|
25
|
+
end
|
26
|
+
allow(idx).to receive(:get).with(any_args) do |name|
|
27
|
+
env.machine(name.to_sym, :virtualbox)
|
28
|
+
end
|
29
|
+
|
30
|
+
# Add our machine to the environment
|
31
|
+
allow(env).to receive(:machine).with(any_args, :virtualbox) do |name, provider|
|
32
|
+
machine if :vagrant == name
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
=begin ############
|
37
|
+
# Here we test!
|
38
|
+
=end ##############
|
39
|
+
describe 'execute' do
|
40
|
+
it 'does nothing with no option' do
|
41
|
+
c = VagrantPlugins::VagrantWinRM::WinRM.new([], env)
|
42
|
+
expect {
|
43
|
+
expect(c.execute).to be_zero
|
44
|
+
}.not_to output.to_stdout
|
45
|
+
end
|
46
|
+
|
47
|
+
it 'gives proper version with option --plugin-version' do
|
48
|
+
c = VagrantPlugins::VagrantWinRM::WinRM.new(['--plugin-version'], env)
|
49
|
+
expect {
|
50
|
+
expect(c.execute).to be_zero
|
51
|
+
}.to output("Vagrant-winrm plugin #{VagrantPlugins::VagrantWinRM::VERSION}\n").to_stdout
|
52
|
+
end
|
53
|
+
|
54
|
+
it 'displays help message with option --help' do
|
55
|
+
c = VagrantPlugins::VagrantWinRM::WinRM.new(['--help'], env)
|
56
|
+
expect {
|
57
|
+
expect(c.execute).to be_nil
|
58
|
+
}.to output.to_stdout
|
59
|
+
end
|
60
|
+
|
61
|
+
it 'raises error when communicator not winrm' do
|
62
|
+
c = VagrantPlugins::VagrantWinRM::WinRM.new(['-c', 'dummyCommand'], env)
|
63
|
+
expect(config_vm).to receive(:communicator).and_return :ssh
|
64
|
+
|
65
|
+
expect { c.execute }.to raise_error(VagrantPlugins::VagrantWinRM::Errors::ConfigurationError, /not configured to communicate through WinRM/)
|
66
|
+
end
|
67
|
+
|
68
|
+
it 'raises error on unknown target' do
|
69
|
+
c = VagrantPlugins::VagrantWinRM::WinRM.new(['-c', 'command1', 'unknownTarget'], env)
|
70
|
+
expect { c.execute }.to raise_error(Vagrant::Errors::VMNotFoundError)
|
71
|
+
end
|
72
|
+
|
73
|
+
it 'raises error ''invalid options'' on unknown option' do
|
74
|
+
c = VagrantPlugins::VagrantWinRM::WinRM.new(['--unknown'], env)
|
75
|
+
expect { c.execute }.to raise_error(Vagrant::Errors::CLIInvalidOptions)
|
76
|
+
end
|
77
|
+
|
78
|
+
it 'passes commands to communicator with no target' do
|
79
|
+
c = VagrantPlugins::VagrantWinRM::WinRM.new(['-c', 'command1', '--command', 'command2', '-c', 'command3', '--command', 'command4'], env)
|
80
|
+
|
81
|
+
expect(communicator).to receive(:execute).ordered.with('command1', { shell: :powershell }).and_return 0
|
82
|
+
expect(communicator).to receive(:execute).ordered.with('command2', { shell: :powershell }).and_return 0
|
83
|
+
expect(communicator).to receive(:execute).ordered.with('command3', { shell: :powershell }).and_return 0
|
84
|
+
expect(communicator).to receive(:execute).ordered.with('command4', { shell: :powershell }).and_return 0
|
85
|
+
|
86
|
+
expect {
|
87
|
+
expect(c.execute).to be_zero
|
88
|
+
}.not_to output.to_stdout
|
89
|
+
end
|
90
|
+
|
91
|
+
it 'passes commands to communicator even with a specific target' do
|
92
|
+
c = VagrantPlugins::VagrantWinRM::WinRM.new(['-c', 'command5', '--command', 'command6', '-c', 'command7', '--command', 'command8', 'vagrant'], env)
|
93
|
+
expect(communicator).to receive(:execute).ordered.with('command5', { shell: :powershell }).and_return 0
|
94
|
+
expect(communicator).to receive(:execute).ordered.with('command6', { shell: :powershell }).and_return 0
|
95
|
+
expect(communicator).to receive(:execute).ordered.with('command7', { shell: :powershell }).and_return 0
|
96
|
+
expect(communicator).to receive(:execute).ordered.with('command8', { shell: :powershell }).and_return 0
|
97
|
+
expect {
|
98
|
+
expect(c.execute).to be_zero
|
99
|
+
}.not_to output.to_stdout
|
100
|
+
end
|
101
|
+
|
102
|
+
it 'redirects winrm outputs to stdout' do
|
103
|
+
c = VagrantPlugins::VagrantWinRM::WinRM.new(['-c', 'command'], env)
|
104
|
+
|
105
|
+
expect(communicator).to receive(:execute).with('command', { shell: :powershell }).and_yield(:stdout, 'output message').and_return 0
|
106
|
+
expect {
|
107
|
+
expect(c.execute).to be_zero
|
108
|
+
}.to output('output message').to_stdout
|
109
|
+
end
|
110
|
+
|
111
|
+
it 'redirects winrm errors to stderr' do
|
112
|
+
c = VagrantPlugins::VagrantWinRM::WinRM.new(['-c', 'command'], env)
|
113
|
+
|
114
|
+
expect(communicator).to receive(:execute).with('command', { shell: :powershell }).and_yield(:stderr, 'error message').and_return 0
|
115
|
+
expect {
|
116
|
+
expect(c.execute).to be_zero
|
117
|
+
}.to output('error message').to_stderr
|
118
|
+
end
|
119
|
+
end
|
120
|
+
end
|
@@ -1,87 +1,87 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'stringio'
|
3
|
-
|
4
|
-
describe VagrantPlugins::VagrantWinRM::WinRMUpload, :unit => true do
|
5
|
-
|
6
|
-
=begin ############
|
7
|
-
# Here we mock!
|
8
|
-
=end ##############
|
9
|
-
|
10
|
-
let(:idx) { double('idx') }
|
11
|
-
let(:communicator) { double('communicator') }
|
12
|
-
let(:config_vm) { double('config_vm', communicator: :winrm) }
|
13
|
-
let(:machine_config) { double('machine_config', vm: config_vm) }
|
14
|
-
let(:machine) { double('machine', config: machine_config, name: 'vagrant', provider: 'virtualbox', config: machine_config, communicate: communicator, ui: double('ui', opts: {})) }
|
15
|
-
let(:env) { double('env', root_path: '', home_path: '', ui_class: '', machine_names: [machine.name], active_machines: [machine], machine_index: idx, default_provider: 'virtualbox') }
|
16
|
-
|
17
|
-
before do
|
18
|
-
# Mock the local env creation
|
19
|
-
allow(machine).to receive(:vagrant_env).with('', { :ui_class => '' }).and_return env
|
20
|
-
|
21
|
-
# Mock the index to include only our machine
|
22
|
-
allow(idx).to receive(:release).with machine
|
23
|
-
allow(idx).to receive(:include?).with(any_args) do |name|
|
24
|
-
'vagrant' == name
|
25
|
-
end
|
26
|
-
allow(idx).to receive(:get).with(any_args) do |name|
|
27
|
-
env.machine(name.to_sym, :virtualbox)
|
28
|
-
end
|
29
|
-
|
30
|
-
# Add our machine to the environment
|
31
|
-
allow(env).to receive(:machine).with(any_args, :virtualbox) do |name, provider|
|
32
|
-
machine if :vagrant == name
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
=begin ############
|
37
|
-
# Here we test!
|
38
|
-
=end ##############
|
39
|
-
describe 'execute' do
|
40
|
-
it 'raises error ''invalid usage'' on bad usage' do
|
41
|
-
c = VagrantPlugins::VagrantWinRM::WinRMUpload.new([], env)
|
42
|
-
expect { c.execute }.to raise_error(Vagrant::Errors::CLIInvalidUsage)
|
43
|
-
end
|
44
|
-
|
45
|
-
it 'raises error ''invalid options'' on unknown option' do
|
46
|
-
c = VagrantPlugins::VagrantWinRM::WinRMUpload.new(['--unknown'], env)
|
47
|
-
expect { c.execute }.to raise_error(Vagrant::Errors::CLIInvalidOptions)
|
48
|
-
end
|
49
|
-
|
50
|
-
it 'displays help message with option --help' do
|
51
|
-
c = VagrantPlugins::VagrantWinRM::WinRMUpload.new(['--help'], env)
|
52
|
-
expect {
|
53
|
-
expect(c.execute).to be_nil
|
54
|
-
}.to output.to_stdout
|
55
|
-
end
|
56
|
-
|
57
|
-
it 'raises error when communicator not winrm' do
|
58
|
-
c = VagrantPlugins::VagrantWinRM::WinRMUpload.new(['source', 'destination'], env)
|
59
|
-
expect(config_vm).to receive(:communicator).and_return :ssh
|
60
|
-
|
61
|
-
expect { c.execute }.to raise_error(VagrantPlugins::VagrantWinRM::Errors::ConfigurationError, /not configured to communicate through WinRM/)
|
62
|
-
end
|
63
|
-
|
64
|
-
it 'raises error on unknown target' do
|
65
|
-
c = VagrantPlugins::VagrantWinRM::WinRMUpload.new(['source', 'destination', 'unknownTarget'], env)
|
66
|
-
expect { c.execute }.to raise_error Vagrant::Errors::VMNotFoundError
|
67
|
-
end
|
68
|
-
|
69
|
-
|
70
|
-
it 'passes source and destination to communicator with no target' do
|
71
|
-
c = VagrantPlugins::VagrantWinRM::WinRMUpload.new(['source', 'destination'], env)
|
72
|
-
expect(communicator).to receive(:upload).with('source', 'destination').and_return 0
|
73
|
-
|
74
|
-
expect {
|
75
|
-
expect(c.execute).to be_zero
|
76
|
-
}.not_to output.to_stdout
|
77
|
-
end
|
78
|
-
|
79
|
-
it 'passes source and destination to communicator even with a specific target' do
|
80
|
-
c = VagrantPlugins::VagrantWinRM::WinRMUpload.new(['source', 'destination', 'vagrant'], env)
|
81
|
-
expect(communicator).to receive(:upload).with('source', 'destination').and_return 0
|
82
|
-
expect {
|
83
|
-
expect(c.execute).to be_zero
|
84
|
-
}.not_to output.to_stdout
|
85
|
-
end
|
86
|
-
end
|
87
|
-
end
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'stringio'
|
3
|
+
|
4
|
+
describe VagrantPlugins::VagrantWinRM::WinRMUpload, :unit => true do
|
5
|
+
|
6
|
+
=begin ############
|
7
|
+
# Here we mock!
|
8
|
+
=end ##############
|
9
|
+
|
10
|
+
let(:idx) { double('idx') }
|
11
|
+
let(:communicator) { double('communicator') }
|
12
|
+
let(:config_vm) { double('config_vm', communicator: :winrm) }
|
13
|
+
let(:machine_config) { double('machine_config', vm: config_vm) }
|
14
|
+
let(:machine) { double('machine', config: machine_config, name: 'vagrant', provider: 'virtualbox', config: machine_config, communicate: communicator, state:nil, ui: double('ui', opts: {})) }
|
15
|
+
let(:env) { double('env', root_path: '', home_path: '', ui_class: '', machine_names: [machine.name], active_machines: [machine], machine_index: idx, default_provider: 'virtualbox') }
|
16
|
+
|
17
|
+
before do
|
18
|
+
# Mock the local env creation
|
19
|
+
allow(machine).to receive(:vagrant_env).with('', { :ui_class => '' }).and_return env
|
20
|
+
|
21
|
+
# Mock the index to include only our machine
|
22
|
+
allow(idx).to receive(:release).with machine
|
23
|
+
allow(idx).to receive(:include?).with(any_args) do |name|
|
24
|
+
'vagrant' == name
|
25
|
+
end
|
26
|
+
allow(idx).to receive(:get).with(any_args) do |name|
|
27
|
+
env.machine(name.to_sym, :virtualbox)
|
28
|
+
end
|
29
|
+
|
30
|
+
# Add our machine to the environment
|
31
|
+
allow(env).to receive(:machine).with(any_args, :virtualbox) do |name, provider|
|
32
|
+
machine if :vagrant == name
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
=begin ############
|
37
|
+
# Here we test!
|
38
|
+
=end ##############
|
39
|
+
describe 'execute' do
|
40
|
+
it 'raises error ''invalid usage'' on bad usage' do
|
41
|
+
c = VagrantPlugins::VagrantWinRM::WinRMUpload.new([], env)
|
42
|
+
expect { c.execute }.to raise_error(Vagrant::Errors::CLIInvalidUsage)
|
43
|
+
end
|
44
|
+
|
45
|
+
it 'raises error ''invalid options'' on unknown option' do
|
46
|
+
c = VagrantPlugins::VagrantWinRM::WinRMUpload.new(['--unknown'], env)
|
47
|
+
expect { c.execute }.to raise_error(Vagrant::Errors::CLIInvalidOptions)
|
48
|
+
end
|
49
|
+
|
50
|
+
it 'displays help message with option --help' do
|
51
|
+
c = VagrantPlugins::VagrantWinRM::WinRMUpload.new(['--help'], env)
|
52
|
+
expect {
|
53
|
+
expect(c.execute).to be_nil
|
54
|
+
}.to output.to_stdout
|
55
|
+
end
|
56
|
+
|
57
|
+
it 'raises error when communicator not winrm' do
|
58
|
+
c = VagrantPlugins::VagrantWinRM::WinRMUpload.new(['source', 'destination'], env)
|
59
|
+
expect(config_vm).to receive(:communicator).and_return :ssh
|
60
|
+
|
61
|
+
expect { c.execute }.to raise_error(VagrantPlugins::VagrantWinRM::Errors::ConfigurationError, /not configured to communicate through WinRM/)
|
62
|
+
end
|
63
|
+
|
64
|
+
it 'raises error on unknown target' do
|
65
|
+
c = VagrantPlugins::VagrantWinRM::WinRMUpload.new(['source', 'destination', 'unknownTarget'], env)
|
66
|
+
expect { c.execute }.to raise_error Vagrant::Errors::VMNotFoundError
|
67
|
+
end
|
68
|
+
|
69
|
+
|
70
|
+
it 'passes source and destination to communicator with no target' do
|
71
|
+
c = VagrantPlugins::VagrantWinRM::WinRMUpload.new(['source', 'destination'], env)
|
72
|
+
expect(communicator).to receive(:upload).with('source', 'destination').and_return 0
|
73
|
+
|
74
|
+
expect {
|
75
|
+
expect(c.execute).to be_zero
|
76
|
+
}.not_to output.to_stdout
|
77
|
+
end
|
78
|
+
|
79
|
+
it 'passes source and destination to communicator even with a specific target' do
|
80
|
+
c = VagrantPlugins::VagrantWinRM::WinRMUpload.new(['source', 'destination', 'vagrant'], env)
|
81
|
+
expect(communicator).to receive(:upload).with('source', 'destination').and_return 0
|
82
|
+
expect {
|
83
|
+
expect(c.execute).to be_zero
|
84
|
+
}.not_to output.to_stdout
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
data/vagrant-winrm.gemspec
CHANGED
@@ -7,20 +7,22 @@ Gem::Specification.new do |s|
|
|
7
7
|
s.platform = Gem::Platform::RUBY
|
8
8
|
s.authors = ['Baptiste Courtois']
|
9
9
|
s.email = ['b.courtois@criteo.fr']
|
10
|
-
s.homepage = 'https://
|
10
|
+
s.homepage = 'https://github.com/criteo/vagrant-winrm/'
|
11
11
|
s.summary = 'A Vagrant 1.6+ plugin extending WinRM communication features.'
|
12
12
|
s.description = 'A Vagrant 1.6+ plugin that adds new command to extends WinRM communication features.'
|
13
13
|
s.license = 'Apache 2.0'
|
14
14
|
|
15
15
|
s.required_rubygems_version = '>= 2.0.0'
|
16
16
|
|
17
|
+
s.add_dependency 'minitar', '~> 0.5'
|
18
|
+
|
17
19
|
s.add_development_dependency 'rake'
|
18
20
|
s.add_development_dependency 'rspec_junit_formatter'
|
19
|
-
s.add_development_dependency 'rspec-core', '~> 3.0
|
20
|
-
s.add_development_dependency 'rspec-expectations', '~> 3.0
|
21
|
-
s.add_development_dependency 'rspec-mocks', '~> 3.0
|
21
|
+
s.add_development_dependency 'rspec-core', '~> 3.0'
|
22
|
+
s.add_development_dependency 'rspec-expectations', '~> 3.0'
|
23
|
+
s.add_development_dependency 'rspec-mocks', '~> 3.0'
|
22
24
|
|
23
|
-
s.add_development_dependency 'bundler', '
|
25
|
+
s.add_development_dependency 'bundler', '~> 1.0'
|
24
26
|
|
25
27
|
s.files = `git ls-files`.split("\n")
|
26
28
|
s.executables = `git ls-files`.split("\n").map { |f| f =~ /^bin\/(.*)/ ? $1 : nil }.compact
|
metadata
CHANGED
@@ -1,41 +1,55 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-winrm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Baptiste Courtois
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-12-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: minitar
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.5'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0.5'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: rake
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
16
30
|
requirements:
|
17
|
-
- - '>='
|
31
|
+
- - ! '>='
|
18
32
|
- !ruby/object:Gem::Version
|
19
33
|
version: '0'
|
20
34
|
type: :development
|
21
35
|
prerelease: false
|
22
36
|
version_requirements: !ruby/object:Gem::Requirement
|
23
37
|
requirements:
|
24
|
-
- - '>='
|
38
|
+
- - ! '>='
|
25
39
|
- !ruby/object:Gem::Version
|
26
40
|
version: '0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: rspec_junit_formatter
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
30
44
|
requirements:
|
31
|
-
- - '>='
|
45
|
+
- - ! '>='
|
32
46
|
- !ruby/object:Gem::Version
|
33
47
|
version: '0'
|
34
48
|
type: :development
|
35
49
|
prerelease: false
|
36
50
|
version_requirements: !ruby/object:Gem::Requirement
|
37
51
|
requirements:
|
38
|
-
- - '>='
|
52
|
+
- - ! '>='
|
39
53
|
- !ruby/object:Gem::Version
|
40
54
|
version: '0'
|
41
55
|
- !ruby/object:Gem::Dependency
|
@@ -44,56 +58,56 @@ dependencies:
|
|
44
58
|
requirements:
|
45
59
|
- - ~>
|
46
60
|
- !ruby/object:Gem::Version
|
47
|
-
version: 3.0
|
61
|
+
version: '3.0'
|
48
62
|
type: :development
|
49
63
|
prerelease: false
|
50
64
|
version_requirements: !ruby/object:Gem::Requirement
|
51
65
|
requirements:
|
52
66
|
- - ~>
|
53
67
|
- !ruby/object:Gem::Version
|
54
|
-
version: 3.0
|
68
|
+
version: '3.0'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: rspec-expectations
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
58
72
|
requirements:
|
59
73
|
- - ~>
|
60
74
|
- !ruby/object:Gem::Version
|
61
|
-
version: 3.0
|
75
|
+
version: '3.0'
|
62
76
|
type: :development
|
63
77
|
prerelease: false
|
64
78
|
version_requirements: !ruby/object:Gem::Requirement
|
65
79
|
requirements:
|
66
80
|
- - ~>
|
67
81
|
- !ruby/object:Gem::Version
|
68
|
-
version: 3.0
|
82
|
+
version: '3.0'
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
84
|
name: rspec-mocks
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
72
86
|
requirements:
|
73
87
|
- - ~>
|
74
88
|
- !ruby/object:Gem::Version
|
75
|
-
version: 3.0
|
89
|
+
version: '3.0'
|
76
90
|
type: :development
|
77
91
|
prerelease: false
|
78
92
|
version_requirements: !ruby/object:Gem::Requirement
|
79
93
|
requirements:
|
80
94
|
- - ~>
|
81
95
|
- !ruby/object:Gem::Version
|
82
|
-
version: 3.0
|
96
|
+
version: '3.0'
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
98
|
name: bundler
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
86
100
|
requirements:
|
87
|
-
- -
|
101
|
+
- - ~>
|
88
102
|
- !ruby/object:Gem::Version
|
89
|
-
version: 1.0
|
103
|
+
version: '1.0'
|
90
104
|
type: :development
|
91
105
|
prerelease: false
|
92
106
|
version_requirements: !ruby/object:Gem::Requirement
|
93
107
|
requirements:
|
94
|
-
- -
|
108
|
+
- - ~>
|
95
109
|
- !ruby/object:Gem::Version
|
96
|
-
version: 1.0
|
110
|
+
version: '1.0'
|
97
111
|
description: A Vagrant 1.6+ plugin that adds new command to extends WinRM communication
|
98
112
|
features.
|
99
113
|
email:
|
@@ -102,6 +116,7 @@ executables: []
|
|
102
116
|
extensions: []
|
103
117
|
extra_rdoc_files: []
|
104
118
|
files:
|
119
|
+
- .bundle/config
|
105
120
|
- .gitignore
|
106
121
|
- .travis.yml
|
107
122
|
- Gemfile
|
@@ -122,7 +137,7 @@ files:
|
|
122
137
|
- spec/vagrant-winrm/commands/winrm_upload_spec.rb
|
123
138
|
- templates/winrm_config/config.erb
|
124
139
|
- vagrant-winrm.gemspec
|
125
|
-
homepage: https://
|
140
|
+
homepage: https://github.com/criteo/vagrant-winrm/
|
126
141
|
licenses:
|
127
142
|
- Apache 2.0
|
128
143
|
metadata: {}
|
@@ -132,17 +147,17 @@ require_paths:
|
|
132
147
|
- lib
|
133
148
|
required_ruby_version: !ruby/object:Gem::Requirement
|
134
149
|
requirements:
|
135
|
-
- - '>='
|
150
|
+
- - ! '>='
|
136
151
|
- !ruby/object:Gem::Version
|
137
152
|
version: '0'
|
138
153
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
139
154
|
requirements:
|
140
|
-
- - '>='
|
155
|
+
- - ! '>='
|
141
156
|
- !ruby/object:Gem::Version
|
142
157
|
version: 2.0.0
|
143
158
|
requirements: []
|
144
159
|
rubyforge_project:
|
145
|
-
rubygems_version: 2.
|
160
|
+
rubygems_version: 2.4.5
|
146
161
|
signing_key:
|
147
162
|
specification_version: 4
|
148
163
|
summary: A Vagrant 1.6+ plugin extending WinRM communication features.
|