geolookup 0.5.6 → 0.5.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.rdoc +3 -0
- data/geolookup.gemspec +2 -2
- data/lib/geolookup/usa/state.rb +9 -0
- data/lib/geolookup/version.rb +1 -1
- data/spec/lib/state_spec.rb +6 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dcd267b945c4da74fdf8a9ccaf277d281dd2a779
|
4
|
+
data.tar.gz: b179652672aaf9fe4f3fe23c9d9c9f96164e5940
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa2ec426346d4df537580d60b4d05143e90d78d475f8628c33045fe04c9358e565910fac25ea5299e27b1e75167badc20ecec64c52d65688d27f0fae87ea152b
|
7
|
+
data.tar.gz: 59c54b00d8f8c44f6945e4728646c5ed76c60ea7112ad6c72371d77048bc69913cacd49e49a3fab6b0ea853742d064d72072e12f0af200e235f15a9430f0fb2d
|
data/CHANGELOG.rdoc
CHANGED
data/geolookup.gemspec
CHANGED
@@ -6,8 +6,8 @@ require 'geolookup/version'
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "geolookup"
|
8
8
|
spec.version = Geolookup::VERSION
|
9
|
-
spec.authors = ["Austin Fonacier", "David Butler"]
|
10
|
-
spec.email = ["austin@spokeo.com", "dwbutler@ucla.edu"]
|
9
|
+
spec.authors = ["Austin Fonacier", "David Butler", "Jeffrey Lee"]
|
10
|
+
spec.email = ["austin@spokeo.com", "dwbutler@ucla.edu", "jlee@spokeo.com"]
|
11
11
|
spec.summary = "Common geo lookups"
|
12
12
|
spec.description = "Common geo lookups"
|
13
13
|
spec.homepage = "https://github.com/spokeo/geolookup"
|
data/lib/geolookup/usa/state.rb
CHANGED
@@ -93,6 +93,15 @@ module Geolookup
|
|
93
93
|
@state_code_to_abbreviation.values
|
94
94
|
end
|
95
95
|
|
96
|
+
###################################################################
|
97
|
+
# self.abbreviations
|
98
|
+
#
|
99
|
+
# Returns an array of state abbreviations
|
100
|
+
#
|
101
|
+
def self.domestic_abbreviations
|
102
|
+
@domestic_state_code_to_abbreviation ||= Geolookup.load_hash_from_file(STATE_CODE_TO_ABBREVIATION_FILE).delete_if{|code, abbr| code > 56}
|
103
|
+
@domestic_state_code_to_abbreviation.values
|
104
|
+
end
|
96
105
|
|
97
106
|
###################################################################
|
98
107
|
# self.names
|
data/lib/geolookup/version.rb
CHANGED
data/spec/lib/state_spec.rb
CHANGED
@@ -127,4 +127,10 @@ describe "Geolookup::USA::State" do
|
|
127
127
|
expect(Geolookup::USA::State.code_to_lat_long("asdf")).to be_nil
|
128
128
|
end
|
129
129
|
end
|
130
|
+
|
131
|
+
describe "#domestic_abbreviations" do
|
132
|
+
it "should return an array of X states" do
|
133
|
+
expect(Geolookup::USA::State.domestic_abbreviations.length).to eql(51)
|
134
|
+
end
|
135
|
+
end
|
130
136
|
end
|
metadata
CHANGED
@@ -1,15 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: geolookup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Austin Fonacier
|
8
8
|
- David Butler
|
9
|
+
- Jeffrey Lee
|
9
10
|
autorequire:
|
10
11
|
bindir: bin
|
11
12
|
cert_chain: []
|
12
|
-
date: 2014-
|
13
|
+
date: 2014-09-02 00:00:00.000000000 Z
|
13
14
|
dependencies:
|
14
15
|
- !ruby/object:Gem::Dependency
|
15
16
|
name: bundler
|
@@ -57,6 +58,7 @@ description: Common geo lookups
|
|
57
58
|
email:
|
58
59
|
- austin@spokeo.com
|
59
60
|
- dwbutler@ucla.edu
|
61
|
+
- jlee@spokeo.com
|
60
62
|
executables: []
|
61
63
|
extensions: []
|
62
64
|
extra_rdoc_files: []
|