zip-codes 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,8 @@
1
1
  require 'yaml'
2
2
 
3
3
  module ZipCodes
4
+ VERSION = '0.2.0'
5
+
4
6
  class << self
5
7
  def identify code
6
8
  db[code]
@@ -8,9 +10,9 @@ module ZipCodes
8
10
 
9
11
  def db
10
12
  @db ||= begin
11
- spec = Gem::Specification.find_by_name("zip-codes")
12
- us = spec.gem_dir + "/lib/data/US.yml"
13
- YAML.load(File.open(us))
13
+ this_file = File.expand_path(File.dirname(__FILE__))
14
+ us_data = File.join(this_file, "data", "US.yml")
15
+ YAML.load(File.open(us_data))
14
16
  end
15
17
  end
16
18
 
@@ -1,14 +1,14 @@
1
1
  # coding: utf-8
2
2
  lib = File.expand_path('../lib', __FILE__)
3
3
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'grape/kaminari/version'
4
+ require 'zip-codes'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "zip-codes"
8
- spec.version = "0.1.0"
8
+ spec.version = ZipCodes::VERSION
9
9
  spec.authors = ["Michał Duda"]
10
10
  spec.email = ["michal.duda@monterail.com"]
11
- spec.description = %q{Identify city and state for given zip code}
11
+ spec.description = %q{Simple gem to get city, state, and time zone for a given zip code}
12
12
  spec.summary = %q{Gem to identify zip codes inside US}
13
13
  spec.homepage = "https://github.com/monterail/zip-codes"
14
14
  spec.license = "MIT"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zip-codes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michał Duda
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-11 00:00:00.000000000 Z
11
+ date: 2014-01-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -38,7 +38,7 @@ dependencies:
38
38
  - - '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
- description: Identify city and state for given zip code
41
+ description: Simple gem to get city, state, and time zone for a given zip code
42
42
  email:
43
43
  - michal.duda@monterail.com
44
44
  executables: []
@@ -74,9 +74,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
74
74
  version: '0'
75
75
  requirements: []
76
76
  rubyforge_project:
77
- rubygems_version: 2.0.3
77
+ rubygems_version: 2.0.14
78
78
  signing_key:
79
79
  specification_version: 4
80
80
  summary: Gem to identify zip codes inside US
81
81
  test_files: []
82
- has_rdoc: