truemail 2.6.0 → 2.6.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/.reek.yml +1 -0
- data/.rubocop.yml +3 -0
- data/CHANGELOG.md +13 -1
- data/lib/truemail/validate/smtp/request.rb +15 -5
- data/lib/truemail/version.rb +1 -1
- data/truemail.gemspec +1 -1
- metadata +2 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1499bcd186c7d733fc168a7167b5e171fb2617a37c041e9372a644fc1ecff09a
|
4
|
+
data.tar.gz: 6c9320d328da028de9f2e4b3241a91457d1984bc6f5b9e4325fe0c52b1a8f2b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '08e5b9f6fb5d6cc628058925401ea80cfc4f0614f16ffce25044b7c3965cbf5eb6560b88faac0732e80eb09d3711a15b2122c29ce623371cf30cb62477952420'
|
7
|
+
data.tar.gz: 4e18f42b916c4994f48b9cc4742ba80473934e9c15c41ef2d34d40b0e69e5f31058a45d78ffdd350040d25d4346b5e4e5c11e91edba0c34a8433c1e2bafaacf7
|
data/.reek.yml
CHANGED
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,18 @@
|
|
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.6.1] - 2022.01.04
|
6
|
+
|
7
|
+
### Fixed
|
8
|
+
|
9
|
+
- Fixed redefining builtin implementations caused using stdlib as external dependencies. Thanks [@allard](https://github.com/allard) for report.
|
10
|
+
|
11
|
+
### Updated
|
12
|
+
|
13
|
+
- Updated `Truemail::Validate::Smtp::Request::Session#initialize`, `Truemail::Validate::Smtp::Request::Session#start`, tests
|
14
|
+
- Updated rubocop/reek configs
|
15
|
+
- Updated gem docs, version
|
16
|
+
|
5
17
|
## [2.6.0] - 2021.12.28
|
6
18
|
|
7
19
|
### Added
|
@@ -33,7 +45,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
33
45
|
|
34
46
|
### Fixed
|
35
47
|
|
36
|
-
- Ruby 3.0 stdlib SMTP client SSL certificate verification issues for cases when IP address uses as MX host. Thanks [@esb](https://github.com/esb) for bug report.
|
48
|
+
- Fixed Ruby 3.0 stdlib SMTP client SSL certificate verification issues for cases when IP address uses as MX host. Thanks [@esb](https://github.com/esb) for bug report.
|
37
49
|
|
38
50
|
### Updated
|
39
51
|
|
@@ -55,24 +55,34 @@ module Truemail
|
|
55
55
|
class Session
|
56
56
|
require 'net/smtp'
|
57
57
|
|
58
|
-
|
59
|
-
|
58
|
+
UNDEFINED_VERSION = '0.0.0'
|
59
|
+
|
60
|
+
def initialize(host, port, connection_timeout, response_timeout, net_class = ::Net::SMTP)
|
61
|
+
@net_class = net_class
|
62
|
+
@net_smtp_version = resolve_net_smtp_version
|
63
|
+
@net_smtp = (old_net_smtp? ? net_class.new(host, port) : net_class.new(host, port, tls_verify: false)).tap do |settings|
|
60
64
|
settings.open_timeout = connection_timeout
|
61
65
|
settings.read_timeout = response_timeout
|
62
66
|
end
|
63
67
|
end
|
64
68
|
|
65
69
|
def start(helo_domain, &block)
|
66
|
-
return net_smtp.start(helo_domain, &block) if
|
70
|
+
return net_smtp.start(helo_domain, &block) if net_smtp_version < '0.2.0'
|
71
|
+
return net_smtp.start(helo_domain, tls_verify: false, &block) if old_net_smtp?
|
67
72
|
net_smtp.start(helo: helo_domain, &block)
|
68
73
|
end
|
69
74
|
|
70
75
|
private
|
71
76
|
|
72
|
-
attr_reader :net_smtp
|
77
|
+
attr_reader :net_class, :net_smtp_version, :net_smtp
|
78
|
+
|
79
|
+
def resolve_net_smtp_version
|
80
|
+
return net_class::VERSION if net_class.const_defined?(:VERSION)
|
81
|
+
Truemail::Validate::Smtp::Request::Session::UNDEFINED_VERSION
|
82
|
+
end
|
73
83
|
|
74
84
|
def old_net_smtp?
|
75
|
-
|
85
|
+
net_smtp_version < '0.3.0'
|
76
86
|
end
|
77
87
|
end
|
78
88
|
|
data/lib/truemail/version.rb
CHANGED
data/truemail.gemspec
CHANGED
@@ -31,7 +31,7 @@ Gem::Specification.new do |spec|
|
|
31
31
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| ::File.basename(f) }
|
32
32
|
spec.require_paths = ['lib']
|
33
33
|
|
34
|
-
spec.add_runtime_dependency 'net-smtp', '~> 0.3'
|
34
|
+
spec.add_runtime_dependency 'net-smtp', '~> 0.3' if ::RUBY_VERSION >= '3.1.0'
|
35
35
|
spec.add_runtime_dependency 'simpleidn', '~> 0.2.1'
|
36
36
|
|
37
37
|
spec.add_development_dependency 'bundler-audit', '~> 0.9.0.1'
|
metadata
CHANGED
@@ -1,29 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: truemail
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.6.
|
4
|
+
version: 2.6.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:
|
11
|
+
date: 2022-01-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: net-smtp
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '0.3'
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - "~>"
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '0.3'
|
27
13
|
- !ruby/object:Gem::Dependency
|
28
14
|
name: simpleidn
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|