volt-mailer 0.0.3 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/volt/mailer/mailer.rb +6 -4
- data/lib/volt/mailer/version.rb +1 -1
- metadata +3 -4
- data/lib/volt/mailer/mailer_task.rb +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 447a86e2633dd20dc10f20a4ff1469d5ac94cce5
|
4
|
+
data.tar.gz: 9bf7281a18c04dba5f8ede6e6b2f02dcedd10036
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9421c9480fdd90d2a83ab007f1f71f53dcfc8e22cf505007ed23757abac1d5fcb9788860e8089153d1209ecb01b2fe3d47de56980abfa96b821faf83b3eb69b4
|
7
|
+
data.tar.gz: d8f36cf57ab74c7a4bf03a431355b5856ac3e13a2ca2fdc5622847b246abf09af1b6b2e05a1440c4c7b4b5f4a003c24068daecd5650148bc768c164e0cefa9de
|
data/lib/volt/mailer/mailer.rb
CHANGED
@@ -4,21 +4,23 @@ unless RUBY_PLATFORM == 'opal'
|
|
4
4
|
end
|
5
5
|
|
6
6
|
module Mailer
|
7
|
-
def self.deliver(view_path, attrs)
|
7
|
+
def self.deliver(view_path, attrs, volt_app=nil)
|
8
|
+
volt_app ||= $volt_app
|
9
|
+
|
8
10
|
attrs = attrs.symbolize_keys
|
9
11
|
|
10
12
|
raise ":to must be supplied when delivering e-mail" unless attrs[:to]
|
11
13
|
|
12
|
-
subject = Volt::PathStringRenderer.new("#{view_path}/subject", attrs).html
|
14
|
+
subject = Volt::PathStringRenderer.new(volt_app, "#{view_path}/subject", attrs).html
|
13
15
|
|
14
16
|
text = begin
|
15
|
-
Volt::PathStringRenderer.new("#{view_path}/text", attrs).html
|
17
|
+
Volt::PathStringRenderer.new(volt_app, "#{view_path}/text", attrs).html
|
16
18
|
rescue ViewLookupException => e
|
17
19
|
nil
|
18
20
|
end
|
19
21
|
|
20
22
|
html = begin
|
21
|
-
Volt::PathStringRenderer.new("#{view_path}/html", attrs).html
|
23
|
+
Volt::PathStringRenderer.new(volt_app, "#{view_path}/html", attrs).html
|
22
24
|
rescue ViewLookupException => e
|
23
25
|
nil
|
24
26
|
end
|
data/lib/volt/mailer/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: volt-mailer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Stout
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-05-
|
11
|
+
date: 2015-05-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pony
|
@@ -66,7 +66,6 @@ files:
|
|
66
66
|
- app/mailer/config/dependencies.rb
|
67
67
|
- lib/volt/mailer.rb
|
68
68
|
- lib/volt/mailer/mailer.rb
|
69
|
-
- lib/volt/mailer/mailer_task.rb
|
70
69
|
- lib/volt/mailer/version.rb
|
71
70
|
- volt-mailer.gemspec
|
72
71
|
homepage: ''
|
@@ -89,7 +88,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
89
88
|
version: '0'
|
90
89
|
requirements: []
|
91
90
|
rubyforge_project:
|
92
|
-
rubygems_version: 2.
|
91
|
+
rubygems_version: 2.4.5
|
93
92
|
signing_key:
|
94
93
|
specification_version: 4
|
95
94
|
summary: A simple way to send e-mail from within a Volt app.
|