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

Add support for ip v6 address #255

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Conversation

loicginoux
Copy link

the current code only support ip v4 address. We added support for ip v6 address.

@loicginoux
Copy link
Author

Any way this could be looked at and potentially merged ?
Thank you.

@drn
Copy link
Contributor

drn commented Mar 22, 2022

👍 on this PR. We currently have this monkey-patched in our codebase. Can this be merged and a new version be released?

Friendly ping @mnoack @dsantosmerino :)

@evolve2k
Copy link

evolve2k commented Jun 7, 2024

Looks good to me, lets get this merged and closed.

@ryankopf
Copy link
Member

ryankopf commented Jun 7, 2024

I don't have time to review adding another dependency, the resolv Gem, so I can't approve this PR.

If someone wants to write a class that brings those regex checks into the Gem directly, that's a better idea. We also don't need to support many of the ipv6 things supported in Resolv - for example, local addresses and interface addresses will not be useful for geocoding purposes.

Please also include tests checking that determining if a query is an IP works as expected.

@loicginoux
Copy link
Author

Just in cas you missed it, Resolv is not an external gem but part of the ruby stdlib so do you still thing it is worth rewritting it in geokit ?
If I understand your comment about testing, the test is already included for the ipv4 just above the added test for ipv6 or did I miss the point of your comment ?

@ryankopf
Copy link
Member

ryankopf commented Jun 7, 2024

Ah, I see you're right, then it's probably fine.

I'd like to see a few tests that verify that that ipv6 addresses are correctly parsed, like

def test_valid_ipv6_addresses

def test_invalid_ipv6_addresses

I've been trying to get this crate to have all tests passing, but I think there are some non-VCR'd calls that are varying from my local versus the crate version.

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

Successfully merging this pull request may close these issues.

5 participants