backup 3.0.26 → 3.0.27

Sign up to get free protection for your applications and to get access to all the features.
@@ -396,14 +396,16 @@ describe Backup::Storage::Dropbox do
396
396
  end
397
397
 
398
398
  describe '#email' do
399
+ before do
400
+ Backup::Logger.expects(:warn).with do |err|
401
+ err.message.should match(
402
+ "Dropbox#email has been deprecated as of backup v.3.0.17"
403
+ )
404
+ end
405
+ end
406
+
399
407
  context 'when set directly' do
400
408
  it 'should issue a deprecation warning' do
401
- Backup::Logger.expects(:warn).with do |err|
402
- err.message.should == "ConfigurationError: [DEPRECATION WARNING]\n" +
403
- " Backup::Storage::Dropbox.email has been deprecated " +
404
- "as of backup v.3.0.17"
405
- end
406
-
407
409
  Backup::Storage::Dropbox.new(model) do |storage|
408
410
  storage.email = 'foo'
409
411
  end
@@ -412,12 +414,6 @@ describe Backup::Storage::Dropbox do
412
414
 
413
415
  context 'when set as a default' do
414
416
  it 'should issue a deprecation warning' do
415
- Backup::Logger.expects(:warn).with do |err|
416
- err.message.should == "ConfigurationError: [DEPRECATION WARNING]\n" +
417
- " Backup::Storage::Dropbox.email has been deprecated " +
418
- "as of backup v.3.0.17"
419
- end
420
-
421
417
  Backup::Storage::Dropbox.defaults do |storage|
422
418
  storage.email = 'foo'
423
419
  end
@@ -427,14 +423,16 @@ describe Backup::Storage::Dropbox do
427
423
  end
428
424
 
429
425
  describe '#password' do
426
+ before do
427
+ Backup::Logger.expects(:warn).with do |err|
428
+ err.message.should match(
429
+ "Dropbox#password has been deprecated as of backup v.3.0.17"
430
+ )
431
+ end
432
+ end
433
+
430
434
  context 'when set directly' do
431
435
  it 'should issue a deprecation warning' do
432
- Backup::Logger.expects(:warn).with do |err|
433
- err.message.should == "ConfigurationError: [DEPRECATION WARNING]\n" +
434
- " Backup::Storage::Dropbox.password has been deprecated " +
435
- "as of backup v.3.0.17"
436
- end
437
-
438
436
  Backup::Storage::Dropbox.new(model) do |storage|
439
437
  storage.password = 'foo'
440
438
  end
@@ -443,12 +441,6 @@ describe Backup::Storage::Dropbox do
443
441
 
444
442
  context 'when set as a default' do
445
443
  it 'should issue a deprecation warning' do
446
- Backup::Logger.expects(:warn).with do |err|
447
- err.message.should == "ConfigurationError: [DEPRECATION WARNING]\n" +
448
- " Backup::Storage::Dropbox.password has been deprecated " +
449
- "as of backup v.3.0.17"
450
- end
451
-
452
444
  Backup::Storage::Dropbox.defaults do |storage|
453
445
  storage.password = 'foo'
454
446
  end
@@ -458,14 +450,16 @@ describe Backup::Storage::Dropbox do
458
450
  end
459
451
 
460
452
  describe '#timeout' do
453
+ before do
454
+ Backup::Logger.expects(:warn).with do |err|
455
+ err.message.should match(
456
+ "Dropbox#timeout has been deprecated as of backup v.3.0.21"
457
+ )
458
+ end
459
+ end
460
+
461
461
  context 'when set directly' do
462
462
  it 'should issue a deprecation warning' do
463
- Backup::Logger.expects(:warn).with do |err|
464
- err.message.should == "ConfigurationError: [DEPRECATION WARNING]\n" +
465
- " Backup::Storage::Dropbox.timeout has been deprecated " +
466
- "as of backup v.3.0.21"
467
- end
468
-
469
463
  Backup::Storage::Dropbox.new(model) do |storage|
470
464
  storage.timeout = 'foo'
471
465
  end
