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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2f3decf66b46d08f8a8f3528ad331cfb009f7dfa302b8f887558bb535e189210
4
- data.tar.gz: a5aac0f73f92ae103cada5c57b5f51a7efb968752dfe5ab8710b72a52705c98a
3
+ metadata.gz: af93d7667f03ada0b8a4a533e6adf19416079db72e1e152fd96fa1e851da0b27
4
+ data.tar.gz: '06938a36efdfe7dc827e7f210e71f5d44431763a8d35b650aa6d39b69f280790'
5
5
  SHA512:
6
- metadata.gz: 6acd7e0c108cadaa5be29dc0d843c3d12311d96791f79130b6c1ed2a1e26c3e3c2838f40034504d74bd2717dd35947e789c39c72fd0c7470aaefec23167983c8
7
- data.tar.gz: bf7f061c707cac898ca51fd4bb8a697ad0c491be4a3119ded9c836e9ef8257ad3c513a2562c9803b415bbea8e747e5ae8c54805c00b03cfd4825a7b2754a5229
6
+ metadata.gz: 98c07c4589f2bd1ada9ef41f0aa7c5069ddaf60ce721e7e07a0384c8a535686ad32b6d574128122c3fec866072cbc8dad105e11eca14c075d2cd2c655daacb06
7
+ data.tar.gz: 79677817c08933c78fb0d25b631568e894c2d0c7fb9e20f7c71a871d4f8f7a698722d962887017705b4423be8f569d20632f0b60bb333ec7a77592d82c7a8c26
@@ -215,7 +215,7 @@ module EmailAddress
215
215
 
216
216
  # Does "root@*.com" match "root@example.com" domain name
217
217
  rules.each do |r|
218
- if /.+@.+/.match?(r)
218
+ if r.match(/.+@.+/)
219
219
  return r if File.fnmatch?(r, to_s)
220
220
  end
221
221
  end
@@ -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}." == rule
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.match?(ip_address) ? true : set_error(:ipv6_address_invalid)
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.match?(ip_address) ? true : set_error(:ipv4_address_invalid)
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)
@@ -1,3 +1,3 @@
1
1
  module EmailAddress
2
- VERSION = "0.1.14"
2
+ VERSION = "0.1.15"
3
3
  end
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.14
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-17 00:00:00.000000000 Z
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.0.6
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