zipcode-fr 1.0.1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/zipcode-fr.rb +10 -8
- metadata +27 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 64c4cd8d69204761b06ce00e828e4a6b95609ec4
|
4
|
+
data.tar.gz: bea01d3ff40cd9efb1dc28218a99120eb50443a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 228901ce22a2bc769c0bb96fab7ea084bac954512a7770275fee2600d74041b2403c88329c8125aa8f1be5bfe1b3810f1247281f4f666b23c456329233156837
|
7
|
+
data.tar.gz: ba3e804289657f9cdd70bfa0be0f69c463e2b0e2bf052738722a17c60735eee75673d9efbe65cfac1672a350380896789ef254dd057b558c479d0ff6c5d574a6
|
data/lib/zipcode-fr.rb
CHANGED
@@ -1,13 +1,13 @@
|
|
1
|
+
require 'zipcode-db'
|
2
|
+
require 'csv'
|
3
|
+
|
1
4
|
module ZipCode
|
2
5
|
# TODO: factor index system out
|
3
|
-
#
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
module_function
|
9
|
-
|
10
|
-
@indexes ||= {}
|
6
|
+
# rubocop:disable Metrics/ClassLength
|
7
|
+
class FR
|
8
|
+
def initialize
|
9
|
+
@indexes = {}
|
10
|
+
end
|
11
11
|
|
12
12
|
def load
|
13
13
|
# TODO: non-optimal, but not overly long either
|
@@ -185,3 +185,5 @@ module ZipCode
|
|
185
185
|
end
|
186
186
|
end
|
187
187
|
end
|
188
|
+
|
189
|
+
ZipCode::DB.register(:fr, ZipCode::FR.new)
|
metadata
CHANGED
@@ -1,73 +1,87 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zipcode-fr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Loic Nageleisen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-08-
|
11
|
+
date: 2015-08-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: zipcode-db
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
15
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: pry
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
16
30
|
requirements:
|
17
31
|
- - ">="
|
18
32
|
- !ruby/object:Gem::Version
|
19
33
|
version: '0'
|
20
34
|
type: :development
|
21
35
|
prerelease: false
|
22
|
-
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
37
|
requirements:
|
24
38
|
- - ">="
|
25
39
|
- !ruby/object:Gem::Version
|
26
40
|
version: '0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: rubocop
|
29
|
-
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
30
44
|
requirements:
|
31
45
|
- - ">="
|
32
46
|
- !ruby/object:Gem::Version
|
33
47
|
version: '0'
|
34
48
|
type: :development
|
35
49
|
prerelease: false
|
36
|
-
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
51
|
requirements:
|
38
52
|
- - ">="
|
39
53
|
- !ruby/object:Gem::Version
|
40
54
|
version: '0'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: rake
|
43
|
-
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
44
58
|
requirements:
|
45
59
|
- - ">="
|
46
60
|
- !ruby/object:Gem::Version
|
47
61
|
version: '0'
|
48
62
|
type: :development
|
49
63
|
prerelease: false
|
50
|
-
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
65
|
requirements:
|
52
66
|
- - ">="
|
53
67
|
- !ruby/object:Gem::Version
|
54
68
|
version: '0'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: minitest
|
57
|
-
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
58
72
|
requirements:
|
59
73
|
- - ">="
|
60
74
|
- !ruby/object:Gem::Version
|
61
75
|
version: '0'
|
62
76
|
type: :development
|
63
77
|
prerelease: false
|
64
|
-
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
79
|
requirements:
|
66
80
|
- - ">="
|
67
81
|
- !ruby/object:Gem::Version
|
68
82
|
version: '0'
|
69
|
-
description:
|
70
|
-
|
83
|
+
description: |2
|
84
|
+
Query city information by zip code and city name, indexed by word prefixes.
|
71
85
|
email: loic.nageleisen@gmail.com
|
72
86
|
executables: []
|
73
87
|
extensions: []
|
@@ -95,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
95
109
|
version: '0'
|
96
110
|
requirements: []
|
97
111
|
rubyforge_project:
|
98
|
-
rubygems_version: 2.4.
|
112
|
+
rubygems_version: 2.4.5
|
99
113
|
signing_key:
|
100
114
|
specification_version: 4
|
101
115
|
summary: French zip codes and cities
|