truemail 2.3.2 → 2.4.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 +59 -18
- data/.codeclimate.yml +1 -1
- data/.reek.yml +9 -8
- data/.rubocop.yml +6 -0
- data/CHANGELOG.md +69 -4
- data/Gemfile.lock +33 -33
- data/README.md +106 -21
- 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 +36 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7de00f2ec17132cbe9de210b829968c07825131743274a4f001116a13c4997f5
|
4
|
+
data.tar.gz: 2d0486413d882a316321294bec7966705f0f9c49de35a69afb9ffd10bfeb70ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a9b3f751d260826db1b1d514cde240b895db31df9e167e41ddb2deae2195c5196c1d1bfac23c58fcd969ba01f3a7fb4299a18a50acb389ecc9806f7dc99e8bee
|
7
|
+
data.tar.gz: c32d079752ac963c8574d579809030f4ed0d98e0045aef97ca9e6cba11d90abe156ddb7995f226260474ff8d51166b4368287fc4a5c9f009ce4805c54ef5147f
|
data/.circleci/config.yml
CHANGED
@@ -1,11 +1,21 @@
|
|
1
|
+
version: 2.1
|
2
|
+
|
1
3
|
defaults: &defaults
|
2
4
|
working_directory: ~/truemail
|
3
5
|
docker:
|
4
|
-
- image:
|
6
|
+
- image: cimg/ruby:<< parameters.ruby-version >>
|
5
7
|
environment:
|
6
8
|
CC_TEST_REPORTER_ID: 693272a1328521f6f7c09d7ffd419b21c00410da26e98e94c687fdd38b26e2cb
|
7
9
|
|
10
|
+
orbs:
|
11
|
+
ruby: circleci/ruby@1.1.3
|
12
|
+
|
8
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
|
+
|
9
19
|
restore_bundle_cache: &restore_bundle_cache
|
10
20
|
restore_cache:
|
11
21
|
keys:
|
@@ -24,66 +34,97 @@ references:
|
|
24
34
|
|
25
35
|
install_codeclimate_reporter: &install_codeclimate_reporter
|
26
36
|
run:
|
27
|
-
name:
|
37
|
+
name: Installing CodeClimate test reporter
|
28
38
|
command: |
|
29
39
|
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
30
40
|
chmod +x ./cc-test-reporter
|
31
41
|
|
32
|
-
version: 2
|
33
42
|
jobs:
|
34
|
-
linters:
|
43
|
+
linters-ruby:
|
44
|
+
parameters:
|
45
|
+
ruby-version:
|
46
|
+
type: string
|
47
|
+
|
35
48
|
<<: *defaults
|
36
49
|
|
37
50
|
steps:
|
38
51
|
- checkout
|
39
52
|
|
53
|
+
- <<: *install_bundler
|
40
54
|
- <<: *restore_bundle_cache
|
41
55
|
- <<: *bundle_install
|
42
56
|
- <<: *save_bundle_cache
|
43
57
|
|
44
58
|
- run:
|
45
|
-
name: Running
|
59
|
+
name: Running Overcommit
|
46
60
|
command: |
|
47
61
|
bundle exec overcommit -s
|
48
62
|
SKIP=AuthorEmail,AuthorName bundle exec overcommit -r
|
49
63
|
|
50
|
-
tests:
|
64
|
+
tests-ruby:
|
65
|
+
parameters:
|
66
|
+
ruby-version:
|
67
|
+
type: string
|
68
|
+
|
51
69
|
<<: *defaults
|
52
70
|
|
53
71
|
steps:
|
54
72
|
- checkout
|
55
73
|
|
74
|
+
- <<: *install_bundler
|
56
75
|
- <<: *restore_bundle_cache
|
57
76
|
- <<: *bundle_install
|
58
77
|
- <<: *save_bundle_cache
|
59
78
|
- <<: *install_codeclimate_reporter
|
60
79
|
|
61
80
|
- run:
|
62
|
-
name: Running
|
81
|
+
name: Running RSpec
|
63
82
|
command: |
|
64
|
-
mkdir /tmp/test-results
|
65
83
|
./cc-test-reporter before-build
|
66
84
|
bundle exec rspec
|
67
85
|
|
68
86
|
- run:
|
69
|
-
name:
|
87
|
+
name: Creating CodeClimate test coverage report
|
70
88
|
command: |
|
71
89
|
./cc-test-reporter format-coverage -t simplecov -o "coverage/codeclimate.$CIRCLE_NODE_INDEX.json"
|
72
90
|
|
73
|
-
- store_test_results:
|
74
|
-
path: /tmp/test-results
|
75
|
-
|
76
91
|
- store_artifacts:
|
77
|
-
|
78
|
-
|
92
|
+
name: Saving Simplecov coverage artifacts
|
93
|
+
path: ~/truemail/coverage
|
94
|
+
destination: coverage
|
79
95
|
|
80
96
|
- deploy:
|
97
|
+
name: Uploading CodeClimate test coverage report
|
81
98
|
command: |
|
82
99
|
./cc-test-reporter sum-coverage --output - --parts $CIRCLE_NODE_TOTAL coverage/codeclimate.*.json | ./cc-test-reporter upload-coverage --debug --input -
|
83
100
|
|
101
|
+
compatibility-ruby:
|
102
|
+
parameters:
|
103
|
+
ruby-version:
|
104
|
+
type: string
|
105
|
+
docker:
|
106
|
+
- image: cimg/ruby:<< parameters.ruby-version >>
|
107
|
+
steps:
|
108
|
+
- checkout
|
109
|
+
- ruby/install-deps:
|
110
|
+
with-cache: false
|
111
|
+
path: './vendor/custom_bundle'
|
112
|
+
- run:
|
113
|
+
name: Running compatibility tests
|
114
|
+
command: bundle exec rspec
|
115
|
+
|
84
116
|
workflows:
|
85
|
-
|
86
|
-
build:
|
117
|
+
build_and_test:
|
87
118
|
jobs:
|
88
|
-
- linters
|
89
|
-
|
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:
|
128
|
+
matrix:
|
129
|
+
parameters:
|
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
@@ -151,6 +151,9 @@ Style/IfWithBooleanLiteralBranches:
|
|
151
151
|
Style/HashConversion:
|
152
152
|
Enabled: true
|
153
153
|
|
154
|
+
Style/StringChars:
|
155
|
+
Enabled: true
|
156
|
+
|
154
157
|
Layout/LineLength:
|
155
158
|
Max: 140
|
156
159
|
|
@@ -353,6 +356,9 @@ Performance/RedundantEqualityComparisonBlock:
|
|
353
356
|
Performance/RedundantSplitRegexpArgument:
|
354
357
|
Enabled: true
|
355
358
|
|
359
|
+
Performance/MapCompact:
|
360
|
+
Enabled: true
|
361
|
+
|
356
362
|
RSpec/ExampleLength:
|
357
363
|
Enabled: false
|
358
364
|
|
data/CHANGELOG.md
CHANGED
@@ -2,14 +2,79 @@
|
|
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
|
+
## [2.4.2] - 2021.05.13
|
6
|
+
|
7
|
+
### Fixed
|
8
|
+
|
9
|
+
- Fixed security vulnerability for bundler ([CVE-2019-3881](https://github.com/advisories/GHSA-g98m-96g9-wfjq))
|
10
|
+
- Fixed test coverage issues
|
11
|
+
|
12
|
+
### Updated
|
13
|
+
|
14
|
+
- Updated gem development dependencies
|
15
|
+
- Updated simplecov/CircleCi config
|
16
|
+
- Updated gem documentation, version
|
17
|
+
|
18
|
+
## [2.4.1] - 2021.05.05
|
19
|
+
|
20
|
+
### Updated
|
21
|
+
|
22
|
+
- `Truemail::Validate::MxBlacklist`, tests
|
23
|
+
- Updated gem development dependencies
|
24
|
+
- Updated gem documentation, version
|
25
|
+
|
26
|
+
## [2.4.0] - 2021.04.28
|
27
|
+
|
28
|
+
### Added
|
29
|
+
|
30
|
+
- 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.
|
31
|
+
|
32
|
+
```ruby
|
33
|
+
Truemail.configure do |config|
|
34
|
+
# Optional parameter. With this option Truemail will filter out unwanted mx servers via
|
35
|
+
# predefined list of ip addresses. It can be used as a part of DEA (disposable email
|
36
|
+
# address) validations. It is equal to empty array by default.
|
37
|
+
config.blacklisted_mx_ip_addresses = ['1.1.1.1', '2.2.2.2']
|
38
|
+
end
|
39
|
+
```
|
40
|
+
|
41
|
+
### Changed
|
42
|
+
|
43
|
+
- Updated `Truemail::Core`, tests
|
44
|
+
- Updated `Truemail::Configuration`, tests
|
45
|
+
- Updated `Truemail::Validator`
|
46
|
+
- Updated `Truemail::Validate::Smtp`, tests
|
47
|
+
- Updated `Truemail::Log::Serializer::Base`, dependent tests
|
48
|
+
- Updated `Truemail::Log::Serializer::ValidatorText`, tests
|
49
|
+
- Updated gem development dependencies
|
50
|
+
- Updated gem documentation, changelog, version
|
51
|
+
|
52
|
+
## [2.3.4] - 2021.04.16
|
53
|
+
|
54
|
+
### Fixed
|
55
|
+
|
56
|
+
Fixed bug with impossibility to use valid dns port number. Now validation for dns port for range `1..65535` works as expected.
|
57
|
+
|
58
|
+
- Updated `Truemail::RegexConstant::REGEX_PORT_NUMBER`, tests
|
59
|
+
- Updated gem documentation
|
60
|
+
- CircleCI config moved to `.circleci/config.yml`
|
61
|
+
|
62
|
+
## [2.3.3] - 2021.04.14
|
63
|
+
|
64
|
+
### Changed
|
65
|
+
|
66
|
+
- Updated gem development dependencies
|
67
|
+
- Updated rubocop/codeclimate config
|
68
|
+
- Updated CircleCI config
|
69
|
+
|
70
|
+
## [2.3.2] - 2021.03.08
|
6
71
|
|
7
72
|
### Changed
|
8
73
|
|
9
74
|
- Updated gem development dependencies
|
10
75
|
- Updated rubocop/codeclimate config
|
11
76
|
|
12
|
-
## [2.3.1] -
|
77
|
+
## [2.3.1] - 2021.02.26
|
13
78
|
|
14
79
|
### Changed
|
15
80
|
|
@@ -17,7 +82,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
17
82
|
- Updated rubocop/codeclimate config
|
18
83
|
- Updated tests
|
19
84
|
|
20
|
-
## [2.3.0] -
|
85
|
+
## [2.3.0] - 2021.02.05
|
21
86
|
|
22
87
|
### Added
|
23
88
|
|
@@ -50,7 +115,7 @@ end
|
|
50
115
|
- Updated gem runtime/development dependencies
|
51
116
|
- Updated gem documentation, changelog, version
|
52
117
|
|
53
|
-
## [2.2.3] -
|
118
|
+
## [2.2.3] - 2021.01.12
|
54
119
|
|
55
120
|
### Fixed
|
56
121
|
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
truemail (2.
|
4
|
+
truemail (2.4.2)
|
5
5
|
simpleidn (~> 0.2.1)
|
6
6
|
|
7
7
|
GEM
|
@@ -10,9 +10,9 @@ GEM
|
|
10
10
|
addressable (2.7.0)
|
11
11
|
public_suffix (>= 2.0.2, < 5.0)
|
12
12
|
ast (2.4.2)
|
13
|
-
bundler-audit (0.
|
13
|
+
bundler-audit (0.8.0)
|
14
14
|
bundler (>= 1.2.0, < 3)
|
15
|
-
thor (
|
15
|
+
thor (~> 1.0)
|
16
16
|
byebug (11.1.3)
|
17
17
|
childprocess (4.0.0)
|
18
18
|
coderay (1.1.3)
|
@@ -21,15 +21,15 @@ GEM
|
|
21
21
|
crack (0.4.5)
|
22
22
|
rexml
|
23
23
|
diff-lcs (1.4.4)
|
24
|
-
dns_mock (1.2.
|
25
|
-
docile (1.
|
26
|
-
faker (2.
|
24
|
+
dns_mock (1.2.3)
|
25
|
+
docile (1.4.0)
|
26
|
+
faker (2.17.0)
|
27
27
|
i18n (>= 1.6, < 2)
|
28
28
|
fasterer (0.9.0)
|
29
29
|
colorize (~> 0.7)
|
30
30
|
ruby_parser (>= 3.14.1)
|
31
31
|
hashdiff (1.0.1)
|
32
|
-
i18n (1.8.
|
32
|
+
i18n (1.8.10)
|
33
33
|
concurrent-ruby (~> 1.0)
|
34
34
|
iniparse (1.5.0)
|
35
35
|
json (2.5.1)
|
@@ -42,7 +42,7 @@ GEM
|
|
42
42
|
childprocess (>= 0.6.3, < 5)
|
43
43
|
iniparse (~> 1.4)
|
44
44
|
parallel (1.20.1)
|
45
|
-
parser (3.0.
|
45
|
+
parser (3.0.1.1)
|
46
46
|
ast (~> 2.4.1)
|
47
47
|
pry (0.13.1)
|
48
48
|
coderay (~> 1.1)
|
@@ -54,13 +54,13 @@ GEM
|
|
54
54
|
public_suffix (4.0.6)
|
55
55
|
rainbow (3.0.0)
|
56
56
|
rake (13.0.3)
|
57
|
-
reek (6.0.
|
57
|
+
reek (6.0.4)
|
58
58
|
kwalify (~> 0.7.0)
|
59
59
|
parser (~> 3.0.0)
|
60
60
|
psych (~> 3.1)
|
61
61
|
rainbow (>= 2.0, < 4.0)
|
62
62
|
regexp_parser (2.1.1)
|
63
|
-
rexml (3.2.
|
63
|
+
rexml (3.2.5)
|
64
64
|
rspec (3.10.0)
|
65
65
|
rspec-core (~> 3.10.0)
|
66
66
|
rspec-expectations (~> 3.10.0)
|
@@ -74,21 +74,21 @@ GEM
|
|
74
74
|
diff-lcs (>= 1.2.0, < 2.0)
|
75
75
|
rspec-support (~> 3.10.0)
|
76
76
|
rspec-support (3.10.2)
|
77
|
-
rubocop (1.
|
77
|
+
rubocop (1.14.0)
|
78
78
|
parallel (~> 1.10)
|
79
79
|
parser (>= 3.0.0.0)
|
80
80
|
rainbow (>= 2.2.2, < 4.0)
|
81
81
|
regexp_parser (>= 1.8, < 3.0)
|
82
82
|
rexml
|
83
|
-
rubocop-ast (>= 1.
|
83
|
+
rubocop-ast (>= 1.5.0, < 2.0)
|
84
84
|
ruby-progressbar (~> 1.7)
|
85
85
|
unicode-display_width (>= 1.4.0, < 3.0)
|
86
|
-
rubocop-ast (1.
|
87
|
-
parser (>=
|
88
|
-
rubocop-performance (1.
|
89
|
-
rubocop (>=
|
86
|
+
rubocop-ast (1.5.0)
|
87
|
+
parser (>= 3.0.1.1)
|
88
|
+
rubocop-performance (1.11.3)
|
89
|
+
rubocop (>= 1.7.0, < 2.0)
|
90
90
|
rubocop-ast (>= 0.4.0)
|
91
|
-
rubocop-rspec (2.
|
91
|
+
rubocop-rspec (2.3.0)
|
92
92
|
rubocop (~> 1.0)
|
93
93
|
rubocop-ast (>= 1.1.0)
|
94
94
|
ruby-progressbar (1.11.0)
|
@@ -103,41 +103,41 @@ GEM
|
|
103
103
|
simpleidn (0.2.1)
|
104
104
|
unf (~> 0.1.4)
|
105
105
|
thor (1.1.0)
|
106
|
-
truemail-rspec (0.
|
107
|
-
faker (~> 2.
|
106
|
+
truemail-rspec (0.6.0)
|
107
|
+
faker (~> 2.17)
|
108
108
|
rspec (~> 3.10)
|
109
|
-
truemail (>= 2.
|
109
|
+
truemail (>= 2.4)
|
110
110
|
unf (0.1.4)
|
111
111
|
unf_ext
|
112
112
|
unf_ext (0.0.7.7)
|
113
113
|
unicode-display_width (2.0.0)
|
114
|
-
webmock (3.12.
|
114
|
+
webmock (3.12.2)
|
115
115
|
addressable (>= 2.3.6)
|
116
116
|
crack (>= 0.3.2)
|
117
117
|
hashdiff (>= 0.4.0, < 2.0.0)
|
118
118
|
|
119
119
|
PLATFORMS
|
120
|
-
|
120
|
+
x86_64-darwin-19
|
121
121
|
|
122
122
|
DEPENDENCIES
|
123
|
-
bundler (~>
|
124
|
-
bundler-audit (~> 0.
|
125
|
-
dns_mock (~> 1.2)
|
126
|
-
faker (~> 2.
|
123
|
+
bundler (~> 2.2, >= 2.2.17)
|
124
|
+
bundler-audit (~> 0.8.0)
|
125
|
+
dns_mock (~> 1.2, >= 1.2.3)
|
126
|
+
faker (~> 2.17)
|
127
127
|
fasterer (~> 0.9.0)
|
128
128
|
json_matchers (~> 0.11.1)
|
129
129
|
overcommit (~> 0.57.0)
|
130
130
|
pry-byebug (~> 3.9)
|
131
131
|
rake (~> 13.0, >= 13.0.3)
|
132
|
-
reek (~> 6.0, >= 6.0.
|
132
|
+
reek (~> 6.0, >= 6.0.4)
|
133
133
|
rspec (~> 3.10)
|
134
|
-
rubocop (~> 1.
|
135
|
-
rubocop-performance (~> 1.
|
136
|
-
rubocop-rspec (~> 2.
|
134
|
+
rubocop (~> 1.14)
|
135
|
+
rubocop-performance (~> 1.11, >= 1.11.3)
|
136
|
+
rubocop-rspec (~> 2.3)
|
137
137
|
simplecov (~> 0.17.1)
|
138
138
|
truemail!
|
139
|
-
truemail-rspec (~> 0.
|
140
|
-
webmock (~> 3.12, >= 3.12.
|
139
|
+
truemail-rspec (~> 0.6)
|
140
|
+
webmock (~> 3.12, >= 3.12.2)
|
141
141
|
|
142
142
|
BUNDLED WITH
|
143
|
-
|
143
|
+
2.2.17
|