backup 3.0.23 → 3.0.24
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +42 -45
- data/Guardfile +7 -4
- data/README.md +10 -7
- data/backup.gemspec +2 -2
- data/lib/backup.rb +27 -97
- data/lib/backup/archive.rb +14 -6
- data/lib/backup/cli/helpers.rb +52 -49
- data/lib/backup/cli/utility.rb +9 -1
- data/lib/backup/compressor/base.rb +10 -4
- data/lib/backup/compressor/bzip2.rb +22 -26
- data/lib/backup/compressor/custom.rb +53 -0
- data/lib/backup/compressor/gzip.rb +22 -23
- data/lib/backup/compressor/lzma.rb +15 -13
- data/lib/backup/compressor/pbzip2.rb +20 -17
- data/lib/backup/config.rb +6 -3
- data/lib/backup/configuration.rb +33 -0
- data/lib/backup/configuration/helpers.rb +114 -28
- data/lib/backup/configuration/store.rb +24 -0
- data/lib/backup/database/base.rb +0 -6
- data/lib/backup/database/mongodb.rb +27 -11
- data/lib/backup/database/mysql.rb +19 -14
- data/lib/backup/database/postgresql.rb +16 -11
- data/lib/backup/database/redis.rb +7 -11
- data/lib/backup/database/riak.rb +3 -6
- data/lib/backup/dependency.rb +5 -11
- data/lib/backup/model.rb +14 -5
- data/lib/backup/notifier/campfire.rb +3 -16
- data/lib/backup/notifier/hipchat.rb +1 -7
- data/lib/backup/notifier/mail.rb +1 -1
- data/lib/backup/packager.rb +29 -19
- data/lib/backup/pipeline.rb +110 -0
- data/lib/backup/storage/dropbox.rb +4 -7
- data/lib/backup/syncer/base.rb +8 -4
- data/lib/backup/syncer/cloud/base.rb +247 -0
- data/lib/backup/syncer/cloud/cloud_files.rb +78 -0
- data/lib/backup/syncer/cloud/s3.rb +68 -0
- data/lib/backup/syncer/rsync/base.rb +1 -4
- data/lib/backup/syncer/rsync/local.rb +9 -5
- data/lib/backup/syncer/rsync/pull.rb +1 -1
- data/lib/backup/syncer/rsync/push.rb +10 -5
- data/lib/backup/version.rb +1 -1
- data/spec-live/.gitignore +6 -0
- data/spec-live/README +7 -0
- data/spec-live/backups/config.rb +153 -0
- data/spec-live/backups/config.yml.template +43 -0
- data/spec-live/compressor/custom_spec.rb +30 -0
- data/spec-live/compressor/gzip_spec.rb +30 -0
- data/spec-live/notifier/mail_spec.rb +85 -0
- data/spec-live/spec_helper.rb +85 -0
- data/spec-live/storage/dropbox_spec.rb +151 -0
- data/spec-live/storage/local_spec.rb +83 -0
- data/spec-live/storage/scp_spec.rb +193 -0
- data/spec-live/syncer/cloud/s3_spec.rb +124 -0
- data/spec/archive_spec.rb +86 -31
- data/spec/cleaner_spec.rb +8 -0
- data/spec/cli/helpers_spec.rb +200 -75
- data/spec/cli/utility_spec.rb +11 -3
- data/spec/compressor/base_spec.rb +31 -10
- data/spec/compressor/bzip2_spec.rb +212 -57
- data/spec/compressor/custom_spec.rb +106 -0
- data/spec/compressor/gzip_spec.rb +212 -57
- data/spec/compressor/lzma_spec.rb +75 -35
- data/spec/compressor/pbzip2_spec.rb +93 -52
- data/spec/configuration/helpers_spec.rb +406 -0
- data/spec/configuration/store_spec.rb +39 -0
- data/spec/configuration_spec.rb +62 -0
- data/spec/database/base_spec.rb +19 -10
- data/spec/database/mongodb_spec.rb +195 -70
- data/spec/database/mysql_spec.rb +183 -64
- data/spec/database/postgresql_spec.rb +167 -53
- data/spec/database/redis_spec.rb +121 -46
- data/spec/database/riak_spec.rb +96 -27
- data/spec/dependency_spec.rb +2 -0
- data/spec/encryptor/base_spec.rb +10 -0
- data/spec/encryptor/gpg_spec.rb +29 -13
- data/spec/encryptor/open_ssl_spec.rb +40 -21
- data/spec/logger_spec.rb +4 -0
- data/spec/model_spec.rb +19 -2
- data/spec/notifier/base_spec.rb +32 -17
- data/spec/notifier/campfire_spec.rb +63 -45
- data/spec/notifier/hipchat_spec.rb +79 -56
- data/spec/notifier/mail_spec.rb +82 -46
- data/spec/notifier/prowl_spec.rb +53 -32
- data/spec/notifier/twitter_spec.rb +62 -41
- data/spec/packager_spec.rb +95 -36
- data/spec/pipeline_spec.rb +259 -0
- data/spec/spec_helper.rb +6 -5
- data/spec/storage/base_spec.rb +61 -41
- data/spec/storage/cloudfiles_spec.rb +69 -45
- data/spec/storage/dropbox_spec.rb +158 -36
- data/spec/storage/ftp_spec.rb +69 -45
- data/spec/storage/local_spec.rb +47 -23
- data/spec/storage/ninefold_spec.rb +55 -31
- data/spec/storage/rsync_spec.rb +67 -50
- data/spec/storage/s3_spec.rb +65 -41
- data/spec/storage/scp_spec.rb +65 -41
- data/spec/storage/sftp_spec.rb +65 -41
- data/spec/syncer/base_spec.rb +91 -4
- data/spec/syncer/cloud/base_spec.rb +511 -0
- data/spec/syncer/cloud/cloud_files_spec.rb +181 -0
- data/spec/syncer/cloud/s3_spec.rb +174 -0
- data/spec/syncer/rsync/base_spec.rb +46 -66
- data/spec/syncer/rsync/local_spec.rb +55 -26
- data/spec/syncer/rsync/pull_spec.rb +15 -4
- data/spec/syncer/rsync/push_spec.rb +59 -52
- data/templates/cli/utility/compressor/bzip2 +1 -4
- data/templates/cli/utility/compressor/custom +11 -0
- data/templates/cli/utility/compressor/gzip +1 -4
- data/templates/cli/utility/compressor/lzma +3 -0
- data/templates/cli/utility/compressor/pbzip2 +3 -0
- data/templates/cli/utility/database/mysql +4 -1
- data/templates/cli/utility/syncer/cloud_files +17 -19
- data/templates/cli/utility/syncer/s3 +18 -20
- metadata +38 -92
- data/lib/backup/configuration/base.rb +0 -15
- data/lib/backup/configuration/compressor/base.rb +0 -9
- data/lib/backup/configuration/compressor/bzip2.rb +0 -23
- data/lib/backup/configuration/compressor/gzip.rb +0 -23
- data/lib/backup/configuration/compressor/lzma.rb +0 -23
- data/lib/backup/configuration/compressor/pbzip2.rb +0 -28
- data/lib/backup/configuration/database/base.rb +0 -19
- data/lib/backup/configuration/database/mongodb.rb +0 -49
- data/lib/backup/configuration/database/mysql.rb +0 -42
- data/lib/backup/configuration/database/postgresql.rb +0 -41
- data/lib/backup/configuration/database/redis.rb +0 -39
- data/lib/backup/configuration/database/riak.rb +0 -29
- data/lib/backup/configuration/encryptor/base.rb +0 -9
- data/lib/backup/configuration/encryptor/gpg.rb +0 -17
- data/lib/backup/configuration/encryptor/open_ssl.rb +0 -32
- data/lib/backup/configuration/notifier/base.rb +0 -28
- data/lib/backup/configuration/notifier/campfire.rb +0 -25
- data/lib/backup/configuration/notifier/hipchat.rb +0 -41
- data/lib/backup/configuration/notifier/mail.rb +0 -112
- data/lib/backup/configuration/notifier/presently.rb +0 -25
- data/lib/backup/configuration/notifier/prowl.rb +0 -23
- data/lib/backup/configuration/notifier/twitter.rb +0 -21
- data/lib/backup/configuration/storage/base.rb +0 -18
- data/lib/backup/configuration/storage/cloudfiles.rb +0 -25
- data/lib/backup/configuration/storage/dropbox.rb +0 -58
- data/lib/backup/configuration/storage/ftp.rb +0 -29
- data/lib/backup/configuration/storage/local.rb +0 -17
- data/lib/backup/configuration/storage/ninefold.rb +0 -20
- data/lib/backup/configuration/storage/rsync.rb +0 -29
- data/lib/backup/configuration/storage/s3.rb +0 -25
- data/lib/backup/configuration/storage/scp.rb +0 -25
- data/lib/backup/configuration/storage/sftp.rb +0 -25
- data/lib/backup/configuration/syncer/base.rb +0 -10
- data/lib/backup/configuration/syncer/cloud.rb +0 -23
- data/lib/backup/configuration/syncer/cloud_files.rb +0 -30
- data/lib/backup/configuration/syncer/rsync/base.rb +0 -28
- data/lib/backup/configuration/syncer/rsync/local.rb +0 -11
- data/lib/backup/configuration/syncer/rsync/pull.rb +0 -11
- data/lib/backup/configuration/syncer/rsync/push.rb +0 -31
- data/lib/backup/configuration/syncer/s3.rb +0 -23
- data/lib/backup/notifier/presently.rb +0 -88
- data/lib/backup/syncer/cloud.rb +0 -187
- data/lib/backup/syncer/cloud_files.rb +0 -56
- data/lib/backup/syncer/s3.rb +0 -47
- data/spec/configuration/base_spec.rb +0 -35
- data/spec/configuration/compressor/bzip2_spec.rb +0 -29
- data/spec/configuration/compressor/gzip_spec.rb +0 -29
- data/spec/configuration/compressor/lzma_spec.rb +0 -29
- data/spec/configuration/compressor/pbzip2_spec.rb +0 -32
- data/spec/configuration/database/base_spec.rb +0 -17
- data/spec/configuration/database/mongodb_spec.rb +0 -56
- data/spec/configuration/database/mysql_spec.rb +0 -53
- data/spec/configuration/database/postgresql_spec.rb +0 -53
- data/spec/configuration/database/redis_spec.rb +0 -50
- data/spec/configuration/database/riak_spec.rb +0 -35
- data/spec/configuration/encryptor/gpg_spec.rb +0 -26
- data/spec/configuration/encryptor/open_ssl_spec.rb +0 -35
- data/spec/configuration/notifier/base_spec.rb +0 -32
- data/spec/configuration/notifier/campfire_spec.rb +0 -32
- data/spec/configuration/notifier/hipchat_spec.rb +0 -44
- data/spec/configuration/notifier/mail_spec.rb +0 -71
- data/spec/configuration/notifier/presently_spec.rb +0 -35
- data/spec/configuration/notifier/prowl_spec.rb +0 -29
- data/spec/configuration/notifier/twitter_spec.rb +0 -35
- data/spec/configuration/storage/cloudfiles_spec.rb +0 -41
- data/spec/configuration/storage/dropbox_spec.rb +0 -38
- data/spec/configuration/storage/ftp_spec.rb +0 -44
- data/spec/configuration/storage/local_spec.rb +0 -29
- data/spec/configuration/storage/ninefold_spec.rb +0 -32
- data/spec/configuration/storage/rsync_spec.rb +0 -41
- data/spec/configuration/storage/s3_spec.rb +0 -38
- data/spec/configuration/storage/scp_spec.rb +0 -41
- data/spec/configuration/storage/sftp_spec.rb +0 -41
- data/spec/configuration/syncer/cloud_files_spec.rb +0 -44
- data/spec/configuration/syncer/rsync/base_spec.rb +0 -33
- data/spec/configuration/syncer/rsync/local_spec.rb +0 -10
- data/spec/configuration/syncer/rsync/pull_spec.rb +0 -10
- data/spec/configuration/syncer/rsync/push_spec.rb +0 -43
- data/spec/configuration/syncer/s3_spec.rb +0 -38
- data/spec/notifier/presently_spec.rb +0 -181
- data/spec/syncer/cloud_files_spec.rb +0 -192
- data/spec/syncer/s3_spec.rb +0 -192
- data/templates/cli/utility/notifier/presently +0 -13
@@ -1,35 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
require File.expand_path('../../../spec_helper.rb', __FILE__)
|
4
|
-
|
5
|
-
describe Backup::Configuration::Encryptor::OpenSSL do
|
6
|
-
before do
|
7
|
-
Backup::Configuration::Encryptor::OpenSSL.defaults do |encryptor|
|
8
|
-
encryptor.password = 'my_password'
|
9
|
-
encryptor.password_file = nil
|
10
|
-
encryptor.base64 = true
|
11
|
-
encryptor.salt = true
|
12
|
-
end
|
13
|
-
end
|
14
|
-
after { Backup::Configuration::Encryptor::OpenSSL.clear_defaults! }
|
15
|
-
|
16
|
-
it 'should set the default encryptor configuration' do
|
17
|
-
encryptor = Backup::Configuration::Encryptor::OpenSSL
|
18
|
-
encryptor.password.should == 'my_password'
|
19
|
-
encryptor.password_file.should == nil
|
20
|
-
encryptor.base64.should == true
|
21
|
-
encryptor.salt.should == true
|
22
|
-
end
|
23
|
-
|
24
|
-
describe '#clear_defaults!' do
|
25
|
-
it 'should clear all the defaults, resetting them to nil' do
|
26
|
-
Backup::Configuration::Encryptor::OpenSSL.clear_defaults!
|
27
|
-
|
28
|
-
encryptor = Backup::Configuration::Encryptor::OpenSSL
|
29
|
-
encryptor.password.should == nil
|
30
|
-
encryptor.password_file.should == nil
|
31
|
-
encryptor.base64.should == nil
|
32
|
-
encryptor.salt.should == nil
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
@@ -1,32 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
require File.expand_path('../../../spec_helper.rb', __FILE__)
|
4
|
-
|
5
|
-
describe Backup::Configuration::Notifier::Base do
|
6
|
-
before do
|
7
|
-
Backup::Configuration::Notifier::Base.defaults do |base|
|
8
|
-
base.on_success = 'on_success'
|
9
|
-
base.on_warning = 'on_warning'
|
10
|
-
base.on_failure = 'on_failure'
|
11
|
-
end
|
12
|
-
end
|
13
|
-
after { Backup::Configuration::Notifier::Base.clear_defaults! }
|
14
|
-
|
15
|
-
it 'should set the default campfire configuration' do
|
16
|
-
base = Backup::Configuration::Notifier::Base
|
17
|
-
base.on_success.should == 'on_success'
|
18
|
-
base.on_warning.should == 'on_warning'
|
19
|
-
base.on_failure.should == 'on_failure'
|
20
|
-
end
|
21
|
-
|
22
|
-
describe '#clear_defaults!' do
|
23
|
-
it 'should clear all the defaults, resetting them to nil' do
|
24
|
-
Backup::Configuration::Notifier::Base.clear_defaults!
|
25
|
-
|
26
|
-
base = Backup::Configuration::Notifier::Base
|
27
|
-
base.on_success.should be_nil
|
28
|
-
base.on_warning.should be_nil
|
29
|
-
base.on_failure.should be_nil
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
@@ -1,32 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
require File.expand_path('../../../spec_helper.rb', __FILE__)
|
4
|
-
|
5
|
-
describe Backup::Configuration::Notifier::Campfire do
|
6
|
-
before do
|
7
|
-
Backup::Configuration::Notifier::Campfire.defaults do |campfire|
|
8
|
-
campfire.api_token = 'my_api_authentication_token'
|
9
|
-
campfire.subdomain = 'my_subdomain'
|
10
|
-
campfire.room_id = 'my_room_id'
|
11
|
-
end
|
12
|
-
end
|
13
|
-
after { Backup::Configuration::Notifier::Campfire.clear_defaults! }
|
14
|
-
|
15
|
-
it 'should set the default campfire configuration' do
|
16
|
-
campfire = Backup::Configuration::Notifier::Campfire
|
17
|
-
campfire.api_token.should == 'my_api_authentication_token'
|
18
|
-
campfire.subdomain.should == 'my_subdomain'
|
19
|
-
campfire.room_id.should == 'my_room_id'
|
20
|
-
end
|
21
|
-
|
22
|
-
describe '#clear_defaults!' do
|
23
|
-
it 'should clear all the defaults, resetting them to nil' do
|
24
|
-
Backup::Configuration::Notifier::Campfire.clear_defaults!
|
25
|
-
|
26
|
-
campfire = Backup::Configuration::Notifier::Campfire
|
27
|
-
campfire.api_token.should == nil
|
28
|
-
campfire.subdomain.should == nil
|
29
|
-
campfire.room_id.should == nil
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
@@ -1,44 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
require File.expand_path('../../../spec_helper.rb', __FILE__)
|
4
|
-
|
5
|
-
describe Backup::Configuration::Notifier::Hipchat do
|
6
|
-
before do
|
7
|
-
Backup::Configuration::Notifier::Hipchat.defaults do |hipchat|
|
8
|
-
hipchat.token = 'token'
|
9
|
-
hipchat.from = 'DB Backup'
|
10
|
-
hipchat.rooms_notified = ['activity']
|
11
|
-
hipchat.success_color = 'green'
|
12
|
-
hipchat.warning_color = 'yellow'
|
13
|
-
hipchat.failure_color = 'red'
|
14
|
-
hipchat.notify_users = true
|
15
|
-
end
|
16
|
-
end
|
17
|
-
after { Backup::Configuration::Notifier::Hipchat.clear_defaults! }
|
18
|
-
|
19
|
-
it 'should set the default tweet configuration' do
|
20
|
-
hipchat = Backup::Configuration::Notifier::Hipchat
|
21
|
-
hipchat.token.should == 'token'
|
22
|
-
hipchat.from.should == 'DB Backup'
|
23
|
-
hipchat.rooms_notified.should == ['activity']
|
24
|
-
hipchat.success_color.should == 'green'
|
25
|
-
hipchat.warning_color.should == 'yellow'
|
26
|
-
hipchat.failure_color.should == 'red'
|
27
|
-
hipchat.notify_users.should == true
|
28
|
-
end
|
29
|
-
|
30
|
-
describe '#clear_defaults!' do
|
31
|
-
it 'should clear all the defaults, resetting them to nil' do
|
32
|
-
Backup::Configuration::Notifier::Hipchat.clear_defaults!
|
33
|
-
|
34
|
-
hipchat = Backup::Configuration::Notifier::Hipchat
|
35
|
-
hipchat.token.should == nil
|
36
|
-
hipchat.from.should == nil
|
37
|
-
hipchat.rooms_notified.should == nil
|
38
|
-
hipchat.success_color.should == nil
|
39
|
-
hipchat.warning_color.should == nil
|
40
|
-
hipchat.failure_color.should == nil
|
41
|
-
hipchat.notify_users.should == nil
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
@@ -1,71 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
require File.expand_path('../../../spec_helper.rb', __FILE__)
|
4
|
-
|
5
|
-
describe Backup::Configuration::Notifier::Mail do
|
6
|
-
before do
|
7
|
-
Backup::Configuration::Notifier::Mail.defaults do |mail|
|
8
|
-
mail.delivery_method = :file
|
9
|
-
mail.from = 'my.sender.email@gmail.com'
|
10
|
-
mail.to = 'my.receiver.email@gmail.com'
|
11
|
-
mail.address = 'smtp.gmail.com'
|
12
|
-
mail.port = 587
|
13
|
-
mail.domain = 'your.host.name'
|
14
|
-
mail.user_name = 'user'
|
15
|
-
mail.password = 'secret'
|
16
|
-
mail.authentication = 'plain'
|
17
|
-
mail.enable_starttls_auto = true
|
18
|
-
mail.openssl_verify_mode = 'none'
|
19
|
-
mail.sendmail = '/path/to/sendmail'
|
20
|
-
mail.sendmail_args = '-i -t -X/tmp/traffic.log'
|
21
|
-
mail.exim = '/path/to/exim'
|
22
|
-
mail.exim_args = '-i -t -X/tmp/traffic.log'
|
23
|
-
mail.mail_folder = '/path/to/backup/mails'
|
24
|
-
end
|
25
|
-
end
|
26
|
-
after { Backup::Configuration::Notifier::Mail.clear_defaults! }
|
27
|
-
|
28
|
-
it 'should set the default Mail configuration' do
|
29
|
-
mail = Backup::Configuration::Notifier::Mail
|
30
|
-
mail.delivery_method.should == :file
|
31
|
-
mail.from.should == 'my.sender.email@gmail.com'
|
32
|
-
mail.to.should == 'my.receiver.email@gmail.com'
|
33
|
-
mail.address.should == 'smtp.gmail.com'
|
34
|
-
mail.port.should == 587
|
35
|
-
mail.domain.should == 'your.host.name'
|
36
|
-
mail.user_name.should == 'user'
|
37
|
-
mail.password.should == 'secret'
|
38
|
-
mail.authentication.should == 'plain'
|
39
|
-
mail.enable_starttls_auto.should == true
|
40
|
-
mail.openssl_verify_mode.should == 'none'
|
41
|
-
mail.sendmail.should == '/path/to/sendmail'
|
42
|
-
mail.sendmail_args.should == '-i -t -X/tmp/traffic.log'
|
43
|
-
mail.exim.should == '/path/to/exim'
|
44
|
-
mail.exim_args.should == '-i -t -X/tmp/traffic.log'
|
45
|
-
mail.mail_folder.should == '/path/to/backup/mails'
|
46
|
-
end
|
47
|
-
|
48
|
-
describe '#clear_defaults!' do
|
49
|
-
it 'should clear all the defaults, resetting them to nil' do
|
50
|
-
Backup::Configuration::Notifier::Mail.clear_defaults!
|
51
|
-
|
52
|
-
mail = Backup::Configuration::Notifier::Mail
|
53
|
-
mail.delivery_method.should == nil
|
54
|
-
mail.from.should == nil
|
55
|
-
mail.to.should == nil
|
56
|
-
mail.address.should == nil
|
57
|
-
mail.port.should == nil
|
58
|
-
mail.domain.should == nil
|
59
|
-
mail.user_name.should == nil
|
60
|
-
mail.password.should == nil
|
61
|
-
mail.authentication.should == nil
|
62
|
-
mail.enable_starttls_auto.should == nil
|
63
|
-
mail.openssl_verify_mode.should == nil
|
64
|
-
mail.sendmail.should == nil
|
65
|
-
mail.sendmail_args.should == nil
|
66
|
-
mail.exim.should == nil
|
67
|
-
mail.exim_args.should == nil
|
68
|
-
mail.mail_folder.should == nil
|
69
|
-
end
|
70
|
-
end
|
71
|
-
end
|
@@ -1,35 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
require File.expand_path('../../../spec_helper.rb', __FILE__)
|
4
|
-
|
5
|
-
describe Backup::Configuration::Notifier::Presently do
|
6
|
-
before do
|
7
|
-
Backup::Configuration::Notifier::Presently.defaults do |presently|
|
8
|
-
presently.subdomain = 'my_subdomain'
|
9
|
-
presently.user_name = 'my_user_name'
|
10
|
-
presently.password = 'my_password'
|
11
|
-
presently.group_id = 'my_group_id'
|
12
|
-
end
|
13
|
-
end
|
14
|
-
after { Backup::Configuration::Notifier::Presently.clear_defaults! }
|
15
|
-
|
16
|
-
it 'should set the default tweet configuration' do
|
17
|
-
presently = Backup::Configuration::Notifier::Presently
|
18
|
-
presently.subdomain.should == 'my_subdomain'
|
19
|
-
presently.user_name.should == 'my_user_name'
|
20
|
-
presently.password.should == 'my_password'
|
21
|
-
presently.group_id.should == 'my_group_id'
|
22
|
-
end
|
23
|
-
|
24
|
-
describe '#clear_defaults!' do
|
25
|
-
it 'should clear all the defaults, resetting them to nil' do
|
26
|
-
Backup::Configuration::Notifier::Presently.clear_defaults!
|
27
|
-
|
28
|
-
presently = Backup::Configuration::Notifier::Presently
|
29
|
-
presently.subdomain.should == nil
|
30
|
-
presently.user_name.should == nil
|
31
|
-
presently.password.should == nil
|
32
|
-
presently.group_id.should == nil
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
@@ -1,29 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
require File.expand_path('../../../spec_helper.rb', __FILE__)
|
4
|
-
|
5
|
-
describe Backup::Configuration::Notifier::Prowl do
|
6
|
-
before do
|
7
|
-
Backup::Configuration::Notifier::Prowl.defaults do |prowl|
|
8
|
-
prowl.application = 'my_application'
|
9
|
-
prowl.api_key = 'my_api_key'
|
10
|
-
end
|
11
|
-
end
|
12
|
-
after { Backup::Configuration::Notifier::Prowl.clear_defaults! }
|
13
|
-
|
14
|
-
it 'should set the default tweet configuration' do
|
15
|
-
prowl = Backup::Configuration::Notifier::Prowl
|
16
|
-
prowl.application.should == 'my_application'
|
17
|
-
prowl.api_key.should == 'my_api_key'
|
18
|
-
end
|
19
|
-
|
20
|
-
describe '#clear_defaults!' do
|
21
|
-
it 'should clear all the defaults, resetting them to nil' do
|
22
|
-
Backup::Configuration::Notifier::Prowl.clear_defaults!
|
23
|
-
|
24
|
-
prowl = Backup::Configuration::Notifier::Prowl
|
25
|
-
prowl.application.should == nil
|
26
|
-
prowl.api_key.should == nil
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
@@ -1,35 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
require File.expand_path('../../../spec_helper.rb', __FILE__)
|
4
|
-
|
5
|
-
describe Backup::Configuration::Notifier::Twitter do
|
6
|
-
before do
|
7
|
-
Backup::Configuration::Notifier::Twitter.defaults do |tweet|
|
8
|
-
tweet.consumer_key = 'my_consumer_key'
|
9
|
-
tweet.consumer_secret = 'my_consumer_secret'
|
10
|
-
tweet.oauth_token = 'my_oauth_token'
|
11
|
-
tweet.oauth_token_secret = 'my_oauth_token_secret'
|
12
|
-
end
|
13
|
-
end
|
14
|
-
after { Backup::Configuration::Notifier::Twitter.clear_defaults! }
|
15
|
-
|
16
|
-
it 'should set the default tweet configuration' do
|
17
|
-
tweet = Backup::Configuration::Notifier::Twitter
|
18
|
-
tweet.consumer_key.should == 'my_consumer_key'
|
19
|
-
tweet.consumer_secret.should == 'my_consumer_secret'
|
20
|
-
tweet.oauth_token.should == 'my_oauth_token'
|
21
|
-
tweet.oauth_token_secret.should == 'my_oauth_token_secret'
|
22
|
-
end
|
23
|
-
|
24
|
-
describe '#clear_defaults!' do
|
25
|
-
it 'should clear all the defaults, resetting them to nil' do
|
26
|
-
Backup::Configuration::Notifier::Twitter.clear_defaults!
|
27
|
-
|
28
|
-
tweet = Backup::Configuration::Notifier::Twitter
|
29
|
-
tweet.consumer_key.should == nil
|
30
|
-
tweet.consumer_secret.should == nil
|
31
|
-
tweet.oauth_token.should == nil
|
32
|
-
tweet.oauth_token_secret.should == nil
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
@@ -1,41 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
require File.expand_path('../../../spec_helper.rb', __FILE__)
|
4
|
-
|
5
|
-
describe Backup::Configuration::Storage::CloudFiles do
|
6
|
-
before do
|
7
|
-
Backup::Configuration::Storage::CloudFiles.defaults do |cf|
|
8
|
-
cf.username = 'my_username'
|
9
|
-
cf.api_key = 'my_api_key'
|
10
|
-
cf.container = 'my_container'
|
11
|
-
cf.path = 'my_backups'
|
12
|
-
cf.auth_url = 'lon.auth.api.rackspacecloud.com'
|
13
|
-
cf.servicenet = true
|
14
|
-
end
|
15
|
-
end
|
16
|
-
after { Backup::Configuration::Storage::CloudFiles.clear_defaults! }
|
17
|
-
|
18
|
-
it 'should set the default Cloud Files configuration' do
|
19
|
-
cf = Backup::Configuration::Storage::CloudFiles
|
20
|
-
cf.username.should == 'my_username'
|
21
|
-
cf.api_key.should == 'my_api_key'
|
22
|
-
cf.container.should == 'my_container'
|
23
|
-
cf.path.should == 'my_backups'
|
24
|
-
cf.auth_url.should == 'lon.auth.api.rackspacecloud.com'
|
25
|
-
cf.servicenet.should == true
|
26
|
-
end
|
27
|
-
|
28
|
-
describe '#clear_defaults!' do
|
29
|
-
it 'should clear all the defaults, resetting them to nil' do
|
30
|
-
Backup::Configuration::Storage::CloudFiles.clear_defaults!
|
31
|
-
|
32
|
-
cf = Backup::Configuration::Storage::CloudFiles
|
33
|
-
cf.username.should == nil
|
34
|
-
cf.api_key.should == nil
|
35
|
-
cf.container.should == nil
|
36
|
-
cf.path.should == nil
|
37
|
-
cf.auth_url.should == nil
|
38
|
-
cf.servicenet.should == nil
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
@@ -1,38 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
require File.expand_path('../../../spec_helper.rb', __FILE__)
|
4
|
-
|
5
|
-
describe Backup::Configuration::Storage::Dropbox do
|
6
|
-
before do
|
7
|
-
Backup::Configuration::Storage::Dropbox.defaults do |db|
|
8
|
-
db.api_key = 'my_api_key'
|
9
|
-
db.api_secret = 'my_secret'
|
10
|
-
db.access_type = 'my_access_type'
|
11
|
-
db.path = 'my_backups'
|
12
|
-
db.keep = 20
|
13
|
-
end
|
14
|
-
end
|
15
|
-
after { Backup::Configuration::Storage::Dropbox.clear_defaults! }
|
16
|
-
|
17
|
-
it 'should set the default Dropbox configuration' do
|
18
|
-
db = Backup::Configuration::Storage::Dropbox
|
19
|
-
db.api_key.should == 'my_api_key'
|
20
|
-
db.api_secret.should == 'my_secret'
|
21
|
-
db.access_type.should == 'my_access_type'
|
22
|
-
db.path.should == 'my_backups'
|
23
|
-
db.keep.should == 20
|
24
|
-
end
|
25
|
-
|
26
|
-
describe '#clear_defaults!' do
|
27
|
-
it 'should clear all the defaults, resetting them to nil' do
|
28
|
-
Backup::Configuration::Storage::Dropbox.clear_defaults!
|
29
|
-
|
30
|
-
db = Backup::Configuration::Storage::Dropbox
|
31
|
-
db.api_key.should == nil
|
32
|
-
db.api_secret.should == nil
|
33
|
-
db.access_type.should == nil
|
34
|
-
db.path.should == nil
|
35
|
-
db.keep.should == nil
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
@@ -1,44 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
require File.expand_path('../../../spec_helper.rb', __FILE__)
|
4
|
-
|
5
|
-
describe Backup::Configuration::Storage::FTP do
|
6
|
-
before do
|
7
|
-
Backup::Configuration::Storage::FTP.defaults do |ftp|
|
8
|
-
ftp.username = 'my_username'
|
9
|
-
ftp.password = 'my_password'
|
10
|
-
ftp.ip = '123.45.678.90'
|
11
|
-
ftp.port = 21
|
12
|
-
ftp.path = 'my_backups'
|
13
|
-
ftp.keep = 20
|
14
|
-
ftp.passive_mode = false
|
15
|
-
end
|
16
|
-
end
|
17
|
-
after { Backup::Configuration::Storage::FTP.clear_defaults! }
|
18
|
-
|
19
|
-
it 'should set the default ftp configuration' do
|
20
|
-
ftp = Backup::Configuration::Storage::FTP
|
21
|
-
ftp.username.should == 'my_username'
|
22
|
-
ftp.password.should == 'my_password'
|
23
|
-
ftp.ip.should == '123.45.678.90'
|
24
|
-
ftp.port.should == 21
|
25
|
-
ftp.path.should == 'my_backups'
|
26
|
-
ftp.keep.should == 20
|
27
|
-
ftp.passive_mode == false
|
28
|
-
end
|
29
|
-
|
30
|
-
describe '#clear_defaults!' do
|
31
|
-
it 'should clear all the defaults, resetting them to nil' do
|
32
|
-
Backup::Configuration::Storage::FTP.clear_defaults!
|
33
|
-
|
34
|
-
ftp = Backup::Configuration::Storage::FTP
|
35
|
-
ftp.username.should == nil
|
36
|
-
ftp.password.should == nil
|
37
|
-
ftp.ip.should == nil
|
38
|
-
ftp.port.should == nil
|
39
|
-
ftp.path.should == nil
|
40
|
-
ftp.keep.should == nil
|
41
|
-
ftp.passive_mode.should == nil
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|