truemail 2.4.5 → 2.4.6

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: ab60bc15dde3624894487439f95781eb83a963954b32370f1f64a4a750ce2895
4
- data.tar.gz: cf9ebab60730796e864bd5a0626bf66162b46060d475aaf6d38536f7307d7e09
3
+ metadata.gz: 5b2201740b5ebff1faab259b9fc6f824c3a1d35ae09c7e39ad1a12ec669acfaa
4
+ data.tar.gz: ee1d67e7ce06d83f314f0e1bb3cb74c184ce5299e25d1dcc8303f34d07121e9f
5
5
  SHA512:
6
- metadata.gz: 690463e2659813d51b72bdb29e8ae543395f4b8d8c42dbe2d2b4e47d32391a3eab7118911a968c1801afc55078420d9968b1af96dc86bf902a5326fad2a2034e
7
- data.tar.gz: 7cdc49f89121810be4623cb1cd00a9ba29aa9ef0b2f73e0ab7ea87da20ddc8c9273876223923948cba63616e4d29fa298175b525dcca1b46897b00fad712621a
6
+ metadata.gz: d778d06f21cd3c6fac2fc346ef576a060e47f502e1f83d1c06533c2857785f7589b85a0762cd0692ad18b0520cb44531840821dd986eb1ff3d687b90e524ac7f
7
+ data.tar.gz: d493f1b19593721bf6d7c86c2a7534a4a6a856642a095b213746b44a4e7e4c99e1cde52d6f026bdbdbd1613176edfad904497159bd8e5756729d5b7e162a64ad
data/CHANGELOG.md CHANGED
@@ -2,6 +2,17 @@
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.6] - 2021.07.10
6
+
7
+ ### Fixed
8
+
9
+ - Wrong domain punycode extraction in DNS validation layer
10
+
11
+ ### Updated
12
+
13
+ - Updated gem codebase, restored `Truemail::RegexConstant::REGEX_DOMAIN_FROM_EMAIL`
14
+ - Updated tests
15
+
5
16
  ## [2.4.5] - 2021.07.09
6
17
 
7
18
  ### Removed
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- truemail (2.4.5)
4
+ truemail (2.4.6)
5
5
  simpleidn (~> 0.2.1)
6
6
 
7
7
  GEM
data/lib/truemail/core.rb CHANGED
@@ -22,6 +22,7 @@ module Truemail
22
22
  REGEX_DOMAIN = /[\p{L}0-9]+([\-.]{1}[\p{L}0-9]+)*\.\p{L}{2,63}/i.freeze
23
23
  REGEX_EMAIL_PATTERN = /(?=\A.{6,255}\z)(\A([\p{L}0-9]+[\W\w]*)@(#{REGEX_DOMAIN})\z)/.freeze
24
24
  REGEX_DOMAIN_PATTERN = /(?=\A.{4,255}\z)(\A#{REGEX_DOMAIN}\z)/.freeze
25
+ REGEX_DOMAIN_FROM_EMAIL = /\A.+@(.+)\z/.freeze
25
26
  REGEX_SMTP_ERROR_BODY_PATTERN = /(?=.*550)(?=.*(user|account|customer|mailbox)).*/i.freeze
26
27
  REGEX_IP_ADDRESS = /((1\d|[1-9]|2[0-4])?\d|25[0-5])(\.\g<1>){3}/.freeze
27
28
  REGEX_IP_ADDRESS_PATTERN = /\A#{REGEX_IP_ADDRESS}\z/.freeze
@@ -15,7 +15,7 @@ module Truemail
15
15
  private
16
16
 
17
17
  def email_domain
18
- @email_domain ||= result.email[Truemail::RegexConstant::REGEX_EMAIL_PATTERN, 3]
18
+ @email_domain ||= result.email[Truemail::RegexConstant::REGEX_DOMAIN_FROM_EMAIL, 1]
19
19
  end
20
20
 
21
21
  def whitelisted_domain?
@@ -53,8 +53,8 @@ module Truemail
53
53
 
54
54
  def domain
55
55
  @domain ||= begin
56
- result.domain = result.email[Truemail::RegexConstant::REGEX_EMAIL_PATTERN, 3]
57
- result.punycode_email[Truemail::RegexConstant::REGEX_EMAIL_PATTERN, 3]
56
+ result.domain = result.email[Truemail::RegexConstant::REGEX_DOMAIN_FROM_EMAIL, 1]
57
+ result.punycode_email[Truemail::RegexConstant::REGEX_DOMAIN_FROM_EMAIL, 1]
58
58
  end
59
59
  end
60
60
 
@@ -50,7 +50,7 @@ module Truemail
50
50
  REQUEST_PARAMS = %i[connection_timeout response_timeout verifier_domain verifier_email].freeze
51
51
 
52
52
  def initialize(configuration)
53
- REQUEST_PARAMS.each do |attribute|
53
+ Truemail::Validate::Smtp::Request::Configuration::REQUEST_PARAMS.each do |attribute|
54
54
  self.class.class_eval { attr_reader attribute }
55
55
  instance_variable_set(:"@#{attribute}", configuration.public_send(attribute))
56
56
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Truemail
4
- VERSION = '2.4.5'
4
+ VERSION = '2.4.6'
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: 2.4.5
4
+ version: 2.4.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vladislav Trotsenko
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-07-09 00:00:00.000000000 Z
11
+ date: 2021-07-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: simpleidn