truemail 1.2.0 → 1.2.1

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: 0dcc1349ffc22296ae3af4dd04ce6b42501964ff1ca2072791d3e41320478d38
4
- data.tar.gz: 26e29784585ca4ca560f574d7cf60f23e9aa9300757f11a1567881efa826b53a
3
+ metadata.gz: bea26f52dfcf96b622b86b964aad8cca27ee059ed50dc5d2e24b55173ec7cdf7
4
+ data.tar.gz: 030f628c6102f3bd4bbb7fb05480850fef362528a5d7c56955d9bd0052e7c64e
5
5
  SHA512:
6
- metadata.gz: b51544bb6b74fe12510f1e008c1a2265ad4eb9fed77a4618025bccc22571c748d99d02ca8994504576b0011ca6064469f94b77c56f1d6dd4ed896cbb1c3f1929
7
- data.tar.gz: 260c8f3c1b2a7d0fdce382d325a510187e1c92ec7d658f2c12e04ef231186ed49a433de826fec5f2ef9c6a30076ba04abd8f29636a10cee2a25711ad0337178d
6
+ metadata.gz: d2f6e20972ded71818590c21b9cdc286594995d01db45d1974c653a9d4b59a8697731a2b7813bd1345e9122c0932bb381b8c32e9971e7a9922ba15b0f28b657e
7
+ data.tar.gz: e6134e62d76c3faddc9a88a6ff5f99715585dd1c5a1a5f62d360971bdfd4010129511c13f0b28712af79262b7dc8e8756f28e6b5f2003a7aa6c6489fba9c1bf7
@@ -7,6 +7,9 @@ AllCops:
7
7
  Metrics/LineLength:
8
8
  Max: 140
9
9
 
10
+ Metrics/ClassLength:
11
+ Max: 150
12
+
10
13
  Metrics/MethodLength:
11
14
  Max: 15
12
15
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- truemail (1.2.0)
4
+ truemail (1.2.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -30,7 +30,7 @@ Or install it yourself as:
30
30
 
31
31
  ## Email Validation Methods
32
32
 
33
- Email validation is a tricky thing. There are a number of different ways to validate an email address and all mechanisms must conform with the best practices and provide proper validation.
33
+ Email validation is a tricky thing. There are a number of different ways to validate an email address and all mechanisms must conform with the best practices and provide proper validation. You can get more information about email validation techniques in our [blog](https://rubygarage.org/blog/how-to-validate-emails).
34
34
 
35
35
  **Syntax Checking**: Checks the email addresses via regex pattern.
36
36
 
@@ -84,19 +84,23 @@ Truemail.configure do |config|
84
84
  # This configuration will be used over current or default validation type parameter
85
85
  # All of validations for 'somedomain.com' will be processed with regex validation only.
86
86
  # And all of validations for 'otherdomain.com' will be processed with mx validation only.
87
+ # It is equal to empty hash by default.
87
88
  config.validation_type_for = { 'somedomain.com' => :regex, 'otherdomain.com' => :mx }
88
89
 
89
90
  # Optional parameter. Validation of email which contains whitelisted domain always will
90
91
  # return true. Other validations will not processed even if it was defined in validation_type_for
92
+ # It is equal to empty array by default.
91
93
  config.whitelisted_domains = ['somedomain1.com', 'somedomain2.com']
92
94
 
93
95
  # Optional parameter. With this option Truemail will validate email which contains whitelisted
94
96
  # domain only, i.e. if domain whitelisted, validation will passed to Regex, MX or SMTP validators.
95
97
  # Validation of email which not contains whitelisted domain always will return false.
98
+ # It is equal false by default.
96
99
  config.whitelist_validation = true
97
100
 
98
101
  # Optional parameter. Validation of email which contains blacklisted domain always will
99
102
  # return false. Other validations will not processed even if it was defined in validation_type_for
103
+ # It is equal to empty array by default.
100
104
  config.blacklisted_domains = ['somedomain1.com', 'somedomain2.com']
101
105
 
102
106
  # Optional parameter. This option will be parse bodies of SMTP errors. It will be helpful
@@ -19,7 +19,7 @@ module Truemail
19
19
  end
20
20
 
21
21
  def whitelisted_domain?
22
- @whitelisted_domain ||= configuration.whitelisted_domains.include?(email_domain)
22
+ configuration.whitelisted_domains.include?(email_domain)
23
23
  end
24
24
 
25
25
  def whitelist_validation?
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Truemail
4
- VERSION = '1.2.0'
4
+ VERSION = '1.2.1'
5
5
  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: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vladislav Trotsenko
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-06-26 00:00:00.000000000 Z
11
+ date: 2019-06-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler