sendgrid-ruby 5.3.0 → 6.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/workflows/pr-lint.yml +15 -0
- data/.github/workflows/test-and-deploy.yml +120 -0
- data/.gitignore +2 -0
- data/.rubocop.yml +8 -0
- data/.rubocop_todo.yml +127 -0
- data/CHANGELOG.md +261 -8
- data/CODE_OF_CONDUCT.md +57 -25
- data/CONTRIBUTING.md +24 -71
- data/Dockerfile +14 -0
- data/FIRST_TIMERS.md +53 -0
- data/Gemfile +0 -1
- data/LICENSE +21 -0
- data/Makefile +14 -0
- data/PULL_REQUEST_TEMPLATE.md +31 -0
- data/README.md +39 -43
- data/Rakefile +3 -4
- data/TROUBLESHOOTING.md +41 -21
- data/UPGRADE.md +5 -0
- data/USAGE.md +1231 -1122
- 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/dataresidency/setregion.rb +48 -0
- 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 +30 -19
- data/examples/helpers/settings/example.rb +1 -1
- data/examples/helpers/stats/example.rb +4 -4
- data/examples/ips/ips.rb +31 -21
- data/examples/mail/mail.rb +73 -76
- 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 +49 -5
- data/examples/{whitelabel/whitelabel.rb → senderauthentication/senderauthentication.rb} +68 -71
- 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 +23 -26
- 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 +55 -0
- data/lib/sendgrid/base_interface.rb +57 -0
- data/lib/sendgrid/helpers/eventwebhook/eventwebhook.rb +50 -0
- data/lib/sendgrid/helpers/inbound/README.md +26 -9
- data/lib/sendgrid/helpers/inbound/app.rb +15 -3
- data/lib/sendgrid/helpers/inbound/public/index.html +2 -2
- data/lib/sendgrid/helpers/inbound/sample_data/default_data.txt +2 -2
- data/lib/sendgrid/helpers/inbound/sample_data/raw_data.txt +2 -2
- data/lib/sendgrid/helpers/inbound/sample_data/raw_data_with_attachments.txt +2 -2
- data/lib/sendgrid/helpers/inbound/send.rb +5 -5
- data/lib/sendgrid/helpers/ip_management/ip_management.rb +17 -0
- data/lib/sendgrid/helpers/mail/README.md +4 -4
- data/lib/sendgrid/helpers/mail/asm.rb +4 -18
- data/lib/sendgrid/helpers/mail/attachment.rb +30 -38
- data/lib/sendgrid/helpers/mail/bcc_settings.rb +4 -18
- data/lib/sendgrid/helpers/mail/bypass_list_management.rb +6 -18
- data/lib/sendgrid/helpers/mail/category.rb +2 -12
- data/lib/sendgrid/helpers/mail/click_tracking.rb +4 -18
- data/lib/sendgrid/helpers/mail/content.rb +4 -18
- data/lib/sendgrid/helpers/mail/custom_arg.rb +4 -10
- data/lib/sendgrid/helpers/mail/email.rb +10 -20
- data/lib/sendgrid/helpers/mail/footer.rb +5 -27
- data/lib/sendgrid/helpers/mail/ganalytics.rb +9 -55
- data/lib/sendgrid/helpers/mail/header.rb +4 -10
- data/lib/sendgrid/helpers/mail/mail.rb +37 -87
- data/lib/sendgrid/helpers/mail/mail_settings.rb +7 -25
- data/lib/sendgrid/helpers/mail/open_tracking.rb +4 -18
- data/lib/sendgrid/helpers/mail/personalization.rb +38 -27
- data/lib/sendgrid/helpers/mail/section.rb +4 -10
- data/lib/sendgrid/helpers/mail/spam_check.rb +5 -27
- data/lib/sendgrid/helpers/mail/subscription_tracking.rb +6 -36
- data/lib/sendgrid/helpers/mail/substitution.rb +4 -10
- data/lib/sendgrid/helpers/mail/tracking_settings.rb +6 -20
- data/lib/sendgrid/helpers/permissions/scope.rb +28 -0
- data/lib/sendgrid/helpers/permissions/scopes.yml +309 -0
- data/lib/sendgrid/helpers/settings/README.md +3 -3
- 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 -7
- data/lib/sendgrid/helpers/stats/stats_response.rb +1 -3
- data/lib/sendgrid/sendgrid.rb +21 -0
- data/lib/sendgrid/twilio_email.rb +21 -0
- data/lib/sendgrid/version.rb +1 -1
- data/lib/sendgrid-ruby.rb +7 -1
- data/mail_helper_v3.md +21 -21
- data/sendgrid-ruby.gemspec +12 -12
- data/spec/fixtures/event_webhook.rb +22 -0
- data/spec/rack/sendgrid_webhook_verification_spec.rb +142 -0
- data/spec/sendgrid/helpers/eventwebhook/eventwebhook_spec.rb +105 -0
- data/spec/sendgrid/helpers/ip_management/ip_management_spec.rb +12 -0
- data/spec/sendgrid/helpers/settings/mail_settings_dto_spec.rb +3 -3
- data/spec/sendgrid/helpers/settings/partner_settings_dto_spec.rb +3 -3
- data/spec/sendgrid/helpers/settings/settings_spec.rb +2 -2
- data/spec/sendgrid/helpers/settings/tracking_settings_dto_spec.rb +3 -3
- data/spec/sendgrid/helpers/settings/user_settings_dto_spec.rb +3 -3
- 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/sendgrid/sendgrid_spec.rb +11 -0
- data/spec/sendgrid/twilio_email_spec.rb +11 -0
- 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 +33 -0
- data/test/sendgrid/helpers/mail/test_category.rb +0 -2
- data/test/sendgrid/helpers/mail/test_data_residency.rb +44 -0
- data/test/sendgrid/helpers/mail/test_email.rb +17 -10
- data/test/sendgrid/helpers/mail/test_mail.rb +126 -119
- data/test/sendgrid/helpers/mail/test_personalizations.rb +145 -92
- data/test/sendgrid/permissions/test_scopes.rb +36 -0
- data/test/sendgrid/test_sendgrid-ruby.rb +1961 -1979
- data/twilio_sendgrid_logo.png +0 -0
- data/use-cases/README.md +17 -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/personalizations.md +34 -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 +99 -45
- data/.codeclimate.yml +0 -21
- data/.github/ISSUE_TEMPLATE +0 -17
- data/.github/PULL_REQUEST_TEMPLATE +0 -24
- data/.travis.yml +0 -29
- data/LICENSE.txt +0 -22
- data/USE_CASES.md +0 -147
- data/docker/Dockerfile +0 -12
- data/docker/README.md +0 -30
- data/lib/sendgrid/client.rb +0 -35
- data/test/prism.sh +0 -42
data/test/prism.sh
DELETED
@@ -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
|