truemail-client 0.1.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -2,6 +2,62 @@
2
2
 
3
3
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
4
4
 
5
+ ## [0.3.2] - 2021-05-19
6
+
7
+ ### Fixed
8
+
9
+ - Gem syntax compatibility with Ruby 3.x
10
+
11
+ ### Changed
12
+
13
+ - Updated gem dependencies
14
+ - Updated rubocop/codeclimate config
15
+ - Updated gem version
16
+
17
+ ## [0.3.1] - 2021-05-08
18
+
19
+ ### Changed
20
+
21
+ - Updated gem dependencies
22
+ - Updated rubocop/codeclimate config
23
+ - Updated gem version
24
+
25
+ ## [0.3.0] - 2020-10-28
26
+
27
+ ### Changed
28
+
29
+ Truemail client sends encoded uri params, follows [RFC 3986, sec 2.1](https://tools.ietf.org/html/rfc3986#section-2.1).
30
+
31
+ - Updated `Truemail::Client::Http#request_uri`
32
+ - Updated gem dependencies
33
+ - Updated gem version, changelog, docs
34
+
35
+ ## [0.2.1] - 2020-10-05
36
+
37
+ ### Fixed
38
+
39
+ - Removed auth headers for public endpoint request
40
+
41
+ ### Changed
42
+
43
+ - `Truemail::Client::Http#run`
44
+ - Updated gem version
45
+
46
+ ## [0.2.0] - 2020-10-04
47
+
48
+ ### Added
49
+
50
+ Ability to use Truemail healthcheck endpoint
51
+
52
+ - Added `Truemail::Client.server_healthy?`
53
+
54
+ ### Changed
55
+
56
+ - Updated `Truemail::Client::Http#uri`
57
+ - Updated gem dependencies
58
+ - Updated gem documentation
59
+ - Updated gem version
60
+
5
61
  ## [0.1.1] - 2020-07-21
6
62
 
7
63
  ### Changed
data/CONTRIBUTING.md CHANGED
@@ -6,28 +6,28 @@ Following these guidelines helps to communicate that you respect the time of the
6
6
 
7
7
  ## Using the issue tracker
8
8
 
9
- The issue tracker is the preferred channel for [bug reports](#bugs), [features requests](#features) and [submitting pull requests](#pull-requests).
9
+ The issue tracker is the preferred channel for [issue/bug reports](#issuebug-reports), [feature requests](#feature-requests), [questions](#questions) and submitting [pull requests](#pull-requests).
10
10
 
11
- <a name="bugs"></a>
12
- ## Bug/issue reports
11
+ ## Issue/bug reports
13
12
 
14
- A bug is a _demonstrable problem_ that is caused by the code in the repository.
15
- Good bug reports are extremely helpful - thank you!
13
+ A bug is a _demonstrable problem_ that is caused by the code in the repository. Good bug reports are extremely helpful - thank you!
16
14
 
17
- Guidelines for bug reports:
15
+ Guidelines for issue/bug reports:
18
16
 
19
17
  1. **Use the GitHub issue search** &mdash; check if the issue has already been reported
20
- 2. **Check if the issue has been fixed** &mdash; try to reproduce it using the latest `master` or development branch in the repository
21
- 3. Truemail [issue template](.github/ISSUE_TEMPLATE.md)
18
+ 2. **Check if the issue has been fixed** &mdash; try to reproduce it using the latest `master` or `develop` branch in the repository
19
+ 3. Truemail [issue template](.github/ISSUE_TEMPLATE/issue_report.md)/[bug template](.github/ISSUE_TEMPLATE/bug_report.md)
22
20
 
23
21
  A good bug report shouldn't leave others needing to chase you up for more information. Please try to be as detailed as possible in your report. What is your environment? What steps will reproduce the issue? What would you expect to be the outcome? All these details will help people to fix any potential bugs.
24
22
 
25
- <a name="features"></a>
26
23
  ## Feature requests
27
24
 
28
25
  Feature requests are welcome. But take a moment to find out whether your idea fits with the scope and aims of the project. It's up to *you* to make a strong case to convince the project's developers of the merits of this feature. Please provide as much detail and context as possible.
29
26
 
30
- <a name="pull-requests"></a>
27
+ ## Questions
28
+
29
+ We're always open to a new conversations. So if you have any questions just ask us.
30
+
31
31
  ## Pull requests
32
32
 
33
33
  Good pull requests - patches, improvements, new features - are a fantastic help. They should remain focused in scope and avoid containing unrelated commits.
@@ -39,7 +39,8 @@ Please adhere to the coding conventions used throughout a project (indentation,
39
39
  Guidelines for pull requests:
40
40
 
41
41
  1. Truemail [pull request template](.github/PULL_REQUEST_TEMPLATE.md)
42
- 2. Fork the repo
43
- 3. Run the tests. This is to make sure your starting point works. Tests can be run via ```rspec```
44
- 4. Create a new branch and make your changes. This includes tests for features!
45
- 5. Push to your fork and submit a pull request
42
+ 2. Fork the repo, checkout to `develop` branch
43
+ 3. Run the tests. This is to make sure your starting point works
44
+ 4. Read our [branch naming convention](.github/BRANCH_NAMING_CONVENTION.md)
45
+ 5. Create a new branch and make your changes. This includes tests for features!
46
+ 6. Push to your fork and submit a pull request to `develop` branch
data/Gemfile.lock CHANGED
@@ -1,42 +1,46 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- truemail-client (0.1.1)
4
+ truemail-client (0.3.2)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
9
  addressable (2.7.0)
10
10
  public_suffix (>= 2.0.2, < 5.0)
11
- ast (2.4.1)
12
- bundler-audit (0.7.0.1)
11
+ ast (2.4.2)
12
+ bundler-audit (0.8.0)
13
13
  bundler (>= 1.2.0, < 3)
14
- thor (>= 0.18, < 2)
14
+ thor (~> 1.0)
15
15
  byebug (11.1.3)
16
16
  childprocess (4.0.0)
17
17
  coderay (1.1.3)
18
18
  colorize (0.8.1)
19
- crack (0.4.3)
20
- safe_yaml (~> 1.0.0)
19
+ concurrent-ruby (1.1.8)
20
+ crack (0.4.5)
21
+ rexml
21
22
  diff-lcs (1.4.4)
22
- docile (1.3.2)
23
- fasterer (0.8.3)
23
+ docile (1.4.0)
24
+ faker (2.18.0)
25
+ i18n (>= 1.6, < 2)
26
+ fasterer (0.9.0)
24
27
  colorize (~> 0.7)
25
28
  ruby_parser (>= 3.14.1)
26
- ffaker (2.15.0)
27
29
  hashdiff (1.0.1)
30
+ i18n (1.8.10)
31
+ concurrent-ruby (~> 1.0)
28
32
  iniparse (1.5.0)
29
- json (2.3.1)
33
+ json (2.5.1)
30
34
  json_matchers (0.11.1)
31
35
  json_schema
32
- json_schema (0.20.9)
36
+ json_schema (0.21.0)
33
37
  kwalify (0.7.2)
34
38
  method_source (1.0.0)
35
- overcommit (0.55.0)
39
+ overcommit (0.57.0)
36
40
  childprocess (>= 0.6.3, < 5)
37
41
  iniparse (~> 1.4)
38
- parallel (1.19.2)
39
- parser (2.7.1.4)
42
+ parallel (1.20.1)
43
+ parser (3.0.1.1)
40
44
  ast (~> 2.4.1)
41
45
  pry (0.13.1)
42
46
  coderay (~> 1.1)
@@ -44,82 +48,83 @@ GEM
44
48
  pry-byebug (3.9.0)
45
49
  byebug (~> 11.0)
46
50
  pry (~> 0.13.0)
47
- psych (3.1.0)
48
- public_suffix (4.0.5)
51
+ psych (3.3.2)
52
+ public_suffix (4.0.6)
49
53
  rainbow (3.0.0)
50
- rake (13.0.1)
51
- reek (6.0.1)
54
+ rake (13.0.3)
55
+ reek (6.0.4)
52
56
  kwalify (~> 0.7.0)
53
- parser (>= 2.5.0.0, < 2.8, != 2.5.1.1)
54
- psych (~> 3.1.0)
57
+ parser (~> 3.0.0)
58
+ psych (~> 3.1)
55
59
  rainbow (>= 2.0, < 4.0)
56
- regexp_parser (1.7.1)
57
- rexml (3.2.4)
58
- rspec (3.9.0)
59
- rspec-core (~> 3.9.0)
60
- rspec-expectations (~> 3.9.0)
61
- rspec-mocks (~> 3.9.0)
62
- rspec-core (3.9.2)
63
- rspec-support (~> 3.9.3)
64
- rspec-expectations (3.9.2)
60
+ regexp_parser (2.1.1)
61
+ rexml (3.2.5)
62
+ rspec (3.10.0)
63
+ rspec-core (~> 3.10.0)
64
+ rspec-expectations (~> 3.10.0)
65
+ rspec-mocks (~> 3.10.0)
66
+ rspec-core (3.10.1)
67
+ rspec-support (~> 3.10.0)
68
+ rspec-expectations (3.10.1)
65
69
  diff-lcs (>= 1.2.0, < 2.0)
66
- rspec-support (~> 3.9.0)
67
- rspec-mocks (3.9.1)
70
+ rspec-support (~> 3.10.0)
71
+ rspec-mocks (3.10.2)
68
72
  diff-lcs (>= 1.2.0, < 2.0)
69
- rspec-support (~> 3.9.0)
70
- rspec-support (3.9.3)
71
- rubocop (0.88.0)
73
+ rspec-support (~> 3.10.0)
74
+ rspec-support (3.10.2)
75
+ rubocop (1.15.0)
72
76
  parallel (~> 1.10)
73
- parser (>= 2.7.1.1)
77
+ parser (>= 3.0.0.0)
74
78
  rainbow (>= 2.2.2, < 4.0)
75
- regexp_parser (>= 1.7)
79
+ regexp_parser (>= 1.8, < 3.0)
76
80
  rexml
77
- rubocop-ast (>= 0.1.0, < 1.0)
81
+ rubocop-ast (>= 1.5.0, < 2.0)
78
82
  ruby-progressbar (~> 1.7)
79
- unicode-display_width (>= 1.4.0, < 2.0)
80
- rubocop-ast (0.2.0)
81
- parser (>= 2.7.0.1)
82
- rubocop-performance (1.7.1)
83
- rubocop (>= 0.82.0)
84
- rubocop-rspec (1.42.0)
85
- rubocop (>= 0.87.0)
86
- ruby-progressbar (1.10.1)
87
- ruby_parser (3.14.2)
88
- sexp_processor (~> 4.9)
89
- safe_yaml (1.0.5)
90
- sexp_processor (4.15.0)
83
+ unicode-display_width (>= 1.4.0, < 3.0)
84
+ rubocop-ast (1.5.0)
85
+ parser (>= 3.0.1.1)
86
+ rubocop-performance (1.11.3)
87
+ rubocop (>= 1.7.0, < 2.0)
88
+ rubocop-ast (>= 0.4.0)
89
+ rubocop-rspec (2.3.0)
90
+ rubocop (~> 1.0)
91
+ rubocop-ast (>= 1.1.0)
92
+ ruby-progressbar (1.11.0)
93
+ ruby_parser (3.16.0)
94
+ sexp_processor (~> 4.15, >= 4.15.1)
95
+ sexp_processor (4.15.3)
91
96
  simplecov (0.17.1)
92
97
  docile (~> 1.1)
93
98
  json (>= 1.8, < 3)
94
99
  simplecov-html (~> 0.10.0)
95
100
  simplecov-html (0.10.2)
96
- thor (1.0.1)
97
- unicode-display_width (1.7.0)
98
- webmock (3.8.3)
101
+ thor (1.1.0)
102
+ unicode-display_width (2.0.0)
103
+ webmock (3.13.0)
99
104
  addressable (>= 2.3.6)
100
105
  crack (>= 0.3.2)
101
106
  hashdiff (>= 0.4.0, < 2.0.0)
102
107
 
103
108
  PLATFORMS
104
- ruby
109
+ x86_64-darwin-19
105
110
 
106
111
  DEPENDENCIES
107
- bundler (~> 1.16)
108
- bundler-audit (~> 0.7.0.1)
109
- fasterer (~> 0.8.3)
110
- ffaker (~> 2.15)
112
+ bundler (~> 2.2, >= 2.2.17)
113
+ bundler-audit (~> 0.8.0)
114
+ faker (~> 2.17)
115
+ fasterer (~> 0.9.0)
111
116
  json_matchers (~> 0.11.1)
112
- overcommit (~> 0.55.0)
117
+ overcommit (~> 0.57.0)
113
118
  pry-byebug (~> 3.9)
114
- rake (~> 13.0, >= 13.0.1)
115
- reek (~> 6.0, >= 6.0.1)
116
- rspec (~> 3.9)
117
- rubocop (~> 0.88.0)
118
- rubocop-performance (~> 1.7, >= 1.7.1)
119
- rubocop-rspec (~> 1.42)
119
+ rake (~> 13.0, >= 13.0.3)
120
+ reek (~> 6.0, >= 6.0.4)
121
+ rspec (~> 3.10)
122
+ rubocop (~> 1.14)
123
+ rubocop-performance (~> 1.11, >= 1.11.3)
124
+ rubocop-rspec (~> 2.3)
120
125
  simplecov (~> 0.17.1)
121
126
  truemail-client!
122
- webmock (~> 3.8, >= 3.8.3)
127
+ webmock (~> 3.12, >= 3.12.2)
123
128
 
124
129
  BUNDLED WITH
125
- 1.16.6
130
+ 2.2.17
data/README.md CHANGED
@@ -1,15 +1,26 @@
1
- # <img src='https://repository-images.githubusercontent.com/246571655/128eda80-63af-11ea-8a0e-d1a7b9043c29' height='250' alt='Truemail web API client library for Ruby' />
1
+ # ![Truemail web API client library for Ruby](https://truemail-rb.org/assets/images/truemail_logo.png)
2
2
 
3
- [![Maintainability](https://api.codeclimate.com/v1/badges/ccc7167f4f49d4a10146/maintainability)](https://codeclimate.com/github/truemail-rb/truemail-ruby-client/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/ccc7167f4f49d4a10146/test_coverage)](https://codeclimate.com/github/truemail-rb/truemail-ruby-client/test_coverage) [![CircleCI](https://circleci.com/gh/truemail-rb/truemail-ruby-client/tree/develop.svg?style=svg)](https://circleci.com/gh/truemail-rb/truemail-ruby-client/tree/develop) [![Gem Version](https://badge.fury.io/rb/truemail-client.svg)](https://badge.fury.io/rb/truemail-client) [![Downloads](https://img.shields.io/gem/dt/truemail-client.svg?colorA=004d99&colorB=0073e6)](https://rubygems.org/gems/truemail-client) [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v1.4%20adopted-ff69b4.svg)](CODE_OF_CONDUCT.md)
3
+ [![Maintainability](https://api.codeclimate.com/v1/badges/ccc7167f4f49d4a10146/maintainability)](https://codeclimate.com/github/truemail-rb/truemail-ruby-client/maintainability)
4
+ [![Test Coverage](https://api.codeclimate.com/v1/badges/ccc7167f4f49d4a10146/test_coverage)](https://codeclimate.com/github/truemail-rb/truemail-ruby-client/test_coverage)
5
+ [![CircleCI](https://circleci.com/gh/truemail-rb/truemail-ruby-client/tree/develop.svg?style=svg)](https://circleci.com/gh/truemail-rb/truemail-ruby-client/tree/develop)
6
+ [![Gem Version](https://badge.fury.io/rb/truemail-client.svg)](https://badge.fury.io/rb/truemail-client)
7
+ [![Downloads](https://img.shields.io/gem/dt/truemail-client.svg?colorA=004d99&colorB=0073e6)](https://rubygems.org/gems/truemail-client)
8
+ [![Gitter](https://badges.gitter.im/truemail-rb/community.svg)](https://gitter.im/truemail-rb/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
9
+ [![GitHub](https://img.shields.io/github/license/truemail-rb/truemail-ruby-client)](LICENSE.txt)
10
+ [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v1.4%20adopted-ff69b4.svg)](CODE_OF_CONDUCT.md)
4
11
 
5
12
  `truemail-client` gem - [Truemail web API](https://github.com/truemail-rb/truemail-rack) client library for Ruby.
6
13
 
14
+ > Actual and maintainable documentation :books: for developers is living [here](https://truemail-rb.org/truemail-ruby-client).
15
+
7
16
  ## Table of Contents
8
17
 
18
+ - [Requirements](#requirements)
9
19
  - [Installation](#installation)
10
20
  - [Usage](#usage)
11
21
  - [Setting global configuration](#setting-global-configuration)
12
22
  - [Establishing connection with Truemail API](#establishing-connection-with-truemail-api)
23
+ - [Checking server health status](#checking-server-health-status)
13
24
  - [Additional features](#additional-features)
14
25
  - [Truemail family](#truemail-family)
15
26
  - [Contributing](#contributing)
@@ -18,6 +29,10 @@
18
29
  - [Versioning](#versioning)
19
30
  - [Changelog](CHANGELOG.md)
20
31
 
32
+ ## Requirements
33
+
34
+ Ruby MRI 2.5.0+
35
+
21
36
  ## Installation
22
37
 
23
38
  Add this line to your application's Gemfile:
@@ -44,17 +59,17 @@ To have an access for `Truemail::Client` you must configure it first as in the e
44
59
  require 'truemail/client'
45
60
 
46
61
  Truemail::Client.configure do |config|
47
- # Optional parameter (Boolean). By default it is equal false
48
- config.secure_connection = true
49
-
50
62
  # Required parameter (String). It should be a hostname or an ip address where Truemail server runs
51
63
  config.host = 'example.com'
52
64
 
53
- # Optional parameter (Integer). By default it is equal 9292
54
- config.port = 80
55
-
56
65
  # Required parameter (String). It should be valid Truemail server access token
57
66
  config.token = 'token'
67
+
68
+ # Optional parameter (Boolean). By default it is equal false
69
+ config.secure_connection = true
70
+
71
+ # Optional parameter (Integer). By default it is equal 9292
72
+ config.port = 80
58
73
  end
59
74
  ```
60
75
 
@@ -64,24 +79,29 @@ After successful configuration, you can establish connection with Truemail serve
64
79
 
65
80
  ```ruby
66
81
  Truemail::Client.validate('admin@bestweb.com.ua')
67
- => {
68
- "date": "2020-02-26 17:00:56 +0200",
69
- "email": "admin@bestweb.com.ua",
70
- "validation_type": "smtp",
71
- "success": true,
72
- "errors": null,
73
- "smtp_debug": null,
74
- "configuration": {
75
- "validation_type_by_domain": null,
76
- "whitelist_validation": false,
77
- "whitelisted_domains": null,
78
- "blacklisted_domains": null,
79
- "smtp_safe_check": false,
80
- "email_pattern": "default gem value",
81
- "smtp_error_body_pattern": "default gem value",
82
- "not_rfc_mx_lookup_flow": false
83
- }
84
- }
82
+ ```
83
+
84
+ ```json
85
+ {
86
+ "date": "2020-02-26 17:00:56 +0200",
87
+ "email": "admin@bestweb.com.ua",
88
+ "validation_type": "smtp",
89
+ "success": true,
90
+ "errors": null,
91
+ "smtp_debug": null,
92
+ "configuration": {
93
+ "validation_type_by_domain": null,
94
+ "whitelist_validation": false,
95
+ "whitelisted_domains": null,
96
+ "blacklisted_domains": null,
97
+ "blacklisted_mx_ip_addresses": null,
98
+ "dns": null,
99
+ "smtp_safe_check": false,
100
+ "email_pattern": "default gem value",
101
+ "smtp_error_body_pattern": "default gem value",
102
+ "not_rfc_mx_lookup_flow": false
103
+ }
104
+ }
85
105
  ```
86
106
 
87
107
  `Truemail::Client.validate` always returns JSON data. If something goes wrong you will receive JSON with error details:
@@ -92,6 +112,16 @@ Truemail::Client.validate('admin@bestweb.com.ua')
92
112
  }
93
113
  ```
94
114
 
115
+ ### Checking server health status
116
+
117
+ After successful configuration, you can check health-status of Truemail server.
118
+
119
+ ```ruby
120
+ Truemail::Client.server_healthy?
121
+
122
+ => true
123
+ ```
124
+
95
125
  ### Additional features
96
126
 
97
127
  #### Read global configuration
@@ -136,14 +166,15 @@ Truemail::Client.configuration
136
166
 
137
167
  ## Truemail family
138
168
 
139
- All Truemail extensions: https://github.com/truemail-rb
169
+ All Truemail solutions: https://truemail-rb.org
140
170
 
141
171
  | Name | Type | Description |
142
172
  | --- | --- | --- |
143
- | [truemail](https://github.com/rubygarage/truemail) | ruby gem | Configurable framework agnostic plain Ruby email validator, main core |
173
+ | [truemail](https://github.com/truemail-rb/truemail) | ruby gem | Configurable framework agnostic plain Ruby email validator, main core |
144
174
  | [truemail server](https://github.com/truemail-rb/truemail-rack) | ruby app | Lightweight rack based web API wrapper for Truemail |
145
175
  | [truemail-rack-docker](https://github.com/truemail-rb/truemail-rack-docker-image) | docker image | Lightweight rack based web API [dockerized image](https://hub.docker.com/r/truemail/truemail-rack) :whale: of Truemail server |
146
176
  | [truemail-crystal-client](https://github.com/truemail-rb/truemail-crystal-client) | crystal shard | Truemail web API client library for Crystal |
177
+ | [truemail-java-client](https://github.com/truemail-rb/truemail-java-client) | java lib | Truemail web API client library for Java |
147
178
  | [truemail-rspec](https://github.com/truemail-rb/truemail-rspec) | ruby gem | Truemail configuration and validator RSpec helpers |
148
179
 
149
180
  ## Contributing