Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Canonical name #36

Open
craibuc opened this issue Jan 5, 2015 · 0 comments
Open

Canonical name #36

craibuc opened this issue Jan 5, 2015 · 0 comments

Comments

@craibuc
Copy link

craibuc commented Jan 5, 2015

Issue

On the gem's home page, you write:

url = Domainatrix.parse("http://www.pauldix.net")
url.canonical # => "net.pauldix"

However, in IRB, I get the following behavior:

irb> url = Domainatrix.parse('http://www.pauldix.net')
=> #<Domainatrix::Url:0x007fd0409d5310 @scheme="http", @host="www.pauldix.net", @url="http://www.pauldix.net", @public_suffix="net", @domain="pauldix", @subdomain="www", @path="">
> url.canonical
=> "net.pauldix.www"

Is the www supposed to be a part of the canonical name?

Ruby

$ ruby -v
ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin14.0.0]

Gem

$ gem list domainatrix -d

*** LOCAL GEMS ***

domainatrix (0.0.11)
    Authors: Paul Dix, Brian John
    Homepage: http://github.com/pauldix/domainatrix
    Installed at: /Users/craibuc/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0

    A cruel mistress that uses the public suffix domain list to dominate
    URLs by canonicalizing, finding the public suffix, and breaking them
    into their domain parts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant