bibliotech 0.2.2 → 0.2.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.
- checksums.yaml +4 -4
- data/lib/bibliotech/backups/scheduler.rb +2 -0
- data/spec/bibliotech/backup_scheduler_spec.rb +8 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0d3db00ae690a5cadb9e6ba8f82c57880ac90ae7
|
4
|
+
data.tar.gz: 3bfaba7cd66defa3099e1fa1b368652c0e31f8ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db6a21821e71a1669902aa2d08ddaa91f876e74b04508da8ea725504c604c4dc07b724b92791141b2dae6ca2166500e5278ad719ec51f2bf40fbd47bfe9a3fcb
|
7
|
+
data.tar.gz: a9bb0ed38331a9c0221de3c6a3a09569c8a2d1a2b157612fe3ab5f0ba44f843e0fa78f567e67cb369095b74da8c4481a536fa1e203b02e40270c6612381fa193
|
@@ -11,11 +11,13 @@ module BiblioTech
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def end_time(file_list)
|
14
|
+
return Time.at(0) if file_list.empty?
|
14
15
|
file_list.map{|record| record.timestamp}.max
|
15
16
|
end
|
16
17
|
|
17
18
|
def compute_start_time(file_list)
|
18
19
|
limit_time = Time.at(0)
|
20
|
+
return limit_time if file_list.empty?
|
19
21
|
unless limit.nil?
|
20
22
|
limit_time = end_time(file_list) - limit * freq_seconds
|
21
23
|
end
|
@@ -66,6 +66,14 @@ module BiblioTech::Backups
|
|
66
66
|
end
|
67
67
|
end
|
68
68
|
|
69
|
+
context "when there are no backups yet" do
|
70
|
+
let(:unfiltered_files){ [] }
|
71
|
+
|
72
|
+
it "should return 0 kept files" do
|
73
|
+
expect(kept_files.count).to eql 0
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
69
77
|
context "when there's more than enough backups" do
|
70
78
|
let(:interval){ 60*60*12 }
|
71
79
|
let(:frequency) { 15 }
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bibliotech
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Evan Dorn
|
@@ -128,7 +128,7 @@ rdoc_options:
|
|
128
128
|
- --main
|
129
129
|
- doc/README
|
130
130
|
- --title
|
131
|
-
- bibliotech-0.2.
|
131
|
+
- bibliotech-0.2.3 Documentation
|
132
132
|
require_paths:
|
133
133
|
- lib/
|
134
134
|
required_ruby_version: !ruby/object:Gem::Requirement
|