prune_cloudfiles_db_backups 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fbb9be8a906ad68f1a30519d1410e9198398db57
4
- data.tar.gz: bbdece4efbdc593d371905ad28223c3f9764e840
3
+ metadata.gz: 7877ef33b6452ae1e8f08bc50c66c47a844f8ae5
4
+ data.tar.gz: 158a7ab489a862273d2f4b1bf83d996cf3082238
5
5
  SHA512:
6
- metadata.gz: 49b16130c7f988cfd627004d7c099aa35592a7d0f2ee5ce98af4e9f551f5f2b2651123976f3fcd91fc813a12111f24a482dec59d9c3613b95be1240e08c11fb9
7
- data.tar.gz: 7d1aea13d2fe1e07d74d0d66bd1c9d9eaf262b6c9ec09e7fa3148a74e12f999632c333cc7106dcd9d97f06137c7f7d98453cb775c1daf03430fc8a475de29d56
6
+ metadata.gz: 5a80268508113b2009eb9522166cd5e371a6d02c8acd10abb55af2bd21d02069ad0b713fd68dd2af9aa3ac722cec8558247bc380dd83a93b264d80fef518752f
7
+ data.tar.gz: 6ccf31a9bc1d78ec47781aa715a7a7d0efb9466d855b636eab927db331d0e876de6aa02b064082e2a49178fa3f333262a8740bb5944803c0228688792fb5adf5
@@ -16,8 +16,7 @@ module PruneCloudfilesDbBackups
16
16
  @objects = @container.objects
17
17
  count = @container.count.to_i
18
18
  while @objects.size < count do
19
- last = @objects.pop
20
- @objects.concat(@container.objects(marker: last))
19
+ @objects.concat(@container.objects(marker: @objects.last))
21
20
  end
22
21
 
23
22
  calc = RetentionCalculator.new(@objects,
@@ -1,3 +1,3 @@
1
1
  module PruneCloudfilesDbBackups
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
3
3
  end
@@ -12,6 +12,9 @@ module PruneCloudfilesDbBackups
12
12
 
13
13
  @object_pile = IO.read("#{File.dirname(__FILE__)}/lists/backup_pile.txt").split("\n")
14
14
  container = double('an openstack container')
15
+ container.stub(:count) {
16
+ @object_pile.length
17
+ }
15
18
  container.stub(:objects) {
16
19
  @object_pile
17
20
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prune_cloudfiles_db_backups
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nelson Chen