sendgrid-ruby 6.2.0 → 6.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/.travis.yml +11 -20
- data/CHANGELOG.md +6 -0
- data/Dockerfile +14 -0
- data/Makefile +7 -1
- data/lib/sendgrid/version.rb +1 -1
- data/test/sendgrid/test_sendgrid-ruby.rb +2 -28
- metadata +4 -5
- data/test/prism.sh +0 -42
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea1b4cb0cc31dd8e381e79b4c9f4912ddb1410bad86520d16f1ce10a379966f6
|
4
|
+
data.tar.gz: 3833bb588763748d2528f0a6df78de36f787b1077f82f2274144bc2ae0b4626c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 36a1a916671b8a473dcba3ddcde48a6cfb1d4d5dba78aebfe7e776424ed9b15acf662ed2cbd6f905b871a48921795af128eac84a5f3a18022558f8c963d3f4af
|
7
|
+
data.tar.gz: 80702d4af42f97acee0c4b8c61a8adf1543d98e726174d5a2df63829970bb23a658bb415bb45b52e22d7b570cf8c6b023c2674d918155307f1824c8dd3621ca2
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
@@ -1,25 +1,17 @@
|
|
1
1
|
language: ruby
|
2
|
-
|
3
|
-
- ruby
|
4
|
-
- 2.
|
5
|
-
- 2.
|
6
|
-
- 2.
|
7
|
-
- 2
|
8
|
-
|
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
|
-
|
13
|
-
|
14
|
-
|
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,8 +19,7 @@ deploy:
|
|
27
19
|
gem: sendgrid-ruby
|
28
20
|
on:
|
29
21
|
tags: true
|
30
|
-
|
31
|
-
condition: '$BUNDLE_GEMFILE == *"gemfiles/Sinatra_1.gemfile"'
|
22
|
+
condition: $version=ruby:2.4 AND '$BUNDLE_GEMFILE == *"gemfiles/Sinatra_1.gemfile"'
|
32
23
|
|
33
24
|
notifications:
|
34
25
|
slack:
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
# Change Log
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
3
|
|
4
|
+
[2020-05-13] Version 6.2.1
|
5
|
+
--------------------------
|
6
|
+
**Library - Fix**
|
7
|
+
- [PR #421](https://github.com/sendgrid/sendgrid-ruby/pull/421): migrate to common prism setup. Thanks to [@childish-sambino](https://github.com/childish-sambino)!
|
8
|
+
|
9
|
+
|
4
10
|
[2020-04-29] Version 6.2.0
|
5
11
|
--------------------------
|
6
12
|
**Library - Feature**
|
data/Dockerfile
ADDED
@@ -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
|
data/Makefile
CHANGED
@@ -1,7 +1,13 @@
|
|
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
7
|
bundle exec rake spec
|
8
|
+
|
9
|
+
test-integ: test
|
10
|
+
|
11
|
+
version ?= ruby:latest
|
12
|
+
test-docker:
|
13
|
+
curl -s https://raw.githubusercontent.com/sendgrid/sendgrid-oai/master/prism/prism.sh | version=$(version) bash
|
data/lib/sendgrid/version.rb
CHANGED
@@ -5,34 +5,8 @@ require 'minitest/unit'
|
|
5
5
|
|
6
6
|
class TestAPI < MiniTest::Test
|
7
7
|
|
8
|
-
unless File.exist?('/usr/local/bin/prism') || File.exist?(File.join(Dir.pwd, 'prism/bin/prism'))
|
9
|
-
if RUBY_PLATFORM =~ /mswin|mingw/
|
10
|
-
puts 'Please download the Windows binary (https://github.com/stoplightio/prism/releases) and place it in your /usr/local/bin directory'
|
11
|
-
else
|
12
|
-
puts 'Installing Prism'
|
13
|
-
IO.popen(['curl', '-s', 'https://raw.githubusercontent.com/stoplightio/prism/master/install.sh']) do |io|
|
14
|
-
out = io.read
|
15
|
-
unless system(out)
|
16
|
-
puts "Error downloading the prism binary, you can try downloading directly here (https://github.com/stoplightio/prism/releases) and place in your /usr/local/bin directory, #{out}"
|
17
|
-
exit
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
puts 'Activating Prism (~20 seconds)'
|
24
|
-
@@prism_pid = spawn('prism run --mock --list --spec https://raw.githubusercontent.com/sendgrid/sendgrid-oai/master/oai_stoplight.json', [:out, :err] => '/dev/null')
|
25
|
-
sleep(15)
|
26
|
-
puts 'Prism started'
|
27
|
-
|
28
8
|
def setup
|
29
|
-
|
30
|
-
@sg = SendGrid::API.new(api_key: "SENDGRID_API_KEY", host: host)
|
31
|
-
end
|
32
|
-
|
33
|
-
Minitest.after_run do
|
34
|
-
Process.kill('TERM', @@prism_pid)
|
35
|
-
puts 'Prism shut down'
|
9
|
+
@sg = SendGrid::API.new(api_key: "SENDGRID_API_KEY")
|
36
10
|
end
|
37
11
|
|
38
12
|
def test_init
|
@@ -58,7 +32,7 @@ class TestAPI < MiniTest::Test
|
|
58
32
|
assert_equal(test_headers, sg.request_headers)
|
59
33
|
assert_equal("v3", sg.version)
|
60
34
|
assert_equal(subuser, sg.impersonate_subuser)
|
61
|
-
assert_equal("6.2.
|
35
|
+
assert_equal("6.2.1", SendGrid::VERSION)
|
62
36
|
assert_instance_of(SendGrid::Client, sg.client)
|
63
37
|
end
|
64
38
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sendgrid-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.2.
|
4
|
+
version: 6.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elmer Thomas
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2020-
|
13
|
+
date: 2020-05-14 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: ruby_http_client
|
@@ -144,6 +144,7 @@ files:
|
|
144
144
|
- CHANGELOG.md
|
145
145
|
- CODE_OF_CONDUCT.md
|
146
146
|
- CONTRIBUTING.md
|
147
|
+
- Dockerfile
|
147
148
|
- Gemfile
|
148
149
|
- ISSUE_TEMPLATE.md
|
149
150
|
- LICENSE.md
|
@@ -249,7 +250,6 @@ files:
|
|
249
250
|
- spec/sendgrid/sendgrid_spec.rb
|
250
251
|
- spec/sendgrid/twilio_email_spec.rb
|
251
252
|
- spec/spec_helper.rb
|
252
|
-
- test/prism.sh
|
253
253
|
- test/sendgrid/helpers/mail/test_attachment.rb
|
254
254
|
- test/sendgrid/helpers/mail/test_category.rb
|
255
255
|
- test/sendgrid/helpers/mail/test_email.rb
|
@@ -276,7 +276,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
276
276
|
- !ruby/object:Gem::Version
|
277
277
|
version: '0'
|
278
278
|
requirements: []
|
279
|
-
rubygems_version: 3.
|
279
|
+
rubygems_version: 3.1.2
|
280
280
|
signing_key:
|
281
281
|
specification_version: 4
|
282
282
|
summary: Official Twilio SendGrid Gem
|
@@ -293,7 +293,6 @@ test_files:
|
|
293
293
|
- spec/sendgrid/sendgrid_spec.rb
|
294
294
|
- spec/sendgrid/twilio_email_spec.rb
|
295
295
|
- spec/spec_helper.rb
|
296
|
-
- test/prism.sh
|
297
296
|
- test/sendgrid/helpers/mail/test_attachment.rb
|
298
297
|
- test/sendgrid/helpers/mail/test_category.rb
|
299
298
|
- test/sendgrid/helpers/mail/test_email.rb
|
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
|