stemcell 0.2.5 → 0.2.6

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.
@@ -1,3 +1,3 @@
1
1
  module Stemcell
2
- VERSION = "0.2.5"
2
+ VERSION = "0.2.6"
3
3
  end
data/lib/stemcell.rb CHANGED
@@ -90,12 +90,16 @@ module Stemcell
90
90
  return @ec2.instances[id]
91
91
  end
92
92
 
93
- def kill(instances)
93
+ def kill(instances,opts={})
94
94
  return if instances.nil?
95
95
  instances.each do |i|
96
- instance = find_instance(i)
97
- @log.warn "Terminating instance #{instance.instance_id}"
98
- instance.terminate
96
+ begin
97
+ instance = find_instance(i)
98
+ @log.warn "Terminating instance #{instance.instance_id}"
99
+ instance.terminate
100
+ rescue AWS::EC2::Errors::InvalidInstanceID::NotFound => e
101
+ throw e unless opts[:ignore_not_found]
102
+ end
99
103
  end
100
104
  end
101
105
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stemcell
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: