sendgrid-ruby 6.6.0 → 6.6.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 24757e772b52f0b9e130a824d65bea991c3fe5966f705cd3c2b67fdb8b1ade0e
4
- data.tar.gz: 972ea7b52d490fce2ddb97315356965fab0001e1511087834979620cbeb118a9
3
+ metadata.gz: abfc055d77d3dc9da72f8449a57051c7dcd79a821988f917b60db7eb49be70ef
4
+ data.tar.gz: f9f5fcfe2d803994a16e3739aed73953b2571c50835e4465017b9dddf001eec9
5
5
  SHA512:
6
- metadata.gz: af9a46c70ff25fadfce7458b64a75e0255063d7f082ff8b9d9f4bbff9f0aa3136969864b717f6f01666ee1c04c354a3bb03afc9dc3620de26ffb4b63e0011002
7
- data.tar.gz: 7992f9c04da91c16f76eee4cfd6860df83584046c00cff6a3b3f1b5ac0318e2bde8c8f2ee1329016bc28d0fd7c62a0c92d56bedf71805bfb86a5a6436f85035a
6
+ metadata.gz: b7a74ad72e927a00371e417c5c46db03c84b1c5854eef0d881954505d600daa03b8ac6832cefd95e3ffe5aaa4815b7d0906fdfa901f3290798c2ad560806fce7
7
+ data.tar.gz: ab74f884b09ed1bb453cb93926576c84a48676f44ba087e9d6c670a6f627f6866a79f6acc3737f14974a5148e950c2b010853d8a9318c63f4b4170250b5e7638
@@ -0,0 +1,115 @@
1
+ name: Test and Deploy
2
+ on:
3
+ push:
4
+ branches: [ '*' ]
5
+ tags: [ '*' ]
6
+ pull_request:
7
+ branches: [ main ]
8
+ schedule:
9
+ # Run automatically at 8AM PST Monday-Friday
10
+ - cron: '0 15 * * 1-5'
11
+ workflow_dispatch:
12
+
13
+ jobs:
14
+ test:
15
+ name: Test
16
+ runs-on: ubuntu-latest
17
+ timeout-minutes: 20
18
+ strategy:
19
+ matrix:
20
+ ruby: [ '2.4', '2.5', '2.6', '2.7', '3.0', '3.1', 'jruby-9.2' ]
21
+ env:
22
+ version: ${{ format('ruby:{0}', matrix.ruby) }}
23
+ DOCKER_LOGIN: ${{ secrets.DOCKER_USERNAME && secrets.DOCKER_AUTH_TOKEN }}
24
+ steps:
25
+ - name: Revise env version if necessary
26
+ run: echo "version=jruby:9.2" >> $GITHUB_ENV
27
+ if: ${{ matrix.ruby == 'jruby-9.2' }}
28
+
29
+ - name: Checkout sendgrid-ruby
30
+ uses: actions/checkout@v2
31
+ with:
32
+ fetch-depth: 0
33
+
34
+ - name: Login to Docker Hub
35
+ if: env.DOCKER_LOGIN
36
+ uses: docker/login-action@v1
37
+ with:
38
+ username: ${{ secrets.DOCKER_USERNAME }}
39
+ password: ${{ secrets.DOCKER_AUTH_TOKEN }}
40
+
41
+ - name: Set up Ruby
42
+ uses: ruby/setup-ruby@v1
43
+ with:
44
+ ruby-version: ${{ matrix.ruby }}
45
+ bundler-cache: true
46
+
47
+ - run: make install
48
+
49
+ - name: Set up linter
50
+ run: bundle add rubocop --version "~> 1.24.1" --group "development" --skip-install
51
+ if: ${{ matrix.ruby != '2.4' }}
52
+
53
+ - run: bundle install --with development
54
+
55
+ - name: Run linter
56
+ run: bundle exec rubocop
57
+ if: ${{ matrix.ruby != '2.4' }}
58
+
59
+ - name: Run tests
60
+ run: make test-docker
61
+
62
+ deploy:
63
+ name: Deploy
64
+ if: success() && github.ref_type == 'tag'
65
+ needs: [ test ]
66
+ runs-on: ubuntu-latest
67
+ steps:
68
+ - name: Checkout sendgrid-ruby
69
+ uses: actions/checkout@v2
70
+ with:
71
+ fetch-depth: 0
72
+
73
+ - name: Set up Ruby
74
+ uses: ruby/setup-ruby@v1
75
+ with:
76
+ ruby-version: 3.1
77
+ bundler-cache: true
78
+
79
+ - run: make install
80
+
81
+ - name: Create GitHub Release
82
+ uses: sendgrid/dx-automator/actions/release@main
83
+ with:
84
+ footer: '**[RubyGems](https://rubygems.org/gems/sendgrid-ruby/versions/${version})**'
85
+ env:
86
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
87
+
88
+ - name: Publish to Rubygems
89
+ env:
90
+ GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_AUTH_TOKEN }}
91
+ run: |
92
+ mkdir -p $HOME/.gem
93
+ touch $HOME/.gem/credentials
94
+ chmod 0600 $HOME/.gem/credentials
95
+ printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
96
+ gem build *.gemspec
97
+ gem push *.gem
98
+
99
+ notify-on-failure:
100
+ name: Slack notify on failure
101
+ if: failure() && github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || github.ref_type == 'tag')
102
+ needs: [ test, deploy ]
103
+ runs-on: ubuntu-latest
104
+ steps:
105
+ - uses: rtCamp/action-slack-notify@v2
106
+ env:
107
+ SLACK_COLOR: failure
108
+ SLACK_ICON_EMOJI: ':github:'
109
+ SLACK_MESSAGE: ${{ format('Test *{0}*, Deploy *{1}*, {2}/{3}/actions/runs/{4}', needs.test.result, needs.deploy.result, github.server_url, github.repository, github.run_id) }}
110
+ SLACK_TITLE: Action Failure - ${{ github.repository }}
111
+ SLACK_USERNAME: GitHub Actions
112
+ SLACK_MSG_AUTHOR: twilio-dx
113
+ SLACK_FOOTER: Posted automatically using GitHub Actions
114
+ SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
115
+ MSG_MINIMAL: true
data/.rubocop_todo.yml CHANGED
@@ -1,11 +1,19 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2020-09-18 20:20:54 UTC using RuboCop version 0.91.0.
3
+ # on 2022-01-25 23:45:43 UTC using RuboCop version 1.22.2.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
+ # Offense count: 1
10
+ # Cop supports --auto-correct.
11
+ # Configuration parameters: TreatCommentsAsGroupSeparators, ConsiderPunctuation, Include.
12
+ # Include: **/*.gemfile, **/Gemfile, **/gems.rb
13
+ Bundler/OrderedGems:
14
+ Exclude:
15
+ - 'Gemfile'
16
+
9
17
  # Offense count: 1
