backup 3.0.2 → 3.0.3.build.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.
- data/bin/backup +12 -190
- metadata +7 -191
- data/.gitignore +0 -2
- data/.infinity_test +0 -7
- data/.rspec +0 -3
- data/Gemfile +0 -17
- data/Gemfile.lock +0 -88
- data/LICENSE.md +0 -24
- data/README.md +0 -236
- data/backup.gemspec +0 -41
- data/lib/backup.rb +0 -148
- data/lib/backup/archive.rb +0 -54
- data/lib/backup/cli.rb +0 -50
- data/lib/backup/compressor/base.rb +0 -17
- data/lib/backup/compressor/gzip.rb +0 -61
- data/lib/backup/configuration/base.rb +0 -15
- data/lib/backup/configuration/compressor/base.rb +0 -10
- data/lib/backup/configuration/compressor/gzip.rb +0 -23
- data/lib/backup/configuration/database/base.rb +0 -18
- data/lib/backup/configuration/database/mongodb.rb +0 -37
- data/lib/backup/configuration/database/mysql.rb +0 -37
- data/lib/backup/configuration/database/postgresql.rb +0 -37
- data/lib/backup/configuration/database/redis.rb +0 -35
- data/lib/backup/configuration/encryptor/base.rb +0 -10
- data/lib/backup/configuration/encryptor/gpg.rb +0 -17
- data/lib/backup/configuration/encryptor/open_ssl.rb +0 -26
- data/lib/backup/configuration/helpers.rb +0 -54
- data/lib/backup/configuration/notifier/base.rb +0 -39
- data/lib/backup/configuration/notifier/mail.rb +0 -52
- data/lib/backup/configuration/storage/base.rb +0 -18
- data/lib/backup/configuration/storage/cloudfiles.rb +0 -21
- data/lib/backup/configuration/storage/dropbox.rb +0 -25
- data/lib/backup/configuration/storage/ftp.rb +0 -25
- data/lib/backup/configuration/storage/rsync.rb +0 -25
- 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/database/base.rb +0 -33
- data/lib/backup/database/mongodb.rb +0 -137
- data/lib/backup/database/mysql.rb +0 -104
- data/lib/backup/database/postgresql.rb +0 -111
- data/lib/backup/database/redis.rb +0 -105
- data/lib/backup/encryptor/base.rb +0 -17
- data/lib/backup/encryptor/gpg.rb +0 -78
- data/lib/backup/encryptor/open_ssl.rb +0 -67
- data/lib/backup/finder.rb +0 -39
- data/lib/backup/logger.rb +0 -80
- data/lib/backup/model.rb +0 -249
- data/lib/backup/notifier/base.rb +0 -29
- data/lib/backup/notifier/binder.rb +0 -32
- data/lib/backup/notifier/mail.rb +0 -141
- data/lib/backup/notifier/templates/notify_failure.erb +0 -31
- data/lib/backup/notifier/templates/notify_success.erb +0 -16
- data/lib/backup/storage/base.rb +0 -67
- data/lib/backup/storage/cloudfiles.rb +0 -95
- data/lib/backup/storage/dropbox.rb +0 -82
- data/lib/backup/storage/ftp.rb +0 -114
- data/lib/backup/storage/object.rb +0 -45
- data/lib/backup/storage/rsync.rb +0 -100
- data/lib/backup/storage/s3.rb +0 -108
- data/lib/backup/storage/scp.rb +0 -105
- data/lib/backup/storage/sftp.rb +0 -106
- data/lib/backup/version.rb +0 -72
- data/lib/templates/archive +0 -4
- data/lib/templates/compressor/gzip +0 -4
- data/lib/templates/database/mongodb +0 -10
- data/lib/templates/database/mysql +0 -11
- data/lib/templates/database/postgresql +0 -11
- data/lib/templates/database/redis +0 -10
- data/lib/templates/encryptor/gpg +0 -9
- data/lib/templates/encryptor/openssl +0 -5
- data/lib/templates/notifier/mail +0 -14
- data/lib/templates/readme +0 -15
- data/lib/templates/storage/cloudfiles +0 -7
- data/lib/templates/storage/dropbox +0 -8
- data/lib/templates/storage/ftp +0 -8
- data/lib/templates/storage/rsync +0 -7
- data/lib/templates/storage/s3 +0 -8
- data/lib/templates/storage/scp +0 -8
- data/lib/templates/storage/sftp +0 -8
- data/spec/archive_spec.rb +0 -53
- data/spec/backup_spec.rb +0 -11
- data/spec/compressor/gzip_spec.rb +0 -59
- data/spec/configuration/base_spec.rb +0 -35
- data/spec/configuration/compressor/gzip_spec.rb +0 -28
- data/spec/configuration/database/base_spec.rb +0 -16
- data/spec/configuration/database/mongodb_spec.rb +0 -30
- data/spec/configuration/database/mysql_spec.rb +0 -32
- data/spec/configuration/database/postgresql_spec.rb +0 -32
- data/spec/configuration/database/redis_spec.rb +0 -30
- data/spec/configuration/encryptor/gpg_spec.rb +0 -25
- data/spec/configuration/encryptor/open_ssl_spec.rb +0 -31
- data/spec/configuration/notifier/mail_spec.rb +0 -32
- data/spec/configuration/storage/cloudfiles_spec.rb +0 -34
- data/spec/configuration/storage/dropbox_spec.rb +0 -40
- data/spec/configuration/storage/ftp_spec.rb +0 -40
- data/spec/configuration/storage/rsync_spec.rb +0 -37
- data/spec/configuration/storage/s3_spec.rb +0 -37
- data/spec/configuration/storage/scp_spec.rb +0 -40
- data/spec/configuration/storage/sftp_spec.rb +0 -40
- data/spec/database/base_spec.rb +0 -30
- data/spec/database/mongodb_spec.rb +0 -144
- data/spec/database/mysql_spec.rb +0 -150
- data/spec/database/postgresql_spec.rb +0 -164
- data/spec/database/redis_spec.rb +0 -122
- data/spec/encryptor/gpg_spec.rb +0 -57
- data/spec/encryptor/open_ssl_spec.rb +0 -102
- data/spec/logger_spec.rb +0 -37
- data/spec/model_spec.rb +0 -236
- data/spec/notifier/mail_spec.rb +0 -97
- data/spec/spec_helper.rb +0 -21
- data/spec/storage/base_spec.rb +0 -33
- data/spec/storage/cloudfiles_spec.rb +0 -102
- data/spec/storage/dropbox_spec.rb +0 -89
- data/spec/storage/ftp_spec.rb +0 -133
- data/spec/storage/object_spec.rb +0 -74
- data/spec/storage/rsync_spec.rb +0 -115
- data/spec/storage/s3_spec.rb +0 -110
- data/spec/storage/scp_spec.rb +0 -129
- data/spec/storage/sftp_spec.rb +0 -125
- data/spec/version_spec.rb +0 -32
data/lib/templates/archive
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
database MongoDB do |db|
|
|
2
|
-
db.name = "my_database_name"
|
|
3
|
-
db.username = "my_username"
|
|
4
|
-
db.password = "my_password"
|
|
5
|
-
db.host = "localhost"
|
|
6
|
-
db.port = 5432
|
|
7
|
-
db.ipv6 = false
|
|
8
|
-
db.only_collections = ['only', 'these' 'collections']
|
|
9
|
-
db.additional_options = []
|
|
10
|
-
end
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
database MySQL do |db|
|
|
2
|
-
db.name = "my_database_name"
|
|
3
|
-
db.username = "my_username"
|
|
4
|
-
db.password = "my_password"
|
|
5
|
-
db.host = "localhost"
|
|
6
|
-
db.port = 3306
|
|
7
|
-
db.socket = "/tmp/mysql.sock"
|
|
8
|
-
db.skip_tables = ['skip', 'these', 'tables']
|
|
9
|
-
db.only_tables = ['only', 'these' 'tables']
|
|
10
|
-
db.additional_options = ['--quick', '--single-transaction']
|
|
11
|
-
end
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
database PostgreSQL do |db|
|
|
2
|
-
db.name = "my_database_name"
|
|
3
|
-
db.username = "my_username"
|
|
4
|
-
db.password = "my_password"
|
|
5
|
-
db.host = "localhost"
|
|
6
|
-
db.port = 5432
|
|
7
|
-
db.socket = "/tmp/pg.sock"
|
|
8
|
-
db.skip_tables = ['skip', 'these', 'tables']
|
|
9
|
-
db.only_tables = ['only', 'these' 'tables']
|
|
10
|
-
db.additional_options = ['--quick', '--single-transaction']
|
|
11
|
-
end
|
data/lib/templates/encryptor/gpg
DELETED
data/lib/templates/notifier/mail
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
notify_by Mail do |mail|
|
|
2
|
-
mail.on_success = true
|
|
3
|
-
mail.on_failure = true
|
|
4
|
-
|
|
5
|
-
mail.from = 'sender@email.com'
|
|
6
|
-
mail.to = 'receiver@email.com'
|
|
7
|
-
mail.address = 'smtp.gmail.com'
|
|
8
|
-
mail.port = 587
|
|
9
|
-
mail.domain = 'your.host.name'
|
|
10
|
-
mail.user_name = 'sender@email.com'
|
|
11
|
-
mail.password = 'my_password'
|
|
12
|
-
mail.authentication = 'plain'
|
|
13
|
-
mail.enable_starttls_auto = true
|
|
14
|
-
end
|
data/lib/templates/readme
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
##
|
|
2
|
-
# Backup
|
|
3
|
-
# Generated Template
|
|
4
|
-
#
|
|
5
|
-
# For more information:
|
|
6
|
-
#
|
|
7
|
-
# View the Git repository at https://github.com/meskyanichi/backup
|
|
8
|
-
# View the Wiki/Documentation at https://github.com/meskyanichi/backup/wiki
|
|
9
|
-
# View the issue log at https://github.com/meskyanichi/backup/issues
|
|
10
|
-
#
|
|
11
|
-
# When you're finished configuring this configuration file,
|
|
12
|
-
# you can run it from the command line by issuing the following command:
|
|
13
|
-
#
|
|
14
|
-
# $ backup -t my_backup [-c <path_to_configuration_file>]
|
|
15
|
-
|
data/lib/templates/storage/ftp
DELETED
data/lib/templates/storage/rsync
DELETED
data/lib/templates/storage/s3
DELETED
data/lib/templates/storage/scp
DELETED
data/lib/templates/storage/sftp
DELETED
data/spec/archive_spec.rb
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
# encoding: utf-8
|
|
2
|
-
|
|
3
|
-
require File.dirname(__FILE__) + '/spec_helper'
|
|
4
|
-
|
|
5
|
-
describe Backup::Archive do
|
|
6
|
-
|
|
7
|
-
let(:archive) do
|
|
8
|
-
Backup::Archive.new(:dummy_archive) do |a|
|
|
9
|
-
a.add '/home/rspecuser/somefile'
|
|
10
|
-
a.add '/home/rspecuser/logs/'
|
|
11
|
-
a.add '/home/rspecuser/dotfiles/'
|
|
12
|
-
end
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
it 'should have no paths' do
|
|
16
|
-
archive = Backup::Archive.new(:dummy_archive) { |a| }
|
|
17
|
-
archive.paths.count.should == 0
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
it 'should have 3 paths' do
|
|
21
|
-
archive.paths.count.should == 3
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
it do
|
|
25
|
-
archive.name.should == :dummy_archive
|
|
26
|
-
end
|
|
27
|
-
|
|
28
|
-
describe '#paths_to_package' do
|
|
29
|
-
it 'should return a tar -c friendly string' do
|
|
30
|
-
archive.send(:paths_to_package).should ==
|
|
31
|
-
"'/home/rspecuser/somefile' '/home/rspecuser/logs/' '/home/rspecuser/dotfiles/'"
|
|
32
|
-
end
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
describe '#perform!' do
|
|
36
|
-
before do
|
|
37
|
-
[:mkdir, :run, :utility].each { |method| archive.stubs(method) }
|
|
38
|
-
Backup::Logger.stubs(:message)
|
|
39
|
-
end
|
|
40
|
-
|
|
41
|
-
it 'should tar all the specified paths' do
|
|
42
|
-
archive.expects(:mkdir).with(File.join(Backup::TMP_PATH, Backup::TRIGGER, 'archive'))
|
|
43
|
-
archive.expects(:run).with("tar -c '/home/rspecuser/somefile' '/home/rspecuser/logs/' '/home/rspecuser/dotfiles/' 1> '#{File.join(Backup::TMP_PATH, Backup::TRIGGER, 'archive', "#{:dummy_archive}.tar")}' 2> /dev/null")
|
|
44
|
-
archive.expects(:utility).with(:tar).returns(:tar)
|
|
45
|
-
archive.perform!
|
|
46
|
-
end
|
|
47
|
-
|
|
48
|
-
it 'should log the status' do
|
|
49
|
-
Backup::Logger.expects(:message).with("Backup::Archive started packaging and archiving \"/home/rspecuser/somefile\", \"/home/rspecuser/logs/\", \"/home/rspecuser/dotfiles/\".")
|
|
50
|
-
archive.perform!
|
|
51
|
-
end
|
|
52
|
-
end
|
|
53
|
-
end
|
data/spec/backup_spec.rb
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
# encoding: utf-8
|
|
2
|
-
|
|
3
|
-
require File.dirname(__FILE__) + '/spec_helper'
|
|
4
|
-
|
|
5
|
-
describe Backup do
|
|
6
|
-
it do
|
|
7
|
-
Backup::TMP_PATH.should == File.join(ENV['HOME'], 'Backup', '.tmp')
|
|
8
|
-
Backup::DATA_PATH.should == File.join(ENV['HOME'], 'Backup', 'data')
|
|
9
|
-
Backup::CONFIG_FILE.should == File.join(ENV['HOME'], 'Backup', 'config.rb')
|
|
10
|
-
end
|
|
11
|
-
end
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
# encoding: utf-8
|
|
2
|
-
|
|
3
|
-
require File.dirname(__FILE__) + '/../spec_helper'
|
|
4
|
-
|
|
5
|
-
describe Backup::Compressor::Gzip do
|
|
6
|
-
let(:compressor) { Backup::Compressor::Gzip.new }
|
|
7
|
-
|
|
8
|
-
before do
|
|
9
|
-
Backup::Model.extension = 'tar'
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
describe 'the options' do
|
|
13
|
-
it do
|
|
14
|
-
compressor.send(:best).should == []
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
it do
|
|
18
|
-
compressor.send(:fast).should == []
|
|
19
|
-
end
|
|
20
|
-
end
|
|
21
|
-
|
|
22
|
-
describe '#perform!' do
|
|
23
|
-
before do
|
|
24
|
-
[:run, :utility].each { |method| compressor.stubs(method) }
|
|
25
|
-
Backup::Logger.stubs(:message)
|
|
26
|
-
end
|
|
27
|
-
|
|
28
|
-
it 'should perform the compression' do
|
|
29
|
-
compressor.expects(:utility).with(:gzip).returns(:gzip)
|
|
30
|
-
compressor.expects(:run).with("gzip '#{ File.join(Backup::TMP_PATH, "#{ Backup::TIME }.#{ Backup::TRIGGER }.tar") }'")
|
|
31
|
-
compressor.perform!
|
|
32
|
-
end
|
|
33
|
-
|
|
34
|
-
it 'should perform the compression with the --best and --fast options' do
|
|
35
|
-
compressor = Backup::Compressor::Gzip.new do |c|
|
|
36
|
-
c.best = true
|
|
37
|
-
c.fast = true
|
|
38
|
-
end
|
|
39
|
-
|
|
40
|
-
compressor.stubs(:utility).returns(:gzip)
|
|
41
|
-
compressor.expects(:run).with("gzip --best --fast '#{ File.join(Backup::TMP_PATH, "#{ Backup::TIME }.#{ Backup::TRIGGER }.tar") }'")
|
|
42
|
-
compressor.perform!
|
|
43
|
-
end
|
|
44
|
-
|
|
45
|
-
it 'should set the class variable @extension (Backup::Model.extension) to .gz' do
|
|
46
|
-
compressor.stubs(:utility).returns(:gzip)
|
|
47
|
-
compressor.expects(:run)
|
|
48
|
-
|
|
49
|
-
Backup::Model.extension.should == 'tar'
|
|
50
|
-
compressor.perform!
|
|
51
|
-
Backup::Model.extension.should == 'tar.gz'
|
|
52
|
-
end
|
|
53
|
-
|
|
54
|
-
it 'should log' do
|
|
55
|
-
Backup::Logger.expects(:message).with("Backup::Compressor::Gzip started compressing the archive.")
|
|
56
|
-
compressor.perform!
|
|
57
|
-
end
|
|
58
|
-
end
|
|
59
|
-
end
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
# encoding: utf-8
|
|
2
|
-
|
|
3
|
-
require File.dirname(__FILE__) + '/../spec_helper'
|
|
4
|
-
|
|
5
|
-
describe Backup::Configuration::Helpers do
|
|
6
|
-
|
|
7
|
-
before do
|
|
8
|
-
class Backup::Configuration::Base
|
|
9
|
-
class << self
|
|
10
|
-
attr_accessor :rspec_method, :rspec_test, :rspec_mocha
|
|
11
|
-
end
|
|
12
|
-
end
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
it 'should clear the defaults' do
|
|
16
|
-
Backup::Configuration::Base.expects(:send).with('rspec_method=', nil)
|
|
17
|
-
Backup::Configuration::Base.expects(:send).with('rspec_test=', nil)
|
|
18
|
-
Backup::Configuration::Base.expects(:send).with('rspec_mocha=', nil)
|
|
19
|
-
Backup::Configuration::Base.clear_defaults!
|
|
20
|
-
end
|
|
21
|
-
|
|
22
|
-
it 'should return the setters' do
|
|
23
|
-
Backup::Configuration::Base.setter_methods.count.should == 3
|
|
24
|
-
%w[rspec_method= rspec_test= rspec_mocha=].each do |method|
|
|
25
|
-
Backup::Configuration::Base.setter_methods.should include(method)
|
|
26
|
-
end
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
it 'should return the getters' do
|
|
30
|
-
Backup::Configuration::Base.getter_methods.count.should == 3
|
|
31
|
-
%w[rspec_method rspec_test rspec_mocha].each do |method|
|
|
32
|
-
Backup::Configuration::Base.getter_methods.should include(method)
|
|
33
|
-
end
|
|
34
|
-
end
|
|
35
|
-
end
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
# encoding: utf-8
|
|
2
|
-
|
|
3
|
-
require File.dirname(__FILE__) + '/../../spec_helper'
|
|
4
|
-
|
|
5
|
-
describe Backup::Configuration::Compressor::Gzip do
|
|
6
|
-
before do
|
|
7
|
-
Backup::Configuration::Compressor::Gzip.defaults do |compressor|
|
|
8
|
-
compressor.best = true
|
|
9
|
-
compressor.fast = true
|
|
10
|
-
end
|
|
11
|
-
end
|
|
12
|
-
|
|
13
|
-
it 'should set the default compressor configuration' do
|
|
14
|
-
compressor = Backup::Configuration::Compressor::Gzip
|
|
15
|
-
compressor.best.should == true
|
|
16
|
-
compressor.fast.should == true
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
describe '#clear_defaults!' do
|
|
20
|
-
it 'should clear all the defaults, resetting them to nil' do
|
|
21
|
-
Backup::Configuration::Compressor::Gzip.clear_defaults!
|
|
22
|
-
|
|
23
|
-
compressor = Backup::Configuration::Compressor::Gzip
|
|
24
|
-
compressor.best.should == nil
|
|
25
|
-
compressor.fast.should == nil
|
|
26
|
-
end
|
|
27
|
-
end
|
|
28
|
-
end
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
# encoding: utf-8
|
|
2
|
-
|
|
3
|
-
require File.dirname(__FILE__) + '/../../spec_helper'
|
|
4
|
-
|
|
5
|
-
describe Backup::Configuration::Database::Base do
|
|
6
|
-
before do
|
|
7
|
-
Backup::Configuration::Database::Base.defaults do |db|
|
|
8
|
-
db.utility_path = '/usr/bin/my_util'
|
|
9
|
-
end
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
it 'should set the default Base configuration' do
|
|
13
|
-
db = Backup::Configuration::Database::Base
|
|
14
|
-
db.utility_path.should == '/usr/bin/my_util'
|
|
15
|
-
end
|
|
16
|
-
end
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
# encoding: utf-8
|
|
2
|
-
|
|
3
|
-
require File.dirname(__FILE__) + '/../../spec_helper'
|
|
4
|
-
|
|
5
|
-
describe Backup::Configuration::Database::MongoDB do
|
|
6
|
-
before do
|
|
7
|
-
Backup::Configuration::Database::MongoDB.defaults do |db|
|
|
8
|
-
db.name = 'mydb'
|
|
9
|
-
db.username = 'myuser'
|
|
10
|
-
db.password = 'mypassword'
|
|
11
|
-
db.host = 'myhost'
|
|
12
|
-
db.port = 'myport'
|
|
13
|
-
db.only_collections = %w[my other tables]
|
|
14
|
-
db.additional_options = %w[my options]
|
|
15
|
-
db.ipv6 = true
|
|
16
|
-
end
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
it 'should set the default MongoDB configuration' do
|
|
20
|
-
db = Backup::Configuration::Database::MongoDB
|
|
21
|
-
db.name.should == 'mydb'
|
|
22
|
-
db.username.should == 'myuser'
|
|
23
|
-
db.password.should == 'mypassword'
|
|
24
|
-
db.host.should == 'myhost'
|
|
25
|
-
db.port.should == 'myport'
|
|
26
|
-
db.only_collections.should == %w[my other tables]
|
|
27
|
-
db.additional_options.should == %w[my options]
|
|
28
|
-
db.ipv6.should == true
|
|
29
|
-
end
|
|
30
|
-
end
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
# encoding: utf-8
|
|
2
|
-
|
|
3
|
-
require File.dirname(__FILE__) + '/../../spec_helper'
|
|
4
|
-
|
|
5
|
-
describe Backup::Configuration::Database::MySQL do
|
|
6
|
-
before do
|
|
7
|
-
Backup::Configuration::Database::MySQL.defaults do |db|
|
|
8
|
-
db.name = 'mydb'
|
|
9
|
-
db.username = 'myuser'
|
|
10
|
-
db.password = 'mypassword'
|
|
11
|
-
db.host = 'myhost'
|
|
12
|
-
db.port = 'myport'
|
|
13
|
-
db.socket = 'mysocket'
|
|
14
|
-
db.skip_tables = %w[my tables]
|
|
15
|
-
db.only_tables = %w[my other tables]
|
|
16
|
-
db.additional_options = %w[my options]
|
|
17
|
-
end
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
it 'should set the default MySQL configuration' do
|
|
21
|
-
db = Backup::Configuration::Database::MySQL
|
|
22
|
-
db.name.should == 'mydb'
|
|
23
|
-
db.username.should == 'myuser'
|
|
24
|
-
db.password.should == 'mypassword'
|
|
25
|
-
db.host.should == 'myhost'
|
|
26
|
-
db.port.should == 'myport'
|
|
27
|
-
db.socket.should == 'mysocket'
|
|
28
|
-
db.skip_tables.should == %w[my tables]
|
|
29
|
-
db.only_tables.should == %w[my other tables]
|
|
30
|
-
db.additional_options.should == %w[my options]
|
|
31
|
-
end
|
|
32
|
-
end
|