sendgrid-ruby 6.3.3 → 6.3.8
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/.rubocop.yml +7 -5
- data/.rubocop_todo.yml +109 -0
- data/.travis.yml +2 -3
- data/CHANGELOG.md +54 -9
- data/CONTRIBUTING.md +8 -11
- data/FIRST_TIMERS.md +79 -0
- data/ISSUE_TEMPLATE.md +5 -1
- data/{LICENSE.md → LICENSE} +0 -0
- data/Makefile +2 -1
- data/PULL_REQUEST_TEMPLATE.md +5 -5
- data/README.md +24 -28
- data/Rakefile +2 -3
- data/TROUBLESHOOTING.md +5 -5
- data/USAGE.md +146 -39
- data/examples/accesssettings/accesssettings.rb +9 -12
- data/examples/alerts/alerts.rb +8 -11
- data/examples/apikeys/apikeys.rb +12 -15
- data/examples/asm/asm.rb +27 -30
- data/examples/browsers/browsers.rb +0 -3
- data/examples/campaigns/campaigns.rb +29 -32
- data/examples/categories/categories.rb +0 -3
- data/examples/clients/clients.rb +1 -4
- data/examples/contactdb/contactdb.rb +63 -66
- data/examples/devices/devices.rb +0 -3
- data/examples/emailactivity/emailactivity.rb +52 -0
- data/examples/geo/geo.rb +0 -3
- data/examples/helpers/eventwebhook/example.rb +4 -4
- data/examples/helpers/mail/example.rb +19 -13
- data/examples/helpers/settings/example.rb +1 -1
- data/examples/helpers/stats/example.rb +4 -4
- data/examples/ips/ips.rb +19 -22
- data/examples/mail/mail.rb +72 -75
- data/examples/mailboxproviders/mailboxproviders.rb +0 -3
- data/examples/mailsettings/mailsettings.rb +21 -24
- data/examples/partnersettings/partnersettings.rb +3 -6
- data/examples/scopes/scopes.rb +8 -10
- data/examples/senderauthentication/senderauthentication.rb +41 -44
- data/examples/senders/senders.rb +28 -31
- data/examples/stats/stats.rb +0 -3
- data/examples/subusers/subusers.rb +17 -20
- data/examples/suppression/suppression.rb +15 -18
- data/examples/templates/templates.rb +29 -31
- data/examples/trackingsettings/trackingsettings.rb +14 -17
- data/examples/user/user.rb +41 -44
- data/lib/rack/sendgrid_webhook_verification.rb +5 -2
- data/lib/sendgrid/base_interface.rb +2 -1
- data/lib/sendgrid/helpers/eventwebhook/eventwebhook.rb +4 -6
- data/lib/sendgrid/helpers/inbound/README.md +5 -5
- data/lib/sendgrid/helpers/inbound/app.rb +2 -2
- data/lib/sendgrid/helpers/inbound/public/index.html +1 -1
- data/lib/sendgrid/helpers/inbound/send.rb +3 -3
- data/lib/sendgrid/helpers/ip_management/ip_management.rb +1 -1
- data/lib/sendgrid/helpers/mail/README.md +3 -3
- data/lib/sendgrid/helpers/mail/asm.rb +6 -18
- data/lib/sendgrid/helpers/mail/attachment.rb +12 -42
- data/lib/sendgrid/helpers/mail/bcc_settings.rb +6 -18
- data/lib/sendgrid/helpers/mail/bypass_list_management.rb +8 -18
- data/lib/sendgrid/helpers/mail/category.rb +2 -2
- data/lib/sendgrid/helpers/mail/click_tracking.rb +6 -18
- data/lib/sendgrid/helpers/mail/content.rb +4 -3
- data/lib/sendgrid/helpers/mail/custom_arg.rb +6 -10
- data/lib/sendgrid/helpers/mail/email.rb +5 -4
- data/lib/sendgrid/helpers/mail/footer.rb +7 -27
- data/lib/sendgrid/helpers/mail/ganalytics.rb +10 -54
- data/lib/sendgrid/helpers/mail/header.rb +6 -10
- data/lib/sendgrid/helpers/mail/mail.rb +32 -48
- data/lib/sendgrid/helpers/mail/mail_settings.rb +9 -25
- data/lib/sendgrid/helpers/mail/open_tracking.rb +6 -18
- data/lib/sendgrid/helpers/mail/personalization.rb +34 -27
- data/lib/sendgrid/helpers/mail/section.rb +6 -10
- data/lib/sendgrid/helpers/mail/spam_check.rb +7 -27
- data/lib/sendgrid/helpers/mail/subscription_tracking.rb +8 -36
- data/lib/sendgrid/helpers/mail/substitution.rb +6 -10
- data/lib/sendgrid/helpers/mail/tracking_settings.rb +8 -20
- data/lib/sendgrid/helpers/permissions/scope.rb +2 -2
- data/lib/sendgrid/helpers/settings/README.md +2 -2
- data/lib/sendgrid/helpers/settings/settings.rb +1 -1
- data/lib/sendgrid/helpers/settings/tracking_settings_dto.rb +3 -5
- data/lib/sendgrid/helpers/stats/metrics.rb +5 -5
- data/lib/sendgrid/sendgrid.rb +1 -1
- data/lib/sendgrid/twilio_email.rb +1 -1
- data/lib/sendgrid/version.rb +1 -1
- data/mail_helper_v3.md +12 -12
- data/sendgrid-ruby.gemspec +8 -9
- data/spec/fixtures/event_webhook.rb +17 -11
- data/spec/rack/sendgrid_webhook_verification_spec.rb +30 -4
- data/spec/sendgrid/helpers/eventwebhook/eventwebhook_spec.rb +38 -36
- data/spec/sendgrid/helpers/settings/mail_settings_dto_spec.rb +1 -1
- data/spec/sendgrid/helpers/settings/partner_settings_dto_spec.rb +1 -1
- data/spec/sendgrid/helpers/settings/settings_spec.rb +2 -2
- data/spec/sendgrid/helpers/settings/tracking_settings_dto_spec.rb +1 -1
- data/spec/sendgrid/helpers/settings/user_settings_dto_spec.rb +1 -1
- data/spec/sendgrid/helpers/stats/email_stats_spec.rb +22 -23
- data/spec/sendgrid/helpers/stats/metrics_spec.rb +19 -20
- data/spec/sendgrid/helpers/stats/stats_response_spec.rb +22 -23
- data/spec/spec_helper.rb +1 -1
- data/static/img/github-fork.png +0 -0
- data/static/img/github-sign-up.png +0 -0
- data/test/sendgrid/helpers/mail/test_attachment.rb +4 -6
- data/test/sendgrid/helpers/mail/test_category.rb +0 -2
- data/test/sendgrid/helpers/mail/test_email.rb +9 -11
- data/test/sendgrid/helpers/mail/test_mail.rb +101 -102
- data/test/sendgrid/helpers/mail/test_personalizations.rb +106 -93
- data/test/sendgrid/permissions/test_scopes.rb +1 -3
- data/test/sendgrid/test_sendgrid-ruby.rb +1947 -1948
- data/twilio_sendgrid_logo.png +0 -0
- data/use-cases/domain-authentication.md +1 -1
- data/use-cases/email-statistics.md +1 -1
- data/use-cases/legacy-templates.md +1 -1
- data/use-cases/transactional-templates.md +1 -1
- metadata +42 -36
|
Binary file
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# How to Setup a Domain Authentication
|
|
2
2
|
|
|
3
|
-
You can find documentation for how to setup a domain authentication via the UI [here](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/) and via API [here](
|
|
3
|
+
You can find documentation for how to setup a domain authentication via the UI [here](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/) and via API [here](../USAGE.md#sender-authentication).
|
|
4
4
|
|
|
5
5
|
Find more information about all of Twilio SendGrid's authentication related documentation [here](https://sendgrid.com/docs/ui/account-and-settings/).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# How to View Email Statistics
|
|
2
2
|
|
|
3
|
-
You can find documentation for how to view your email statistics via the UI [here](https://app.sendgrid.com/statistics) and via API [here](
|
|
3
|
+
You can find documentation for how to view your email statistics via the UI [here](https://app.sendgrid.com/statistics) and via API [here](../USAGE.md#stats).
|
|
4
4
|
|
|
5
5
|
Alternatively, we can post events to a URL of your choice via our [Event Webhook](https://sendgrid.com/docs/API_Reference/Webhooks/event.html) about events that occur as Twilio SendGrid processes your email.
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Legacy Templates
|
|
2
2
|
|
|
3
|
-
For this example, we assume you have created a [legacy template](https://sendgrid.com/docs/User_Guide/Transactional_Templates/index.html). Following is the template content we used for testing.
|
|
3
|
+
For this example, we assume you have created a [legacy transactional template](https://sendgrid.com/docs/User_Guide/Transactional_Templates/index.html) in the UI or via the API. Following is the template content we used for testing.
|
|
4
4
|
|
|
5
5
|
Template ID (replace with your own):
|
|
6
6
|
```text
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Transactional Templates
|
|
2
2
|
|
|
3
|
-
For this example, we assume you have created a [transactional template](https://sendgrid.com/docs/
|
|
3
|
+
For this example, we assume you have created a [dynamic transactional template](https://sendgrid.com/docs/ui/sending-email/how-to-send-an-email-with-dynamic-transactional-templates/) in the UI or via the API. Following is the template content we used for testing.
|
|
4
4
|
|
|
5
5
|
Template ID (replace with your own):
|
|
6
6
|
```text
|
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.3.
|
|
4
|
+
version: 6.3.8
|
|
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: 2020-
|
|
13
|
+
date: 2020-12-16 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: ruby_http_client
|
|
@@ -27,41 +27,35 @@ dependencies:
|
|
|
27
27
|
- !ruby/object:Gem::Version
|
|
28
28
|
version: '3.4'
|
|
29
29
|
- !ruby/object:Gem::Dependency
|
|
30
|
-
name:
|
|
30
|
+
name: faker
|
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
|
32
32
|
requirements:
|
|
33
33
|
- - ">="
|
|
34
34
|
- !ruby/object:Gem::Version
|
|
35
|
-
version:
|
|
36
|
-
- - "<"
|
|
37
|
-
- !ruby/object:Gem::Version
|
|
38
|
-
version: '3'
|
|
35
|
+
version: '0'
|
|
39
36
|
type: :development
|
|
40
37
|
prerelease: false
|
|
41
38
|
version_requirements: !ruby/object:Gem::Requirement
|
|
42
39
|
requirements:
|
|
43
40
|
- - ">="
|
|
44
41
|
- !ruby/object:Gem::Version
|
|
45
|
-
version:
|
|
46
|
-
- - "<"
|
|
47
|
-
- !ruby/object:Gem::Version
|
|
48
|
-
version: '3'
|
|
42
|
+
version: '0'
|
|
49
43
|
- !ruby/object:Gem::Dependency
|
|
50
|
-
name:
|
|
44
|
+
name: minitest
|
|
51
45
|
requirement: !ruby/object:Gem::Requirement
|
|
52
46
|
requirements:
|
|
53
47
|
- - "~>"
|
|
54
48
|
- !ruby/object:Gem::Version
|
|
55
|
-
version: '
|
|
49
|
+
version: '5.9'
|
|
56
50
|
type: :development
|
|
57
51
|
prerelease: false
|
|
58
52
|
version_requirements: !ruby/object:Gem::Requirement
|
|
59
53
|
requirements:
|
|
60
54
|
- - "~>"
|
|
61
55
|
- !ruby/object:Gem::Version
|
|
62
|
-
version: '
|
|
56
|
+
version: '5.9'
|
|
63
57
|
- !ruby/object:Gem::Dependency
|
|
64
|
-
name:
|
|
58
|
+
name: pry
|
|
65
59
|
requirement: !ruby/object:Gem::Requirement
|
|
66
60
|
requirements:
|
|
67
61
|
- - ">="
|
|
@@ -75,7 +69,7 @@ dependencies:
|
|
|
75
69
|
- !ruby/object:Gem::Version
|
|
76
70
|
version: '0'
|
|
77
71
|
- !ruby/object:Gem::Dependency
|
|
78
|
-
name:
|
|
72
|
+
name: rack
|
|
79
73
|
requirement: !ruby/object:Gem::Requirement
|
|
80
74
|
requirements:
|
|
81
75
|
- - ">="
|
|
@@ -89,21 +83,21 @@ dependencies:
|
|
|
89
83
|
- !ruby/object:Gem::Version
|
|
90
84
|
version: '0'
|
|
91
85
|
- !ruby/object:Gem::Dependency
|
|
92
|
-
name:
|
|
86
|
+
name: rake
|
|
93
87
|
requirement: !ruby/object:Gem::Requirement
|
|
94
88
|
requirements:
|
|
95
|
-
- - "
|
|
89
|
+
- - "~>"
|
|
96
90
|
- !ruby/object:Gem::Version
|
|
97
|
-
version: '0'
|
|
91
|
+
version: '13.0'
|
|
98
92
|
type: :development
|
|
99
93
|
prerelease: false
|
|
100
94
|
version_requirements: !ruby/object:Gem::Requirement
|
|
101
95
|
requirements:
|
|
102
|
-
- - "
|
|
96
|
+
- - "~>"
|
|
103
97
|
- !ruby/object:Gem::Version
|
|
104
|
-
version: '0'
|
|
98
|
+
version: '13.0'
|
|
105
99
|
- !ruby/object:Gem::Dependency
|
|
106
|
-
name:
|
|
100
|
+
name: rspec
|
|
107
101
|
requirement: !ruby/object:Gem::Requirement
|
|
108
102
|
requirements:
|
|
109
103
|
- - ">="
|
|
@@ -117,47 +111,53 @@ dependencies:
|
|
|
117
111
|
- !ruby/object:Gem::Version
|
|
118
112
|
version: '0'
|
|
119
113
|
- !ruby/object:Gem::Dependency
|
|
120
|
-
name:
|
|
114
|
+
name: rubocop
|
|
121
115
|
requirement: !ruby/object:Gem::Requirement
|
|
122
116
|
requirements:
|
|
123
|
-
- - "
|
|
117
|
+
- - ">="
|
|
124
118
|
- !ruby/object:Gem::Version
|
|
125
|
-
version: '
|
|
119
|
+
version: '0'
|
|
126
120
|
type: :development
|
|
127
121
|
prerelease: false
|
|
128
122
|
version_requirements: !ruby/object:Gem::Requirement
|
|
129
123
|
requirements:
|
|
130
|
-
- - "
|
|
124
|
+
- - ">="
|
|
131
125
|
- !ruby/object:Gem::Version
|
|
132
|
-
version: '
|
|
126
|
+
version: '0'
|
|
133
127
|
- !ruby/object:Gem::Dependency
|
|
134
|
-
name:
|
|
128
|
+
name: simplecov
|
|
135
129
|
requirement: !ruby/object:Gem::Requirement
|
|
136
130
|
requirements:
|
|
137
|
-
- - "
|
|
131
|
+
- - "~>"
|
|
138
132
|
- !ruby/object:Gem::Version
|
|
139
|
-
version:
|
|
133
|
+
version: 0.18.5
|
|
140
134
|
type: :development
|
|
141
135
|
prerelease: false
|
|
142
136
|
version_requirements: !ruby/object:Gem::Requirement
|
|
143
137
|
requirements:
|
|
144
|
-
- - "
|
|
138
|
+
- - "~>"
|
|
145
139
|
- !ruby/object:Gem::Version
|
|
146
|
-
version:
|
|
140
|
+
version: 0.18.5
|
|
147
141
|
- !ruby/object:Gem::Dependency
|
|
148
|
-
name:
|
|
142
|
+
name: sinatra
|
|
149
143
|
requirement: !ruby/object:Gem::Requirement
|
|
150
144
|
requirements:
|
|
151
145
|
- - ">="
|
|
152
146
|
- !ruby/object:Gem::Version
|
|
153
|
-
version:
|
|
147
|
+
version: 1.4.7
|
|
148
|
+
- - "<"
|
|
149
|
+
- !ruby/object:Gem::Version
|
|
150
|
+
version: '3'
|
|
154
151
|
type: :development
|
|
155
152
|
prerelease: false
|
|
156
153
|
version_requirements: !ruby/object:Gem::Requirement
|
|
157
154
|
requirements:
|
|
158
155
|
- - ">="
|
|
159
156
|
- !ruby/object:Gem::Version
|
|
160
|
-
version:
|
|
157
|
+
version: 1.4.7
|
|
158
|
+
- - "<"
|
|
159
|
+
- !ruby/object:Gem::Version
|
|
160
|
+
version: '3'
|
|
161
161
|
description: Official Twilio SendGrid Gem to Interact with Twilio SendGrids API in
|
|
162
162
|
native Ruby
|
|
163
163
|
email: help@twilio.com
|
|
@@ -169,14 +169,16 @@ files:
|
|
|
169
169
|
- ".env_sample"
|
|
170
170
|
- ".gitignore"
|
|
171
171
|
- ".rubocop.yml"
|
|
172
|
+
- ".rubocop_todo.yml"
|
|
172
173
|
- ".travis.yml"
|
|
173
174
|
- CHANGELOG.md
|
|
174
175
|
- CODE_OF_CONDUCT.md
|
|
175
176
|
- CONTRIBUTING.md
|
|
176
177
|
- Dockerfile
|
|
178
|
+
- FIRST_TIMERS.md
|
|
177
179
|
- Gemfile
|
|
178
180
|
- ISSUE_TEMPLATE.md
|
|
179
|
-
- LICENSE
|
|
181
|
+
- LICENSE
|
|
180
182
|
- Makefile
|
|
181
183
|
- PULL_REQUEST_TEMPLATE.md
|
|
182
184
|
- README.md
|
|
@@ -195,6 +197,7 @@ files:
|
|
|
195
197
|
- examples/clients/clients.rb
|
|
196
198
|
- examples/contactdb/contactdb.rb
|
|
197
199
|
- examples/devices/devices.rb
|
|
200
|
+
- examples/emailactivity/emailactivity.rb
|
|
198
201
|
- examples/geo/geo.rb
|
|
199
202
|
- examples/helpers/eventwebhook/example.rb
|
|
200
203
|
- examples/helpers/mail/example.rb
|
|
@@ -282,6 +285,8 @@ files:
|
|
|
282
285
|
- spec/sendgrid/sendgrid_spec.rb
|
|
283
286
|
- spec/sendgrid/twilio_email_spec.rb
|
|
284
287
|
- spec/spec_helper.rb
|
|
288
|
+
- static/img/github-fork.png
|
|
289
|
+
- static/img/github-sign-up.png
|
|
285
290
|
- test/sendgrid/helpers/mail/test_attachment.rb
|
|
286
291
|
- test/sendgrid/helpers/mail/test_category.rb
|
|
287
292
|
- test/sendgrid/helpers/mail/test_email.rb
|
|
@@ -289,6 +294,7 @@ files:
|
|
|
289
294
|
- test/sendgrid/helpers/mail/test_personalizations.rb
|
|
290
295
|
- test/sendgrid/permissions/test_scopes.rb
|
|
291
296
|
- test/sendgrid/test_sendgrid-ruby.rb
|
|
297
|
+
- twilio_sendgrid_logo.png
|
|
292
298
|
- use-cases/README.md
|
|
293
299
|
- use-cases/domain-authentication.md
|
|
294
300
|
- use-cases/email-statistics.md
|