https://github.com/elifoster/simple_geolocator
:round_pushpin: A simple Geolocating Ruby Gem utilizing IP-API.com.
https://github.com/elifoster/simple_geolocator
geolocator ruby-gem
Last synced: 15 days ago
JSON representation
:round_pushpin: A simple Geolocating Ruby Gem utilizing IP-API.com.
- Host: GitHub
- URL: https://github.com/elifoster/simple_geolocator
- Owner: elifoster
- License: mit
- Created: 2015-10-21T19:36:17.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2021-08-21T19:28:38.000Z (about 4 years ago)
- Last Synced: 2025-08-27T11:23:57.998Z (about 1 month ago)
- Topics: geolocator, ruby-gem
- Language: Ruby
- Homepage: https://rubygems.org/gems/simple_geolocator
- Size: 111 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# simple_geolocator
[](https://badge.fury.io/rb/simple_geolocator)
[]()A simple Geolocating Ruby Gem utilizing IP-API.com.
## Installation
### RubyGems
```
gem install simple_geolocator
```### Bundler
Add this line to application's Gemfile:``` ruby
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
```It uses the wonderful [Rainbow Gem](https://github.com/sickill/rainbow) to color the text, along with the [StringUtility Gem](https://github.com/elifoster/string-utility-ruby) to create spectacular colors. Here is an example output, without colors :cry: :
```
$ 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](http://www.rubydoc.info/gems/simple_geolocator).