kitchen-inspec 0.10.0 → 0.10.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +17 -3
- data/lib/kitchen/verifier/inspec.rb +20 -17
- data/lib/kitchen/verifier/inspec_version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 623f1ada1f944ebc91986e21066ed4b149b2e48f
|
4
|
+
data.tar.gz: d8cd56302ec6f135ef1bbb021485d30c78259a21
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4aabb56344883286595083eca39115912ecbdb71f44f2a35b74258fd8299a1d5dcded95f9e08c98d4234b56aa564a71e7fd8b4904857ad8d9d6dcc7a25bcd6e2
|
7
|
+
data.tar.gz: cc3e9207c51bec6b5fb01ec1bfaa1f7282d3da592017ae4fc7c33d4851654f7216b08ef8a9d3b36d690836ce15fdac0d49179ebb6f7a4a4ad5661b20fb2d7e96
|
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,19 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
-
## [0.10.
|
4
|
-
[Full Changelog](https://github.com/chef/kitchen-inspec/compare/v0.
|
3
|
+
## [0.10.1](https://github.com/chef/kitchen-inspec/tree/0.10.1) (2016-01-15)
|
4
|
+
[Full Changelog](https://github.com/chef/kitchen-inspec/compare/v0.10.0...0.10.1)
|
5
|
+
|
6
|
+
**Closed issues:**
|
7
|
+
|
8
|
+
- Inspec does not gracefully allow transports other than winrm and ssh. [\#31](https://github.com/chef/kitchen-inspec/issues/31)
|
9
|
+
- Specify inspec output formats in .kitchen.yml [\#26](https://github.com/chef/kitchen-inspec/issues/26)
|
10
|
+
|
11
|
+
**Merged pull requests:**
|
12
|
+
|
13
|
+
- Allow transports which are subclasses of the core ones. [\#32](https://github.com/chef/kitchen-inspec/pull/32) ([coderanger](https://github.com/coderanger))
|
14
|
+
|
15
|
+
## [v0.10.0](https://github.com/chef/kitchen-inspec/tree/v0.10.0) (2016-01-07)
|
16
|
+
[Full Changelog](https://github.com/chef/kitchen-inspec/compare/v0.9.6...v0.10.0)
|
5
17
|
|
6
18
|
**Fixed bugs:**
|
7
19
|
|
@@ -10,6 +22,7 @@
|
|
10
22
|
|
11
23
|
**Merged pull requests:**
|
12
24
|
|
25
|
+
- Preparing the 0.10.0 release [\#29](https://github.com/chef/kitchen-inspec/pull/29) ([tyler-ball](https://github.com/tyler-ball))
|
13
26
|
- Make test-kitchen a dev dependency [\#28](https://github.com/chef/kitchen-inspec/pull/28) ([jaym](https://github.com/jaym))
|
14
27
|
- Specify inspec output format from kitchen.yml [\#27](https://github.com/chef/kitchen-inspec/pull/27) ([cheesesashimi](https://github.com/cheesesashimi))
|
15
28
|
- remove gem push restriction [\#24](https://github.com/chef/kitchen-inspec/pull/24) ([arlimus](https://github.com/arlimus))
|
@@ -36,6 +49,7 @@
|
|
36
49
|
|
37
50
|
**Merged pull requests:**
|
38
51
|
|
52
|
+
- 0.9.6 [\#23](https://github.com/chef/kitchen-inspec/pull/23) ([arlimus](https://github.com/arlimus))
|
39
53
|
- fix readme [\#22](https://github.com/chef/kitchen-inspec/pull/22) ([srenatus](https://github.com/srenatus))
|
40
54
|
|
41
55
|
## [v0.9.0](https://github.com/chef/kitchen-inspec/tree/v0.9.0) (2015-11-03)
|
@@ -53,4 +67,4 @@
|
|
53
67
|
|
54
68
|
|
55
69
|
|
56
|
-
\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
|
70
|
+
\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
|
@@ -17,6 +17,8 @@
|
|
17
17
|
# See the License for the specific language governing permissions and
|
18
18
|
# limitations under the License.
|
19
19
|
|
20
|
+
require 'kitchen/transport/ssh'
|
21
|
+
require 'kitchen/transport/winrm'
|
20
22
|
require 'kitchen/verifier/inspec_version'
|
21
23
|
require 'kitchen/verifier/base'
|
22
24
|
|
@@ -33,25 +35,9 @@ module Kitchen
|
|
33
35
|
|
34
36
|
# (see Base#call)
|
35
37
|
def call(state)
|
36
|
-
transport_data = instance.transport.diagnose.merge(state)
|
37
|
-
|
38
|
-
runner_options = case (name = instance.transport.name.downcase)
|
39
|
-
when 'ssh'
|
40
|
-
runner_options_for_ssh(transport_data)
|
41
|
-
when 'winrm'
|
42
|
-
runner_options_for_winrm(transport_data)
|
43
|
-
else
|
44
|
-
fail(
|
45
|
-
Kitchen::UserError,
|
46
|
-
"Verifier #{name}",
|
47
|
-
" does not support the #{name} Transport",
|
48
|
-
)
|
49
|
-
end
|
50
|
-
runner_options['format'] = config[:format] unless config[:format].nil?
|
51
|
-
|
52
38
|
tests = helper_files + local_suite_files
|
53
39
|
|
54
|
-
runner = ::Inspec::Runner.new(runner_options)
|
40
|
+
runner = ::Inspec::Runner.new(runner_options(instance.transport, state))
|
55
41
|
runner.add_tests(tests)
|
56
42
|
debug("Running specs from: #{tests.inspect}")
|
57
43
|
exit_code = runner.run
|
@@ -100,6 +86,23 @@ module Kitchen
|
|
100
86
|
end
|
101
87
|
end
|
102
88
|
|
89
|
+
# Returns a configuration Hash that can be passed to a `Inspec::Runner`.
|
90
|
+
#
|
91
|
+
# @return [Hash] a configuration hash of string-based keys
|
92
|
+
# @api private
|
93
|
+
def runner_options(transport, state = {})
|
94
|
+
transport_data = transport.diagnose.merge(state)
|
95
|
+
if transport.is_a?(Kitchen::Transport::Ssh)
|
96
|
+
runner_options_for_ssh(transport_data)
|
97
|
+
elsif transport.is_a?(Kitchen::Transport::Winrm)
|
98
|
+
runner_options_for_winrm(transport_data)
|
99
|
+
else
|
100
|
+
fail Kitchen::UserError, "Verifier #{name} does not support the #{transport.name} Transport"
|
101
|
+
end.tap do |runner_options|
|
102
|
+
runner_options['format'] = config[:format] unless config[:format].nil?
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
103
106
|
# Returns a configuration Hash that can be passed to a `Inspec::Runner`.
|
104
107
|
#
|
105
108
|
# @return [Hash] a configuration hash of string-based keys
|
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.10.
|
4
|
+
version: 0.10.1
|
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-01-
|
11
|
+
date: 2016-01-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: inspec
|
@@ -150,7 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
150
150
|
version: '0'
|
151
151
|
requirements: []
|
152
152
|
rubyforge_project:
|
153
|
-
rubygems_version: 2.4.
|
153
|
+
rubygems_version: 2.4.6
|
154
154
|
signing_key:
|
155
155
|
specification_version: 4
|
156
156
|
summary: A Test Kitchen Verifier for InSpec
|