truemail 2.4.1 → 2.4.2
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/.circleci/config.yml +37 -19
- data/CHANGELOG.md +13 -0
- data/Gemfile.lock +12 -12
- data/README.md +4 -3
- data/lib/truemail/log/serializer/base.rb +6 -6
- data/lib/truemail/version.rb +1 -1
- data/truemail.gemspec +4 -4
- metadata +16 -10
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
|
@@ -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/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,19 @@
|
|
|
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.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
|
+
|
|
5
18
|
## [2.4.1] - 2021.05.05
|
|
6
19
|
|
|
7
20
|
### Updated
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
truemail (2.4.
|
|
4
|
+
truemail (2.4.2)
|
|
5
5
|
simpleidn (~> 0.2.1)
|
|
6
6
|
|
|
7
7
|
GEM
|
|
@@ -21,8 +21,8 @@ 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.
|
|
24
|
+
dns_mock (1.2.3)
|
|
25
|
+
docile (1.4.0)
|
|
26
26
|
faker (2.17.0)
|
|
27
27
|
i18n (>= 1.6, < 2)
|
|
28
28
|
fasterer (0.9.0)
|
|
@@ -85,7 +85,7 @@ GEM
|
|
|
85
85
|
unicode-display_width (>= 1.4.0, < 3.0)
|
|
86
86
|
rubocop-ast (1.5.0)
|
|
87
87
|
parser (>= 3.0.1.1)
|
|
88
|
-
rubocop-performance (1.11.
|
|
88
|
+
rubocop-performance (1.11.3)
|
|
89
89
|
rubocop (>= 1.7.0, < 2.0)
|
|
90
90
|
rubocop-ast (>= 0.4.0)
|
|
91
91
|
rubocop-rspec (2.3.0)
|
|
@@ -103,10 +103,10 @@ GEM
|
|
|
103
103
|
simpleidn (0.2.1)
|
|
104
104
|
unf (~> 0.1.4)
|
|
105
105
|
thor (1.1.0)
|
|
106
|
-
truemail-rspec (0.
|
|
106
|
+
truemail-rspec (0.6.0)
|
|
107
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)
|
|
@@ -117,12 +117,12 @@ GEM
|
|
|
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 (~>
|
|
123
|
+
bundler (~> 2.2, >= 2.2.17)
|
|
124
124
|
bundler-audit (~> 0.8.0)
|
|
125
|
-
dns_mock (~> 1.2, >= 1.2.
|
|
125
|
+
dns_mock (~> 1.2, >= 1.2.3)
|
|
126
126
|
faker (~> 2.17)
|
|
127
127
|
fasterer (~> 0.9.0)
|
|
128
128
|
json_matchers (~> 0.11.1)
|
|
@@ -132,12 +132,12 @@ DEPENDENCIES
|
|
|
132
132
|
reek (~> 6.0, >= 6.0.4)
|
|
133
133
|
rspec (~> 3.10)
|
|
134
134
|
rubocop (~> 1.14)
|
|
135
|
-
rubocop-performance (~> 1.11, >= 1.11.
|
|
135
|
+
rubocop-performance (~> 1.11, >= 1.11.3)
|
|
136
136
|
rubocop-rspec (~> 2.3)
|
|
137
137
|
simplecov (~> 0.17.1)
|
|
138
138
|
truemail!
|
|
139
|
-
truemail-rspec (~> 0.
|
|
139
|
+
truemail-rspec (~> 0.6)
|
|
140
140
|
webmock (~> 3.12, >= 3.12.2)
|
|
141
141
|
|
|
142
142
|
BUNDLED WITH
|
|
143
|
-
|
|
143
|
+
2.2.17
|
data/README.md
CHANGED
|
@@ -178,11 +178,12 @@ Truemail.configure do |config|
|
|
|
178
178
|
|
|
179
179
|
# Optional parameter. You can predefine default validation type for
|
|
180
180
|
# Truemail.validate('email@email.com') call without with-parameter
|
|
181
|
-
# Available validation types: :regex, :mx, :smtp
|
|
181
|
+
# Available validation types: :regex, :mx, :mx_blacklist, :smtp
|
|
182
182
|
config.default_validation_type = :mx
|
|
183
183
|
|
|
184
184
|
# Optional parameter. You can predefine which type of validation will be used for domains.
|
|
185
|
-
# Also you can skip validation by domain.
|
|
185
|
+
# Also you can skip validation by domain.
|
|
186
|
+
# Available validation types: :regex, :mx, :mx_blacklist, :smtp
|
|
186
187
|
# This configuration will be used over current or default validation type parameter
|
|
187
188
|
# All of validations for 'somedomain.com' will be processed with regex validation only.
|
|
188
189
|
# And all of validations for 'otherdomain.com' will be processed with mx validation only.
|
|
@@ -222,7 +223,7 @@ Truemail.configure do |config|
|
|
|
222
223
|
config.not_rfc_mx_lookup_flow = true
|
|
223
224
|
|
|
224
225
|
# Optional parameter. This option will provide to use smtp fail fast behaviour. When
|
|
225
|
-
# smtp_fail_fast = true it means that
|
|
226
|
+
# smtp_fail_fast = true it means that Truemail ends smtp validation session after first
|
|
226
227
|
# attempt on the first mx server in any fail cases (network connection/timeout error,
|
|
227
228
|
# smtp validation error). This feature helps to reduce total time of SMTP validation
|
|
228
229
|
# session up to 1 second. By default this option is disabled.
|
|
@@ -40,20 +40,20 @@ module Truemail
|
|
|
40
40
|
|
|
41
41
|
Truemail::Log::Serializer::Base::CONFIGURATION_ARRAY_ATTRS.each do |method|
|
|
42
42
|
define_method(method) do
|
|
43
|
-
|
|
44
|
-
return if
|
|
45
|
-
|
|
43
|
+
executor_configuration_attr = executor_configuration.public_send(method)
|
|
44
|
+
return if executor_configuration_attr.empty?
|
|
45
|
+
executor_configuration_attr
|
|
46
46
|
end
|
|
47
47
|
end
|
|
48
48
|
|
|
49
49
|
Truemail::Log::Serializer::Base::CONFIGURATION_REGEX_ATTRS.each do |method|
|
|
50
50
|
define_method(method) do
|
|
51
|
-
|
|
51
|
+
executor_configuration_attr = executor_configuration.public_send(method)
|
|
52
52
|
default_pattern = Truemail::RegexConstant.const_get(
|
|
53
53
|
(method.eql?(:email_pattern) ? :regex_email_pattern : :regex_smtp_error_body_pattern).upcase
|
|
54
54
|
)
|
|
55
|
-
return Truemail::Log::Serializer::Base::DEFAULT_GEM_VALUE if
|
|
56
|
-
|
|
55
|
+
return Truemail::Log::Serializer::Base::DEFAULT_GEM_VALUE if executor_configuration_attr.eql?(default_pattern)
|
|
56
|
+
executor_configuration_attr
|
|
57
57
|
end
|
|
58
58
|
end
|
|
59
59
|
|
data/lib/truemail/version.rb
CHANGED
data/truemail.gemspec
CHANGED
|
@@ -33,9 +33,9 @@ Gem::Specification.new do |spec|
|
|
|
33
33
|
|
|
34
34
|
spec.add_runtime_dependency 'simpleidn', '~> 0.2.1'
|
|
35
35
|
|
|
36
|
-
spec.add_development_dependency 'bundler', '~>
|
|
36
|
+
spec.add_development_dependency 'bundler', '~> 2.2', '>= 2.2.17'
|
|
37
37
|
spec.add_development_dependency 'bundler-audit', '~> 0.8.0'
|
|
38
|
-
spec.add_development_dependency 'dns_mock', '~> 1.2', '>= 1.2.
|
|
38
|
+
spec.add_development_dependency 'dns_mock', '~> 1.2', '>= 1.2.3'
|
|
39
39
|
spec.add_development_dependency 'faker', '~> 2.17'
|
|
40
40
|
spec.add_development_dependency 'fasterer', '~> 0.9.0'
|
|
41
41
|
spec.add_development_dependency 'json_matchers', '~> 0.11.1'
|
|
@@ -45,9 +45,9 @@ Gem::Specification.new do |spec|
|
|
|
45
45
|
spec.add_development_dependency 'reek', '~> 6.0', '>= 6.0.4'
|
|
46
46
|
spec.add_development_dependency 'rspec', '~> 3.10'
|
|
47
47
|
spec.add_development_dependency 'rubocop', '~> 1.14'
|
|
48
|
-
spec.add_development_dependency 'rubocop-performance', '~> 1.11', '>= 1.11.
|
|
48
|
+
spec.add_development_dependency 'rubocop-performance', '~> 1.11', '>= 1.11.3'
|
|
49
49
|
spec.add_development_dependency 'rubocop-rspec', '~> 2.3'
|
|
50
50
|
spec.add_development_dependency 'simplecov', '~> 0.17.1'
|
|
51
|
-
spec.add_development_dependency 'truemail-rspec', '~> 0.
|
|
51
|
+
spec.add_development_dependency 'truemail-rspec', '~> 0.6'
|
|
52
52
|
spec.add_development_dependency 'webmock', '~> 3.12', '>= 3.12.2'
|
|
53
53
|
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.
|
|
4
|
+
version: 2.4.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: 2021-05-
|
|
11
|
+
date: 2021-05-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: simpleidn
|
|
@@ -30,14 +30,20 @@ dependencies:
|
|
|
30
30
|
requirements:
|
|
31
31
|
- - "~>"
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: '
|
|
33
|
+
version: '2.2'
|
|
34
|
+
- - ">="
|
|
35
|
+
- !ruby/object:Gem::Version
|
|
36
|
+
version: 2.2.17
|
|
34
37
|
type: :development
|
|
35
38
|
prerelease: false
|
|
36
39
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
40
|
requirements:
|
|
38
41
|
- - "~>"
|
|
39
42
|
- !ruby/object:Gem::Version
|
|
40
|
-
version: '
|
|
43
|
+
version: '2.2'
|
|
44
|
+
- - ">="
|
|
45
|
+
- !ruby/object:Gem::Version
|
|
46
|
+
version: 2.2.17
|
|
41
47
|
- !ruby/object:Gem::Dependency
|
|
42
48
|
name: bundler-audit
|
|
43
49
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -61,7 +67,7 @@ dependencies:
|
|
|
61
67
|
version: '1.2'
|
|
62
68
|
- - ">="
|
|
63
69
|
- !ruby/object:Gem::Version
|
|
64
|
-
version: 1.2.
|
|
70
|
+
version: 1.2.3
|
|
65
71
|
type: :development
|
|
66
72
|
prerelease: false
|
|
67
73
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -71,7 +77,7 @@ dependencies:
|
|
|
71
77
|
version: '1.2'
|
|
72
78
|
- - ">="
|
|
73
79
|
- !ruby/object:Gem::Version
|
|
74
|
-
version: 1.2.
|
|
80
|
+
version: 1.2.3
|
|
75
81
|
- !ruby/object:Gem::Dependency
|
|
76
82
|
name: faker
|
|
77
83
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -219,7 +225,7 @@ dependencies:
|
|
|
219
225
|
version: '1.11'
|
|
220
226
|
- - ">="
|
|
221
227
|
- !ruby/object:Gem::Version
|
|
222
|
-
version: 1.11.
|
|
228
|
+
version: 1.11.3
|
|
223
229
|
type: :development
|
|
224
230
|
prerelease: false
|
|
225
231
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -229,7 +235,7 @@ dependencies:
|
|
|
229
235
|
version: '1.11'
|
|
230
236
|
- - ">="
|
|
231
237
|
- !ruby/object:Gem::Version
|
|
232
|
-
version: 1.11.
|
|
238
|
+
version: 1.11.3
|
|
233
239
|
- !ruby/object:Gem::Dependency
|
|
234
240
|
name: rubocop-rspec
|
|
235
241
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -264,14 +270,14 @@ dependencies:
|
|
|
264
270
|
requirements:
|
|
265
271
|
- - "~>"
|
|
266
272
|
- !ruby/object:Gem::Version
|
|
267
|
-
version: '0.
|
|
273
|
+
version: '0.6'
|
|
268
274
|
type: :development
|
|
269
275
|
prerelease: false
|
|
270
276
|
version_requirements: !ruby/object:Gem::Requirement
|
|
271
277
|
requirements:
|
|
272
278
|
- - "~>"
|
|
273
279
|
- !ruby/object:Gem::Version
|
|
274
|
-
version: '0.
|
|
280
|
+
version: '0.6'
|
|
275
281
|
- !ruby/object:Gem::Dependency
|
|
276
282
|
name: webmock
|
|
277
283
|
requirement: !ruby/object:Gem::Requirement
|