lono-cfn 0.0.9 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +7 -7
- data/lib/lono-cfn.rb +2 -0
- data/lib/lono_cfn/delete.rb +15 -2
- data/lib/lono_cfn/version.rb +1 -1
- 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: 2b769083a5eafc274765550bd3d69b95e05f8e4e
|
4
|
+
data.tar.gz: 7b810af1565e85e98f74e25d02631a6aaab8ba28
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b310191b6dd9d58dc8f6f1bc5d92d2c16092976ec23347ba9d455604d0f6616bb4e4a12a525f192fbedf6006fa980047a3f89117bf649f0c115842daf37d98f
|
7
|
+
data.tar.gz: c9d4f8dbd62aaa7cbb11fa0832ea27bf2d7520beb064236e75cc342767d0f3af5f7aa12dfcd4a9feaa78cbb8f04eefa0dea622add6dd36803777c63ebba47e24
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
lono-cfn (0.0.
|
4
|
+
lono-cfn (0.0.9)
|
5
5
|
aws-sdk
|
6
6
|
colorize
|
7
7
|
hashie
|
@@ -20,13 +20,13 @@ GEM
|
|
20
20
|
minitest (~> 5.1)
|
21
21
|
thread_safe (~> 0.3, >= 0.3.4)
|
22
22
|
tzinfo (~> 1.1)
|
23
|
-
aws-sdk (2.9.
|
24
|
-
aws-sdk-resources (= 2.9.
|
25
|
-
aws-sdk-core (2.9.
|
23
|
+
aws-sdk (2.9.15)
|
24
|
+
aws-sdk-resources (= 2.9.15)
|
25
|
+
aws-sdk-core (2.9.15)
|
26
26
|
aws-sigv4 (~> 1.0)
|
27
27
|
jmespath (~> 1.0)
|
28
|
-
aws-sdk-resources (2.9.
|
29
|
-
aws-sdk-core (= 2.9.
|
28
|
+
aws-sdk-resources (2.9.15)
|
29
|
+
aws-sdk-core (= 2.9.15)
|
30
30
|
aws-sigv4 (1.0.0)
|
31
31
|
builder (3.2.3)
|
32
32
|
byebug (9.0.6)
|
@@ -70,7 +70,7 @@ GEM
|
|
70
70
|
rb-fsevent (~> 0.9, >= 0.9.4)
|
71
71
|
rb-inotify (~> 0.9, >= 0.9.7)
|
72
72
|
ruby_dep (~> 1.2)
|
73
|
-
lono (0.
|
73
|
+
lono (1.0.0)
|
74
74
|
colorize
|
75
75
|
guard
|
76
76
|
guard-cloudformation
|
data/lib/lono-cfn.rb
CHANGED
data/lib/lono_cfn/delete.rb
CHANGED
@@ -13,9 +13,22 @@ module LonoCfn
|
|
13
13
|
if @options[:noop]
|
14
14
|
message = "NOOP #{message}"
|
15
15
|
else
|
16
|
-
|
16
|
+
if stack_exist?
|
17
|
+
cfn.delete_stack(stack_name: @stack_name)
|
18
|
+
puts message
|
19
|
+
else
|
20
|
+
puts "#{@stack_name.inspect} stack does not exist".colorize(:red)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
def stack_exist?
|
26
|
+
begin
|
27
|
+
cfn.describe_stacks(stack_name: @stack_name)
|
28
|
+
true
|
29
|
+
rescue Aws::CloudFormation::Errors::ValidationError
|
30
|
+
false
|
17
31
|
end
|
18
|
-
puts message
|
19
32
|
end
|
20
33
|
end
|
21
34
|
end
|
data/lib/lono_cfn/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lono-cfn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tung Nguyen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-05-
|
11
|
+
date: 2017-05-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|