terragov 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/terragov/cleaner.rb +0 -2
- data/lib/terragov/terraform.rb +13 -8
- data/lib/terragov/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0d3187ea6e2507304bac2bb4d38e0efc7d012247
|
4
|
+
data.tar.gz: 33d452899677a07ea2f72c77d2e861327f060a87
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c6298dde09d8ca0292a442d3c182b7ac48f5568be61509fa62542a67aa39e9cd1c72ed7cdf192e2309fb0e380fe112bdd61f63a668c0f24660527f45adc19bd2
|
7
|
+
data.tar.gz: 67365897d0ffce2f81960b61a85a6807587be42ef816cacb0d2a5b91534f59416547370567d560e60308b4e030aee03df8f03707c3ee9b711d981ab57cd05507
|
data/lib/terragov/cleaner.rb
CHANGED
data/lib/terragov/terraform.rb
CHANGED
@@ -1,18 +1,23 @@
|
|
1
1
|
module Terragov
|
2
2
|
class Terraform
|
3
3
|
|
4
|
-
def package_check
|
5
|
-
unless system("which
|
6
|
-
abort("Must install
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
4
|
+
def package_check(package)
|
5
|
+
unless system("which #{package} >/dev/null")
|
6
|
+
abort("Must install #{package}") unless HighLine.agree("Can't find #{package}. Install using Homebrew?")
|
7
|
+
if system("which brew >/dev/null")
|
8
|
+
system("brew install #{package}")
|
9
|
+
else
|
10
|
+
abort("Error: cannot find brew")
|
11
|
+
end
|
11
12
|
end
|
12
13
|
end
|
13
14
|
|
14
15
|
def execute(command, vars, backend, directory, dryrun=false, verbose=false)
|
15
|
-
|
16
|
+
packages = [ 'terraform', 'sops' ]
|
17
|
+
|
18
|
+
packages.each do |pkg|
|
19
|
+
package_check(pkg)
|
20
|
+
end
|
16
21
|
|
17
22
|
if command == 'init'
|
18
23
|
puts "Running 'init' is not required as it is applied for each command"
|
data/lib/terragov/version.rb
CHANGED