padrino-mailer 0.13.3.1 → 0.13.3.2

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: e9122facbc58ce0d4cc3230ef14a0d3e27f2e9a5
4
- data.tar.gz: e89625b56cd50655c9c5168d27ddd51d8fc55a11
3
+ metadata.gz: f67b83b57346695ae8e0f54f06955b96f9cfb8d6
4
+ data.tar.gz: d4404d3d8832786decc0a2e125355c095adc4524
5
5
  SHA512:
6
- metadata.gz: cde9b72a4d6297dfae425e4a630adffe4e1c2e7320d279dbe19ff24a30b8f0d20bca17ef17bc2920f0f04fad9e73b38cf9dc096b22ae2777470ed427c730a6ec
7
- data.tar.gz: fb496cc0b26821ad600b86db0b2fb5234cbd117db89c90933eddbabd2dd31bdb1dd814ff29324cdbcdc831b86992ce8928b294b2a278006683888558aef3b926
6
+ metadata.gz: 0f8c1b295737f82be9e1e565913929890f52d640d995443859a364d95b51fad07fe119bd3a5b8292250b5b798455443c1075e26cc200c101f264a3b7f3eb1e4a
7
+ data.tar.gz: 85ce501a98f07310dfc9449e7fb24b81fdb23aa81de728b28f1b92ab3fcc5fe0918365887e48f5cbcd1c656e40254c17266c9fb2bde1acaa6d6e6adbe879fc05
@@ -260,8 +260,8 @@ module Mail # @private
260
260
 
261
261
  engine ||= message_name
262
262
 
263
- if mailer_name
264
- settings.views += "/#{mailer_name}"
263
+ if mailer_name && !engine.to_s.index('/')
264
+ settings.views += "/#{mailer_name}"
265
265
  engine = engine.to_s.sub(%r{^#{mailer_name}/}, '')
266
266
  end
267
267
 
@@ -62,6 +62,15 @@ class PadrinoApp < Padrino::Application
62
62
  via :test
63
63
  render
64
64
  end
65
+
66
+ message :external do |name|
67
+ subject "Welcome Message!"
68
+ to 'john@fake.com'
69
+ from 'noreply@custom.com'
70
+ locals :name => name
71
+ via :test
72
+ render 'demo/sample_mail'
73
+ end
65
74
  end
66
75
 
67
76
  mailer :nonexistant do
@@ -109,6 +118,11 @@ class PadrinoApp < Padrino::Application
109
118
  result = deliver(:sample, :default_mailer_email_name, "Jim")
110
119
  result ? "mail delivered" : 'mail not delivered'
111
120
  end
121
+
122
+ post "/deliver/external" do
123
+ result = deliver(:sample, :external, "Joey")
124
+ result ? "mail delivered" : 'mail not delivered'
125
+ end
112
126
  end
113
127
 
114
128
  Padrino.mount("PadrinoApp").to("/")
@@ -88,6 +88,11 @@ describe "PadrinoMailer" do
88
88
  :subject => 'Happy anniversary!', :body => "<p>Yay Joey &amp; Charlotte!</p>\n<p>You have been married 16 years</p>")
89
89
  end
90
90
 
91
+ it 'should be able to deliver emails with views in custom-named folders' do
92
+ post '/deliver/external'
93
+ assert_equal 'mail delivered', body
94
+ end
95
+
91
96
  it 'should be able to deliver a basic email using app settings' do
92
97
  @app.email(:to => 'john@apple.com', :from => 'joe@smith.com',
93
98
  :subject => 'Test Email', :body => 'Test Body',
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.1
4
+ version: 0.13.3.2
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-30 00:00:00.000000000 Z
14
+ date: 2016-09-06 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.1
22
+ version: 0.13.3.2
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.1
29
+ version: 0.13.3.2
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: mime-types
32
32
  requirement: !ruby/object:Gem::Requirement