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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b8303de5ff6f8764fbbffe72a1082592015f358c
4
- data.tar.gz: f0be05682875dc41f5498bc2f3a0383217caa686
3
+ metadata.gz: 59178b06ea728e7fdc652e0e5ab3a2f4374a3d86
4
+ data.tar.gz: b643195369fa708d9b17489a5a90fe836c4d4f24
5
5
  SHA512:
6
- metadata.gz: 85d98edb223c41c0b80759afeaea246336a2cda98fa0a8456d9f84d8a35e2a180b7f91e43fdc29fcc5b5adf14073c093796d74b415a2a9f120424333ac0da989
7
- data.tar.gz: 96ddd40c9b0274b520b79b797cbee98019fc62fdc8d4a6a45b599a39a91f7f63a26abed6f1e655194fab11aa3dcd1efea65fa686b9e4d70178c7fe53daf466ae
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
- * Coming Soon
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: msg['msg_from'],
24
+ from: clean_from,
22
25
  cc: content['cc'].nil? ? [] : content['cc'],
23
26
  subject: content['subject'],
24
27
  text: content['text'],
@@ -1,5 +1,5 @@
1
1
  module Griddler
2
2
  module Sparkpost
3
- VERSION = '0.0.1'
3
+ VERSION = '0.0.3'
4
4
  end
5
5
  end
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.1
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-03-23 00:00:00.000000000 Z
11
+ date: 2016-04-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake