ebs-snapshoter 0.1.2 → 0.1.4

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/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.2
1
+ 0.1.4
@@ -96,7 +96,6 @@ module Snapshoter
96
96
 
97
97
  def should_take_snapshot(volume)
98
98
  if last_snapshot_at = @provider.last_snapshot_at(volume)
99
-
100
99
  last = last_snapshot_at.localtime
101
100
  now = Time.now
102
101
 
@@ -1,4 +1,5 @@
1
1
  require 'right_aws'
2
+ require 'time'
2
3
 
3
4
  module Snapshoter
4
5
  module Provider
@@ -10,7 +11,13 @@ module Snapshoter
10
11
  # Returns the most recent time a snapshot was started for a given volume or nil if there are none
11
12
  def last_snapshot_at(volume)
12
13
  snapshots = snapshots_by_volume_id(volume.id)
13
- snapshots.any? ? snapshots.first[:aws_started_at] : nil
14
+ if snapshots.any?
15
+ time = snapshots.first[:aws_started_at]
16
+ # Account for right_aws API differences
17
+ String === time ? Time.parse(time) : time
18
+ else
19
+ nil
20
+ end
14
21
  end
15
22
 
16
23
  def snapshot_volume(volume)
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 2
9
- version: 0.1.2
8
+ - 4
9
+ version: 0.1.4
10
10
  platform: ruby
11
11
  authors:
12
12
  - Kris Rasmussen