appshot 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.
@@ -1,3 +1,3 @@
1
1
  class Appshot
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -27,12 +27,7 @@ class Appshot
27
27
  end
28
28
 
29
29
  def snap(volume_id, description = "", options = {})
30
- snap = @fog.snapshots.create({:volume_id => volume_id, :description => description}.merge(options))
31
- while snap.state != "completed" do
32
- sleep 0.5
33
- snap.reload
34
- end
35
- snap
30
+ @fog.snapshots.create({:volume_id => volume_id, :description => description}.merge(options))
36
31
  end
37
32
 
38
33
  def snapshots_for(volume_id)
@@ -88,7 +88,9 @@ describe Appshot::EBS_Volume do
88
88
  let(:snapshot_count) { 3 }
89
89
 
90
90
  it "should prune snapshots for a given volume to a snapshot count" do
91
+ Timecop.freeze(Time.now - (3 * 86400))
91
92
  snaps
93
+ Timecop.return
92
94
  ebs.snapshots_for(volumes.first.id).count.should == 3
93
95
  ebs.prune_snapshots(volumes.first.id, snapshots_to_keep: 1)
94
96
  ebs.snapshots_for(volumes.first.id).count.should == 1
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appshot
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:
@@ -274,7 +274,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
274
274
  version: '0'
275
275
  segments:
276
276
  - 0
277
- hash: -1348702255709981596
277
+ hash: 4374607639784639822
278
278
  required_rubygems_version: !ruby/object:Gem::Requirement
279
279
  none: false
280
280
  requirements:
@@ -283,7 +283,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
283
283
  version: '0'
284
284
  segments:
285
285
  - 0
286
- hash: -1348702255709981596
286
+ hash: 4374607639784639822
287
287
  requirements: []
288
288
  rubyforge_project:
289
289
  rubygems_version: 1.8.24