griddler-sparkpost 0.0.1 → 0.0.3
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 +4 -4
- data/README.md +14 -1
- data/lib/griddler/sparkpost/adapter.rb +4 -1
- data/lib/griddler/sparkpost/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 59178b06ea728e7fdc652e0e5ab3a2f4374a3d86
|
4
|
+
data.tar.gz: b643195369fa708d9b17489a5a90fe836c4d4f24
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c26f104091f09c2eeadf26b06418762fd80a1df3542249e1d726c8e19a44815640fabaa76e77bc5c950043077cb05e4900ab2e153750373c1d85af9d2b5ff55
|
7
|
+
data.tar.gz: 23b699467eaf53bedb688456b0079b943c32f37456c0e5a45beac145cd4ec175184ee8ce114a708d5c5d46bc18ef008c524e3e17499fdd00a902550ebd824113
|
data/README.md
CHANGED
@@ -19,7 +19,20 @@ gem 'griddler-sparkpost'
|
|
19
19
|
Usage
|
20
20
|
-----
|
21
21
|
|
22
|
-
|
22
|
+
[thoughtbot](http://thoughtbot.com) has a blog post on how to use Griddler over on their blog: [Giant
|
23
|
+
Robots](https://robots.thoughtbot.com/griddler-is-better-than-ever).
|
24
|
+
|
25
|
+
That post is specific to Mailgun, so you'll need to update the references from Mailgun to SparkPost.
|
26
|
+
|
27
|
+
Example:
|
28
|
+
|
29
|
+
```ruby
|
30
|
+
# config/initializers/griddler.rb
|
31
|
+
|
32
|
+
Griddler.configure do |config|
|
33
|
+
config.email_service = :sparkpost
|
34
|
+
end
|
35
|
+
```
|
23
36
|
|
24
37
|
More Information
|
25
38
|
----------------
|
@@ -16,9 +16,12 @@ module Griddler
|
|
16
16
|
msg = params['_json'][0]['msys']['relay_message']
|
17
17
|
content = msg['content']
|
18
18
|
mail = Mail.read_from_string(content['email_rfc822'])
|
19
|
+
# SparkPost documentation isn't clear on friendly_from.
|
20
|
+
# In case there's a full email address (e.g. "Test User <test@test.com>"), strip out junk
|
21
|
+
clean_from = msg['friendly_from'].split('<').last.delete('>').strip
|
19
22
|
params.merge(
|
20
23
|
to: content['to'],
|
21
|
-
from:
|
24
|
+
from: clean_from,
|
22
25
|
cc: content['cc'].nil? ? [] : content['cc'],
|
23
26
|
subject: content['subject'],
|
24
27
|
text: content['text'],
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: griddler-sparkpost
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kyle Powers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|