kch-dominion 0.0.4 → 0.0.5

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.
Files changed (3) hide show
  1. data/lib/dominion/domain_name.rb +2 -2
  2. data/var/tlds.dat +2299 -253
  3. metadata +19 -38
@@ -11,9 +11,9 @@ module Dominion
11
11
  @rules
12
12
  end
13
13
 
14
- # takes the path to a rule file in the format defined in http://publicsuffix.org/format/
14
+ # takes the path to a rule file in the format defined in http://publicsuffix.org/list/
15
15
  def self.load_rules_from_file(path)
16
- rules open(path).lines.reject { |s| s =~ %r[\A\s*(//.*)?\Z\n?] }.map { |s| DomainSuffixRule.new(s) }.sort << DomainSuffixRule.new("*")
16
+ rules open(path, "r:UTF-8").lines.reject { |s| s =~ %r[\A\s*(//.*)?\Z\n?] }.map { |s| DomainSuffixRule.new(s) }.sort << DomainSuffixRule.new("*")
17
17
  end
18
18
 
19
19
  # takes a domain string as argument; i.e. the hostname part of a URL