TerraformDevKit 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4bf334632780d7a74097aa472d40a483d475b4a8
|
4
|
+
data.tar.gz: 3646248e8946931f8fccf56e681adc74d6559237
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 732188c769df072888d934e1a956d7a7d3878de0c2332b5e2ebfcf97a5354a61ddf95f1daf112658c1de04c41c443f27d106714541e1196b68d46749b3229937
|
7
|
+
data.tar.gz: 9b5c244462fa4c783187fd2bb8a688c3d4a98ea6102e2ed69e50d737b0493a40bc3ad514e6a650c311e6bc349900dcce743ee7531eb5c64438c899e98b287bd3
|
data/README.md
CHANGED
@@ -8,7 +8,7 @@ The script collection incldues support for:
|
|
8
8
|
|
9
9
|
* Managing AWS credentials
|
10
10
|
* Simple reading and writing to AWS DynamoDB
|
11
|
-
* Polling
|
11
|
+
* Polling an AWS ApiGateway endpoint until it becomes ready
|
12
12
|
* Executing commands
|
13
13
|
* Locally installing Terraform and [Terragrunt](https://github.com/gruntwork-io/terragrunt)
|
14
14
|
* Backing up the state from a failed Terraform execution
|
data/exe/wait_for_url
CHANGED
@@ -2,19 +2,19 @@ require 'open3'
|
|
2
2
|
|
3
3
|
module TerraformDevKit
|
4
4
|
class Command
|
5
|
-
def self.run(cmd, directory
|
5
|
+
def self.run(cmd, directory: Dir.pwd, print_output: true)
|
6
6
|
output = []
|
7
7
|
|
8
|
-
Open3.popen2e(cmd, chdir: directory) do |_,
|
9
|
-
|
10
|
-
output << line
|
11
|
-
puts
|
8
|
+
Open3.popen2e(cmd, chdir: directory) do |_, stdout_and_stderr, thread|
|
9
|
+
stdout_and_stderr.each do |line|
|
10
|
+
output << line.tr("\r\n", '')
|
11
|
+
puts line if print_output
|
12
12
|
end
|
13
13
|
|
14
14
|
raise "Error running command #{cmd}" unless thread.value.success?
|
15
15
|
end
|
16
16
|
|
17
|
-
output
|
17
|
+
output
|
18
18
|
end
|
19
19
|
end
|
20
20
|
end
|
@@ -9,7 +9,7 @@ module TerraformDevKit
|
|
9
9
|
LOCAL_FILE_NAME = 'terraform.zip'.freeze
|
10
10
|
|
11
11
|
def self.installed_terraform_version
|
12
|
-
version = Command.run('terraform --version')
|
12
|
+
version = Command.run('terraform --version')[0]
|
13
13
|
match = /Terraform v(\d+\.\d+\.\d+)/.match(version)
|
14
14
|
match[1] unless match.nil?
|
15
15
|
rescue
|
@@ -10,7 +10,7 @@ module TerraformDevKit
|
|
10
10
|
LOCAL_FILE_NAME = "terragrunt#{EXTENSION}".freeze
|
11
11
|
|
12
12
|
def self.installed_terragrunt_version
|
13
|
-
version = Command.run('terragrunt --version')
|
13
|
+
version = Command.run('terragrunt --version')[0]
|
14
14
|
match = /terragrunt version v(\d+\.\d+\.\d+)/.match(version)
|
15
15
|
match[1] unless match.nil?
|
16
16
|
rescue
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: TerraformDevKit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Victor Jimenez
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-06-
|
11
|
+
date: 2017-06-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|