kitchen-hyperv 0.10.3 → 0.12.0
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.
- checksums.yaml +4 -4
- data/Gemfile +15 -10
- data/Rakefile +42 -25
- data/kitchen-hyperv.gemspec +4 -1
- data/lib/kitchen/driver/hyperv.rb +354 -27
- data/lib/kitchen/driver/hyperv_version.rb +10 -1
- data/lib/kitchen/driver/powershell.rb +226 -14
- data/support/hyperv.ps1 +264 -233
- metadata +18 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d5b1645576764131a29498745a319db7a3e3fa166de15481ec0744acb3dbfe42
|
|
4
|
+
data.tar.gz: d82e688587b75d0156c71f3b79200b76e7f4d6601561d73a7445bd7236cdf005
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c82372e025d904e35a675987e01a1bd4805d653d090bb35814d9345c3437a854b87c49db795646afe019c536ab6f6696dd07de834ac279dc62aed31a3a85f543
|
|
7
|
+
data.tar.gz: 16c10a436d35cd4ca05fbad919ad3026f9eabcf403b8ffca5d55573cca445b15583b989d1c42517762151162d7fb5207006d67acd637791f8ad540ac13379064
|
data/Gemfile
CHANGED
|
@@ -1,16 +1,22 @@
|
|
|
1
1
|
source "https://rubygems.org"
|
|
2
2
|
|
|
3
|
-
gemspec
|
|
3
|
+
gemspec development_group: :test
|
|
4
4
|
|
|
5
|
+
# Everything needed to run `rake spec` and `rake style`. Deliberately small:
|
|
6
|
+
# the unit suite fakes the Train connection, so it needs neither Hyper-V nor
|
|
7
|
+
# any other Test Kitchen plugin to run on any platform.
|
|
5
8
|
group :test do
|
|
9
|
+
gem "rake"
|
|
10
|
+
gem "rspec", "~> 3.13"
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
# Only needed to drive a real VM via `kitchen test` against a Hyper-V host.
|
|
14
|
+
# Skip with: bundle config set --local without integration
|
|
15
|
+
group :integration do
|
|
6
16
|
gem "berkshelf"
|
|
7
|
-
gem "kitchen-inspec"
|
|
8
17
|
gem "kitchen-dokken"
|
|
18
|
+
gem "kitchen-inspec"
|
|
9
19
|
gem "kitchen-vagrant"
|
|
10
|
-
gem "rake"
|
|
11
|
-
gem "minitest", "~> 6.0", "< 6.1"
|
|
12
|
-
gem "minitest-stub-const"
|
|
13
|
-
gem "mocha", "~> 3.0"
|
|
14
20
|
end
|
|
15
21
|
|
|
16
22
|
group :development do
|
|
@@ -19,11 +25,10 @@ group :development do
|
|
|
19
25
|
gem "pry-stack_explorer"
|
|
20
26
|
end
|
|
21
27
|
|
|
22
|
-
group :chefstyle do
|
|
23
|
-
gem "chefstyle"
|
|
24
|
-
end
|
|
25
|
-
|
|
26
28
|
group :docs do
|
|
27
29
|
gem "yard"
|
|
28
30
|
end
|
|
29
31
|
|
|
32
|
+
group :cookstyle do
|
|
33
|
+
gem "cookstyle"
|
|
34
|
+
end
|
data/Rakefile
CHANGED
|
@@ -1,24 +1,27 @@
|
|
|
1
1
|
require "bundler/gem_tasks"
|
|
2
|
-
require "kitchen/driver/hyperv_version"
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
t.verbose = true
|
|
9
|
-
end
|
|
3
|
+
begin
|
|
4
|
+
require "rspec/core/rake_task"
|
|
5
|
+
|
|
6
|
+
RSpec::Core::RakeTask.new(:spec)
|
|
10
7
|
|
|
11
|
-
desc "Run
|
|
12
|
-
task
|
|
8
|
+
desc "Run the unit tests"
|
|
9
|
+
task unit: :spec
|
|
10
|
+
|
|
11
|
+
desc "Run all test suites"
|
|
12
|
+
task test: :spec
|
|
13
|
+
rescue LoadError
|
|
14
|
+
puts "rspec is not available. (sudo) gem install rspec to run the unit tests."
|
|
15
|
+
end
|
|
13
16
|
|
|
14
17
|
begin
|
|
15
|
-
require "chefstyle"
|
|
18
|
+
require "cookstyle/chefstyle"
|
|
16
19
|
require "rubocop/rake_task"
|
|
17
20
|
RuboCop::RakeTask.new(:style) do |task|
|
|
18
21
|
task.options += ["--display-cop-names", "--no-color"]
|
|
19
22
|
end
|
|
20
23
|
rescue LoadError
|
|
21
|
-
puts "chefstyle is not available. (sudo) gem install
|
|
24
|
+
puts "cookstyle/chefstyle is not available. (sudo) gem install cookstyle to do style checking."
|
|
22
25
|
end
|
|
23
26
|
|
|
24
27
|
desc "Run all quality tasks"
|
|
@@ -26,23 +29,37 @@ task quality: :style
|
|
|
26
29
|
|
|
27
30
|
begin
|
|
28
31
|
require "yard" unless defined?(YARD)
|
|
29
|
-
|
|
32
|
+
|
|
33
|
+
YARD::Rake::YardocTask.new(:yard) do |task|
|
|
34
|
+
task.stats_options = ["--list-undoc"]
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
namespace :yard do
|
|
38
|
+
desc "Report documentation coverage and list undocumented objects"
|
|
39
|
+
task :stats do
|
|
40
|
+
sh "yard stats --list-undoc"
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
desc "Serve the documentation at http://localhost:8808, reloading on change"
|
|
44
|
+
task :server do
|
|
45
|
+
sh "yard server --reload"
|
|
46
|
+
end
|
|
47
|
+
end
|
|
30
48
|
rescue LoadError
|
|
31
49
|
puts "yard is not available. (sudo) gem install yard to generate yard documentation."
|
|
32
50
|
end
|
|
33
51
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
GitHubChangelogGenerator::RakeTask.new :changelog do |config|
|
|
39
|
-
config.future_release = "v#{Kitchen::Driver::HYPERV_VERSION}"
|
|
40
|
-
config.issues = false
|
|
41
|
-
config.pulls = true
|
|
42
|
-
config.user = "test-kitchen"
|
|
43
|
-
config.project = "kitchen-hyperv"
|
|
52
|
+
desc "Run the PowerShell (Pester) tests for support/hyperv.ps1"
|
|
53
|
+
task :pester do
|
|
54
|
+
pwsh = %w{pwsh powershell}.find do |candidate|
|
|
55
|
+
system("which #{candidate} > /dev/null 2>&1") || system("where #{candidate} > NUL 2>&1")
|
|
44
56
|
end
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
57
|
+
|
|
58
|
+
abort "PowerShell was not found on PATH; install PowerShell 7+ to run the Pester tests." unless pwsh
|
|
59
|
+
|
|
60
|
+
sh pwsh, "-NoProfile", "-NonInteractive", "-File", File.join(__dir__, "spec", "powershell", "run_tests.ps1")
|
|
48
61
|
end
|
|
62
|
+
|
|
63
|
+
# `yard` is deliberately not a prerequisite of `default`: documentation coverage
|
|
64
|
+
# should never be able to fail a build.
|
|
65
|
+
task default: %i{test quality}
|
data/kitchen-hyperv.gemspec
CHANGED
|
@@ -18,7 +18,10 @@ Gem::Specification.new do |spec|
|
|
|
18
18
|
|
|
19
19
|
spec.required_ruby_version = ">= 3.1"
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
# Required directly by the PowerShell command encoder. base64 is a bundled
|
|
22
|
+
# gem from Ruby 3.4 on, so it has to be declared rather than assumed.
|
|
23
|
+
spec.add_dependency "base64", "~> 0.2"
|
|
24
|
+
spec.add_dependency "test-kitchen", ">= 3.0", "< 5"
|
|
22
25
|
spec.add_dependency "train", ">= 3.5", "< 4.0"
|
|
23
26
|
spec.add_dependency "train-winrm", ">= 0.2", "< 1.0"
|
|
24
27
|
end
|