authify-core 0.1.0 → 0.1.1

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: 48f8c13a88120dbc3cf4395dc5c17b27dd6390cb
4
- data.tar.gz: e36efcd88f8e3d90958403361bb23cdafead3788
3
+ metadata.gz: 1978addbf478136a40cdf73afc7618a840f551f5
4
+ data.tar.gz: 1aa0eaf1b4d5a298fb1c755486368c66553dea5f
5
5
  SHA512:
6
- metadata.gz: 62ccc8ea46df8b3b79afeeae4b51d91ed12b20039a9797dd6b9a5b8eefca1dd39ec092d4c531690d16c5d04cadbfd1ae094a244d566dbe67ebdaabaddf4d0190
7
- data.tar.gz: 9822db8e05d2d6b9ac7ddabff267af608bfad8e1d8aa360e0978972ec549a9208da671bc68e5a5b92e65bdfdb29594d4ad15bc98b2953043add6870e22e0a45b
6
+ metadata.gz: 057299072b709a99f6166506b2dbf449eb5dd593c4dcda7cc8d2ff8d5cf280c2c1a162d04f26d5016568396002b1f0dd7aff769f50d2817d431282e24ea2e614
7
+ data.tar.gz: d31a3da6b20b38bd08a044c2af2e6e56684c3a1c40ee1c88358155fe21a0b5f714c663e768a7fde5925c940b1bf2db6c93712e269efba5e022ae8ecd28c380a7
@@ -4,7 +4,12 @@ module Authify
4
4
  # A Resque job for sending email (using Pony)
5
5
  class Email
6
6
  @queue = :mailer
7
- def self.perform(to:, subject:, body: nil, html_body: nil, headers: nil)
7
+
8
+ # Used by Resque to send email
9
+ def self.perform(to, subject, opts = {})
10
+ # Ensure opts keys are symbols
11
+ opts = opts.each_with_object({}) { |(k, v), h| h[k.intern] = v }
12
+
8
13
  config = {
9
14
  to: to,
10
15
  from: CONFIG[:mail][:from],
@@ -12,9 +17,9 @@ module Authify
12
17
  via_options: CONFIG[:mail][:server]
13
18
  }
14
19
 
15
- config[:headers] = headers if headers
16
- config[:body] = body if body
17
- config[:html_body] = html_body if html_body
20
+ config[:headers] = opts[:headers] if opts[:headers]
21
+ config[:body] = opts[:body] if opts[:body]
22
+ config[:html_body] = opts[:html_body] if opts[:html_body]
18
23
 
19
24
  Pony.mail config
20
25
  end
@@ -3,7 +3,7 @@ module Authify
3
3
  VERSION = [
4
4
  0, # Major
5
5
  1, # Minor
6
- 0 # Patch
6
+ 1 # Patch
7
7
  ].join('.')
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: authify-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Gnagy