duplicati 2.0.0 → 2.0.1
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/duplicati.rb +9 -1
- data/lib/duplicati/version.rb +1 -1
- data/spec/duplicati_spec.rb +2 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3243fec87ce88a6b75a796a9e9696536c1f37983
|
4
|
+
data.tar.gz: 2080818ee88cd826622d3701239642e76b917b14
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf6381818acf5f5f38f28e48a82dd0f3bd8c8f63f708d8e89a59b076a6c8ef338268ca71456f1e90b5c07a8d112683f61c2b3fb0c0ebd5811adbe690f87c16a6
|
7
|
+
data.tar.gz: a34292ff2e2c50f16bc799be145d7ed86aca0f60813302774f00a75bf80921ab16ff5f8ebce1dacd11248c56a95d84e959de3f916e4934af03fd01b94b02ddae
|
data/lib/duplicati.rb
CHANGED
@@ -70,7 +70,15 @@ class Duplicati
|
|
70
70
|
private
|
71
71
|
|
72
72
|
def duplicati_path(path_from_options)
|
73
|
-
path_from_options || ENV["DUPLICATI_PATH"] || (
|
73
|
+
path_from_options || ENV["DUPLICATI_PATH"] || (windows? ? "/Program Files/Duplicati/#{duplicati_executable_name}" : duplicati_executable_name)
|
74
|
+
end
|
75
|
+
|
76
|
+
def duplicati_executable_name
|
77
|
+
windows? ? "Duplicati.CommandLine" : "duplicati-commandline"
|
78
|
+
end
|
79
|
+
|
80
|
+
def windows?
|
81
|
+
ENV["OS"] == "Windows_NT"
|
74
82
|
end
|
75
83
|
|
76
84
|
def execute(command)
|
data/lib/duplicati/version.rb
CHANGED
data/spec/duplicati_spec.rb
CHANGED
@@ -16,7 +16,8 @@ describe Duplicati do
|
|
16
16
|
end
|
17
17
|
|
18
18
|
it "has default duplicati path" do
|
19
|
-
|
19
|
+
duplicati = Duplicati.new
|
20
|
+
File.basename(duplicati.opts[:duplicati_path]).should == duplicati.send(:duplicati_executable_name)
|
20
21
|
end
|
21
22
|
|
22
23
|
it "allows to specify duplicati path via options" do
|