pakyow-mailer 1.0.0.rc3 → 1.0.0.rc4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pakyow/mailer/framework.rb +22 -0
- data/lib/pakyow/mailer/helpers.rb +8 -25
- data/lib/pakyow/mailer/mailer.rb +1 -0
- metadata +12 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 593f907e323c83b9fe1c0881e58a3d0b3375af9bd196755a1d9217de2a6c0d6d
|
4
|
+
data.tar.gz: a21d91d6640c8bd5be73a9a27628d1225f656fa7f5120bd05d0a690ddbf2121a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99b093bb6566bd820d9e4446472067e409088f124d6fe4f4a22fc55b7860c35f14860c324b523041be29ce0936a1ad04c29783f2cd761787b24ec446f38da01a
|
7
|
+
data.tar.gz: 1216bb42a7cd71bba6632fd8457f3af90f0c0c8f1d18f68ea725de1eb3fd38fb43729e28c025d93d72bc43618b87a841f9a3bf56a581b0eb742c9fcdf727cf44
|
@@ -31,6 +31,28 @@ module Pakyow
|
|
31
31
|
unless const_defined?(:MailRenderer, false)
|
32
32
|
const_set(:MailRenderer, mail_renderer)
|
33
33
|
end
|
34
|
+
|
35
|
+
def mailer(path = nil, presentables)
|
36
|
+
if path
|
37
|
+
renderer = isolated(:MailRenderer).new(
|
38
|
+
app: self,
|
39
|
+
presentables: presentables,
|
40
|
+
presenter_class: isolated(:MailRenderer).find_presenter(self, path),
|
41
|
+
composer: Presenter::Composers::View.new(path, app: self)
|
42
|
+
)
|
43
|
+
|
44
|
+
Mailer.new(
|
45
|
+
renderer: renderer,
|
46
|
+
config: config.mailer,
|
47
|
+
logger: Pakyow.logger
|
48
|
+
)
|
49
|
+
else
|
50
|
+
Mailer.new(
|
51
|
+
config: config.mailer,
|
52
|
+
logger: Pakyow.logger
|
53
|
+
)
|
54
|
+
end
|
55
|
+
end
|
34
56
|
end
|
35
57
|
end
|
36
58
|
end
|
@@ -4,33 +4,16 @@ module Pakyow
|
|
4
4
|
module Mailer
|
5
5
|
module Helpers
|
6
6
|
def mailer(path = nil)
|
7
|
-
|
8
|
-
|
7
|
+
connection = @connection.dup
|
8
|
+
mailer = app.mailer(path, connection.values)
|
9
9
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
composer: Presenter::Composers::View.new(path, app: @connection.app)
|
15
|
-
)
|
16
|
-
|
17
|
-
Mailer.new(
|
18
|
-
renderer: renderer,
|
19
|
-
config: app.config.mailer,
|
20
|
-
logger: connection.logger
|
21
|
-
).tap do |mailer|
|
22
|
-
if block_given?
|
23
|
-
context = dup
|
24
|
-
context.instance_variable_set(:@connection, connection)
|
25
|
-
context.instance_exec(mailer, &Proc.new)
|
26
|
-
end
|
27
|
-
end
|
28
|
-
else
|
29
|
-
Mailer.new(
|
30
|
-
config: app.config.mailer,
|
31
|
-
logger: @connection.logger
|
32
|
-
)
|
10
|
+
if block_given?
|
11
|
+
context = dup
|
12
|
+
context.instance_variable_set(:@connection, connection)
|
13
|
+
context.instance_exec(mailer, &Proc.new)
|
33
14
|
end
|
15
|
+
|
16
|
+
mailer
|
34
17
|
end
|
35
18
|
end
|
36
19
|
end
|
data/lib/pakyow/mailer/mailer.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pakyow-mailer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.
|
4
|
+
version: 1.0.0.rc4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bryan Powell
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2019-07-
|
12
|
+
date: 2019-07-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: pakyow-assets
|
@@ -17,70 +17,70 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - '='
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: 1.0.0.
|
20
|
+
version: 1.0.0.rc4
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - '='
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: 1.0.0.
|
27
|
+
version: 1.0.0.rc4
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: pakyow-core
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
32
|
- - '='
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: 1.0.0.
|
34
|
+
version: 1.0.0.rc4
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
39
|
- - '='
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version: 1.0.0.
|
41
|
+
version: 1.0.0.rc4
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: pakyow-presenter
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
46
|
- - '='
|
47
47
|
- !ruby/object:Gem::Version
|
48
|
-
version: 1.0.0.
|
48
|
+
version: 1.0.0.rc4
|
49
49
|
type: :runtime
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
53
|
- - '='
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
version: 1.0.0.
|
55
|
+
version: 1.0.0.rc4
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
57
|
name: pakyow-routing
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
60
|
- - '='
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: 1.0.0.
|
62
|
+
version: 1.0.0.rc4
|
63
63
|
type: :runtime
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
67
|
- - '='
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: 1.0.0.
|
69
|
+
version: 1.0.0.rc4
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: pakyow-support
|
72
72
|
requirement: !ruby/object:Gem::Requirement
|
73
73
|
requirements:
|
74
74
|
- - '='
|
75
75
|
- !ruby/object:Gem::Version
|
76
|
-
version: 1.0.0.
|
76
|
+
version: 1.0.0.rc4
|
77
77
|
type: :runtime
|
78
78
|
prerelease: false
|
79
79
|
version_requirements: !ruby/object:Gem::Requirement
|
80
80
|
requirements:
|
81
81
|
- - '='
|
82
82
|
- !ruby/object:Gem::Version
|
83
|
-
version: 1.0.0.
|
83
|
+
version: 1.0.0.rc4
|
84
84
|
- !ruby/object:Gem::Dependency
|
85
85
|
name: css_parser
|
86
86
|
requirement: !ruby/object:Gem::Requirement
|