griddler 0.4.0 → 0.4.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: fb74f34f6940e9e3287bfb7a543d4eed144ca554
4
- data.tar.gz: 38c69abc85aed6e97d8d7e75d47456b476964b27
3
+ metadata.gz: 25118b339d00976897148f6999e07b31a7b430e5
4
+ data.tar.gz: 10c89b94dd65253620018490b1b84290885ee9b1
5
5
  SHA512:
6
- metadata.gz: 2cd9c1d15de8639995f8c02f085da8c88846d3226a136756c022cdfb9b9125a0bb1da7d9b4b2aea10274f9d58ee6792d8675ced712f75f9470f6791b1931d40b
7
- data.tar.gz: 7d6bce5cd7c9bff557cc6611a7c5129091d104d4e90e1bd031d26d9f7e8f8cb79e28eb12ab162e4c52e4fcf0e015eb5dea3a3c9974daf75d61aeff6d8c8c0b2d
6
+ metadata.gz: d33d3fac3fdad15c1ee4b1aa957fa667f52d5aad4c17f5aa7572b0199c33598a283689837192f9373faff4dd32b1ac951e8fceda4db7de27ed530d5da946806c
7
+ data.tar.gz: dd09ef830ab90a1e6cebbef4cefc744cb0ae94a1a21cf644ad6a93b3052a667b05683045202a607a8117caa7cb94a3b2efd6b43a7e06b8b194d6c082237b1188
data/README.md CHANGED
@@ -110,8 +110,8 @@ end
110
110
  * `config.to` is the format of the returned value for the `:to` key in
111
111
  the email object. `:hash` will return all options within a -- (surprise!) -- hash.
112
112
  * `config.email_service` tells Griddler which email service you are using. The supported
113
- email service options are :sendgrid (the default), :cloudmailin (expects
114
- multipart format) and :postmark
113
+ email service options are `:sendgrid` (the default), `:cloudmailin` (expects
114
+ multipart format) and `:postmark`.
115
115
 
116
116
  Testing In Your App
117
117
  -------------------
@@ -12,7 +12,7 @@ module Griddler
12
12
 
13
13
  def normalize_params
14
14
  {
15
- to: params[:ToFull][:Email],
15
+ to: full_email(params[:ToFull].first),
16
16
  from: params[:FromFull][:Email],
17
17
  subject: params[:Subject],
18
18
  text: params[:TextBody],
@@ -25,6 +25,15 @@ module Griddler
25
25
 
26
26
  attr_reader :params
27
27
 
28
+ def full_email(contact_info)
29
+ email = contact_info[:Email]
30
+ if contact_info[:Name].present?
31
+ "#{contact_info[:Name]} <#{email}>"
32
+ else
33
+ email
34
+ end
35
+ end
36
+
28
37
  def attachment_files
29
38
  attachments = Array(params[:Attachments])
30
39
 
@@ -44,6 +44,7 @@ module Griddler
44
44
  {
45
45
  sendgrid: Griddler::Adapters::SendgridAdapter,
46
46
  cloudmailin: Griddler::Adapters::CloudmailinAdapter,
47
+ postmark: Griddler::Adapters::PostmarkAdapter,
47
48
  }
48
49
  end
49
50
  end
@@ -1,3 +1,3 @@
1
1
  module Griddler
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: griddler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Caleb Thompson
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2013-03-18 00:00:00.000000000 Z
14
+ date: 2013-03-26 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rails