inspec 1.2.0 → 1.2.1
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/CHANGELOG.md +26 -2
- data/README.md +13 -0
- data/Rakefile +17 -0
- data/examples/profile/inspec.lock +3 -0
- data/examples/ssh/README.md +3 -0
- data/examples/ssh/controls/example.rb +9 -0
- data/examples/ssh/inspec.lock +3 -0
- data/examples/ssh/inspec.yml +8 -0
- data/examples/ssh/libraries/.gitkeep +0 -0
- data/examples/ssh/libraries/habitat.rb +13 -0
- data/inspec.gemspec +1 -1
- data/lib/inspec/rspec_json_formatter.rb +3 -3
- data/lib/inspec/version.rb +1 -1
- data/lib/matchers/matchers.rb +2 -2
- metadata +11 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1f48211d9143cfdb1bdf736389d72e2048bc26b3
|
4
|
+
data.tar.gz: 697546cf50666e244c114390238fbe1f0de18a91
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c8cf98323a40791eecd63b25cc6af48f49b2d139069f4f0e02d92e8daa03862048a01eec1c10f5d1b0008083eb43d6478b1721da7e3af8e30c87740cf61a54af
|
7
|
+
data.tar.gz: 5942695dbda9915900163f637ad847e0e75a7072ea0f5e415b74776a1c6158e0c4ccd0d80cfafb4c42c018b1f2c5a1dda76b88861c7a11ee92e41d89a4c05366
|
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,31 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
-
## [1.2.
|
4
|
-
[Full Changelog](https://github.com/chef/inspec/compare/v1.
|
3
|
+
## [1.2.1](https://github.com/chef/inspec/tree/1.2.1) (2016-10-15)
|
4
|
+
[Full Changelog](https://github.com/chef/inspec/compare/v1.2.0...1.2.1)
|
5
|
+
|
6
|
+
**Implemented enhancements:**
|
7
|
+
|
8
|
+
- Show actual value for cmp octal comparisons in string to match expected [\#1211](https://github.com/chef/inspec/pull/1211) ([alexpop](https://github.com/alexpop))
|
9
|
+
|
10
|
+
**Fixed bugs:**
|
11
|
+
|
12
|
+
- Using "cmp" Against File Mode Fails [\#1188](https://github.com/chef/inspec/issues/1188)
|
13
|
+
- Unexpected failures with kitchen-inspec and inspec 1.0.0 [\#1187](https://github.com/chef/inspec/issues/1187)
|
14
|
+
- Rspec deprecation warnings added to test summary creating invalid json file [\#952](https://github.com/chef/inspec/issues/952)
|
15
|
+
- update train to fix empty target URIs [\#1221](https://github.com/chef/inspec/pull/1221) ([arlimus](https://github.com/arlimus))
|
16
|
+
|
17
|
+
**Closed issues:**
|
18
|
+
|
19
|
+
- www: typo on inspec.io [\#1197](https://github.com/chef/inspec/issues/1197)
|
20
|
+
|
21
|
+
**Merged pull requests:**
|
22
|
+
|
23
|
+
- move Inspec Habitat package to chef/inspec. [\#1216](https://github.com/chef/inspec/pull/1216) ([metadave](https://github.com/metadave))
|
24
|
+
- fix kitchen-inspec integration-1187 [\#1213](https://github.com/chef/inspec/pull/1213) ([vjeffrey](https://github.com/vjeffrey))
|
25
|
+
- Website: Fix typo in homepage code image [\#1210](https://github.com/chef/inspec/pull/1210) ([magwalk](https://github.com/magwalk))
|
26
|
+
|
27
|
+
## [v1.2.0](https://github.com/chef/inspec/tree/v1.2.0) (2016-10-10)
|
28
|
+
[Full Changelog](https://github.com/chef/inspec/compare/v1.1.0...v1.2.0)
|
5
29
|
|
6
30
|
**Implemented enhancements:**
|
7
31
|
|
data/README.md
CHANGED
@@ -110,6 +110,19 @@ gem install inspec-*.gem
|
|
110
110
|
|
111
111
|
On Windows, you need to install [Ruby](http://rubyinstaller.org/downloads/) with [Ruby Development Kit](https://github.com/oneclick/rubyinstaller/wiki/Development-Kit) to build dependencies with its native extensions.
|
112
112
|
|
113
|
+
### Install via Habitat
|
114
|
+
|
115
|
+
Currently, this method of installation only supports Linux. See the [Habitat site](https://www.habitat.sh/) for more information.
|
116
|
+
|
117
|
+
Download the `hab` binary from the [Habitat](https://www.habitat.sh/docs/get-habitat/) site.
|
118
|
+
|
119
|
+
```bash
|
120
|
+
hab pkg install chef/inspec
|
121
|
+
export PATH="$(hab pkg path core/ruby)/bin:$(hab pkg path chef/inspec)/bin:$PATH"
|
122
|
+
|
123
|
+
inspec
|
124
|
+
```
|
125
|
+
|
113
126
|
### Run InSpec
|
114
127
|
|
115
128
|
You should now be able to run:
|
data/Rakefile
CHANGED
@@ -167,3 +167,20 @@ task :release_docker do
|
|
167
167
|
puts "--> #{cmd}"
|
168
168
|
sh('sh', '-c', cmd)
|
169
169
|
end
|
170
|
+
|
171
|
+
desc 'Release a new Habitat package'
|
172
|
+
task :release_habitat do
|
173
|
+
version = Inspec::VERSION
|
174
|
+
ENV['HAB_ORIGIN'] = "chef"
|
175
|
+
if Dir.exist?("./results") then
|
176
|
+
raise "Please remove the ./results directory"
|
177
|
+
end
|
178
|
+
if ! ENV.has_key?("HAB_AUTH_TOKEN") then
|
179
|
+
raise "Please set the HAB_AUTH_TOKEN environment variable"
|
180
|
+
end
|
181
|
+
cmd = "echo #{version} > ./habitat/VERSION && "\
|
182
|
+
"hab studio build ./habitat && " \
|
183
|
+
"hab pkg upload ./results/*.hart"
|
184
|
+
puts "--> #{cmd}"
|
185
|
+
sh('sh', '-c', cmd)
|
186
|
+
end
|
File without changes
|
data/inspec.gemspec
CHANGED
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
25
25
|
spec.require_paths = ['lib']
|
26
26
|
|
27
|
-
spec.add_dependency 'train', '>=0.
|
27
|
+
spec.add_dependency 'train', '>=0.20.1', '<1.0'
|
28
28
|
spec.add_dependency 'thor', '~> 0.19'
|
29
29
|
spec.add_dependency 'json', '>= 1.8', '< 3.0'
|
30
30
|
spec.add_dependency 'rainbow', '~> 2'
|
@@ -63,12 +63,12 @@ class InspecRspecMiniJson < RSpec::Core::Formatters::JsonFormatter
|
|
63
63
|
private
|
64
64
|
|
65
65
|
def format_example(example)
|
66
|
-
if example.metadata[:description_args].length
|
67
|
-
code_description = example.metadata[:full_description]
|
68
|
-
else
|
66
|
+
if example.metadata[:description_args].length > 0 && !example.metadata[:skip].nil?
|
69
67
|
# For skipped profiles, rspec returns in full_description the skip_message as well. We don't want
|
70
68
|
# to mix the two, so we pick the full_description from the example.metadata[:example_group] hash.
|
71
69
|
code_description = example.metadata[:example_group][:description]
|
70
|
+
else
|
71
|
+
code_description = example.metadata[:full_description]
|
72
72
|
end
|
73
73
|
|
74
74
|
res = {
|
data/lib/inspec/version.rb
CHANGED
data/lib/matchers/matchers.rb
CHANGED
@@ -305,12 +305,12 @@ RSpec::Matchers.define :cmp do |first_expected|
|
|
305
305
|
end
|
306
306
|
|
307
307
|
failure_message do |actual|
|
308
|
-
actual = '0' + actual.to_s(8) if octal?(@expected)
|
308
|
+
actual = ('0' + actual.to_s(8)).inspect if octal?(@expected)
|
309
309
|
"\n" + format_expectation(false) + "\n got: #{actual}\n\n(compared using `cmp` matcher)\n"
|
310
310
|
end
|
311
311
|
|
312
312
|
failure_message_when_negated do |actual|
|
313
|
-
actual = '0' + actual.to_s(8) if octal?(@expected)
|
313
|
+
actual = ('0' + actual.to_s(8)).inspect if octal?(@expected)
|
314
314
|
"\n" + format_expectation(true) + "\n got: #{actual}\n\n(compared using `cmp` matcher)\n"
|
315
315
|
end
|
316
316
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: inspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dominik Richter
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-10-
|
11
|
+
date: 2016-10-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: train
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.20.1
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: '1.0'
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.
|
29
|
+
version: 0.20.1
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: '1.0'
|
@@ -344,8 +344,15 @@ files:
|
|
344
344
|
- examples/profile/controls/example.rb
|
345
345
|
- examples/profile/controls/gordon.rb
|
346
346
|
- examples/profile/controls/meta.rb
|
347
|
+
- examples/profile/inspec.lock
|
347
348
|
- examples/profile/inspec.yml
|
348
349
|
- examples/profile/libraries/gordon_config.rb
|
350
|
+
- examples/ssh/README.md
|
351
|
+
- examples/ssh/controls/example.rb
|
352
|
+
- examples/ssh/inspec.lock
|
353
|
+
- examples/ssh/inspec.yml
|
354
|
+
- examples/ssh/libraries/.gitkeep
|
355
|
+
- examples/ssh/libraries/habitat.rb
|
349
356
|
- inspec.gemspec
|
350
357
|
- lib/bundles/README.md
|
351
358
|
- lib/bundles/inspec-compliance.rb
|