CfnTools 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/CfnTools.rb +24 -0
- metadata +9 -21
- checksums.yaml +0 -7
data/lib/CfnTools.rb
CHANGED
@@ -113,4 +113,28 @@ class CfnTools
|
|
113
113
|
return events
|
114
114
|
end
|
115
115
|
|
116
|
+
def display_stack_events()
|
117
|
+
max_size = { 'time' => 0, 'type' => 0, 'resource_id' => 0, 'resource_status' => 0, 'status' => 0 }
|
118
|
+
while true
|
119
|
+
events = self.get_stack_events
|
120
|
+
events.each do |event|
|
121
|
+
hash = { 'time' => event.timestamp, 'type' => event.resource_type, 'resource_id' => event.logical_resource_id, 'resource_status' => event.resource_status, 'status' => event.resource_status_reason }
|
122
|
+
hash.each do |tuple|
|
123
|
+
if tuple[1].to_s.length > max_size[tuple[0]] then
|
124
|
+
max_size[tuple[0]] = tuple[1].to_s.length
|
125
|
+
end
|
126
|
+
end
|
127
|
+
end
|
128
|
+
events.each do |event|
|
129
|
+
if event.resource_status_reason.to_s.length > 0 then
|
130
|
+
printf("%-#{max_size['time']}s %-#{max_size['type']}s %-#{max_size['resource_id']}s %-#{max_size['resource_status']}s %-#{max_size['status']}s\n", event.timestamp, event.resource_type, event.logical_resource_id, event.resource_status, event.resource_status_reason)
|
131
|
+
else
|
132
|
+
printf("%-#{max_size['time']}s %-#{max_size['type']}s %-#{max_size['resource_id']}s %-#{max_size['resource_status']}s\n", event.timestamp, event.resource_type, event.logical_resource_id, event.resource_status)
|
133
|
+
end
|
134
|
+
end
|
135
|
+
end
|
136
|
+
end
|
137
|
+
|
116
138
|
end
|
139
|
+
|
140
|
+
exit 0
|
metadata
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: CfnTools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.10
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- Brian Schrock
|
@@ -9,21 +10,7 @@ autorequire:
|
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
12
|
date: 2014-06-14 00:00:00.000000000 Z
|
12
|
-
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: aws-sdk
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - ">="
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - ">="
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '0'
|
13
|
+
dependencies: []
|
27
14
|
description: Utilities for AWS cloudformation stack information
|
28
15
|
email: bschrock@manta.com
|
29
16
|
executables: []
|
@@ -34,25 +21,26 @@ files:
|
|
34
21
|
homepage: http://github.com/mantacode/CfnTools
|
35
22
|
licenses:
|
36
23
|
- MIT
|
37
|
-
metadata: {}
|
38
24
|
post_install_message:
|
39
25
|
rdoc_options: []
|
40
26
|
require_paths:
|
41
27
|
- lib
|
42
28
|
required_ruby_version: !ruby/object:Gem::Requirement
|
29
|
+
none: false
|
43
30
|
requirements:
|
44
|
-
- -
|
31
|
+
- - ! '>='
|
45
32
|
- !ruby/object:Gem::Version
|
46
33
|
version: '0'
|
47
34
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
35
|
+
none: false
|
48
36
|
requirements:
|
49
|
-
- -
|
37
|
+
- - ! '>='
|
50
38
|
- !ruby/object:Gem::Version
|
51
39
|
version: '0'
|
52
40
|
requirements: []
|
53
41
|
rubyforge_project:
|
54
|
-
rubygems_version:
|
42
|
+
rubygems_version: 1.8.11
|
55
43
|
signing_key:
|
56
|
-
specification_version:
|
44
|
+
specification_version: 3
|
57
45
|
summary: CfnTools
|
58
46
|
test_files: []
|
checksums.yaml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: e793946471c752293327326a8152da1204f96ca7
|
4
|
-
data.tar.gz: 03006c586ab94b78b32f3206b4885bed250859ca
|
5
|
-
SHA512:
|
6
|
-
metadata.gz: 51e4ca97ecd8669df1688feb299af34c849d82cf7231c8723fd53a4e430bad20007298c91b8f39ab85e3eec92d943bff4ebc0e6ba98c527ca8d99a0602f0dcc3
|
7
|
-
data.tar.gz: 74db3ebdb29d97c6c340f491730b9a1cb8190ddc9c6f094098c205f061e4ca65742c5dc59399d68efaef5327ecc78d9cdb0bd618160ad79d1000397dbe467170
|