bibliotech 0.2.3 → 0.2.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.
- checksums.yaml +4 -4
- data/lib/bibliotech/backups/pruner.rb +2 -0
- data/spec/bibliotech/backup_pruner_spec.rb +23 -3
- 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: 0569649a33c1d1e8beefd3356bdad02c255a6651
|
4
|
+
data.tar.gz: e5886669625ea859ac9517e71252839f22417874
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c0e52b37f2d456599bbef875e785b5b01d0a1fba566bbae1dad901da125bc723f44a049bab18d813ded874d609b34d77328ec4a1384c2dd142ad16c3381a4c7f
|
7
|
+
data.tar.gz: 6c8cb30fa712665d5b86a14bccf062e7aab7af22fa5b17eee59ad96b38e4dbeedcce2968a534f5ade5cd1669d13360a579bb70ddeae5bdd326b339b6e505e637
|
@@ -7,15 +7,35 @@ module BiblioTech
|
|
7
7
|
|
8
8
|
before :each do
|
9
9
|
sandbox.new :directory => "db_backups"
|
10
|
-
sandbox.new :file => "db_backups/backup-2014-08-12_00:00.sql.7z"
|
11
10
|
end
|
12
11
|
|
13
12
|
let :app do
|
14
13
|
App.new
|
15
14
|
end
|
16
15
|
|
17
|
-
|
18
|
-
|
16
|
+
let :pruner do
|
17
|
+
app.pruner({:backups => {
|
18
|
+
:frequency => "daily",
|
19
|
+
:prefix => "testing",
|
20
|
+
:keep => {:daily => 100},
|
21
|
+
:dir => "db_backups"
|
22
|
+
}})
|
23
|
+
end
|
24
|
+
|
25
|
+
context "without existing files" do
|
26
|
+
it "should return true from #backup_needed?" do
|
27
|
+
expect(pruner.backup_needed?(Time.now.utc)).to be_truthy
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
context "with an existing file" do
|
32
|
+
before :each do
|
33
|
+
sandbox.new :file => "db_backups/backup-2014-08-12_00:00.sql.7z"
|
34
|
+
end
|
35
|
+
|
36
|
+
it "should something latest" do
|
37
|
+
expect(app.latest("local" => "production")).to eql "db_backups/backup-2014-08-12_00:00.sql.7z"
|
38
|
+
end
|
19
39
|
end
|
20
40
|
|
21
41
|
end
|
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.4
|
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.4 Documentation
|
132
132
|
require_paths:
|
133
133
|
- lib/
|
134
134
|
required_ruby_version: !ruby/object:Gem::Requirement
|