awful 0.0.84 → 0.0.85
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/awful/cloudformation.rb +18 -14
- data/lib/awful/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: 5ea847fc9ccbe41557aa03a8c907026ec7db9863
|
4
|
+
data.tar.gz: a6ce1b258f5b1f3e7037d928a51bdb893847ee6c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0783b62e7b7420ef52d7eecc670944479deee1e47d912bca2360a21f42a87ce3cf000f027bfbfaf287b3441a86d86c7695b39dfb56056bf03008b53224dc8765
|
7
|
+
data.tar.gz: 0bd451ebadc45a1057db2a5e0d8c616746301a4af3e63110da1367424ccebbda486ae08939fbc388bf4b3df22efb2c0db7bc733e0f6c9b987fe769f2452d81b2
|
data/lib/awful/cloudformation.rb
CHANGED
@@ -133,21 +133,25 @@ module Awful
|
|
133
133
|
end
|
134
134
|
|
135
135
|
desc 'resources NAME', 'list resources for stack with name NAME'
|
136
|
-
method_option :long,
|
137
|
-
method_option :type,
|
136
|
+
method_option :long, aliases: '-l', type: :boolean, default: false, desc: 'Long listing'
|
137
|
+
method_option :type, aliases: '-t', type: :array, default: nil, desc: 'Filter by given resource types, e.g. AWS::IAM::Role'
|
138
|
+
method_option :match, aliases: '-m', type: :string, default: nil, desc: 'Filter by case-insensitive regex matching type of resource'
|
138
139
|
def resources(name)
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
140
|
+
resources = cf.list_stack_resources(stack_name: name).stack_resource_summaries
|
141
|
+
|
142
|
+
if options[:type]
|
143
|
+
resources.select! do |resource|
|
144
|
+
options[:type].include?(resource.resource_type)
|
145
|
+
end
|
146
|
+
end
|
147
|
+
|
148
|
+
if options[:match]
|
149
|
+
resources.select! do |resource|
|
150
|
+
Regexp.new(options[:match], Regexp::IGNORECASE).match(resource.resource_type)
|
151
|
+
end
|
152
|
+
end
|
153
|
+
|
154
|
+
resources.tap do |resources|
|
151
155
|
if options[:long]
|
152
156
|
print_table resources.map { |r| [r.logical_resource_id, r.physical_resource_id, r.resource_type, color(r.resource_status), r.resource_status_reason] }
|
153
157
|
else
|
data/lib/awful/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: awful
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.85
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ric Lister
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-01-
|
11
|
+
date: 2016-01-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|