sendgrid-ruby 6.1.4 → 6.3.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) 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 +11 -20
  6. data/CHANGELOG.md +45 -0
  7. data/CONTRIBUTING.md +4 -11
  8. data/Dockerfile +14 -0
  9. data/Gemfile +0 -1
  10. data/Makefile +9 -2
  11. data/README.md +0 -1
  12. data/examples/helpers/eventwebhook/example.rb +16 -0
  13. data/lib/rack/sendgrid_webhook_verification.rb +52 -0
  14. data/lib/sendgrid-ruby.rb +5 -1
  15. data/lib/sendgrid/base_interface.rb +36 -0
  16. data/lib/sendgrid/helpers/eventwebhook/eventwebhook.rb +52 -0
  17. data/lib/sendgrid/sendgrid.rb +20 -0
  18. data/lib/sendgrid/twilio_email.rb +21 -0
  19. data/lib/sendgrid/version.rb +1 -1
  20. data/sendgrid-ruby.gemspec +2 -0
  21. data/spec/fixtures/event_webhook.rb +16 -0
  22. data/spec/rack/sendgrid_webhook_verification_spec.rb +116 -0
  23. data/spec/sendgrid/helpers/eventwebhook/eventwebhook_spec.rb +103 -0
  24. data/spec/sendgrid/sendgrid_spec.rb +11 -0
  25. data/spec/sendgrid/twilio_email_spec.rb +11 -0
  26. data/spec/spec_helper.rb +2 -0
  27. data/test/sendgrid/helpers/mail/test_mail.rb +1 -1
  28. data/test/sendgrid/test_sendgrid-ruby.rb +24 -59
  29. data/use-cases/README.md +16 -0
  30. data/use-cases/domain-authentication.md +5 -0
  31. data/use-cases/email-statistics.md +52 -0
  32. data/use-cases/legacy-templates.md +98 -0
  33. data/use-cases/sms.md +39 -0
  34. data/use-cases/transactional-templates.md +111 -0
  35. data/use-cases/twilio-email.md +13 -0
  36. data/use-cases/twilio-setup.md +54 -0
  37. metadata +57 -9
  38. data/USE_CASES.md +0 -377
  39. data/docker/Dockerfile +0 -12
  40. data/docker/README.md +0 -30
  41. data/lib/sendgrid/client.rb +0 -38
  42. data/test/prism.sh +0 -42
@@ -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