backup 3.7.1 → 3.7.2

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: 93775387e1720ff604cd8bf482de58f704308a53
4
- data.tar.gz: ee20cb5cba4ec017ed44d47bc26eae7d81a63826
3
+ metadata.gz: 6cc0cefe15e7fb9dc06e2204ce90aad256ea474a
4
+ data.tar.gz: 073692acde24bfe0dc958334a3c3ecfb955c62a2
5
5
  SHA512:
6
- metadata.gz: 6dac8ff95f57d05701bc3d877845c9480e8898aba9f158945c7f242fc4cb0ef9a2e3f6b8b6c94c225febd7a6febedb9c33cff5459714ae64df2d29f65663a12a
7
- data.tar.gz: a37cd8af5be97b41daaa6400e1669add245f0e67ec66a002cbb4e22ff0199d883dea1b8698929dede51c31ad8bfd6a0a3c870da14cc977da35ac16d536c8e7e8
6
+ metadata.gz: 09747bffc3eae9f9769c5d3b1d86a198ce5d6560ad34877b0f7b491fb514844751e8ce5e3b8c2b5a69786ca0904e09f1f94023ed4bf3739429a10297d9c43398
7
+ data.tar.gz: 0ae326031c81d8c3ad905427463018bccdee68bade8dc8c7a5398ff241fd6572dd428cba04ed47f0d09f280c8dc390c16922fafb777fd01378952ee0a3925af3
@@ -66,10 +66,10 @@ module Backup
66
66
  objects = []
67
67
  resp = nil
68
68
  prefix = prefix.chomp('/')
69
- opts = { :prefix => prefix + '/' }
69
+ opts = { 'prefix' => prefix + '/' }
70
70
 
71
71
  while resp.nil? || resp.body['IsTruncated']
72
- opts.merge!(:marker => objects.last.key) unless objects.empty?
72
+ opts.merge!('marker' => objects.last.key) unless objects.empty?
73
73
  with_retries("GET '#{ bucket }/#{ prefix }/*'") do
74
74
  resp = connection.get_bucket(bucket, opts)
75
75
  end
@@ -87,7 +87,9 @@ module Backup
87
87
  def load_defaults!
88
88
  configuration = self.class.defaults
89
89
  configuration._attributes.each do |name|
90
- send(:"#{ name }=", configuration.send(name))
90
+ val = configuration.send(name)
91
+ val = val.dup rescue val
92
+ send(:"#{ name }=", val)
91
93
  end
92
94
  end
93
95
 
@@ -8,7 +8,7 @@ module Backup
8
8
 
9
9
  ##
10
10
  # Server credentials
11
- attr_accessor :username, :password
11
+ attr_accessor :username, :password, :ssh_options
12
12
 
13
13
  ##
14
14
  # Server IP Address and SCP port
@@ -19,6 +19,7 @@ module Backup
19
19
 
20
20
  @port ||= 22
21
21
  @path ||= 'backups'
22
+ @ssh_options ||= {}
22
23
  path.sub!(/^~\//, '')
23
24
  end
24
25
 
@@ -26,7 +27,7 @@ module Backup
26
27
 
27
28
  def connection
28
29
  Net::SSH.start(
29
- ip, username, :password => password, :port => port
30
+ ip, username, { :password => password, :port => port }.merge(ssh_options)
30
31
  ) {|ssh| yield ssh }
31
32
  end
32
33
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module Backup
4
- VERSION = '3.7.1'
4
+ VERSION = '3.7.2'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: backup
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.7.1
4
+ version: 3.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael van Rooijen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-04 00:00:00.000000000 Z
11
+ date: 2013-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: builder
@@ -511,7 +511,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
511
511
  version: '0'
512
512
  requirements: []
513
513
  rubyforge_project:
514
- rubygems_version: 2.0.2
514
+ rubygems_version: 2.1.1
515
515
  signing_key:
516
516
  specification_version: 4
517
517
  summary: Provides an elegant DSL in Ruby for performing backups on UNIX-like systems.