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 +4 -4
- data/CHANGELOG.md +14 -2
- data/lib/inspec/plugins/fetcher.rb +1 -0
- data/lib/inspec/profile.rb +7 -2
- data/lib/inspec/version.rb +1 -1
- data/lib/matchers/matchers.rb +2 -0
- data/test/integration/test/integration/default/compare_matcher_spec.rb +5 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a5fe5ef68c859de078978c41fac03fa6164c5ff
|
4
|
+
data.tar.gz: e9a4ad5bb3a9808801ad153d50843eeb8f6fbcee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4bd1406a6eccaf2fe72cdab36d4e8b467653f14767a6006ea01e9768d5d7e1329b7a81e65308d404f8df61b900e5a4280addd849e5c8fa673a204e79ae2c9e37
|
7
|
+
data.tar.gz: 2226db16772df0467cca929a0ee68c5b3925450831f15630b0ac09003dacf55579a1cc67acdd252de04d44846e557d70b4959a3f795ad5ea2226d3ce2c9bbb42
|
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,18 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
-
## [0.14.
|
4
|
-
[Full Changelog](https://github.com/chef/inspec/compare/v0.14.
|
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)
|
data/lib/inspec/profile.rb
CHANGED
@@ -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
|
-
|
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
|
-
|
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
|
|
data/lib/inspec/version.rb
CHANGED
data/lib/matchers/matchers.rb
CHANGED
@@ -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)
|
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.
|
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-
|
11
|
+
date: 2016-02-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: r-train
|