smtpapi 0.1.10 → 0.1.11
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 +4 -4
- data/.github/workflows/test-and-deploy.yml +99 -0
- data/.rubocop.yml +5 -3
- data/.rubocop_todo.yml +94 -0
- data/CHANGELOG.md +8 -0
- data/Makefile +0 -1
- data/README.md +1 -1
- data/lib/smtpapi/version.rb +1 -1
- data/smtpapi.gemspec +0 -1
- data/test/test.rb +3 -7
- data/test/test_helper.rb +4 -2
- metadata +5 -25
- data/.codeclimate.yml +0 -17
- data/.travis.yml +0 -27
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d65340477a6b441a06848a2fdf69b4b7f7eeb7c639ed4aeb0ccb0a2d10f9095d
|
|
4
|
+
data.tar.gz: 4d04c43f80dba6ecaeefa90229fc8aa3a00523264bcf89f2411afc9784ab7a6c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3cd0fa7a7dc1eede99eaf29f9f18e81e71948f2d28f1743c88aa89d48a8539a72cd8be166db335b443ea1319b889a2046699091e62d616a79cced382c535580c
|
|
7
|
+
data.tar.gz: f70d130dbc5a13580a343b10454844c8529e93d332994e2bedf14e56de7ce5a0b74ba2d915c221167d6dd290e4f7f4d51821ff5479ba2ed695fcc9e6813054cf
|
|
@@ -0,0 +1,99 @@
|
|
|
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
|
+
steps:
|
|
22
|
+
- name: Checkout smtpapi-ruby
|
|
23
|
+
uses: actions/checkout@v2
|
|
24
|
+
with:
|
|
25
|
+
fetch-depth: 0
|
|
26
|
+
|
|
27
|
+
- name: Set up Ruby
|
|
28
|
+
uses: ruby/setup-ruby@v1
|
|
29
|
+
with:
|
|
30
|
+
ruby-version: ${{ matrix.ruby }}
|
|
31
|
+
bundler-cache: true
|
|
32
|
+
|
|
33
|
+
- run: make install
|
|
34
|
+
|
|
35
|
+
- name: Set up linter
|
|
36
|
+
run: bundle add rubocop --version "~> 1.24.1" --group "development" --skip-install
|
|
37
|
+
if: ${{ matrix.ruby != '2.4' }}
|
|
38
|
+
|
|
39
|
+
- run: bundle install --with development && bundle exec rake install
|
|
40
|
+
|
|
41
|
+
- name: Run linter
|
|
42
|
+
run: bundle exec rubocop
|
|
43
|
+
if: ${{ matrix.ruby != '2.4' }}
|
|
44
|
+
|
|
45
|
+
- name: Run tests
|
|
46
|
+
run: make test
|
|
47
|
+
|
|
48
|
+
deploy:
|
|
49
|
+
name: Deploy
|
|
50
|
+
if: success() && github.ref_type == 'tag'
|
|
51
|
+
needs: [ test ]
|
|
52
|
+
runs-on: ubuntu-latest
|
|
53
|
+
steps:
|
|
54
|
+
- name: Checkout smtpapi-ruby
|
|
55
|
+
uses: actions/checkout@v2
|
|
56
|
+
with:
|
|
57
|
+
fetch-depth: 0
|
|
58
|
+
|
|
59
|
+
- name: Set up Ruby
|
|
60
|
+
uses: ruby/setup-ruby@v1
|
|
61
|
+
with:
|
|
62
|
+
ruby-version: 3.1
|
|
63
|
+
bundler-cache: true
|
|
64
|
+
|
|
65
|
+
- run: make install
|
|
66
|
+
|
|
67
|
+
- name: Create GitHub Release
|
|
68
|
+
uses: sendgrid/dx-automator/actions/release@main
|
|
69
|
+
env:
|
|
70
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
71
|
+
|
|
72
|
+
- name: Publish to Rubygems
|
|
73
|
+
env:
|
|
74
|
+
GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_AUTH_TOKEN }}
|
|
75
|
+
run: |
|
|
76
|
+
mkdir -p $HOME/.gem
|
|
77
|
+
touch $HOME/.gem/credentials
|
|
78
|
+
chmod 0600 $HOME/.gem/credentials
|
|
79
|
+
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
|
80
|
+
gem build *.gemspec
|
|
81
|
+
gem push *.gem
|
|
82
|
+
|
|
83
|
+
notify-on-failure:
|
|
84
|
+
name: Slack notify on failure
|
|
85
|
+
if: failure() && github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || github.ref_type == 'tag')
|
|
86
|
+
needs: [ test, deploy ]
|
|
87
|
+
runs-on: ubuntu-latest
|
|
88
|
+
steps:
|
|
89
|
+
- uses: rtCamp/action-slack-notify@v2
|
|
90
|
+
env:
|
|
91
|
+
SLACK_COLOR: failure
|
|
92
|
+
SLACK_ICON_EMOJI: ':github:'
|
|
93
|
+
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) }}
|
|
94
|
+
SLACK_TITLE: Action Failure - ${{ github.repository }}
|
|
95
|
+
SLACK_USERNAME: GitHub Actions
|
|
96
|
+
SLACK_MSG_AUTHOR: twilio-dx
|
|
97
|
+
SLACK_FOOTER: Posted automatically using GitHub Actions
|
|
98
|
+
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
|
|
99
|
+
MSG_MINIMAL: true
|
data/.rubocop.yml
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
inherit_from: .rubocop_todo.yml
|
|
2
|
+
|
|
1
3
|
# Allow "set_" and "get_" for prefix of method
|
|
2
4
|
AccessorMethodName:
|
|
3
5
|
Enabled: false
|
|
@@ -22,10 +24,10 @@ ClassLength:
|
|
|
22
24
|
CountComments: true
|
|
23
25
|
|
|
24
26
|
CyclomaticComplexity:
|
|
25
|
-
Max:
|
|
27
|
+
Max: 12
|
|
26
28
|
|
|
27
29
|
PerceivedComplexity:
|
|
28
|
-
Max:
|
|
30
|
+
Max: 12
|
|
29
31
|
|
|
30
32
|
Metrics/LineLength:
|
|
31
|
-
Max: 100
|
|
33
|
+
Max: 100
|
data/.rubocop_todo.yml
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# This configuration was generated by
|
|
2
|
+
# `rubocop --auto-gen-config`
|
|
3
|
+
# on 2022-01-25 23:22:53 UTC using RuboCop version 1.22.2.
|
|
4
|
+
# The point is for the user to remove these configuration records
|
|
5
|
+
# one by one as the offenses are removed from the code base.
|
|
6
|
+
# Note that changes in the inspected code, or installation of new
|
|
7
|
+
# versions of RuboCop, may require this file to be generated again.
|
|
8
|
+
|
|
9
|
+
# Offense count: 1
|
|
10
|
+
# Cop supports --auto-correct.
|
|
11
|
+
# Configuration parameters: TreatCommentsAsGroupSeparators, ConsiderPunctuation, Include.
|
|
12
|
+
# Include: **/*.gemspec
|
|
13
|
+
Gemspec/OrderedDependencies:
|
|
14
|
+
Exclude:
|
|
15
|
+
- 'smtpapi.gemspec'
|
|
16
|
+
|
|
17
|
+
# Offense count: 1
|
|
18
|
+
# Configuration parameters: Include.
|
|
19
|
+
# Include: **/*.gemspec
|
|
20
|
+
Gemspec/RequiredRubyVersion:
|
|
21
|
+
Exclude:
|
|
22
|
+
- 'smtpapi.gemspec'
|
|
23
|
+
|
|
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: 1
|
|
33
|
+
# Configuration parameters: IgnoredMethods.
|
|
34
|
+
Metrics/CyclomaticComplexity:
|
|
35
|
+
Max: 12
|
|
36
|
+
|
|
37
|
+
# Offense count: 1
|
|
38
|
+
# Configuration parameters: IgnoredMethods.
|
|
39
|
+
Metrics/PerceivedComplexity:
|
|
40
|
+
Max: 12
|
|
41
|
+
|
|
42
|
+
# Offense count: 2
|
|
43
|
+
# Cop supports --auto-correct.
|
|
44
|
+
# Configuration parameters: EnforcedStyle.
|
|
45
|
+
# SupportedStyles: separated, grouped
|
|
46
|
+
Style/AccessorGrouping:
|
|
47
|
+
Exclude:
|
|
48
|
+
- 'lib/smtpapi.rb'
|
|
49
|
+
|
|
50
|
+
# Offense count: 1
|
|
51
|
+
# Cop supports --auto-correct.
|
|
52
|
+
# Configuration parameters: EnforcedStyle.
|
|
53
|
+
# SupportedStyles: prefer_alias, prefer_alias_method
|
|
54
|
+
Style/Alias:
|
|
55
|
+
Exclude:
|
|
56
|
+
- 'lib/smtpapi.rb'
|
|
57
|
+
|
|
58
|
+
# Offense count: 8
|
|
59
|
+
# Cop supports --auto-correct.
|
|
60
|
+
# Configuration parameters: EnforcedStyle.
|
|
61
|
+
# SupportedStyles: always, always_true, never
|
|
62
|
+
Style/FrozenStringLiteralComment:
|
|
63
|
+
Exclude:
|
|
64
|
+
- 'Gemfile'
|
|
65
|
+
- 'Rakefile'
|
|
66
|
+
- 'examples/example.rb'
|
|
67
|
+
- 'lib/smtpapi.rb'
|
|
68
|
+
- 'lib/smtpapi/version.rb'
|
|
69
|
+
- 'smtpapi.gemspec'
|
|
70
|
+
- 'test/test.rb'
|
|
71
|
+
- 'test/test_helper.rb'
|
|
72
|
+
|
|
73
|
+
# Offense count: 1
|
|
74
|
+
# Cop supports --auto-correct.
|
|
75
|
+
# Configuration parameters: UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
|
|
76
|
+
# SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
|
|
77
|
+
Style/HashSyntax:
|
|
78
|
+
EnforcedStyle: hash_rockets
|
|
79
|
+
|
|
80
|
+
# Offense count: 3
|
|
81
|
+
# Cop supports --auto-correct.
|
|
82
|
+
# Configuration parameters: PreferredDelimiters.
|
|
83
|
+
Style/PercentLiteralDelimiters:
|
|
84
|
+
Exclude:
|
|
85
|
+
- 'examples/example.rb'
|
|
86
|
+
- 'test/test.rb'
|
|
87
|
+
|
|
88
|
+
# Offense count: 2
|
|
89
|
+
# Cop supports --auto-correct.
|
|
90
|
+
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
|
|
91
|
+
# SupportedStyles: single_quotes, double_quotes
|
|
92
|
+
Style/StringLiterals:
|
|
93
|
+
Exclude:
|
|
94
|
+
- 'Gemfile'
|
data/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file.
|
|
|
3
3
|
|
|
4
4
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
|
5
5
|
|
|
6
|
+
[2022-02-09] Version 0.1.11
|
|
7
|
+
---------------------------
|
|
8
|
+
**Library - Chore**
|
|
9
|
+
- [PR #101](https://github.com/sendgrid/smtpapi-ruby/pull/101): upgrade supported language versions. Thanks to [@childish-sambino](https://github.com/childish-sambino)!
|
|
10
|
+
- [PR #100](https://github.com/sendgrid/smtpapi-ruby/pull/100): add gh release to workflow. Thanks to [@shwetha-manvinkurke](https://github.com/shwetha-manvinkurke)!
|
|
11
|
+
- [PR #99](https://github.com/sendgrid/smtpapi-ruby/pull/99): migrate to gh actions. Thanks to [@beebzz](https://github.com/beebzz)!
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
[2022-01-12] Version 0.1.10
|
|
7
15
|
---------------------------
|
|
8
16
|
**Library - Chore**
|
data/Makefile
CHANGED
data/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|

|
|
2
2
|
|
|
3
|
-
[](https://github.com/sendgrid/smtpapi-ruby/actions/workflows/test-and-deploy.yml)
|
|
4
4
|
[](https://badge.fury.io/rb/smtpapi)
|
|
5
5
|
[](LICENSE)
|
|
6
6
|
[](https://twitter.com/sendgrid)
|
data/lib/smtpapi/version.rb
CHANGED
data/smtpapi.gemspec
CHANGED
|
@@ -18,7 +18,6 @@ Gem::Specification.new do |spec|
|
|
|
18
18
|
spec.require_paths = ['lib']
|
|
19
19
|
|
|
20
20
|
spec.add_development_dependency 'rake'
|
|
21
|
-
spec.add_development_dependency('rubocop', '>=0.29.0', '<0.30.0')
|
|
22
21
|
spec.add_development_dependency('test-unit', '~> 3.0')
|
|
23
22
|
spec.add_development_dependency('simplecov', '~> 0.18.5')
|
|
24
23
|
end
|
data/test/test.rb
CHANGED
|
@@ -7,7 +7,7 @@ require './lib/smtpapi'
|
|
|
7
7
|
#
|
|
8
8
|
class SmtpapiTest < Test::Unit::TestCase
|
|
9
9
|
def test_version
|
|
10
|
-
assert_equal('0.1.
|
|
10
|
+
assert_equal('0.1.11', Smtpapi::VERSION)
|
|
11
11
|
end
|
|
12
12
|
|
|
13
13
|
def test_empty
|
|
@@ -226,12 +226,8 @@ class SmtpapiTest < Test::Unit::TestCase
|
|
|
226
226
|
assert(File.file?('./.gitignore'))
|
|
227
227
|
end
|
|
228
228
|
|
|
229
|
-
def
|
|
230
|
-
assert(File.file?('./.
|
|
231
|
-
end
|
|
232
|
-
|
|
233
|
-
def test_codeclimate_exists
|
|
234
|
-
assert(File.file?('./.codeclimate.yml'))
|
|
229
|
+
def test_github_actions_exists
|
|
230
|
+
assert(File.file?('./.github/workflows/test-and-deploy.yml'))
|
|
235
231
|
end
|
|
236
232
|
|
|
237
233
|
def test_changelog_exists
|
data/test/test_helper.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: smtpapi
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.11
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Wataru Sato
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2022-
|
|
12
|
+
date: 2022-02-09 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: rake
|
|
@@ -25,26 +25,6 @@ dependencies:
|
|
|
25
25
|
- - ">="
|
|
26
26
|
- !ruby/object:Gem::Version
|
|
27
27
|
version: '0'
|
|
28
|
-
- !ruby/object:Gem::Dependency
|
|
29
|
-
name: rubocop
|
|
30
|
-
requirement: !ruby/object:Gem::Requirement
|
|
31
|
-
requirements:
|
|
32
|
-
- - ">="
|
|
33
|
-
- !ruby/object:Gem::Version
|
|
34
|
-
version: 0.29.0
|
|
35
|
-
- - "<"
|
|
36
|
-
- !ruby/object:Gem::Version
|
|
37
|
-
version: 0.30.0
|
|
38
|
-
type: :development
|
|
39
|
-
prerelease: false
|
|
40
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
41
|
-
requirements:
|
|
42
|
-
- - ">="
|
|
43
|
-
- !ruby/object:Gem::Version
|
|
44
|
-
version: 0.29.0
|
|
45
|
-
- - "<"
|
|
46
|
-
- !ruby/object:Gem::Version
|
|
47
|
-
version: 0.30.0
|
|
48
28
|
- !ruby/object:Gem::Dependency
|
|
49
29
|
name: test-unit
|
|
50
30
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -81,12 +61,12 @@ executables: []
|
|
|
81
61
|
extensions: []
|
|
82
62
|
extra_rdoc_files: []
|
|
83
63
|
files:
|
|
84
|
-
- ".codeclimate.yml"
|
|
85
64
|
- ".env_sample"
|
|
86
65
|
- ".github/ISSUE_TEMPLATE/config.yml"
|
|
66
|
+
- ".github/workflows/test-and-deploy.yml"
|
|
87
67
|
- ".gitignore"
|
|
88
68
|
- ".rubocop.yml"
|
|
89
|
-
- ".
|
|
69
|
+
- ".rubocop_todo.yml"
|
|
90
70
|
- CHANGELOG.md
|
|
91
71
|
- CODE_OF_CONDUCT.md
|
|
92
72
|
- CONTRIBUTING.md
|
|
@@ -129,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
129
109
|
- !ruby/object:Gem::Version
|
|
130
110
|
version: '0'
|
|
131
111
|
requirements: []
|
|
132
|
-
rubygems_version: 3.
|
|
112
|
+
rubygems_version: 3.3.3
|
|
133
113
|
signing_key:
|
|
134
114
|
specification_version: 4
|
|
135
115
|
summary: Smtpapi library for SendGrid.
|
data/.codeclimate.yml
DELETED
data/.travis.yml
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
language: ruby
|
|
2
|
-
rvm:
|
|
3
|
-
- 2.7
|
|
4
|
-
- 2.6
|
|
5
|
-
- 2.5
|
|
6
|
-
- 2.4
|
|
7
|
-
- jruby-9.2
|
|
8
|
-
before_script:
|
|
9
|
-
- make install
|
|
10
|
-
script:
|
|
11
|
-
- make test
|
|
12
|
-
deploy:
|
|
13
|
-
provider: rubygems
|
|
14
|
-
api_key: "$RUBYGEMS_API_KEY"
|
|
15
|
-
gem: smtpapi
|
|
16
|
-
on:
|
|
17
|
-
tags: true
|
|
18
|
-
rvm: '2.4'
|
|
19
|
-
skip_cleanup: true
|
|
20
|
-
notifications:
|
|
21
|
-
slack:
|
|
22
|
-
if: branch = main
|
|
23
|
-
on_pull_requests: false
|
|
24
|
-
on_success: never
|
|
25
|
-
on_failure: change
|
|
26
|
-
rooms:
|
|
27
|
-
secure: F5/iPScUfgbtjvfAOrU7gyptywZ2JvuC3Wil2I0eebmYTzcg5is0uDwViF1Qt1hQ5yQeKEtza8R7j+ug8MkANjWQOL3w5zMXBKL6UCHV1YLyDW47AAaELouz7yoTjZtu7VvbxPYGxk47eNCRlRfAMHl9VJd1SepXlrTQtwtOHVw=
|