ec2-host 0.5.2 → 0.5.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ec6df01944b6e114765ab9cdfc82dbab5dbabfc2
4
- data.tar.gz: 9034b247a032a688bca1c00b744af25a963f45da
3
+ metadata.gz: e80e3a14cf3ad4795bc1273295ee6b035e507d5c
4
+ data.tar.gz: d032c6349e2f6a6e7a0e9f0463143e244a3aee42
5
5
  SHA512:
6
- metadata.gz: 5e17674ede92497bd3c1c6d15d58b8db038a9f9b247e5b927015ddccd6cf3d89f7429333b78fb3b308944b8a2c7cf4369b8f3982303ebe34355b10259db79256
7
- data.tar.gz: f58deb8eaf8b606071445a687196c18182e7c8792fb745c0c22e9332353fa7c89cdd9519fb4b08d27328347260128dbd888c62e914b01b79d748bbc23b804a7b
6
+ metadata.gz: a46430ddba38a195b0a075bef6f09f0eda61753dada4e13f97b349a6ff90b7bdecf75be1fe2ecb44d0035d93b284c4293f8cb63e4c03934cbd509ff8c7919ca4
7
+ data.tar.gz: 548aca969b81f3988c6b5d668b9f2255df8e528bd24dbb5f96634f9dfec507412a742e9144ba8a46e628c8e7be93d213b64dec1640b0998fe90f798b526db46c
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ # 0.5.3 (2017/01/19)
2
+
3
+ Enhancements:
4
+
5
+ * Add `availability_zone` and `spot?`
6
+
1
7
  # 0.5.2 (2016/12/08)
2
8
 
3
9
  Changes:
@@ -75,6 +75,18 @@ class EC2
75
75
  instance.monitoring.state
76
76
  end
77
77
 
78
+ def availability_zone
79
+ instance.placement.availability_zone
80
+ end
81
+
82
+ def spot?
83
+ instance.instance_lifecycle == 'spot'
84
+ end
85
+
86
+ def dedicated?
87
+ instance.placement.tenancy == 'dedicated'
88
+ end
89
+
78
90
  # compatibility with dino-host
79
91
  def ip
80
92
  private_ip_address
@@ -139,6 +151,7 @@ class EC2
139
151
  end
140
152
  params.merge!(
141
153
  "region" => region,
154
+ "availability_zone" => availability_zone,
142
155
  "instance_id" => instance_id,
143
156
  "instance_type" => instance_type,
144
157
  "private_ip_address" => private_ip_address,
@@ -146,6 +159,7 @@ class EC2
146
159
  "launch_time" => launch_time,
147
160
  "state" => state,
148
161
  "monitoring" => monitoring,
162
+ "spot" => spot?,
149
163
  )
150
164
  end
151
165
 
@@ -212,7 +226,7 @@ class EC2
212
226
  v
213
227
  end
214
228
 
215
- # compatibility with dono-host
229
+ # compatibility with dino-host
216
230
  #
217
231
  # If Service,Status,Tags tags are defined
218
232
  #
@@ -1,5 +1,5 @@
1
1
  class EC2
2
2
  class Host
3
- VERSION = '0.5.2'
3
+ VERSION = '0.5.3'
4
4
  end
5
5
  end
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.5.2
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Naotoshi Seo
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-12-08 00:00:00.000000000 Z
11
+ date: 2017-01-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk