How to use Geolocalise gem

Welcome to Geolocalise gem! A Gem which help you to find out current city,state,country,postal-code and country-code with simple methods call.

Links:

Github link : Geolocalise
RubyGem link : Geolocalise

Installation

Add this line to your application’s Gemfile:

gem 'geolocalise'

And then execute:

$ bundle

Or install it yourself as:

$ gem install geolocalise

Usage

In your class –

$ require 'geolocalise'

There are mainly five helpers available for Geolocalise usage. To get city name from latitude and langitude

Geolocalise.get_city("19.07598, 72.8776559")
#=> "Mumbai"

To get state name form city or co-ordinates

Geolocalise.get_state("19.07598, 72.8776559")
#=> "Maharashtra"

Geolocalise.get_state("Mumbai")
#=> "Maharashtra"

To get country name form city or co-ordinates

Geolocalise.get_country("19.07598, 72.8776559")
#=> "India"

Geolocalise.get_country("Delhi")
#=> "India"

To get country code form city or co-ordinates

Geolocalise.get_country_code("19.0759837, 72.8776559")
#=> "IN"

Geolocalise.get_country_code("New York")
#=> "US"

To get postal pode form city or co-ordinates

Geolocalise.get_postal_code("19.07598, 72.8776559")
#=> "400070"

Geolocalise.get_postal_code("New York")
#=>"10007"

Important ruby gem list

To Create admin panel:
ActiveAdmin :  rubygem | github
Activeadmin-axlsx :    rubygemgithub

AES encryption / decryption Ruby gem
Aescrypt : rubygem github

Mailing Functionality:
Letter Opener : rubygemgithub

Calculate difference between two given time:
Time Diff : rubygem github
Time Difference : rubygemgithub

To check the quality of rails code:
Rails best practices : rubygemgithub

To manage performance of application:
Newrelic : rubygems github

For reading and writing zip files:
Rubyzip :  rubygem | github

For background processing:
sidekiq : rubygem | github
Sidekiq-status : rubygem | github
daemons : rubygem | github (Ruby scripts to be run as a daemon and to be controlled by simple start/stop/restart commands)

For short code in view part:
Slim : rubygem | github
haml : rubygem | github
jade : rubygem | github

Exception Notifier Plugin for Rails:
whoops_rails_logger : rubygem | github
exception_notification : rubygem | github

Tracing/debugging the code:
better_errors : rubygem | github
meta_request : rubygem | github
binding_of_caller : rubygem | github
quiet_assets : rubygem | github (Quiet Assets turns off the Rails asset pipeline log. This means that it suppresses messages in your development log)

Notification:
growl : rubygem | github
ruby_gntp : rubygem | github

Font (size, color, drop shadow, and anything that can be done with the power of CSS):
font-awesome-rails : rubygem | github

Testing :
rack-test : rubygem | github
rspec : rubygem | github
rspec-mocks : rubygem | github
guard : rubygem | github
guard-rspec : rubygem | github
rb-fsevent : rubygem | github
fakefs : rubygem | github
cucumber : rubygem | github
aruba : rubygem | github
shoulda-matchers : rubygem | github
shoulda-callback-matchers : rubygem | github
factory_girl_rails : rubygem | github
database_cleaner : rubygem | github
poltergeist : rubygem | github
launchy : rubygem | github
faker : rubygem | github