duplicati 1.0.0 → 2.0.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 559e0a35ca6da1990875258ccb47a3582514e216
4
- data.tar.gz: 6241c2f9810c34ca04c06f087180652d72306c38
3
+ metadata.gz: e2763cab2cbf50ef80682a8f5b49e201fc1793be
4
+ data.tar.gz: 237e8ae9aaec837a9248d1c3a52fde316334fa9c
5
5
  SHA512:
6
- metadata.gz: 58aa7e086bb8e2f27ad811cf66a1ab34caff69f2b90f4ceaafa4eb95942b2d689e8bd26085cf7def20ac60e843609cb5d603495565c618d6ec0665442928e3c3
7
- data.tar.gz: a7abd76a1afc88cec7f7727724cf0114304d9f9036b2ea52593bd90450a2e3d476ac7a20a66aab1c7f51681e85492db15dff461213bf27ba563319d3aa7740b1
6
+ metadata.gz: cc07ac10f4531affcce90abf23179b29fe7e099ceca409dfcb718b19b3cba43b75fcb0b70d110b5479066025c84e7d51f6c9aa3002621de4a540bb6765dd9475
7
+ data.tar.gz: d427a4e22a3afd4811e058aa099d518d8c7e0c04636603e422d2399428135e0ba0e78b7ba2b7de10834ca03d534ae144cfeedb4bfae673b27db6165947c6b49d
data/.travis.yml CHANGED
@@ -1,7 +1,7 @@
1
1
  rvm:
2
- - 1.8.7
3
2
  - 1.9.3
4
3
  - 2.0.0
4
+ - 2.1.0
5
5
  - ruby-head
6
6
  notifications:
7
7
  recipients:
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
- path = path_from_options || ENV["DUPLICATI_PATH"] || "/Program Files/Duplicati"
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)
@@ -1,3 +1,3 @@
1
1
  class Duplicati
2
- VERSION = "1.0.0"
2
+ VERSION = "2.0.0"
3
3
  end
@@ -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 == "/Program Files/Duplicati/Duplicati.CommandLine"
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/Duplicati.CommandLine"
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/Duplicati.CommandLine"
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
- expected_formatted_options = options.dup
100
- expected_formatted_options[:duplicati_path] += "/Duplicati.CommandLine"
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: 1.0.0
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-01-30 00:00:00.000000000 Z
11
+ date: 2014-02-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake