ec2-host 0.2.1 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/ec2-host.gemspec +1 -1
- data/lib/ec2/host/host_data.rb +21 -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: 26bbe969dcb79b034feceb28ffb1416399a5c907
|
4
|
+
data.tar.gz: 8f8659465c4774b7d2b1268063123265d578d02c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 01aec0e3eb94ce83b476e38ce5a7397b96daa2a1723b36a917a4a3fc5433f09958afdf69b80ed5b3fd2e78750c847af2f9c5e02bdfdb1d4ee5e3a95d5aae94cc
|
7
|
+
data.tar.gz: cc5fd0f347cfb14439aeb7d1757e5d808125aeaa2c0ea76558c34e7c12a7d79ab0afcc74a91c431e9c5ae36b4a079900e2e74dd8174fb67b5ae372969396b3a0
|
data/CHANGELOG.md
CHANGED
data/ec2-host.gemspec
CHANGED
data/lib/ec2/host/host_data.rb
CHANGED
@@ -41,7 +41,7 @@ class EC2
|
|
41
41
|
#
|
42
42
|
# @param [Hash] condition search parameters
|
43
43
|
def match?(condition)
|
44
|
-
return false if !condition[:state] and terminated?
|
44
|
+
return false if !condition[:state] and (terminated? or shutting_down?)
|
45
45
|
return false unless role_match?(condition)
|
46
46
|
condition = HashUtil.except(condition,
|
47
47
|
:role, :role1, :role2, :role3,
|
@@ -99,6 +99,26 @@ class EC2
|
|
99
99
|
state == "terminated"
|
100
100
|
end
|
101
101
|
|
102
|
+
def shutting_down?
|
103
|
+
state == "shutting-down"
|
104
|
+
end
|
105
|
+
|
106
|
+
def stopping?
|
107
|
+
state == "stopping"
|
108
|
+
end
|
109
|
+
|
110
|
+
def stopped
|
111
|
+
state == "stopped"
|
112
|
+
end
|
113
|
+
|
114
|
+
def running?
|
115
|
+
state == "running"
|
116
|
+
end
|
117
|
+
|
118
|
+
def pending?
|
119
|
+
state == "pending"
|
120
|
+
end
|
121
|
+
|
102
122
|
def role_match?(condition)
|
103
123
|
# usage is an alias of role
|
104
124
|
if role = (condition[:role] || condition[:usage])
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ec2-host
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Naotoshi Seo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-08-
|
11
|
+
date: 2015-08-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|