padrino-mailer 0.13.3 → 0.13.3.1
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/base.rb +1 -1
- data/lib/padrino-mailer/ext.rb +3 -3
- data/test/helper.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e9122facbc58ce0d4cc3230ef14a0d3e27f2e9a5
|
4
|
+
data.tar.gz: e89625b56cd50655c9c5168d27ddd51d8fc55a11
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cde9b72a4d6297dfae425e4a630adffe4e1c2e7320d279dbe19ff24a30b8f0d20bca17ef17bc2920f0f04fad9e73b38cf9dc096b22ae2777470ed427c730a6ec
|
7
|
+
data.tar.gz: fb496cc0b26821ad600b86db0b2fb5234cbd117db89c90933eddbabd2dd31bdb1dd814ff29324cdbcdc831b86992ce8928b294b2a278006683888558aef3b926
|
data/lib/padrino-mailer/base.rb
CHANGED
@@ -81,7 +81,7 @@ module Padrino
|
|
81
81
|
# end
|
82
82
|
#
|
83
83
|
def email(name, &block)
|
84
|
-
raise "The email '#{name}' is already defined" if self.messages[name]
|
84
|
+
raise "The email '#{name}' is already defined" if self.messages[name]
|
85
85
|
self.messages[name] = Proc.new { |*attrs|
|
86
86
|
message = app.settings._padrino_mailer::Message.new(self.app)
|
87
87
|
message.mailer_name = mailer_name
|
data/lib/padrino-mailer/ext.rb
CHANGED
@@ -87,7 +87,7 @@ module Mail # @private
|
|
87
87
|
instance_variable_set "@#{variable}", self.part(:content_type => content_type,
|
88
88
|
:body => value,
|
89
89
|
:part_block => block)
|
90
|
-
add_multipart_alternate_header
|
90
|
+
add_multipart_alternate_header if self.send(variable)
|
91
91
|
else
|
92
92
|
instance_variable_get("@#{variable}") || find_first_mime_type(content_type)
|
93
93
|
end
|
@@ -255,7 +255,7 @@ module Mail # @private
|
|
255
255
|
# Defines the render for the mailer utilizing the padrino 'rendering' module
|
256
256
|
#
|
257
257
|
def render(engine=nil, data=nil, options={}, locals={}, &block)
|
258
|
-
locals = @_locals if options[:locals]
|
258
|
+
locals = @_locals || {} if !options[:locals] && locals.empty?
|
259
259
|
@template_cache.clear if settings.reload_templates?
|
260
260
|
|
261
261
|
engine ||= message_name
|
@@ -269,7 +269,7 @@ module Mail # @private
|
|
269
269
|
part do |p|
|
270
270
|
p.content_type(format)
|
271
271
|
p.send(:render, engine, data, options, locals, &block)
|
272
|
-
add_multipart_alternate_header if html_part
|
272
|
+
add_multipart_alternate_header if html_part || provides.include?(:html)
|
273
273
|
end
|
274
274
|
end
|
275
275
|
|
data/test/helper.rb
CHANGED
@@ -33,7 +33,7 @@ class MiniTest::Spec
|
|
33
33
|
# Asserts that the specified email object was delivered
|
34
34
|
def assert_email_sent(mail_attributes, options={})
|
35
35
|
mail_message = Mail::TestMailer.deliveries.last
|
36
|
-
raise "No mail message has been sent!" unless mail_message
|
36
|
+
raise "No mail message has been sent!" unless mail_message
|
37
37
|
delivery_attributes = mail_attributes
|
38
38
|
delivery_attributes.update(:to => Array(mail_attributes[:to]), :from => Array(mail_attributes[:from]))
|
39
39
|
delivery_attributes.each_pair do |key, expected|
|
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.13.3
|
4
|
+
version: 0.13.3.1
|
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: 2016-08-
|
14
|
+
date: 2016-08-30 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.13.3
|
22
|
+
version: 0.13.3.1
|
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.13.3
|
29
|
+
version: 0.13.3.1
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: mime-types
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
@@ -124,7 +124,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
124
124
|
version: 1.3.6
|
125
125
|
requirements: []
|
126
126
|
rubyforge_project: padrino-mailer
|
127
|
-
rubygems_version: 2.
|
127
|
+
rubygems_version: 2.5.1
|
128
128
|
signing_key:
|
129
129
|
specification_version: 4
|
130
130
|
summary: Mailer system for padrino
|