kitchen-vagrant_winrm 0.1.0.dev → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +3 -1
- data/README.md +14 -10
- data/kitchen-vagrant_winrm.gemspec +3 -3
- data/lib/kitchen/driver/vagrant_winrm.rb +15 -6
- data/lib/kitchen/driver/vagrant_winrm_version.rb +1 -1
- data/spec/spec_helper.rb +29 -65
- metadata +11 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 082033c6b24f15d781a783f13f4785c456c5174c
|
4
|
+
data.tar.gz: 3436d5c5d2049e9f1da06d5cdb53e1756a2c880a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: af6133e59fada0709cf38b16853f621481651477a5a98b70f52dca63bfbe8b299c749fe838d73d6d77f1eb9f71c6dca3816c9d8af40cd2889bb7a932dd638a5e
|
7
|
+
data.tar.gz: 4b382ec24002ca1e69356caa33e3df711ef2b1c8d6bf79798c35b0b37b0b9fe001094f9f6898038ff31ff87440fb8acd762543a8abdee2e77d16461bbf3f94d7
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -70,10 +70,14 @@ platforms:
|
|
70
70
|
- name: windows-2008r2
|
71
71
|
driver:
|
72
72
|
name: vagrant_winrm
|
73
|
+
provisioner:
|
74
|
+
name: chef-zero
|
75
|
+
sudo: false
|
73
76
|
driver_config:
|
77
|
+
guest: windows
|
74
78
|
communicator: 'winrm'
|
75
|
-
winrm_username: '
|
76
|
-
winrm_password: '
|
79
|
+
winrm_username: 'vagrant'
|
80
|
+
winrm_password: 'vagrant'
|
77
81
|
#...
|
78
82
|
```
|
79
83
|
|
@@ -271,13 +275,13 @@ example, the instance was called "default-fuzz-9" will produce a default
|
|
271
275
|
|
272
276
|
This is the username used for WinRm authentication.
|
273
277
|
|
274
|
-
The default value is
|
278
|
+
The default value is `vagrant`.
|
275
279
|
|
276
280
|
### <a name="config-winrm-password"></a> winrm-password
|
277
281
|
|
278
282
|
This is the password used for WinRm authentication.
|
279
283
|
|
280
|
-
The default value is
|
284
|
+
The default value is `vagrant`.
|
281
285
|
|
282
286
|
### <a name="config-winrm-port"></a> winrm-port
|
283
287
|
|
@@ -287,8 +291,8 @@ The default value is 5985.
|
|
287
291
|
|
288
292
|
## <a name="development"></a> Development
|
289
293
|
|
290
|
-
* Source hosted at [
|
291
|
-
* Report issues/questions/feature requests on [
|
294
|
+
* Source hosted at [Github][repo]
|
295
|
+
* Report issues/questions/feature requests on [Github Issues][issues]
|
292
296
|
|
293
297
|
Pull requests are very welcome! Make sure your patches are well tested.
|
294
298
|
Ideally create a topic branch for every separate change you make. For
|
@@ -310,9 +314,9 @@ Apache 2.0 (see [LICENSE][license])
|
|
310
314
|
|
311
315
|
|
312
316
|
[author]: https://github.com/Annih
|
313
|
-
[issues]: https://
|
314
|
-
[license]: https://
|
315
|
-
[repo]: https://
|
317
|
+
[issues]: https://github.com/criteo/vagrant-winrm/issues
|
318
|
+
[license]: https://github.com/criteo/kitchen-vagant_winrm/blob/master/LICENSE
|
319
|
+
[repo]: https://github.com/criteo/kitchen-vagant_winrm
|
316
320
|
[driver_usage]: http://docs.kitchen-ci.org/drivers/usage
|
317
321
|
[chef_omnibus_dl]: http://www.getchef.com/chef/install/
|
318
322
|
|
@@ -330,5 +334,5 @@ Apache 2.0 (see [LICENSE][license])
|
|
330
334
|
[vmware_plugin]: http://www.vagrantup.com/vmware
|
331
335
|
[fusion_dl]: http://www.vmware.com/products/fusion/overview.html
|
332
336
|
[workstation_dl]: http://www.vmware.com/products/workstation/
|
333
|
-
[vagrant_winrm]: https://
|
337
|
+
[vagrant_winrm]: https://github.com/criteo/vagrant-winrm/
|
334
338
|
[kitchen_vagrant]: https://github.com/test-kitchen/kitchen-vagrant
|
@@ -8,9 +8,9 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.version = Kitchen::Driver::VAGRANT_WINRM_VERSION
|
9
9
|
spec.authors = ['Baptiste Courtois']
|
10
10
|
spec.email = ['b.courtois@criteo.com']
|
11
|
-
spec.description = %q{Kitchen::Driver::VagrantWinRM - A Test Kitchen Driver
|
11
|
+
spec.description = %q{Kitchen::Driver::VagrantWinRM - A Test Kitchen Driver using Vagrant-WinRM}
|
12
12
|
spec.summary = 'A Test Kitchen Driver using vagrant winrm'
|
13
|
-
spec.homepage = 'https://
|
13
|
+
spec.homepage = 'https://github.com/criteo/kitchen-vagant_winrm'
|
14
14
|
spec.license = 'Apache 2.0'
|
15
15
|
|
16
16
|
spec.files = `git ls-files`.split($/)
|
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ['lib']
|
20
20
|
|
21
|
-
spec.add_dependency 'test-kitchen', '
|
21
|
+
spec.add_dependency 'test-kitchen', '~> 1.2'
|
22
22
|
|
23
23
|
spec.add_development_dependency 'bundler', '~> 1.3'
|
24
24
|
spec.add_development_dependency 'rake'
|
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'fileutils'
|
2
2
|
require 'rubygems/version'
|
3
3
|
require 'kitchen'
|
4
|
+
require 'tempfile'
|
4
5
|
|
5
6
|
module Kitchen
|
6
7
|
|
@@ -53,8 +54,7 @@ module Kitchen
|
|
53
54
|
run_remote provisioner.init_command
|
54
55
|
|
55
56
|
Dir.glob("#{provisioner.sandbox_path}/*").each do |file|
|
56
|
-
|
57
|
-
run "vagrant winrm-upload \"#{file}\" \"#{remote_file}\""
|
57
|
+
upload file, File.join(provisioner[:root_path], File.basename(file))
|
58
58
|
end
|
59
59
|
|
60
60
|
run_remote provisioner.prepare_command
|
@@ -65,12 +65,13 @@ module Kitchen
|
|
65
65
|
|
66
66
|
def setup(state)
|
67
67
|
create_vagrantfile
|
68
|
-
|
68
|
+
run_remote busser_setup_cmd
|
69
69
|
end
|
70
70
|
|
71
71
|
def verify(state)
|
72
72
|
create_vagrantfile
|
73
|
-
|
73
|
+
run_remote busser_sync_cmd
|
74
|
+
run_remote busser_run_cmd
|
74
75
|
end
|
75
76
|
|
76
77
|
def destroy(state)
|
@@ -98,8 +99,16 @@ module Kitchen
|
|
98
99
|
WEBSITE = 'http://downloads.vagrantup.com/'
|
99
100
|
MIN_VER = '1.1.0'
|
100
101
|
|
101
|
-
def
|
102
|
-
|
102
|
+
def upload(source, destination)
|
103
|
+
debug("Uploading #{source} to #{destination} through WinRM")
|
104
|
+
run "vagrant winrm-upload \"#{source}\" \"#{destination}\""
|
105
|
+
end
|
106
|
+
|
107
|
+
def run_remote(cmd)
|
108
|
+
return unless cmd
|
109
|
+
|
110
|
+
debug("Executing winRM command #{cmd}")
|
111
|
+
run "vagrant winrm -c \"#{cmd.gsub(/["`\\\x0]/, '\\\\\0')}\""
|
103
112
|
end
|
104
113
|
|
105
114
|
def run(cmd, options = {})
|
data/spec/spec_helper.rb
CHANGED
@@ -1,78 +1,42 @@
|
|
1
1
|
# This file was generated by the `rspec --init` command. Conventionally, all
|
2
2
|
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
3
|
-
#
|
4
|
-
#
|
5
|
-
#
|
6
|
-
# Given that it is always loaded, you are encouraged to keep this file as
|
7
|
-
# light-weight as possible. Requiring heavyweight dependencies from this file
|
8
|
-
# will add to the boot time of your test suite on EVERY test run, even for an
|
9
|
-
# individual file that may not need all of that loaded. Instead, make a
|
10
|
-
# separate helper file that requires this one and then use it only in the specs
|
11
|
-
# that actually need it.
|
12
|
-
#
|
13
|
-
# The `.rspec` file also contains a few flags that are not defaults but that
|
14
|
-
# users commonly want.
|
3
|
+
# Require this file using `require "spec_helper"` to ensure that it is only
|
4
|
+
# loaded once.
|
15
5
|
#
|
6
|
+
require 'rspec'
|
7
|
+
require './lib/vagrant-winrm.rb'
|
8
|
+
require './lib/vagrant-winrm/plugin.rb'
|
9
|
+
require './lib/vagrant-winrm/plugin.rb'
|
10
|
+
require './lib/vagrant-winrm/commands/winrm.rb'
|
11
|
+
require './lib/vagrant-winrm/commands/winrm_config.rb'
|
12
|
+
require './lib/vagrant-winrm/commands/winrm_upload.rb'
|
13
|
+
|
16
14
|
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
17
15
|
RSpec.configure do |config|
|
18
|
-
# The settings below are suggested to provide a good initial experience
|
19
|
-
# with RSpec, but feel free to customize to your heart's content.
|
20
|
-
=begin
|
21
|
-
# These two settings work together to allow you to limit a spec run
|
22
|
-
# to individual examples or groups you care about by tagging them with
|
23
|
-
# `:focus` metadata. When nothing is tagged with `:focus`, all examples
|
24
|
-
# get run.
|
25
|
-
config.filter_run :focus
|
26
16
|
config.run_all_when_everything_filtered = true
|
27
|
-
|
28
|
-
# Many RSpec users commonly either run the entire suite or an individual
|
29
|
-
# file, and it's useful to allow more verbose output when running an
|
30
|
-
# individual spec file.
|
31
|
-
if config.files_to_run.one?
|
32
|
-
# Use the documentation formatter for detailed output,
|
33
|
-
# unless a formatter has already been configured
|
34
|
-
# (e.g. via a command-line flag).
|
35
|
-
config.default_formatter = 'doc'
|
36
|
-
end
|
37
|
-
|
38
|
-
# Print the 10 slowest examples and example groups at the
|
39
|
-
# end of the spec run, to help surface which specs are running
|
40
|
-
# particularly slow.
|
41
|
-
config.profile_examples = 10
|
17
|
+
config.filter_run :focus
|
42
18
|
|
43
19
|
# Run specs in random order to surface order dependencies. If you find an
|
44
20
|
# order dependency and want to debug it, you can fix the order by providing
|
45
21
|
# the seed, which is printed after each run.
|
46
22
|
# --seed 1234
|
47
|
-
config.order =
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
# rspec-expectations config goes here. You can use an alternate
|
56
|
-
# assertion/expectation library such as wrong or the stdlib/minitest
|
57
|
-
# assertions if you prefer.
|
58
|
-
config.expect_with :rspec do |expectations|
|
59
|
-
# Enable only the newer, non-monkey-patching expect syntax.
|
60
|
-
# For more details, see:
|
61
|
-
# - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
|
62
|
-
expectations.syntax = :expect
|
63
|
-
end
|
23
|
+
config.order = 'random'
|
24
|
+
end
|
25
|
+
# This file was generated by the `rspec --init` command. Conventionally, all
|
26
|
+
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
27
|
+
# Require this file using `require "spec_helper"` to ensure that it is only
|
28
|
+
# loaded once.
|
29
|
+
#
|
30
|
+
require 'rspec'
|
64
31
|
|
65
|
-
|
66
|
-
|
67
|
-
config.
|
68
|
-
|
69
|
-
# For more details, see:
|
70
|
-
# - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
|
71
|
-
mocks.syntax = :expect
|
32
|
+
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
33
|
+
RSpec.configure do |config|
|
34
|
+
config.run_all_when_everything_filtered = true
|
35
|
+
config.filter_run :focus
|
72
36
|
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
=
|
78
|
-
end
|
37
|
+
# Run specs in random order to surface order dependencies. If you find an
|
38
|
+
# order dependency and want to debug it, you can fix the order by providing
|
39
|
+
# the seed, which is printed after each run.
|
40
|
+
# --seed 1234
|
41
|
+
config.order = 'random'
|
42
|
+
end
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kitchen-vagrant_winrm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
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-09-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: test-kitchen
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.2
|
19
|
+
version: '1.2'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.2
|
26
|
+
version: '1.2'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -108,7 +108,7 @@ dependencies:
|
|
108
108
|
- - '>='
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
|
-
description: Kitchen::Driver::VagrantWinRM - A Test Kitchen Driver
|
111
|
+
description: Kitchen::Driver::VagrantWinRM - A Test Kitchen Driver using Vagrant-WinRM
|
112
112
|
email:
|
113
113
|
- b.courtois@criteo.com
|
114
114
|
executables: []
|
@@ -129,7 +129,7 @@ files:
|
|
129
129
|
- lib/kitchen/driver/vagrant_winrm_version.rb
|
130
130
|
- spec/spec_helper.rb
|
131
131
|
- templates/Vagrantfile.erb
|
132
|
-
homepage: https://
|
132
|
+
homepage: https://github.com/criteo/kitchen-vagant_winrm
|
133
133
|
licenses:
|
134
134
|
- Apache 2.0
|
135
135
|
metadata: {}
|
@@ -144,12 +144,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
144
144
|
version: '0'
|
145
145
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
146
146
|
requirements:
|
147
|
-
- - '
|
147
|
+
- - '>='
|
148
148
|
- !ruby/object:Gem::Version
|
149
|
-
version:
|
149
|
+
version: '0'
|
150
150
|
requirements: []
|
151
151
|
rubyforge_project:
|
152
|
-
rubygems_version: 2.0
|
152
|
+
rubygems_version: 2.3.0
|
153
153
|
signing_key:
|
154
154
|
specification_version: 4
|
155
155
|
summary: A Test Kitchen Driver using vagrant winrm
|