truemail 2.4.9 → 2.5.0
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/CHANGELOG.md +10 -0
- data/Gemfile.lock +1 -1
- data/lib/truemail/validate/mx.rb +5 -1
- data/lib/truemail/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 515e45301d2ce2c107072aa76fe6384a87b675f76f1116be453f4bfdb6ff2f2a
|
|
4
|
+
data.tar.gz: f21f8a5b3c3fc66d9a236983c010ff497676c7273dbdba81d2a85fee918f041b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 14bbc12149dbbbb9dc575c7af8a4575189e4a49f05cf7335c0acaa65a92cd88a29d347b1c4a486d04e022f5a5ba8748b2881fe002ea0857c07bc28c69c8da85a
|
|
7
|
+
data.tar.gz: f98c6c20dc88c08f7fdad35fa240b989ec62f7928be4b32b98bba178f6645732a028b1c355c1ac5b5b623e144ee1e2524f1e283dabc28a0c5f35a96077f24308
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
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.5.0] - 2021.09.01
|
|
6
|
+
|
|
7
|
+
### Updated
|
|
8
|
+
|
|
9
|
+
Optimized DNS (MX) validation flow. Removed needless DNS request for case when custom email pattern was defined and email for validation includes invalid domain name.
|
|
10
|
+
|
|
11
|
+
- Updated `Truemail::Validate::Mx#run`, tests
|
|
12
|
+
- Updated gem development dependencies
|
|
13
|
+
- Updated gem documentation, version
|
|
14
|
+
|
|
5
15
|
## [2.4.9] - 2021.08.20
|
|
6
16
|
|
|
7
17
|
### Updated
|
data/Gemfile.lock
CHANGED
data/lib/truemail/validate/mx.rb
CHANGED
|
@@ -8,13 +8,17 @@ module Truemail
|
|
|
8
8
|
|
|
9
9
|
def run
|
|
10
10
|
return false unless Truemail::Validate::Regex.check(result)
|
|
11
|
-
return true if success(mx_lookup && domain_not_include_null_mx)
|
|
11
|
+
return true if success(email_domain_valid? && mx_lookup && domain_not_include_null_mx)
|
|
12
12
|
mail_servers.clear && add_error(Truemail::Validate::Mx::ERROR)
|
|
13
13
|
false
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
private
|
|
17
17
|
|
|
18
|
+
def email_domain_valid?
|
|
19
|
+
Truemail::RegexConstant::REGEX_DOMAIN_PATTERN.match?(result.domain)
|
|
20
|
+
end
|
|
21
|
+
|
|
18
22
|
def host_extractor_methods
|
|
19
23
|
return %i[hosts_from_mx_records?] if configuration.not_rfc_mx_lookup_flow
|
|
20
24
|
%i[hosts_from_mx_records? hosts_from_cname_records? host_from_a_record?]
|
data/lib/truemail/version.rb
CHANGED
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.
|
|
4
|
+
version: 2.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Vladislav Trotsenko
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-
|
|
11
|
+
date: 2021-09-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: simpleidn
|