10
18
  # Configuration parameters: Include.
11
19
  # Include: **/*.gemspec
@@ -13,37 +21,37 @@ Gemspec/RequiredRubyVersion:
13
21
  Exclude:
14
22
  - 'sendgrid-ruby.gemspec'
15
23
 
16
- # Offense count: 22
24
+ # Offense count: 1
25
+ # Cop supports --auto-correct.
26
+ # Configuration parameters: EnforcedStyle.
27
+ # SupportedStyles: final_newline, final_blank_line
28
+ Layout/TrailingEmptyLines:
29
+ Exclude:
30
+ - 'Gemfile'
31
+
32
+ # Offense count: 24
17
33
  Lint/UselessAssignment:
18
34
  Exclude:
19
35
  - 'examples/scopes/scopes.rb'
20
36
  - 'spec/rack/sendgrid_webhook_verification_spec.rb'
21
37
 
22
- # Offense count: 8
23
- # Configuration parameters: IgnoredMethods.
38
+ # Offense count: 10
39
+ # Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
24
40
  Metrics/AbcSize:
25
- Max: 144
26
-
27
- # Offense count: 9
28
- # Configuration parameters: CountComments, CountAsOne, ExcludedMethods.
29
- # ExcludedMethods: refine
30
- Metrics/BlockLength:
31
- Max: 96
41
+ Max: 134
32
42
 
