rake_terraform 0.21.1.pre3 → 0.21.1.pre4
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/rake_terraform/version.rb +1 -1
- data/lib/rake_terraform.rb +18 -2
- 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: e59dec86f02126d72cefe4868a82738b55f5e46977df031f06c85f25e96a4ec0
|
4
|
+
data.tar.gz: ac503514c32153510659e3e74a6987a237fbed09c805b9e81ef2af3ffe6bcb98
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c340e4558c56696fea12f4b57769fa074d4eb761da3e137c8fcfe045683f3b4b40ff2bd1fa7cf4cfb64e9c13dcf763b7b27cdaf67de9a0135ea85dfd4dba95bc
|
7
|
+
data.tar.gz: d6f76b71111c8b21ec8612fc2fab607264ea435b3f9b49f5c36ba0a4552b3a78acb0e899fb793a65865ec398c61f0717d44cbcf0e6b8073d74329d9e45a8ed89
|
data/Gemfile.lock
CHANGED
data/lib/rake_terraform.rb
CHANGED
@@ -1,9 +1,15 @@
|
|
1
|
+
require 'logger'
|
1
2
|
require 'rake_dependencies'
|
2
3
|
require 'ruby_terraform'
|
3
4
|
require 'rake_terraform/version'
|
4
5
|
require 'rake_terraform/tasklib'
|
5
6
|
require 'rake_terraform/tasks'
|
6
7
|
|
8
|
+
require 'logger'
|
9
|
+
|
10
|
+
logger = Logger.new(STDERR)
|
11
|
+
logger.level = Logger.const_get(ENV['RKTF_DEBUG'] || 'WARN')
|
12
|
+
|
7
13
|
module RakeTerraform
|
8
14
|
include RubyTerraform
|
9
15
|
|
@@ -42,11 +48,21 @@ module RakeTerraform
|
|
42
48
|
'terraform')
|
43
49
|
version_string = StringIO.new
|
44
50
|
|
51
|
+
logger.debug("Terraform binary is at: #{terraform_binary}")
|
52
|
+
|
45
53
|
if File.exist?(terraform_binary)
|
46
|
-
Lino::CommandLineBuilder.for_command(terraform_binary)
|
54
|
+
command_line = Lino::CommandLineBuilder.for_command(terraform_binary)
|
47
55
|
.with_flag('-version')
|
48
56
|
.build
|
49
|
-
|
57
|
+
|
58
|
+
logger.debug(
|
59
|
+
'Fetching terraform version information using command: ' +
|
60
|
+
"#{command_line}")
|
61
|
+
|
62
|
+
command_line.execute(stdout: version_string)
|
63
|
+
|
64
|
+
logger.debug(
|
65
|
+
"Terraform version information is: \n#{version_string.string}")
|
50
66
|
|
51
67
|
if version_string.string.lines.first =~ /#{version}/
|
52
68
|
return false
|