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
@@ -1,12 +0,0 @@
1
- FROM ruby:2.5.1-jessie
2
-
3
- # Clone sendgrid-ruby
4
- WORKDIR /sources
5
- RUN git clone https://github.com/sendgrid/sendgrid-ruby.git
6
-
7
- # Bundle
8
- WORKDIR /sources/sendgrid-ruby
9
- RUN bundle install
10
-
11
- # Install prism
12
- RUN curl https://raw.githubusercontent.com/stoplightio/prism/master/install.sh | sh
@@ -1,30 +0,0 @@
1
- # Docker image for sendgrid-ruby
2
-
3
- ## Quickstart
4
- 1. [Install Docker](https://docs.docker.com/engine/installation/) on your machine.
5
- 2. Run `docker run --rm -it sendgrid/sendgrid-ruby irb`.
6
- 3. Run `require './lib/sendgrid-ruby.rb'`.
7
-
8
- ## Poke around
9
-
10
- If you would like to just poke around in the image and check some examples:
11
- ```sh
12
- docker run --rm -it sendgrid/sendgrid-ruby bash
13
- ```
14
-
15
- If you want to mount your fork or specific version of the gem:
16
- ```sh
17
- docker run --rm -v /path/to/local/sendgrid-ruby:/sources/sendgrid-ruby -it sendgrid/sendgrid-ruby bash
18
- ```
19
-
20
- ## Running tests
21
-
22
- If you would like to run the tests present in the image:
23
- ```sh
24
- docker run --rm sendgrid/sendgrid-ruby rake
25
- ```
26
-
27
- If you want to run tests on your fork or a specific version, mount the codebase onto the image:
28
- ```sh
29
- docker run --rm -v /path/to/local/sendgrid-ruby:/sources/sendgrid-ruby sendgrid/sendgrid-ruby rake
30
- ```
@@ -1,42 +0,0 @@
1
- #!/bin/bash
2
-
3
- install () {
4
-
5
- set -eu
6
-
7
- UNAME=$(uname)
8
- ARCH=$(uname -m)
9
- if [ "$UNAME" != "Linux" ] && [ "$UNAME" != "Darwin" ] && [ "$ARCH" != "x86_64" ] && [ "$ARCH" != "i686" ]; then
10
- echo "Sorry, OS/Architecture not supported: ${UNAME}/${ARCH}. Download binary from https://github.com/stoplightio/prism/releases"
11
- exit 1
12
- fi
13
-
14
- if [ "$UNAME" = "Darwin" ] ; then
15
- OSX_ARCH=$(uname -m)
16
- if [ "${OSX_ARCH}" = "x86_64" ] ; then
17
- PLATFORM="darwin_amd64"
18
- fi
19
- elif [ "$UNAME" = "Linux" ] ; then
20
- LINUX_ARCH=$(uname -m)
21
- if [ "${LINUX_ARCH}" = "i686" ] ; then
22
- PLATFORM="linux_386"
23
- elif [ "${LINUX_ARCH}" = "x86_64" ] ; then
24
- PLATFORM="linux_amd64"
25
- fi
26
- fi
27
-
28
- #LATEST=$(curl -s https://api.github.com/repos/stoplightio/prism/tags | grep -Eo '"name":.*?[^\\]",' | head -n 1 | sed 's/[," ]//g' | cut -d ':' -f 2)
29
- LATEST="v0.2.7"
30
- URL="https://github.com/stoplightio/prism/releases/download/$LATEST/prism_$PLATFORM"
31
- DEST=./prism/bin/prism
32
-
33
- if [ -z $LATEST ] ; then
34
- echo "Error requesting. Download binary from ${URL}"
35
- exit 1
36
- else
37
- curl -L $URL -o $DEST
38
- chmod +x $DEST
39
- fi
40
- }
41
-
42
- install