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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 43869652fc3e6e39b64173433b5c31848e63d4a3
4
- data.tar.gz: 5b931a10479564f4663d58d75ae2f2997632cdb4
3
+ metadata.gz: dbf3d54474d59c652fbcad13c060970d623af90f
4
+ data.tar.gz: 04d114262258e20ea265c8a54e3c9f0a0d7fb27c
5
5
  SHA512:
6
- metadata.gz: ddaffd37df6cb7bfedc352e8116693990c5513b9b9945b929b924b67e0f8b71aac01f540a3912e6be425b1fed7f25c4f6eb65d920740063c6ae294a44792c9d3
7
- data.tar.gz: 1a83ff8a343e29572fd7603bad108d9a8506c0f00fb5316cf8d5eee4446ceca2dd8e2a0b7766737997de57764920a721407f4aae459875a7e19a228ba73c3494
6
+ metadata.gz: 4a8cb60ff51a7bf2c6ed4da5a0e9874bff715d5d9872aab745decfa34cb8e4641f36dd8542dc2d9697feb9445ad70b986d89c2409ddd0325e5a244b5a4fd74c2
7
+ data.tar.gz: 6f5a89f366af7cd62b5cc50a6c3b6d94e9130f9c89529e41fcd1d1a84db7bce172894a15657ea6268453754dc341fe2a7680f16e10243fdc2fb853f3eab04ca3
@@ -107,6 +107,7 @@ module Mail # @private
107
107
  new_part.instance_eval(&part_block) if part_block
108
108
  yield new_part if block_given?
109
109
  add_part(new_part)
110
+ new_part
110
111
  end
111
112
 
112
113
  def do_delivery_with_logging
@@ -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.2
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-05-12 00:00:00.000000000 Z
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.2
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.2
29
+ version: 0.12.3
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: mail
32
32
  requirement: !ruby/object:Gem::Requirement