inspec-core 3.6.2 → 3.6.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/inspec/config.rb +8 -1
- 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: f150b52c3fea0f1aa08699459007ae99caac3fa2e98a4cc5fe2edd89ad57c9d0
|
4
|
+
data.tar.gz: a0c9f594dbda3b1c68d97f20995f0a4eabb3330d7f263ff083d609f6490dd425
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b8a12508f77b3df920bcb1f0d05b5cb424bbb9ea5cd59291313bcdb4516aec94ff9ba21f702524006cae12b5dd6b6dd1186ae64168cb69c9790f077ff7b3025
|
7
|
+
data.tar.gz: fbe74d4eeb961b351ef938fbd9c12860c21ba803f718d826039cade5f74b80c116672772ae02afa427909717ee976314082b52bd0082a365e4d4632db60bfa6b
|
data/lib/inspec/config.rb
CHANGED
@@ -177,8 +177,15 @@ module Inspec
|
|
177
177
|
path
|
178
178
|
end
|
179
179
|
|
180
|
+
# When reading STDIN, read it once into a class variable and cache it.
|
181
|
+
# Don't cache other IO objects though, as we use several different StringIOs
|
182
|
+
# during unit testing. Refs #3792
|
183
|
+
def self.stdin_contents # rubocop: disable Lint/IneffectiveAccessModifier
|
184
|
+
@stdin_content ||= STDIN.read
|
185
|
+
end
|
186
|
+
|
180
187
|
def read_cfg_file_io(cfg_io)
|
181
|
-
contents = cfg_io.read
|
188
|
+
contents = cfg_io == STDIN ? self.class.stdin_contents : cfg_io.read
|
182
189
|
begin
|
183
190
|
@cfg_file_contents = JSON.parse(contents)
|
184
191
|
validate_config_file_contents!
|
data/lib/inspec/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: inspec-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.6.
|
4
|
+
version: 3.6.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dominik Richter
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-02-
|
11
|
+
date: 2019-02-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: train-core
|