aws-cache 0.0.10 → 0.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 074f3e44e9c0408c2628efb4cd1759b9c7f3204f
4
- data.tar.gz: 621bf372a11bb8185d6f9f3bf515931de610277c
3
+ metadata.gz: a5d3dd4dc8fa4704cb4b3283c8f689b4a22ae5e4
4
+ data.tar.gz: 929e015c694989224034a015fb989ec92fb2e1e5
5
5
  SHA512:
6
- metadata.gz: 91188cf3cc8479beb07b8fcfdfddb1fa7c49a3f516e3852bf694592032a36c4876fee53fbf185c8045b388fdb755fcd21b8175d6a3293ae9ae643be4ee130c97
7
- data.tar.gz: 841119d4bd4da1a18ee7e741957a103295f841ae1ee115dbf25d18e1007a8cc82837bc11d32cb9e52fa98346c24b4a76c6694640848c55283ed0eaab7d92a60b
6
+ metadata.gz: 8b54f40cfce51183b86f0dfe159c7f2317e337d9641c6d85368537fed3ad2df5181f409d775a6c4c07a45ecb17cf906400d5e13fe043195caf010ddee0003cda
7
+ data.tar.gz: ac40b0799a0dca2bb9d265535295f63f8252da85daecbb6e1f7180e1d65692fc1e3c57037b5c865dc363c2a55724bb87817eda195a76ca7119bc5e001b1009de
@@ -1,4 +1,4 @@
1
1
  module AwsCacheVersion
2
2
  # Please follow semantic versioning (semver.org).
3
- VERSION = '0.0.10'
3
+ VERSION = '0.0.11'
4
4
  end
@@ -32,14 +32,21 @@ class AwsCache
32
32
 
33
33
  #Returns an array of hashes describing the autoscaling groups for the selected stack.
34
34
  def stack_auto_scaling_groups(stack_name)
35
- autoscaling_groups = Array.new()
36
- output = self.list_stack_resources(stack_name)
37
- output.each do |entry|
38
- if entry[:resource_type] == "AWS::AutoScaling::AutoScalingGroup"
39
- autoscaling_groups.push(entry)
35
+ auto_scaling_groups = Array.new()
36
+ stack_resources = self.list_stack_resources(stack_name)
37
+ asg_groups = stack_resources.select do |record|
38
+ record[:resource_type] == "AWS::AutoScaling::AutoScalingGroup"
39
+ end
40
+ auto_scaling_groups.concat(asg_groups)
41
+ substacks = stack_resources.select do |record|
42
+ record[:resource_type] == "AWS::CloudFormation::Stack"
43
+ end
44
+ if substacks.length > 0 then
45
+ substacks.each do |stack|
46
+ auto_scaling_groups.concat(self.stack_auto_scaling_groups(stack[:physical_resource_id]))
40
47
  end
41
48
  end
42
- return autoscaling_groups
49
+ return auto_scaling_groups
43
50
  end
44
51
 
45
52
  #Returns an array of hashes describing the substacks for the selected stack.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-cache
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen J. Smith