govkit-ca 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. checksums.yaml +7 -0
  2. data/.travis.yml +4 -0
  3. data/README.md +1 -1
  4. data/govkit-ca.gemspec +4 -2
  5. data/lib/gov_kit-ca/postal_code/strategy/cbc_ca.rb +1 -1
  6. data/lib/gov_kit-ca/postal_code/strategy/conservative_ca.rb +3 -4
  7. data/lib/gov_kit-ca/postal_code/strategy/elections_ca.rb +4 -6
  8. data/lib/gov_kit-ca/postal_code/strategy/liberal_ca.rb +0 -1
  9. data/lib/gov_kit-ca/postal_code/strategy/parl_gc_ca.rb +5 -1
  10. data/lib/gov_kit-ca/postal_code.rb +19 -7
  11. data/lib/gov_kit-ca/represent.rb +108 -0
  12. data/lib/gov_kit-ca/version.rb +1 -1
  13. data/lib/gov_kit-ca.rb +2 -1
  14. data/spec/cbc_ca_spec.rb +14 -25
  15. data/spec/conservative_ca_spec.rb +1 -10
  16. data/spec/digital-copyright_ca_spec.rb +0 -9
  17. data/spec/elections_ca_spec.rb +0 -9
  18. data/spec/greenparty_ca_spec.rb +0 -9
  19. data/spec/liberal_ca_spec.rb +1 -10
  20. data/spec/ndp_ca_spec.rb +0 -9
  21. data/spec/parl_gc_ca_spec.rb +8 -0
  22. data/spec/postal_code_spec.rb +69 -87
  23. data/spec/represent_spec.rb +279 -0
  24. data/spec/spec_helper.rb +1 -4
  25. data/spec/strategy_set_spec.rb +55 -2
  26. data/tasks/tasks.rb +0 -28
  27. metadata +47 -133
  28. data/spec/fixtures/cbc_ca/A1A1A1.response +0 -11
  29. data/spec/fixtures/cbc_ca/G0C2Y0.response +0 -11
  30. data/spec/fixtures/cbc_ca/H0H0H0.response +0 -11
  31. data/spec/fixtures/cbc_ca/K0A1K0.response +0 -11
  32. data/spec/fixtures/cbc_ca/T5S2B9.response +0 -11
  33. data/spec/fixtures/cbc_ca/X1B1B1.response +0 -11
  34. data/spec/fixtures/conservative_ca/A1A1A1.response +0 -452
  35. data/spec/fixtures/conservative_ca/G0C2Y0.response +0 -452
  36. data/spec/fixtures/conservative_ca/H0H0H0.response +0 -452
  37. data/spec/fixtures/conservative_ca/K0A1K0.response +0 -455
  38. data/spec/fixtures/conservative_ca/T5S2B9.response +0 -453
  39. data/spec/fixtures/conservative_ca/X1B1B1.response +0 -452
  40. data/spec/fixtures/digital-copyright_ca/A1A1A1.response +0 -227
  41. data/spec/fixtures/digital-copyright_ca/G0C2Y0.response +0 -229
  42. data/spec/fixtures/digital-copyright_ca/H0H0H0.response +0 -243
  43. data/spec/fixtures/digital-copyright_ca/K0A1K0.response +0 -230
  44. data/spec/fixtures/digital-copyright_ca/T5S2B9.response +0 -233
  45. data/spec/fixtures/digital-copyright_ca/X1B1B1.response +0 -243
  46. data/spec/fixtures/elections_ca/A1A1A1.response +0 -10
  47. data/spec/fixtures/elections_ca/G0C2Y0.response +0 -11
  48. data/spec/fixtures/elections_ca/H0H0H0.response +0 -10
  49. data/spec/fixtures/elections_ca/K0A1K0.response +0 -10
  50. data/spec/fixtures/elections_ca/T5S2B9.response +0 -10
  51. data/spec/fixtures/elections_ca/X1B1B1.response +0 -10
  52. data/spec/fixtures/greenparty_ca/A1A1A1.response +0 -13
  53. data/spec/fixtures/greenparty_ca/G0C2Y0.response +0 -13
  54. data/spec/fixtures/greenparty_ca/H0H0H0.response +0 -13
  55. data/spec/fixtures/greenparty_ca/K0A1K0.response +0 -13
  56. data/spec/fixtures/greenparty_ca/T5S2B9.response +0 -13
  57. data/spec/fixtures/greenparty_ca/X1B1B1.response +0 -13
  58. data/spec/fixtures/liberal_ca/A1A1A1.response +0 -702
  59. data/spec/fixtures/liberal_ca/G0C2Y0.response +0 -570
  60. data/spec/fixtures/liberal_ca/H0H0H0.response +0 -649
  61. data/spec/fixtures/liberal_ca/K0A1K0.response +0 -650
  62. data/spec/fixtures/liberal_ca/T5S2B9.response +0 -570
  63. data/spec/fixtures/liberal_ca/X1B1B1.response +0 -649
  64. data/spec/fixtures/ndp_ca/A1A1A1.response +0 -610
  65. data/spec/fixtures/ndp_ca/G0C2Y0.response +0 -610
  66. data/spec/fixtures/ndp_ca/H0H0H0.response +0 -593
  67. data/spec/fixtures/ndp_ca/K0A1K0.response +0 -641
  68. data/spec/fixtures/ndp_ca/T5S2B9.response +0 -605
  69. data/spec/fixtures/ndp_ca/X1B1B1.response +0 -593
