smtpapi 0.1.2 → 0.1.7

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: 67133d1164778251a9c37490925e80fc1d87111a90ab856fc3c5d3389e8f0905
4
- data.tar.gz: be492d0b300754ac81fe33483a7f2d41ce9c349681f302f80135e7b7b9e6e3de
3
+ metadata.gz: f703034c8bca559b9820a2141798ab17659d5d6bebacbbd710a5e11c8c94be82
4
+ data.tar.gz: '08d97aaf3b6a07da8a6f0f167e75b6dfaf23a9d7250a0cbed9753d36c1d0b5f8'
5
5
  SHA512:
6
- metadata.gz: 84814ed5deacb38587faac01a58fd9b01d6935dc784566037b156293a55cf665cfe96edc744722a85871b0932942fe805dc1dedcdb2a6d341062adff749de83d
7
- data.tar.gz: f0a3d5da5f36f16e120124640194f61e244a81d55f269bbeaf161896efb14f5a49eb1eddda9b4a4625be245a8e5dd2d0fb63a65c6d64211cc6e0072edca9cb10
6
+ metadata.gz: 320e0446b122b8b0b639e812d6373922c94f2c7475752797878d8252edef29eafb87ef938c33cd9efc03eca34a6561f84f83525014a8f90de8084916297bbb3f
7
+ data.tar.gz: 5d068b0ff4304e658ed7090d255a6133a0a113ee09e564384ae3d564547984ec9f534c79997fa4d04778cc8b4f2491f7a18b1905433000386378de63023e6806
@@ -1,18 +1,19 @@
1
1
  language: ruby
2
2
  rvm:
3
- - ruby-head
4
- - 2.6
5
- - 2.5
6
- - 2.4
7
- - jruby
3
+ - ruby-head
4
+ - 2.7
5
+ - 2.6
6
+ - 2.5
7
+ - 2.4
8
+ - jruby-9.2
8
9
  before_script:
9
- - bundle install
10
+ - bundle install
10
11
  script:
11
- - rubocop --fail-level=W
12
- - rake test
12
+ - rubocop --fail-level=W
13
+ - rake test
13
14
  matrix:
14
15
  allow_failures:
15
- - rvm: ruby-head
16
+ - rvm: ruby-head
16
17
  fast_finish: true
17
18
  deploy:
18
19
  provider: rubygems
@@ -22,3 +23,13 @@ deploy:
22
23
  on:
23
24
  tags: true
24
25
  rvm: '2.4'
