An open API service indexing awesome lists of open source software.

https://github.com/venables/where

A very simple geolocation library in Ruby
https://github.com/venables/where

Last synced: about 1 year ago
JSON representation

A very simple geolocation library in Ruby

Awesome Lists containing this project

README

          

Where
=====

A basic geolocation library for Ruby.

Installation
------------

Add this line to your application's Gemfile:

gem 'where'

And then execute:

$ bundle

Or install it yourself as:

$ gem install where

Usage
-----

Search by Address:

result = Where.is '4 yawkey way boston ma'
if result.success?
puts "Address: #{result.address}"
puts "Street Number: #{result.street_number}"
puts "Street: #{result.street}"
puts "City: #{result.city}"
puts "State: #{result.state}"
puts "Zip: #{result.postal_code}"
puts "Country: #{result.country}"
puts "Lat: #{result.lat}"
puts "Lng: #{result.lng}"
end

Or, by IP-Address:

result = Where.is "173.194.33.104"
...

Testing
-------

Run the spec suite by running:

rspec

Copyright
---------

Copyright (c) 2013 Matt Venables. See LICENSE.txt for details.