metadata CHANGED
@@ -1,20 +1,32 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govkit-ca
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
5
- prerelease:
4
+ version: 0.0.7
6
5
  platform: ruby
7
6
  authors:
8
7
  - Open North
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-04-30 00:00:00.000000000 Z
11
+ date: 2014-03-05 00:00:00.000000000 Z
13
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: faraday
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
14
27
  - !ruby/object:Gem::Dependency
15
28
  name: httparty
16
29
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
30
  requirements:
19
31
  - - ~>
20
32
  - !ruby/object:Gem::Version
@@ -22,7 +34,6 @@ dependencies:
22
34
  type: :runtime
23
35
  prerelease: false
24
36
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
37
  requirements:
27
38
  - - ~>
28
39
  - !ruby/object:Gem::Version
@@ -30,7 +41,6 @@ dependencies:
30
41
  - !ruby/object:Gem::Dependency
31
42
  name: nokogiri
32
43
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
44
  requirements:
35
45
  - - ~>
36
46
  - !ruby/object:Gem::Version
@@ -38,31 +48,27 @@ dependencies:
38
48
  type: :runtime
39
49
  prerelease: false
40
50
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
51
  requirements:
43
52
  - - ~>
44
53
  - !ruby/object:Gem::Version
45
54
  version: 1.5.0
46
55
  - !ruby/object:Gem::Dependency
47
- name: yajl-ruby
56
+ name: json
48
57
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
58
  requirements:
51
- - - ~>
59
+ - - '>='
52
60
  - !ruby/object:Gem::Version
53
- version: 0.8.2
54
- type: :runtime
61
+ version: '0'
62
+ type: :development
55
63
  prerelease: false
56
64
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
65
  requirements:
59
- - - ~>
66
+ - - '>='
60
67
  - !ruby/object:Gem::Version
61
- version: 0.8.2
68
+ version: '0'
62
69
  - !ruby/object:Gem::Dependency
63
70
  name: rspec
64
71
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
72
  requirements:
67
73
  - - ~>
68
74
  - !ruby/object:Gem::Version
@@ -70,59 +76,52 @@ dependencies:
70
76
  type: :development
71
77
  prerelease: false
72
78
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
79
  requirements:
75
80
  - - ~>
76
81
  - !ruby/object:Gem::Version
77
82
  version: 2.6.0
78
83
  - !ruby/object:Gem::Dependency
79
- name: fakeweb
84
+ name: rake
80
85
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
86
  requirements:
83
- - - ~>
87
+ - - '>='
84
88
  - !ruby/object:Gem::Version
85
- version: 1.3.0
89
+ version: '0'
86
90
  type: :development
87
91
  prerelease: false
88
92
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
93
  requirements:
91
- - - ~>
94
+ - - '>='
92
95
  - !ruby/object:Gem::Version
93
- version: 1.3.0
96
+ version: '0'
94
97
  - !ruby/object:Gem::Dependency
95
- name: rake
98
+ name: coveralls
96
99
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
100
  requirements:
99
- - - ! '>='
101
+ - - '>='
100
102
  - !ruby/object:Gem::Version
101
103
  version: '0'
102
104
  type: :development
103
105
  prerelease: false
104
106
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
107
  requirements:
107
- - - ! '>='
108
+ - - '>='
108
109
  - !ruby/object:Gem::Version
109
110
  version: '0'
110
111
  - !ruby/object:Gem::Dependency
