ec2-blackout 0.0.2 → 0.0.3

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.
@@ -13,7 +13,7 @@ class Ec2::Blackout::Shutdown
13
13
  if stoppable? instance
14
14
  @ui.say "-> Stopping instance: #{instance.id}, name: #{instance.tags['Name']}"
15
15
  unless dry_run?
16
- instance.add_tag('ec2:blackout:on', Date.now.utc)
16
+ instance.add_tag('ec2:blackout:on', :value => Time.now.utc)
17
17
  instance.stop
18
18
  end
19
19
  elsif instance.status == :running
@@ -32,7 +32,7 @@ class Ec2::Blackout::Shutdown
32
32
  end
33
33
 
34
34
  def stoppable? instance
35
- (instance.status == :running && exclude_tag && !instance.tags[exclude_tag].nil?) or
35
+ (instance.status == :running && exclude_tag && !instance.tags.to_h.key?(exclude_tag)) or
36
36
  (instance.status == :running && exclude_tag.nil?)
37
37
  end
38
38
 
@@ -32,7 +32,7 @@ class Ec2::Blackout::Startup
32
32
  end
33
33
 
34
34
  def startable? instance
35
- (instance.status == :stopped && instance.tags['ec2:blackout:on']) ||
35
+ (instance.status == :stopped && instance.tags.to_h.key?('ec2:blackout:on')) or
36
36
  (instance.status == :stopped && @options[:force])
37
37
  end
38
38
 
@@ -1,6 +1,6 @@
1
1
  module Ec2
2
2
  module Blackout
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
 
5
5
  def self.name
6
6
  'ec2-blackout'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ec2-blackout
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: