README.md in truemail-0.2.0 vs README.md in truemail-1.0.0

- old
+ new

@@ -6,10 +6,11 @@ ## Features - Configurable validator, validate only what you need - Zero runtime dependencies +- Has whitelist/blacklist - Has simple SMTP debugger - 100% test coverage ## Installation @@ -72,15 +73,23 @@ # This parameter uses in mx lookup timeout error and smtp request (for cases when # there is one mx server). config.connection_attempts = 3 # Optional parameter. You can predefine which type of validation will be used for domains. - # Also you can skip validation by domain. Available validation types: :regex, :mx, :smtp, :skip + # Also you can skip validation by domain. Available validation types: :regex, :mx, :smtp # This configuration will be used over current or default validation type parameter # All of validations for 'somedomain.com' will be processed with mx validation only - config.validation_type_for = { 'somedomain.com' => :mx, 'otherdomain.com' => :skip } + config.validation_type_for = { 'somedomain.com' => :regex, 'otherdomain.com' => :mx } + # Optional parameter. Validation of email which contains whitelisted domain always will + # return true. Other validations will not processed even if it was defined in validation_type_for + config.whitelisted_domains = ['somedomain1.com', 'somedomain2.com'] + + # Optional parameter. Validation of email which contains whitelisted domain always will + # return false. Other validations will not processed even if it was defined in validation_type_for + config.blacklisted_domains = ['somedomain1.com', 'somedomain2.com'] + # Optional parameter. This option will be parse bodies of SMTP errors. It will be helpful # if SMTP server does not return an exact answer that the email does not exist # By default this option is disabled, available for SMTP validation only. config.smtp_safe_check = true end @@ -98,10 +107,12 @@ @email_pattern=/regex_pattern/, @smtp_error_body_pattern=/regex_pattern/, @response_timeout=1, @connection_attempts=3, @validation_type_by_domain={}, + @whitelisted_domains=[], + @blacklisted_domains=[], @verifier_domain="somedomain.com", @verifier_email="verifier@example.com" @smtp_safe_check=true> ``` @@ -121,10 +132,12 @@ @email_pattern=/regex_pattern/, @smtp_error_body_pattern=/regex_pattern/, @response_timeout=4, @connection_attempts=1, @validation_type_by_domain={}, + @whitelisted_domains=[], + @blacklisted_domains=[], @verifier_domain="somedomain.com", @verifier_email="verifier@example.com", @smtp_safe_check=true> ``` @@ -279,10 +292,12 @@ @smtp_error_body_pattern=/regex_pattern/, @response_timeout=2, @connection_attempts=2, @smtp_safe_check=false, @validation_type_by_domain={}, + @whitelisted_domains=[], + @blacklisted_domains=[], @verifier_domain="example.com", @verifier_email="verifier@example.com">, @email="email@example.com", @host="127.0.1.1", @attempts=nil, @@ -333,10 +348,12 @@ @smtp_error_body_pattern=/regex_pattern/, @response_timeout=2, @connection_attempts=2, @smtp_safe_check=true, @validation_type_by_domain={}, + @whitelisted_domains=[], + @blacklisted_domains=[], @verifier_domain="example.com", @verifier_email="verifier@example.com">, @email="email@example.com", @host="127.0.1.1", @attempts=nil, @@ -371,10 +388,12 @@ @smtp_error_body_pattern=/regex_pattern/, @response_timeout=2, @connection_attempts=2, @smtp_safe_check=true, @validation_type_by_domain={}, + @whitelisted_domains=[], + @blacklisted_domains=[], @verifier_domain="example.com", @verifier_email="verifier@example.com">, @email="email@example.com", @host="127.0.1.1", @attempts=nil, @@ -445,11 +464,10 @@ ``` --- ## ToDo -1. Gem compatibility with Ruby 2.3 -2. Fail validations logger +Fail validations logger ## Contributing Bug reports and pull requests are welcome on GitHub at https://github.com/rubygarage/truemail. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct. Please check the [open tikets](https://github.com/rubygarage/truemail/issues). Be shure to follow Contributor Code of Conduct below and our [Contributing Guidelines](CONTRIBUTING.md).