This new version includes a major redesign of the library internals, with the goal to drastically improve the lookup time while reducing storage space.
For this reason, several public methods that are no longer applicable have been deprecated and/or removed. You can find more information at GH-133.
PublicSuffix::List#rules
is now protected. You should not rely on it as the internal rule representation is subject to change to optimize performances.PublicSuffix::List.clear
, it was an unnecessary accessor method. Use PublicSuffix::List.default = nil
if you really need to reset the default list. You shouldn't.PublicSuffix::List#select
is now private. You should not use it, instead use PublicSuffix::List#find
.PublicSuffix::List
no longer implements Enumerable. Instead, use #each
to loop over, or get an Enumerator.FIXED: Fix a bug that caused the GEM to be published with the wrong version number in the gemspec (GH-121).
CHANGED: Updated definitions.
NEW: Added the ability to disable the use of private domains either at runtime, in addition to the ability to not load the private domains section when reading the list (private_domains: false
). This feature also superseded the private_domains
class-level attribute, that is no longer available.
CHANGED: Considerable performance improvements (GH-92)
PublicSuffix.parse
or PublicSuffix.list
private_domains
class-level attribute. It is replaced by the private_domains: false
option in the list parse method.CHANGED: The default list now assumes you use UTF-8 for reading the input (GH-94),
REMOVED: Removed futile utility helpers such as Domain#rule
, Domain#is_a_domain?
, Domain#is_a_subdomain?
, Domain#valid?
. You can easily obtain the same result by having a custom method that reconstructs the logic, and/or calling PublicSuffix.{domain|parse}(domain.to_s)
.
FIXED: Don't duplicate rule indices when creating index (GH-77). [Thanks @ags]
CHANGED: Updated definitions.
FIXED: Ignore case for parsing and validating (GH-62)
CHANGED: Updated definitions.
CHANGED: Dropped support for Ruby < 2.0
CHANGED: Updated definitions.
CHANGED: Moved the definitions in the lib folder.
CHANGED: Updated definitions.
NEW: Ability to skip Private Domains (GH-28). [Thanks @rb2k]
CHANGED: Updated definitions.
NEW: Allow a custom List on PublicSuffix.parse
(GH-26). [Thanks @itspriddle]
FIXED: PublicSuffix.parse and PublicSuffix.valid? crashes when input is nil (GH-20).
CHANGED: Updated definitions.
FIXED: #valid? and #parse consider URIs as valid domains (GH-15)
CHANGED: Updated definitions.
CHANGED: Removed deprecatd PublicSuffixService::RuleList.
The library is now known as PublicSuffix.
CHANGED: Renamed PublicSuffixService::RuleList to PublicSuffixService::List.
CHANGED: Renamed PublicSuffixService::List#list to PublicSuffixService::List#rules.
CHANGED: Renamed PublicSuffixService to PublicSuffix.
CHANGED: Updated definitions.
CHANGED: Minimum Ruby version increased to Ruby 1.8.7.
CHANGED: rake/gempackagetask is deprecated. Use rubygems/package_task instead.
FIXED: Fixed ArgumentError: invalid byte sequence in US-ASCII with Ruby 1.9.2 (#12).
CHANGED: Updated definitions (#11).
CHANGED: Renamed definitions.txt to definitions.dat.
NEW: Added support for rubygems-test.
CHANGED: Integrated Bundler.
CHANGED: Updated definitions.
CHANGED: Update public suffix list to d1a5599b49fa 2010-10-25 15:10 +0100 (#9)
NEW: Add support for Fully Qualified Domain Names (#7)
CHANGED: Using YARD to document the code instead of RDoc.
FIXED: RuleList cache is not recreated when a new rule is appended to the list (#6)
FIXED: PublicSuffixService.valid? should return false if the domain is not defined or not allowed (#4, #5)
NEW: PublicSuffixService.parse raises DomainNotAllowed when trying to parse a domain name which exists, but is not allowed by the current definition list (#3)
PublicSuffixService.parse("nic.do")
# => PublicSuffixService::DomainNotAllowed
CHANGED: Renamed PublicSuffixService::InvalidDomain to PublicSuffixService::DomainInvalid
CHANGED: Improve documentation for Domain#domain and Domain#subdomain (#1).
CHANGED: Performance improvements (#2).
CHANGED: DomainName#domain and DomainName#subdomain are no longer alias of Domain#sld and Domain#tld.
CHANGED: Removed DomainName#labels and decoupled Rule from DomainName.
CHANGED: DomainName#valid? no longer instantiates new DomainName objects. This means less overhead.
CHANGED: Refactoring the entire DomainName API. Removed the internal on-the-fly parsing. Added a bunch of new methods to check and validate the DomainName.
NEW: DomainName#valid?
NEW: DomainName#parse and DomainName#parse!
NEW: DomainName#valid_domain? and DomainName#valid_subdomain?
CHANGED: Make sure RuleList lookup is only performed once.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.