kitchen-inspec 0.12.3 → 0.12.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.kitchen.yml +3 -2
- data/CHANGELOG.md +24 -2
- data/lib/kitchen/verifier/inspec.rb +5 -28
- data/lib/kitchen/verifier/inspec_version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ba6e2b134871abcca5c35a23cca82cdec2f06539
|
4
|
+
data.tar.gz: 15a88eb7d0b26bc8d5fa1565b4615627dbd27266
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 644043e2ee9868929d8cb5edeb3335865ee6ce90c39aef0cb43bfbd9b0e8f0f28819dd9ab9e7759b883790d6597d171337efe2b5f70a28a1843b4acf45725199
|
7
|
+
data.tar.gz: 9edf86720e8cd9323b0522fc4f7b793b95758d0b3aa5ff3f9d362822e20eb0d15efa10e49eb7480a3412ae8de7e002fa6903186f73b9de707d27653eb6faba19
|
data/.kitchen.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,28 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
-
## [0.12.
|
4
|
-
[Full Changelog](https://github.com/chef/kitchen-inspec/compare/v0.12.
|
3
|
+
## [0.12.4](https://github.com/chef/kitchen-inspec/tree/0.12.4) (2016-03-15)
|
4
|
+
[Full Changelog](https://github.com/chef/kitchen-inspec/compare/v0.12.3...0.12.4)
|
5
|
+
|
6
|
+
**Implemented enhancements:**
|
7
|
+
|
8
|
+
- InSpec Profile [\#46](https://github.com/chef/kitchen-inspec/issues/46)
|
9
|
+
|
10
|
+
**Fixed bugs:**
|
11
|
+
|
12
|
+
- `kitchen verify` fails on Windows [\#57](https://github.com/chef/kitchen-inspec/issues/57)
|
13
|
+
|
14
|
+
**Closed issues:**
|
15
|
+
|
16
|
+
- Unable to test installed Gems [\#65](https://github.com/chef/kitchen-inspec/issues/65)
|
17
|
+
- InSpec Profile support in kitchen-inspec [\#39](https://github.com/chef/kitchen-inspec/issues/39)
|
18
|
+
|
19
|
+
**Merged pull requests:**
|
20
|
+
|
21
|
+
- add output to runner options [\#64](https://github.com/chef/kitchen-inspec/pull/64) ([vjeffrey](https://github.com/vjeffrey))
|
22
|
+
- Improve handling for remote profiles [\#63](https://github.com/chef/kitchen-inspec/pull/63) ([chris-rock](https://github.com/chris-rock))
|
23
|
+
|
24
|
+
## [v0.12.3](https://github.com/chef/kitchen-inspec/tree/v0.12.3) (2016-03-01)
|
25
|
+
[Full Changelog](https://github.com/chef/kitchen-inspec/compare/v0.12.2...v0.12.3)
|
5
26
|
|
6
27
|
**Implemented enhancements:**
|
7
28
|
|
@@ -10,6 +31,7 @@
|
|
10
31
|
|
11
32
|
**Merged pull requests:**
|
12
33
|
|
34
|
+
- 0.12.3 [\#61](https://github.com/chef/kitchen-inspec/pull/61) ([chris-rock](https://github.com/chris-rock))
|
13
35
|
- add test-kitchen 1.6 as dependency [\#60](https://github.com/chef/kitchen-inspec/pull/60) ([chris-rock](https://github.com/chris-rock))
|
14
36
|
- Bump berks requirement to latest [\#58](https://github.com/chef/kitchen-inspec/pull/58) ([jkeiser](https://github.com/jkeiser))
|
15
37
|
|
@@ -26,31 +26,6 @@ require 'uri'
|
|
26
26
|
require 'pathname'
|
27
27
|
|
28
28
|
module Kitchen
|
29
|
-
# monkey patch test-kitchen to get the suite information within this verifier,
|
30
|
-
# since test-kitchen does not allow a proper hook
|
31
|
-
class DataMunger
|
32
|
-
# save reference to olf method
|
33
|
-
alias_method :original_verifier_data_for, :verifier_data_for
|
34
|
-
|
35
|
-
def verifier_data_for(suite, platform)
|
36
|
-
# filter current suite and extract `inspec_tests` and move it to verifier
|
37
|
-
data.fetch(:suites, []).select { |f| f[:name] == suite }.each do |suite_data|
|
38
|
-
move_data_to!(:verifier, suite_data, :inspec_tests)
|
39
|
-
end
|
40
|
-
|
41
|
-
# run original behaviour
|
42
|
-
original_verifier_data_for(suite, platform)
|
43
|
-
end
|
44
|
-
|
45
|
-
# TODO: remove, once https://github.com/test-kitchen/test-kitchen/pull/955 is merged
|
46
|
-
def move_data_to!(to, root, key)
|
47
|
-
return unless root.key?(key)
|
48
|
-
pdata = root.fetch(to, {})
|
49
|
-
pdata = { name: pdata } if pdata.is_a?(String)
|
50
|
-
root[to] = pdata.rmerge(key => root.delete(key)) if !root.fetch(key, nil).nil?
|
51
|
-
end
|
52
|
-
end
|
53
|
-
|
54
29
|
module Verifier
|
55
30
|
# InSpec verifier for Kitchen.
|
56
31
|
#
|
@@ -64,7 +39,6 @@ module Kitchen
|
|
64
39
|
# (see Base#call)
|
65
40
|
def call(state)
|
66
41
|
tests = collect_tests
|
67
|
-
|
68
42
|
opts = runner_options(instance.transport, state)
|
69
43
|
runner = ::Inspec::Runner.new(opts)
|
70
44
|
tests.each { |target| runner.add_target(target, opts) }
|
@@ -90,6 +64,8 @@ module Kitchen
|
|
90
64
|
# - test/integration
|
91
65
|
# - test/integration/inspec (prefered if used with other test environments)
|
92
66
|
#
|
67
|
+
# we do not filter for specific directories, this is core of inspec
|
68
|
+
#
|
93
69
|
# @return [Array<String>] array of suite directories
|
94
70
|
# @api private
|
95
71
|
def local_suite_files
|
@@ -106,8 +82,8 @@ module Kitchen
|
|
106
82
|
base = File.join(base, 'inspec') if legacy_mode
|
107
83
|
logger.info("Search `#{base}` for tests")
|
108
84
|
|
109
|
-
#
|
110
|
-
[base]
|
85
|
+
# only return the directory if it exists
|
86
|
+
Pathname.new(base).exist? ? [base] : []
|
111
87
|
end
|
112
88
|
|
113
89
|
# Returns an array of test profiles
|
@@ -135,6 +111,7 @@ module Kitchen
|
|
135
111
|
fail Kitchen::UserError, "Verifier #{name} does not support the #{transport.name} Transport"
|
136
112
|
end.tap do |runner_options|
|
137
113
|
runner_options['format'] = config[:format] unless config[:format].nil?
|
114
|
+
runner_options['output'] = config[:output] unless config[:output].nil?
|
138
115
|
end
|
139
116
|
end
|
140
117
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kitchen-inspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.12.
|
4
|
+
version: 0.12.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fletcher Nichol
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: inspec
|