padrino-mailer 0.12.2 → 0.12.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/padrino-mailer/ext.rb +1 -0
- data/lib/padrino-mailer/mime.rb +1 -1
- data/test/test_message.rb +4 -0
- data/test/test_part.rb +3 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dbf3d54474d59c652fbcad13c060970d623af90f
|
4
|
+
data.tar.gz: 04d114262258e20ea265c8a54e3c9f0a0d7fb27c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a8cb60ff51a7bf2c6ed4da5a0e9874bff715d5d9872aab745decfa34cb8e4641f36dd8542dc2d9697feb9445ad70b986d89c2409ddd0325e5a244b5a4fd74c2
|
7
|
+
data.tar.gz: 6f5a89f366af7cd62b5cc50a6c3b6d94e9130f9c89529e41fcd1d1a84db7bce172894a15657ea6268453754dc341fe2a7680f16e10243fdc2fb853f3eab04ca3
|
data/lib/padrino-mailer/ext.rb
CHANGED
data/lib/padrino-mailer/mime.rb
CHANGED
@@ -27,7 +27,7 @@ module Padrino
|
|
27
27
|
# Padrino::Mailer::Mime::MIME_TYPES.fetch('text/plain', :plain)
|
28
28
|
#
|
29
29
|
def self.mime_type(mime, fallback=:plain)
|
30
|
-
MIME_TYPES.fetch(mime.to_s.downcase, fallback)
|
30
|
+
MIME_TYPES.fetch(mime.to_s.split(';').first.to_s.downcase, fallback)
|
31
31
|
end
|
32
32
|
|
33
33
|
##
|
data/test/test_message.rb
CHANGED
@@ -133,6 +133,8 @@ describe "Message" do
|
|
133
133
|
assert_equal ['padrino@you.com'], message.to
|
134
134
|
assert_equal 'Hello there Padrino', message.subject
|
135
135
|
assert_equal 'text html', message.body.to_s.chomp
|
136
|
+
message.encoded
|
137
|
+
assert_equal :html, message.content_type
|
136
138
|
|
137
139
|
message = Mail::Message.new do
|
138
140
|
views File.dirname(__FILE__) + '/fixtures/views/mailers'
|
@@ -147,6 +149,8 @@ describe "Message" do
|
|
147
149
|
assert_equal ['padrino@you.com'], message.to
|
148
150
|
assert_equal 'Hello there Padrino', message.subject
|
149
151
|
assert_equal 'plain text', message.body.to_s.chomp
|
152
|
+
message.encoded
|
153
|
+
assert_equal :plain, message.content_type
|
150
154
|
end
|
151
155
|
end
|
152
156
|
end
|
data/test/test_part.rb
CHANGED
@@ -31,6 +31,9 @@ describe "Part" do
|
|
31
31
|
assert_equal 'This is a foo message in mailers/sample dir', message.parts[1].body.decoded.chomp
|
32
32
|
assert_equal :plain, message.parts[2].content_type
|
33
33
|
assert_equal 'other', message.parts[2].body.decoded
|
34
|
+
|
35
|
+
assert_equal 'This is a foo message in mailers/sample dir', message.html_part.body.decoded.chomp
|
36
|
+
assert_equal 'plain text', message.text_part.body.decoded
|
34
37
|
end
|
35
38
|
|
36
39
|
it 'should works with multipart templates' do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: padrino-mailer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.12.
|
4
|
+
version: 0.12.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Padrino Team
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2014-
|
14
|
+
date: 2014-08-13 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: padrino-core
|
@@ -19,14 +19,14 @@ dependencies:
|
|
19
19
|
requirements:
|
20
20
|
- - '='
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 0.12.
|
22
|
+
version: 0.12.3
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - '='
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.12.
|
29
|
+
version: 0.12.3
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: mail
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|