sendgrid-ruby 6.5.1 → 6.5.2

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: c1a6640bcc2d82d5d20822a16795d3d2bff5ca408a7d65be07d0af036052c4fc
4
- data.tar.gz: 53a40b16fd0fed9228586419bd7d24bb60511836f7480bec2ff6656333596197
3
+ metadata.gz: e9ae3c96f2f17a8c259ea3f8e369e19c37bb8764074abe57a2cbf9af9e14879e
4
+ data.tar.gz: 2bd8adf75c2e77b81c5c8d5f6c3e01cb4d8a52ea25252bdea2e24b8cbb9dbaa2
5
5
  SHA512:
6
- metadata.gz: b9136bda6b410d9d82c0884621ac4e632e76edbdfa2152fbefa92a13cdde81333d1b48657cd2711e92adfea7e66f2948bbbb099ccde2c6ea0c6b562ce15005bf
7
- data.tar.gz: a7c0135e5bfa4fa3186d1c5742f1aae7d909c34d986c7fe4d4baa3d4994a07e837f7d871d368361a91578bab4ce6aab07f14366281904195d756535a47b81236
6
+ metadata.gz: 5e6c60136a7aac529987dc16543daa49da5ad7f65120ab994e41f66f00a86665e68aeea7990089893d39f43161d4601ebc08df37f05264b9dc967a169f3fdb7b
7
+ data.tar.gz: f940ee99e5254db6ae88e5bc6297ec16f941ad6bf2f1e619c1cefc1605cf9577c8a838ce0423e2ba8dc7e58f875f88aedb287a1ef50e59e4676491cc0e1011d6
data/CHANGELOG.md CHANGED
@@ -1,6 +1,12 @@
1
1
  # Change Log
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
+ [2021-10-18] Version 6.5.2
5
+ --------------------------
6
+ **Library - Docs**
7
+ - [PR #472](https://github.com/sendgrid/sendgrid-ruby/pull/472): improve signed webhook event validation docs. Thanks to [@shwetha-manvinkurke](https://github.com/shwetha-manvinkurke)!
8
+
9
+
4
10
  [2021-09-08] Version 6.5.1
5
11
  --------------------------
6
12
  **Library - Chore**
data/TROUBLESHOOTING.md CHANGED
@@ -17,6 +17,7 @@ If you can't find a solution below, please open an [issue](https://github.com/se
17
17
  * [Rails Specifics](#rails-specifics)
18
18
  * [Ruby Versions](#ruby-versions)
19
19
  * [Viewing the Request Body](#viewing-the-request-body)
20
+ * [Verifying Event Webhooks](#signed-webhooks)
20
21
 
21
22
  <a name="migrating"></a>
22
23
  ## Migrating from v2 to v3
@@ -137,3 +138,14 @@ You can do this before `response = sg.client.mail._('send').post(request_body: m
137
138
  ```ruby
138
139
  puts mail.to_json
139
140
  ```
141
+
142
+ <a name="signed-webhooks"></a>
143
+ ## Signed Webhook Verification
144
+
145
+ Twilio SendGrid's Event Webhook will notify a URL via HTTP POST with information about events that occur as your mail is processed. [This](https://docs.sendgrid.com/for-developers/tracking-events/getting-started-event-webhook-security-features) article covers all you need to know to secure the Event Webhook, allowing you to verify that incoming requests originate from Twilio SendGrid. The sendgrid-ruby library can help you verify these Signed Event Webhooks.
146
+
147
+ You can find the usage example [here](examples/helpers/eventwebhook/example.rb) and the tests [here](spec/sendgrid/helpers/eventwebhook/eventwebhook_spec.rb).
148
+ If you are still having trouble getting the validation to work, follow the following instructions:
149
+ - Be sure to use the *raw* payload for validation
150
+ - Be sure to include a trailing carriage return and newline in your payload
151
+ - In case of multi-event webhooks, make sure you include the trailing newline and carriage return after *each* event
@@ -1,3 +1,3 @@
1
1
  module SendGrid
2
- VERSION = '6.5.1'.freeze
2
+ VERSION = '6.5.2'.freeze
3
3
  end
@@ -33,7 +33,7 @@ class TestAPI < MiniTest::Test
33
33
  assert_equal(test_headers, sg.request_headers)
34
34
  assert_equal('v3', sg.version)
35
35
  assert_equal(subuser, sg.impersonate_subuser)
36
- assert_equal('6.5.1', SendGrid::VERSION)
36
+ assert_equal('6.5.2', SendGrid::VERSION)
37
37
  assert_instance_of(SendGrid::Client, sg.client)
38
38
  assert_equal({}, sg.http_options)
39
39
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sendgrid-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.5.1
4
+ version: 6.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elmer Thomas
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2021-09-08 00:00:00.000000000 Z
13
+ date: 2021-10-18 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: ruby_http_client