26
+ skip_cleanup: true
27
+
28
+ notifications:
29
+ slack:
30
+ if: branch = main
31
+ on_pull_requests: false
32
+ on_success: never
33
+ on_failure: change
34
+ rooms:
35
+ - secure: kyDurUDtXcp+6SfpFeszmzRZEpl2IOFqevGelhKVfx7j+M+p1wvPCkv9vnSdpKaZbQ80EKORxS4ZsnKUL9/yOP2uF9mrzB/DCfzFynw/IVfBejM8nkbf/CmosFh0SkkLuwotaPeqMhAtg1J8Avk1HVKJmihaJfkD6kzQ3PSyKlw=
@@ -3,6 +3,37 @@ 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
+ [2020-08-05] Version 0.1.7
7
+ --------------------------
8
+ **Library - Chore**
9
+ - [PR #36](https://github.com/sendgrid/smtpapi-ruby/pull/36): fix CodeClimate suggestions. Thanks to [@valterbarros](https://github.com/valterbarros)!
10
+
11
+
12
+ [2020-07-22] Version 0.1.6
13
+ --------------------------
14
+ **Library - Docs**
15
+ - [PR #82](https://github.com/sendgrid/smtpapi-ruby/pull/82): Create usage.md file. Thanks to [@prathamsharma92](https://github.com/prathamsharma92)!
16
+ - [PR #83](https://github.com/sendgrid/smtpapi-ruby/pull/83): add code review section in contributions. Thanks to [@prathamsharma92](https://github.com/prathamsharma92)!
17
+
18
+
19
+ [2020-03-04] Version 0.1.5
20
+ --------------------------
21
+ **Library - Chore**
22
+ - [PR #95](https://github.com/sendgrid/smtpapi-ruby/pull/95): add Ruby 2.7 to Travis. Thanks to [@childish-sambino](https://github.com/childish-sambino)!
23
+
24
+
25
+ [2020-02-19] Version 0.1.4
26
+ --------------------------
27
+ **Library - Chore**
28
+ - [PR #87](https://github.com/sendgrid/smtpapi-ruby/pull/87): Add test coverage analysis. Thanks to [@RolandBurrows](https://github.com/RolandBurrows)!
29
+
30
+
31
+ [2020-01-22] Version 0.1.3
32
+ --------------------------
33
+ **Library - Fix**
34
+ - [PR #94](https://github.com/sendgrid/smtpapi-ruby/pull/94): add skip_cleanup flag to fix travis deploy. Thanks to [@thinkingserious](https://github.com/thinkingserious)!
35
+
36
+
6
37
  [2020-01-22] Version 0.1.2
7
38
  --------------------------
8
39
  **Library - Docs**
@@ -1,7 +1,5 @@
1
1
  Hello! Thank you for choosing to help contribute to one of the SendGrid open source libraries. There are many ways you can contribute and help is always welcome. We simply ask that you follow the following contribution policies.
2
2
 
3
- - [CLAs and CCLAs](#cla)
4
- - [Roadmap & Milestones](#roadmap)
5
3
  - [Feature Request](#feature-request)
6
4
  - [Submit a Bug Report](#submit-a-bug-report)
7
5
  - [Improvements to the Codebase](#improvements-to-the-codebase)
@@ -9,23 +7,10 @@ Hello! Thank you for choosing to help contribute to one of the SendGrid open sou
9
7
  - [Testing](#testing)
10
8
  - [Style Guidelines & Naming Conventions](#style-guidelines-and-naming-conventions)
11
9
  - [Creating a Pull Request](#creating-a-pull-request)
10
+ - [Code Reviews](#code-reviews)
12
11
 
13
- <a name="roadmap"></a>
14
12
  We use [Milestones](https://github.com/sendgrid/smtpapi-ruby/milestones) to help define current roadmaps, please feel free to grab an issue from the current milestone. Please indicate that you have begun work on it to avoid collisions. Once a PR is made, community review, comments, suggestions and additional PRs are welcomed and encouraged.
15
13
 
16
- <a name="cla"></a>
17
- ## CLAs and CCLAs
18
-
19
- Before you get started, SendGrid requires that a SendGrid Contributor License Agreement (CLA) be filled out by every contributor to a SendGrid open source project.
20
-
21
- Our goal with the CLA is to clarify the rights of our contributors and reduce other risks arising from inappropriate contributions. The CLA also clarifies the rights SendGrid holds in each contribution and helps to avoid misunderstandings over what rights each contributor is required to grant to SendGrid when making a contribution. In this way the CLA encourages broad participation by our open source community and helps us build strong open source projects, free from any individual contributor withholding or revoking rights to any contribution.
22
-
23
- SendGrid does not merge a pull request made against a SendGrid open source project until that pull request is associated with a signed CLA. Copies of the CLA are available [here](https://gist.github.com/SendGridDX/98b42c0a5d500058357b80278fde3be8#file-sendgrid_cla).
24
-
25
- When you create a Pull Request, after a few seconds, a comment will appear with a link to the CLA. Click the link and fill out the brief form and then click the "I agree" button and you are all set. You will not be asked to re-sign the CLA unless we make a change.
26
-
27
- There are a few ways to contribute, which we'll enumerate below:
28
-
29
14
  <a name="feature-request"></a>
30
15
  ## Feature Request
31
16
 
@@ -51,7 +36,7 @@ Before you decide to create a new issue, please try the following:
51
36
 
52
37
  ### Please use our Bug Report Template
53
38
 
54
- In order to make the process easier, we've included a [sample bug report template](https://github.com/sendgrid/smtpapi-ruby/ISSUE_TEMPLATE.md) (borrowed from [Ghost](https://github.com/TryGhost/Ghost/)). The template uses [GitHub flavored markdown](https://help.github.com/articles/github-flavored-markdown/) for formatting.
39
+ In order to make the process easier, we've included a [sample bug report template](ISSUE_TEMPLATE.md).
55
40
 
56
41
  <a name="improvements-to-the-codebase"></a>
57
42
  ## Improvements to the Codebase
@@ -178,4 +163,7 @@ Please run your code through:
178
163
  7. [Open a Pull Request](https://help.github.com/articles/using-pull-requests/)
179
164
  with a clear title and description against the `master` branch. All tests must be passing before we will review the PR.
180
165
 
181
- If you have any additional questions, please feel free to [email](mailto:dx@sendgrid.com) us or create an issue in this repo.
166
+ <a name="code-reviews"></a>
167
+ ## Code Reviews
168
+
169
+ If you can, please look at open PRs and review them. Give feedback and help us merge these PRs much faster! If you don't know how, Github has some great <a href="https://help.github.com/articles/about-pull-request-reviews/">information on how to review a Pull Request.</a>
@@ -1,5 +1,9 @@
1
1
  <!--
2
2
  If this is a feature request, make sure you search Issues for an existing request before creating a new one!
3
+
4
+ Please utilize the template below to help us resolve your issue.
5
+
6
+ Note that many issues can be resolved by updating to the latest version.
3
7
  -->
4
8
 
5
9
  ### Issue Summary
@@ -21,6 +25,6 @@ A summary of the issue and the environment in which it occurs. If suitable, incl
21
25
  ```
22
26
 
23
27
  ### Technical details:
24
- * smtpapi-ruby version:
28
+ * smtpapi-ruby version:
25
29
  * ruby version:
26
30
 
@@ -23,7 +23,7 @@ A short description of what this PR does.
23
23
  - [ ] I have made a material change to the repo (functionality, testing, spelling, grammar)
24
24
  - [ ] I have read the [Contribution Guidelines](CONTRIBUTING.md) and my PR follows them
25
25
  - [ ] I have titled the PR appropriately
26
- - [ ] I have updated my branch with the master branch
26
+ - [ ] I have updated my branch with the main branch
27
27
  - [ ] I have added tests that prove my fix is effective or that my feature works
28
28
  - [ ] I have added necessary documentation about the functionality in the appropriate .md file
29
29
  - [ ] I have added inline documentation to the code I modified
data/README.md CHANGED
@@ -10,10 +10,8 @@
10
10
 
11
11
  **This ruby gem allows you to quickly and more easily generate SendGrid X-SMTPAPI headers.**
12
12
 
13
-
14
13
  # Announcements
15
-
16
- **NEW:** If you're a software engineer who is passionate about #DeveloperExperience and/or #OpenSource, [this is an incredible opportunity to join our #DX team](https://sendgrid.com/careers/role/1421152/?gh_jid=1421152) as a Developer Experience Engineer and work with [@thinkingserious](https://github.com/thinkingserious) and [@aroach](https://github.com/aroach)! Tell your friends :)
14
+ **The default branch name for this repository has been changed to `main` as of 07/27/2020.**
17
15
 
18
16
  All updates to this library is documented in our [CHANGELOG](https://github.com/sendgrid/smtpapi-ruby/blob/master/CHANGELOG.md).
19
17
 
@@ -31,7 +29,7 @@ All updates to this library is documented in our [CHANGELOG](https://github.com/
31
29
 
32
30
  ## Prerequisites
33
31
 
34
- - Ruby version 2.2
32
+ - Ruby version >= 2.4
35
33
  - The SendGrid service, starting at the [free level](https://sendgrid.com/free?source=smtpapi-ruby)
36
34
 
37
35
  ## Install Package
@@ -95,8 +93,8 @@ Quick links:
95
93
 
96
94
  - [Feature Request](https://github.com/sendgrid/smtpapi-ruby/blob/master/CONTRIBUTING.md#feature_request)
97
95
  - [Bug Reports](https://github.com/sendgrid/smtpapi-ruby/blob/master/CONTRIBUTING.md#submit_a_bug_report)
98
- - [Sign the CLA to Create a Pull Request](https://github.com/sendgrid/smtpapi-ruby/blob/master/CONTRIBUTING.md#cla)
99
96
  - [Improvements to the Codebase](https://github.com/sendgrid/smtpapi-ruby/blob/master/CONTRIBUTING.md#improvements_to_the_codebase)
97
+ - [Review Pull Requests](https://github.com/sendgrid/smtpapi-ruby/blob/master/CONTRIBUTING.md#code-reviews)
100
98
 
101
99
  ## Credits
102
100
 
@@ -105,9 +103,11 @@ This library was created by [Wataru Sato](https://github.com/awwa) and is now ma
105
103
  <a name="about"></a>
106
104
  # About
107
105
 
108
- smtpapi-ruby is guided and supported by the SendGrid [Developer Experience Team](mailto:dx@sendgrid.com).
106
+ smtpapi-ruby is maintained and funded by Twilio SendGrid, Inc. The names and logos for smtpapi-ruby are trademarks of Twilio SendGrid, Inc.
107
+
108
+ If you need help installing or using the library, please check the [Twilio SendGrid Support Help Center](https://support.sendgrid.com).
109
109
 
110
- smtpapi-ruby is maintained and funded by SendGrid, Inc. The names and logos for smtpapi-ruby are trademarks of SendGrid, Inc.
110
+ If you've instead found a bug in the library or would like new features added, go ahead and open issues or pull requests against this repo!
111
111
 
112
112
  <a name="license"></a>
113
113
  # License
@@ -0,0 +1,4 @@
1
+ # Usage
2
+
3
+ - [SendGrid Docs](https://sendgrid.com/docs/API_Reference/SMTP_API/index.html)
4
+ - [Example Code](https://github.com/sendgrid/smtpapi-ruby/blob/master/examples)
@@ -81,9 +81,7 @@ module Smtpapi
81
81
 
82
82
  def add_filter(filter_name, parameter_name, parameter_value)
83
83
  @filters[filter_name] = {} if @filters[filter_name].nil?
84
- if @filters[filter_name]['settings'].nil?
85
- @filters[filter_name]['settings'] = {}
86
- end
84
+ @filters[filter_name]['settings'] = {} if @filters[filter_name]['settings'].nil?
87
85
  @filters[filter_name]['settings'][parameter_name] = parameter_value
88
86
  self
89
87
  end
@@ -140,7 +138,8 @@ module Smtpapi
140
138
  def json_string
141
139
  escape_unicode(to_array.to_json)
142
140
  end
143
- alias_method :to_json, :json_string
141
+
142
+ alias :to_json :json_string
144
143
 
145
144
  def escape_unicode(str)
146
145
  str.unpack('U*').map do |i|
@@ -2,5 +2,5 @@
2
2
  # SendGrid smtpapi
3
3
  #
4
4
  module Smtpapi
5
- VERSION = '0.1.2'.freeze
5
+ VERSION = '0.1.7'.freeze
6
6
  end
@@ -20,4 +20,5 @@ Gem::Specification.new do |spec|
20
20
  spec.add_development_dependency 'rake'
21
21
  spec.add_development_dependency('rubocop', '>=0.29.0', '<0.30.0')
22
22
  spec.add_development_dependency('test-unit', '~> 3.0')
23
+ spec.add_development_dependency 'simplecov'
23
24
  end
@@ -1,3 +1,4 @@
1
+ require 'test_helper'
1
2
  require 'test/unit'
2
3
  require './lib/smtpapi'
3
4
 
@@ -6,7 +7,7 @@ require './lib/smtpapi'
6
7
  #
7
8
  class SmtpapiTest < Test::Unit::TestCase
8
9
  def test_version
9
- assert_equal('0.1.2', Smtpapi::VERSION)
10
+ assert_equal('0.1.7', Smtpapi::VERSION)
10
11
  end
11
12
 
12
13
  def test_empty
@@ -0,0 +1,2 @@
1
+ require 'simplecov'
2
+ SimpleCov.start
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.2
4
+ version: 0.1.7
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: 2020-01-22 00:00:00.000000000 Z
12
+ date: 2020-08-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -59,6 +59,20 @@ dependencies:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: '3.0'
62
+ - !ruby/object:Gem::Dependency
63
+ name: simplecov
64
+ requirement: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ type: :development
70
+ prerelease: false
71
+ version_requirements: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
62
76
  description: Smtpapi library for SendGrid.
63
77
  email:
64
78
  - awwa500@gmail.com
@@ -83,11 +97,13 @@ files:
83
97
  - README.md
84
98
  - Rakefile
85
99
  - TROUBLESHOOTING.md
100
+ - USAGE.md
86
101
  - examples/example.rb
87
102
  - lib/smtpapi.rb
88
103
  - lib/smtpapi/version.rb
89
104
  - smtpapi.gemspec
90
105
  - test/test.rb
106
+ - test/test_helper.rb
91
107
  - use_cases/README.md
92
108
  homepage: https://github.com/sendgrid/smtpapi-ruby
93
109
  licenses:
@@ -108,9 +124,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
108
124
  - !ruby/object:Gem::Version
109
125
  version: '0'
110
126
  requirements: []
111
- rubygems_version: 3.0.3
127
+ rubygems_version: 3.0.8
112
128
  signing_key:
113
129
  specification_version: 4
114
130
  summary: Smtpapi library for SendGrid.
115
131
  test_files:
116
132
  - test/test.rb
133
+ - test/test_helper.rb