email_address 0.1.14 → 0.1.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/email_address/address.rb +1 -1
- data/lib/email_address/host.rb +4 -4
- data/lib/email_address/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: af93d7667f03ada0b8a4a533e6adf19416079db72e1e152fd96fa1e851da0b27
|
4
|
+
data.tar.gz: '06938a36efdfe7dc827e7f210e71f5d44431763a8d35b650aa6d39b69f280790'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 98c07c4589f2bd1ada9ef41f0aa7c5069ddaf60ce721e7e07a0384c8a535686ad32b6d574128122c3fec866072cbc8dad105e11eca14c075d2cd2c655daacb06
|
7
|
+
data.tar.gz: 79677817c08933c78fb0d25b631568e894c2d0c7fb9e20f7c71a871d4f8f7a698722d962887017705b4423be8f569d20632f0b60bb333ec7a77592d82c7a8c26
|
data/lib/email_address/host.rb
CHANGED
@@ -235,7 +235,7 @@ module EmailAddress
|
|
235
235
|
def parts
|
236
236
|
{host_name: host_name, dns_name: dns_name, subdomain: subdomains,
|
237
237
|
registration_name: registration_name, domain_name: domain_name,
|
238
|
-
tld2: tld2, tld: tld, ip_address: ip_address}
|
238
|
+
tld2: tld2, tld: tld, ip_address: ip_address,}
|
239
239
|
end
|
240
240
|
|
241
241
|
############################################################################
|
@@ -286,7 +286,7 @@ module EmailAddress
|
|
286
286
|
|
287
287
|
# Does "example." match any tld?
|
288
288
|
def registration_name_matches?(rule)
|
289
|
-
"#{registration_name}."
|
289
|
+
rule == "#{registration_name}."
|
290
290
|
end
|
291
291
|
|
292
292
|
# Does "sub.example.com" match ".com" and ".example.com" top level names?
|
@@ -450,9 +450,9 @@ module EmailAddress
|
|
450
450
|
if !@config[:host_allow_ip]
|
451
451
|
bool = set_error(:ip_address_forbidden)
|
452
452
|
elsif ip_address.include?(":")
|
453
|
-
bool = Resolv::IPv6::Regex
|
453
|
+
bool = ip_address.match(Resolv::IPv6::Regex) ? true : set_error(:ipv6_address_invalid)
|
454
454
|
elsif ip_address.include?(".")
|
455
|
-
bool = Resolv::IPv4::Regex
|
455
|
+
bool = ip_address.match(Resolv::IPv4::Regex) ? true : set_error(:ipv4_address_invalid)
|
456
456
|
end
|
457
457
|
if bool && (localhost? && !@config[:host_local])
|
458
458
|
bool = set_error(:ip_address_no_localhost)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: email_address
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Allen Fair
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-03-
|
11
|
+
date: 2020-03-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -183,7 +183,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
183
183
|
- !ruby/object:Gem::Version
|
184
184
|
version: '0'
|
185
185
|
requirements: []
|
186
|
-
rubygems_version: 3.
|
186
|
+
rubygems_version: 3.1.2
|
187
187
|
signing_key:
|
188
188
|
specification_version: 4
|
189
189
|
summary: This gem provides a ruby language library for working with and validating
|