111
- name: coveralls
112
+ name: mime-types
112
113
  requirement: !ruby/object:Gem::Requirement
113
- none: false
114
114
  requirements:
115
- - - ! '>='
115
+ - - ~>
116
116
  - !ruby/object:Gem::Version
117
- version: '0'
117
+ version: '1.16'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
121
  requirements:
123
- - - ! '>='
122
+ - - ~>
124
123
  - !ruby/object:Gem::Version
125
- version: '0'
124
+ version: '1.16'
126
125
  description: GovKit-CA lets you quickly get encapsulated Ruby objects for Canadian
127
126
  civic data.
128
127
  email:
@@ -153,144 +152,59 @@ files:
153
152
  - lib/gov_kit-ca/postal_code/strategy/ndp_ca.rb
154
153
  - lib/gov_kit-ca/postal_code/strategy/parl_gc_ca.rb
155
154
  - lib/gov_kit-ca/postal_code/strategy_set.rb
155
+ - lib/gov_kit-ca/represent.rb
156
156
  - lib/gov_kit-ca/version.rb
157
157
  - lib/govkit-ca.rb
158
158
  - spec/cbc_ca_spec.rb
159
159
  - spec/conservative_ca_spec.rb
160
160
  - spec/digital-copyright_ca_spec.rb
161
161
  - spec/elections_ca_spec.rb
162
- - spec/fixtures/cbc_ca/A1A1A1.response
163
- - spec/fixtures/cbc_ca/G0C2Y0.response
164
- - spec/fixtures/cbc_ca/H0H0H0.response
165
- - spec/fixtures/cbc_ca/K0A1K0.response
166
- - spec/fixtures/cbc_ca/T5S2B9.response
167
- - spec/fixtures/cbc_ca/X1B1B1.response
168
- - spec/fixtures/conservative_ca/A1A1A1.response
169
- - spec/fixtures/conservative_ca/G0C2Y0.response
170
- - spec/fixtures/conservative_ca/H0H0H0.response
171
- - spec/fixtures/conservative_ca/K0A1K0.response
172
- - spec/fixtures/conservative_ca/T5S2B9.response
173
- - spec/fixtures/conservative_ca/X1B1B1.response
174
- - spec/fixtures/digital-copyright_ca/A1A1A1.response
175
- - spec/fixtures/digital-copyright_ca/G0C2Y0.response
176
- - spec/fixtures/digital-copyright_ca/H0H0H0.response
177
- - spec/fixtures/digital-copyright_ca/K0A1K0.response
178
- - spec/fixtures/digital-copyright_ca/T5S2B9.response
179
- - spec/fixtures/digital-copyright_ca/X1B1B1.response
180
- - spec/fixtures/elections_ca/A1A1A1.response
181
- - spec/fixtures/elections_ca/G0C2Y0.response
182
- - spec/fixtures/elections_ca/H0H0H0.response
183
- - spec/fixtures/elections_ca/K0A1K0.response
184
- - spec/fixtures/elections_ca/T5S2B9.response
185
- - spec/fixtures/elections_ca/X1B1B1.response
186
- - spec/fixtures/greenparty_ca/A1A1A1.response
187
- - spec/fixtures/greenparty_ca/G0C2Y0.response
188
- - spec/fixtures/greenparty_ca/H0H0H0.response
189
- - spec/fixtures/greenparty_ca/K0A1K0.response
190
- - spec/fixtures/greenparty_ca/T5S2B9.response
191
- - spec/fixtures/greenparty_ca/X1B1B1.response
192
- - spec/fixtures/liberal_ca/A1A1A1.response
193
- - spec/fixtures/liberal_ca/G0C2Y0.response
194
- - spec/fixtures/liberal_ca/H0H0H0.response
195
- - spec/fixtures/liberal_ca/K0A1K0.response
196
- - spec/fixtures/liberal_ca/T5S2B9.response
197
- - spec/fixtures/liberal_ca/X1B1B1.response
198
- - spec/fixtures/ndp_ca/A1A1A1.response
199
- - spec/fixtures/ndp_ca/G0C2Y0.response
200
- - spec/fixtures/ndp_ca/H0H0H0.response
201
- - spec/fixtures/ndp_ca/K0A1K0.response
202
- - spec/fixtures/ndp_ca/T5S2B9.response
203
- - spec/fixtures/ndp_ca/X1B1B1.response
204
162
  - spec/greenparty_ca_spec.rb
205
163
  - spec/liberal_ca_spec.rb
206
164
  - spec/ndp_ca_spec.rb
165
+ - spec/parl_gc_ca_spec.rb
207
166
  - spec/postal_code_spec.rb
167
+ - spec/represent_spec.rb
208
168
  - spec/spec.opts
209
169
  - spec/spec_helper.rb
210
170
  - spec/strategy_set_spec.rb
211
171
  - tasks/postal-code-for-districts.csv
212
172
  - tasks/tasks.rb
213
173
  homepage: http://github.com/opennorth/govkit-ca
214
- licenses: []
174
+ licenses:
175
+ - MIT
176
+ metadata: {}
215
177
  post_install_message:
216
178
  rdoc_options: []
217
179
  require_paths:
218
180
  - lib
219
181
  required_ruby_version: !ruby/object:Gem::Requirement
220
- none: false
221
182
  requirements:
222
- - - ! '>='
183
+ - - '>='
223
184
  - !ruby/object:Gem::Version
224
185
  version: '0'
225
- segments:
226
- - 0
227
- hash: -4066199974398879801
228
186
  required_rubygems_version: !ruby/object:Gem::Requirement
229
- none: false
230
187
  requirements:
231
- - - ! '>='
188
+ - - '>='
232
189
  - !ruby/object:Gem::Version
233
190
  version: '0'
234
- segments:
235
- - 0
236
- hash: -4066199974398879801
237
191
  requirements: []
238
192
  rubyforge_project: govkit-ca
239
- rubygems_version: 1.8.25
193
+ rubygems_version: 2.0.8
240
194
  signing_key:
241
- specification_version: 3
195
+ specification_version: 4
242
196
  summary: Easy access to Canadian civic data around the web
243
197
  test_files:
244
198
  - spec/cbc_ca_spec.rb
245
199
  - spec/conservative_ca_spec.rb
246
200
  - spec/digital-copyright_ca_spec.rb
247
201
  - spec/elections_ca_spec.rb
248
- - spec/fixtures/cbc_ca/A1A1A1.response
249
- - spec/fixtures/cbc_ca/G0C2Y0.response
250
- - spec/fixtures/cbc_ca/H0H0H0.response
251
- - spec/fixtures/cbc_ca/K0A1K0.response
252
- - spec/fixtures/cbc_ca/T5S2B9.response
253
- - spec/fixtures/cbc_ca/X1B1B1.response
254
- - spec/fixtures/conservative_ca/A1A1A1.response
255
- - spec/fixtures/conservative_ca/G0C2Y0.response
256
- - spec/fixtures/conservative_ca/H0H0H0.response
257
- - spec/fixtures/conservative_ca/K0A1K0.response
258
- - spec/fixtures/conservative_ca/T5S2B9.response
259
- - spec/fixtures/conservative_ca/X1B1B1.response
260
- - spec/fixtures/digital-copyright_ca/A1A1A1.response
261
- - spec/fixtures/digital-copyright_ca/G0C2Y0.response
262
- - spec/fixtures/digital-copyright_ca/H0H0H0.response
263
- - spec/fixtures/digital-copyright_ca/K0A1K0.response
264
- - spec/fixtures/digital-copyright_ca/T5S2B9.response
265
- - spec/fixtures/digital-copyright_ca/X1B1B1.response
266
- - spec/fixtures/elections_ca/A1A1A1.response
267
- - spec/fixtures/elections_ca/G0C2Y0.response
268
- - spec/fixtures/elections_ca/H0H0H0.response
269
- - spec/fixtures/elections_ca/K0A1K0.response
270
- - spec/fixtures/elections_ca/T5S2B9.response
271
- - spec/fixtures/elections_ca/X1B1B1.response
272
- - spec/fixtures/greenparty_ca/A1A1A1.response
273
- - spec/fixtures/greenparty_ca/G0C2Y0.response
274
- - spec/fixtures/greenparty_ca/H0H0H0.response
275
- - spec/fixtures/greenparty_ca/K0A1K0.response
276
- - spec/fixtures/greenparty_ca/T5S2B9.response
277
- - spec/fixtures/greenparty_ca/X1B1B1.response
278
- - spec/fixtures/liberal_ca/A1A1A1.response
279
- - spec/fixtures/liberal_ca/G0C2Y0.response
280
- - spec/fixtures/liberal_ca/H0H0H0.response
281
- - spec/fixtures/liberal_ca/K0A1K0.response
282
- - spec/fixtures/liberal_ca/T5S2B9.response
283
- - spec/fixtures/liberal_ca/X1B1B1.response
284
- - spec/fixtures/ndp_ca/A1A1A1.response
285
- - spec/fixtures/ndp_ca/G0C2Y0.response
286
- - spec/fixtures/ndp_ca/H0H0H0.response
287
- - spec/fixtures/ndp_ca/K0A1K0.response
288
- - spec/fixtures/ndp_ca/T5S2B9.response
289
- - spec/fixtures/ndp_ca/X1B1B1.response
290
202
  - spec/greenparty_ca_spec.rb
