sendgrid-ruby 6.2.0 → 6.3.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/.codeclimate.yml +1 -1
  3. data/.gitignore +2 -0
  4. data/.rubocop.yml +6 -0
  5. data/.travis.yml +12 -21
  6. data/CHANGELOG.md +57 -8
  7. data/CONTRIBUTING.md +10 -17
  8. data/Dockerfile +14 -0
  9. data/FIRST_TIMERS.md +79 -0
  10. data/Gemfile +0 -1
  11. data/ISSUE_TEMPLATE.md +5 -1
  12. data/Makefile +9 -2
  13. data/PULL_REQUEST_TEMPLATE.md +1 -1
  14. data/README.md +22 -21
  15. data/TROUBLESHOOTING.md +5 -5
  16. data/USAGE.md +35 -36
  17. data/examples/helpers/eventwebhook/example.rb +16 -0
  18. data/examples/helpers/mail/example.rb +11 -4
  19. data/examples/mail/mail.rb +1 -1
  20. data/lib/rack/sendgrid_webhook_verification.rb +52 -0
  21. data/lib/sendgrid-ruby.rb +2 -0
  22. data/lib/sendgrid/helpers/eventwebhook/eventwebhook.rb +52 -0
  23. data/lib/sendgrid/helpers/inbound/README.md +5 -5
  24. data/lib/sendgrid/helpers/inbound/public/index.html +1 -1
  25. data/lib/sendgrid/helpers/mail/README.md +3 -3
  26. data/lib/sendgrid/helpers/settings/README.md +2 -2
  27. data/lib/sendgrid/version.rb +1 -1
  28. data/mail_helper_v3.md +9 -9
  29. data/sendgrid-ruby.gemspec +2 -0
  30. data/spec/fixtures/event_webhook.rb +16 -0
  31. data/spec/rack/sendgrid_webhook_verification_spec.rb +116 -0
  32. data/spec/sendgrid/helpers/eventwebhook/eventwebhook_spec.rb +103 -0
  33. data/spec/spec_helper.rb +2 -0
  34. data/static/img/github-fork.png +0 -0
  35. data/static/img/github-sign-up.png +0 -0
  36. data/test/sendgrid/helpers/mail/test_mail.rb +1 -1
  37. data/test/sendgrid/test_sendgrid-ruby.rb +24 -59
  38. data/twilio_sendgrid_logo.png +0 -0
  39. data/use-cases/README.md +16 -0
  40. data/use-cases/domain-authentication.md +5 -0
  41. data/use-cases/email-statistics.md +52 -0
  42. data/use-cases/legacy-templates.md +98 -0
  43. data/use-cases/sms.md +39 -0
  44. data/use-cases/transactional-templates.md +111 -0
  45. data/use-cases/twilio-email.md +13 -0
  46. data/use-cases/twilio-setup.md +54 -0
  47. metadata +54 -8
  48. data/USE_CASES.md +0 -405
  49. data/docker/Dockerfile +0 -12
  50. data/docker/README.md +0 -30
  51. data/test/prism.sh +0 -42
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eebc101d8e4c0fd0b310052df65639517dce3d1274d8469f7ca12c7854307b06
4
- data.tar.gz: 89565ce858129ddbf1921a474b34661f18852241339225038181e43c58f74af2
3
+ metadata.gz: 7b7ceda12fd42d78b3d9be742691aa04943810f7aaaeee00ebddded73004bb0b
4
+ data.tar.gz: c0dfae6e4e0a91ebf5816f8d2b4ce8dfcc4857be2e5d31dd1289f71b0b4f1845
5
5
  SHA512:
6
- metadata.gz: 180658efc2dd204c30090d9ca812430e36f75280519e054991227a5b6d5dd6f49860e84284ed7e51ebb9039d1460ad59a3cf269736c69cfd12d1f49b4e732501
7
- data.tar.gz: 060a8cee0e604d646be5dfdeee262eb2fb244c8c17d1ed0d6c112d004506201f2092c125e4cfda2c96a04a92b6bdc6b7a91b44f6149bba4ca4753a08cca0c10d
6
+ metadata.gz: 77d07eaf2f1b79970ec14246a185b97fb00b860831bad8db6570c8230d708f2621889eb10baeddf8f58deda706dc2ef88ba350a9fa0df25c135f03b28a8ba2db
7
+ data.tar.gz: 86c963fea6f7def49fbec7399c46862244cc9bf551f9b77894458311f676fe46b66be1b87621efcf4cee702dd9d136808df66d8727108aaea5e7e15b2b751d3d
@@ -16,6 +16,6 @@ ratings:
16
16
  - "**.rb"
17
17
  exclude_paths:
18
18
  - examples/
19
+ - gemfiles/
19
20
  - spec/
20
21
  - test/
21
- - gemfiles/
data/.gitignore CHANGED
@@ -39,3 +39,5 @@ Gemfile.lock
39
39
 
40
40
  # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
41
41
  .rvmrc
42
+
43
+ prism*
@@ -0,0 +1,6 @@
1
+ AllCops:
2
+ Exclude:
3
+ - examples/**/*
4
+ - gemfiles/**/*
5
+ - spec/**/*
6
+ - test/**/*
@@ -1,25 +1,17 @@
1
1
  language: ruby
2
- rvm:
3
- - ruby-head
4
- - 2.7
5
- - 2.6
6
- - 2.5
7
- - 2.4
8
- - jruby-9.2
2
+ env:
3
+ - version=ruby:2.7
4
+ - version=ruby:2.6
5
+ - version=ruby:2.5
6
+ - version=ruby:2.4
7
+ - version=jruby:9.2
8
+
9
9
  gemfile:
10
10
  - gemfiles/Sinatra_1.gemfile
11
11
  - gemfiles/Sinatra_2.gemfile
12
- before_script:
13
- - mkdir prism
14
- - mkdir prism/bin
15
- - export PATH=$PATH:$PWD/prism/bin/
16
- - "./test/prism.sh"
17
- install: make install
18
- script: make test
19
- matrix:
20
- allow_failures:
21
- - rvm: ruby-head
22
- fast_finish: true
12
+
13
+ script: make test-docker
14
+
23
15
  deploy:
24
16
  provider: rubygems
25
17
  api_key:
@@ -27,12 +19,11 @@ deploy:
27
19
  gem: sendgrid-ruby
28
20
  on:
29
21
  tags: true
30
- rvm: '2.4'
31
- condition: '$BUNDLE_GEMFILE == *"gemfiles/Sinatra_1.gemfile"'
22
+ condition: $version = ruby:2.4 && $BUNDLE_GEMFILE = *"gemfiles/Sinatra_1.gemfile"
32
23
 
33
24
  notifications:
34
25
  slack:
35
- if: branch = master
26
+ if: branch = main
36
27
  on_pull_requests: false
37
28
  on_success: never
38
29
  on_failure: change
@@ -1,6 +1,55 @@
1
1
  # Change Log
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
+ [2020-08-19] Version 6.3.4
5
+ --------------------------
6
+ **Library - Docs**
7
+ - [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)!
8
+ - [PR #344](https://github.com/sendgrid/sendgrid-ruby/pull/344): Update example.rb. Thanks to [@kylearoberts](https://github.com/kylearoberts)!
9
+
10
+ **Library - Chore**
11
+ - [PR #432](https://github.com/sendgrid/sendgrid-ruby/pull/432): update GitHub branch references to use HEAD. Thanks to [@thinkingserious](https://github.com/thinkingserious)!
12
+
13
+
14
+ [2020-07-22] Version 6.3.3
15
+ --------------------------
16
+ **Library - Chore**
17
+ - [PR #431](https://github.com/sendgrid/sendgrid-ruby/pull/431): migrate to new default sendgrid-oai branch. Thanks to [@eshanholtz](https://github.com/eshanholtz)!
18
+ - [PR #366](https://github.com/sendgrid/sendgrid-ruby/pull/366): add Rubocop configuration file. Thanks to [@RolandBurrows](https://github.com/RolandBurrows)!
19
+
20
+ **Library - Test**
21
+ - [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)!
22
+
23
+ **Library - Docs**
24
+ - [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)!
25
+
26
+
27
+ [2020-07-08] Version 6.3.2
28
+ --------------------------
29
+ **Library - Test**
30
+ - [PR #368](https://github.com/sendgrid/sendgrid-ruby/pull/368): add Simplecov Local Enhancements. Thanks to [@RolandBurrows](https://github.com/RolandBurrows)!
31
+
32
+
33
+ [2020-06-25] Version 6.3.1
34
+ --------------------------
35
+
36
+
37
+ [2020-06-24] Version 6.3.0
38
+ --------------------------
39
+ **Library - Feature**
40
+ - [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)!
41
+ - [PR #425](https://github.com/sendgrid/sendgrid-ruby/pull/425): verify signature from event webhook. Thanks to [@eshanholtz](https://github.com/eshanholtz)!
42
+
43
+ **Library - Fix**
44
+ - [PR #427](https://github.com/sendgrid/sendgrid-ruby/pull/427): drop the starkbank dependency. Thanks to [@childish-sambino](https://github.com/childish-sambino)!
45
+
46
+
47
+ [2020-05-13] Version 6.2.1
48
+ --------------------------
49
+ **Library - Fix**
50
+ - [PR #421](https://github.com/sendgrid/sendgrid-ruby/pull/421): migrate to common prism setup. Thanks to [@childish-sambino](https://github.com/childish-sambino)!
51
+
52
+
4
53
  [2020-04-29] Version 6.2.0
5
54
  --------------------------
6
55
  **Library - Feature**
@@ -81,7 +130,7 @@ All notable changes to this project will be documented in this file.
81
130
  [2019-06-04] Version 6.0.0
82
131
  --------------------------
83
132
  ### BREAKING CHANGE
84
- - [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](https://github.com/sendgrid/sendgrid-ruby/blob/master/UPGRADE.md). Big thanks to [@jjb](https://github.com/jjb) for the PR!
133
+ - [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!
85
134
 
86
135
  ### Added
87
136
  - [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!
@@ -148,7 +197,7 @@ All notable changes to this project will be documented in this file.
148
197
  - `mail.headers` becomes `mail.add_header()`
149
198
  - `mail.categories` becomes `mail.add_category()`
150
199
  - `mail.custom_args` becomes `mail.custom_args()`
151
- - For a full example of usage, please [see here](https://github.com/sendgrid/sendgrid-ruby/blob/master/examples/helpers/mail/example.rb#L21).
200
+ - For a full example of usage, please [see here](examples/helpers/mail/example.rb#L21).
152
201
 
153
202
  ## [4.3.3] - 2017-5-2
154
203
  ### Update
@@ -159,7 +208,7 @@ All notable changes to this project will be documented in this file.
159
208
  ## [4.3.2] - 2017-5-1 ##
160
209
  ### Fixes
161
210
  - #161: Fixed problematic Sinatra dependency
162
- - 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.
211
+ - 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.
163
212
  - Thanks to [Sebastian Skałacki](https://github.com/skalee) for the pull request!
164
213
 
165
214
  ## [4.3.1] - 2017-4-12 ##
@@ -171,7 +220,7 @@ All notable changes to this project will be documented in this file.
171
220
  ## [4.3.0] - 2017-4-12 ##
172
221
  ### Added
173
222
  - #70: Adds an account settings management helper object
174
- - See the [helper README](https://github.com/sendgrid/sendgrid-ruby/tree/master/lib/sendgrid/helpers/settings) for details
223
+ - See the [helper README](lib/sendgrid/helpers/settings) for details
175
224
  - Thanks to [Kyle Kern](https://github.com/kernkw) for the pull request!
176
225
 
177
226
  ## [4.2.1] - 2017-4-10 ##
@@ -181,8 +230,8 @@ All notable changes to this project will be documented in this file.
181
230
 
182
231
  ## [4.2.0] - 2017-4-10 ##
183
232
  ### Added
184
- - #148: Set api_key to empty string
185
- - This makes creating an API key for a SendGrid subuser who does not have an API key easier. See #146 for details
233
+ - #148: Set api_key to an empty string
234
+ - This makes creating an API key for a SendGrid sub-user who does not have an API key easier. See #146 for details
186
235
  - Thanks to [Adam Beck](https://github.com/Gwash3189) for the pull request!
187
236
 
188
237
  ## [4.1.1] - 2017-4-6 ##
@@ -223,7 +272,7 @@ All notable changes to this project will be documented in this file.
223
272
  ## [4.0.3] - 2016-08-24 ##
224
273
  ### Added
225
274
  - Table of Contents in the README
226
- - Added a [USE_CASES.md](https://github.com/sendgrid/sendgrid-ruby/blob/master/USE_CASES.md) section, with the first use case example for transactional templates
275
+ - Added a [USE_CASES.md](USE_CASES.md) section, with the first use case example for transactional templates
227
276
 
228
277
  ## [4.0.2] - 2016-07-26 ##
229
278
  ### Fixed
@@ -231,7 +280,7 @@ All notable changes to this project will be documented in this file.
231
280
 
232
281
  ## [4.0.1] - 2016-07-25 ##
233
282
  ### Added
234
- - [Troubleshooting](https://github.com/sendgrid/sendgrid-ruby/blob/master/TROUBLESHOOTING.md) section
283
+ - [Troubleshooting](TROUBLESHOOTING.md) section
235
284
 
236
285
  ## [4.0.0] - 2016-07-23 ##
237
286
  ### BREAKING CHANGE
@@ -18,7 +18,7 @@ Hello! Thank you for choosing to help contribute to one of the Twilio SendGrid o
18
18
  - [Code Reviews](#code-reviews)
19
19
 
20
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.
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
22
 
23
23
  There are a few ways to contribute, which we'll enumerate below:
24
24
 
@@ -42,12 +42,12 @@ A software bug is a demonstrable issue in the code base. In order for us to diag
42
42
  Before you decide to create a new issue, please try the following:
43
43
 
44
44
  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
45
+ 2. Update to the latest version of this code and check if an issue has already been fixed
46
46
  3. Copy and fill in the Bug Report Template we have provided below
47
47
 
48
48
  ### Please use our Bug Report Template
49
49
 
50
- In order to make the process easier, we've included a [sample bug report template](https://github.com/sendgrid/sendgrid-ruby/blob/master/ISSUE_TEMPLATE.md) (borrowed from [Ghost](https://github.com/TryGhost/Ghost/)). The template uses [GitHub flavored markdown](https://help.github.com/articles/github-flavored-markdown/) for formatting.
50
+ In order to make the process easier, we've included a [sample bug report template](ISSUE_TEMPLATE.md).
51
51
 
52
52
  <a name="improvements-to-the-codebase"></a>
53
53
  ## Improvements to the Codebase
@@ -93,7 +93,7 @@ source ./sendgrid.env
93
93
 
94
94
  ##### Execute: #####
95
95
 
96
- See the [examples folder](https://github.com/sendgrid/sendgrid-ruby/tree/master/examples) to get started quickly.
96
+ See the [examples folder](examples) to get started quickly.
97
97
 
98
98
  To run the examples using the local version of this library from the root directory of this repo, please replace:
99
99
 
@@ -124,20 +124,13 @@ Tests for the mail send and Web API v3 endpoints.
124
124
 
125
125
  The Web API v3 client is `sendgrid-ruby.rb`
126
126
 
127
- <a name="testing"></a>
128
127
  ## Testing
129
128
 
130
- All PRs require passing tests before the PR will be reviewed.
129
+ 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.
131
130
 
132
- All test files are in the [`tests`](https://github.com/sendgrid/sendgrid-ruby/tree/master/test) directory.
131
+ 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`.
133
132
 
134
- For the purposes of contributing to this repo, please update the [`test_sendgrid-ruby.rb`](https://github.com/sendgrid/sendgrid-ruby/blob/master/test/test_sendgrid-ruby.rb) file with unit tests as you modify the code.
135
-
136
- To run the tests:
137
-
138
- ```bash
139
- rake
140
- ```
133
+ 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
134
 
142
135
  <a name="style-guidelines-and-naming-conventions"></a>
143
136
  ## Style Guidelines & Naming Conventions
@@ -183,7 +176,7 @@ Please run your code through:
183
176
 
184
177
  4. Commit your changes in logical chunks. Please adhere to these [git commit
185
178
  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
179
+ or your code is unlikely to be merged into the main project. Use Git's
187
180
  [interactive rebase](https://help.github.com/articles/interactive-rebase)
188
181
  feature to tidy up your commits before making them public.
189
182
 
@@ -194,7 +187,7 @@ Please run your code through:
194
187
  5. Locally merge (or rebase) the upstream development branch into your topic branch:
195
188
 
196
189
  ```bash
197
- git pull [--rebase] upstream master
190
+ git pull [--rebase] upstream main
198
191
  ```
199
192
 
200
193
  6. Push your topic branch up to your fork:
@@ -204,7 +197,7 @@ Please run your code through:
204
197
  ```
205
198
 
206
199
  7. [Open a Pull Request](https://help.github.com/articles/using-pull-requests/)
207
- with a clear title and description against the `master` branch. All tests must be passing before we will review the PR.
200
+ with a clear title and description against the `main` branch. All tests must be passing before we will review the PR.
208
201
 
209
202
  <a name="code-reviews"></a>
210
203
  ## Code Reviews
@@ -0,0 +1,14 @@
1
+ ARG version=ruby:latest
2
+ FROM $version
3
+
4
+ # Needed for jruby
5
+ RUN apt-get update \
6
+ && apt-get install -y make git
7
+
8
+ COPY prism/prism/nginx/cert.crt /usr/local/share/ca-certificates/cert.crt
9
+ RUN update-ca-certificates
10
+
11
+ WORKDIR /app
12
+ COPY . .
13
+
14
+ RUN make install
@@ -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)
data/Gemfile CHANGED
@@ -3,4 +3,3 @@ source 'http://rubygems.org'
3
3
  gemspec
4
4
 
5
5
  gem 'ruby_http_client'
6
-
@@ -1,5 +1,9 @@
1
1
  <!--
2
2
  If this is a feature request, make sure you search Issues for an existing request before creating a new one!
3
+
4
+ Please utilize the template below to help us resolve your issue.
5
+
6
+ Note that many issues can be resolved by updating to the latest version.
3
7
  -->
4
8
 
5
9
  ### Issue Summary
@@ -21,6 +25,6 @@ A summary of the issue and the environment in which it occurs. If suitable, incl
21
25
  ```
22
26
 
23
27
  ### Technical details:
24
- * sendgrid-ruby version:
28
+ * sendgrid-ruby version:
25
29
  * ruby version:
26
30
 
data/Makefile CHANGED
@@ -1,7 +1,14 @@
1
- .PHONY: install test
1
+ .PHONY: install test test-integ test-docker
2
2
 
3
3
  install:
4
4
  gem install bundler:2.1.2; bundle install
5
5
 
6
6
  test:
7
- bundle exec rake spec
7
+ bundle exec rake
8
+
9
+ test-integ: test
10
+
11
+ version ?= ruby:latest
12
+ test-docker:
13
+ curl -s https://raw.githubusercontent.com/sendgrid/sendgrid-oai/HEAD/prism/prism.sh -o prism.sh
14
+ version=$(version) bash ./prism.sh
@@ -23,7 +23,7 @@ A short description of what this PR does.
23
23
  - [ ] I have made a material change to the repo (functionality, testing, spelling, grammar)
24
24
  - [ ] I have read the [Contribution Guidelines](CONTRIBUTING.md) and my PR follows them
25
25
  - [ ] I have titled the PR appropriately
26
- - [ ] I have updated my branch with the master branch
26
+ - [ ] I have updated my branch with the main branch
27
27
  - [ ] I have added tests that prove my fix is effective or that my feature works
28
28
  - [ ] I have added necessary documentation about the functionality in the appropriate .md file
29
29
  - [ ] I have added inline documentation to the code I modified
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
- ![Twilio SendGrid Logo](https://github.com/sendgrid/sendgrid-python/raw/master/twilio_sendgrid_logo.png)
1
+ ![Twilio SendGrid Logo](twilio_sendgrid_logo.png)
2
2
 
3
- [![Travis Badge](https://travis-ci.org/sendgrid/sendgrid-ruby.svg?branch=master)](https://travis-ci.org/sendgrid/sendgrid-ruby)
3
+ [![Travis Badge](https://travis-ci.org/sendgrid/sendgrid-ruby.svg?branch=main)](https://travis-ci.org/sendgrid/sendgrid-ruby)
4
4
  [![Gem Version](https://badge.fury.io/rb/sendgrid-ruby.svg)](https://badge.fury.io/rb/sendgrid-ruby)
5
5
  [![Email Notifications Badge](https://dx.sendgrid.com/badge/ruby)](https://dx.sendgrid.com/newsletter/ruby)
6
6
  [![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE.md)
@@ -10,11 +10,13 @@
10
10
 
11
11
  **NEW:** Subscribe to email [notifications](https://dx.sendgrid.com/newsletter/ruby) for releases and breaking changes.
12
12
 
13
+ **The default branch name for this repository has been changed to `main` as of 07/27/2020.**
14
+
13
15
  **This library allows you to quickly and easily use the Twilio SendGrid Web API v3 via Ruby.**
14
16
 
15
17
  Version 3.X.X+ of this library provides full support for all Twilio SendGrid [Web API v3](https://sendgrid.com/docs/API_Reference/Web_API_v3/index.html) endpoints, including the new [v3 /mail/send](https://sendgrid.com/blog/introducing-v3mailsend-sendgrids-new-mail-endpoint).
16
18
 
17
- This library represents the beginning of a new path for Twilio SendGrid. We want this library to be community driven and Twilio SendGrid led. We need your help to realize this goal. To help make sure we are building the right things in the right order, we ask that you create [issues](https://github.com/sendgrid/sendgrid-ruby/issues) and [pull requests](https://github.com/sendgrid/sendgrid-ruby/blob/master/CONTRIBUTING.md) or simply upvote or comment on existing issues or pull requests.
19
+ This library represents the beginning of a new path for Twilio SendGrid. We want this library to be community driven and Twilio SendGrid led. We need your help to realize this goal. To help make sure we are building the right things in the right order, we ask that you create [issues](https://github.com/sendgrid/sendgrid-ruby/issues) and [pull requests](CONTRIBUTING.md) or simply upvote or comment on existing issues or pull requests.
18
20
 
19
21
  Please browse the rest of this README for further details.
20
22
 
@@ -40,7 +42,7 @@ We appreciate your continued support, thank you!
40
42
 
41
43
  ## Prerequisites
42
44
 
43
- - Ruby version >= 2.4 (except version [2.6.0](https://github.com/sendgrid/sendgrid-ruby/blob/master/TROUBLESHOOTING.md#ruby-versions))
45
+ - Ruby version >= 2.4 (except version [2.6.0](TROUBLESHOOTING.md#ruby-versions))
44
46
  - The Twilio SendGrid service, starting at the [free level](https://sendgrid.com/free?source=sendgrid-ruby)
45
47
 
46
48
  ## Setup Environment Variables
@@ -81,7 +83,7 @@ gem install sendgrid-ruby
81
83
 
82
84
  ## Hello Email
83
85
 
84
- The following is the minimum needed code to send an email with the [/mail/send Helper](https://github.com/sendgrid/sendgrid-ruby/tree/master/lib/sendgrid/helpers/mail) ([here](https://github.com/sendgrid/sendgrid-ruby/blob/master/examples/helpers/mail/example.rb#L21) is a full example):
86
+ The following is the minimum needed code to send an email with the [/mail/send Helper](lib/sendgrid/helpers/mail) ([here](examples/helpers/mail/example.rb#L21) is a full example):
85
87
 
86
88
  ### With Mail Helper Class
87
89
 
@@ -103,11 +105,11 @@ puts response.parsed_body
103
105
  puts response.headers
104
106
  ```
105
107
 
106
- For more complex scenarios, please do not use the above constructor and instead build your own personalization object as [demonstrated here](https://github.com/sendgrid/sendgrid-ruby/blob/master/examples/helpers/mail/example.rb#L21).
108
+ For more complex scenarios, please do not use the above constructor and instead build your own personalization object as [demonstrated here](examples/helpers/mail/example.rb#L21).
107
109
 
108
110
  ### Without Mail Helper Class
109
111
 
110
- The following is the minimum needed code to send an email without the /mail/send Helper ([here](https://github.com/sendgrid/sendgrid-ruby/blob/master/examples/mail/mail.rb#L26) is a full example):
112
+ The following is the minimum needed code to send an email without the /mail/send Helper ([here](examples/mail/mail.rb#L26) is a full example):
111
113
 
112
114
  ```ruby
113
115
  require 'sendgrid-ruby'
@@ -169,29 +171,29 @@ puts response.headers
169
171
  <a name="inbound"></a>
170
172
  # Processing Inbound Email
171
173
 
172
- Please see [our helper](https://github.com/sendgrid/sendgrid-ruby/tree/master/lib/sendgrid/helpers/inbound) for utilizing our Inbound Parse webhook.
174
+ Please see [our helper](lib/sendgrid/helpers/inbound) for utilizing our Inbound Parse webhook.
173
175
 
174
176
  <a name="usage"></a>
175
177
  # Usage
176
178
 
177
179
  - [Twilio SendGrid Docs](https://sendgrid.com/docs/API_Reference/index.html)
178
- - [Library Usage Docs](https://github.com/sendgrid/sendgrid-ruby/tree/master/USAGE.md)
179
- - [Example Code](https://github.com/sendgrid/sendgrid-ruby/tree/master/examples)
180
+ - [Library Usage Docs](USAGE.md)
181
+ - [Example Code](examples)
180
182
  - [How-to: Migration from v2 to v3](https://sendgrid.com/docs/Classroom/Send/v3_Mail_Send/how_to_migrate_from_v2_to_v3_mail_send.html)
181
- - [v3 Web API Mail Send Helper](https://github.com/sendgrid/sendgrid-ruby/tree/master/lib/sendgrid/helpers/mail) - build a request object payload for a v3 /mail/send API call.
182
- - [Settings Helper](https://github.com/sendgrid/sendgrid-ruby/tree/master/lib/sendgrid/helpers/settings)
183
+ - [v3 Web API Mail Send Helper](lib/sendgrid/helpers/mail) - build a request object payload for a v3 /mail/send API call.
184
+ - [Settings Helper](lib/sendgrid/helpers/settings)
183
185
 
184
186
  <a name="use_cases"></a>
185
187
  # Use Cases
186
188
 
187
- [Examples of common API use cases](https://github.com/sendgrid/sendgrid-ruby/blob/master/USE_CASES.md), such as how to send an email with a transactional template.
189
+ [Examples of common API use cases](use-cases), such as how to send an email with a transactional template.
188
190
 
189
191
  <a name="announcements"></a>
190
192
  # Announcements
191
193
 
192
194
  Please see our announcement regarding [breaking changes](https://github.com/sendgrid/sendgrid-ruby/issues/94). Your support is appreciated!
193
195
 
194
- All updates to this library are documented in our [CHANGELOG](https://github.com/sendgrid/sendgrid-ruby/blob/master/CHANGELOG.md) and [releases](https://github.com/sendgrid/sendgrid-ruby/releases). You may also subscribe to email [release notifications](https://dx.sendgrid.com/newsletter/ruby) for releases and breaking changes.
196
+ All updates to this library are documented in our [CHANGELOG](CHANGELOG.md) and [releases](https://github.com/sendgrid/sendgrid-ruby/releases). You may also subscribe to email [release notifications](https://dx.sendgrid.com/newsletter/ruby) for releases and breaking changes.
195
197
 
196
198
  <a name="roadmap"></a>
197
199
  # Roadmap
@@ -201,18 +203,17 @@ If you are interested in the future direction of this project, please take a loo
201
203
  <a name="contribute"></a>
202
204
  # How to Contribute
203
205
 
204
- We encourage contribution to our libraries (you might even score some nifty swag), please see our [CONTRIBUTING](https://github.com/sendgrid/sendgrid-ruby/tree/master/CONTRIBUTING.md) guide for details.
206
+ We encourage contribution to our libraries (you might even score some nifty swag), please see our [CONTRIBUTING](CONTRIBUTING.md) guide for details.
205
207
 
206
- - [Feature Request](https://github.com/sendgrid/sendgrid-ruby/tree/master/CONTRIBUTING.md#feature_request)
207
- - [Bug Reports](https://github.com/sendgrid/sendgrid-ruby/tree/master/CONTRIBUTING.md#submit_a_bug_report)
208
- - [Sign the CLA to Create a Pull Request](https://github.com/sendgrid/sendgrid-ruby/tree/master/CONTRIBUTING.md#cla)
209
- - [Improvements to the Codebase](https://github.com/sendgrid/sendgrid-ruby/tree/master/CONTRIBUTING.md#improvements_to_the_codebase)
210
- - [Review Pull Requests](https://github.com/sendgrid/sendgrid-ruby/blob/master/CONTRIBUTING.md#code-reviews)
208
+ - [Feature Request](CONTRIBUTING.md#feature_request)
209
+ - [Bug Reports](CONTRIBUTING.md#submit_a_bug_report)
210
+ - [Improvements to the Codebase](CONTRIBUTING.md#improvements_to_the_codebase)
211
+ - [Review Pull Requests](CONTRIBUTING.md#code-reviews)
211
212
 
212
213
  <a name="troubleshooting"></a>
213
214
  # Troubleshooting
214
215
 
215
- Please see our [troubleshooting guide](https://github.com/sendgrid/sendgrid-ruby/blob/master/TROUBLESHOOTING.md) for common library issues.
216
+ Please see our [troubleshooting guide](TROUBLESHOOTING.md) for common library issues.
216
217
 
217
218
  <a name="about"></a>
218
219
  # About