sendgrid-ruby 6.2.1 → 6.3.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.codeclimate.yml +1 -1
- data/.gitignore +1 -1
- data/.rubocop.yml +4 -0
- data/.rubocop_todo.yml +109 -0
- data/.travis.yml +3 -4
- data/CHANGELOG.md +69 -9
- data/CONTRIBUTING.md +11 -21
- data/FIRST_TIMERS.md +79 -0
- data/Gemfile +0 -1
- data/ISSUE_TEMPLATE.md +5 -1
- data/Makefile +4 -2
- data/PULL_REQUEST_TEMPLATE.md +1 -1
- data/README.md +22 -27
- data/Rakefile +2 -3
- data/TROUBLESHOOTING.md +5 -5
- data/USAGE.md +145 -38
- 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 +16 -0
- 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 +7 -9
- 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 +53 -0
- data/lib/sendgrid-ruby.rb +2 -0
- data/lib/sendgrid/base_interface.rb +1 -1
- data/lib/sendgrid/helpers/eventwebhook/eventwebhook.rb +50 -0
- data/lib/sendgrid/helpers/inbound/README.md +5 -5
- data/lib/sendgrid/helpers/inbound/app.rb +1 -1
- data/lib/sendgrid/helpers/inbound/public/index.html +1 -1
- data/lib/sendgrid/helpers/inbound/send.rb +2 -2
- 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 +30 -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 +7 -20
- data/lib/sendgrid/helpers/permissions/scope.rb +1 -1
- 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 -7
- data/spec/fixtures/event_webhook.rb +22 -0
- data/spec/rack/sendgrid_webhook_verification_spec.rb +116 -0
- data/spec/sendgrid/helpers/eventwebhook/eventwebhook_spec.rb +105 -0
- 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 +3 -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 +0 -2
- data/test/sendgrid/test_sendgrid-ruby.rb +1948 -1958
- data/twilio_sendgrid_logo.png +0 -0
- data/use-cases/README.md +16 -0
- data/use-cases/domain-authentication.md +5 -0
- data/use-cases/email-statistics.md +52 -0
- data/use-cases/legacy-templates.md +98 -0
- data/use-cases/sms.md +39 -0
- data/use-cases/transactional-templates.md +111 -0
- data/use-cases/twilio-email.md +13 -0
- data/use-cases/twilio-setup.md +54 -0
- metadata +73 -24
- data/USE_CASES.md +0 -405
- data/docker/Dockerfile +0 -12
- data/docker/README.md +0 -30
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e029e78d950c6d118cf0444a43ea84aaaa93a7524fb35d22e0442e9a575ae18e
|
4
|
+
data.tar.gz: 136c50aab4d0f6561acccad706b2238eee7bc3d76d723055ce43f38fd4ef747a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff63561ef8b7ea73bf7125c3cd62803e0ffe50a73914fbd3736d7d3aed8a98c23f6f8b6a1ab7c07d9eefc5b1fabed78586d8d27bafd548c87d4f79f422eb430f
|
7
|
+
data.tar.gz: 3d7eb06f425f60994db736113f45c9db3406b63f4bc1ff1a6e7eadd6761f8a67ba98eda05cf6830eef40fd9143046219ec3e7fa9d5b58da8bc270eddf0809a68
|
data/.codeclimate.yml
CHANGED
data/.gitignore
CHANGED
data/.rubocop.yml
ADDED
data/.rubocop_todo.yml
ADDED
@@ -0,0 +1,109 @@
|
|
1
|
+
# This configuration was generated by
|
2
|
+
# `rubocop --auto-gen-config`
|
3
|
+
# on 2020-09-18 20:20:54 UTC using RuboCop version 0.91.0.
|
4
|
+
# The point is for the user to remove these configuration records
|
5
|
+
# one by one as the offenses are removed from the code base.
|
6
|
+
# Note that changes in the inspected code, or installation of new
|
7
|
+
# versions of RuboCop, may require this file to be generated again.
|
8
|
+
|
9
|
+
# Offense count: 1
|
10
|
+
# Configuration parameters: Include.
|
11
|
+
# Include: **/*.gemspec
|
12
|
+
Gemspec/RequiredRubyVersion:
|
13
|
+
Exclude:
|
14
|
+
- 'sendgrid-ruby.gemspec'
|
15
|
+
|
16
|
+
# Offense count: 22
|
17
|
+
Lint/UselessAssignment:
|
18
|
+
Exclude:
|
19
|
+
- 'examples/scopes/scopes.rb'
|
20
|
+
- 'spec/rack/sendgrid_webhook_verification_spec.rb'
|
21
|
+
|
22
|
+
# Offense count: 8
|
23
|
+
# Configuration parameters: IgnoredMethods.
|
24
|
+
Metrics/AbcSize:
|
25
|
+
Max: 144
|
26
|
+
|
27
|
+
# Offense count: 9
|
28
|
+
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods.
|
29
|
+
# ExcludedMethods: refine
|
30
|
+
Metrics/BlockLength:
|
31
|
+
Max: 96
|
32
|
+
|
33
|
+
# Offense count: 3
|
34
|
+
# Configuration parameters: CountComments, CountAsOne.
|
35
|
+
Metrics/ClassLength:
|
36
|
+
Max: 2006
|
37
|
+
|
38
|
+
# Offense count: 41
|
39
|
+
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods.
|
40
|
+
Metrics/MethodLength:
|
41
|
+
Max: 141
|
42
|
+
|
43
|
+
# Offense count: 2
|
44
|
+
# Configuration parameters: CountKeywordArgs.
|
45
|
+
Metrics/ParameterLists:
|
46
|
+
Max: 7
|
47
|
+
|
48
|
+
# Offense count: 4
|
49
|
+
# Configuration parameters: ExpectMatchingDefinition, CheckDefinitionPathHierarchy, Regex, IgnoreExecutableScripts, AllowedAcronyms.
|
50
|
+
# AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS
|
51
|
+
Naming/FileName:
|
52
|
+
Exclude:
|
53
|
+
- 'gemfiles/Sinatra_1.gemfile'
|
54
|
+
- 'gemfiles/Sinatra_2.gemfile'
|
55
|
+
- 'lib/sendgrid-ruby.rb'
|
56
|
+
- 'test/sendgrid/test_sendgrid-ruby.rb'
|
57
|
+
|
58
|
+
# Offense count: 1
|
59
|
+
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
|
60
|
+
# AllowedNames: at, by, db, id, in, io, ip, of, on, os, pp, to
|
61
|
+
Naming/MethodParameterName:
|
62
|
+
Exclude:
|
63
|
+
- 'lib/sendgrid/helpers/mail/personalization.rb'
|
64
|
+
|
65
|
+
# Offense count: 1
|
66
|
+
# Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros.
|
67
|
+
# NamePrefix: is_, has_, have_
|
68
|
+
# ForbiddenPrefixes: is_, has_, have_
|
69
|
+
# AllowedMethods: is_a?
|
70
|
+
# MethodDefinitionMacros: define_method, define_singleton_method
|
71
|
+
Naming/PredicateName:
|
72
|
+
Exclude:
|
73
|
+
- 'spec/**/*'
|
74
|
+
- 'examples/helpers/eventwebhook/example.rb'
|
75
|
+
|
76
|
+
# Offense count: 35
|
77
|
+
Style/Documentation:
|
78
|
+
Enabled: false
|
79
|
+
|
80
|
+
# Offense count: 4
|
81
|
+
# Configuration parameters: EnforcedStyle.
|
82
|
+
# SupportedStyles: annotated, template, unannotated
|
83
|
+
Style/FormatStringToken:
|
84
|
+
Exclude:
|
85
|
+
- 'examples/emailactivity/emailactivity.rb'
|
86
|
+
|
87
|
+
# Offense count: 97
|
88
|
+
# Cop supports --auto-correct.
|
89
|
+
# Configuration parameters: EnforcedStyle.
|
90
|
+
# SupportedStyles: always, always_true, never
|
91
|
+
Style/FrozenStringLiteralComment:
|
92
|
+
Enabled: false
|
93
|
+
|
94
|
+
# Offense count: 6
|
95
|
+
Style/MixinUsage:
|
96
|
+
Exclude:
|
97
|
+
- 'examples/helpers/eventwebhook/example.rb'
|
98
|
+
- 'examples/helpers/mail/example.rb'
|
99
|
+
- 'examples/helpers/settings/example.rb'
|
100
|
+
- 'examples/helpers/stats/example.rb'
|
101
|
+
- 'test/sendgrid/helpers/mail/test_attachment.rb'
|
102
|
+
- 'test/sendgrid/helpers/mail/test_mail.rb'
|
103
|
+
|
104
|
+
# Offense count: 55
|
105
|
+
# Cop supports --auto-correct.
|
106
|
+
# Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
107
|
+
# URISchemes: http, https
|
108
|
+
Layout/LineLength:
|
109
|
+
Max: 3211
|
data/.travis.yml
CHANGED
@@ -14,16 +14,15 @@ script: make test-docker
|
|
14
14
|
|
15
15
|
deploy:
|
16
16
|
provider: rubygems
|
17
|
-
api_key:
|
18
|
-
secure: CWlfN170i/fHPrIufHHLWQ0utjuhxf4ELSxKeypIuO2CNTqNMzocDAa2vxMt4XfO6d2wFPV/LC+IHR7i+sp7PKvjRoa4BLUUxjfBNDboc0gGESeUYlAxwsJo0tOVCNmpxgjQKqtPLz/19A/v/xpxLv2Im/9Idqa5ATd06sMDdM8=
|
17
|
+
api_key: $RUBYGEMS_API_KEY
|
19
18
|
gem: sendgrid-ruby
|
20
19
|
on:
|
21
20
|
tags: true
|
22
|
-
condition: $version=ruby:2.4
|
21
|
+
condition: $version = ruby:2.4 && $BUNDLE_GEMFILE = *"gemfiles/Sinatra_1.gemfile"
|
23
22
|
|
24
23
|
notifications:
|
25
24
|
slack:
|
26
|
-
if: branch =
|
25
|
+
if: branch = main
|
27
26
|
on_pull_requests: false
|
28
27
|
on_success: never
|
29
28
|
on_failure: change
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,66 @@
|
|
1
1
|
# Change Log
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
3
|
|
4
|
+
[2020-09-28] Version 6.3.5
|
5
|
+
--------------------------
|
6
|
+
**Library - Fix**
|
7
|
+
- [PR #437](https://github.com/sendgrid/sendgrid-ruby/pull/437): Raise error when adding duplicate email address in Personalizations. Thanks to [@Pranc1ngPegasus](https://github.com/Pranc1ngPegasus)!
|
8
|
+
|
9
|
+
**Library - Docs**
|
10
|
+
- [PR #322](https://github.com/sendgrid/sendgrid-ruby/pull/322): Update documentation for retrieving a list of all templates. Thanks to [@renshuki](https://github.com/renshuki)!
|
11
|
+
- [PR #332](https://github.com/sendgrid/sendgrid-ruby/pull/332): Add Email activity API Documentation. Thanks to [@dhoeric](https://github.com/dhoeric)!
|
12
|
+
|
13
|
+
**Library - Test**
|
14
|
+
- [PR #315](https://github.com/sendgrid/sendgrid-ruby/pull/315): Add rubocop check to CI. Thanks to [@dipil-saud](https://github.com/dipil-saud)!
|
15
|
+
|
16
|
+
**Library - Chore**
|
17
|
+
- [PR #339](https://github.com/sendgrid/sendgrid-ruby/pull/339): Added rubocop configs and changed source files with rubocop "offenses". Thanks to [@douglaslise](https://github.com/douglaslise)!
|
18
|
+
- [PR #338](https://github.com/sendgrid/sendgrid-ruby/pull/338): Refactor getters and setters to use ruby accessors. Thanks to [@douglaslise](https://github.com/douglaslise)!
|
19
|
+
|
20
|
+
|
21
|
+
[2020-08-19] Version 6.3.4
|
22
|
+
--------------------------
|
23
|
+
**Library - Docs**
|
24
|
+
- [PR #319](https://github.com/sendgrid/sendgrid-ruby/pull/319): Run all the *.md files through grammar.ly service and update accordingly. Thanks to [@Sarthakagarwal22](https://github.com/Sarthakagarwal22)!
|
25
|
+
- [PR #344](https://github.com/sendgrid/sendgrid-ruby/pull/344): Update example.rb. Thanks to [@kylearoberts](https://github.com/kylearoberts)!
|
26
|
+
|
27
|
+
**Library - Chore**
|
28
|
+
- [PR #432](https://github.com/sendgrid/sendgrid-ruby/pull/432): update GitHub branch references to use HEAD. Thanks to [@thinkingserious](https://github.com/thinkingserious)!
|
29
|
+
|
30
|
+
|
31
|
+
[2020-07-22] Version 6.3.3
|
32
|
+
--------------------------
|
33
|
+
**Library - Chore**
|
34
|
+
- [PR #431](https://github.com/sendgrid/sendgrid-ruby/pull/431): migrate to new default sendgrid-oai branch. Thanks to [@eshanholtz](https://github.com/eshanholtz)!
|
35
|
+
- [PR #366](https://github.com/sendgrid/sendgrid-ruby/pull/366): add Rubocop configuration file. Thanks to [@RolandBurrows](https://github.com/RolandBurrows)!
|
36
|
+
|
37
|
+
**Library - Test**
|
38
|
+
- [PR #429](https://github.com/sendgrid/sendgrid-ruby/pull/429): fix the license test and actually run the test scripts. Thanks to [@childish-sambino](https://github.com/childish-sambino)!
|
39
|
+
|
40
|
+
**Library - Docs**
|
41
|
+
- [PR #273](https://github.com/sendgrid/sendgrid-ruby/pull/273): Create a Use Cases Directory and Associated Files. Thanks to [@alanunruh](https://github.com/alanunruh)!
|
42
|
+
|
43
|
+
|
44
|
+
[2020-07-08] Version 6.3.2
|
45
|
+
--------------------------
|
46
|
+
**Library - Test**
|
47
|
+
- [PR #368](https://github.com/sendgrid/sendgrid-ruby/pull/368): add Simplecov Local Enhancements. Thanks to [@RolandBurrows](https://github.com/RolandBurrows)!
|
48
|
+
|
49
|
+
|
50
|
+
[2020-06-25] Version 6.3.1
|
51
|
+
--------------------------
|
52
|
+
|
53
|
+
|
54
|
+
[2020-06-24] Version 6.3.0
|
55
|
+
--------------------------
|
56
|
+
**Library - Feature**
|
57
|
+
- [PR #428](https://github.com/sendgrid/sendgrid-ruby/pull/428): adds rack middleware to make request verification easier in rack apps. Thanks to [@philnash](https://github.com/philnash)!
|
58
|
+
- [PR #425](https://github.com/sendgrid/sendgrid-ruby/pull/425): verify signature from event webhook. Thanks to [@eshanholtz](https://github.com/eshanholtz)!
|
59
|
+
|
60
|
+
**Library - Fix**
|
61
|
+
- [PR #427](https://github.com/sendgrid/sendgrid-ruby/pull/427): drop the starkbank dependency. Thanks to [@childish-sambino](https://github.com/childish-sambino)!
|
62
|
+
|
63
|
+
|
4
64
|
[2020-05-13] Version 6.2.1
|
5
65
|
--------------------------
|
6
66
|
**Library - Fix**
|
@@ -87,7 +147,7 @@ All notable changes to this project will be documented in this file.
|
|
87
147
|
[2019-06-04] Version 6.0.0
|
88
148
|
--------------------------
|
89
149
|
### BREAKING CHANGE
|
90
|
-
- [PR #284](https://github.com/sendgrid/sendgrid-ruby/pull/284): The sinatra gem is no longer specified as a dependency of this gem. If you would like to use the inbound processing, please follow the [upgrade guide](
|
150
|
+
- [PR #284](https://github.com/sendgrid/sendgrid-ruby/pull/284): The sinatra gem is no longer specified as a dependency of this gem. If you would like to use the inbound processing, please follow the [upgrade guide](UPGRADE.md). Big thanks to [@jjb](https://github.com/jjb) for the PR!
|
91
151
|
|
92
152
|
### Added
|
93
153
|
- [PR #271](https://github.com/sendgrid/sendgrid-ruby/pull/271): Add ability to impersonate a subuser. Big thanks to [@danilospa](https://github.com/danilospa) for the PR!
|
@@ -128,7 +188,7 @@ All notable changes to this project will be documented in this file.
|
|
128
188
|
|
129
189
|
## [5.2.0] - 2017-10-30 ##
|
130
190
|
### Added
|
131
|
-
- PR #234: Helpers for email statistics - global, category, subuser
|
191
|
+
- PR #234: Helpers for email statistics - global, category, subuser
|
132
192
|
- Thanks to [Awin Abi](https://github.com/awinabi) for the pull request!
|
133
193
|
|
134
194
|
## [5.1.0] - 2017-9-1 ##
|
@@ -154,7 +214,7 @@ All notable changes to this project will be documented in this file.
|
|
154
214
|
- `mail.headers` becomes `mail.add_header()`
|
155
215
|
- `mail.categories` becomes `mail.add_category()`
|
156
216
|
- `mail.custom_args` becomes `mail.custom_args()`
|
157
|
-
- For a full example of usage, please [see here](
|
217
|
+
- For a full example of usage, please [see here](examples/helpers/mail/example.rb#L21).
|
158
218
|
|
159
219
|
## [4.3.3] - 2017-5-2
|
160
220
|
### Update
|
@@ -165,7 +225,7 @@ All notable changes to this project will be documented in this file.
|
|
165
225
|
## [4.3.2] - 2017-5-1 ##
|
166
226
|
### Fixes
|
167
227
|
- #161: Fixed problematic Sinatra dependency
|
168
|
-
- Brings back Rails 4 compatibility (and Rack 1.x applications, in general), also removes release candidate version constraint (both broken in #160). Moreover, ensures that tests are run against two major Sinatra versions, which should protect from compatibility issues in future, somewhat. Related issue: #159.
|
228
|
+
- Brings back Rails 4 compatibility (and Rack 1.x applications, in general), also removes release candidate version constraint (both broken in #160). Moreover, ensures that tests are run against two major Sinatra versions, which should protect from compatibility issues in the future, somewhat. Related issue: #159.
|
169
229
|
- Thanks to [Sebastian Skałacki](https://github.com/skalee) for the pull request!
|
170
230
|
|
171
231
|
## [4.3.1] - 2017-4-12 ##
|
@@ -177,7 +237,7 @@ All notable changes to this project will be documented in this file.
|
|
177
237
|
## [4.3.0] - 2017-4-12 ##
|
178
238
|
### Added
|
179
239
|
- #70: Adds an account settings management helper object
|
180
|
-
- See the [helper README](
|
240
|
+
- See the [helper README](lib/sendgrid/helpers/settings) for details
|
181
241
|
- Thanks to [Kyle Kern](https://github.com/kernkw) for the pull request!
|
182
242
|
|
183
243
|
## [4.2.1] - 2017-4-10 ##
|
@@ -187,8 +247,8 @@ All notable changes to this project will be documented in this file.
|
|
187
247
|
|
188
248
|
## [4.2.0] - 2017-4-10 ##
|
189
249
|
### Added
|
190
|
-
- #148: Set api_key to empty string
|
191
|
-
- This makes creating an API key for a SendGrid
|
250
|
+
- #148: Set api_key to an empty string
|
251
|
+
- This makes creating an API key for a SendGrid sub-user who does not have an API key easier. See #146 for details
|
192
252
|
- Thanks to [Adam Beck](https://github.com/Gwash3189) for the pull request!
|
193
253
|
|
194
254
|
## [4.1.1] - 2017-4-6 ##
|
@@ -229,7 +289,7 @@ All notable changes to this project will be documented in this file.
|
|
229
289
|
## [4.0.3] - 2016-08-24 ##
|
230
290
|
### Added
|
231
291
|
- Table of Contents in the README
|
232
|
-
- Added a [USE_CASES.md](
|
292
|
+
- Added a [USE_CASES.md](USE_CASES.md) section, with the first use case example for transactional templates
|
233
293
|
|
234
294
|
## [4.0.2] - 2016-07-26 ##
|
235
295
|
### Fixed
|
@@ -237,7 +297,7 @@ All notable changes to this project will be documented in this file.
|
|
237
297
|
|
238
298
|
## [4.0.1] - 2016-07-25 ##
|
239
299
|
### Added
|
240
|
-
- [Troubleshooting](
|
300
|
+
- [Troubleshooting](TROUBLESHOOTING.md) section
|
241
301
|
|
242
302
|
## [4.0.0] - 2016-07-23 ##
|
243
303
|
### BREAKING CHANGE
|
data/CONTRIBUTING.md
CHANGED
@@ -17,9 +17,6 @@ Hello! Thank you for choosing to help contribute to one of the Twilio SendGrid o
|
|
17
17
|
- [Creating a Pull Request](#creating-a-pull-request)
|
18
18
|
- [Code Reviews](#code-reviews)
|
19
19
|
|
20
|
-
<a name="roadmap"></a>
|
21
|
-
We use [Milestones](https://github.com/sendgrid/sendgrid-ruby/milestones) to help define current roadmaps, please feel free to grab an issue from the current milestone. Please indicate that you have begun work on it to avoid collisions. Once a PR is made, community review, comments, suggestions and additional PRs are welcomed and encouraged.
|
22
|
-
|
23
20
|
There are a few ways to contribute, which we'll enumerate below:
|
24
21
|
|
25
22
|
<a name="feature-request"></a>
|
@@ -42,12 +39,12 @@ A software bug is a demonstrable issue in the code base. In order for us to diag
|
|
42
39
|
Before you decide to create a new issue, please try the following:
|
43
40
|
|
44
41
|
1. Check the Github issues tab if the identified issue has already been reported, if so, please add a +1 to the existing post.
|
45
|
-
2. Update to the latest version of this code and check if issue has already been fixed
|
42
|
+
2. Update to the latest version of this code and check if an issue has already been fixed
|
46
43
|
3. Copy and fill in the Bug Report Template we have provided below
|
47
44
|
|
48
45
|
### Please use our Bug Report Template
|
49
46
|
|
50
|
-
In order to make the process easier, we've included a [sample bug report template](
|
47
|
+
In order to make the process easier, we've included a [sample bug report template](ISSUE_TEMPLATE.md).
|
51
48
|
|
52
49
|
<a name="improvements-to-the-codebase"></a>
|
53
50
|
## Improvements to the Codebase
|
@@ -93,7 +90,7 @@ source ./sendgrid.env
|
|
93
90
|
|
94
91
|
##### Execute: #####
|
95
92
|
|
96
|
-
See the [examples folder](
|
93
|
+
See the [examples folder](examples) to get started quickly.
|
97
94
|
|
98
95
|
To run the examples using the local version of this library from the root directory of this repo, please replace:
|
99
96
|
|
@@ -124,20 +121,13 @@ Tests for the mail send and Web API v3 endpoints.
|
|
124
121
|
|
125
122
|
The Web API v3 client is `sendgrid-ruby.rb`
|
126
123
|
|
127
|
-
<a name="testing"></a>
|
128
124
|
## Testing
|
129
125
|
|
130
|
-
All PRs require passing tests before the PR will be reviewed.
|
131
|
-
|
132
|
-
All test files are in the [`tests`](https://github.com/sendgrid/sendgrid-ruby/tree/master/test) directory.
|
126
|
+
All PRs require passing tests before the PR will be reviewed. All test files are in the [`tests`](test) directory. For the purposes of contributing to this repo, please update the [`test_sendgrid-ruby.rb`](test/sendgrid/test_sendgrid-ruby.rb) file with unit tests as you modify the code.
|
133
127
|
|
134
|
-
|
128
|
+
The integration tests require a Twilio SendGrid mock API in order to execute. We've simplified setting this up using Docker to run the tests. You will just need [Docker Desktop](https://docs.docker.com/get-docker/) and `make`.
|
135
129
|
|
136
|
-
|
137
|
-
|
138
|
-
```bash
|
139
|
-
rake
|
140
|
-
```
|
130
|
+
Once these are available, simply execute the Docker test target to run all tests: `make test-docker`. This command can also be used to open an interactive shell into the container where this library is installed. To start a *bash* shell for example, use this command: `command=bash make test-docker`.
|
141
131
|
|
142
132
|
<a name="style-guidelines-and-naming-conventions"></a>
|
143
133
|
## Style Guidelines & Naming Conventions
|
@@ -159,10 +149,10 @@ Please run your code through:
|
|
159
149
|
```bash
|
160
150
|
# Clone your fork of the repo into the current directory
|
161
151
|
git clone https://github.com/sendgrid/sendgrid-ruby
|
162
|
-
|
152
|
+
|
163
153
|
# Navigate to the newly cloned directory
|
164
154
|
cd sendgrid-ruby
|
165
|
-
|
155
|
+
|
166
156
|
# Assign the original repo to a remote called "upstream"
|
167
157
|
git remote add upstream https://github.com/sendgrid/sendgrid-ruby
|
168
158
|
```
|
@@ -183,7 +173,7 @@ Please run your code through:
|
|
183
173
|
|
184
174
|
4. Commit your changes in logical chunks. Please adhere to these [git commit
|
185
175
|
message guidelines](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)
|
186
|
-
or your code is unlikely be merged into the main project. Use Git's
|
176
|
+
or your code is unlikely to be merged into the main project. Use Git's
|
187
177
|
[interactive rebase](https://help.github.com/articles/interactive-rebase)
|
188
178
|
feature to tidy up your commits before making them public.
|
189
179
|
|
@@ -194,7 +184,7 @@ Please run your code through:
|
|
194
184
|
5. Locally merge (or rebase) the upstream development branch into your topic branch:
|
195
185
|
|
196
186
|
```bash
|
197
|
-
git pull [--rebase] upstream
|
187
|
+
git pull [--rebase] upstream main
|
198
188
|
```
|
199
189
|
|
200
190
|
6. Push your topic branch up to your fork:
|
@@ -204,7 +194,7 @@ Please run your code through:
|
|
204
194
|
```
|
205
195
|
|
206
196
|
7. [Open a Pull Request](https://help.github.com/articles/using-pull-requests/)
|
207
|
-
with a clear title and description against the `
|
197
|
+
with a clear title and description against the `main` branch. All tests must be passing before we will review the PR.
|
208
198
|
|
209
199
|
<a name="code-reviews"></a>
|
210
200
|
## Code Reviews
|
data/FIRST_TIMERS.md
ADDED
@@ -0,0 +1,79 @@
|
|
1
|
+
# How To Contribute to Twilio SendGrid Repositories via GitHub
|
2
|
+
Contributing to the Twilio SendGrid repositories is easy! All you need to do is find an open issue (see the bottom of this page for a list of repositories containing open issues), fix it and submit a pull request. Once you have submitted your pull request, the team can easily review it before it is merged into the repository.
|
3
|
+
|
4
|
+
To make a pull request, follow these steps:
|
5
|
+
|
6
|
+
1. Log into GitHub. If you do not already have a GitHub account, you will have to create one in order to submit a change. Click the Sign up link in the upper right-hand corner to create an account. Enter your username, password, and email address. If you are an employee of Twilio SendGrid, please use your full name with your GitHub account and enter Twilio SendGrid as your company so we can easily identify you.
|
7
|
+
|
8
|
+
<img src="/static/img/github-sign-up.png" width="800">
|
9
|
+
|
10
|
+
2. __[Fork](https://help.github.com/fork-a-repo/)__ the [sendgrid-ruby](https://github.com/sendgrid/sendgrid-ruby) repository:
|
11
|
+
|
12
|
+
<img src="/static/img/github-fork.png" width="800">
|
13
|
+
|
14
|
+
3. __Clone__ your fork via the following commands:
|
15
|
+
|
16
|
+
```bash
|
17
|
+
# Clone your fork of the repo into the current directory
|
18
|
+
git clone https://github.com/your_username/sendgrid-ruby
|
19
|
+
# Navigate to the newly cloned directory
|
20
|
+
cd sendgrid-ruby
|
21
|
+
# Assign the original repo to a remote called "upstream"
|
22
|
+
git remote add upstream https://github.com/sendgrid/sendgrid-ruby
|
23
|
+
```
|
24
|
+
|
25
|
+
> Don't forget to replace *your_username* in the URL by your real GitHub username.
|
26
|
+
|
27
|
+
4. __Create a new topic branch__ (off the main project development branch) to contain your feature, change, or fix:
|
28
|
+
|
29
|
+
```bash
|
30
|
+
git checkout -b <topic-branch-name>
|
31
|
+
```
|
32
|
+
|
33
|
+
5. __Commit your changes__ in logical chunks.
|
34
|
+
|
35
|
+
Please adhere to these [git commit message guidelines](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) or your code is unlikely be merged into the main project. Use Git's [interactive rebase](https://help.github.com/articles/interactive-rebase) feature to tidy up your commits before making them public. Probably you will also have to create tests (if needed) or create or update the example code that demonstrates the functionality of this change to the code.
|
36
|
+
|
37
|
+
6. __Locally merge (or rebase)__ the upstream development branch into your topic branch:
|
38
|
+
|
39
|
+
```bash
|
40
|
+
git pull [--rebase] upstream main
|
41
|
+
```
|
42
|
+
|
43
|
+
7. __Push__ your topic branch up to your fork:
|
44
|
+
|
45
|
+
```bash
|
46
|
+
git push origin <topic-branch-name>
|
47
|
+
```
|
48
|
+
|
49
|
+
8. __[Open a Pull Request](https://help.github.com/articles/creating-a-pull-request/#changing-the-branch-range-and-destination-repository/)__ with a clear title and description against the `main` branch. All tests must be passing before we will review the PR.
|
50
|
+
|
51
|
+
## Important notice
|
52
|
+
|
53
|
+
Before creating a pull request, make sure that you respect the repository's constraints regarding contributions. You can find them in the [CONTRIBUTING.md](CONTRIBUTING.md) file.
|
54
|
+
|
55
|
+
## Repositories with Open, Easy, Help Wanted, Issue Filters
|
56
|
+
|
57
|
+
* [Python SDK](https://github.com/sendgrid/sendgrid-python/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
|
58
|
+
* [PHP SDK](https://github.com/sendgrid/sendgrid-php/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
|
59
|
+
* [C# SDK](https://github.com/sendgrid/sendgrid-csharp/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
|
60
|
+
* [Ruby SDK](https://github.com/sendgrid/sendgrid-ruby/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
|
61
|
+
* [Node.js SDK](https://github.com/sendgrid/sendgrid-nodejs/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
|
62
|
+
* [Java SDK](https://github.com/sendgrid/sendgrid-java/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
|
63
|
+
* [Go SDK](https://github.com/sendgrid/sendgrid-go/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
|
64
|
+
* [Python STMPAPI Client](https://github.com/sendgrid/smtpapi-python/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
|
65
|
+
* [PHP STMPAPI Client](https://github.com/sendgrid/smtpapi-php/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
|
66
|
+
* [C# STMPAPI Client](https://github.com/sendgrid/smtpapi-csharp/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
|
67
|
+
* [Ruby STMPAPI Client](https://github.com/sendgrid/smtpapi-ruby/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
|
68
|
+
* [Node.js STMPAPI Client](https://github.com/sendgrid/smtpapi-nodejs/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
|
69
|
+
* [Java STMPAPI Client](https://github.com/sendgrid/smtpapi-java/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
|
70
|
+
* [Go STMPAPI Client](https://github.com/sendgrid/smtpapi-go/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
|
71
|
+
* [Python HTTP Client](https://github.com/sendgrid/python-http-client/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
|
72
|
+
* [PHP HTTP Client](https://github.com/sendgrid/php-http-client/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
|
73
|
+
* [C# HTTP Client](https://github.com/sendgrid/csharp-http-client/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
|
74
|
+
* [Java HTTP Client](https://github.com/sendgrid/java-http-client/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
|
75
|
+
* [Ruby HTTP Client](https://github.com/sendgrid/ruby-http-client/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
|
76
|
+
* [Go HTTP Client](https://github.com/sendgrid/rest/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
|
77
|
+
* [Open API Definition](https://github.com/sendgrid/sendgrid-oai/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
|
78
|
+
* [DX Automator](https://github.com/sendgrid/dx-automator/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
|
79
|
+
* [Documentation](https://github.com/sendgrid/docs/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3A%22difficulty%3A+easy%22+label%3A%22status%3A+help+wanted%22)
|