naughty_or_nice 2.0.1 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0a1a51677d392c3dfab9d61e90e3cac2ed8c7a61
4
- data.tar.gz: a95cc3ec32d7c79030d4e53a759f4f4a4b50d8ae
3
+ metadata.gz: 9c399a91caa2bee04c314ade13bbd8ffde58c92a
4
+ data.tar.gz: 87a27c60c85e5d83779d3741cb49e1dedecc95dd
5
5
  SHA512:
6
- metadata.gz: d6e68909600b2ee35bce30da2bef6f63bfc22562b0882dfeae6e0b5a4d455531277d1f4b70cad4336539b8f52c7d5e4db1088d66fedfb6a8989587ddfe19f548
7
- data.tar.gz: 6dca7226565cc7b1512c38d7a28214f106064ba7b421b725bed8097688cdf6cae16de09a636c25e6c809bd69ae2e143fab60a07b2009af2b493603b3b5f82dbb
6
+ metadata.gz: 3f870a6c26daea2e31c516197b81db790f0290628d6e0954ed70d0a9b2ef954c80d4607c135277c46bf837b3526b97c960a3e5428ce77299a5529d75c0f62673
7
+ data.tar.gz: 4e885f710f2cf71b2155a4ecc9b3c46651976938d179b03fde50bde94544c2fd395243f0944d7ad080b55acebf27786ece8059b33799b0d38b0ac132bf958b62
@@ -1,3 +1,3 @@
1
1
  module NaughtyOrNice
2
- VERSION = "2.0.1"
2
+ VERSION = "2.0.2"
3
3
  end
@@ -69,9 +69,13 @@ module NaughtyOrNice
69
69
  #
70
70
  # Returns the domain object or nil, but no errors, never an error
71
71
  def domain
72
- @domain ||= PublicSuffix.parse(domain_text)
73
- rescue PublicSuffix::DomainInvalid, PublicSuffix::DomainNotAllowed
74
- nil
72
+ return @domain if defined? @domain
73
+
74
+ @domain = begin
75
+ PublicSuffix.parse(domain_text)
76
+ rescue PublicSuffix::DomainInvalid, PublicSuffix::DomainNotAllowed
77
+ nil
78
+ end
75
79
  end
76
80
 
77
81
  # Checks if the input string represents a valid domain
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: naughty_or_nice
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Balter
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-09 00:00:00.000000000 Z
11
+ date: 2015-09-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: public_suffix
@@ -113,7 +113,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
113
113
  version: '0'
114
114
  requirements: []
115
115
  rubyforge_project:
116
- rubygems_version: 2.2.3
116
+ rubygems_version: 2.4.8
117
117
  signing_key:
118
118
  specification_version: 4
119
119
  summary: You've made the list. We'll help you check it twice. Given a domain-like