truemail 2.3.4 → 2.4.4
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 +37 -19
- data/.codeclimate.yml +1 -1
- data/.reek.yml +9 -8
- data/.rubocop.yml +27 -0
- data/CHANGELOG.md +66 -0
- data/Gemfile.lock +37 -36
- data/README.md +108 -23
- data/lib/truemail/configuration.rb +19 -24
- data/lib/truemail/core.rb +5 -2
- data/lib/truemail/log/serializer/base.rb +17 -8
- data/lib/truemail/log/serializer/validator_text.rb +3 -3
- data/lib/truemail/validate/mx_blacklist.rb +26 -0
- data/lib/truemail/validate/smtp.rb +1 -1
- data/lib/truemail/validator.rb +6 -2
- data/lib/truemail/version.rb +1 -1
- data/truemail.gemspec +11 -11
- metadata +33 -45
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cf8f27fbb88a8793afe363ecbf9afb73868a663724fd1f01e75ea855ca69c26b
|
4
|
+
data.tar.gz: e74cdde9bfab4ae16f08141e9f4d37ab99156c7107ccb9d101854fedbfe362d1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7e3bd0123c74232b762bcab48988249fbc0d923800fc06021c2b67966618367c81c410a9f1a73553e1783a9fc5fd8bdc1488aaf9fd1527389d1e7838e108408f
|
7
|
+
data.tar.gz: c148e89618ba2e034de5a638c67070342cb43b8e36e5d9794435a35629d6675217264f54011e40880a9333a661aec02671db9d91f93badb8eb618389f2859b47
|
data/.circleci/config.yml
CHANGED
@@ -3,14 +3,19 @@ version: 2.1
|
|
3
3
|
defaults: &defaults
|
4
4
|
working_directory: ~/truemail
|
5
5
|
docker:
|
6
|
-
- image:
|
6
|
+
- image: cimg/ruby:<< parameters.ruby-version >>
|
7
7
|
environment:
|
8
8
|
CC_TEST_REPORTER_ID: 693272a1328521f6f7c09d7ffd419b21c00410da26e98e94c687fdd38b26e2cb
|
9
9
|
|
10
10
|
orbs:
|
11
|
-
ruby: circleci/ruby@1.1.
|
11
|
+
ruby: circleci/ruby@1.1.3
|
12
12
|
|
13
13
|
references:
|
14
|
+
install_bundler: &install_bundler
|
15
|
+
run:
|
16
|
+
name: Installing Bundler
|
17
|
+
command: gem i bundler -v $(tail -1 Gemfile.lock | tr -d ' ')
|
18
|
+
|
14
19
|
restore_bundle_cache: &restore_bundle_cache
|
15
20
|
restore_cache:
|
16
21
|
keys:
|
@@ -29,63 +34,71 @@ references:
|
|
29
34
|
|
30
35
|
install_codeclimate_reporter: &install_codeclimate_reporter
|
31
36
|
run:
|
32
|
-
name:
|
37
|
+
name: Installing CodeClimate test reporter
|
33
38
|
command: |
|
34
39
|
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
35
40
|
chmod +x ./cc-test-reporter
|
36
41
|
|
37
42
|
jobs:
|
38
|
-
linters:
|
43
|
+
linters-ruby:
|
44
|
+
parameters:
|
45
|
+
ruby-version:
|
46
|
+
type: string
|
47
|
+
|
39
48
|
<<: *defaults
|
40
49
|
|
41
50
|
steps:
|
42
51
|
- checkout
|
43
52
|
|
53
|
+
- <<: *install_bundler
|
44
54
|
- <<: *restore_bundle_cache
|
45
55
|
- <<: *bundle_install
|
46
56
|
- <<: *save_bundle_cache
|
47
57
|
|
48
58
|
- run:
|
49
|
-
name: Running
|
59
|
+
name: Running Overcommit
|
50
60
|
command: |
|
51
61
|
bundle exec overcommit -s
|
52
62
|
SKIP=AuthorEmail,AuthorName bundle exec overcommit -r
|
53
63
|
|
54
|
-
tests:
|
64
|
+
tests-ruby:
|
65
|
+
parameters:
|
66
|
+
ruby-version:
|
67
|
+
type: string
|
68
|
+
|
55
69
|
<<: *defaults
|
56
70
|
|
57
71
|
steps:
|
58
72
|
- checkout
|
59
73
|
|
74
|
+
- <<: *install_bundler
|
60
75
|
- <<: *restore_bundle_cache
|
61
76
|
- <<: *bundle_install
|
62
77
|
- <<: *save_bundle_cache
|
63
78
|
- <<: *install_codeclimate_reporter
|
64
79
|
|
65
80
|
- run:
|
66
|
-
name: Running
|
81
|
+
name: Running RSpec
|
67
82
|
command: |
|
68
|
-
mkdir /tmp/test-results
|
69
83
|
./cc-test-reporter before-build
|
70
84
|
bundle exec rspec
|
71
85
|
|
72
86
|
- run:
|
73
|
-
name:
|
87
|
+
name: Creating CodeClimate test coverage report
|
74
88
|
command: |
|
75
89
|
./cc-test-reporter format-coverage -t simplecov -o "coverage/codeclimate.$CIRCLE_NODE_INDEX.json"
|
76
90
|
|
77
|
-
- store_test_results:
|
78
|
-
path: /tmp/test-results
|
79
|
-
|
80
91
|
- store_artifacts:
|
81
|
-
|
82
|
-
|
92
|
+
name: Saving Simplecov coverage artifacts
|
93
|
+
path: ~/truemail/coverage
|
94
|
+
destination: coverage
|
83
95
|
|
84
96
|
- deploy:
|
97
|
+
name: Uploading CodeClimate test coverage report
|
85
98
|
command: |
|
86
99
|
./cc-test-reporter sum-coverage --output - --parts $CIRCLE_NODE_TOTAL coverage/codeclimate.*.json | ./cc-test-reporter upload-coverage --debug --input -
|
87
100
|
|
88
|
-
compatibility-
|
101
|
+
compatibility-ruby:
|
89
102
|
parameters:
|
90
103
|
ruby-version:
|
91
104
|
type: string
|
@@ -94,7 +107,6 @@ jobs:
|
|
94
107
|
steps:
|
95
108
|
- checkout
|
96
109
|
- ruby/install-deps:
|
97
|
-
bundler-version: '1.16.6'
|
98
110
|
with-cache: false
|
99
111
|
path: './vendor/custom_bundle'
|
100
112
|
- run:
|
@@ -104,9 +116,15 @@ jobs:
|
|
104
116
|
workflows:
|
105
117
|
build_and_test:
|
106
118
|
jobs:
|
107
|
-
- linters
|
108
|
-
|
109
|
-
|
119
|
+
- linters-ruby:
|
120
|
+
matrix:
|
121
|
+
parameters:
|
122
|
+
ruby-version: ["2.5"]
|
123
|
+
- tests-ruby:
|
124
|
+
matrix:
|
125
|
+
parameters:
|
126
|
+
ruby-version: ["2.5"]
|
127
|
+
- compatibility-ruby:
|
110
128
|
matrix:
|
111
129
|
parameters:
|
112
130
|
ruby-version: ["2.6", "2.7", "3.0"]
|
data/.codeclimate.yml
CHANGED
data/.reek.yml
CHANGED
@@ -34,18 +34,19 @@ detectors:
|
|
34
34
|
|
35
35
|
UtilityFunction:
|
36
36
|
exclude:
|
37
|
-
- Truemail::Validate::Smtp::Request#compose_from
|
38
|
-
- Truemail::Validator#select_validation_type
|
39
|
-
- Truemail::Validate::Base#configuration
|
40
|
-
- Truemail::Validate::Mx#null_mx?
|
41
|
-
- Truemail::Validate::Mx#a_record
|
42
37
|
- Truemail::Audit::Base#verifier_domain
|
43
|
-
- Truemail::Configuration#domain_matcher
|
44
38
|
- Truemail::Configuration#logger_options
|
39
|
+
- Truemail::Configuration#match_regex?
|
40
|
+
- Truemail::Configuration#regex_by_method
|
41
|
+
- Truemail::Dns::Worker#nameserver_port
|
45
42
|
- Truemail::Log::Serializer::Base#errors
|
46
43
|
- Truemail::Log::Serializer::ValidatorBase#replace_invalid_chars
|
47
|
-
- Truemail::
|
48
|
-
- Truemail::
|
44
|
+
- Truemail::Validator#select_validation_type
|
45
|
+
- Truemail::Validator#constantize
|
46
|
+
- Truemail::Validate::Base#configuration
|
47
|
+
- Truemail::Validate::Mx#null_mx?
|
48
|
+
- Truemail::Validate::Mx#a_record
|
49
|
+
- Truemail::Validate::Smtp::Request#compose_from
|
49
50
|
|
50
51
|
ControlParameter:
|
51
52
|
exclude:
|
data/.rubocop.yml
CHANGED
@@ -28,6 +28,9 @@ Naming/VariableNumber:
|
|
28
28
|
Naming/RescuedExceptionsVariableName:
|
29
29
|
Enabled: false
|
30
30
|
|
31
|
+
Naming/InclusiveLanguage:
|
32
|
+
Enabled: false
|
33
|
+
|
31
34
|
Style/Documentation:
|
32
35
|
Enabled: false
|
33
36
|
|
@@ -154,6 +157,15 @@ Style/HashConversion:
|
|
154
157
|
Style/StringChars:
|
155
158
|
Enabled: true
|
156
159
|
|
160
|
+
Style/InPatternThen:
|
161
|
+
Enabled: true
|
162
|
+
|
163
|
+
Style/MultilineInPatternThen:
|
164
|
+
Enabled: true
|
165
|
+
|
166
|
+
Style/QuotedSymbols:
|
167
|
+
Enabled: true
|
168
|
+
|
157
169
|
Layout/LineLength:
|
158
170
|
Max: 140
|
159
171
|
|
@@ -188,6 +200,9 @@ Layout/BeginEndAlignment:
|
|
188
200
|
Layout/SpaceBeforeBrackets:
|
189
201
|
Enabled: true
|
190
202
|
|
203
|
+
Layout/LineEndStringConcatenationIndentation:
|
204
|
+
Enabled: true
|
205
|
+
|
191
206
|
Lint/NonDeterministicRequireOrder:
|
192
207
|
Enabled: false
|
193
208
|
|
@@ -308,6 +323,9 @@ Lint/SymbolConversion:
|
|
308
323
|
Lint/TripleQuotes:
|
309
324
|
Enabled: true
|
310
325
|
|
326
|
+
Lint/EmptyInPattern:
|
327
|
+
Enabled: true
|
328
|
+
|
311
329
|
Gemspec/DateAssignment:
|
312
330
|
Enabled: true
|
313
331
|
|
@@ -356,6 +374,9 @@ Performance/RedundantEqualityComparisonBlock:
|
|
356
374
|
Performance/RedundantSplitRegexpArgument:
|
357
375
|
Enabled: true
|
358
376
|
|
377
|
+
Performance/MapCompact:
|
378
|
+
Enabled: true
|
379
|
+
|
359
380
|
RSpec/ExampleLength:
|
360
381
|
Enabled: false
|
361
382
|
|
@@ -385,3 +406,9 @@ RSpec/MultipleMemoizedHelpers:
|
|
385
406
|
|
386
407
|
RSpec/StubbedMock:
|
387
408
|
Enabled: false
|
409
|
+
|
410
|
+
RSpec/IdenticalEqualityAssertion:
|
411
|
+
Enabled: true
|
412
|
+
|
413
|
+
RSpec/Rails/AvoidSetupHook:
|
414
|
+
Enabled: true
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,72 @@
|
|
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.4.4] - 2021.06.29
|
6
|
+
|
7
|
+
### Updated
|
8
|
+
|
9
|
+
Allowed using special characters in email user names (following [RFC 3696](https://datatracker.ietf.org/doc/html/rfc3696#page-6)) for default regex email pattern.
|
10
|
+
|
11
|
+
- Updated `Truemail::RegexConstant::REGEX_EMAIL_PATTERN`, tests
|
12
|
+
- Updated gem development dependencies
|
13
|
+
- Updated Rubocop/Codeclimate config
|
14
|
+
- Updated gem documentation, version
|
15
|
+
|
16
|
+
## [2.4.3] - 2021.06.15
|
17
|
+
|
18
|
+
### Updated
|
19
|
+
|
20
|
+
- Updated gem development dependencies
|
21
|
+
- Updated Rubocop/Codeclimate config
|
22
|
+
- Updated gem documentation, version
|
23
|
+
|
24
|
+
## [2.4.2] - 2021.05.13
|
25
|
+
|
26
|
+
### Fixed
|
27
|
+
|
28
|
+
- Fixed security vulnerability for bundler ([CVE-2019-3881](https://github.com/advisories/GHSA-g98m-96g9-wfjq))
|
29
|
+
- Fixed test coverage issues
|
30
|
+
|
31
|
+
### Updated
|
32
|
+
|
33
|
+
- Updated gem development dependencies
|
34
|
+
- Updated simplecov/CircleCi config
|
35
|
+
- Updated gem documentation, version
|
36
|
+
|
37
|
+
## [2.4.1] - 2021.05.05
|
38
|
+
|
39
|
+
### Updated
|
40
|
+
|
41
|
+
- `Truemail::Validate::MxBlacklist`, tests
|
42
|
+
- Updated gem development dependencies
|
43
|
+
- Updated gem documentation, version
|
44
|
+
|
45
|
+
## [2.4.0] - 2021.04.28
|
46
|
+
|
47
|
+
### Added
|
48
|
+
|
49
|
+
- Implemented `MxBlacklist` validation. This layer provides checking mail servers with predefined blacklisted IP addresses list and can be used as a part of DEA ([disposable email address](https://en.wikipedia.org/wiki/Disposable_email_address)) validations.
|
50
|
+
|
51
|
+
```ruby
|
52
|
+
Truemail.configure do |config|
|
53
|
+
# Optional parameter. With this option Truemail will filter out unwanted mx servers via
|
54
|
+
# predefined list of ip addresses. It can be used as a part of DEA (disposable email
|
55
|
+
# address) validations. It is equal to empty array by default.
|
56
|
+
config.blacklisted_mx_ip_addresses = ['1.1.1.1', '2.2.2.2']
|
57
|
+
end
|
58
|
+
```
|
59
|
+
|
60
|
+
### Changed
|
61
|
+
|
62
|
+
- Updated `Truemail::Core`, tests
|
63
|
+
- Updated `Truemail::Configuration`, tests
|
64
|
+
- Updated `Truemail::Validator`
|
65
|
+
- Updated `Truemail::Validate::Smtp`, tests
|
66
|
+
- Updated `Truemail::Log::Serializer::Base`, dependent tests
|
67
|
+
- Updated `Truemail::Log::Serializer::ValidatorText`, tests
|
68
|
+
- Updated gem development dependencies
|
69
|
+
- Updated gem documentation, changelog, version
|
70
|
+
|
5
71
|
## [2.3.4] - 2021.04.16
|
6
72
|
|
7
73
|
### Fixed
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
truemail (2.
|
4
|
+
truemail (2.4.4)
|
5
5
|
simpleidn (~> 0.2.1)
|
6
6
|
|
7
7
|
GEM
|
@@ -14,16 +14,16 @@ GEM
|
|
14
14
|
bundler (>= 1.2.0, < 3)
|
15
15
|
thor (~> 1.0)
|
16
16
|
byebug (11.1.3)
|
17
|
-
childprocess (4.
|
17
|
+
childprocess (4.1.0)
|
18
18
|
coderay (1.1.3)
|
19
19
|
colorize (0.8.1)
|
20
|
-
concurrent-ruby (1.1.
|
20
|
+
concurrent-ruby (1.1.9)
|
21
21
|
crack (0.4.5)
|
22
22
|
rexml
|
23
23
|
diff-lcs (1.4.4)
|
24
|
-
dns_mock (1.
|
25
|
-
docile (1.
|
26
|
-
faker (2.
|
24
|
+
dns_mock (1.3.0)
|
25
|
+
docile (1.4.0)
|
26
|
+
faker (2.18.0)
|
27
27
|
i18n (>= 1.6, < 2)
|
28
28
|
fasterer (0.9.0)
|
29
29
|
colorize (~> 0.7)
|
@@ -38,11 +38,12 @@ GEM
|
|
38
38
|
json_schema (0.21.0)
|
39
39
|
kwalify (0.7.2)
|
40
40
|
method_source (1.0.0)
|
41
|
-
overcommit (0.
|
41
|
+
overcommit (0.58.0)
|
42
42
|
childprocess (>= 0.6.3, < 5)
|
43
43
|
iniparse (~> 1.4)
|
44
|
+
rexml (~> 3.2)
|
44
45
|
parallel (1.20.1)
|
45
|
-
parser (3.0.1.
|
46
|
+
parser (3.0.1.1)
|
46
47
|
ast (~> 2.4.1)
|
47
48
|
pry (0.13.1)
|
48
49
|
coderay (~> 1.1)
|
@@ -50,11 +51,11 @@ GEM
|
|
50
51
|
pry-byebug (3.9.0)
|
51
52
|
byebug (~> 11.0)
|
52
53
|
pry (~> 0.13.0)
|
53
|
-
psych (3.3.
|
54
|
+
psych (3.3.2)
|
54
55
|
public_suffix (4.0.6)
|
55
56
|
rainbow (3.0.0)
|
56
57
|
rake (13.0.3)
|
57
|
-
reek (6.0.
|
58
|
+
reek (6.0.4)
|
58
59
|
kwalify (~> 0.7.0)
|
59
60
|
parser (~> 3.0.0)
|
60
61
|
psych (~> 3.1)
|
@@ -74,27 +75,27 @@ GEM
|
|
74
75
|
diff-lcs (>= 1.2.0, < 2.0)
|
75
76
|
rspec-support (~> 3.10.0)
|
76
77
|
rspec-support (3.10.2)
|
77
|
-
rubocop (1.
|
78
|
+
rubocop (1.18.0)
|
78
79
|
parallel (~> 1.10)
|
79
80
|
parser (>= 3.0.0.0)
|
80
81
|
rainbow (>= 2.2.2, < 4.0)
|
81
82
|
regexp_parser (>= 1.8, < 3.0)
|
82
83
|
rexml
|
83
|
-
rubocop-ast (>= 1.
|
84
|
+
rubocop-ast (>= 1.7.0, < 2.0)
|
84
85
|
ruby-progressbar (~> 1.7)
|
85
86
|
unicode-display_width (>= 1.4.0, < 3.0)
|
86
|
-
rubocop-ast (1.
|
87
|
-
parser (>=
|
88
|
-
rubocop-performance (1.
|
89
|
-
rubocop (>=
|
87
|
+
rubocop-ast (1.7.0)
|
88
|
+
parser (>= 3.0.1.1)
|
89
|
+
rubocop-performance (1.11.3)
|
90
|
+
rubocop (>= 1.7.0, < 2.0)
|
90
91
|
rubocop-ast (>= 0.4.0)
|
91
|
-
rubocop-rspec (2.
|
92
|
+
rubocop-rspec (2.4.0)
|
92
93
|
rubocop (~> 1.0)
|
93
94
|
rubocop-ast (>= 1.1.0)
|
94
95
|
ruby-progressbar (1.11.0)
|
95
|
-
ruby_parser (3.
|
96
|
-
sexp_processor (~> 4.
|
97
|
-
sexp_processor (4.15.
|
96
|
+
ruby_parser (3.16.0)
|
97
|
+
sexp_processor (~> 4.15, >= 4.15.1)
|
98
|
+
sexp_processor (4.15.3)
|
98
99
|
simplecov (0.17.1)
|
99
100
|
docile (~> 1.1)
|
100
101
|
json (>= 1.8, < 3)
|
@@ -103,41 +104,41 @@ GEM
|
|
103
104
|
simpleidn (0.2.1)
|
104
105
|
unf (~> 0.1.4)
|
105
106
|
thor (1.1.0)
|
106
|
-
truemail-rspec (0.
|
107
|
-
faker (~> 2.
|
107
|
+
truemail-rspec (0.6.0)
|
108
|
+
faker (~> 2.17)
|
108
109
|
rspec (~> 3.10)
|
109
|
-
truemail (>= 2.
|
110
|
+
truemail (>= 2.4)
|
110
111
|
unf (0.1.4)
|
111
112
|
unf_ext
|
112
113
|
unf_ext (0.0.7.7)
|
113
114
|
unicode-display_width (2.0.0)
|
114
|
-
webmock (3.
|
115
|
+
webmock (3.13.0)
|
115
116
|
addressable (>= 2.3.6)
|
116
117
|
crack (>= 0.3.2)
|
117
118
|
hashdiff (>= 0.4.0, < 2.0.0)
|
118
119
|
|
119
120
|
PLATFORMS
|
120
|
-
|
121
|
+
x86_64-darwin-20
|
121
122
|
|
122
123
|
DEPENDENCIES
|
123
|
-
bundler (~>
|
124
|
+
bundler (~> 2.2, >= 2.2.21)
|
124
125
|
bundler-audit (~> 0.8.0)
|
125
|
-
dns_mock (~> 1.
|
126
|
-
faker (~> 2.
|
126
|
+
dns_mock (~> 1.3)
|
127
|
+
faker (~> 2.18)
|
127
128
|
fasterer (~> 0.9.0)
|
128
129
|
json_matchers (~> 0.11.1)
|
129
|
-
overcommit (~> 0.
|
130
|
+
overcommit (~> 0.58.0)
|
130
131
|
pry-byebug (~> 3.9)
|
131
132
|
rake (~> 13.0, >= 13.0.3)
|
132
|
-
reek (~> 6.0, >= 6.0.
|
133
|
+
reek (~> 6.0, >= 6.0.4)
|
133
134
|
rspec (~> 3.10)
|
134
|
-
rubocop (~> 1.
|
135
|
-
rubocop-performance (~> 1.
|
136
|
-
rubocop-rspec (~> 2.
|
135
|
+
rubocop (~> 1.18)
|
136
|
+
rubocop-performance (~> 1.11, >= 1.11.3)
|
137
|
+
rubocop-rspec (~> 2.4)
|
137
138
|
simplecov (~> 0.17.1)
|
138
139
|
truemail!
|
139
|
-
truemail-rspec (~> 0.
|
140
|
-
webmock (~> 3.
|
140
|
+
truemail-rspec (~> 0.6)
|
141
|
+
webmock (~> 3.13)
|
141
142
|
|
142
143
|
BUNDLED WITH
|
143
|
-
|
144
|
+
2.2.21
|