aws-asg-fleet 0.0.4 → 0.0.5
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.
data/asg-fleet.gemspec
CHANGED
@@ -5,7 +5,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "aws-asg-fleet"
|
8
|
-
spec.version = "0.0.
|
8
|
+
spec.version = "0.0.5"
|
9
9
|
spec.authors = ["Zach Wily"]
|
10
10
|
spec.email = ["zach@zwily.com"]
|
11
11
|
spec.description = %q{AWS Auto Scaling Fleets}
|
@@ -34,6 +34,23 @@ module AWS
|
|
34
34
|
def [] name
|
35
35
|
Fleet.new(name, :config => config)
|
36
36
|
end
|
37
|
+
|
38
|
+
protected
|
39
|
+
|
40
|
+
def _each_item options
|
41
|
+
yielded_fleets = []
|
42
|
+
|
43
|
+
TagCollection.new(:config => config).each do |tag|
|
44
|
+
if tag[:key] =~ /^asgfleet:/
|
45
|
+
name = tag[:key].split(':', 2)[1]
|
46
|
+
|
47
|
+
next if yielded_fleets.include? name
|
48
|
+
yielded_fleets << name
|
49
|
+
|
50
|
+
yield Fleet.new(name, :config => config)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
37
54
|
end
|
38
55
|
end
|
39
56
|
end
|
@@ -18,6 +18,14 @@ module AWS
|
|
18
18
|
def << group
|
19
19
|
group.set_fleet @fleet.name
|
20
20
|
end
|
21
|
+
|
22
|
+
protected
|
23
|
+
|
24
|
+
def _each_item options
|
25
|
+
TagCollection.new(:config => config).filter(:key, "asgfleet:#{@fleet.name}").each do |tag|
|
26
|
+
yield tag.resource
|
27
|
+
end
|
28
|
+
end
|
21
29
|
end
|
22
30
|
end
|
23
31
|
end
|