aws-int-test-rspec-helper 0.0.10 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aws-int-test-rspec-helper.rb +24 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2bf0716d98996d190fd825292d83f57e2b5c42b5
|
4
|
+
data.tar.gz: 6c4089d1dc59709480e6888e2f44eaa0ee519ed0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1122565d4a91f166ee373c95007284bd3b584577ef054ffda38cd0c13a6150019449cc4474836a3fc44209e8c1db7d13d43dc773a2b24ccbee069d334ebe5b31
|
7
|
+
data.tar.gz: 5b93c1116351f9b397c52b13d1b4d9cb9ed765fecbc0a65ffbcff99eae258aae11ee12b774c0ede073198a318526b7394ff5d98f786e728db53d262c76c4ea7b
|
@@ -78,6 +78,30 @@ module AwsIntTestRspecHelper
|
|
78
78
|
full_stack_name
|
79
79
|
end
|
80
80
|
|
81
|
+
def vanilla_stack(stack_name:,
|
82
|
+
path_to_template:)
|
83
|
+
|
84
|
+
full_stack_name = "#{stack_name}#{Time.now.to_i}"
|
85
|
+
|
86
|
+
resource = Aws::CloudFormation::Resource.new
|
87
|
+
created_stack = resource.create_stack(stack_name: full_stack_name,
|
88
|
+
template_body: IO.read(File.expand_path(path_to_template)),
|
89
|
+
disable_rollback: true,
|
90
|
+
capabilities: %w{CAPABILITY_IAM})
|
91
|
+
|
92
|
+
#need to provide more details to the waiter - or deal with more stack outcomes?
|
93
|
+
created_stack.wait_until(max_attempts:100, delay:15) do |stack|
|
94
|
+
stack.stack_status.match /COMPLETE/ or stack.stack_status.match /FAIL/
|
95
|
+
end
|
96
|
+
|
97
|
+
@stack_outputs = created_stack.outputs.inject({}) do |hash, output|
|
98
|
+
hash[output.output_key] = output.output_value
|
99
|
+
hash
|
100
|
+
end
|
101
|
+
|
102
|
+
full_stack_name
|
103
|
+
end
|
104
|
+
|
81
105
|
##
|
82
106
|
# Returns a Hash of the Cloudformation stack outputs
|
83
107
|
#
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-int-test-rspec-helper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- someguy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-10-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|