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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -0
  3. data/lib/s3_mysql_backup.rb +3 -2
  4. metadata +9 -9
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dcbb96f3f981ab20be26794cc785915203d331ab
4
- data.tar.gz: b26532e25a81907e69ee8747e111eb8b9399449c
3
+ metadata.gz: 68c808d94c4006434ae710b9602b4511c6833cea
4
+ data.tar.gz: 98040176bbab5f6e59c41471511bdb90994cfd64
5
5
  SHA512:
6
- metadata.gz: e8989fe24543fd26b601627c91c1a6c5726685350bbe9f289761f9c7de65d28e79b456f98421a7643c192687bdff69af28048cfdd3e09d4fc8652120cfea4df1
7
- data.tar.gz: 6954711ffde3b1c030f4fe099c4cb2a27a868e39d525076d3ec97e0bcb288aa39abaa9e6e95f58a5e1e4ed383e7716730580f989efd133349dbdcb6f0d1ff496
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
@@ -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: #{config['mail_user']}"
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, config['mail_user'], config['mail_to'])
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.1.1
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-03-24 00:00:00.000000000 Z
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: '0'
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: '0'
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.5
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.5
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.2.2
91
+ rubygems_version: 2.4.2
92
92
  signing_key:
93
93
  specification_version: 4
94
94
  summary: Simple mysql backup to S3