0.01
No commit activity in last 3 years
No release in over 3 years
The data has been collected from wikipedia and stored in a yml file. This gem does not use an external service.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.0.1
~> 3.2.0
 Project Readme

zip-code-info

This gem returns the state and city of the Sectional Center Facility for a given zip code. It does not use an external API. It looks up the zip code in a yml file.

The zip code data has been taken from http://en.wikipedia.org/wiki/ZIP_code_prefixes

Usage

In your Gemfile

gem "zip-code-info"

The code runs out of a Singleton class. Right now you can call these two methods.

  ZipCodeInfo.instance.state_for '99163'
  #=> WA
  ZipCodeInfo.instance.scf_city_for '99163'
  #=> Spokane

Limitations

  • The city returned is the city where the USPS Sectional Center Facility (SCF) is located.
  • Sometimes the state that a zip code is bound to for USPS is different from the actual state the zip code is in. There are plans to provide both states.