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,49 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
module Backup
|
4
|
-
module Configuration
|
5
|
-
module Database
|
6
|
-
class MongoDB < Base
|
7
|
-
class << self
|
8
|
-
|
9
|
-
##
|
10
|
-
# Name of the database that needs to get dumped
|
11
|
-
attr_accessor :name
|
12
|
-
|
13
|
-
##
|
14
|
-
# Credentials for the specified database
|
15
|
-
attr_accessor :username, :password
|
16
|
-
|
17
|
-
##
|
18
|
-
# Connectivity options
|
19
|
-
attr_accessor :host, :port
|
20
|
-
|
21
|
-
##
|
22
|
-
# IPv6 support (disabled by default)
|
23
|
-
attr_accessor :ipv6
|
24
|
-
|
25
|
-
##
|
26
|
-
# Collections to dump, collections that aren't specified won't get dumped
|
27
|
-
attr_accessor :only_collections
|
28
|
-
|
29
|
-
##
|
30
|
-
# Additional "mongodump" options
|
31
|
-
attr_accessor :additional_options
|
32
|
-
|
33
|
-
##
|
34
|
-
# Path to the mongodump utility (optional)
|
35
|
-
attr_accessor :mongodump_utility
|
36
|
-
|
37
|
-
##
|
38
|
-
# Path to the mongo utility (optional)
|
39
|
-
attr_accessor :mongo_utility
|
40
|
-
|
41
|
-
##
|
42
|
-
# 'lock' dump meaning wrapping mongodump with fsync & lock
|
43
|
-
attr_accessor :lock
|
44
|
-
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end
|
48
|
-
end
|
49
|
-
end
|
@@ -1,42 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
module Backup
|
4
|
-
module Configuration
|
5
|
-
module Database
|
6
|
-
class MySQL < Base
|
7
|
-
class << self
|
8
|
-
|
9
|
-
##
|
10
|
-
# Name of the database that needs to get dumped.
|
11
|
-
# To dump all databases, set this to `:all` or leave blank.
|
12
|
-
attr_accessor :name
|
13
|
-
|
14
|
-
##
|
15
|
-
# Credentials for the specified database
|
16
|
-
attr_accessor :username, :password
|
17
|
-
|
18
|
-
##
|
19
|
-
# Connectivity options
|
20
|
-
attr_accessor :host, :port, :socket
|
21
|
-
|
22
|
-
##
|
23
|
-
# Tables to skip while dumping the database
|
24
|
-
attr_accessor :skip_tables
|
25
|
-
|
26
|
-
##
|
27
|
-
# Tables to dump, tables that aren't specified won't get dumped
|
28
|
-
attr_accessor :only_tables
|
29
|
-
|
30
|
-
##
|
31
|
-
# Additional "mysqldump" options
|
32
|
-
attr_accessor :additional_options
|
33
|
-
|
34
|
-
##
|
35
|
-
# Path to mysqldump utility (optional)
|
36
|
-
attr_accessor :mysqldump_utility
|
37
|
-
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
@@ -1,41 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
module Backup
|
4
|
-
module Configuration
|
5
|
-
module Database
|
6
|
-
class PostgreSQL < Base
|
7
|
-
class << self
|
8
|
-
|
9
|
-
##
|
10
|
-
# Name of the database that needs to get dumped
|
11
|
-
attr_accessor :name
|
12
|
-
|
13
|
-
##
|
14
|
-
# Credentials for the specified database
|
15
|
-
attr_accessor :username, :password
|
16
|
-
|
17
|
-
##
|
18
|
-
# Connectivity options
|
19
|
-
attr_accessor :host, :port, :socket
|
20
|
-
|
21
|
-
##
|
22
|
-
# Tables to skip while dumping the database
|
23
|
-
attr_accessor :skip_tables
|
24
|
-
|
25
|
-
##
|
26
|
-
# Tables to dump, tables that aren't specified won't get dumped
|
27
|
-
attr_accessor :only_tables
|
28
|
-
|
29
|
-
##
|
30
|
-
# Additional "pg_dump" options
|
31
|
-
attr_accessor :additional_options
|
32
|
-
|
33
|
-
##
|
34
|
-
# Path to pg_dump utility (optional)
|
35
|
-
attr_accessor :pg_dump_utility
|
36
|
-
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
@@ -1,39 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
module Backup
|
4
|
-
module Configuration
|
5
|
-
module Database
|
6
|
-
class Redis < Base
|
7
|
-
class << self
|
8
|
-
|
9
|
-
##
|
10
|
-
# Name of and path to the database that needs to get dumped
|
11
|
-
attr_accessor :name, :path
|
12
|
-
|
13
|
-
##
|
14
|
-
# Credentials for the specified database
|
15
|
-
attr_accessor :password
|
16
|
-
|
17
|
-
##
|
18
|
-
# Determines whether Backup should invoke the SAVE command through
|
19
|
-
# the 'redis-cli' utility to persist the most recent data before
|
20
|
-
# copying over the dump file
|
21
|
-
attr_accessor :invoke_save
|
22
|
-
|
23
|
-
##
|
24
|
-
# Connectivity options
|
25
|
-
attr_accessor :host, :port, :socket
|
26
|
-
|
27
|
-
##
|
28
|
-
# Additional "redis-cli" options
|
29
|
-
attr_accessor :additional_options
|
30
|
-
|
31
|
-
##
|
32
|
-
# Path to the redis-cli utility (optional)
|
33
|
-
attr_accessor :redis_cli_utility
|
34
|
-
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
@@ -1,29 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
module Backup
|
4
|
-
module Configuration
|
5
|
-
module Database
|
6
|
-
class Riak < Base
|
7
|
-
class << self
|
8
|
-
|
9
|
-
##
|
10
|
-
# Name is the name of the backup
|
11
|
-
attr_accessor :name
|
12
|
-
|
13
|
-
##
|
14
|
-
# Node is the node from which to perform the backup.
|
15
|
-
attr_accessor :node
|
16
|
-
|
17
|
-
##
|
18
|
-
# Cookie is the Erlang cookie/shared secret used to connect to the node.
|
19
|
-
attr_accessor :cookie
|
20
|
-
|
21
|
-
##
|
22
|
-
# Path to riak-admin utility (optional)
|
23
|
-
attr_accessor :riak_admin_utility
|
24
|
-
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
@@ -1,32 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
module Backup
|
4
|
-
module Configuration
|
5
|
-
module Encryptor
|
6
|
-
class OpenSSL < Base
|
7
|
-
class << self
|
8
|
-
|
9
|
-
##
|
10
|
-
# The password that'll be used to encrypt the backup. This
|
11
|
-
# password will be required to decrypt the backup later on.
|
12
|
-
attr_accessor :password
|
13
|
-
|
14
|
-
##
|
15
|
-
# The password file used for encrypting the backup. This
|
16
|
-
# password file will be required to decrypt the backup later
|
17
|
-
# on.
|
18
|
-
attr_accessor :password_file
|
19
|
-
|
20
|
-
##
|
21
|
-
# Determines whether the 'base64' should be used or not
|
22
|
-
attr_accessor :base64
|
23
|
-
|
24
|
-
##
|
25
|
-
# Determines whether the 'salt' flag should be used
|
26
|
-
attr_accessor :salt
|
27
|
-
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
@@ -1,28 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
module Backup
|
4
|
-
module Configuration
|
5
|
-
module Notifier
|
6
|
-
class Base < Configuration::Base
|
7
|
-
class << self
|
8
|
-
|
9
|
-
##
|
10
|
-
# When set to true, the user will be notified by email
|
11
|
-
# when a backup process ends without raising any exceptions
|
12
|
-
attr_accessor :on_success
|
13
|
-
|
14
|
-
##
|
15
|
-
# When set to true, the user will be notified by email
|
16
|
-
# when a backup process ends successfully, but logged warnings
|
17
|
-
attr_accessor :on_warning
|
18
|
-
|
19
|
-
##
|
20
|
-
# When set to true, the user will be notified by email
|
21
|
-
# when a backup process raises an exception before finishing
|
22
|
-
attr_accessor :on_failure
|
23
|
-
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
@@ -1,25 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
module Backup
|
4
|
-
module Configuration
|
5
|
-
module Notifier
|
6
|
-
class Campfire < Base
|
7
|
-
class << self
|
8
|
-
|
9
|
-
##
|
10
|
-
# Campfire api authentication token
|
11
|
-
attr_accessor :api_token
|
12
|
-
|
13
|
-
##
|
14
|
-
# Campfire account's subdomain
|
15
|
-
attr_accessor :subdomain
|
16
|
-
|
17
|
-
##
|
18
|
-
# Campfire account's room id
|
19
|
-
attr_accessor :room_id
|
20
|
-
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
@@ -1,41 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
module Backup
|
4
|
-
module Configuration
|
5
|
-
module Notifier
|
6
|
-
class Hipchat < Base
|
7
|
-
class << self
|
8
|
-
|
9
|
-
# From
|
10
|
-
# Name that appears in Hipchat
|
11
|
-
attr_accessor :from
|
12
|
-
|
13
|
-
# Hipchat API Token
|
14
|
-
# The token to interact with Hipchat
|
15
|
-
attr_accessor :token
|
16
|
-
|
17
|
-
# Rooms
|
18
|
-
# Rooms that you want to post notifications to
|
19
|
-
attr_accessor :rooms_notified
|
20
|
-
|
21
|
-
# Success Color
|
22
|
-
# The background color of a success message. One of :yellow, :red, :green, :purple, or :random. (default: yellow)
|
23
|
-
attr_accessor :success_color
|
24
|
-
|
25
|
-
# Warning Color
|
26
|
-
# The background color of a success message. One of :yellow, :red, :green, :purple, or :random. (default: yellow)
|
27
|
-
attr_accessor :warning_color
|
28
|
-
|
29
|
-
# Failure Color
|
30
|
-
# The background color of an error message. One of :yellow, :red, :green, :purple, or :random. (default: yellow)
|
31
|
-
attr_accessor :failure_color
|
32
|
-
|
33
|
-
# Notify Users
|
34
|
-
# (bool) Notify users in the room
|
35
|
-
attr_accessor :notify_users
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
@@ -1,112 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
module Backup
|
4
|
-
module Configuration
|
5
|
-
module Notifier
|
6
|
-
class Mail < Base
|
7
|
-
class << self
|
8
|
-
|
9
|
-
##
|
10
|
-
# Mail delivery method to be used by the Mail gem.
|
11
|
-
# Supported methods:
|
12
|
-
#
|
13
|
-
# `:smtp` [::Mail::SMTP] (default)
|
14
|
-
# : Settings used only by this method:
|
15
|
-
# : `address`, `port`, `domain`, `user_name`, `password`
|
16
|
-
# : `authentication`, `enable_starttls_auto`, `openssl_verify_mode`
|
17
|
-
#
|
18
|
-
# `:sendmail` [::Mail::Sendmail]
|
19
|
-
# : Settings used only by this method:
|
20
|
-
# : `sendmail`, `sendmail_args`
|
21
|
-
#
|
22
|
-
# `:exim` [::Mail::Exim]
|
23
|
-
# : Settings used only by this method:
|
24
|
-
# : `exim`, `exim_args`
|
25
|
-
#
|
26
|
-
# `:file` [::Mail::FileDelivery]
|
27
|
-
# : Settings used only by this method:
|
28
|
-
# : `mail_folder`
|
29
|
-
#
|
30
|
-
attr_accessor :delivery_method
|
31
|
-
|
32
|
-
##
|
33
|
-
# Sender and Receiver email addresses
|
34
|
-
# Examples:
|
35
|
-
# sender - my.email.address@gmail.com
|
36
|
-
# receiver - your.email.address@gmail.com
|
37
|
-
attr_accessor :from, :to
|
38
|
-
|
39
|
-
##
|
40
|
-
# The address to use
|
41
|
-
# Example: smtp.gmail.com
|
42
|
-
attr_accessor :address
|
43
|
-
|
44
|
-
##
|
45
|
-
# The port to connect to
|
46
|
-
# Example: 587
|
47
|
-
attr_accessor :port
|
48
|
-
|
49
|
-
##
|
50
|
-
# Your domain (if applicable)
|
51
|
-
# Example: mydomain.com
|
52
|
-
attr_accessor :domain
|
53
|
-
|
54
|
-
##
|
55
|
-
# Username and Password (sender email's credentials)
|
56
|
-
# Examples:
|
57
|
-
# user_name - meskyanichi
|
58
|
-
# password - my_secret_password
|
59
|
-
attr_accessor :user_name, :password
|
60
|
-
|
61
|
-
##
|
62
|
-
# Authentication type
|
63
|
-
# Example: plain
|
64
|
-
attr_accessor :authentication
|
65
|
-
|
66
|
-
##
|
67
|
-
# Automatically set TLS
|
68
|
-
# Example: true
|
69
|
-
attr_accessor :enable_starttls_auto
|
70
|
-
|
71
|
-
##
|
72
|
-
# OpenSSL Verify Mode
|
73
|
-
# Example: none - Only use this option for a self-signed and/or wildcard certificate
|
74
|
-
attr_accessor :openssl_verify_mode
|
75
|
-
|
76
|
-
##
|
77
|
-
# When using the `:sendmail` `delivery_method` option,
|
78
|
-
# this may be used to specify the absolute path to `sendmail` (if needed)
|
79
|
-
# Example: '/usr/sbin/sendmail'
|
80
|
-
attr_accessor :sendmail
|
81
|
-
|
82
|
-
##
|
83
|
-
# Optional arguments to pass to `sendmail`
|
84
|
-
# Note that this will override the defaults set by the Mail gem (currently: '-i -t')
|
85
|
-
# So, if set here, be sure to set all the arguments you require.
|
86
|
-
# Example: '-i -t -X/tmp/traffic.log'
|
87
|
-
attr_accessor :sendmail_args
|
88
|
-
|
89
|
-
##
|
90
|
-
# When using the `:exim` `delivery_method` option,
|
91
|
-
# this may be used to specify the absolute path to `exim` (if needed)
|
92
|
-
# Example: '/usr/sbin/exim'
|
93
|
-
attr_accessor :exim
|
94
|
-
|
95
|
-
##
|
96
|
-
# Optional arguments to pass to `exim`
|
97
|
-
# Note that this will override the defaults set by the Mail gem (currently: '-i -t')
|
98
|
-
# So, if set here, be sure to set all the arguments you require.
|
99
|
-
# Example: '-i -t -X/tmp/traffic.log'
|
100
|
-
attr_accessor :exim_args
|
101
|
-
|
102
|
-
##
|
103
|
-
# Folder where mail will be kept when using the `:file` `delivery_method` option.
|
104
|
-
# Default location is '$HOME/backup-mails'
|
105
|
-
# Example: '/tmp/test-mails'
|
106
|
-
attr_accessor :mail_folder
|
107
|
-
|
108
|
-
end
|
109
|
-
end
|
110
|
-
end
|
111
|
-
end
|
112
|
-
end
|