Skip to content

Commit

Permalink
dont parse the domain list on each request
Browse files Browse the repository at this point in the history
  • Loading branch information
benbalter committed Nov 28, 2013
1 parent 4deb9f7 commit 2b7e78a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
gman (0.1.0)
gman (0.2.1)
addressable
email_veracity
public_suffix
Expand Down
2 changes: 1 addition & 1 deletion gman.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Gem::Specification.new do |s|
s.name = "gman"
s.summary = "Check if a given domain or email address belong to a governemnt entity"
s.description = "A ruby gem to check if the owner of a given email address is working for THE MAN."
s.version = "0.2.0"
s.version = "0.2.1"
s.authors = ["Ben Balter"]
s.email = "ben.balter@github.com"
s.homepage = "https://github.com/benbalter/gman"
Expand Down
2 changes: 1 addition & 1 deletion lib/gman.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def valid?(text, check_mx=false)
# returns an instance of our custom public suffix list
# list behaves like PublicSuffix::List but is limited to our whitelisted domains
def list
@list || PublicSuffix::List::parse( File.new(File.join(File.dirname(__FILE__), "domains.txt"), "r:utf-8"))
@list ||= PublicSuffix::List::parse( File.new(File.join(File.dirname(__FILE__), "domains.txt"), "r:utf-8"))
end

# Get the FQDN name from a URL or email address.
Expand Down

0 comments on commit 2b7e78a

Please sign in to comment.