291
203
  - spec/liberal_ca_spec.rb
292
204
  - spec/ndp_ca_spec.rb
205
+ - spec/parl_gc_ca_spec.rb
293
206
  - spec/postal_code_spec.rb
207
+ - spec/represent_spec.rb
294
208
  - spec/spec.opts
295
209
  - spec/spec_helper.rb
296
210
  - spec/strategy_set_spec.rb
@@ -1,11 +0,0 @@
1
- HTTP/1.1 200 OK
2
- Server: Apache/2.2.3 (Red Hat)
3
- X-Origin-Server: web17:sb17
4
- Content-Type: text/html
5
- Cache-Control: max-age=28
6
- Expires: Tue, 05 Mar 2013 03:46:36 GMT
7
- Date: Tue, 05 Mar 2013 03:46:08 GMT
8
- Content-Length: 55
9
- Connection: close
10
-
11
- [{"rid":"007","name":"St. John's South - Mount Pearl"}]
@@ -1,11 +0,0 @@
1
- HTTP/1.1 200 OK
2
- Server: Apache/2.2.3 (Red Hat)
3
- X-Origin-Server: web17:sb17
4
- Content-Type: text/html
5
- Cache-Control: max-age=29
6
- Expires: Tue, 05 Mar 2013 03:46:37 GMT
7
- Date: Tue, 05 Mar 2013 03:46:08 GMT
8
- Content-Length: 66
9
- Connection: close
10
-
11
- [{"rid":"052","name":"Gasp\u00e9sie - \u00celes-de-la-Madeleine"}]
@@ -1,11 +0,0 @@
1
- HTTP/1.1 404 Not Found
2
- Server: Apache/2.2.3 (Red Hat)
3
- X-Origin-Server: web20:sb17
4
- Content-Length: 0
5
- Content-Type: text/html
6
- Vary: Accept-Encoding
7
- Cache-Control: max-age=28
8
- Expires: Tue, 05 Mar 2013 03:46:37 GMT
9
- Date: Tue, 05 Mar 2013 03:46:09 GMT
10
- Connection: close
11
-
@@ -1,11 +0,0 @@
1
- HTTP/1.1 200 OK
2
- Server: Apache/2.2.3 (Red Hat)
3
- X-Origin-Server: web19:sb17
4
- Content-Type: text/html
5
- Cache-Control: max-age=30
6
- Expires: Tue, 05 Mar 2013 03:46:39 GMT
7
- Date: Tue, 05 Mar 2013 03:46:09 GMT
8
- Content-Length: 177
9
- Connection: close
10
-
11
- [{"rid":"133","name":"Glengarry - Prescott - Russell"},{"rid":"159","name":"Nepean - Carleton"},{"rid":"170","name":"Ottawa - Orl\u00e9ans"},{"rid":"171","name":"Ottawa South"}]
@@ -1,11 +0,0 @@
1
- HTTP/1.1 200 OK
2
- Server: Apache/2.2.3 (Red Hat)
3
- X-Origin-Server: web20:sb17
4
- Content-Type: text/html
5
- Cache-Control: max-age=30
6
- Expires: Tue, 05 Mar 2013 03:46:38 GMT
7
- Date: Tue, 05 Mar 2013 03:46:08 GMT
8
- Content-Length: 93
9
- Connection: close
10
-
11
- [{"rid":"257","name":"Edmonton - Spruce Grove"},{"rid":"255","name":"Edmonton - St. Albert"}]
@@ -1,11 +0,0 @@
1
- HTTP/1.1 404 Not Found
2
- Server: Apache/2.2.3 (Red Hat)
3
- X-Origin-Server: web21:sb17
4
- Content-Length: 0
5
- Content-Type: text/html
6
- Vary: Accept-Encoding
7
- Cache-Control: max-age=30
8
- Expires: Tue, 05 Mar 2013 03:46:40 GMT
9
- Date: Tue, 05 Mar 2013 03:46:10 GMT
10
- Connection: close
11
-