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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d4443ba2cab47ae8310de857d279a1429adc4812
4
- data.tar.gz: 483ac8ed5d0b1e881956dcfad7b7fda56e4fa97a
3
+ metadata.gz: 447a86e2633dd20dc10f20a4ff1469d5ac94cce5
4
+ data.tar.gz: 9bf7281a18c04dba5f8ede6e6b2f02dcedd10036
5
5
  SHA512:
6
- metadata.gz: 10b83d122290d4e269fa0e014d35138fa3dfc54d104b1afeea72cace4acf7c3daa0dac055f2534543f34263d64e3fe5188facdc694efd6046e96d780a5f70c59
7
- data.tar.gz: 7980a20f309ae3f729bf1d093113cefa51acb361d1a0f4a15430d82b089200ee8c0ac09e8c10dff4a36a32cb49f18f848560c1fd1e03edf375e52b74f340dc0a
6
+ metadata.gz: 9421c9480fdd90d2a83ab007f1f71f53dcfc8e22cf505007ed23757abac1d5fcb9788860e8089153d1209ecb01b2fe3d47de56980abfa96b821faf83b3eb69b4
7
+ data.tar.gz: d8f36cf57ab74c7a4bf03a431355b5856ac3e13a2ca2fdc5622847b246abf09af1b6b2e05a1440c4c7b4b5f4a003c24068daecd5650148bc768c164e0cefa9de
@@ -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
@@ -1,5 +1,5 @@
1
1
  module Volt
2
2
  module Mailer
3
- VERSION = "0.0.3"
3
+ VERSION = "0.1.0"
4
4
  end
5
5
  end
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.3
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-05 00:00:00.000000000 Z
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.2.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.
@@ -1,7 +0,0 @@
1
- unless RUBY_PLATFORM == 'opal'
2
- require 'pony'
3
- require 'volt/page/path_string_renderer'
4
- end
5
-
6
- class Mailer < Volt::Task
7
- end