@@ -474,12 +468,6 @@ describe Backup::Storage::Dropbox do
474
468
 
475
469
  context 'when set as a default' do
476
470
  it 'should issue a deprecation warning' do
477
- Backup::Logger.expects(:warn).with do |err|
478
- err.message.should == "ConfigurationError: [DEPRECATION WARNING]\n" +
479
- " Backup::Storage::Dropbox.timeout has been deprecated " +
480
- "as of backup v.3.0.21"
481
- end
482
-
483
471
  Backup::Storage::Dropbox.defaults do |storage|
484
472
  storage.timeout = 'foo'
485
473
  end
@@ -254,7 +254,7 @@ describe 'Backup::Syncer::Cloud::Base' do
254
254
  "\s\sGenerating checksums for '/dir/to/sync'"
255
255
  )
256
256
  sync_context.expects(:`).with(
257
- "find /dir/to/sync -print0 | xargs -0 openssl md5 2> /dev/null"
257
+ "find '/dir/to/sync' -print0 | xargs -0 openssl md5 2> /dev/null"
258
258
  ).returns('MD5(tmp/foo)= 0123456789abcdefghijklmnopqrstuv')
259
259
 
260
260
  sync_context.send(:local_hashes).should ==
@@ -1,12 +1,27 @@
1
1
  ##
2
2
  # GPG [Encryptor]
3
3
  #
4
+ # Setting up #keys, as well as #gpg_homedir and #gpg_config,
5
+ # would be best set in config.rb using Encryptor::GPG.defaults
6
+ #
4
7
  encrypt_with GPG do |encryption|
5
- encryption.key = <<-KEY
8
+ # Setup public keys for #recipients
9
+ encryption.keys = {}
10
+ encryption.keys['user@domain.com'] = <<-KEY
6
11
  -----BEGIN PGP PUBLIC KEY BLOCK-----
7
12
  Version: GnuPG v1.4.11 (Darwin)
8
13
 
9
14
  <Your GPG Public Key Here>
10
15
  -----END PGP PUBLIC KEY BLOCK-----
11
16
  KEY
17
+
18
+ # Specify mode (:asymmetric, :symmetric or :both)
19
+ encryption.mode = :both # defaults to :asymmetric
20
+
21
+ # Specify recipients from #keys (for :asymmetric encryption)
22
+ encryption.recipients = ['user@domain.com']
23
+
24
+ # Specify passphrase or passphrase_file (for :symmetric encryption)
25
+ encryption.passphrase = 'a secret'
26
+ # encryption.passphrase_file = '~/backup_passphrase'
12
27
  end
metadata CHANGED
@@ -1,64 +1,61 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: backup
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 3
7
- - 0
8
- - 26
9
- version: 3.0.26
3
+ version: !ruby/object:Gem::Version
4
+ version: 3.0.27
5
+ prerelease:
10
6
  platform: ruby
11
- authors:
7
+ authors:
12
8
  - Michael van Rooijen
13
9
  autorequire:
14
10
  bindir: bin
15
11
  cert_chain: []
16
-
17
- date: 2012-11-17 00:00:00 +01:00
18
- default_executable:
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
12
+ date: 2012-11-17 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
21
15
  name: thor
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
24
- requirements:
25
- - - ">="
26
- - !ruby/object:Gem::Version
27
- segments:
28
- - 0
29
- - 15
30
- - 4
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
31
21
  version: 0.15.4
32
22
  - - <
33
- - !ruby/object:Gem::Version
34
- segments:
35
- - 2
36
- version: "2"
23
+ - !ruby/object:Gem::Version
24
+ version: '2'
37
25
  type: :runtime
38
- version_requirements: *id001
39
- - !ruby/object:Gem::Dependency
40
- name: open4
41
26
  prerelease: false
42
- requirement: &id002 !ruby/object:Gem::Requirement
43
- requirements:
27
+ version_requirements: !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: 0.15.4
33
+ - - <
34
+ - !ruby/object:Gem::Version
35
+ version: '2'
36
+ - !ruby/object:Gem::Dependency
37
+ name: open4
38
+ requirement: !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
44
41
  - - ~>
45
- - !ruby/object:Gem::Version
46
- segments:
47
- - 1
48
- - 3
49
- - 0
42
+ - !ruby/object:Gem::Version
50
43
  version: 1.3.0
51
44
  type: :runtime
52
- version_requirements: *id002
45
+ prerelease: false
46
+ version_requirements: !ruby/object:Gem::Requirement
47
+ none: false
48
+ requirements:
49
+ - - ~>
50
+ - !ruby/object:Gem::Version
51
+ version: 1.3.0
53
52
  description:
54
53
  email: meskyanichi@gmail.com
55
- executables:
54
+ executables:
56
55
  - backup
57
56
  extensions: []
58
-
59
57
  extra_rdoc_files: []
60
-
61
- files:
58
+ files:
62
59
  - .gitignore
63
60
  - .travis.yml
64
61
  - Gemfile
@@ -132,8 +129,11 @@ files:
132
129
  - spec-live/README
133
130
  - spec-live/backups/config.rb
134
131
  - spec-live/backups/config.yml.template
132
+ - spec-live/backups/models.rb
135
133
  - spec-live/compressor/custom_spec.rb
136
134
  - spec-live/compressor/gzip_spec.rb
135
+ - spec-live/encryptor/gpg_keys.rb
136
+ - spec-live/encryptor/gpg_spec.rb
137
137
  - spec-live/notifier/mail_spec.rb
138
138
  - spec-live/spec_helper.rb
139
139
  - spec-live/storage/dropbox_spec.rb
@@ -243,35 +243,34 @@ files:
243
243
  - templates/storage/dropbox/authorization_url.erb
244
244
  - templates/storage/dropbox/authorized.erb
245
245
  - templates/storage/dropbox/cache_file_written.erb
246
- has_rdoc: true
247
246
  homepage: http://rubygems.org/gems/backup
248
247
  licenses: []
249
-
250
248
  post_install_message:
251
249
  rdoc_options: []
252
-
253
- require_paths:
250
+ require_paths:
254
251
  - lib
255
- required_ruby_version: !ruby/object:Gem::Requirement
256
- requirements:
257
- - - ">="
258
- - !ruby/object:Gem::Version
259
- segments:
260
- - 0
261
- version: "0"
262
- required_rubygems_version: !ruby/object:Gem::Requirement
263
- requirements:
264
- - - ">="
265
- - !ruby/object:Gem::Version
266
- segments:
267
- - 0
268
- version: "0"
252
+ required_ruby_version: !ruby/object:Gem::Requirement
253
+ none: false
254
+ requirements:
255
+ - - ! '>='
256
+ - !ruby/object:Gem::Version
257
+ version: '0'
258
+ required_rubygems_version: !ruby/object:Gem::Requirement
259
+ none: false
260
+ requirements:
261
+ - - ! '>='
262
+ - !ruby/object:Gem::Version
263
+ version: '0'
269
264
  requirements: []
270
-
271
265
  rubyforge_project:
272
- rubygems_version: 1.3.6
266
+ rubygems_version: 1.8.24
273
267
  signing_key:
274
268
  specification_version: 3
275
- summary: Backup is a RubyGem, written for UNIX-like operating systems, that allows you to easily perform backup operations on both your remote and local environments. It provides you with an elegant DSL in Ruby for modeling your backups. Backup has built-in support for various databases, storage protocols/services, syncers, compressors, encryptors and notifiers which you can mix and match. It was built with modularity, extensibility and simplicity in mind.
269
+ summary: Backup is a RubyGem, written for UNIX-like operating systems, that allows
270
+ you to easily perform backup operations on both your remote and local environments.
271
+ It provides you with an elegant DSL in Ruby for modeling your backups. Backup has
272
+ built-in support for various databases, storage protocols/services, syncers, compressors,
273
+ encryptors and notifiers which you can mix and match. It was built with modularity,
274
+ extensibility and simplicity in mind.
276
275
  test_files: []
277
-
276
+ has_rdoc: