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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/zipcode-fr.rb +10 -8
  3. metadata +27 -13
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 25ae394ec05abe31e0c569e482c0921974d5eec9
4
- data.tar.gz: 242efa64b48bb3fce200e47ece0251b40b1c9d70
3
+ metadata.gz: 64c4cd8d69204761b06ce00e828e4a6b95609ec4
4
+ data.tar.gz: bea01d3ff40cd9efb1dc28218a99120eb50443a3
5
5
  SHA512:
6
- metadata.gz: b866e37bc86951e3d35f8fe475d7d8bf5a0b639a14d1c58ca94739fff53e5c9aabc6813c39f5322173e7fa9e530cb68507ad3cb318609e977b059fa15ed5b171
7
- data.tar.gz: 1c753016728b3f915660e1cea0ae94bb0943d8efbd170adcb27c9b48273a09792889a0a1999604be7ad135a49bc169226ed8938e2729d5beb70fb120f7da5abf
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
- # TODO: factor country-independent code out
4
- # rubocop:disable Metrics/ModuleLength
5
- module FR
6
- require 'csv'
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.1
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-03 00:00:00.000000000 Z
11
+ date: 2015-08-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: pry
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
- requirement: !ruby/object:Gem::Requirement
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
- version_requirements: !ruby/object:Gem::Requirement
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
- requirement: !ruby/object:Gem::Requirement
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
- version_requirements: !ruby/object:Gem::Requirement
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
- requirement: !ruby/object:Gem::Requirement
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
- version_requirements: !ruby/object:Gem::Requirement
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
- requirement: !ruby/object:Gem::Requirement
78
+ version_requirements: !ruby/object:Gem::Requirement
65
79
  requirements:
66
80
  - - ">="
67
81
  - !ruby/object:Gem::Version
68
82
  version: '0'
69
- description: " Query city information by zip code and city name, indexed by word
70
- prefixes.\n"
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.8
112
+ rubygems_version: 2.4.5
99
113
  signing_key:
100
114
  specification_version: 4
101
115
  summary: French zip codes and cities