template_mailer 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/template_mailer/mail_message.rb +2 -11
- data/lib/template_mailer/version.rb +1 -1
- data/spec/mail_message_spec.rb +1 -4
- data/template_mailer.gemspec +1 -1
- metadata +5 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 28c98b43ae373772455163211d685a1e32e1cbd3e283f99faf9b0ece9a6013ea
|
4
|
+
data.tar.gz: 3ca00697e11f34fc2e11387f331a7aef39b878539260121ae070083594fcd780
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b0326320ca3bef9b776579cc8dc7b32b6f30602152fdb00dc7685dbe5e2ba75ab48534b4d43b4dd876b70612d51b2233536314bb55b91eb87a09fa904c55129
|
7
|
+
data.tar.gz: 5a98245833536b4620a1818e2807f2dc8974d4535bf3b15a5241cd709c46a6e977e248d203165c6c5e02a8c53d0e8b99b443daef54940385d6dd03726bcf805b
|
@@ -52,7 +52,7 @@ module TemplateMailer
|
|
52
52
|
# the complete settings together.
|
53
53
|
def send_settings(settings)
|
54
54
|
output = {to: settings[:recipients]}
|
55
|
-
output[:subject] =
|
55
|
+
output[:subject] = settings[:subject]
|
56
56
|
output[:html_body] = @html if (@html || "") != ""
|
57
57
|
output[:body] = @text if (@text || "") != ""
|
58
58
|
output[:from] = settings[:from] if settings.include?(:from)
|
@@ -66,14 +66,5 @@ module TemplateMailer
|
|
66
66
|
output[:via_options] = @server if @via == :smtp
|
67
67
|
output
|
68
68
|
end
|
69
|
-
|
70
|
-
# This method encodes the email subject line to get around issues with
|
71
|
-
# non-ASCII characters appearing in subject lines.
|
72
|
-
#
|
73
|
-
# ==== Parameters
|
74
|
-
# text:: A String containing the raw subject line text.
|
75
|
-
def encode_subject(text)
|
76
|
-
"=?utf-8?B?#{Base64.encode64(text)}?="
|
77
|
-
end
|
78
69
|
end
|
79
|
-
end
|
70
|
+
end
|
data/spec/mail_message_spec.rb
CHANGED
@@ -8,9 +8,6 @@ describe TemplateMailer::MailMessage do
|
|
8
8
|
let(:title) {
|
9
9
|
"Test Email"
|
10
10
|
}
|
11
|
-
let(:encoded_title) {
|
12
|
-
"=?utf-8?B?#{Base64.encode64(title)}?="
|
13
|
-
}
|
14
11
|
let(:html_body) {
|
15
12
|
"<h1>HTML message.</h1>"
|
16
13
|
}
|
@@ -37,7 +34,7 @@ describe TemplateMailer::MailMessage do
|
|
37
34
|
{body: text_body,
|
38
35
|
from: from,
|
39
36
|
html_body: html_body,
|
40
|
-
subject:
|
37
|
+
subject: title,
|
41
38
|
to: recipients,
|
42
39
|
via: :smtp,
|
43
40
|
via_options: server}
|
data/template_mailer.gemspec
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
21
|
spec.add_development_dependency "bundler", "~> 1.7"
|
22
|
-
spec.add_development_dependency "rake", "~>
|
22
|
+
spec.add_development_dependency "rake", "~> 13.0"
|
23
23
|
spec.add_development_dependency "rspec", "~> 3.4"
|
24
24
|
|
25
25
|
spec.add_dependency "pony", "~> 1.11"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: template_mailer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Wood
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-03-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '13.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '13.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -135,8 +135,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
135
135
|
- !ruby/object:Gem::Version
|
136
136
|
version: '0'
|
137
137
|
requirements: []
|
138
|
-
|
139
|
-
rubygems_version: 2.4.8
|
138
|
+
rubygems_version: 3.0.3
|
140
139
|
signing_key:
|
141
140
|
specification_version: 4
|
142
141
|
summary: A simple library that uses the Tilt and Pony libraries to generate and dispatch
|