zip-codes 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +2 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +17 -0
- data/LICENSE.txt +22 -0
- data/README.md +0 -0
- data/Rakefile +18 -0
- data/lib/data/US.yml +174341 -0
- data/lib/zip-codes.rb +21 -0
- data/zip-codes.gemspec +23 -0
- metadata +82 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 7474243c9697846d7913fa24b60800b80b499198
|
4
|
+
data.tar.gz: 516406fe15befaefccc9251adc2b90ae9f7864a4
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: bc2e50b622e222b547e30cbdd985030cdbd109dedd2016cb64cd846822300f3536c8fffad1d9b6872b20cfa902a2a1339b7b8b0fad8f4cdb795a9bf7ec0f8f88
|
7
|
+
data.tar.gz: 850760aa7975d024b8fc827ff07e7ce205625402ba189c08324446908dc4665b656c8bc8e7f71490a87a57b82fe18072277c45db511a24c1e19068d13dfc3cd9
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2013 Monterail.com
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
File without changes
|
data/Rakefile
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
2
|
+
require 'yaml'
|
3
|
+
|
4
|
+
task :convert do
|
5
|
+
codes = {}
|
6
|
+
File.open('lib/data/US.txt').each_line do |line|
|
7
|
+
array = line.split("\t")
|
8
|
+
codes[array[1]] = {
|
9
|
+
state_code: array[4],
|
10
|
+
state_name: array[3],
|
11
|
+
city: array[2]
|
12
|
+
}
|
13
|
+
end
|
14
|
+
|
15
|
+
File.open("lib/data/US.yml", "w") do |file|
|
16
|
+
file.write codes.to_yaml
|
17
|
+
end
|
18
|
+
end
|