truemail 2.2.2 → 2.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.reek.yml +1 -0
- data/.rubocop.yml +12 -0
- data/CHANGELOG.md +12 -0
- data/Gemfile.lock +17 -17
- data/lib/truemail/validate/smtp/request.rb +10 -6
- data/lib/truemail/version.rb +1 -1
- data/truemail.gemspec +3 -3
- metadata +14 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 57ce495b7ea8e70dc9788b5d5528f3386a57d69233f645ab665f1a187ca08e08
|
4
|
+
data.tar.gz: e5696bb995de86253fec296cd6985ddb5a26f93ccc24e4a95a21b5f4ded05681
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ac657676afa3a27b5b2192ec7650fd742200fd4a0d5da7a21346f4a3fb75bc2038b1183d4ebdf63ad0fcd579f05169bff6bebdf1a9c2817092d634a7974a30f
|
7
|
+
data.tar.gz: 3f7f43b6ee28ef483c5fdd9a31fb615f98c688e849e0363370e59d3818d3a572272c50daa7a4422dd1f12b0c5ada49e12468f8016e9a17144fc94354d6478eb7
|
data/.reek.yml
CHANGED
data/.rubocop.yml
CHANGED
@@ -142,6 +142,9 @@ Style/RedundantArgument:
|
|
142
142
|
Style/HashExcept:
|
143
143
|
Enabled: true
|
144
144
|
|
145
|
+
Style/EndlessMethod:
|
146
|
+
Enabled: true
|
147
|
+
|
145
148
|
Layout/LineLength:
|
146
149
|
Max: 140
|
147
150
|
|
@@ -275,6 +278,15 @@ Lint/UnexpectedBlockArity:
|
|
275
278
|
Lint/AmbiguousAssignment:
|
276
279
|
Enabled: true
|
277
280
|
|
281
|
+
Lint/DeprecatedConstants:
|
282
|
+
Enabled: true
|
283
|
+
|
284
|
+
Lint/LambdaWithoutLiteralBlock:
|
285
|
+
Enabled: true
|
286
|
+
|
287
|
+
Lint/RedundantDirGlobSort:
|
288
|
+
Enabled: true
|
289
|
+
|
278
290
|
Performance/AncestorsInclude:
|
279
291
|
Enabled: true
|
280
292
|
|
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.2.3] - 2020.01.12
|
6
|
+
|
7
|
+
### Fixed
|
8
|
+
|
9
|
+
Removed needless `Timeout.timeout` block in `Truemail::Validate::Smtp::Request#check_port`, replaced `TCPSocket` to `Socket` with native timeout detection. Thanks to [@wikiti](https://github.com/wikiti) for idea, testing on production and clean PR [#127](https://github.com/truemail-rb/truemail/pull/127).
|
10
|
+
|
11
|
+
### Changed
|
12
|
+
|
13
|
+
- Updated `Truemail::Validate::Smtp::Request`
|
14
|
+
- Updated gem development dependencies
|
15
|
+
- Updated rubocop, reek configs
|
16
|
+
|
5
17
|
## [2.2.2] - 2020.12.30
|
6
18
|
|
7
19
|
### Changed
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
truemail (2.2.
|
4
|
+
truemail (2.2.3)
|
5
5
|
simpleidn (~> 0.1.1)
|
6
6
|
|
7
7
|
GEM
|
@@ -23,7 +23,7 @@ GEM
|
|
23
23
|
fasterer (0.8.3)
|
24
24
|
colorize (~> 0.7)
|
25
25
|
ruby_parser (>= 3.14.1)
|
26
|
-
i18n (1.8.
|
26
|
+
i18n (1.8.7)
|
27
27
|
concurrent-ruby (~> 1.0)
|
28
28
|
iniparse (1.5.0)
|
29
29
|
json (2.5.1)
|
@@ -36,7 +36,7 @@ GEM
|
|
36
36
|
childprocess (>= 0.6.3, < 5)
|
37
37
|
iniparse (~> 1.4)
|
38
38
|
parallel (1.20.1)
|
39
|
-
parser (
|
39
|
+
parser (3.0.0.0)
|
40
40
|
ast (~> 2.4.1)
|
41
41
|
pry (0.13.1)
|
42
42
|
coderay (~> 1.1)
|
@@ -47,9 +47,9 @@ GEM
|
|
47
47
|
psych (3.3.0)
|
48
48
|
rainbow (3.0.0)
|
49
49
|
rake (13.0.3)
|
50
|
-
reek (6.0.
|
50
|
+
reek (6.0.3)
|
51
51
|
kwalify (~> 0.7.0)
|
52
|
-
parser (
|
52
|
+
parser (~> 3.0.0)
|
53
53
|
psych (~> 3.1)
|
54
54
|
rainbow (>= 2.0, < 4.0)
|
55
55
|
regexp_parser (2.0.3)
|
@@ -67,27 +67,27 @@ GEM
|
|
67
67
|
diff-lcs (>= 1.2.0, < 2.0)
|
68
68
|
rspec-support (~> 3.10.0)
|
69
69
|
rspec-support (3.10.1)
|
70
|
-
rubocop (1.
|
70
|
+
rubocop (1.8.1)
|
71
71
|
parallel (~> 1.10)
|
72
|
-
parser (>=
|
72
|
+
parser (>= 3.0.0.0)
|
73
73
|
rainbow (>= 2.2.2, < 4.0)
|
74
74
|
regexp_parser (>= 1.8, < 3.0)
|
75
75
|
rexml
|
76
76
|
rubocop-ast (>= 1.2.0, < 2.0)
|
77
77
|
ruby-progressbar (~> 1.7)
|
78
|
-
unicode-display_width (>= 1.4.0, <
|
79
|
-
rubocop-ast (1.
|
78
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
79
|
+
rubocop-ast (1.4.0)
|
80
80
|
parser (>= 2.7.1.5)
|
81
|
-
rubocop-performance (1.9.
|
81
|
+
rubocop-performance (1.9.2)
|
82
82
|
rubocop (>= 0.90.0, < 2.0)
|
83
83
|
rubocop-ast (>= 0.4.0)
|
84
84
|
rubocop-rspec (2.1.0)
|
85
85
|
rubocop (~> 1.0)
|
86
86
|
rubocop-ast (>= 1.1.0)
|
87
|
-
ruby-progressbar (1.
|
88
|
-
ruby_parser (3.15.
|
87
|
+
ruby-progressbar (1.11.0)
|
88
|
+
ruby_parser (3.15.1)
|
89
89
|
sexp_processor (~> 4.9)
|
90
|
-
sexp_processor (4.15.
|
90
|
+
sexp_processor (4.15.2)
|
91
91
|
simplecov (0.17.1)
|
92
92
|
docile (~> 1.1)
|
93
93
|
json (>= 1.8, < 3)
|
@@ -103,7 +103,7 @@ GEM
|
|
103
103
|
unf (0.1.4)
|
104
104
|
unf_ext
|
105
105
|
unf_ext (0.0.7.7)
|
106
|
-
unicode-display_width (
|
106
|
+
unicode-display_width (2.0.0)
|
107
107
|
|
108
108
|
PLATFORMS
|
109
109
|
ruby
|
@@ -117,10 +117,10 @@ DEPENDENCIES
|
|
117
117
|
overcommit (~> 0.57.0)
|
118
118
|
pry-byebug (~> 3.9)
|
119
119
|
rake (~> 13.0, >= 13.0.3)
|
120
|
-
reek (~> 6.0, >= 6.0.
|
120
|
+
reek (~> 6.0, >= 6.0.3)
|
121
121
|
rspec (~> 3.10)
|
122
|
-
rubocop (~> 1.
|
123
|
-
rubocop-performance (~> 1.9, >= 1.9.
|
122
|
+
rubocop (~> 1.8, >= 1.8.1)
|
123
|
+
rubocop-performance (~> 1.9, >= 1.9.2)
|
124
124
|
rubocop-rspec (~> 2.1)
|
125
125
|
simplecov (~> 0.17.1)
|
126
126
|
truemail!
|
@@ -13,20 +13,24 @@ module Truemail
|
|
13
13
|
|
14
14
|
attr_reader :configuration, :host, :email, :response
|
15
15
|
|
16
|
-
def initialize(configuration:, host:, email:, attempts: nil)
|
16
|
+
def initialize(configuration:, host:, email:, attempts: nil, port_open_status: proc { true })
|
17
17
|
@configuration = Truemail::Validate::Smtp::Request::Configuration.new(configuration)
|
18
18
|
@response = Truemail::Validate::Smtp::Response.new
|
19
19
|
@host = host
|
20
20
|
@email = email
|
21
21
|
@attempts = attempts
|
22
|
+
@port_open_status = port_open_status
|
22
23
|
end
|
23
24
|
|
24
25
|
def check_port
|
25
|
-
|
26
|
-
|
27
|
-
|
26
|
+
response.port_opened = Socket.tcp(
|
27
|
+
host,
|
28
|
+
Truemail::Validate::Smtp::Request::SMTP_PORT,
|
29
|
+
connect_timeout: configuration.connection_timeout,
|
30
|
+
&port_open_status
|
31
|
+
)
|
28
32
|
rescue => error
|
29
|
-
retry if attempts_exist? && error.is_a?(
|
33
|
+
retry if attempts_exist? && error.is_a?(Errno::ETIMEDOUT)
|
30
34
|
response.port_opened = false
|
31
35
|
end
|
32
36
|
|
@@ -53,7 +57,7 @@ module Truemail
|
|
53
57
|
end
|
54
58
|
end
|
55
59
|
|
56
|
-
attr_reader :attempts
|
60
|
+
attr_reader :attempts, :port_open_status
|
57
61
|
|
58
62
|
def attempts_exist?
|
59
63
|
return false unless attempts
|
data/lib/truemail/version.rb
CHANGED
data/truemail.gemspec
CHANGED
@@ -41,10 +41,10 @@ Gem::Specification.new do |spec|
|
|
41
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.3'
|
44
|
-
spec.add_development_dependency 'reek', '~> 6.0', '>= 6.0.
|
44
|
+
spec.add_development_dependency 'reek', '~> 6.0', '>= 6.0.3'
|
45
45
|
spec.add_development_dependency 'rspec', '~> 3.10'
|
46
|
-
spec.add_development_dependency 'rubocop', '~> 1.
|
47
|
-
spec.add_development_dependency 'rubocop-performance', '~> 1.9', '>= 1.9.
|
46
|
+
spec.add_development_dependency 'rubocop', '~> 1.8', '>= 1.8.1'
|
47
|
+
spec.add_development_dependency 'rubocop-performance', '~> 1.9', '>= 1.9.2'
|
48
48
|
spec.add_development_dependency 'rubocop-rspec', '~> 2.1'
|
49
49
|
spec.add_development_dependency 'simplecov', '~> 0.17.1'
|
50
50
|
spec.add_development_dependency 'truemail-rspec', '~> 0.3.3'
|
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.2.
|
4
|
+
version: 2.2.3
|
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: 2021-01-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: simpleidn
|
@@ -157,7 +157,7 @@ dependencies:
|
|
157
157
|
version: '6.0'
|
158
158
|
- - ">="
|
159
159
|
- !ruby/object:Gem::Version
|
160
|
-
version: 6.0.
|
160
|
+
version: 6.0.3
|
161
161
|
type: :development
|
162
162
|
prerelease: false
|
163
163
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -167,7 +167,7 @@ dependencies:
|
|
167
167
|
version: '6.0'
|
168
168
|
- - ">="
|
169
169
|
- !ruby/object:Gem::Version
|
170
|
-
version: 6.0.
|
170
|
+
version: 6.0.3
|
171
171
|
- !ruby/object:Gem::Dependency
|
172
172
|
name: rspec
|
173
173
|
requirement: !ruby/object:Gem::Requirement
|
@@ -188,14 +188,20 @@ dependencies:
|
|
188
188
|
requirements:
|
189
189
|
- - "~>"
|
190
190
|
- !ruby/object:Gem::Version
|
191
|
-
version: '1.
|
191
|
+
version: '1.8'
|
192
|
+
- - ">="
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: 1.8.1
|
192
195
|
type: :development
|
193
196
|
prerelease: false
|
194
197
|
version_requirements: !ruby/object:Gem::Requirement
|
195
198
|
requirements:
|
196
199
|
- - "~>"
|
197
200
|
- !ruby/object:Gem::Version
|
198
|
-
version: '1.
|
201
|
+
version: '1.8'
|
202
|
+
- - ">="
|
203
|
+
- !ruby/object:Gem::Version
|
204
|
+
version: 1.8.1
|
199
205
|
- !ruby/object:Gem::Dependency
|
200
206
|
name: rubocop-performance
|
201
207
|
requirement: !ruby/object:Gem::Requirement
|
@@ -205,7 +211,7 @@ dependencies:
|
|
205
211
|
version: '1.9'
|
206
212
|
- - ">="
|
207
213
|
- !ruby/object:Gem::Version
|
208
|
-
version: 1.9.
|
214
|
+
version: 1.9.2
|
209
215
|
type: :development
|
210
216
|
prerelease: false
|
211
217
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -215,7 +221,7 @@ dependencies:
|
|
215
221
|
version: '1.9'
|
216
222
|
- - ">="
|
217
223
|
- !ruby/object:Gem::Version
|
218
|
-
version: 1.9.
|
224
|
+
version: 1.9.2
|
219
225
|
- !ruby/object:Gem::Dependency
|
220
226
|
name: rubocop-rspec
|
221
227
|
requirement: !ruby/object:Gem::Requirement
|