truemail 1.5.1 → 1.8.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1e9e02894c33475d6d0120e3304a15bdd0d1d017458c12af327b595be290ac42
4
- data.tar.gz: 75da2935003cb1fe244083753d1d1b3ea5f935cd1a4511dff45ae97dd99b2140
3
+ metadata.gz: ce37fd460cb5da28f5880be61ac6abb5ca5e8d0fe1010738e45a02a70417fa31
4
+ data.tar.gz: 3f66bb5169a012e7bd77af80c40c51c021332cb86be4f2ef6f1450611001cebf
5
5
  SHA512:
6
- metadata.gz: ef2ee9b00968ce13e882ff16b3d73a830ff1d11ba4fdc53d8e4fb318a002fc8103df69c2ac8a27cf181e3dfcb82a6643521809a68a83edfa9fc1b68c6056a7a2
7
- data.tar.gz: 18da4be96e32a657bf2cc00f8b09ea71692ff1e1bbd9042f00ba992e8bee5f1c1e86ce3d07e966c5ffcaf52d0b00e87e86295aefe36e6d4a053473f9851626e1
6
+ metadata.gz: 4902f4e7d2c68cc8714c536ae1844904b99c7609a2b36d057902e6a838d2e2e33bb301f99b7cb067e108bb4bae845ec2e9dfbb9be529db8d53c9bf50a31dfdf9
7
+ data.tar.gz: f049315d919448d56d8082da28df31d1bc7ad6e191fc5b30629b38011ff4450f870fb7597a6bc4645007fe7bcbc4a7fa3b0855ee408f4115466e9a3496c926c8
data/.reek.yml CHANGED
@@ -26,6 +26,7 @@ detectors:
26
26
  Attribute:
27
27
  exclude:
28
28
  - Truemail::Configuration#whitelist_validation
29
+ - Truemail::Configuration#not_rfc_mx_lookup_flow
29
30
  - Truemail::Configuration#smtp_safe_check
30
31
  - Truemail::Wrapper#attempts
31
32
 
@@ -1,16 +1,166 @@
1
1
  # Changelog
2
+
2
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).
3
4
 
