No commit activity in last 3 years
No release in over 3 years
Accessing the IP API through Curb. This gem has been made to be as simple to use as possible. As such, it even includes a CLI that can be called through `simplegeo <ip>`.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 0.9
~> 3.12
 Project Readme

simple_geolocator

Gem Version Gem Downloads

A simple Geolocating Ruby Gem utilizing IP-API.com.

Installation

RubyGems

gem install simple_geolocator

Bundler

Add this line to application's Gemfile:

gem('simple_geolocator')

And then execute:

$ bundle

Usage

You can use it in your code as described in the documentation. Or, if you wanna have some real fun, you can use the fancy command line interface added in version 1.3.0!

$ simplegeo <ip>

It uses the wonderful Rainbow Gem to color the text, along with the StringUtility Gem to create spectacular colors. Here is an example output, without colors 😢 :

$ simplegeo 1.45.124.123
Here is the data for 1.45.124.123:
ISP: Beijing CheeryZone Scitech Co.,Ltd
Organization: Beijing CheeryZone Scitech Co.,Ltd
Timezone: Asia/Shanghai
Location: Beijing, Beijing Shi, China, 0
Exact location: 39.9289, 116.3883

Also note that this IP is not some significant person as far as I know; I literally just typed in random numbers when writing this README.

Documentation

Please see the RubyDocs.