smtpapi 0.1.10 → 0.1.11

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: 4717e99a6c7f243fea15f527521826473b383c7d71ad508986dd700d00dec3cd
4
- data.tar.gz: 2afc59658d2068400fc46d2bfa07047bdd21d4a800299d5c640fe58ec80bbc8a
3
+ metadata.gz: d65340477a6b441a06848a2fdf69b4b7f7eeb7c639ed4aeb0ccb0a2d10f9095d
4
+ data.tar.gz: 4d04c43f80dba6ecaeefa90229fc8aa3a00523264bcf89f2411afc9784ab7a6c
5
5
  SHA512:
6
- metadata.gz: 44593b44a3e2d7120e1143944688a1f3d66fb9470342b595a1a1831be66595fcd6c1823f3164b34e6dd107a435f9a5578fe443af107f4bae87c9adfd5d357c86
7
- data.tar.gz: b0d7391bf856f713efda0d3e9cc41bb4aab1e715dc4543c9c9c3edcf86abe0e380f07bc8ef5bb689aa7094e22bbcd22117ac1f13729e607069c7cd8aba40c792
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: 11
27
+ Max: 12
26
28
 
27
29
  PerceivedComplexity:
28
- Max: 11
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
@@ -4,5 +4,4 @@ install:
4
4
  gem install bundler:1.14.6; bundle install
5
5
 
6
6
  test:
7
- rubocop
8
7
  rake test
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  ![SendGrid Logo](twilio_sendgrid_logo.png)
2
2
 
3
- [![Build Status](https://travis-ci.com/sendgrid/smtpapi-ruby.svg?branch=main)](https://travis-ci.com/sendgrid/smtpapi-ruby)
3
+ [![Build Status](https://github.com/sendgrid/smtpapi-ruby/actions/workflows/test-and-deploy.yml/badge.svg)](https://github.com/sendgrid/smtpapi-ruby/actions/workflows/test-and-deploy.yml)
4
4
  [![Gem Version](https://badge.fury.io/rb/smtpapi.svg)](https://badge.fury.io/rb/smtpapi)
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)
@@ -2,5 +2,5 @@
2
2
  # SendGrid smtpapi
3
3
  #
4
4
  module Smtpapi
5
- VERSION = '0.1.10'.freeze
5
+ VERSION = '0.1.11'.freeze
6
6
  end
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', Smtpapi::VERSION)
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 test_travis_exists
230
- assert(File.file?('./.travis.yml'))
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
@@ -1,2 +1,4 @@
1
- require 'simplecov'
2
- SimpleCov.start
1
+ if RUBY_VERSION.equal?('2.7')
2
+ require 'simplecov'
3
+ SimpleCov.start
4
+ end
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.10
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-01-12 00:00:00.000000000 Z
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
- - ".travis.yml"
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.0.8
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
@@ -1,17 +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
- ratings:
13
- paths:
14
- - "**.rb"
15
- exclude_paths:
16
- - test/
17
- - examples/
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=