inspec 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6bb4dc9badefe6bf34ad0969692d1185c9e5b31e
4
- data.tar.gz: 46bca7c1a454afb81415070f573bc48801a0aa8a
3
+ metadata.gz: 1f48211d9143cfdb1bdf736389d72e2048bc26b3
4
+ data.tar.gz: 697546cf50666e244c114390238fbe1f0de18a91
5
5
  SHA512:
6
- metadata.gz: 9b51e806a28c23227926dba00753cfcb9491221930bf16bd87baf7914b45bede895c6be023fe0ce1d2f29ce2009d1c68676aecc44964b04c195e7b7ccdee87c7
7
- data.tar.gz: ef376dbe78816aa749ae27c1d934eb361c84e050c165cd494385fefe9ba59faa79af73ccda87e80c9af60ac6f54a8dc269cea2a50d8f6c0f0efe0d23d8bdcd89
6
+ metadata.gz: c8cf98323a40791eecd63b25cc6af48f49b2d139069f4f0e02d92e8daa03862048a01eec1c10f5d1b0008083eb43d6478b1721da7e3af8e30c87740cf61a54af
7
+ data.tar.gz: 5942695dbda9915900163f637ad847e0e75a7072ea0f5e415b74776a1c6158e0c4ccd0d80cfafb4c42c018b1f2c5a1dda76b88861c7a11ee92e41d89a4c05366
@@ -1,7 +1,31 @@
1
1
  # Change Log
2
2
 
3
- ## [1.2.0](https://github.com/chef/inspec/tree/1.2.0) (2016-10-10)
4
- [Full Changelog](https://github.com/chef/inspec/compare/v1.1.0...1.2.0)
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
@@ -0,0 +1,3 @@
1
+ ---
2
+ lockfile_version: 1
3
+ depends: []
@@ -0,0 +1,3 @@
1
+ # Example InSpec Profile
2
+
3
+ This example shows the implementation of an InSpec [profile](../../docs/profiles.rst).
@@ -0,0 +1,9 @@
1
+ # encoding: utf-8
2
+ # copyright: 2015, The Authors
3
+ # license: All rights reserved
4
+
5
+ title 'my hab tests'
6
+
7
+ describe habitat do
8
+ it { should exist }
9
+ end
@@ -0,0 +1,3 @@
1
+ ---
2
+ lockfile_version: 1
3
+ depends: []
@@ -0,0 +1,8 @@
1
+ name: ssh
2
+ title: InSpec Profile
3
+ maintainer: The Authors
4
+ copyright: The Authors
5
+ copyright_email: you@example.com
6
+ license: All Rights Reserved
7
+ summary: An InSpec Compliance Profile
8
+ version: 0.1.0
File without changes
@@ -0,0 +1,13 @@
1
+
2
+ class Habitat < Inspec.resource(1)
3
+ name "habitat"
4
+ example "
5
+ describe habitat do
6
+ it { should exist }
7
+ end
8
+ "
9
+
10
+ def exist?
11
+ inspec.file('hab').exist?
12
+ end
13
+ end
@@ -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.19.1', '<1.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 == 0
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 = {
@@ -4,5 +4,5 @@
4
4
  # author: Christoph Hartmann
5
5
 
6
6
  module Inspec
7
- VERSION = '1.2.0'.freeze
7
+ VERSION = '1.2.1'.freeze
8
8
  end
@@ -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.0
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-10 00:00:00.000000000 Z
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.1
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.19.1
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