33
43
  # Offense count: 3
34
44
  # Configuration parameters: CountComments, CountAsOne.
35
45
  Metrics/ClassLength:
36
- Max: 2006
37
- Exclude:
38
- - 'test/sendgrid/test_sendgrid-ruby.rb'
46
+ Max: 2018
39
47
 
40
- # Offense count: 41
41
- # Configuration parameters: CountComments, CountAsOne, ExcludedMethods.
48
+ # Offense count: 45
49
+ # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
42
50
  Metrics/MethodLength:
43
51
  Max: 141
44
52
 
45
- # Offense count: 2
46
- # Configuration parameters: CountKeywordArgs.
53
+ # Offense count: 4
54
+ # Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
47
55
  Metrics/ParameterLists:
48
56
  Max: 7
49
57
 
@@ -76,15 +84,15 @@ Naming/PredicateName:
76
84
  - 'examples/helpers/eventwebhook/example.rb'
77
85
 
78
86
  # Offense count: 35
87
+ # Configuration parameters: AllowedConstants.
79
88
  Style/Documentation:
80
89
  Enabled: false
81
90
 
82
- # Offense count: 4
83
- # Configuration parameters: EnforcedStyle.
91
+ # Offense count: 3
92
+ # Configuration parameters: MaxUnannotatedPlaceholdersAllowed, IgnoredMethods.
84
93
  # SupportedStyles: annotated, template, unannotated
85
94
  Style/FormatStringToken:
86
- Exclude:
87
- - 'examples/emailactivity/emailactivity.rb'
95
+ EnforcedStyle: unannotated
88
96
 
89
97
  # Offense count: 97
90
98
  # Cop supports --auto-correct.
@@ -93,6 +101,14 @@ Style/FormatStringToken:
93
101
  Style/FrozenStringLiteralComment:
94
102
  Enabled: false
95
103
 
104
+ # Offense count: 1
105
+ # Cop supports --auto-correct.
106
+ # Configuration parameters: EnforcedStyle, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
107
+ # SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
108
+ Style/HashSyntax:
109
+ Exclude:
110
+ - 'Gemfile'
111
+
96
112
  # Offense count: 6
97
113
  Style/MixinUsage:
98
114
  Exclude:
@@ -103,9 +119,9 @@ Style/MixinUsage:
103
119
  - 'test/sendgrid/helpers/mail/test_attachment.rb'
104
120
  - 'test/sendgrid/helpers/mail/test_mail.rb'
105
121
 
106
- # Offense count: 55
122
+ # Offense count: 54
107
123
  # Cop supports --auto-correct.
108
- # Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
124
+ # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
109
125
  # URISchemes: http, https
110
126
  Layout/LineLength:
111
- Max: 3211
127
+ Max: 381
data/CHANGELOG.md CHANGED
@@ -1,6 +1,17 @@
1
1
  # Change Log
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
+ [2022-02-09] Version 6.6.1
5
+ --------------------------
6
+ **Library - Chore**
7
+ - [PR #482](https://github.com/sendgrid/sendgrid-ruby/pull/482): upgrade supported language versions. Thanks to [@childish-sambino](https://github.com/childish-sambino)!
8
+ - [PR #480](https://github.com/sendgrid/sendgrid-ruby/pull/480): add gh release to workflow. Thanks to [@shwetha-manvinkurke](https://github.com/shwetha-manvinkurke)!
9
+ - [PR #478](https://github.com/sendgrid/sendgrid-ruby/pull/478): migrate to gh actions. Thanks to [@beebzz](https://github.com/beebzz)!
10
+
11
+ **Library - Fix**
12
+ - [PR #479](https://github.com/sendgrid/sendgrid-ruby/pull/479): set version env var for tests. Thanks to [@beebzz](https://github.com/beebzz)!
13
+
14
+
4
15
  [2021-11-03] Version 6.6.0
5
16
  --------------------------
6
17
  **Library - Feature**
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (C) 2021, Twilio SendGrid, Inc. <help@twilio.com>
3
+ Copyright (C) 2022, Twilio SendGrid, Inc. <help@twilio.com>
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy of
6
6
  this software and associated documentation files (the "Software"), to deal in
data/Makefile CHANGED
@@ -5,7 +5,6 @@ install:
5
5
 
6
6
  test:
7
7
  bundle exec rake
8
- rubocop
9
8
 
10
9
  test-integ: test
11
10
 
data/README.md CHANGED
@@ -1,14 +1,12 @@
1
1
  ![Twilio SendGrid Logo](twilio_sendgrid_logo.png)
2
2
 
3
- [![Travis Badge](https://travis-ci.com/sendgrid/sendgrid-ruby.svg?branch=main)](https://travis-ci.com/sendgrid/sendgrid-ruby)
3
+ [![Travis Badge](https://github.com/sendgrid/sendgrid-ruby/actions/workflows/test-and-deploy.yml/badge.svg)](https://github.com/sendgrid/sendgrid-ruby/actions/workflows/test-and-deploy.yml)
4
4
  [![Gem Version](https://badge.fury.io/rb/sendgrid-ruby.svg)](https://badge.fury.io/rb/sendgrid-ruby)
5
5
  [![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
6
6
  [![Twitter Follow](https://img.shields.io/twitter/follow/sendgrid.svg?style=social&label=Follow)](https://twitter.com/sendgrid)
7
7
  [![GitHub contributors](https://img.shields.io/github/contributors/sendgrid/sendgrid-ruby.svg)](https://github.com/sendgrid/sendgrid-ruby/graphs/contributors)
8
8
  [![Open Source Helpers](https://www.codetriage.com/sendgrid/sendgrid-ruby/badges/users.svg)](https://www.codetriage.com/sendgrid/sendgrid-ruby)
9
9
 
10
- **NEW:** Subscribe to email [notifications](https://dx.sendgrid.com/newsletter/ruby) for releases and breaking changes.
11
-
12
10
  **The default branch name for this repository has been changed to `main` as of 07/27/2020.**
13
11
 
14
12
  **This library allows you to quickly and easily use the Twilio SendGrid Web API v3 via Ruby.**
@@ -1,3 +1,3 @@
1
1
  module SendGrid
2
- VERSION = '6.6.0'.freeze
2
+ VERSION = '6.6.1'.freeze
3
3
  end
@@ -25,7 +25,6 @@ Gem::Specification.new do |spec|
25
25
  spec.add_development_dependency 'rack'
26
26
  spec.add_development_dependency 'rake', '~> 13.0'
27
27
  spec.add_development_dependency 'rspec'
28
- spec.add_development_dependency 'rubocop'
29
28
  spec.add_development_dependency 'simplecov', '~> 0.18.5'
30
29
  spec.add_development_dependency 'sinatra', '>= 1.4.7', '< 3'
31
30
  end
@@ -33,7 +33,7 @@ class TestAPI < MiniTest::Test
33
33
  assert_equal(test_headers, sg.request_headers)
34
34
  assert_equal('v3', sg.version)
35
35
  assert_equal(subuser, sg.impersonate_subuser)
36
- assert_equal('6.6.0', SendGrid::VERSION)
36
+ assert_equal('6.6.1', SendGrid::VERSION)
37
37
  assert_instance_of(SendGrid::Client, sg.client)
38
38
  assert_equal({}, sg.http_options)
39
39
  end
@@ -2683,12 +2683,8 @@ class TestAPI < MiniTest::Test
2683
2683
  assert(File.file?('./.gitignore'))
2684
2684
  end
2685
2685
 
2686
- def test_travis_exists
2687
- assert(File.file?('./.travis.yml'))
2688
- end
2689
-
2690
- def test_codeclimate_exists
2691
- assert(File.file?('./.codeclimate.yml'))
2686
+ def test_gh_actions_exists
2687
+ assert(File.file?('./.github/workflows/test-and-deploy.yml'))
2692
2688
  end
2693
2689
 
2694
2690
  def test_changelog_exists
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.6.0
4
+ version: 6.6.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: 2021-11-03 00:00:00.000000000 Z
13
+ date: 2022-02-09 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: ruby_http_client
@@ -110,20 +110,6 @@ dependencies:
110
110
  - - ">="
111
111
  - !ruby/object:Gem::Version
112
112
  version: '0'
113
- - !ruby/object:Gem::Dependency
114
- name: rubocop
115
- requirement: !ruby/object:Gem::Requirement
116
- requirements:
117
- - - ">="
118
- - !ruby/object:Gem::Version
119
- version: '0'
120
- type: :development
121
- prerelease: false
122
- version_requirements: !ruby/object:Gem::Requirement
123
- requirements:
124
- - - ">="
125
- - !ruby/object:Gem::Version
126
- version: '0'
127
113
  - !ruby/object:Gem::Dependency
128
114
  name: simplecov
129
115
  requirement: !ruby/object:Gem::Requirement
@@ -165,13 +151,12 @@ executables: []
165
151
  extensions: []
166
152
  extra_rdoc_files: []
167
153
  files:
168
- - ".codeclimate.yml"
169
154
  - ".env_sample"
170
155
  - ".github/ISSUE_TEMPLATE/config.yml"
156
+ - ".github/workflows/test-and-deploy.yml"
171
157
  - ".gitignore"
172
158
  - ".rubocop.yml"
173
159
  - ".rubocop_todo.yml"
174
- - ".travis.yml"
175
160
  - CHANGELOG.md
176
161
  - CODE_OF_CONDUCT.md
177
162
  - CONTRIBUTING.md
@@ -324,7 +309,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
324
309
  - !ruby/object:Gem::Version
325
310
  version: '0'
326
311
  requirements: []
327
- rubygems_version: 3.0.8
312
+ rubygems_version: 3.3.3
328
313
  signing_key:
329
314
  specification_version: 4
330
315
  summary: Official Twilio SendGrid Gem
data/.codeclimate.yml DELETED
@@ -1,21 +0,0 @@
1
- ---
2
- engines:
3
- duplication:
4
- enabled: true
5
- config:
6
- languages:
7
- - ruby
8
- fixme:
9
- enabled: true
10
- rubocop:
11
- enabled: true
12
- bundler-audit:
13
- enabled: true
14
- ratings:
15
- paths:
16
- - "**.rb"
17
- exclude_paths:
18
- - examples/
19
- - gemfiles/
20
- - spec/
21
- - test/
data/.travis.yml DELETED
@@ -1,31 +0,0 @@
1
- language: ruby
2
- env:
3
- - version=ruby:3.0
4
- - version=ruby:2.7
5
- - version=ruby:2.6
6
- - version=ruby:2.5
7
- - version=ruby:2.4
8
- - version=jruby:9.2
9
- gemfile:
10
- - gemfiles/Sinatra_1.gemfile
11
- - gemfiles/Sinatra_2.gemfile
12
- script:
13
- - if [[ "$TRAVIS_BRANCH" == "main" || "$TRAVIS_BRANCH" == "travis" ]] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
14
- echo "${DOCKER_PASSWORD}" | docker login -u "${DOCKER_USERNAME}" --password-stdin;
15
- fi
16
- - make test-docker
17
- deploy:
18
- provider: rubygems
19
- api_key: "$RUBYGEMS_API_KEY"
20
- gem: sendgrid-ruby
21
- on:
22
- tags: true
23
- condition: $version = ruby:2.4 && $BUNDLE_GEMFILE = *"gemfiles/Sinatra_1.gemfile"
24
- notifications:
25
- slack:
26
- if: branch = main
27
- on_pull_requests: false
28
- on_success: never
29
- on_failure: change
30
- rooms:
31
- secure: oSeohwM+ernyiRYSRLpNlICk0wgj0lku3y5LuouJLRHs45tCAzLZLbgxsor18wCSJkmhfn2vg4Rn969VnskFuj70OhJSLBKL4UXBnR1Ji0ClpfJlGojcbY/5Z8N/eGDrvf5ofA0Jc+L/ut+oSCMXnstEGbx4wBpPTajHuRtvb34=