truemail 2.3.3 → 2.4.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9278c398836ba8731183142427f3fa0728e21d7661a08393c75a64ca33ceb88b
4
- data.tar.gz: 194d45d32a45e82bcb5443be004a0c13c9e1faafc576d3dc859d475171c1265c
3
+ metadata.gz: 18f3f900aa245bd6e49de6aa90c2f001970ed51207392e1247f54dfeb6982914
4
+ data.tar.gz: 955e3c20cd40e926ef35547a480a33a4bac508d8c07be97d60f3e36de67c79d1
5
5
  SHA512:
6
- metadata.gz: 15b3683a39653524897a7a291b9363dffe1c5b225db275c1739272139c0ede302da3b02bea4ce88b6612907ba25bf4b003c8bceca945ea0df06ba7a79f681f85
7
- data.tar.gz: 52758d413fa43e9e0aab0f3d1cad1a53f552cfaa5768813719bd868e0d46322357064a8a433446977fc52a2323936e38c3f646f2901e8cf87c253695c968c08a
6
+ metadata.gz: 3ff29c8e34d5f25e944a3f03d8a2e7e0190edcf79fcc9d672be5865009e722e11a83d0524d3d286284766b822c610646df061c1f44a11402d5dbf6e83dbafac2
7
+ data.tar.gz: ff9ece8c1278444922f2d8136e5a5c59dd60e1882067d27cb9d2ace3d9dfab5a5cfdbb45df37dd10d0586419a9a1d709971c96b8dee4824e05388b6cf70b6c86
@@ -3,14 +3,19 @@ version: 2.1
3
3
  defaults: &defaults
4
4
  working_directory: ~/truemail
5
5
  docker:
6
- - image: circleci/ruby:2.5.0-node
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.2
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: Install Code Climate Test Reporter
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 overcommit
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 tests
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: Code Climate Test Coverage
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
- path: /tmp/test-results
82
- destination: test-results
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-with-ruby:
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
- - tests
109
- - compatibility-with-ruby:
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
@@ -7,7 +7,7 @@ checks:
7
7
  plugins:
8
8
  rubocop:
9
9
  enabled: true
10
- channel: rubocop-1-12
10
+ channel: rubocop-1-16
11
11
 
12
12
  reek:
13
13
  enabled: true
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::Dns::Worker#nameserver_port
48
- - Truemail::Configuration#check_dns_settings
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
@@ -154,6 +154,15 @@ Style/HashConversion:
154
154
  Style/StringChars:
155
155
  Enabled: true
156
156
 
157
+ Style/InPatternThen:
158
+ Enabled: true
159
+
160
+ Style/MultilineInPatternThen:
161
+ Enabled: true
162
+
163
+ Style/QuotedSymbols:
164
+ Enabled: true
165
+
157
166
  Layout/LineLength:
158
167
  Max: 140
159
168
 
@@ -308,6 +317,9 @@ Lint/SymbolConversion:
308
317
  Lint/TripleQuotes:
309
318
  Enabled: true
310
319
 
320
+ Lint/EmptyInPattern:
321
+ Enabled: true
322
+
311
323
  Gemspec/DateAssignment:
312
324
  Enabled: true
313
325
 
@@ -356,6 +368,9 @@ Performance/RedundantEqualityComparisonBlock:
356
368
  Performance/RedundantSplitRegexpArgument:
357
369
  Enabled: true
358
370
 
371
+ Performance/MapCompact:
372
+ Enabled: true
373
+
359
374
  RSpec/ExampleLength:
360
375
  Enabled: false
361
376
 
@@ -385,3 +400,9 @@ RSpec/MultipleMemoizedHelpers:
385
400
 
386
401
  RSpec/StubbedMock:
387
402
  Enabled: false
