truemail 2.0.0 → 2.0.1
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/.codeclimate.yml +1 -1
- data/.rubocop.yml +9 -0
- data/CHANGELOG.md +22 -14
- data/Gemfile.lock +17 -17
- data/README.md +1 -1
- data/lib/truemail/version.rb +1 -1
- data/truemail.gemspec +3 -3
- metadata +8 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: df5c336052c203a93e507bc6ab7780dce97ee2fce675802970c3833ebb9dc67d
|
|
4
|
+
data.tar.gz: fe656f4cfdbf3b5ac2553b564949d571b9acfb3b4966b4b1e92e54e4dc944424
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 00f45a13fb66496f3cac30f4be31c9894aa1f825e7038605cafadbbb790323774a448cf962dad39331c59f883edc2660028e44ea5b0a69ecfcde2ca961d5eb14
|
|
7
|
+
data.tar.gz: 20a6a83a217a2f727060db14ba98eb68ba232394f95a2cc2c1eb8f51ca1a67ee9600035959f4c2aaf30ac71edecea0dd16f815652d35526a3e125ca1e940bbe9
|
data/.codeclimate.yml
CHANGED
data/.rubocop.yml
CHANGED
|
@@ -115,6 +115,9 @@ Style/RedundantSelfAssignment:
|
|
|
115
115
|
Style/SoleNestedConditional:
|
|
116
116
|
Enabled: true
|
|
117
117
|
|
|
118
|
+
Style/ClassEqualityComparison:
|
|
119
|
+
Enabled: true
|
|
120
|
+
|
|
118
121
|
Layout/LineLength:
|
|
119
122
|
Max: 140
|
|
120
123
|
|
|
@@ -212,6 +215,12 @@ Lint/UselessMethodDefinition:
|
|
|
212
215
|
Lint/UselessTimes:
|
|
213
216
|
Enabled: true
|
|
214
217
|
|
|
218
|
+
Lint/HashCompareByIdentity:
|
|
219
|
+
Enabled: true
|
|
220
|
+
|
|
221
|
+
Lint/RedundantSafeNavigation:
|
|
222
|
+
Enabled: true
|
|
223
|
+
|
|
215
224
|
Performance/AncestorsInclude:
|
|
216
225
|
Enabled: true
|
|
217
226
|
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
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
|
+
## [2.0.1] - 2020.10.20
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- gem development dependencies
|
|
10
|
+
- gem documentation
|
|
11
|
+
|
|
5
12
|
## [2.0.0] - 2020.10.19
|
|
6
13
|
|
|
7
14
|
### Fixed
|
|
@@ -14,7 +21,7 @@ SMTP connection errors: invalid `HELO` hostname (`localhost`), duplicate `HELO`
|
|
|
14
21
|
- Updated `Truemail::Validate::Smtp::Request#session_data`
|
|
15
22
|
- Updated `Truemail::Validate::Smtp::Response`
|
|
16
23
|
|
|
17
|
-
Now `helo` is a `Boolean` instead of `Net::SMTP::Response` instance. It was changed because `helo` is sending during SMTP-session initializing (`Net::SMTP.new.start`), and `helo` is always `true` if session up is okay. Also `hello` response won't logged as error if it happens. Example of `Truemail::Validate::Smtp::Response` instance from
|
|
24
|
+
Now `helo` is a `Boolean` instead of `Net::SMTP::Response` instance. It was changed because `helo` is sending during SMTP-session initializing (`Net::SMTP.new.start`), and `helo` is always `true` if session up is okay. Also `hello` response won't logged as error if it happens. Example of `Truemail::Validate::Smtp::Response` instance from 2.x version.
|
|
18
25
|
|
|
19
26
|
```ruby
|
|
20
27
|
#<struct Truemail::Validate::Smtp::Response:0x00007fa74704cd10
|
|
@@ -379,6 +386,7 @@ Truemail.validate('email@white-domain.com', with: :regex)
|
|
|
379
386
|
smtp_debug=nil>,
|
|
380
387
|
@validation_type=:regex>
|
|
381
388
|
```
|
|
389
|
+
|
|
382
390
|
**Email hasn't whitelisted domain**
|
|
383
391
|
|
|
384
392
|
```ruby
|
|
@@ -406,7 +414,7 @@ Truemail.validate('email@domain.com', with: :regex)
|
|
|
406
414
|
|
|
407
415
|
- Configurable default validation type, [issue details](https://github.com/truemail-rb/truemail/issues/48)
|
|
408
416
|
|
|
409
|
-
You can predefine default validation type for
|
|
417
|
+
You can predefine default validation type for `Truemail.validate('email@email.com')` call without with-parameter. Available validation types: `:regex`, `:mx`, `:smtp`. By default validation type still remains `:smtp`
|
|
410
418
|
|
|
411
419
|
```ruby
|
|
412
420
|
Truemail.configure do |config|
|
|
@@ -461,7 +469,7 @@ Truemail.validate('email@black-domain.com')
|
|
|
461
469
|
|
|
462
470
|
### Added
|
|
463
471
|
|
|
464
|
-
- Feature domain whitelist blacklist. Other validations will not processed even if it was defined in
|
|
472
|
+
- Feature domain whitelist blacklist. Other validations will not processed even if it was defined in `validation_type_for`.
|
|
465
473
|
|
|
466
474
|
```ruby
|
|
467
475
|
Truemail.configure do |config|
|
|
@@ -484,7 +492,7 @@ Truemail.configuration.blacklisted_domains = ['somedomain1.com', 'somedomain2.co
|
|
|
484
492
|
|
|
485
493
|
### Removed
|
|
486
494
|
|
|
487
|
-
-
|
|
495
|
+
- `:skip` validation type for `validation_type_for`
|
|
488
496
|
|
|
489
497
|
### Fixed
|
|
490
498
|
|
|
@@ -499,7 +507,7 @@ Truemail.configuration.blacklisted_domains = ['somedomain1.com', 'somedomain2.co
|
|
|
499
507
|
|
|
500
508
|
### Added
|
|
501
509
|
|
|
502
|
-
- skip validation by domain for validation_type_for configuration option:
|
|
510
|
+
- skip validation by domain for `validation_type_for` configuration option:
|
|
503
511
|
|
|
504
512
|
```ruby
|
|
505
513
|
Truemail.configure do |config|
|
|
@@ -581,11 +589,11 @@ Truemail.configuration.validation_type_for = { 'somedomain.com' => :skip }
|
|
|
581
589
|
|
|
582
590
|
### Added
|
|
583
591
|
|
|
584
|
-
- Retries for
|
|
592
|
+
- Retries for `Truemail::Validate::Smtp` for cases when one mx server
|
|
585
593
|
|
|
586
594
|
### Changed
|
|
587
595
|
|
|
588
|
-
-
|
|
596
|
+
- `Truemail::Configuration` class, please use `.connection_attempts` instead `.retry_count`
|
|
589
597
|
- `Truemail::VERSION`
|
|
590
598
|
- gem documentation
|
|
591
599
|
|
|
@@ -593,12 +601,12 @@ Truemail.configuration.validation_type_for = { 'somedomain.com' => :skip }
|
|
|
593
601
|
|
|
594
602
|
### Added
|
|
595
603
|
|
|
596
|
-
- Checking A record presence if
|
|
597
|
-
- Handling of
|
|
598
|
-
- Checking A record if
|
|
604
|
+
- Checking A record presence if `MX` and `CNAME` records not exist, [issue details](https://github.com/truemail-rb/truemail/issues/10)
|
|
605
|
+
- Handling of `CNAME` records, [issue details](https://github.com/truemail-rb/truemail/issues/11)
|
|
606
|
+
- Checking A record if `MX` and `CNAME` records not found, [issue details](https://github.com/truemail-rb/truemail/issues/12)
|
|
599
607
|
- Supporting of multihomed MX records, conversion host names to ips, [issue details](https://github.com/truemail-rb/truemail/issues/17)
|
|
600
608
|
- Timeout configuration for DNS resolver, [issue details](https://github.com/truemail-rb/truemail/issues/13)
|
|
601
|
-
-
|
|
609
|
+
- `.valid?` helper
|
|
602
610
|
|
|
603
611
|
### Changed
|
|
604
612
|
|
|
@@ -609,14 +617,14 @@ Truemail.configuration.validation_type_for = { 'somedomain.com' => :skip }
|
|
|
609
617
|
|
|
610
618
|
### Added
|
|
611
619
|
|
|
612
|
-
- Independent domain name extractor to
|
|
620
|
+
- Independent domain name extractor to `Truemail::Validate::Mx#run`
|
|
613
621
|
|
|
614
622
|
### Fixed
|
|
615
623
|
|
|
616
|
-
- Default
|
|
624
|
+
- Default `REGEX_EMAIL_PATTERN`, [issue details](https://github.com/truemail-rb/truemail/issues/7)
|
|
617
625
|
* local part of address can't start with a dot or special symbol
|
|
618
626
|
* local part of address can include ```+``` symbol
|
|
619
|
-
- Default
|
|
627
|
+
- Default `REGEX_DOMAIN_PATTERN`, [issue details](https://github.com/truemail-rb/truemail/issues/8)
|
|
620
628
|
* TLD size increased up to 63 characters
|
|
621
629
|
- Case sensitive domain names, [issue details](https://github.com/truemail-rb/truemail/issues/9)
|
|
622
630
|
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
truemail (2.0.
|
|
4
|
+
truemail (2.0.1)
|
|
5
5
|
simpleidn (~> 0.1.1)
|
|
6
6
|
|
|
7
7
|
GEM
|
|
@@ -28,11 +28,11 @@ GEM
|
|
|
28
28
|
json_schema (0.20.9)
|
|
29
29
|
kwalify (0.7.2)
|
|
30
30
|
method_source (1.0.0)
|
|
31
|
-
overcommit (0.
|
|
31
|
+
overcommit (0.57.0)
|
|
32
32
|
childprocess (>= 0.6.3, < 5)
|
|
33
33
|
iniparse (~> 1.4)
|
|
34
34
|
parallel (1.19.2)
|
|
35
|
-
parser (2.7.
|
|
35
|
+
parser (2.7.2.0)
|
|
36
36
|
ast (~> 2.4.1)
|
|
37
37
|
pry (0.13.1)
|
|
38
38
|
coderay (~> 1.1)
|
|
@@ -40,21 +40,21 @@ GEM
|
|
|
40
40
|
pry-byebug (3.9.0)
|
|
41
41
|
byebug (~> 11.0)
|
|
42
42
|
pry (~> 0.13.0)
|
|
43
|
-
psych (3.
|
|
43
|
+
psych (3.2.0)
|
|
44
44
|
rainbow (3.0.0)
|
|
45
45
|
rake (13.0.1)
|
|
46
|
-
reek (6.0.
|
|
46
|
+
reek (6.0.2)
|
|
47
47
|
kwalify (~> 0.7.0)
|
|
48
48
|
parser (>= 2.5.0.0, < 2.8, != 2.5.1.1)
|
|
49
|
-
psych (~> 3.1
|
|
49
|
+
psych (~> 3.1)
|
|
50
50
|
rainbow (>= 2.0, < 4.0)
|
|
51
|
-
regexp_parser (1.8.
|
|
51
|
+
regexp_parser (1.8.2)
|
|
52
52
|
rexml (3.2.4)
|
|
53
53
|
rspec (3.9.0)
|
|
54
54
|
rspec-core (~> 3.9.0)
|
|
55
55
|
rspec-expectations (~> 3.9.0)
|
|
56
56
|
rspec-mocks (~> 3.9.0)
|
|
57
|
-
rspec-core (3.9.
|
|
57
|
+
rspec-core (3.9.3)
|
|
58
58
|
rspec-support (~> 3.9.3)
|
|
59
59
|
rspec-expectations (3.9.2)
|
|
60
60
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
@@ -63,17 +63,17 @@ GEM
|
|
|
63
63
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
64
64
|
rspec-support (~> 3.9.0)
|
|
65
65
|
rspec-support (3.9.3)
|
|
66
|
-
rubocop (0.
|
|
66
|
+
rubocop (0.93.1)
|
|
67
67
|
parallel (~> 1.10)
|
|
68
|
-
parser (>= 2.7.1.
|
|
68
|
+
parser (>= 2.7.1.5)
|
|
69
69
|
rainbow (>= 2.2.2, < 4.0)
|
|
70
|
-
regexp_parser (>= 1.
|
|
70
|
+
regexp_parser (>= 1.8)
|
|
71
71
|
rexml
|
|
72
|
-
rubocop-ast (>= 0.
|
|
72
|
+
rubocop-ast (>= 0.6.0)
|
|
73
73
|
ruby-progressbar (~> 1.7)
|
|
74
74
|
unicode-display_width (>= 1.4.0, < 2.0)
|
|
75
|
-
rubocop-ast (0.
|
|
76
|
-
parser (>= 2.7.1.
|
|
75
|
+
rubocop-ast (0.8.0)
|
|
76
|
+
parser (>= 2.7.1.5)
|
|
77
77
|
rubocop-performance (1.8.1)
|
|
78
78
|
rubocop (>= 0.87.0)
|
|
79
79
|
rubocop-ast (>= 0.4.0)
|
|
@@ -108,12 +108,12 @@ DEPENDENCIES
|
|
|
108
108
|
fasterer (~> 0.8.3)
|
|
109
109
|
ffaker (~> 2.17)
|
|
110
110
|
json_matchers (~> 0.11.1)
|
|
111
|
-
overcommit (~> 0.
|
|
111
|
+
overcommit (~> 0.57.0)
|
|
112
112
|
pry-byebug (~> 3.9)
|
|
113
113
|
rake (~> 13.0, >= 13.0.1)
|
|
114
|
-
reek (~> 6.0, >= 6.0.
|
|
114
|
+
reek (~> 6.0, >= 6.0.2)
|
|
115
115
|
rspec (~> 3.9)
|
|
116
|
-
rubocop (~> 0.
|
|
116
|
+
rubocop (~> 0.93.1)
|
|
117
117
|
rubocop-performance (~> 1.8, >= 1.8.1)
|
|
118
118
|
rubocop-rspec (~> 1.43, >= 1.43.2)
|
|
119
119
|
simplecov (~> 0.17.1)
|
data/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# 
|
|
2
2
|
|
|
3
|
-
[](https://codeclimate.com/github/truemail-rb/truemail/maintainability) [](https://codeclimate.com/github/truemail-rb/truemail/test_coverage) [](https://codeclimate.com/github/truemail-rb/truemail/maintainability) [](https://codeclimate.com/github/truemail-rb/truemail/test_coverage) [](https://circleci.com/gh/truemail-rb/truemail/tree/master) [](https://badge.fury.io/rb/truemail) [](https://rubygems.org/gems/truemail) [](https://gitter.im/truemail-rb/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [](CODE_OF_CONDUCT.md)
|
|
4
4
|
|
|
5
5
|
Configurable framework agnostic plain Ruby email validator. Verify email via Regex, DNS and SMTP. Be sure that email address valid and exists.
|
|
6
6
|
|
data/lib/truemail/version.rb
CHANGED
data/truemail.gemspec
CHANGED
|
@@ -38,12 +38,12 @@ Gem::Specification.new do |spec|
|
|
|
38
38
|
spec.add_development_dependency 'fasterer', '~> 0.8.3'
|
|
39
39
|
spec.add_development_dependency 'ffaker', '~> 2.17'
|
|
40
40
|
spec.add_development_dependency 'json_matchers', '~> 0.11.1'
|
|
41
|
-
spec.add_development_dependency 'overcommit', '~> 0.
|
|
41
|
+
spec.add_development_dependency 'overcommit', '~> 0.57.0'
|
|
42
42
|
spec.add_development_dependency 'pry-byebug', '~> 3.9'
|
|
43
43
|
spec.add_development_dependency 'rake', '~> 13.0', '>= 13.0.1'
|
|
44
|
-
spec.add_development_dependency 'reek', '~> 6.0', '>= 6.0.
|
|
44
|
+
spec.add_development_dependency 'reek', '~> 6.0', '>= 6.0.2'
|
|
45
45
|
spec.add_development_dependency 'rspec', '~> 3.9'
|
|
46
|
-
spec.add_development_dependency 'rubocop', '~> 0.
|
|
46
|
+
spec.add_development_dependency 'rubocop', '~> 0.93.1'
|
|
47
47
|
spec.add_development_dependency 'rubocop-performance', '~> 1.8', '>= 1.8.1'
|
|
48
48
|
spec.add_development_dependency 'rubocop-rspec', '~> 1.43', '>= 1.43.2'
|
|
49
49
|
spec.add_development_dependency 'simplecov', '~> 0.17.1'
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: truemail
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.0.
|
|
4
|
+
version: 2.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Vladislav Trotsenko
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-10-
|
|
11
|
+
date: 2020-10-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: simpleidn
|
|
@@ -100,14 +100,14 @@ dependencies:
|
|
|
100
100
|
requirements:
|
|
101
101
|
- - "~>"
|
|
102
102
|
- !ruby/object:Gem::Version
|
|
103
|
-
version: 0.
|
|
103
|
+
version: 0.57.0
|
|
104
104
|
type: :development
|
|
105
105
|
prerelease: false
|
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
|
107
107
|
requirements:
|
|
108
108
|
- - "~>"
|
|
109
109
|
- !ruby/object:Gem::Version
|
|
110
|
-
version: 0.
|
|
110
|
+
version: 0.57.0
|
|
111
111
|
- !ruby/object:Gem::Dependency
|
|
112
112
|
name: pry-byebug
|
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -151,7 +151,7 @@ dependencies:
|
|
|
151
151
|
version: '6.0'
|
|
152
152
|
- - ">="
|
|
153
153
|
- !ruby/object:Gem::Version
|
|
154
|
-
version: 6.0.
|
|
154
|
+
version: 6.0.2
|
|
155
155
|
type: :development
|
|
156
156
|
prerelease: false
|
|
157
157
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -161,7 +161,7 @@ dependencies:
|
|
|
161
161
|
version: '6.0'
|
|
162
162
|
- - ">="
|
|
163
163
|
- !ruby/object:Gem::Version
|
|
164
|
-
version: 6.0.
|
|
164
|
+
version: 6.0.2
|
|
165
165
|
- !ruby/object:Gem::Dependency
|
|
166
166
|
name: rspec
|
|
167
167
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -182,14 +182,14 @@ dependencies:
|
|
|
182
182
|
requirements:
|
|
183
183
|
- - "~>"
|
|
184
184
|
- !ruby/object:Gem::Version
|
|
185
|
-
version: 0.
|
|
185
|
+
version: 0.93.1
|
|
186
186
|
type: :development
|
|
187
187
|
prerelease: false
|
|
188
188
|
version_requirements: !ruby/object:Gem::Requirement
|
|
189
189
|
requirements:
|
|
190
190
|
- - "~>"
|
|
191
191
|
- !ruby/object:Gem::Version
|
|
192
|
-
version: 0.
|
|
192
|
+
version: 0.93.1
|
|
193
193
|
- !ruby/object:Gem::Dependency
|
|
194
194
|
name: rubocop-performance
|
|
195
195
|
requirement: !ruby/object:Gem::Requirement
|