inspec 4.6.3 → 4.6.4
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/lib/inspec/resources/nginx_conf.rb +5 -0
- data/lib/inspec/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d8bb84b8222dcb5484737f5e157abb050765d3d988a1153c9ddff8e770415fe3
|
|
4
|
+
data.tar.gz: ef6f2c3a982ffd20ee7cbde1908ae3f0c27dd45c04bd46be6a69713f03a7d776
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 79ac61b9b4d8d4703a8f3f1f08a2fdebdc81590cb759c8dbee6cfb23d66ce558e3458662c54dd19b7f3a1da801bbc65dad2d6da81e2caef5d3ce8b94e5fd9c49
|
|
7
|
+
data.tar.gz: 36c93530a71e46988ef3da4716669cd3cc97073c10e7ebf770c97b69c2d5607da7d9b6a512765f810dfdbac6e570fe596d1e47958257c0ed57d2c18acf14fa48
|
|
@@ -63,6 +63,11 @@ module Inspec::Resources
|
|
|
63
63
|
def parse_nginx(path)
|
|
64
64
|
return nil if inspec.os.windows?
|
|
65
65
|
content = read_content(path)
|
|
66
|
+
|
|
67
|
+
# Don't attempt to parse file if it contains only comments or is empty
|
|
68
|
+
# https://regexper.com/#%2F%5E%5Cs*%23%7C%5E%24%2F
|
|
69
|
+
return {} if content.lines.reject { |l| l =~ /^\s*#|^$/ }.empty?
|
|
70
|
+
|
|
66
71
|
data = NginxConfig.parse(content)
|
|
67
72
|
resolve_references(data, File.dirname(path))
|
|
68
73
|
rescue StandardError => _
|
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: 4.6.
|
|
4
|
+
version: 4.6.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Chef InSpec Team
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-06-
|
|
11
|
+
date: 2019-06-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: train
|