duplicati 1.0.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/lib/duplicati.rb +1 -2
- data/lib/duplicati/version.rb +1 -1
- data/spec/duplicati_spec.rb +7 -8
- 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: e2763cab2cbf50ef80682a8f5b49e201fc1793be
|
4
|
+
data.tar.gz: 237e8ae9aaec837a9248d1c3a52fde316334fa9c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc07ac10f4531affcce90abf23179b29fe7e099ceca409dfcb718b19b3cba43b75fcb0b70d110b5479066025c84e7d51f6c9aa3002621de4a540bb6765dd9475
|
7
|
+
data.tar.gz: d427a4e22a3afd4811e058aa099d518d8c7e0c04636603e422d2399428135e0ba0e78b7ba2b7de10834ca03d534ae144cfeedb4bfae673b27db6165947c6b49d
|
data/.travis.yml
CHANGED
data/lib/duplicati.rb
CHANGED
@@ -70,8 +70,7 @@ class Duplicati
|
|
70
70
|
private
|
71
71
|
|
72
72
|
def duplicati_path(path_from_options)
|
73
|
-
|
74
|
-
File.join(path, "Duplicati.CommandLine")
|
73
|
+
path_from_options || ENV["DUPLICATI_PATH"] || (ENV["OS"] == "Windows_NT" ? "/Program Files/Duplicati/Duplicati.CommandLine" : "duplicati-commandline")
|
75
74
|
end
|
76
75
|
|
77
76
|
def execute(command)
|
data/lib/duplicati/version.rb
CHANGED
data/spec/duplicati_spec.rb
CHANGED
@@ -16,17 +16,17 @@ describe Duplicati do
|
|
16
16
|
end
|
17
17
|
|
18
18
|
it "has default duplicati path" do
|
19
|
-
Duplicati.new.opts[:duplicati_path].should == "
|
19
|
+
File.basename(Duplicati.new.opts[:duplicati_path]).should == "Duplicati.CommandLine"
|
20
20
|
end
|
21
21
|
|
22
22
|
it "allows to specify duplicati path via options" do
|
23
|
-
Duplicati.new(:duplicati_path => "/zzz/baz").opts[:duplicati_path].should == "/zzz/baz/
|
23
|
+
Duplicati.new(:duplicati_path => "/zzz/baz/duplicati-commandline").opts[:duplicati_path].should == "/zzz/baz/duplicati-commandline"
|
24
24
|
end
|
25
25
|
|
26
26
|
it "allows to specify duplicati path via environment variable" do
|
27
27
|
begin
|
28
|
-
ENV["DUPLICATI_PATH"] = "/env/path"
|
29
|
-
Duplicati.new.opts[:duplicati_path].should == "/env/path/
|
28
|
+
ENV["DUPLICATI_PATH"] = "/env/path/duplicati-commandline"
|
29
|
+
Duplicati.new.opts[:duplicati_path].should == "/env/path/duplicati-commandline"
|
30
30
|
ensure
|
31
31
|
ENV.delete "DUPLICATI_PATH"
|
32
32
|
end
|
@@ -86,7 +86,7 @@ describe Duplicati do
|
|
86
86
|
end
|
87
87
|
|
88
88
|
it "proxies options to backup command" do
|
89
|
-
duplicati_path = "/foo/bar"
|
89
|
+
duplicati_path = "/foo/bar/duplicati-commandline"
|
90
90
|
options = {
|
91
91
|
:duplicati_path => duplicati_path,
|
92
92
|
:backup_paths => ["foo", "bar"],
|
@@ -96,9 +96,8 @@ describe Duplicati do
|
|
96
96
|
:exclusion_filters => [],
|
97
97
|
:log_path => "tmp"
|
98
98
|
}
|
99
|
-
|
100
|
-
|
101
|
-
Duplicati::Backup.should_receive(:new).with(expected_formatted_options).and_return(double('backup').as_null_object)
|
99
|
+
expected_options = options.dup
|
100
|
+
Duplicati::Backup.should_receive(:new).with(expected_options).and_return(double('backup').as_null_object)
|
102
101
|
Duplicati.any_instance.stub(:execute)
|
103
102
|
|
104
103
|
Duplicati.new(options).backup
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: duplicati
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jarmo Pertman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-02-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|