inspec 1.16.0 → 1.16.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 +12 -11
- data/lib/bundles/inspec-habitat/profile.rb +12 -5
- data/lib/inspec/version.rb +1 -1
- data/lib/utils/latest_version.rb +3 -2
- 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: d93468ebe9f076388557bbcebcc35028729e0e80
|
4
|
+
data.tar.gz: 20c57ff7acd7e352fdbba1169118e8a6b972abcd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fbc82e1eabcd30a6ee62cbc113cc01a33250c2133a8488761d51782057220b280a08d237ebb86aec05d7dede8c7684f508d80606d905344ec285a34f1defe2ef
|
7
|
+
data.tar.gz: 94d8329e70dc5c775bea9360e826bdc5ec2c98c44dc510ad5e5849b03b7959d59bfd532b2a11e191a066701fce5dab6d49347b0d322f3c5bb52df7316316b0e2
|
data/CHANGELOG.md
CHANGED
@@ -1,17 +1,18 @@
|
|
1
|
+
# Change Log
|
1
2
|
|
2
|
-
|
3
|
-
|
3
|
+
## [1.16.1](https://github.com/chef/inspec/tree/v1.16.1) (2017-03-06)
|
4
|
+
[Full Changelog](https://github.com/chef/inspec/compare/v1.16.0...v1.16.1)
|
4
5
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
6
|
+
**Fixed bugs:**
|
7
|
+
|
8
|
+
- "inspec version" waits for connection timeout inside firewall [\#1537](https://github.com/chef/inspec/pull/1537) ([makotots](https://github.com/makotots))
|
9
|
+
|
10
|
+
**Merged pull requests:**
|
11
|
+
|
12
|
+
- Avoid connection timeout of "inspec version" [\#1538](https://github.com/chef/inspec/pull/1538) ([makotots](https://github.com/makotots))
|
13
|
+
- Fix omnibus build after new JUnit formatter [\#1539](https://github.com/chef/inspec/pull/1539) ([adamleff](https://github.com/adamleff))
|
13
14
|
|
14
|
-
## [1.16.0](https://github.com/chef/inspec/tree/
|
15
|
+
## [1.16.0](https://github.com/chef/inspec/tree/v1.16.0) (2017-03-02)
|
15
16
|
[Full Changelog](https://github.com/chef/inspec/compare/v1.15.0...v1.16.0)
|
16
17
|
|
17
18
|
**Implemented enhancements:**
|
@@ -79,7 +79,7 @@ module Habitat
|
|
79
79
|
private
|
80
80
|
|
81
81
|
def create_profile_object
|
82
|
-
@profile = Inspec::Profile.for_target(path,
|
82
|
+
@profile = Inspec::Profile.for_target(path, backend: Inspec::Backend.create(target: 'mock://'))
|
83
83
|
end
|
84
84
|
|
85
85
|
def verify_profile
|
@@ -307,22 +307,29 @@ do_install() {
|
|
307
307
|
|
308
308
|
export PATH=${PATH}:$(hab pkg path core/ruby)/bin
|
309
309
|
|
310
|
+
# InSpec will try to create a .cache directory in the user's home directory
|
311
|
+
# so this needs to be someplace writeable by the hab user
|
312
|
+
export HOME={{pkg.svc_var_path}}
|
313
|
+
|
310
314
|
PROFILE_IDENT="#{habitat_origin}/#{package_name}"
|
311
315
|
SLEEP_TIME={{cfg.sleep_time}}
|
316
|
+
RESULTS_DIR="{{pkg.svc_var_path}}/inspec_results"
|
317
|
+
RESULTS_FILE="${RESULTS_DIR}/#{package_name}.json"
|
318
|
+
ERROR_FILE="{{pkg.svc_var_path}}/inspec.err"
|
312
319
|
|
313
|
-
#
|
314
|
-
|
320
|
+
# Create a directory for inspec formatter output
|
321
|
+
mkdir -p {{pkg.svc_var_path}}/inspec_results
|
315
322
|
|
316
323
|
while true; do
|
317
324
|
echo "Executing InSpec for ${PROFILE_IDENT}"
|
318
|
-
hab pkg exec chef/inspec inspec exec $(hab pkg path ${PROFILE_IDENT})/dist --format=
|
325
|
+
hab pkg exec chef/inspec inspec exec $(hab pkg path ${PROFILE_IDENT})/dist --format=json > ${RESULTS_FILE} 2>${ERROR_FILE}
|
319
326
|
RC=$?
|
320
327
|
|
321
|
-
echo ""
|
322
328
|
if [ "x${RC}" == "x0" ]; then
|
323
329
|
echo "InSpec run completed successfully."
|
324
330
|
else
|
325
331
|
echo "InSpec run did NOT complete successfully."
|
332
|
+
cat ${ERROR_FILE}
|
326
333
|
fi
|
327
334
|
|
328
335
|
echo "sleeping for ${SLEEP_TIME} seconds"
|
data/lib/inspec/version.rb
CHANGED
data/lib/utils/latest_version.rb
CHANGED
@@ -8,8 +8,9 @@ class LatestInSpecVersion
|
|
8
8
|
# fetches the latest version from rubygems server
|
9
9
|
def latest
|
10
10
|
uri = URI('https://rubygems.org/api/v1/gems/inspec.json')
|
11
|
-
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == 'https'
|
12
|
-
|
11
|
+
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == 'https',
|
12
|
+
open_timeout: 0.5, read_timeout: 0.5
|
13
|
+
) {|http|
|
13
14
|
http.get(uri.path)
|
14
15
|
}
|
15
16
|
inspec_info = JSON.parse(res.body)
|
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.16.
|
4
|
+
version: 1.16.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: 2017-03-
|
11
|
+
date: 2017-03-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: train
|
@@ -597,7 +597,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
597
597
|
version: '0'
|
598
598
|
requirements: []
|
599
599
|
rubyforge_project:
|
600
|
-
rubygems_version: 2.5.
|
600
|
+
rubygems_version: 2.5.2
|
601
601
|
signing_key:
|
602
602
|
specification_version: 4
|
603
603
|
summary: Infrastructure and compliance testing.
|