inspec 0.14.7 → 0.14.8

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: e23aea3ed6f256ada21afef149fe87553f84aa17
4
- data.tar.gz: 1d36f905fa6a2dae444900d01d9db522da10fdb7
3
+ metadata.gz: 44a85cca34621ed900f32162b2c6533a7315bfe5
4
+ data.tar.gz: 921d12e76104f1676883b087e5ab9f050de4db8d
5
5
  SHA512:
6
- metadata.gz: 790db6f9584440a041282924b5e70faa2763c4b1e3dcee3f7f26d2bb29dc998ebaade90158179be869f624b9510172623641522508fb4015dad19bd9a3b6a0af
7
- data.tar.gz: 220b6f09b83e99abddba71d156288ee5e1171e061d9bbc4cea33e34b9570dac3416602007ebb8982081ebcc88837eee82808d7780ff000c9cfd326fc1b049a36
6
+ metadata.gz: 7d61ff5f5528d764df121aaed034e7bb6c25f46e7c2967bbea21d499e7a22c43f8ce24f7eec0a777a55056170a750ad8d6beb5f5a2680d8072cb8430a80ee684
7
+ data.tar.gz: e672dfb4be6c4cd21e8d6e0d0ecc084df103ee53a93a0da36b565fb7b785d20f808f36846ea2078134f14844ce539414bff6591a086bfedc693f82a1ba2cefdf
data/CHANGELOG.md CHANGED
@@ -1,18 +1,27 @@
1
1
  # Change Log
2
2
 
3
- ## [0.14.7](https://github.com/chef/inspec/tree/0.14.7) (2016-03-01)
4
- [Full Changelog](https://github.com/chef/inspec/compare/v0.14.6...0.14.7)
3
+ ## [0.14.8](https://github.com/chef/inspec/tree/0.14.8) (2016-03-04)
4
+ [Full Changelog](https://github.com/chef/inspec/compare/v0.14.7...0.14.8)
5
5
 
6
- **Fixed bugs:**
6
+ **Closed issues:**
7
7
 
8
- - `compliance` command does not work with self-signed https [\#511](https://github.com/chef/inspec/issues/511)
8
+ - Question: Cron? [\#490](https://github.com/chef/inspec/issues/490)
9
9
 
10
- **Closed issues:**
10
+ **Merged pull requests:**
11
11
 
12
+ - expose control impacts in json [\#519](https://github.com/chef/inspec/pull/519) ([arlimus](https://github.com/arlimus))
13
+
14
+ ## [v0.14.7](https://github.com/chef/inspec/tree/v0.14.7) (2016-03-01)
15
+ [Full Changelog](https://github.com/chef/inspec/compare/v0.14.6...v0.14.7)
16
+
17
+ **Fixed bugs:**
18
+
19
+ - `compliance` command does not work with self-signed https [\#511](https://github.com/chef/inspec/issues/511)
12
20
  - check error - digest: no implicit conversion of nil into String \(TypeError\) [\#509](https://github.com/chef/inspec/issues/509)
13
21
 
14
22
  **Merged pull requests:**
15
23
 
24
+ - 0.14.7 [\#513](https://github.com/chef/inspec/pull/513) ([chris-rock](https://github.com/chris-rock))
16
25
  - adds a insecure option [\#512](https://github.com/chef/inspec/pull/512) ([chris-rock](https://github.com/chris-rock))
17
26
 
18
27
  ## [v0.14.6](https://github.com/chef/inspec/tree/v0.14.6) (2016-03-01)
@@ -0,0 +1,3 @@
1
+ describe tiny do
2
+ require 'pry'; binding.pry
3
+ end
@@ -0,0 +1,10 @@
1
+ name: resource
2
+ title: InSpec Example Resources
3
+ maintainer: Chef Software, Inc.
4
+ copyright: Chef Software, Inc.
5
+ copyright_email: support@chef.io
6
+ license: Apache 2 license
7
+ summary: Demonstrates the use of InSpec custom resources
8
+ version: 1.0.0
9
+ supports:
10
+ - linux
@@ -0,0 +1,3 @@
1
+ class Tiny < Inspec.resource(1)
2
+ name 'tiny'
3
+ end
@@ -21,6 +21,7 @@ module RSpec::Core::Formatters
21
21
  run_time: example.execution_result.run_time,
22
22
  pending_message: example.execution_result.pending_message,
23
23
  id: example.metadata[:id],
24
+ impact: example.metadata[:impact],
24
25
  }
25
26
  end
26
27
  end
data/lib/inspec/runner.rb CHANGED
@@ -155,7 +155,7 @@ module Inspec
155
155
  # scope.
156
156
  dsl = Inspec::Resource.create_dsl(backend)
157
157
  example.send(:include, dsl)
158
- @test_collector.add_test(example, rule_id)
158
+ @test_collector.add_test(example, rule_id, rule)
159
159
  end
160
160
  end
161
161
  end
@@ -9,7 +9,7 @@ module Inspec
9
9
  @tests = []
10
10
  end
11
11
 
12
- def add_test(example, _rule_id)
12
+ def add_test(example, _rule_id, _rule)
13
13
  @tests.push(example)
14
14
  end
15
15
 
@@ -34,8 +34,8 @@ module Inspec
34
34
  # @param [RSpecExampleGroup] example test
35
35
  # @param [String] rule_id the ID associated with this check
36
36
  # @return [nil]
37
- def add_test(example, rule_id)
38
- set_rspec_ids(example, rule_id)
37
+ def add_test(example, rule_id, rule)
38
+ set_rspec_ids(example, rule_id, rule)
39
39
  @tests.register(example)
40
40
  end
41
41
 
@@ -92,13 +92,15 @@ module Inspec
92
92
  # @param [RSpecExampleGroup] example object which contains a check
93
93
  # @param [Type] id describe id
94
94
  # @return [Type] description of returned object
95
- def set_rspec_ids(example, id)
95
+ def set_rspec_ids(example, id, rule)
96
96
  example.metadata[:id] = id
97
+ example.metadata[:impact] = rule.impact
97
98
  example.filtered_examples.each do |e|
98
99
  e.metadata[:id] = id
100
+ e.metadata[:impact] = rule.impact
99
101
  end
100
102
  example.children.each do |child|
101
- set_rspec_ids(child, id)
103
+ set_rspec_ids(child, id, rule)
102
104
  end
103
105
  end
104
106
  end
@@ -3,5 +3,5 @@
3
3
  # author: Christoph Hartmann
4
4
 
5
5
  module Inspec
6
- VERSION = '0.14.7'.freeze
6
+ VERSION = '0.14.8'.freeze
7
7
  end
@@ -0,0 +1,10 @@
1
+ name: complete
2
+ title: complete example profile
3
+ maintainer: Chef Software, Inc.
4
+ copyright: Chef Software, Inc.
5
+ copyright_email: support@chef.io
6
+ license: Proprietary, All rights reserved
7
+ summary: Testing stub
8
+ version: 1.0.0
9
+ supports:
10
+ - os-family: linux
@@ -0,0 +1,3 @@
1
+ class Tiny < Inspec.resource(1)
2
+ name 'tiny'
3
+ end
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: 0.14.7
4
+ version: 0.14.8
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-03-01 00:00:00.000000000 Z
11
+ date: 2016-03-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: r-train
@@ -207,6 +207,9 @@ files:
207
207
  - examples/profile/controls/gordon.rb
208
208
  - examples/profile/inspec.yml
209
209
  - examples/profile/libraries/gordon_config.rb
210
+ - examples/resource/controls/tiny.rb
211
+ - examples/resource/inspec.yml
212
+ - examples/resource/libraries/tiny.rb
210
213
  - inspec.gemspec
211
214
  - lib/bundles/README.md
212
215
  - lib/bundles/inspec-compliance.rb
@@ -491,6 +494,8 @@ files:
491
494
  - test/unit/mock/profiles/legacy-empty-metadata/metadata.rb
492
495
  - test/unit/mock/profiles/legacy-simple-metadata/metadata.rb
493
496
  - test/unit/mock/profiles/legacy-simple-metadata/test/.gitkeep
497
+ - test/unit/mock/profiles/resource-tiny/inspec.yml
498
+ - test/unit/mock/profiles/resource-tiny/libraries/resource.rb
494
499
  - test/unit/mock/profiles/simple-metadata/inspec.yml
495
500
  - test/unit/plugin_test.rb
496
501
  - test/unit/profile_context_test.rb
@@ -567,7 +572,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
567
572
  version: '0'
568
573
  requirements: []
569
574
  rubyforge_project:
570
- rubygems_version: 2.4.6
575
+ rubygems_version: 2.5.1
571
576
  signing_key:
572
577
  specification_version: 4
573
578
  summary: Infrastructure and compliance testing.
@@ -738,6 +743,8 @@ test_files:
738
743
  - test/unit/mock/profiles/legacy-empty-metadata/metadata.rb
739
744
  - test/unit/mock/profiles/legacy-simple-metadata/metadata.rb
740
745
  - test/unit/mock/profiles/legacy-simple-metadata/test/.gitkeep
746
+ - test/unit/mock/profiles/resource-tiny/inspec.yml
747
+ - test/unit/mock/profiles/resource-tiny/libraries/resource.rb
741
748
  - test/unit/mock/profiles/simple-metadata/inspec.yml
742
749
  - test/unit/plugin_test.rb
743
750
  - test/unit/profile_context_test.rb