volt-mailer 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2416a1f3327d0efb536075d06882a43d9cbb3a4a
4
- data.tar.gz: b5c410054e1151743f94a3f57e1a56c48c1c9e8b
3
+ metadata.gz: ac84cefe672745a926338885673a025532738ba1
4
+ data.tar.gz: 174a2ded619a67af01da3cae548be84349a1b32a
5
5
  SHA512:
6
- metadata.gz: c1e264470d919cc5ead6741e393740b2d1e804e7a1eb21138f498d5f49309f87fa9d9bdd81bcc44df4722261c150653034624c17bcc77ac004a2addb18ce7048
7
- data.tar.gz: 1320fd84e0ad2cc0e470e694bed7c1c1f7669c3848dc93ebd48d700f3944578482046b221222c55bca084e1ea50917a2f4d0da0d89bd1700201a3292e7ca24de
6
+ metadata.gz: 63d219d0d83e2959f5415061ff1b5a6db25888194e0f060938a63a60d685f9f5a2dc900304ad5a7d28b9a10b5dbb496298851a08a1169cd74a66b6db3c57e4f2
7
+ data.tar.gz: ec322d89bcd242c4ee165938471d9ed16f0ab5a4886efbe0c1caa0ef5d3de7ceac400adfea246ec17c173cb56faee6b03046216464e8f5751e0ec284bc4df224
@@ -5,6 +5,8 @@ end
5
5
 
6
6
  class Mailer < Volt::Task
7
7
  def deliver(view_path, attrs)
8
+ attrs = attrs.symbolize_keys
9
+
8
10
  raise ":to must be supplied when delivering e-mail" unless attrs[:to]
9
11
 
10
12
  subject = Volt::PathStringRenderer.new("#{view_path}/subject", attrs).html
@@ -33,12 +35,15 @@ class Mailer < Volt::Task
33
35
  attrs[:body] = text
34
36
 
35
37
  # Merge attrs into a copy of the mailer options
36
- attrs = Volt.config.mailer.dup.merge(attrs) if Volt.config.mailer
38
+ attrs = Volt.config.mailer.to_h.dup.merge(attrs) if Volt.config.mailer
37
39
 
38
40
  allowed_opts = Pony.permissable_options
39
41
 
40
42
  pony_options = attrs.select {|k,v| allowed_opts.include?(k.to_sym) }
43
+
41
44
  # Send the e-mail
42
45
  Pony.mail(pony_options)
46
+
47
+ true
43
48
  end
44
49
  end
@@ -1,5 +1,5 @@
1
1
  module Volt
2
2
  module Mailer
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: volt-mailer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Stout