aws-sdk-enhanced 2.0.0 → 2.0.1

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: 79beea32d322d7c8d081f6f8cc04fce8bb1d69a3
4
- data.tar.gz: f13a2353bf13a51bed23a7dcfc31e627446fbea5
3
+ metadata.gz: 8268ff733c63ca682eeb6fd2b8676405f0ac980e
4
+ data.tar.gz: 808f77b7103bba1afbdc3585bd133f2cdd698211
5
5
  SHA512:
6
- metadata.gz: 14cffbe6cfb5cee1d0abd0e011705c9cfa1d5ac4508f015c3609b469bd65b049ffcf16b7f7c208ee2fe9e5142545319bd588fda21b205d7519baa2849487e4c9
7
- data.tar.gz: 020d9a0af2f6fa6c0e4e1f2648cc1f0691ff34cc5978a5b20be4519226143ca44087dddc3ae06bb43e5ba617c3a4c34824c703de3ae1abfc6ac8b15a6dac9918
6
+ metadata.gz: 03ea36dc82c9c1b21618c0d85f9c623e9ff9019943f30154ae6b995152a7284604395236b35f6e8b02b6fc1d402daff70be81a732e1fcbaddf91e334283e47c0
7
+ data.tar.gz: 4ec29a71974252583d066ad50e6179802d1a8abf373eaaa1c5682a2c204d4af33fd33cc0acf1ac7d9080c601bf39f64fdcb3fad039e552056d396a724cca09ee
@@ -1,5 +1,8 @@
1
1
  = aws-sdk-enhanced
2
2
 
3
+ == Version 2.0.1
4
+ * Implements #running? on Aws::EC2::Instance
5
+
3
6
  == Version 2.0.0
4
7
  * Implements TagHashable module
5
8
  * Applies TagHashable to Aws::EC2::Instance
@@ -24,6 +24,7 @@ This gem depends on and thus requires 'aws-sdk', so an explicit "require 'aws-sd
24
24
 
25
25
  instance = Aws::EC2::Instance.new('i-abc1234')
26
26
  value = instance.tag_hash['MyTag']
27
+ puts instance.running? # will not throw exception if instance does not exist (returns true or false)
27
28
 
28
29
  # note no Aws::AutoScaling::Group class exists in aws-sdk
29
30
  group = Aws::AutoScaling::Group.new('my_auto_scaling_group')
@@ -3,6 +3,12 @@ module EC2
3
3
 
4
4
  class Instance
5
5
  include Aws::Enhanced::TagHashable
6
+
7
+ def running?
8
+ state.name == 'running'
9
+ rescue Aws::EC2::Errors::InvalidInstanceIDNotFound
10
+ false
11
+ end
6
12
  end
7
13
 
8
14
  end
@@ -1,5 +1,5 @@
1
1
  module Aws
2
2
  module Enhanced
3
- VERSION = '2.0.0'
3
+ VERSION = '2.0.1'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-enhanced
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Dawson