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.
- data/lib/stemcell/version.rb +1 -1
 - data/lib/stemcell.rb +8 -4
 - metadata +1 -1
 
    
        data/lib/stemcell/version.rb
    CHANGED
    
    
    
        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 
     | 
    
         
            -
                     
     | 
| 
       97 
     | 
    
         
            -
             
     | 
| 
       98 
     | 
    
         
            -
             
     | 
| 
      
 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 
     | 
    
         |