inspec 0.14.2 → 0.14.3

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: ee4e0eeba70bb333ceb475748c630fddcf391b71
4
- data.tar.gz: 9905be5cb12a127b4c76dbe94ffbd6ea56f2e94e
3
+ metadata.gz: 7a5fe5ef68c859de078978c41fac03fa6164c5ff
4
+ data.tar.gz: e9a4ad5bb3a9808801ad153d50843eeb8f6fbcee
5
5
  SHA512:
6
- metadata.gz: db089d42ea726c458809a1326beeb437e14d7b5bc0914974c7a84838c02dcda113307aa5088d0a0c2c0a57a5d7aff8bea787f135d4c04e32be463fc6fa335ff0
7
- data.tar.gz: d04cb5ae70e8654386a5eba79a92f3dcf60b71c2bf6181e79cd1a78fd4f39d6a0fe41f336461d782368a4e4ad2a59f5aa2ccef6a4c8fded9cbcb8aeeaf3cab8c
6
+ metadata.gz: 4bd1406a6eccaf2fe72cdab36d4e8b467653f14767a6006ea01e9768d5d7e1329b7a81e65308d404f8df61b900e5a4280addd849e5c8fa673a204e79ae2c9e37
7
+ data.tar.gz: 2226db16772df0467cca929a0ee68c5b3925450831f15630b0ac09003dacf55579a1cc67acdd252de04d44846e557d70b4959a3f795ad5ea2226d3ce2c9bbb42
@@ -1,7 +1,18 @@
1
1
  # Change Log
2
2
 
3
- ## [0.14.2](https://github.com/chef/inspec/tree/0.14.2) (2016-02-22)
4
- [Full Changelog](https://github.com/chef/inspec/compare/v0.14.1...0.14.2)
3
+ ## [0.14.3](https://github.com/chef/inspec/tree/0.14.3) (2016-02-24)
4
+ [Full Changelog](https://github.com/chef/inspec/compare/v0.14.2...0.14.3)
5
+
6
+ **Implemented enhancements:**
7
+
8
+ - cmp matcher should compare expected string == number [\#487](https://github.com/chef/inspec/pull/487) ([chris-rock](https://github.com/chris-rock))
9
+
10
+ **Merged pull requests:**
11
+
12
+ - expose inspec errors during profile read [\#492](https://github.com/chef/inspec/pull/492) ([arlimus](https://github.com/arlimus))
13
+
14
+ ## [v0.14.2](https://github.com/chef/inspec/tree/v0.14.2) (2016-02-22)
15
+ [Full Changelog](https://github.com/chef/inspec/compare/v0.14.1...v0.14.2)
5
16
 
6
17
  **Fixed bugs:**
7
18
 
@@ -9,6 +20,7 @@
9
20
 
10
21
  **Merged pull requests:**
11
22
 
23
+ - 0.14.2 [\#484](https://github.com/chef/inspec/pull/484) ([arlimus](https://github.com/arlimus))
12
24
  - load plugins in the same gem installation [\#482](https://github.com/chef/inspec/pull/482) ([arlimus](https://github.com/arlimus))
13
25
 
14
26
  ## [v0.14.1](https://github.com/chef/inspec/tree/v0.14.1) (2016-02-22)
@@ -49,6 +49,7 @@ module Inspec
49
49
  end
50
50
 
51
51
  def abs_path(file)
52
+ return nil if file.nil?
52
53
  prefix + file
53
54
  end
54
55
 
@@ -17,11 +17,16 @@ module Inspec
17
17
  # Fetchers retrieve file contents
18
18
  opts[:target] = target
19
19
  fetcher = Inspec::Fetcher.resolve(target)
20
- return nil if fetcher.nil?
20
+ if fetcher.nil?
21
+ fail("Could not fetch inspec profile in #{target.inspect}.")
22
+ end
21
23
  # Source readers understand the target's structure and provide
22
24
  # access to tests, libraries, and metadata
23
25
  reader = Inspec::SourceReader.resolve(fetcher.relative_target)
24
- return nil if reader.nil?
26
+ if reader.nil?
27
+ fail("Don't understand inspec profile in #{target.inspect}, it "\
28
+ "doesn't look like a supported profile structure.")
29
+ end
25
30
  new(reader, opts)
26
31
  end
27
32
 
@@ -3,5 +3,5 @@
3
3
  # author: Christoph Hartmann
4
4
 
5
5
  module Inspec
6
- VERSION = '0.14.2'.freeze
6
+ VERSION = '0.14.3'.freeze
7
7
  end
@@ -248,6 +248,8 @@ RSpec::Matchers.define :cmp do |expected|
248
248
  # if actual and expected are strings
249
249
  if expected.is_a?(String) && actual.is_a?(String)
250
250
  actual.casecmp(expected) == 0
251
+ elsif expected.is_a?(String) && integer?(expected) && actual.is_a?(Integer)
252
+ expected.to_i == actual
251
253
  elsif expected.is_a?(Integer) && integer?(actual)
252
254
  expected == actual.to_i
253
255
  elsif expected.is_a?(Float) && float?(actual)
@@ -29,4 +29,9 @@ if os.linux?
29
29
  it { should include 'root' }
30
30
  it { should_not cmp 'root' }
31
31
  end
32
+
33
+ len = passwd.passwords.length
34
+ describe len do
35
+ it { should cmp len.to_s }
36
+ end
32
37
  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.2
4
+ version: 0.14.3
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-02-22 00:00:00.000000000 Z
11
+ date: 2016-02-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: r-train