s3-mysql-backup 2.1.1 → 2.2.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.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/lib/s3_mysql_backup.rb +3 -2
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 68c808d94c4006434ae710b9602b4511c6833cea
|
4
|
+
data.tar.gz: 98040176bbab5f6e59c41471511bdb90994cfd64
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed796d0c791bc6a3a3ea3ba25b87c426038c68f651c2a822a7e6e63b7d37b6853ec63dc3a552ab45a29e2c7930695f7d846682676fee60dfa44cf903de31822d
|
7
|
+
data.tar.gz: 803ee3265a805312d43d28405b68f2f6129bbe4eaea1c5997d43cea715d1fed6b4f5eafdb7fac963b6382dee4c29561394b2531c0b64aead8af3f5ac3779c61c
|
data/README.md
CHANGED
@@ -56,6 +56,7 @@ mail_to: recipient@example.com
|
|
56
56
|
# Mail credentials
|
57
57
|
mail_user: me@example.com
|
58
58
|
mail_pass: example_password
|
59
|
+
mail_from: noreply@example.com # OPTIONAL, defaults to mail_user
|
59
60
|
mail_domain: smtp.example.com # OPTIONAL, defaults to: smtp.gmail.com
|
60
61
|
mail_port: 587 # OPTIONAL, defaults to: 587
|
61
62
|
mail_authentication: login # OPTIONAL, defaults to: :login
|
data/lib/s3_mysql_backup.rb
CHANGED
@@ -77,9 +77,10 @@ class S3MysqlBackup
|
|
77
77
|
return unless config['mail_to']
|
78
78
|
stats = File.stat(filename)
|
79
79
|
subject = "sql backup: #{@db_name}: #{human_size(stats.size)}"
|
80
|
+
mail_from = config['mail_from'] ? config['mail_from'] : config['mail_user']
|
80
81
|
|
81
82
|
content = []
|
82
|
-
content << "From: #{
|
83
|
+
content << "From: #{mail_from}"
|
83
84
|
content << "To: #{config['mail_to']}"
|
84
85
|
content << "Subject: #{subject}"
|
85
86
|
content << "Date: #{Time.now.rfc2822}"
|
@@ -89,7 +90,7 @@ class S3MysqlBackup
|
|
89
90
|
smtp = Net::SMTP.new(config["mail_domain"], config["mail_port"])
|
90
91
|
smtp.enable_starttls unless config["mail_start_tls"] == false
|
91
92
|
smtp.start(config["mail_domain"], config['mail_user'], config['mail_pass'], config['mail_authentication']) do
|
92
|
-
smtp.send_message(content,
|
93
|
+
smtp.send_message(content, mail_from, config['mail_to'])
|
93
94
|
end
|
94
95
|
end
|
95
96
|
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: s3-mysql-backup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeff Emminger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-10-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '1.37'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '1.37'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rspec
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - ~>
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 1.0
|
47
|
+
version: '1.0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 1.0
|
54
|
+
version: '1.0'
|
55
55
|
description: A simple mysql backup to Amazon S3
|
56
56
|
email: jeff@7compass.com
|
57
57
|
executables:
|
@@ -88,7 +88,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
88
88
|
version: '0'
|
89
89
|
requirements: []
|
90
90
|
rubyforge_project:
|
91
|
-
rubygems_version: 2.
|
91
|
+
rubygems_version: 2.4.2
|
92
92
|
signing_key:
|
93
93
|
specification_version: 4
|
94
94
|
summary: Simple mysql backup to S3
|