truemail 2.6.6 → 2.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +2 -2
- data/.circleci/gemspec_compatible +6 -9
- data/.circleci/gemspec_latest +12 -14
- data/.codeclimate.yml +1 -1
- data/.github/DEVELOPMENT_ENVIRONMENT_GUIDE.md +1 -1
- data/.github/FUNDING.yml +1 -0
- data/.rubocop.yml +27 -0
- data/CHANGELOG.md +27 -0
- data/README.md +22 -0
- data/lib/truemail/configuration.rb +3 -0
- data/lib/truemail/validate/smtp/request.rb +3 -4
- data/lib/truemail/version.rb +1 -1
- data/truemail.gemspec +6 -8
- metadata +17 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 31625b9fe06d8430557f72e253ffa7ce8e970a728dd80b60171cc7f21f012905
|
4
|
+
data.tar.gz: 1e37dc52343834510f4ad7ac852af33181178c8502b11eeec356866672d76c8f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '080998c62030290bb72c650190cd1218e13de9d6da04f0e0f8578c3831bc52eb6362f54336640d2991bd65962c939b98d160ed68c361d314dafa2879e25a9bfe'
|
7
|
+
data.tar.gz: edc3964b8deb5ea452508b7392c1da365a47913facf305607d690a62ae37e321e3bccbd085cf49e01e6f663f4227c17fcd880ba2b08ce01b4add4190e9cf0328
|
data/.circleci/config.yml
CHANGED
@@ -6,7 +6,7 @@ defaults: &defaults
|
|
6
6
|
- image: cimg/ruby:<< parameters.ruby-version >>
|
7
7
|
|
8
8
|
orbs:
|
9
|
-
ruby: circleci/ruby@1.
|
9
|
+
ruby: circleci/ruby@1.7.1
|
10
10
|
|
11
11
|
references:
|
12
12
|
restore_bundle_cache: &restore_bundle_cache
|
@@ -122,7 +122,7 @@ jobs:
|
|
122
122
|
- checkout
|
123
123
|
- <<: *use_compatible_gemspec
|
124
124
|
- ruby/install-deps:
|
125
|
-
bundler-version: "2.3.
|
125
|
+
bundler-version: "2.3.12"
|
126
126
|
with-cache: false
|
127
127
|
path: './vendor/custom_bundle'
|
128
128
|
- <<: *install_system_dependencies
|
@@ -1,8 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
-
require 'truemail/version'
|
3
|
+
require_relative 'lib/truemail/version'
|
6
4
|
|
7
5
|
Gem::Specification.new do |spec|
|
8
6
|
spec.name = 'truemail'
|
@@ -33,13 +31,12 @@ Gem::Specification.new do |spec|
|
|
33
31
|
|
34
32
|
spec.add_runtime_dependency 'simpleidn', '~> 0.2.1'
|
35
33
|
|
36
|
-
spec.add_development_dependency 'dns_mock', '~> 1.5'
|
37
|
-
spec.add_development_dependency 'ffaker', '~> 2.
|
34
|
+
spec.add_development_dependency 'dns_mock', '~> 1.5', '>= 1.5.2'
|
35
|
+
spec.add_development_dependency 'ffaker', '~> 2.21'
|
38
36
|
spec.add_development_dependency 'json_matchers', '~> 0.11.1'
|
39
|
-
spec.add_development_dependency 'pry-byebug', '~> 3.9'
|
40
37
|
spec.add_development_dependency 'rake', '~> 13.0', '>= 13.0.6'
|
41
|
-
spec.add_development_dependency 'rspec', '~> 3.
|
42
|
-
spec.add_development_dependency 'smtp_mock', '~> 1.0'
|
43
|
-
spec.add_development_dependency 'truemail-rspec', '~> 0.
|
38
|
+
spec.add_development_dependency 'rspec', '~> 3.11'
|
39
|
+
spec.add_development_dependency 'smtp_mock', '~> 1.0', '>= 1.0.1'
|
40
|
+
spec.add_development_dependency 'truemail-rspec', '~> 0.9.1'
|
44
41
|
spec.add_development_dependency 'webmock', '~> 3.14'
|
45
42
|
end
|
data/.circleci/gemspec_latest
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
-
require 'truemail/version'
|
3
|
+
require_relative 'lib/truemail/version'
|
6
4
|
|
7
5
|
Gem::Specification.new do |spec|
|
8
6
|
spec.name = 'truemail'
|
@@ -35,20 +33,20 @@ Gem::Specification.new do |spec|
|
|
35
33
|
spec.add_runtime_dependency 'simpleidn', '~> 0.2.1'
|
36
34
|
|
37
35
|
spec.add_development_dependency 'bundler-audit', '~> 0.9.0.1'
|
38
|
-
spec.add_development_dependency 'dns_mock', '~> 1.5', '>= 1.5.
|
39
|
-
spec.add_development_dependency 'fasterer', '~> 0.
|
40
|
-
spec.add_development_dependency 'ffaker', '~> 2.
|
36
|
+
spec.add_development_dependency 'dns_mock', '~> 1.5', '>= 1.5.2'
|
37
|
+
spec.add_development_dependency 'fasterer', '~> 0.10.0'
|
38
|
+
spec.add_development_dependency 'ffaker', '~> 2.21'
|
41
39
|
spec.add_development_dependency 'json_matchers', '~> 0.11.1'
|
42
|
-
spec.add_development_dependency 'overcommit', '~> 0.
|
40
|
+
spec.add_development_dependency 'overcommit', '~> 0.59.0'
|
43
41
|
spec.add_development_dependency 'pry-byebug', '~> 3.9'
|
44
42
|
spec.add_development_dependency 'rake', '~> 13.0', '>= 13.0.6'
|
45
|
-
spec.add_development_dependency 'reek', '~> 6.1'
|
46
|
-
spec.add_development_dependency 'rspec', '~> 3.
|
47
|
-
spec.add_development_dependency 'rubocop', '~> 1.
|
48
|
-
spec.add_development_dependency 'rubocop-performance', '~> 1.13', '>= 1.13.
|
49
|
-
spec.add_development_dependency 'rubocop-rspec', '~> 2.
|
43
|
+
spec.add_development_dependency 'reek', '~> 6.1', '>= 6.1.1'
|
44
|
+
spec.add_development_dependency 'rspec', '~> 3.11'
|
45
|
+
spec.add_development_dependency 'rubocop', '~> 1.28', '>= 1.28.2'
|
46
|
+
spec.add_development_dependency 'rubocop-performance', '~> 1.13', '>= 1.13.3'
|
47
|
+
spec.add_development_dependency 'rubocop-rspec', '~> 2.10'
|
50
48
|
spec.add_development_dependency 'simplecov', '~> 0.21.2'
|
51
|
-
spec.add_development_dependency 'smtp_mock', '~> 1.0'
|
52
|
-
spec.add_development_dependency 'truemail-rspec', '~> 0.
|
49
|
+
spec.add_development_dependency 'smtp_mock', '~> 1.0', '>= 1.0.1'
|
50
|
+
spec.add_development_dependency 'truemail-rspec', '~> 0.9.1'
|
53
51
|
spec.add_development_dependency 'webmock', '~> 3.14'
|
54
52
|
end
|
data/.codeclimate.yml
CHANGED
data/.github/FUNDING.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
github: [bestwebua]
|
data/.rubocop.yml
CHANGED
@@ -193,6 +193,18 @@ Style/FileWrite:
|
|
193
193
|
Style/MapToHash:
|
194
194
|
Enabled: true
|
195
195
|
|
196
|
+
Style/FetchEnvVar:
|
197
|
+
Enabled: true
|
198
|
+
|
199
|
+
Style/NestedFileDirname:
|
200
|
+
Enabled: true
|
201
|
+
|
202
|
+
Style/ObjectThen:
|
203
|
+
Enabled: true
|
204
|
+
|
205
|
+
Style/RedundantInitialize:
|
206
|
+
Enabled: true
|
207
|
+
|
196
208
|
Layout/LineLength:
|
197
209
|
Max: 140
|
198
210
|
|
@@ -368,6 +380,9 @@ Lint/RequireRelativeSelfPath:
|
|
368
380
|
Lint/UselessRuby2Keywords:
|
369
381
|
Enabled: true
|
370
382
|
|
383
|
+
Lint/RefinementImportMethods:
|
384
|
+
Enabled: true
|
385
|
+
|
371
386
|
Gemspec/DateAssignment:
|
372
387
|
Enabled: true
|
373
388
|
|
@@ -380,6 +395,9 @@ Gemspec/RubyVersionGlobalsUsage:
|
|
380
395
|
Security/IoMethods:
|
381
396
|
Enabled: true
|
382
397
|
|
398
|
+
Security/CompoundHash:
|
399
|
+
Enabled: true
|
400
|
+
|
383
401
|
Performance/AncestorsInclude:
|
384
402
|
Enabled: true
|
385
403
|
|
@@ -481,3 +499,12 @@ RSpec/FactoryBot/SyntaxMethods:
|
|
481
499
|
|
482
500
|
RSpec/SubjectStub:
|
483
501
|
Enabled: false
|
502
|
+
|
503
|
+
RSpec/BeEq:
|
504
|
+
Enabled: true
|
505
|
+
|
506
|
+
RSpec/BeNil:
|
507
|
+
Enabled: true
|
508
|
+
|
509
|
+
RSpec/VerifiedDoubleReference:
|
510
|
+
Enabled: false
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,33 @@
|
|
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.7.2] - 2022.04.02
|
6
|
+
|
7
|
+
### Updated
|
8
|
+
|
9
|
+
- Updated gemspecs, circleci config
|
10
|
+
- Updated rubocop/codeclimate configs
|
11
|
+
- Updated git templates
|
12
|
+
- Updated gem version
|
13
|
+
|
14
|
+
## [2.7.1] - 2022.03.02
|
15
|
+
|
16
|
+
### Updated
|
17
|
+
|
18
|
+
- Updated truemail gemspecs
|
19
|
+
- Updated gem version
|
20
|
+
|
21
|
+
## [2.7.0] - 2022.02.23
|
22
|
+
|
23
|
+
### Added
|
24
|
+
|
25
|
+
- Added ability to specify SMTP port number
|
26
|
+
|
27
|
+
### Updated
|
28
|
+
|
29
|
+
- Updated truemail gemspec
|
30
|
+
- Updated gem version
|
31
|
+
|
5
32
|
## [2.6.6] - 2022.02.09
|
6
33
|
|
7
34
|
### Added
|
data/README.md
CHANGED
@@ -136,6 +136,7 @@ You can use global gem configuration or custom independent configuration. Availa
|
|
136
136
|
- blacklisted mx ip-addresses
|
137
137
|
- custom DNS gateway(s)
|
138
138
|
- RFC MX lookup flow
|
139
|
+
- SMTP port number
|
139
140
|
- SMTP fail fast
|
140
141
|
- SMTP safe check
|
141
142
|
- event logger
|
@@ -221,6 +222,9 @@ Truemail.configure do |config|
|
|
221
222
|
# By default this option is disabled.
|
222
223
|
config.not_rfc_mx_lookup_flow = true
|
223
224
|
|
225
|
+
# Optional parameter. SMTP port number. It is equal to 25 by default.
|
226
|
+
config.smtp_port = 2525
|
227
|
+
|
224
228
|
# Optional parameter. This option will provide to use smtp fail fast behaviour. When
|
225
229
|
# smtp_fail_fast = true it means that Truemail ends smtp validation session after first
|
226
230
|
# attempt on the first mx server in any fail cases (network connection/timeout error,
|
@@ -263,6 +267,7 @@ Truemail.configuration
|
|
263
267
|
@verifier_domain="somedomain.com",
|
264
268
|
@verifier_email="verifier@example.com",
|
265
269
|
@not_rfc_mx_lookup_flow=true,
|
270
|
+
@smtp_port=2525,
|
266
271
|
@smtp_fail_fast=true,
|
267
272
|
@smtp_safe_check=true,
|
268
273
|
@logger=#<Truemail::Logger:0x0000557f837450b0
|
@@ -296,6 +301,7 @@ Truemail.configuration
|
|
296
301
|
@verifier_domain="somedomain.com",
|
297
302
|
@verifier_email="verifier@example.com",
|
298
303
|
@not_rfc_mx_lookup_flow=true,
|
304
|
+
@smtp_port=2525,
|
299
305
|
@smtp_fail_fast=true,
|
300
306
|
@smtp_safe_check=true,
|
301
307
|
@logger=#<Truemail::Logger:0x0000557f837450b0
|
@@ -382,6 +388,7 @@ Truemail.validate('email@white-domain.com')
|
|
382
388
|
@response_timeout=2,
|
383
389
|
@smtp_error_body_pattern=/(?=.*550)(?=.*(user|account|customer|mailbox)).*/i,
|
384
390
|
@not_rfc_mx_lookup_flow=false,
|
391
|
+
@smtp_port=25,
|
385
392
|
@smtp_fail_fast=false,
|
386
393
|
@smtp_safe_check=false,
|
387
394
|
@validation_type_by_domain={"somedomain.com"=>:mx},
|
@@ -431,6 +438,7 @@ Truemail.validate('email@white-domain.com', with: :regex)
|
|
431
438
|
@response_timeout=2,
|
432
439
|
@smtp_error_body_pattern=/(?=.*550)(?=.*(user|account|customer|mailbox)).*/i,
|
433
440
|
@not_rfc_mx_lookup_flow=false,
|
441
|
+
@smtp_port=25,
|
434
442
|
@smtp_fail_fast=false,
|
435
443
|
@smtp_safe_check=false,
|
436
444
|
@validation_type_by_domain={},
|
@@ -466,6 +474,7 @@ Truemail.validate('email@domain.com', with: :regex)
|
|
466
474
|
@response_timeout=2,
|
467
475
|
@smtp_error_body_pattern=/(?=.*550)(?=.*(user|account|customer|mailbox)).*/i,
|
468
476
|
@not_rfc_mx_lookup_flow=false,
|
477
|
+
@smtp_port=25,
|
469
478
|
@smtp_fail_fast=false,
|
470
479
|
@smtp_safe_check=false,
|
471
480
|
@validation_type_by_domain={},
|
@@ -503,6 +512,7 @@ Truemail.validate('email@black-domain.com')
|
|
503
512
|
@response_timeout=2,
|
504
513
|
@smtp_error_body_pattern=/(?=.*550)(?=.*(user|account|customer|mailbox)).*/i,
|
505
514
|
@not_rfc_mx_lookup_flow=false,
|
515
|
+
@smtp_port=25,
|
506
516
|
@smtp_fail_fast=false,
|
507
517
|
@smtp_safe_check=false,
|
508
518
|
@validation_type_by_domain={},
|
@@ -540,6 +550,7 @@ Truemail.validate('email@somedomain.com')
|
|
540
550
|
@response_timeout=2,
|
541
551
|
@smtp_error_body_pattern=/(?=.*550)(?=.*(user|account|customer|mailbox)).*/i,
|
542
552
|
@not_rfc_mx_lookup_flow=false,
|
553
|
+
@smtp_port=25,
|
543
554
|
@smtp_fail_fast=false,
|
544
555
|
@smtp_safe_check=false,
|
545
556
|
@validation_type_by_domain={},
|
@@ -594,6 +605,7 @@ Truemail.validate('email@example.com', with: :regex)
|
|
594
605
|
@response_timeout=2,
|
595
606
|
@smtp_error_body_pattern=/(?=.*550)(?=.*(user|account|customer|mailbox)).*/i,
|
596
607
|
@not_rfc_mx_lookup_flow=false,
|
608
|
+
@smtp_port=25,
|
597
609
|
@smtp_fail_fast=false,
|
598
610
|
@smtp_safe_check=false,
|
599
611
|
@validation_type_by_domain={},
|
@@ -639,6 +651,7 @@ Truemail.validate('email@example.com', with: :regex)
|
|
639
651
|
@response_timeout=2,
|
640
652
|
@smtp_error_body_pattern=/(?=.*550)(?=.*(user|account|customer|mailbox)).*/i,
|
641
653
|
@not_rfc_mx_lookup_flow=false,
|
654
|
+
@smtp_port=25,
|
642
655
|
@smtp_fail_fast=false,
|
643
656
|
@smtp_safe_check=false,
|
644
657
|
@validation_type_by_domain={},
|
@@ -695,6 +708,7 @@ Truemail.validate('email@example.com', with: :mx)
|
|
695
708
|
@response_timeout=2,
|
696
709
|
@smtp_error_body_pattern=/(?=.*550)(?=.*(user|account|customer|mailbox)).*/i,
|
697
710
|
@not_rfc_mx_lookup_flow=false,
|
711
|
+
@smtp_port=25,
|
698
712
|
@smtp_fail_fast=false,
|
699
713
|
@smtp_safe_check=false,
|
700
714
|
@validation_type_by_domain={},
|
@@ -742,6 +756,7 @@ Truemail.validate('email@example.com', with: :mx)
|
|
742
756
|
@response_timeout=2,
|
743
757
|
@smtp_error_body_pattern=/(?=.*550)(?=.*(user|account|customer|mailbox)).*/i,
|
744
758
|
@not_rfc_mx_lookup_flow=true,
|
759
|
+
@smtp_port=25,
|
745
760
|
@smtp_fail_fast=false,
|
746
761
|
@smtp_safe_check=false,
|
747
762
|
@validation_type_by_domain={},
|
@@ -793,6 +808,7 @@ Truemail.validate('email@example.com', with: :mx_blacklist)
|
|
793
808
|
@not_rfc_mx_lookup_flow=false,
|
794
809
|
@response_timeout=2,
|
795
810
|
@smtp_error_body_pattern=/(?=.*550)(?=.*(user|account|customer|mailbox)).*/i,
|
811
|
+
@smtp_port=25,
|
796
812
|
@smtp_fail_fast=false,
|
797
813
|
@smtp_safe_check=false,
|
798
814
|
@validation_type_by_domain={},
|
@@ -869,6 +885,7 @@ Truemail.validate('email@example.com')
|
|
869
885
|
@not_rfc_mx_lookup_flow=false,
|
870
886
|
@response_timeout=2,
|
871
887
|
@smtp_error_body_pattern=/(?=.*550)(?=.*(user|account|customer|mailbox)).*/i,
|
888
|
+
@smtp_port=25,
|
872
889
|
@smtp_fail_fast=true,
|
873
890
|
@smtp_safe_check=false,
|
874
891
|
@validation_type_by_domain={},
|
@@ -966,6 +983,7 @@ Truemail.validate('email@example.com')
|
|
966
983
|
@response_timeout=2,
|
967
984
|
@smtp_error_body_pattern=/(?=.*550)(?=.*(user|account|customer|mailbox)).*/i,
|
968
985
|
@not_rfc_mx_lookup_flow=false,
|
986
|
+
@smtp_port=25,
|
969
987
|
@smtp_fail_fast=false,
|
970
988
|
@smtp_safe_check=false,
|
971
989
|
@validation_type_by_domain={},
|
@@ -1079,6 +1097,7 @@ Truemail.validate('email@example.com')
|
|
1079
1097
|
@response_timeout=2,
|
1080
1098
|
@smtp_error_body_pattern=/(?=.*550)(?=.*(user|account|customer|mailbox)).*/i,
|
1081
1099
|
@not_rfc_mx_lookup_flow=false,
|
1100
|
+
@smtp_port=25,
|
1082
1101
|
@smtp_fail_fast=false,
|
1083
1102
|
@smtp_safe_check=false,
|
1084
1103
|
@validation_type_by_domain={},
|
@@ -1129,6 +1148,7 @@ Truemail.host_audit
|
|
1129
1148
|
@response_timeout=2,
|
1130
1149
|
@smtp_error_body_pattern=/(?=.*550)(?=.*(user|account|customer|mailbox)).*/i,
|
1131
1150
|
@not_rfc_mx_lookup_flow=false,
|
1151
|
+
@smtp_port=25,
|
1132
1152
|
@smtp_fail_fast=false,
|
1133
1153
|
@smtp_safe_check=false,
|
1134
1154
|
@validation_type_by_domain={},
|
@@ -1158,6 +1178,7 @@ Truemail.host_audit
|
|
1158
1178
|
@response_timeout=2,
|
1159
1179
|
@smtp_error_body_pattern=/(?=.*550)(?=.*(user|account|customer|mailbox)).*/i,
|
1160
1180
|
@not_rfc_mx_lookup_flow=false,
|
1181
|
+
@smtp_port=25,
|
1161
1182
|
@smtp_fail_fast=false,
|
1162
1183
|
@smtp_safe_check=false,
|
1163
1184
|
@validation_type_by_domain={},
|
@@ -1378,6 +1399,7 @@ All Truemail solutions: https://truemail-rb.org
|
|
1378
1399
|
|
1379
1400
|
| Name | Type | Description |
|
1380
1401
|
| --- | --- | --- |
|
1402
|
+
| [truemail-go](https://github.com/truemail-rb/truemail-go) | go package | Configurable Golang email validator, main core |
|
1381
1403
|
| [truemail server](https://github.com/truemail-rb/truemail-rack) | ruby app | Lightweight rack based web API wrapper for Truemail gem |
|
1382
1404
|
| [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 |
|
1383
1405
|
| [truemail-ruby-client](https://github.com/truemail-rb/truemail-ruby-client) | ruby gem | Web API Ruby client for Truemail Server |
|
@@ -6,6 +6,7 @@ module Truemail
|
|
6
6
|
DEFAULT_RESPONSE_TIMEOUT = 2
|
7
7
|
DEFAULT_CONNECTION_ATTEMPTS = 2
|
8
8
|
DEFAULT_VALIDATION_TYPE = :smtp
|
9
|
+
DEFAULT_SMTP_PORT = 25
|
9
10
|
DEFAULT_LOGGER_OPTIONS = { tracking_event: :error, stdout: false, log_absolute_path: nil }.freeze
|
10
11
|
SETTERS = %i[
|
11
12
|
email_pattern
|
@@ -17,6 +18,7 @@ module Truemail
|
|
17
18
|
blacklisted_domains
|
18
19
|
blacklisted_mx_ip_addresses
|
19
20
|
dns
|
21
|
+
smtp_port
|
20
22
|
].freeze
|
21
23
|
|
22
24
|
attr_reader :verifier_email,
|
@@ -96,6 +98,7 @@ module Truemail
|
|
96
98
|
response_timeout: Truemail::Configuration::DEFAULT_RESPONSE_TIMEOUT,
|
97
99
|
connection_attempts: Truemail::Configuration::DEFAULT_CONNECTION_ATTEMPTS,
|
98
100
|
default_validation_type: Truemail::Configuration::DEFAULT_VALIDATION_TYPE,
|
101
|
+
smtp_port: Truemail::Configuration::DEFAULT_SMTP_PORT,
|
99
102
|
validation_type_by_domain: {},
|
100
103
|
whitelisted_domains: [],
|
101
104
|
whitelist_validation: false,
|
@@ -4,7 +4,6 @@ module Truemail
|
|
4
4
|
module Validate
|
5
5
|
class Smtp
|
6
6
|
class Request
|
7
|
-
SMTP_PORT = 25
|
8
7
|
CONNECTION_TIMEOUT_ERROR = 'connection timed out'
|
9
8
|
RESPONSE_TIMEOUT_ERROR = 'server response timeout'
|
10
9
|
CONNECTION_DROPPED = 'server dropped connection after response'
|
@@ -23,7 +22,7 @@ module Truemail
|
|
23
22
|
def check_port
|
24
23
|
response.port_opened = ::Socket.tcp(
|
25
24
|
host,
|
26
|
-
|
25
|
+
configuration.smtp_port,
|
27
26
|
connect_timeout: configuration.connection_timeout,
|
28
27
|
&port_open_status
|
29
28
|
)
|
@@ -42,7 +41,7 @@ module Truemail
|
|
42
41
|
private
|
43
42
|
|
44
43
|
class Configuration
|
45
|
-
REQUEST_PARAMS = %i[connection_timeout response_timeout verifier_domain verifier_email].freeze
|
44
|
+
REQUEST_PARAMS = %i[smtp_port connection_timeout response_timeout verifier_domain verifier_email].freeze
|
46
45
|
|
47
46
|
def initialize(configuration)
|
48
47
|
Truemail::Validate::Smtp::Request::Configuration::REQUEST_PARAMS.each do |attribute|
|
@@ -96,7 +95,7 @@ module Truemail
|
|
96
95
|
def session
|
97
96
|
Truemail::Validate::Smtp::Request::Session.new(
|
98
97
|
host,
|
99
|
-
|
98
|
+
configuration.smtp_port,
|
100
99
|
configuration.connection_timeout,
|
101
100
|
configuration.response_timeout
|
102
101
|
)
|
data/lib/truemail/version.rb
CHANGED
data/truemail.gemspec
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
-
require 'truemail/version'
|
3
|
+
require_relative 'lib/truemail/version'
|
6
4
|
|
7
5
|
Gem::Specification.new do |spec|
|
8
6
|
spec.name = 'truemail'
|
@@ -34,12 +32,12 @@ Gem::Specification.new do |spec|
|
|
34
32
|
spec.add_runtime_dependency 'net-smtp', '~> 0.3.1' if ::RUBY_VERSION >= '3.1.0'
|
35
33
|
spec.add_runtime_dependency 'simpleidn', '~> 0.2.1'
|
36
34
|
|
37
|
-
spec.add_development_dependency 'dns_mock', '~> 1.5', '>= 1.5.
|
38
|
-
spec.add_development_dependency 'ffaker', '~> 2.
|
35
|
+
spec.add_development_dependency 'dns_mock', '~> 1.5', '>= 1.5.2'
|
36
|
+
spec.add_development_dependency 'ffaker', '~> 2.21'
|
39
37
|
spec.add_development_dependency 'json_matchers', '~> 0.11.1'
|
40
38
|
spec.add_development_dependency 'rake', '~> 13.0', '>= 13.0.6'
|
41
|
-
spec.add_development_dependency 'rspec', '~> 3.
|
42
|
-
spec.add_development_dependency 'smtp_mock', '~> 1.0'
|
43
|
-
spec.add_development_dependency 'truemail-rspec', '~> 0.
|
39
|
+
spec.add_development_dependency 'rspec', '~> 3.11'
|
40
|
+
spec.add_development_dependency 'smtp_mock', '~> 1.0', '>= 1.0.1'
|
41
|
+
spec.add_development_dependency 'truemail-rspec', '~> 0.9.1'
|
44
42
|
spec.add_development_dependency 'webmock', '~> 3.14'
|
45
43
|
end
|
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.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vladislav Trotsenko
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-02
|
11
|
+
date: 2022-05-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: simpleidn
|
@@ -33,7 +33,7 @@ dependencies:
|
|
33
33
|
version: '1.5'
|
34
34
|
- - ">="
|
35
35
|
- !ruby/object:Gem::Version
|
36
|
-
version: 1.5.
|
36
|
+
version: 1.5.2
|
37
37
|
type: :development
|
38
38
|
prerelease: false
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -43,21 +43,21 @@ dependencies:
|
|
43
43
|
version: '1.5'
|
44
44
|
- - ">="
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: 1.5.
|
46
|
+
version: 1.5.2
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: ffaker
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
51
|
- - "~>"
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: '2.
|
53
|
+
version: '2.21'
|
54
54
|
type: :development
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
57
|
requirements:
|
58
58
|
- - "~>"
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version: '2.
|
60
|
+
version: '2.21'
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
62
|
name: json_matchers
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
@@ -98,14 +98,14 @@ dependencies:
|
|
98
98
|
requirements:
|
99
99
|
- - "~>"
|
100
100
|
- !ruby/object:Gem::Version
|
101
|
-
version: '3.
|
101
|
+
version: '3.11'
|
102
102
|
type: :development
|
103
103
|
prerelease: false
|
104
104
|
version_requirements: !ruby/object:Gem::Requirement
|
105
105
|
requirements:
|
106
106
|
- - "~>"
|
107
107
|
- !ruby/object:Gem::Version
|
108
|
-
version: '3.
|
108
|
+
version: '3.11'
|
109
109
|
- !ruby/object:Gem::Dependency
|
110
110
|
name: smtp_mock
|
111
111
|
requirement: !ruby/object:Gem::Requirement
|
@@ -113,6 +113,9 @@ dependencies:
|
|
113
113
|
- - "~>"
|
114
114
|
- !ruby/object:Gem::Version
|
115
115
|
version: '1.0'
|
116
|
+
- - ">="
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: 1.0.1
|
116
119
|
type: :development
|
117
120
|
prerelease: false
|
118
121
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -120,20 +123,23 @@ dependencies:
|
|
120
123
|
- - "~>"
|
121
124
|
- !ruby/object:Gem::Version
|
122
125
|
version: '1.0'
|
126
|
+
- - ">="
|
127
|
+
- !ruby/object:Gem::Version
|
128
|
+
version: 1.0.1
|
123
129
|
- !ruby/object:Gem::Dependency
|
124
130
|
name: truemail-rspec
|
125
131
|
requirement: !ruby/object:Gem::Requirement
|
126
132
|
requirements:
|
127
133
|
- - "~>"
|
128
134
|
- !ruby/object:Gem::Version
|
129
|
-
version: 0.
|
135
|
+
version: 0.9.1
|
130
136
|
type: :development
|
131
137
|
prerelease: false
|
132
138
|
version_requirements: !ruby/object:Gem::Requirement
|
133
139
|
requirements:
|
134
140
|
- - "~>"
|
135
141
|
- !ruby/object:Gem::Version
|
136
|
-
version: 0.
|
142
|
+
version: 0.9.1
|
137
143
|
- !ruby/object:Gem::Dependency
|
138
144
|
name: webmock
|
139
145
|
requirement: !ruby/object:Gem::Requirement
|
@@ -162,6 +168,7 @@ files:
|
|
162
168
|
- ".codeclimate.yml"
|
163
169
|
- ".github/BRANCH_NAMING_CONVENTION.md"
|
164
170
|
- ".github/DEVELOPMENT_ENVIRONMENT_GUIDE.md"
|
171
|
+
- ".github/FUNDING.yml"
|
165
172
|
- ".github/ISSUE_TEMPLATE/bug_report.md"
|
166
173
|
- ".github/ISSUE_TEMPLATE/feature_request.md"
|
167
174
|
- ".github/ISSUE_TEMPLATE/issue_report.md"
|