5
+ ## [1.8.0] - 2020.06.21
6
+
7
+ ## Added
8
+
9
+ Separated audit features for verifier host.
10
+
11
+ - `Truemail::Audit::Ip`
12
+ - `Truemail::Audit::Dns`
13
+
14
+ ```ruby
15
+ Truemail.host_audit
16
+
17
+ => #<Truemail::Auditor:0x00005580df358828
18
+ @result=
19
+ #<struct Truemail::Auditor::Result
20
+ current_host_ip="127.0.0.1",
21
+ warnings={
22
+ :dns=>"a record of verifier domain not refers to current host ip address",
23
+ :ptr=>"ptr record does not reference to current verifier domain"
24
+ },
25
+ configuration=
26
+ #<Truemail::Configuration:0x00005615e86327a8
27
+ @blacklisted_domains=[],
28
+ @connection_attempts=2,
29
+ @connection_timeout=2,
30
+ @default_validation_type=:smtp,
31
+ @email_pattern=/(?=\A.{6,255}\z)(\A([\p{L}0-9]+[\w|\-|\.|\+]*)@((?i-mx:[\p{L}0-9]+([\-\.]{1}[\p{L}0-9]+)*\.[\p{L}]{2,63}))\z)/,
32
+ @response_timeout=2,
33
+ @smtp_error_body_pattern=/(?=.*550)(?=.*(user|account|customer|mailbox)).*/i,
34
+ @not_rfc_mx_lookup_flow=false,
35
+ @smtp_safe_check=false,
36
+ @validation_type_by_domain={},
37
+ @verifier_domain="example.com",
38
+ @verifier_email="verifier@example.com",
39
+ @whitelist_validation=false,
40
+ @whitelisted_domains=[]>
41
+ ```
42
+
43
+ ### Changed
44
+
45
+ - `Truemail::Auditor`
46
+ - `Truemail::Auditor::Result`
47
+ - `Truemail::Audit::Base`
48
+ - `Truemail::Audit::Ptr`
49
+ - `Truemail::VERSION`
50
+ - gem documentation
51
+
52
+ ## [1.7.1] - 2020.05.10
53
+
54
+ ## Added
55
+
56
+ - Ability to show `not_rfc_mx_lookup_flow` attribute in serialized validation result
57
+
58
+ ```ruby
59
+ Truemail.validate('nonexistent_email@bestweb.com.ua').as_json
60
+
61
+ =>
62
+ # Serialized Truemail::Validator instance
63
+ {
64
+ "date": "2020-05-10 10:00:00 +0200",
65
+ "email": "nonexistent_email@bestweb.com.ua",
66
+ "validation_type": "smtp",
67
+ "success": false,
68
+ "errors": {
69
+ "smtp": "smtp error"
70
+ },
71
+ "smtp_debug": [
72
+ {
73
+ "mail_host": "213.180.193.89",
74
+ "port_opened": true,
75
+ "connection": true,
76
+ "errors": {
77
+ "rcptto": "550 5.7.1 No such user!\n"
78
+ }
79
+ }
80
+ ],
81
+ "configuration": {
82
+ "validation_type_by_domain": null,
83
+ "whitelist_validation": false,
84
+ "whitelisted_domains": null,
85
+ "blacklisted_domains": null,
86
+ "not_rfc_mx_lookup_flow": false,
87
+ "smtp_safe_check": false,
88
+ "email_pattern": "default gem value",
89
+ "smtp_error_body_pattern": "default gem value"
90
+ }
91
+ }
92
+ ```
93
+
94
+ ### Changed
95
+
96
+ - `Truemail::Log::Serializer::Base`
97
+ - `Truemail::VERSION`
98
+ - gem documentation
99
+
100
+ ## [1.7.0] - 2020.05.09
101
+
102
+ ## Added
103
+
104
+ - Ability to use not RFC MX lookup flow (MX and Null MX records will be checked on the DNS validation layer only)
105
+
106
+ ```ruby
107
+ Truemail.configure do |config|
108
+ # Optional parameter. This option will provide to use not RFC MX lookup flow.
109
+ # It means that MX and Null MX records will be cheked on the DNS validation layer only.
110
+ # By default this option is disabled.
111
+ config.not_rfc_mx_lookup_flow = true
112
+ end
113
+ ```
114
+
115
+ ### Changed
116
+
117
+ - `Truemail.configuration`
118
+ - `Truemail::Validate::Mx`
119
+ - `Truemail::VERSION`
120
+ - gem development dependencies
121
+ - gem documentation
122
+
123
+ ## [1.6.1] - 2020.03.23
124
+
125
+ ### Changed
126
+
127
+ - `Truemail.configuration`
128
+ - `Truemail::ArgumentError`
129
+ - `Truemail::Audit::Ptr`
130
+ - `Truemail::VERSION`
131
+ - gem development dependencies
132
+ - gem documentation
133
+
134
+ ### Removed
135
+
136
+ `Truemail::Configuration.retry_count` deprecated, and alias for this method has been removed. Please use `Truemail::Configuration.connection_attempts` instead.
137
+
138
+ ## [1.6.0] - 2020-02-01
139
+
140
+ ### Added
141
+
142
+ - Possibility to use `Truemail::Validator` instance represented as json directly
143
+
144
+ ### Changed
145
+
146
+ - gem development dependencies
147
+ - gem documentation
148
+
4
149
  ## [1.5.1] - 2020-01-20
150
+
5
151
  ### Changed
152
+
6
153
  - gem development dependencies
7
154
  - gem documentation
8
155
 
9
156
  ## [1.5.0] - 2019-12-29
157
+
10
158
  ### Added
159
+
11
160
  - Supporting of internationalized emails ([EAI](https://en.wikipedia.org/wiki/International_email)). Now you can validate emails, like: `dörte@sörensen.de`, `квіточка@пошта.укр`, `alegría@mañana.es`
12
161
 
13
162
  ### Changed
163
+
14
164
  - `Truemail::RegexConstant::REGEX_DOMAIN`
15
165
  - `Truemail::RegexConstant::REGEX_EMAIL_PATTERN`
16
166
  - `Truemail::Validator::Result`
@@ -22,22 +172,29 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
22
172
  - linters configs
23
173
 
24
174
  ## [1.4.2] - 2019-11-27
175
+
25
176
  ### Changed
177
+
26
178
  - `Truemail::Configuration`
27
179
  - gem development dependencies
28
180
  - linters configs
29
181
 
30
182
  ## [1.4.1] - 2019-11-20
183
+
31
184
  ### Changed
185
+
32
186
  - gem development dependencies
33
187
  - gem documentation
34
188
  - linters configs
35
189
 
36
190
  ### Removed
191
+
37
192
  - truemail rspec helpers (moved to independent gem [`truemail-rspec`](https://github.com/truemail-rb/truemail-rspec))
38
193
 
39
194
  ## [1.4.0] - 2019-10-28
195
+
40
196
  ### Added
197
+
41
198
  - Event logger (ability to output validation logs to stdout/file)
42
199
  - JSON serializer for validator instance
43
200
  - [Changelog](CHANGELOG.md)
@@ -65,6 +222,7 @@ Truemail::Log::Serializer::Json.call(Truemail.validate('nonexistent_email@bestwe
65
222
  ```
66
223
 
67
224
  ### Changed
225
+
68
226
  - `Truemail::Configuration`
69
227
  - `Truemail::Validator`
70
228
  - `Truemail::Validate::Regex`
@@ -73,11 +231,14 @@ Truemail::Log::Serializer::Json.call(Truemail.validate('nonexistent_email@bestwe
73
231
  - gem description
74
232
 
75
233
  ## [1.3.0] - 2019-09-16
234
+
76
235
  ### Added
236
+
77
237
  - Ability to create new `Truemail::Configuration` instance with block
78
238
  - `Truemail::Validate::Smtp::Request::Configuration`
79
239
 
80
240
  ### Changed
241
+
81
242
  - `Truemail::Wrapper`
82
243
  - `Truemail::Validate::Base`
83
244
  - `Truemail::Validator`
@@ -95,15 +256,20 @@ Truemail::Log::Serializer::Json.call(Truemail.validate('nonexistent_email@bestwe
95
256
  - gem description
96
257
 
97
258
  ## [1.2.1] - 2019-06-27
259
+
98
260
  ### Fixed
261
+
99
262
  - Removed memoization from ```DomainListMatch#whitelisted_domain?```
100
263
 
101
264
  ### Changed
265
+
102
266
  - `Truemail::VERSION`
103
267
  - gem documentation
104
268
 
105
269
  ## [1.2.0] - 2019-06-26
270
+
106
271
  ### Added
272
+
107
273
  - Configurable option: validation for whitelisted domains only.
108
274
 
109
275
  When email domain in whitelist and ```whitelist_validation``` is sets equal to ```true``` validation type will be passed to other validators. Validation of email which not contains whitelisted domain always will return ```false```.
@@ -148,11 +314,14 @@ Truemail.validate('email@domain.com', with: :regex)
148
314
  ```
149
315
 
150
316
  ### Changed
317
+
151
318
  - `Truemail::VERSION`
152
319
  - gem documentation
153
320
 
154
321
  ## [1.1.0] - 2019-06-18
322
+
155
323
  ### Added
324
+
156
325
  - Configurable default validation type, [issue details](https://github.com/rubygarage/truemail/issues/48)
157
326
 
158
327
  You can predefine default validation type for ```Truemail.validate('email@email.com')``` call without with-parameter. Available validation types: ```:regex```, ```:mx```, ```:smtp```. By default validation type still remains ```:smtp```
@@ -165,11 +334,14 @@ end
165
334
  ```
166
335
 
167
336
  ### Changed
337
+
168
338
  - `Truemail::VERSION`
169
339
  - gem documentation
170
340
 
171
341
  ## [1.0.1] - 2019-06-08
342
+
172
343
  ### Added
344
+
173
345
  - Result validation type marker for domain list match check
174
346
 
175
347
  ```ruby
@@ -199,11 +371,14 @@ Truemail.validate('email@black-domain.com')
199
371
  ```
200
372
 
201
373
  ### Changed
374
+
202
375
  - `Truemail::VERSION`
203
376
  - gem documentation
204
377
 
205
378
  ## [1.0] - 2019-06-04
379
+
206
380
  ### Added
381
+
207
382
  - Feature domain whitelist blacklist. Other validations will not processed even if it was defined in ```validation_type_for```.
208
383
 
209
384
  ```ruby
@@ -217,6 +392,7 @@ Truemail.configure do |config|
217
392
  config.blacklisted_domains = ['somedomain1.com', 'somedomain2.com']
218
393
  end
219
394
  ```
395
+
220
396
  and
221
397
 
222
398
  ```ruby
@@ -225,17 +401,22 @@ Truemail.configuration.blacklisted_domains = ['somedomain1.com', 'somedomain2.co
225
401
  ```
226
402
 
227
403
  ### Removed
404
+
228
405
  - ```:skip``` validation type for ```validation_type_for```
229
406
 
230
407
  ### Fixed
408
+
231
409
  - error key in `lower_snake_case`
232
410
 
233
411
  ### Changed
412
+
234
413
  - `Truemail::VERSION`
235
414
  - gem documentation
236
415
 
237
416
  ## [0.2] - 2019-05-23
417
+
238
418
  ### Added
419
+
239
420
  - skip validation by domain for validation_type_for configuration option:
240
421
 
241
422
  ```ruby
@@ -243,68 +424,93 @@ Truemail.configure do |config|
243
424
  config.validation_type_for = { 'somedomain.com' => :skip }
244
425
  end
245
426
  ```
427
+
246
428
  and
429
+
247
430
  ```ruby
248
431
  Truemail.configuration.validation_type_for = { 'somedomain.com' => :skip }
249
432
  ```
433
+
250
434
  ### Changed
435
+
251
436
  - `Truemail::VERSION`
252
437
  - gem documentation
253
438
 
254
439
  ## [0.1.10] - 2019-05-10
440
+
255
441
  ### Added
442
+
256
443
  - SMTP error body configurable option, [issue details](https://github.com/rubygarage/truemail/issues/19)
257
444
 
258
445
  ### Changed
446
+
259
447
  - `Truemail::VERSION`
260
448
  - gem documentation
261
449
 
262
450
  ## [0.1.9] - 2019-04-29
451
+
263
452
  ### Fixed
453
+
264
454
  - Empty ptr constant
265
455
 
266
456
  ## [0.1.8] - 2019-04-29
457
+
267
458
  ### Added
459
+
268
460
  - Reverse trace, [issue details](https://github.com/rubygarage/truemail/issues/18)
269
461
 
270
462
  ### Fixed
463
+
271
464
  - Behaviour of current host address resolver, [issue details](https://github.com/rubygarage/truemail/issues/18)
272
465
 
273
466
  ### Changed
467
+
274
468
  - `Truemail::VERSION`
275
469
  - gem documentation
276
470
 
277
471
  ## [0.1.7] - 2019-04-17
472
+
278
473
  ### Added
474
+
279
475
  - PTR record audit, [issue details](https://github.com/rubygarage/truemail/issues/18)
280
476
 
281
477
  ### Changed
478
+
282
479
  - `Truemail::VERSION`
283
480
  - gem documentation
284
481
 
285
482
  ## [0.1.6] - 2019-04-08
483
+
286
484
  ### Added
485
+
287
486
  - MX gem logic with [RFC 7505](https://tools.ietf.org/html/rfc7505), null MX record supporting, [issue details](https://github.com/rubygarage/truemail/issues/27)
288
487
  - [Contributing guideline](CONTRIBUTING.md)
289
488
 
290
489
  ### Fixed
490
+
291
491
  - Multihomed MX records supporting, [issue details](https://github.com/rubygarage/truemail/issues/28)
292
492
 
293
493
  ### Changed
494
+
294
495
  - `Truemail::VERSION`
295
496
  - gem documentation
296
497
 
297
498
  ## [0.1.5] - 2019-04-05
499
+
298
500
  ### Added
501
+
299
502
  - Retries for ```Truemail::Validate::Smtp``` for cases when one mx server
300
503
 
301
504
  ### Changed
505
+
302
506
  - ```Truemail::Configuration``` class, please use ```.connection_attempts``` instead ```.retry_count```
303
507
  - `Truemail::VERSION`
304
508
  - gem documentation
305
509
 
306
510
  ## [0.1.4] - 2019-04-01
511
+
307
512
  ### Added
513
+
308
514
  - Checking A record presence if ```MX``` and ```CNAME``` records not exist, [issue details](https://github.com/rubygarage/truemail/issues/10)
309
515
  - Handling of ```CNAME``` records, [issue details](https://github.com/rubygarage/truemail/issues/11)
310
516
  - Checking A record if ```MX``` and ```CNAME``` records not found, [issue details](https://github.com/rubygarage/truemail/issues/12)
@@ -313,14 +519,18 @@ Truemail.configuration.validation_type_for = { 'somedomain.com' => :skip }
313
519
  - ```.valid?``` helper
314
520
 
315
521
  ### Changed
522
+
316
523
  - `Truemail::VERSION`
317
524
  - gem documentation
318
525
 
319
526
  ## [0.1.3] - 2019-03-27
527
+
320
528
  ### Added
529
+
321
530
  - Independent domain name extractor to ```Truemail::Validate::Mx#run```
322
531
 
323
532
  ### Fixed
533
+
324
534
  - Default ```REGEX_EMAIL_PATTERN```, [issue details](https://github.com/rubygarage/truemail/issues/7)
325
535
  * local part of address can't start with a dot or special symbol
326
536
  * local part of address can include ```+``` symbol
@@ -329,11 +539,14 @@ Truemail.configuration.validation_type_for = { 'somedomain.com' => :skip }
329
539
  - Case sensitive domain names, [issue details](https://github.com/rubygarage/truemail/issues/9)
330
540
 
331
541
  ### Changed
542
+
332
543
  - `Truemail::VERSION`
333
544
  - gem documentation
334
545
 
335
546
  ## [0.1.0] - 2019-03-26
547
+
336
548
  ### Added
549
+
337
550
  - 'SMTP safe check' option for cases when SMTP server does not return an exact answer that the email does not exist.
338
551
 
339
552
  ```ruby
@@ -381,5 +594,6 @@ Truemail.validate('email@example.com')
381
594
  ```
382
595
 
383
596
  ### Changed
597
+
384
598
  - `Truemail::VERSION`
385
599
  - gem documentation