inspec 1.16.0 → 1.16.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c3a96e098c7ff3d2cb9f43ea5d89cf3a75e34169
4
- data.tar.gz: c16f66e486f2502feb4c0596c182d494cf2279f1
3
+ metadata.gz: d93468ebe9f076388557bbcebcc35028729e0e80
4
+ data.tar.gz: 20c57ff7acd7e352fdbba1169118e8a6b972abcd
5
5
  SHA512:
6
- metadata.gz: 0d052313445bc953e03e27d8f6f35f078df54249fc1736fc6b48c61c4cffe96b5bebc3ecede732b534ca56337134285c96ec915954dde7b9ccb19eca62bd296d
7
- data.tar.gz: 4cd5c91590c765f3c9dc8f07721187663245c3092f478672cdaaad95c9ff6ea2f6a3848e76ae36eda2ba5c76a799b01ecdfe22914974816e4a1e7bf70d916cef
6
+ metadata.gz: fbc82e1eabcd30a6ee62cbc113cc01a33250c2133a8488761d51782057220b280a08d237ebb86aec05d7dede8c7684f508d80606d905344ec285a34f1defe2ef
7
+ data.tar.gz: 94d8329e70dc5c775bea9360e826bdc5ec2c98c44dc510ad5e5849b03b7959d59bfd532b2a11e191a066701fce5dab6d49347b0d322f3c5bb52df7316316b0e2
data/CHANGELOG.md CHANGED
@@ -1,17 +1,18 @@
1
+ # Change Log
1
2
 
2
- n.n.n / 2017-03-02
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
- * Merge pull request #1520 from chef/adamleff/fix-habitat-build
6
- * Add Rake to Habitat build Gemfile
7
- * Merge pull request #1454 from jkerry/FunctionalJUnitReporter
8
- * correcting a typo, anonymnous -> anonymous
9
- * adding gitignore entries for the tar.gz files that result from the functional tests
10
- * resolving old junit unit tests with the new format. Adding a skipped test node as a result
11
- * Converting the junit reporter to use nokogiri on top of the json reporter output hash
12
- # Change Log
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/1.16.0) (2017-03-02)
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
- # InSpec will try to create a .inspec directory, so this needs to be somewhere writable by the hab user
314
- cd {{pkg.svc_var_path}}
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=cli 2>&1
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"
@@ -4,5 +4,5 @@
4
4
  # author: Christoph Hartmann
5
5
 
6
6
  module Inspec
7
- VERSION = '1.16.0'.freeze
7
+ VERSION = '1.16.1'.freeze
8
8
  end
@@ -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') {|http|
12
- http.read_timeout = 0.5
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.0
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-02 00:00:00.000000000 Z
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.1
600
+ rubygems_version: 2.5.2
601
601
  signing_key:
602
602
  specification_version: 4
603
603
  summary: Infrastructure and compliance testing.