Skip to content

Conversation

iltempo
Copy link
Contributor

@iltempo iltempo commented Jun 1, 2025

IPinfo recently added a Lite service that allows unlimited free IP lookups on the country level. This PR adds support for that service.

The results do not contain location information. This is why some tests are skipped.

@abdullahdevrel
Copy link

Thank you very much! We really appreciate it.

We were hoping that someday people would help us bring our Lite DB to a geocoder, but we lack Ruby experts on our team. So, we genuinely appreciate you taking the time and writing the code to bring the Lite API to the project. Thanks!

— Abdullah | DevRel, IPinfo

@iltempo
Copy link
Contributor Author

iltempo commented Jun 2, 2025

@abdullahdevrel, you are welcome. Considering the other open PRs, it may take some time for this to receive feedback or even get merged.

Is your request about LITE DB related to the "ancient" PR #1324?

@alexreisner
Copy link
Owner

This looks like a great service. And thank you for the clean, easy-to-review PR. Everything looks good except that the methods in lib/geocoder/results/ipinfo_io_lite.rb appear to be defined twice. You should either define them explicitly or loop through response_attributes and define them dynamically. Can you fix that and I'll merge?

@iltempo
Copy link
Contributor Author

iltempo commented Jun 3, 2025

Thank you for the quick review and the feedback @alexreisner. I fixed the PR and added some general information about the service to a readme file, which I did not spot in the first place.

@alexreisner
Copy link
Owner

Excellent. This looks great. Thanks!

@alexreisner alexreisner merged commit 66987e1 into alexreisner:master Jun 3, 2025
5 checks passed
@abdullahdevrel
Copy link

@iltempo

Is your request about LITE DB related to the "ancient" PR #1324?

Oh no. That company is not us.

I was referring to this request: #1632

However, instead of the IP to Country ASN database, it should now be the IPinfo Lite Database. We have changed the schema for it.

https://ipinfo.io/developers/ipinfo-lite-database

The implementation would be similar to MaxMind's MMDB-based implementation because our data also comes in MMDB format.

@hemaldev
Copy link

hemaldev commented Sep 21, 2025

Hi there, slightly noddy question – we are using your amazing gem and need to migrate from :ipinfo_io to :ipinfo_io_lite. We updated our gem to 1.8.5, but are seeing the error:

Please specify a valid lookup for Geocoder (:ipinfo_io_lite is not one of: ...

We can see that 1.8.5 is from December 18th, 2024, and the commit for :ipinfo_io_lite is from June this year. Presumably, ipinfo_io_lite is not yet pushed for release – would that be right, or are we doing something wrong (most probably)?

Any guidance much appreciated. Many thanks.

@iltempo
Copy link
Contributor Author

iltempo commented Sep 21, 2025

@hemaldev This PR has been merged, but not released yet, with a new gem version.

Please feel free to reference this PR in your Gemfile if you want to use IPinfo Lite immediately.

gem 'geocoder', github: 'yogaeasy/geocoder', branch: 'ipinfo-io-lite'

@alexreisner
Copy link
Owner

alexreisner commented Sep 21, 2025

And now it's been released! New version was long overdue. Sorry for the delay.

@hemaldev
Copy link

@alexreisner Thank you, sir! No need to apologise. Thanks for your amazing work.

@iltempo Thanks for getting back to me and for providing this solution. After I submitted my comment I did think maybe a possible way forward would be to fork the repo and reference it in my Gemfile, similar to what you are suggesting. But @alexreisner beat us to it! (Out of curiosity, as you have forked this repo, do you plan on keeping your copy on your account or will you delete it now that your work has been merged? This would obviously have impacted us should we have referenced it).

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.

4 participants