inspec 1.25.0 → 1.25.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 +4 -4
- data/CHANGELOG.md +11 -2
- data/inspec.gemspec +1 -0
- data/lib/bundles/inspec-compliance/target.rb +2 -2
- data/lib/inspec/metadata.rb +14 -0
- data/lib/inspec/version.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2369b96cee8091a5a6217e02655d0093ecca8a33
|
|
4
|
+
data.tar.gz: 59d26c6a3fb7df21eaa354716c1c1e5e97340038
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d1ee1b6272be4d4e246318f20aa67a78afc9ed7a0e740ed1dae503110700a0e091aebb32b9c75c6fe3802ae539a99491b415fb1b1179517047223c814d6085cd
|
|
7
|
+
data.tar.gz: 9998bcdc5ec747c15fc2b43cea4ec91b59bf1d158c7a2bf4025865ec90b844c8048a0fa3d8ad01bf6501a3965384e39b906d5200f979a2c5cb6269abdc159523
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## [v1.25.1](https://github.com/chef/inspec/tree/v1.25.1) (2017-05-19)
|
|
4
|
+
[Full Changelog](https://github.com/chef/inspec/compare/v1.25.0...v1.25.1)
|
|
5
|
+
|
|
6
|
+
**Implemented enhancements:**
|
|
7
|
+
|
|
8
|
+
- throw an error during inspec check if the version is not correct [\#1832](https://github.com/chef/inspec/pull/1832) ([chris-rock](https://github.com/chris-rock))
|
|
9
|
+
|
|
10
|
+
**Fixed bugs:**
|
|
11
|
+
|
|
12
|
+
- Fixing typo on method name [\#1841](https://github.com/chef/inspec/pull/1841) ([cheeseplus](https://github.com/cheeseplus))
|
|
13
|
+
|
|
3
14
|
## [v1.25.0](https://github.com/chef/inspec/tree/v1.25.0) (2017-05-17)
|
|
4
15
|
[Full Changelog](https://github.com/chef/inspec/compare/v1.24.0...v1.25.0)
|
|
5
16
|
|
|
@@ -74,14 +85,12 @@
|
|
|
74
85
|
|
|
75
86
|
- fetch user groups while building user object [\#1681](https://github.com/chef/inspec/pull/1681) ([Happycoil](https://github.com/Happycoil))
|
|
76
87
|
- update sslshake to v1.2 [\#1680](https://github.com/chef/inspec/pull/1680) ([arlimus](https://github.com/arlimus))
|
|
77
|
-
- ER-508 Extended http resource to support no ssl verification [\#1663](https://github.com/chef/inspec/pull/1663) ([ElizabethU](https://github.com/ElizabethU))
|
|
78
88
|
|
|
79
89
|
**Fixed bugs:**
|
|
80
90
|
|
|
81
91
|
- Web references in inspec shell help are wrong [\#1667](https://github.com/chef/inspec/issues/1667)
|
|
82
92
|
- bugfix: solve warn on uninitialized [\#1694](https://github.com/chef/inspec/pull/1694) ([arlimus](https://github.com/arlimus))
|
|
83
93
|
- fix web reference url [\#1669](https://github.com/chef/inspec/pull/1669) ([chris-rock](https://github.com/chris-rock))
|
|
84
|
-
- Move Habitat sleep time to config file [\#1662](https://github.com/chef/inspec/pull/1662) ([adamleff](https://github.com/adamleff))
|
|
85
94
|
|
|
86
95
|
|
|
87
96
|
|
data/inspec.gemspec
CHANGED
|
@@ -80,9 +80,9 @@ EOF
|
|
|
80
80
|
|
|
81
81
|
# determine the owner_id and the profile name from the url
|
|
82
82
|
def compliance_profile_name
|
|
83
|
-
m = if Compliance::API.is_automate_server_pre_080(@config)
|
|
83
|
+
m = if Compliance::API.is_automate_server_pre_080?(@config)
|
|
84
84
|
%r{^#{@config['server']}/(?<owner>[^/]+)/(?<id>[^/]+)/tar$}
|
|
85
|
-
elsif Compliance::API.is_automate_server_080_and_later
|
|
85
|
+
elsif Compliance::API.is_automate_server_080_and_later?(@config)
|
|
86
86
|
%r{^#{@config['server']}/profiles/(?<owner>[^/]+)/(?<id>[^/]+)/tar$}
|
|
87
87
|
else
|
|
88
88
|
%r{^#{@config['server']}/owners/(?<owner>[^/]+)/compliance/(?<id>[^/]+)/tar$}
|
data/lib/inspec/metadata.rb
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
require 'logger'
|
|
7
7
|
require 'rubygems/version'
|
|
8
8
|
require 'rubygems/requirement'
|
|
9
|
+
require 'semverse'
|
|
9
10
|
|
|
10
11
|
module Inspec
|
|
11
12
|
# Extract metadata.rb information
|
|
@@ -109,6 +110,12 @@ module Inspec
|
|
|
109
110
|
next unless params[field.to_sym].nil?
|
|
110
111
|
errors.push("Missing profile #{field} in #{ref}")
|
|
111
112
|
end
|
|
113
|
+
|
|
114
|
+
# if version is set, ensure it is correct
|
|
115
|
+
if !params[:version].nil? && !valid_version?(params[:version])
|
|
116
|
+
errors.push('Version needs to be in SemVer format')
|
|
117
|
+
end
|
|
118
|
+
|
|
112
119
|
%w{ title summary maintainer copyright }.each do |field|
|
|
113
120
|
next unless params[field.to_sym].nil?
|
|
114
121
|
warnings.push("Missing profile #{field} in #{ref}")
|
|
@@ -123,6 +130,13 @@ module Inspec
|
|
|
123
130
|
errors.empty? && unsupported.empty?
|
|
124
131
|
end
|
|
125
132
|
|
|
133
|
+
def valid_version?(value)
|
|
134
|
+
Semverse::Version.new(value)
|
|
135
|
+
true
|
|
136
|
+
rescue Semverse::InvalidVersionFormat
|
|
137
|
+
false
|
|
138
|
+
end
|
|
139
|
+
|
|
126
140
|
def method_missing(sth, *args)
|
|
127
141
|
@logger.warn "#{ref} doesn't support: #{sth} #{args}"
|
|
128
142
|
@missing_methods.push(sth)
|
data/lib/inspec/version.rb
CHANGED
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.25.
|
|
4
|
+
version: 1.25.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-05-
|
|
11
|
+
date: 2017-05-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: train
|
|
@@ -260,6 +260,20 @@ dependencies:
|
|
|
260
260
|
- - "~>"
|
|
261
261
|
- !ruby/object:Gem::Version
|
|
262
262
|
version: '1.5'
|
|
263
|
+
- !ruby/object:Gem::Dependency
|
|
264
|
+
name: semverse
|
|
265
|
+
requirement: !ruby/object:Gem::Requirement
|
|
266
|
+
requirements:
|
|
267
|
+
- - ">="
|
|
268
|
+
- !ruby/object:Gem::Version
|
|
269
|
+
version: '0'
|
|
270
|
+
type: :runtime
|
|
271
|
+
prerelease: false
|
|
272
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
273
|
+
requirements:
|
|
274
|
+
- - ">="
|
|
275
|
+
- !ruby/object:Gem::Version
|
|
276
|
+
version: '0'
|
|
263
277
|
description: InSpec provides a framework for creating end-to-end infrastructure tests.
|
|
264
278
|
You can use it for integration or even compliance testing. Create fully portable
|
|
265
279
|
test profiles and use them in your workflow to ensure stability and security. Integrate
|