403
+
404
+ RSpec/IdenticalEqualityAssertion:
405
+ Enabled: true
406
+
407
+ RSpec/Rails/AvoidSetupHook:
408
+ Enabled: true
data/CHANGELOG.md CHANGED
@@ -2,6 +2,71 @@
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.3] - 2021.06.15
6
+
7
+ ### Updated
8
+
9
+ - Updated gem development dependencies
10
+ - Updated Rubocop/Codeclimate config
11
+ - Updated gem documentation, version
12
+
13
+ ## [2.4.2] - 2021.05.13
14
+
15
+ ### Fixed
16
+
17
+ - Fixed security vulnerability for bundler ([CVE-2019-3881](https://github.com/advisories/GHSA-g98m-96g9-wfjq))
18
+ - Fixed test coverage issues
19
+
20
+ ### Updated
21
+
22
+ - Updated gem development dependencies
23
+ - Updated simplecov/CircleCi config
24
+ - Updated gem documentation, version
25
+
26
+ ## [2.4.1] - 2021.05.05
27
+
28
+ ### Updated
29
+
30
+ - `Truemail::Validate::MxBlacklist`, tests
31
+ - Updated gem development dependencies
32
+ - Updated gem documentation, version
33
+
34
+ ## [2.4.0] - 2021.04.28
35
+
36
+ ### Added
37
+
38
+ - 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.
39
+
40
+ ```ruby
41
+ Truemail.configure do |config|
42
+ # Optional parameter. With this option Truemail will filter out unwanted mx servers via
43
+ # predefined list of ip addresses. It can be used as a part of DEA (disposable email
44
+ # address) validations. It is equal to empty array by default.
45
+ config.blacklisted_mx_ip_addresses = ['1.1.1.1', '2.2.2.2']
46
+ end
47
+ ```
48
+
49
+ ### Changed
50
+
51
+ - Updated `Truemail::Core`, tests
52
+ - Updated `Truemail::Configuration`, tests
53
+ - Updated `Truemail::Validator`
54
+ - Updated `Truemail::Validate::Smtp`, tests
55
+ - Updated `Truemail::Log::Serializer::Base`, dependent tests
56
+ - Updated `Truemail::Log::Serializer::ValidatorText`, tests
57
+ - Updated gem development dependencies
58
+ - Updated gem documentation, changelog, version
59
+
60
+ ## [2.3.4] - 2021.04.16
61
+
62
+ ### Fixed
63
+
64
+ Fixed bug with impossibility to use valid dns port number. Now validation for dns port for range `1..65535` works as expected.
65
+
66
+ - Updated `Truemail::RegexConstant::REGEX_PORT_NUMBER`, tests
67
+ - Updated gem documentation
68
+ - CircleCI config moved to `.circleci/config.yml`
69
+
5
70
  ## [2.3.3] - 2021.04.14
6
71
 
7
72
  ### Changed
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- truemail (2.3.3)
4
+ truemail (2.4.3)
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.0.0)
17
+ childprocess (4.1.0)
18
18
  coderay (1.1.3)
19
19
  colorize (0.8.1)
20
- concurrent-ruby (1.1.8)
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.2.1)
25
- docile (1.3.5)
26
- faker (2.17.0)
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.57.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.0)
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.1)
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.3)
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.12.1)
78
+ rubocop (1.16.1)
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.2.0, < 2.0)
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.4.1)
87
- parser (>= 2.7.1.5)
88
- rubocop-performance (1.10.2)
89
- rubocop (>= 0.90.0, < 2.0)
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.2.0)
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.15.1)
96
- sexp_processor (~> 4.9)
97
- sexp_processor (4.15.2)
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.4.0)
107
- faker (~> 2.16)
107
+ truemail-rspec (0.6.0)
108
+ faker (~> 2.17)
108
109
  rspec (~> 3.10)
109
- truemail (>= 2.3)
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.12.2)
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
- ruby
121
+ x86_64-darwin-20
121
122
 
122
123
  DEPENDENCIES
123
- bundler (~> 1.16)
124
+ bundler (~> 2.2, >= 2.2.20)
124
125
  bundler-audit (~> 0.8.0)
125
- dns_mock (~> 1.2, >= 1.2.1)
126
- faker (~> 2.17)
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.57.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.3)
133
+ reek (~> 6.0, >= 6.0.4)
133
134
  rspec (~> 3.10)
134
- rubocop (~> 1.12, >= 1.12.1)
135
- rubocop-performance (~> 1.10, >= 1.10.2)
136
- rubocop-rspec (~> 2.2)
135
+ rubocop (~> 1.16, >= 1.16.1)
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.4)
140
- webmock (~> 3.12, >= 3.12.2)
140
+ truemail-rspec (~> 0.6)
141
+ webmock (~> 3.13)
141
142
 
142
143
  BUNDLED WITH
143
- 1.16.6
144
+ 2.2.20