griddler-sendgrid 1.1.0 → 1.2.0

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
  SHA256:
3
- metadata.gz: 65ae6c3ebf35cf02589f969037d6d460e1081283d0cf12eaef22870a5ac2578e
4
- data.tar.gz: c3d1e54b5de5a4ddb9e2d37f44e78f80d32e25a7e2ce3ef0e6da24a302b8b793
3
+ metadata.gz: d317e0fd7a30052cf0ff5c61a647cdcb6e07bd75955b3c166e20c1f9cd1b0447
4
+ data.tar.gz: fb6919536c21963cccd1635fcda3af024d1a05a84ecb6bd8289db76b2c7502e5
5
5
  SHA512:
6
- metadata.gz: 1989291c64a64e26680b7d0f0c1062405acc1e83046e00c62c62c372d1999a3710af0c0b2322de322d3ef4f1b232e49e42edc4a2dab015e0f16b28fa9b4d0ded
7
- data.tar.gz: 467cefd0678c4f72db660121594da6d658f7885dd7273e59ec5f268513d5b28c0c604915d32dda867854d45ff216d6b0e9510c4db84aeb39fc379508d78aa20b
6
+ metadata.gz: 68f28a1cd5877623bcb53df9b7971abf68e3b319552166c977f967f08761d948ce91e423666341fd3586114eee56cfcea9b50cdf9974f37aa06b0d39b70388c1
7
+ data.tar.gz: b78f00363bb1975a2f7519c1af8abc804167ac19982a9daf42de47932fa4c9a3a10e75098c8c197bafdd72f30f0a88a1063b214b56eb4c51351ab4028b9ab839
@@ -1,5 +1,10 @@
1
1
  ## HEAD (unreleased)
2
2
 
3
+ ## 1.2.0
4
+
5
+ - Rescue `Mail::AddressList` parse errors ([#34](https://github.com/thoughtbot/griddler-sendgrid/pull/34))
6
+ - Update SendGrid API links ([#32](https://github.com/thoughtbot/griddler-sendgrid/pull/32) and [#33](https://github.com/thoughtbot/griddler-sendgrid/pull/33))
7
+
3
8
  ## 1.1.0
4
9
  * Expose charsets as Hash in normalized params ([#29](https://github.com/thoughtbot/griddler-sendgrid/pull/29/))
5
10
  * Add support for Sendgrid spam check ([#30](https://github.com/thoughtbot/griddler-sendgrid/pull/30))
data/README.md CHANGED
@@ -4,7 +4,7 @@ Griddler::Sendgrid
4
4
  This is an adapter that allows [Griddler](https://github.com/thoughtbot/griddler) to be used with
5
5
  [SendGrid's Parse API].
6
6
 
7
- [SendGrid's Parse API]: http://sendgrid.com/docs/API_Reference/Webhooks/parse.html
7
+ [SendGrid's Parse API]: https://sendgrid.com/docs/for-developers/parsing-email/setting-up-the-inbound-parse-webhook/
8
8
 
9
9
  Installation
10
10
  ------------
@@ -29,7 +29,7 @@ More Information
29
29
  ----------------
30
30
 
31
31
  * [SendGrid](http://www.sendgrid.com)
32
- * [SendGrid Parse API](http://www.sendgrid.com/docs/API_Reference/Webhooks/parse.html)
32
+ * [SendGrid Parse API](https://sendgrid.com/docs/for-developers/parsing-email/setting-up-the-inbound-parse-webhook/)
33
33
 
34
34
  Credits
35
35
  -------
@@ -31,6 +31,8 @@ module Griddler
31
31
 
32
32
  def recipients(key)
33
33
  Mail::AddressList.new(params[key] || '').addresses
34
+ rescue Mail::Field::IncompleteParseError
35
+ []
34
36
  end
35
37
 
36
38
  def get_bcc
@@ -1,5 +1,5 @@
1
1
  module Griddler
2
2
  module Sendgrid
3
- VERSION = "1.1.0"
3
+ VERSION = "1.2.0"
4
4
  end
5
5
  end
@@ -145,6 +145,12 @@ describe Griddler::Sendgrid::Adapter, '.normalize_params' do
145
145
  normalize_params(params)[:charsets].should eq({})
146
146
  end
147
147
 
148
+ it 'does not explode if address is not parseable' do
149
+ params = default_params.merge(cc: '"Closing Bracket Missing For Some Reason" <hi@example.com')
150
+
151
+ normalize_params(params)[:cc].should eq([])
152
+ end
153
+
148
154
  it 'defaults charsets to an empty hash if it is not specified in params' do
149
155
  params = default_params.except(:charsets)
150
156
  normalize_params(params)[:charsets].should eq({})
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: griddler-sendgrid
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Caleb Thompson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-09 00:00:00.000000000 Z
11
+ date: 2019-04-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -109,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
109
109
  version: '0'
110
110
  requirements: []
111
111
  rubyforge_project:
112
- rubygems_version: 2.7.3
112
+ rubygems_version: 2.7.6.2
113
113
  signing_key:
114
114
  specification_version: 4
115
115
  summary: SendGrid adapter for Griddler