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

Capability for extracting origin part of an URL #11

Closed
walro opened this issue Apr 3, 2014 · 2 comments
Closed

Capability for extracting origin part of an URL #11

walro opened this issue Apr 3, 2014 · 2 comments

Comments

@walro
Copy link
Contributor

walro commented Apr 3, 2014

Would be nice if the normalizer could extract the normalized host:

http://domain.com.br/some_path -> http://www.domain.com.br/

@dentarg
Copy link
Collaborator

dentarg commented Sep 5, 2014

👍

@dentarg
Copy link
Collaborator

dentarg commented Jul 13, 2015

Just some notes for the sake of my memory

[1] pry(main)> require "twingly/url"
[9] pry(main)> require "twingly/url/normalizer"

[11] pry(main)> Twingly::URL::Normalizer.normalize("http://domain.com.br/some_path")
=> ["http://www.domain.com.br/some_path"]
[12] pry(main)> Twingly::URL.parse("http://domain.com.br/some_path").url.origin
=> "http://domain.com.br"

twingly-mob added a commit that referenced this issue Oct 13, 2015
@dentarg dentarg changed the title Capability for extracting just the host part of an URL Capability for extracting origin part of an URL Oct 14, 2015
walro added a commit that referenced this issue Oct 15, 2015
@walro walro closed this as completed in #42 Oct 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants