Skip to content

Commit

Permalink
Feature/Update base serializer attributes (#82)
Browse files Browse the repository at this point in the history
* Added ability to show not_rfc_mx_lookup_flow attribute in serialized validation result
* Updated Truemail::Log::Serializer::Base, tests/json schema
* Updated documentation
* Updated changelog
* Updated gem version
  • Loading branch information
bestwebua authored May 10, 2020
1 parent e703a56 commit 0bb4af9
Show file tree
Hide file tree
Showing 8 changed files with 392 additions and 217 deletions.
50 changes: 49 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,59 @@
# Changelog
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).

## [1.7.1] - 2020.05.10

## Added

- Ability to show `not_rfc_mx_lookup_flow` attribute in serialized validation result

```ruby
Truemail.validate('[email protected]').as_json

=>
# Serialized Truemail::Validator instance
{
"date": "2020-05-10 10:00:00 +0200",
"email": "[email protected]",
"validation_type": "smtp",
"success": false,
"errors": {
"smtp": "smtp error"
},
"smtp_debug": [
{
"mail_host": "213.180.193.89",
"port_opened": true,
"connection": true,
"errors": {
"rcptto": "550 5.7.1 No such user!\n"
}
}
],
"configuration": {
"validation_type_by_domain": null,
"whitelist_validation": false,
"whitelisted_domains": null,
"blacklisted_domains": null,
"not_rfc_mx_lookup_flow": false,
"smtp_safe_check": false,
"email_pattern": "default gem value",
"smtp_error_body_pattern": "default gem value"
}
}
```

### Changed

- `Truemail::Log::Serializer::Base`
- `Truemail::VERSION`
- gem documentation

## [1.7.0] - 2020.05.09

## Added

- Possibility to use not RFC MX lookup flow (MX and Null MX records will be checked on the DNS validation layer only)
- Ability to use not RFC MX lookup flow (MX and Null MX records will be checked on the DNS validation layer only)

```ruby
Truemail.configure do |config|
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
truemail (1.7.0)
truemail (1.7.1)
simpleidn (~> 0.1.1)

GEM
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -941,6 +941,7 @@ Truemail::Log::Serializer::Json.call(Truemail.validate('nonexistent_email@bestwe
"whitelist_validation": false,
"whitelisted_domains": null,
"blacklisted_domains": null,
"not_rfc_mx_lookup_flow": false,
"smtp_safe_check": false,
"email_pattern": "default gem value",
"smtp_error_body_pattern": "default gem value"
Expand Down Expand Up @@ -1026,7 +1027,7 @@ Truemail.validate('[email protected]').as_json
=>
# Serialized Truemail::Validator instance
{
"date": "2020-02-01 10:00:00 +0200",
"date": "2020-05-10 10:00:00 +0200",
"email": "[email protected]",
"validation_type": "smtp",
"success": false,
Expand All @@ -1048,6 +1049,7 @@ Truemail.validate('[email protected]').as_json
"whitelist_validation": false,
"whitelisted_domains": null,
"blacklisted_domains": null,
"not_rfc_mx_lookup_flow": false,
"smtp_safe_check": false,
"email_pattern": "default gem value",
"smtp_error_body_pattern": "default gem value"
Expand Down
1 change: 1 addition & 0 deletions lib/truemail/log/serializer/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ def configuration
whitelist_validation: validation_configuration.whitelist_validation,
whitelisted_domains: whitelisted_domains,
blacklisted_domains: blacklisted_domains,
not_rfc_mx_lookup_flow: validation_configuration.not_rfc_mx_lookup_flow,
smtp_safe_check: validation_configuration.smtp_safe_check,
email_pattern: email_pattern,
smtp_error_body_pattern: smtp_error_body_pattern
Expand Down
2 changes: 1 addition & 1 deletion lib/truemail/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Truemail
VERSION = '1.7.0'
VERSION = '1.7.1'
end
Loading

0 comments on commit 0bb4af9

Please sign in to comment.