rspec-terraform 0.1.0.pre.40 → 0.1.0.pre.41
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/rspec/terraform/logging.rb +24 -3
- data/lib/rspec/terraform/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6abf52967c937d8a7761aab1289a1a244ed440bd735311360d3888c3746d8e39
|
4
|
+
data.tar.gz: ef8e4d1ed48f86632623785b6fafa69bef6bc38c63d902c3897ea8083c31bc7a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2034dd4ce31339bd6e6e834adfba4d0fc7ca894e532e2e0ef1e4e06efd24c3596d5daf2317933c5d4ee50c0da88ee3188840ed141a9a20492f9ba5d66c97ac1f
|
7
|
+
data.tar.gz: d41ffaa70e27cedc9f6dcaceb2aeec825be58c9bb41cc8344e9780d7cc1f9db77b8f44dba89da6cb159beabcfa6febac2c0ea93d76bd831f33a163b380bd39eb
|
data/Gemfile.lock
CHANGED
@@ -66,13 +66,34 @@ module RSpec
|
|
66
66
|
end
|
67
67
|
|
68
68
|
def devices(opts)
|
69
|
+
streams = opts[:streams]
|
70
|
+
file_path = opts[:file_path]
|
71
|
+
stdout = opts[:stdout]
|
72
|
+
|
69
73
|
{
|
70
|
-
file: log_device(
|
71
|
-
stdout: log_device(
|
72
|
-
stderr: log_device(
|
74
|
+
file: log_device(resolve_file_path(file_path, streams)),
|
75
|
+
stdout: log_device(resolved_stdout(stdout)),
|
76
|
+
stderr: log_device(resolved_stderr)
|
73
77
|
}
|
74
78
|
end
|
75
79
|
|
80
|
+
def resolve_file_path(file_path, streams)
|
81
|
+
resolved_file_path = File::NULL
|
82
|
+
if streams.include?(:file) && file_path
|
83
|
+
FileUtils.mkdir_p(File.dirname(file_path))
|
84
|
+
resolved_file_path = file_path
|
85
|
+
end
|
86
|
+
resolved_file_path
|
87
|
+
end
|
88
|
+
|
89
|
+
def resolved_stdout(stdout)
|
90
|
+
stdout || $stdout
|
91
|
+
end
|
92
|
+
|
93
|
+
def resolved_stderr
|
94
|
+
$stderr
|
95
|
+
end
|
96
|
+
|
76
97
|
def log_device(io)
|
77
98
|
Logger::LogDevice.new(io)
|
78
99
|
end
|