sendgrid-ruby 6.2.0 → 6.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eebc101d8e4c0fd0b310052df65639517dce3d1274d8469f7ca12c7854307b06
4
- data.tar.gz: 89565ce858129ddbf1921a474b34661f18852241339225038181e43c58f74af2
3
+ metadata.gz: ea1b4cb0cc31dd8e381e79b4c9f4912ddb1410bad86520d16f1ce10a379966f6
4
+ data.tar.gz: 3833bb588763748d2528f0a6df78de36f787b1077f82f2274144bc2ae0b4626c
5
5
  SHA512:
6
- metadata.gz: 180658efc2dd204c30090d9ca812430e36f75280519e054991227a5b6d5dd6f49860e84284ed7e51ebb9039d1460ad59a3cf269736c69cfd12d1f49b4e732501
7
- data.tar.gz: 060a8cee0e604d646be5dfdeee262eb2fb244c8c17d1ed0d6c112d004506201f2092c125e4cfda2c96a04a92b6bdc6b7a91b44f6149bba4ca4753a08cca0c10d
6
+ metadata.gz: 36a1a916671b8a473dcba3ddcde48a6cfb1d4d5dba78aebfe7e776424ed9b15acf662ed2cbd6f905b871a48921795af128eac84a5f3a18022558f8c963d3f4af
7
+ data.tar.gz: 80702d4af42f97acee0c4b8c61a8adf1543d98e726174d5a2df63829970bb23a658bb415bb45b52e22d7b570cf8c6b023c2674d918155307f1824c8dd3621ca2
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
data/.travis.yml CHANGED
@@ -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,8 +19,7 @@ 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 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
@@ -1,3 +1,3 @@
1
1
  module SendGrid
2
- VERSION = '6.2.0'
2
+ VERSION = '6.2.1'
3
3
  end
@@ -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
- host = "http://localhost:4010"
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.0", SendGrid::VERSION)
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.0
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-04-29 00:00:00.000000000 Z
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.0.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