my_society-map_it 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (23) hide show
  1. data/Gemfile +3 -0
  2. data/README.md +7 -1
  3. data/Rakefile +10 -2
  4. data/lib/my_society/map_it.rb +93 -14
  5. data/lib/my_society/map_it/version.rb +1 -1
  6. data/my_society-map_it.gemspec +5 -0
  7. data/spec/cassettes/MySociety_MapIt_Postcode/gives_a_correct_gss_code_for_a_ward.yml +184 -0
  8. data/spec/cassettes/MySociety_MapIt_Postcode/gives_a_correct_lat/lng_for_a_postcode.yml +193 -0
  9. data/spec/cassettes/MySociety_MapIt_Postcode/gives_a_correct_ward.yml +184 -0
  10. data/spec/cassettes/MySociety_MapIt_Postcode/single_tier/correctly_identifies_a_single_tier_local_authority.yml +355 -0
  11. data/spec/cassettes/MySociety_MapIt_Postcode/single_tier/returns_the_correct_local_authority.yml +355 -0
  12. data/spec/cassettes/MySociety_MapIt_Postcode/single_tier/returns_the_correct_local_authority_gss_code.yml +355 -0
  13. data/spec/cassettes/MySociety_MapIt_Postcode/two_tier/correctly_identifies_a_two_tier_local_authority.yml +727 -0
  14. data/spec/cassettes/MySociety_MapIt_Postcode/two_tier/gives_a_correct_county_council.yml +365 -0
  15. data/spec/cassettes/MySociety_MapIt_Postcode/two_tier/gives_a_correct_county_council_gss_code.yml +365 -0
  16. data/spec/cassettes/MySociety_MapIt_Postcode/two_tier/gives_a_correct_district_council.yml +184 -0
  17. data/spec/cassettes/MySociety_MapIt_Postcode/two_tier/gives_a_correct_district_council_gss_code.yml +184 -0
  18. data/spec/cassettes/MySociety_MapIt_Postcode/two_tier/returns_a_hash_when_asked_for_a_local_authority.yml +727 -0
  19. data/spec/cassettes/MySociety_MapIt_Postcode/with_parish/returns_the_correct_parish.yml +184 -0
  20. data/spec/cassettes/MySociety_MapIt_Postcode/without_parish/returns_the_nil_for_a_parish.yml +179 -0
  21. data/spec/postcode_spec.rb +96 -0
  22. data/spec/spec_helper.rb +23 -0
  23. metadata +101 -5
@@ -0,0 +1,365 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://mapit.mysociety.org/postcode/B463LD
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ accept:
11
+ - ! '*/*'
12
+ user-agent:
13
+ - Ruby
14
+ response:
15
+ status:
16
+ code: 200
17
+ message: OK
18
+ headers:
19
+ expires:
20
+ - Tue, 15 Oct 2013 13:29:35 GMT
21
+ vary:
22
+ - Cookie,Accept-Encoding
23
+ etag:
24
+ - ! '"40eca97e347e9ac2c1ce9caca6bfb5a2;gzip"'
25
+ cache-control:
26
+ - max-age=2419200
27
+ access-control-allow-origin:
28
+ - ! '*'
29
+ last-modified:
30
+ - Tue, 17 Sep 2013 13:29:35 GMT
31
+ content-type:
32
+ - application/json; charset=utf-8
33
+ x-url:
34
+ - /postcode/B463LD
35
+ transfer-encoding:
36
+ - chunked
37
+ date:
38
+ - Tue, 17 Sep 2013 14:44:19 GMT
39
+ age:
40
+ - '4485'
41
+ connection:
42
+ - keep-alive
43
+ body:
44
+ encoding: US-ASCII
45
+ string: ! '{"wgs84_lat": 52.496789409955881, "coordsyst": "G", "shortcuts":
46
+ {"WMC": 66024, "ward": {"county": 15881, "district": 7606}, "council": {"county":
47
+ 2243, "district": 2458}}, "wgs84_lon": -1.706805276569471, "postcode": "B46
48
+ 3LD", "easting": 420002, "areas": {"40352": {"parent_area": null, "generation_high":
49
+ 20, "all_names": {}, "id": 40352, "codes": {"ons": "E02006473"}, "name": "North
50
+ Warwickshire 006", "country": "E", "type_name": "Middle Layer Super Output
51
+ Area (Full)", "generation_low": 13, "country_name": "England", "type": "OMF"},
52
+ "11809": {"parent_area": null, "generation_high": 20, "all_names": {}, "id":
53
+ 11809, "codes": {"ons": "05", "gss": "E15000005", "unit_id": "41426"}, "name":
54
+ "West Midlands", "country": "E", "type_name": "European region", "generation_low":
55
+ 1, "country_name": "England", "type": "EUR"}, "2243": {"parent_area": null,
56
+ "generation_high": 20, "all_names": {}, "id": 2243, "codes": {"ons": "44",
57
+ "gss": "E10000031", "unit_id": "10049"}, "name": "Warwickshire County Council",
58
+ "country": "E", "type_name": "County council", "generation_low": 1, "country_name":
59
+ "England", "type": "CTY"}, "900001": {"parent_area": null, "generation_high":
60
+ 20, "all_names": {}, "id": 900001, "codes": {}, "name": "European Parliament",
61
+ "country": "", "type_name": "European Parliament", "generation_low": 1, "country_name":
62
+ "-", "type": "EUP"}, "66024": {"parent_area": null, "generation_high": 20,
63
+ "all_names": {}, "id": 66024, "codes": {"gss": "E14000854", "unit_id": "24700"},
64
+ "name": "North Warwickshire", "country": "E", "type_name": "UK Parliament
65
+ constituency", "generation_low": 13, "country_name": "England", "type": "WMC"},
66
+ "15881": {"parent_area": 2243, "generation_high": 20, "all_names": {}, "id":
67
+ 15881, "codes": {"unit_id": "10112"}, "name": "Coleshill", "country": "E",
68
+ "type_name": "County council electoral division", "generation_low": 3, "country_name":
69
+ "England", "type": "CED"}, "97162": {"parent_area": null, "generation_high":
70
+ 20, "all_names": {}, "id": 97162, "codes": {"ons": "E01031021"}, "name": "North
71
+ Warwickshire 006C", "country": "E", "type_name": "Lower Layer Super Output
72
+ Area (Full)", "generation_low": 13, "country_name": "England", "type": "OLF"},
73
+ "131540": {"parent_area": null, "generation_high": 20, "all_names": {}, "id":
74
+ 131540, "codes": {"ons": "E01031021"}, "name": "North Warwickshire 006C",
75
+ "country": "E", "type_name": "Lower Layer Super Output Area (Generalised)",
76
+ "generation_low": 13, "country_name": "England", "type": "OLG"}, "7606": {"parent_area":
77
+ 2458, "generation_high": 20, "all_names": {}, "id": 7606, "codes": {"ons":
78
+ "44UBGC", "gss": "E05007463", "unit_id": "10113"}, "name": "Coleshill South",
79
+ "country": "E", "type_name": "District council ward", "generation_low": 1,
80
+ "country_name": "England", "type": "DIW"}, "55160": {"parent_area": 2458,
81
+ "generation_high": 20, "all_names": {}, "id": 55160, "codes": {"ons": "44UB010",
82
+ "gss": "E04009636", "unit_id": "10183"}, "name": "Coleshill", "country": "E",
83
+ "type_name": "Civil parish/community", "generation_low": 12, "country_name":
84
+ "England", "type": "CPC"}, "47546": {"parent_area": null, "generation_high":
85
+ 20, "all_names": {}, "id": 47546, "codes": {"ons": "E02006473"}, "name": "North
86
+ Warwickshire 006", "country": "E", "type_name": "Middle Layer Super Output
87
+ Area (Generalised)", "generation_low": 13, "country_name": "England", "type":
88
+ "OMG"}, "2458": {"parent_area": null, "generation_high": 20, "all_names":
89
+ {}, "id": 2458, "codes": {"ons": "44UB", "gss": "E07000218", "unit_id": "10124"},
90
+ "name": "North Warwickshire Borough Council", "country": "E", "type_name":
91
+ "District council", "generation_low": 1, "country_name": "England", "type":
92
+ "DIS"}, "900000": {"parent_area": null, "generation_high": 19, "all_names":
93
+ {}, "id": 900000, "codes": {}, "name": "House of Commons", "country": "",
94
+ "type_name": "UK Parliament", "generation_low": 1, "country_name": "-", "type":
95
+ "WMP"}}, "northing": 288805}'
96
+ http_version: '1.1'
97
+ recorded_at: Tue, 17 Sep 2013 14:44:20 GMT
98
+ - request:
99
+ method: get
100
+ uri: http://mapit.mysociety.org/point/4326/-1.706805276569471,52.49678940995588
101
+ body:
102
+ encoding: US-ASCII
103
+ string: ''
104
+ headers:
105
+ accept:
106
+ - ! '*/*'
107
+ user-agent:
108
+ - Ruby
109
+ response:
110
+ status:
111
+ code: 200
112
+ message: OK
113
+ headers:
114
+ expires:
115
+ - Tue, 15 Oct 2013 13:29:35 GMT
116
+ vary:
117
+ - Cookie,Accept-Encoding
118
+ etag:
119
+ - ! '"dd54c79a7ffa9ada97f196e2b607b2e1;gzip"'
120
+ cache-control:
121
+ - max-age=2419200
122
+ access-control-allow-origin:
123
+ - ! '*'
124
+ last-modified:
125
+ - Tue, 17 Sep 2013 13:29:35 GMT
126
+ content-type:
127
+ - application/json; charset=utf-8
128
+ x-url:
129
+ - /point/4326/-1.706805276569471,52.49678940995588
130
+ transfer-encoding:
131
+ - chunked
132
+ date:
133
+ - Tue, 17 Sep 2013 14:44:20 GMT
134
+ age:
135
+ - '4485'
136
+ connection:
137
+ - keep-alive
138
+ body:
139
+ encoding: US-ASCII
140
+ string: ! '{"40352": {"parent_area": null, "generation_high": 20, "all_names":
141
+ {}, "id": 40352, "codes": {"ons": "E02006473"}, "name": "North Warwickshire
142
+ 006", "country": "E", "type_name": "Middle Layer Super Output Area (Full)",
143
+ "generation_low": 13, "country_name": "England", "type": "OMF"}, "11809":
144
+ {"parent_area": null, "generation_high": 20, "all_names": {}, "id": 11809,
145
+ "codes": {"ons": "05", "gss": "E15000005", "unit_id": "41426"}, "name": "West
146
+ Midlands", "country": "E", "type_name": "European region", "generation_low":
147
+ 1, "country_name": "England", "type": "EUR"}, "2243": {"parent_area": null,
148
+ "generation_high": 20, "all_names": {}, "id": 2243, "codes": {"ons": "44",
149
+ "gss": "E10000031", "unit_id": "10049"}, "name": "Warwickshire County Council",
150
+ "country": "E", "type_name": "County council", "generation_low": 1, "country_name":
151
+ "England", "type": "CTY"}, "66024": {"parent_area": null, "generation_high":
152
+ 20, "all_names": {}, "id": 66024, "codes": {"gss": "E14000854", "unit_id":
153
+ "24700"}, "name": "North Warwickshire", "country": "E", "type_name": "UK Parliament
154
+ constituency", "generation_low": 13, "country_name": "England", "type": "WMC"},
155
+ "15881": {"parent_area": 2243, "generation_high": 20, "all_names": {}, "id":
156
+ 15881, "codes": {"unit_id": "10112"}, "name": "Coleshill", "country": "E",
157
+ "type_name": "County council electoral division", "generation_low": 3, "country_name":
158
+ "England", "type": "CED"}, "97162": {"parent_area": null, "generation_high":
159
+ 20, "all_names": {}, "id": 97162, "codes": {"ons": "E01031021"}, "name": "North
160
+ Warwickshire 006C", "country": "E", "type_name": "Lower Layer Super Output
161
+ Area (Full)", "generation_low": 13, "country_name": "England", "type": "OLF"},
162
+ "131540": {"parent_area": null, "generation_high": 20, "all_names": {}, "id":
163
+ 131540, "codes": {"ons": "E01031021"}, "name": "North Warwickshire 006C",
164
+ "country": "E", "type_name": "Lower Layer Super Output Area (Generalised)",
165
+ "generation_low": 13, "country_name": "England", "type": "OLG"}, "7606": {"parent_area":
166
+ 2458, "generation_high": 20, "all_names": {}, "id": 7606, "codes": {"ons":
167
+ "44UBGC", "gss": "E05007463", "unit_id": "10113"}, "name": "Coleshill South",
168
+ "country": "E", "type_name": "District council ward", "generation_low": 1,
169
+ "country_name": "England", "type": "DIW"}, "55160": {"parent_area": 2458,
170
+ "generation_high": 20, "all_names": {}, "id": 55160, "codes": {"ons": "44UB010",
171
+ "gss": "E04009636", "unit_id": "10183"}, "name": "Coleshill", "country": "E",
172
+ "type_name": "Civil parish/community", "generation_low": 12, "country_name":
173
+ "England", "type": "CPC"}, "47546": {"parent_area": null, "generation_high":
174
+ 20, "all_names": {}, "id": 47546, "codes": {"ons": "E02006473"}, "name": "North
175
+ Warwickshire 006", "country": "E", "type_name": "Middle Layer Super Output
176
+ Area (Generalised)", "generation_low": 13, "country_name": "England", "type":
177
+ "OMG"}, "2458": {"parent_area": null, "generation_high": 20, "all_names":
178
+ {}, "id": 2458, "codes": {"ons": "44UB", "gss": "E07000218", "unit_id": "10124"},
179
+ "name": "North Warwickshire Borough Council", "country": "E", "type_name":
180
+ "District council", "generation_low": 1, "country_name": "England", "type":
181
+ "DIS"}}'
182
+ http_version: '1.1'
183
+ recorded_at: Tue, 17 Sep 2013 14:44:20 GMT
184
+ - request:
185
+ method: get
186
+ uri: http://mapit.mysociety.org/postcode/B463LD
187
+ body:
188
+ encoding: US-ASCII
189
+ string: ''
190
+ headers:
191
+ accept:
192
+ - ! '*/*'
193
+ user-agent:
194
+ - Ruby
195
+ response:
196
+ status:
197
+ code: 200
198
+ message: OK
199
+ headers:
200
+ expires:
201
+ - Tue, 15 Oct 2013 13:29:35 GMT
202
+ vary:
203
+ - Cookie,Accept-Encoding
204
+ etag:
205
+ - ! '"40eca97e347e9ac2c1ce9caca6bfb5a2;gzip"'
206
+ cache-control:
207
+ - max-age=2419200
208
+ access-control-allow-origin:
209
+ - ! '*'
210
+ last-modified:
211
+ - Tue, 17 Sep 2013 13:29:35 GMT
212
+ content-type:
213
+ - application/json; charset=utf-8
214
+ x-url:
215
+ - /postcode/B463LD
216
+ transfer-encoding:
217
+ - chunked
218
+ date:
219
+ - Tue, 17 Sep 2013 14:44:20 GMT
220
+ age:
221
+ - '4485'
222
+ connection:
223
+ - keep-alive
224
+ body:
225
+ encoding: US-ASCII
226
+ string: ! '{"wgs84_lat": 52.496789409955881, "coordsyst": "G", "shortcuts":
227
+ {"WMC": 66024, "ward": {"county": 15881, "district": 7606}, "council": {"county":
228
+ 2243, "district": 2458}}, "wgs84_lon": -1.706805276569471, "postcode": "B46
229
+ 3LD", "easting": 420002, "areas": {"40352": {"parent_area": null, "generation_high":
230
+ 20, "all_names": {}, "id": 40352, "codes": {"ons": "E02006473"}, "name": "North
231
+ Warwickshire 006", "country": "E", "type_name": "Middle Layer Super Output
232
+ Area (Full)", "generation_low": 13, "country_name": "England", "type": "OMF"},
233
+ "11809": {"parent_area": null, "generation_high": 20, "all_names": {}, "id":
234
+ 11809, "codes": {"ons": "05", "gss": "E15000005", "unit_id": "41426"}, "name":
235
+ "West Midlands", "country": "E", "type_name": "European region", "generation_low":
236
+ 1, "country_name": "England", "type": "EUR"}, "2243": {"parent_area": null,
237
+ "generation_high": 20, "all_names": {}, "id": 2243, "codes": {"ons": "44",
238
+ "gss": "E10000031", "unit_id": "10049"}, "name": "Warwickshire County Council",
239
+ "country": "E", "type_name": "County council", "generation_low": 1, "country_name":
240
+ "England", "type": "CTY"}, "900001": {"parent_area": null, "generation_high":
241
+ 20, "all_names": {}, "id": 900001, "codes": {}, "name": "European Parliament",
242
+ "country": "", "type_name": "European Parliament", "generation_low": 1, "country_name":
243
+ "-", "type": "EUP"}, "66024": {"parent_area": null, "generation_high": 20,
244
+ "all_names": {}, "id": 66024, "codes": {"gss": "E14000854", "unit_id": "24700"},
245
+ "name": "North Warwickshire", "country": "E", "type_name": "UK Parliament
246
+ constituency", "generation_low": 13, "country_name": "England", "type": "WMC"},
247
+ "15881": {"parent_area": 2243, "generation_high": 20, "all_names": {}, "id":
248
+ 15881, "codes": {"unit_id": "10112"}, "name": "Coleshill", "country": "E",
249
+ "type_name": "County council electoral division", "generation_low": 3, "country_name":
250
+ "England", "type": "CED"}, "97162": {"parent_area": null, "generation_high":
251
+ 20, "all_names": {}, "id": 97162, "codes": {"ons": "E01031021"}, "name": "North
252
+ Warwickshire 006C", "country": "E", "type_name": "Lower Layer Super Output
253
+ Area (Full)", "generation_low": 13, "country_name": "England", "type": "OLF"},
254
+ "131540": {"parent_area": null, "generation_high": 20, "all_names": {}, "id":
255
+ 131540, "codes": {"ons": "E01031021"}, "name": "North Warwickshire 006C",
256
+ "country": "E", "type_name": "Lower Layer Super Output Area (Generalised)",
257
+ "generation_low": 13, "country_name": "England", "type": "OLG"}, "7606": {"parent_area":
258
+ 2458, "generation_high": 20, "all_names": {}, "id": 7606, "codes": {"ons":
259
+ "44UBGC", "gss": "E05007463", "unit_id": "10113"}, "name": "Coleshill South",
260
+ "country": "E", "type_name": "District council ward", "generation_low": 1,
261
+ "country_name": "England", "type": "DIW"}, "55160": {"parent_area": 2458,
262
+ "generation_high": 20, "all_names": {}, "id": 55160, "codes": {"ons": "44UB010",
263
+ "gss": "E04009636", "unit_id": "10183"}, "name": "Coleshill", "country": "E",
264
+ "type_name": "Civil parish/community", "generation_low": 12, "country_name":
265
+ "England", "type": "CPC"}, "47546": {"parent_area": null, "generation_high":
266
+ 20, "all_names": {}, "id": 47546, "codes": {"ons": "E02006473"}, "name": "North
267
+ Warwickshire 006", "country": "E", "type_name": "Middle Layer Super Output
268
+ Area (Generalised)", "generation_low": 13, "country_name": "England", "type":
269
+ "OMG"}, "2458": {"parent_area": null, "generation_high": 20, "all_names":
270
+ {}, "id": 2458, "codes": {"ons": "44UB", "gss": "E07000218", "unit_id": "10124"},
271
+ "name": "North Warwickshire Borough Council", "country": "E", "type_name":
272
+ "District council", "generation_low": 1, "country_name": "England", "type":
273
+ "DIS"}, "900000": {"parent_area": null, "generation_high": 19, "all_names":
274
+ {}, "id": 900000, "codes": {}, "name": "House of Commons", "country": "",
275
+ "type_name": "UK Parliament", "generation_low": 1, "country_name": "-", "type":
276
+ "WMP"}}, "northing": 288805}'
277
+ http_version: '1.1'
278
+ recorded_at: Tue, 17 Sep 2013 14:44:20 GMT
279
+ - request:
280
+ method: get
281
+ uri: http://mapit.mysociety.org/point/4326/-1.706805276569471,52.49678940995588
282
+ body:
283
+ encoding: US-ASCII
284
+ string: ''
285
+ headers:
286
+ accept:
287
+ - ! '*/*'
288
+ user-agent:
289
+ - Ruby
290
+ response:
291
+ status:
292
+ code: 200
293
+ message: OK
294
+ headers:
295
+ expires:
296
+ - Tue, 15 Oct 2013 13:29:35 GMT
297
+ vary:
298
+ - Cookie,Accept-Encoding
299
+ etag:
300
+ - ! '"dd54c79a7ffa9ada97f196e2b607b2e1;gzip"'
301
+ cache-control:
302
+ - max-age=2419200
303
+ access-control-allow-origin:
304
+ - ! '*'
305
+ last-modified:
306
+ - Tue, 17 Sep 2013 13:29:35 GMT
307
+ content-type:
308
+ - application/json; charset=utf-8
309
+ x-url:
310
+ - /point/4326/-1.706805276569471,52.49678940995588
311
+ transfer-encoding:
312
+ - chunked
313
+ date:
314
+ - Tue, 17 Sep 2013 14:44:20 GMT
315
+ age:
316
+ - '4485'
317
+ connection:
318
+ - keep-alive
319
+ body:
320
+ encoding: US-ASCII
321
+ string: ! '{"40352": {"parent_area": null, "generation_high": 20, "all_names":
322
+ {}, "id": 40352, "codes": {"ons": "E02006473"}, "name": "North Warwickshire
323
+ 006", "country": "E", "type_name": "Middle Layer Super Output Area (Full)",
324
+ "generation_low": 13, "country_name": "England", "type": "OMF"}, "11809":
325
+ {"parent_area": null, "generation_high": 20, "all_names": {}, "id": 11809,
326
+ "codes": {"ons": "05", "gss": "E15000005", "unit_id": "41426"}, "name": "West
327
+ Midlands", "country": "E", "type_name": "European region", "generation_low":
328
+ 1, "country_name": "England", "type": "EUR"}, "2243": {"parent_area": null,
329
+ "generation_high": 20, "all_names": {}, "id": 2243, "codes": {"ons": "44",
330
+ "gss": "E10000031", "unit_id": "10049"}, "name": "Warwickshire County Council",
331
+ "country": "E", "type_name": "County council", "generation_low": 1, "country_name":
332
+ "England", "type": "CTY"}, "66024": {"parent_area": null, "generation_high":
333
+ 20, "all_names": {}, "id": 66024, "codes": {"gss": "E14000854", "unit_id":
334
+ "24700"}, "name": "North Warwickshire", "country": "E", "type_name": "UK Parliament
335
+ constituency", "generation_low": 13, "country_name": "England", "type": "WMC"},
336
+ "15881": {"parent_area": 2243, "generation_high": 20, "all_names": {}, "id":
337
+ 15881, "codes": {"unit_id": "10112"}, "name": "Coleshill", "country": "E",
338
+ "type_name": "County council electoral division", "generation_low": 3, "country_name":
339
+ "England", "type": "CED"}, "97162": {"parent_area": null, "generation_high":
340
+ 20, "all_names": {}, "id": 97162, "codes": {"ons": "E01031021"}, "name": "North
341
+ Warwickshire 006C", "country": "E", "type_name": "Lower Layer Super Output
342
+ Area (Full)", "generation_low": 13, "country_name": "England", "type": "OLF"},
343
+ "131540": {"parent_area": null, "generation_high": 20, "all_names": {}, "id":
344
+ 131540, "codes": {"ons": "E01031021"}, "name": "North Warwickshire 006C",
345
+ "country": "E", "type_name": "Lower Layer Super Output Area (Generalised)",
346
+ "generation_low": 13, "country_name": "England", "type": "OLG"}, "7606": {"parent_area":
347
+ 2458, "generation_high": 20, "all_names": {}, "id": 7606, "codes": {"ons":
348
+ "44UBGC", "gss": "E05007463", "unit_id": "10113"}, "name": "Coleshill South",
349
+ "country": "E", "type_name": "District council ward", "generation_low": 1,
350
+ "country_name": "England", "type": "DIW"}, "55160": {"parent_area": 2458,
351
+ "generation_high": 20, "all_names": {}, "id": 55160, "codes": {"ons": "44UB010",
352
+ "gss": "E04009636", "unit_id": "10183"}, "name": "Coleshill", "country": "E",
353
+ "type_name": "Civil parish/community", "generation_low": 12, "country_name":
354
+ "England", "type": "CPC"}, "47546": {"parent_area": null, "generation_high":
355
+ 20, "all_names": {}, "id": 47546, "codes": {"ons": "E02006473"}, "name": "North
356
+ Warwickshire 006", "country": "E", "type_name": "Middle Layer Super Output
357
+ Area (Generalised)", "generation_low": 13, "country_name": "England", "type":
358
+ "OMG"}, "2458": {"parent_area": null, "generation_high": 20, "all_names":
359
+ {}, "id": 2458, "codes": {"ons": "44UB", "gss": "E07000218", "unit_id": "10124"},
360
+ "name": "North Warwickshire Borough Council", "country": "E", "type_name":
361
+ "District council", "generation_low": 1, "country_name": "England", "type":
362
+ "DIS"}}'
363
+ http_version: '1.1'
364
+ recorded_at: Tue, 17 Sep 2013 14:44:20 GMT
365
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,365 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://mapit.mysociety.org/postcode/B463LD
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ accept:
11
+ - ! '*/*'
12
+ user-agent:
13
+ - Ruby
14
+ response:
15
+ status:
16
+ code: 200
17
+ message: OK
18
+ headers:
19
+ expires:
20
+ - Tue, 15 Oct 2013 13:29:35 GMT
21
+ vary:
22
+ - Cookie,Accept-Encoding
23
+ etag:
24
+ - ! '"40eca97e347e9ac2c1ce9caca6bfb5a2;gzip"'
25
+ cache-control:
26
+ - max-age=2419200
27
+ access-control-allow-origin:
28
+ - ! '*'
29
+ last-modified:
30
+ - Tue, 17 Sep 2013 13:29:35 GMT
31
+ content-type:
32
+ - application/json; charset=utf-8
33
+ x-url:
34
+ - /postcode/B463LD
35
+ transfer-encoding:
36
+ - chunked
37
+ date:
38
+ - Tue, 17 Sep 2013 14:44:19 GMT
39
+ age:
40
+ - '4484'
41
+ connection:
42
+ - keep-alive
43
+ body:
44
+ encoding: US-ASCII
45
+ string: ! '{"wgs84_lat": 52.496789409955881, "coordsyst": "G", "shortcuts":
46
+ {"WMC": 66024, "ward": {"county": 15881, "district": 7606}, "council": {"county":
47
+ 2243, "district": 2458}}, "wgs84_lon": -1.706805276569471, "postcode": "B46
48
+ 3LD", "easting": 420002, "areas": {"40352": {"parent_area": null, "generation_high":
49
+ 20, "all_names": {}, "id": 40352, "codes": {"ons": "E02006473"}, "name": "North
50
+ Warwickshire 006", "country": "E", "type_name": "Middle Layer Super Output
51
+ Area (Full)", "generation_low": 13, "country_name": "England", "type": "OMF"},
52
+ "11809": {"parent_area": null, "generation_high": 20, "all_names": {}, "id":
53
+ 11809, "codes": {"ons": "05", "gss": "E15000005", "unit_id": "41426"}, "name":
54
+ "West Midlands", "country": "E", "type_name": "European region", "generation_low":
55
+ 1, "country_name": "England", "type": "EUR"}, "2243": {"parent_area": null,
56
+ "generation_high": 20, "all_names": {}, "id": 2243, "codes": {"ons": "44",
57
+ "gss": "E10000031", "unit_id": "10049"}, "name": "Warwickshire County Council",
58
+ "country": "E", "type_name": "County council", "generation_low": 1, "country_name":
59
+ "England", "type": "CTY"}, "900001": {"parent_area": null, "generation_high":
60
+ 20, "all_names": {}, "id": 900001, "codes": {}, "name": "European Parliament",
61
+ "country": "", "type_name": "European Parliament", "generation_low": 1, "country_name":
62
+ "-", "type": "EUP"}, "66024": {"parent_area": null, "generation_high": 20,
63
+ "all_names": {}, "id": 66024, "codes": {"gss": "E14000854", "unit_id": "24700"},
64
+ "name": "North Warwickshire", "country": "E", "type_name": "UK Parliament
65
+ constituency", "generation_low": 13, "country_name": "England", "type": "WMC"},
66
+ "15881": {"parent_area": 2243, "generation_high": 20, "all_names": {}, "id":
67
+ 15881, "codes": {"unit_id": "10112"}, "name": "Coleshill", "country": "E",
68
+ "type_name": "County council electoral division", "generation_low": 3, "country_name":
69
+ "England", "type": "CED"}, "97162": {"parent_area": null, "generation_high":
70
+ 20, "all_names": {}, "id": 97162, "codes": {"ons": "E01031021"}, "name": "North
71
+ Warwickshire 006C", "country": "E", "type_name": "Lower Layer Super Output
72
+ Area (Full)", "generation_low": 13, "country_name": "England", "type": "OLF"},
73
+ "131540": {"parent_area": null, "generation_high": 20, "all_names": {}, "id":
74
+ 131540, "codes": {"ons": "E01031021"}, "name": "North Warwickshire 006C",
75
+ "country": "E", "type_name": "Lower Layer Super Output Area (Generalised)",
76
+ "generation_low": 13, "country_name": "England", "type": "OLG"}, "7606": {"parent_area":
77
+ 2458, "generation_high": 20, "all_names": {}, "id": 7606, "codes": {"ons":
78
+ "44UBGC", "gss": "E05007463", "unit_id": "10113"}, "name": "Coleshill South",
79
+ "country": "E", "type_name": "District council ward", "generation_low": 1,
80
+ "country_name": "England", "type": "DIW"}, "55160": {"parent_area": 2458,
81
+ "generation_high": 20, "all_names": {}, "id": 55160, "codes": {"ons": "44UB010",
82
+ "gss": "E04009636", "unit_id": "10183"}, "name": "Coleshill", "country": "E",
83
+ "type_name": "Civil parish/community", "generation_low": 12, "country_name":
84
+ "England", "type": "CPC"}, "47546": {"parent_area": null, "generation_high":
85
+ 20, "all_names": {}, "id": 47546, "codes": {"ons": "E02006473"}, "name": "North
86
+ Warwickshire 006", "country": "E", "type_name": "Middle Layer Super Output
87
+ Area (Generalised)", "generation_low": 13, "country_name": "England", "type":
88
+ "OMG"}, "2458": {"parent_area": null, "generation_high": 20, "all_names":
89
+ {}, "id": 2458, "codes": {"ons": "44UB", "gss": "E07000218", "unit_id": "10124"},
90
+ "name": "North Warwickshire Borough Council", "country": "E", "type_name":
91
+ "District council", "generation_low": 1, "country_name": "England", "type":
92
+ "DIS"}, "900000": {"parent_area": null, "generation_high": 19, "all_names":
93
+ {}, "id": 900000, "codes": {}, "name": "House of Commons", "country": "",
94
+ "type_name": "UK Parliament", "generation_low": 1, "country_name": "-", "type":
95
+ "WMP"}}, "northing": 288805}'
96
+ http_version: '1.1'
97
+ recorded_at: Tue, 17 Sep 2013 14:44:19 GMT
98
+ - request:
99
+ method: get
100
+ uri: http://mapit.mysociety.org/point/4326/-1.706805276569471,52.49678940995588
101
+ body:
102
+ encoding: US-ASCII
103
+ string: ''
104
+ headers:
105
+ accept:
106
+ - ! '*/*'
107
+ user-agent:
108
+ - Ruby
109
+ response:
110
+ status:
111
+ code: 200
112
+ message: OK
113
+ headers:
114
+ expires:
115
+ - Tue, 15 Oct 2013 13:29:35 GMT
116
+ vary:
117
+ - Cookie,Accept-Encoding
118
+ etag:
119
+ - ! '"dd54c79a7ffa9ada97f196e2b607b2e1;gzip"'
120
+ cache-control:
121
+ - max-age=2419200
122
+ access-control-allow-origin:
123
+ - ! '*'
124
+ last-modified:
125
+ - Tue, 17 Sep 2013 13:29:35 GMT
126
+ content-type:
127
+ - application/json; charset=utf-8
128
+ x-url:
129
+ - /point/4326/-1.706805276569471,52.49678940995588
130
+ transfer-encoding:
131
+ - chunked
132
+ date:
133
+ - Tue, 17 Sep 2013 14:44:19 GMT
134
+ age:
135
+ - '4484'
136
+ connection:
137
+ - keep-alive
138
+ body:
139
+ encoding: US-ASCII
140
+ string: ! '{"40352": {"parent_area": null, "generation_high": 20, "all_names":
141
+ {}, "id": 40352, "codes": {"ons": "E02006473"}, "name": "North Warwickshire
142
+ 006", "country": "E", "type_name": "Middle Layer Super Output Area (Full)",
143
+ "generation_low": 13, "country_name": "England", "type": "OMF"}, "11809":
144
+ {"parent_area": null, "generation_high": 20, "all_names": {}, "id": 11809,
145
+ "codes": {"ons": "05", "gss": "E15000005", "unit_id": "41426"}, "name": "West
146
+ Midlands", "country": "E", "type_name": "European region", "generation_low":
147
+ 1, "country_name": "England", "type": "EUR"}, "2243": {"parent_area": null,
148
+ "generation_high": 20, "all_names": {}, "id": 2243, "codes": {"ons": "44",
149
+ "gss": "E10000031", "unit_id": "10049"}, "name": "Warwickshire County Council",
150
+ "country": "E", "type_name": "County council", "generation_low": 1, "country_name":
151
+ "England", "type": "CTY"}, "66024": {"parent_area": null, "generation_high":
152
+ 20, "all_names": {}, "id": 66024, "codes": {"gss": "E14000854", "unit_id":
153
+ "24700"}, "name": "North Warwickshire", "country": "E", "type_name": "UK Parliament
154
+ constituency", "generation_low": 13, "country_name": "England", "type": "WMC"},
155
+ "15881": {"parent_area": 2243, "generation_high": 20, "all_names": {}, "id":
156
+ 15881, "codes": {"unit_id": "10112"}, "name": "Coleshill", "country": "E",
157
+ "type_name": "County council electoral division", "generation_low": 3, "country_name":
158
+ "England", "type": "CED"}, "97162": {"parent_area": null, "generation_high":
159
+ 20, "all_names": {}, "id": 97162, "codes": {"ons": "E01031021"}, "name": "North
160
+ Warwickshire 006C", "country": "E", "type_name": "Lower Layer Super Output
161
+ Area (Full)", "generation_low": 13, "country_name": "England", "type": "OLF"},
162
+ "131540": {"parent_area": null, "generation_high": 20, "all_names": {}, "id":
163
+ 131540, "codes": {"ons": "E01031021"}, "name": "North Warwickshire 006C",
164
+ "country": "E", "type_name": "Lower Layer Super Output Area (Generalised)",
165
+ "generation_low": 13, "country_name": "England", "type": "OLG"}, "7606": {"parent_area":
166
+ 2458, "generation_high": 20, "all_names": {}, "id": 7606, "codes": {"ons":
167
+ "44UBGC", "gss": "E05007463", "unit_id": "10113"}, "name": "Coleshill South",
168
+ "country": "E", "type_name": "District council ward", "generation_low": 1,
169
+ "country_name": "England", "type": "DIW"}, "55160": {"parent_area": 2458,
170
+ "generation_high": 20, "all_names": {}, "id": 55160, "codes": {"ons": "44UB010",
171
+ "gss": "E04009636", "unit_id": "10183"}, "name": "Coleshill", "country": "E",
172
+ "type_name": "Civil parish/community", "generation_low": 12, "country_name":
173
+ "England", "type": "CPC"}, "47546": {"parent_area": null, "generation_high":
174
+ 20, "all_names": {}, "id": 47546, "codes": {"ons": "E02006473"}, "name": "North
175
+ Warwickshire 006", "country": "E", "type_name": "Middle Layer Super Output
176
+ Area (Generalised)", "generation_low": 13, "country_name": "England", "type":
177
+ "OMG"}, "2458": {"parent_area": null, "generation_high": 20, "all_names":
178
+ {}, "id": 2458, "codes": {"ons": "44UB", "gss": "E07000218", "unit_id": "10124"},
179
+ "name": "North Warwickshire Borough Council", "country": "E", "type_name":
180
+ "District council", "generation_low": 1, "country_name": "England", "type":
181
+ "DIS"}}'
182
+ http_version: '1.1'
183
+ recorded_at: Tue, 17 Sep 2013 14:44:19 GMT
184
+ - request:
185
+ method: get
186
+ uri: http://mapit.mysociety.org/postcode/B463LD
187
+ body:
188
+ encoding: US-ASCII
189
+ string: ''
190
+ headers:
191
+ accept:
192
+ - ! '*/*'
193
+ user-agent:
194
+ - Ruby
195
+ response:
196
+ status:
197
+ code: 200
198
+ message: OK
199
+ headers:
200
+ expires:
201
+ - Tue, 15 Oct 2013 13:29:35 GMT
202
+ vary:
203
+ - Cookie,Accept-Encoding
204
+ etag:
205
+ - ! '"40eca97e347e9ac2c1ce9caca6bfb5a2;gzip"'
206
+ cache-control:
207
+ - max-age=2419200
208
+ access-control-allow-origin:
209
+ - ! '*'
210
+ last-modified:
211
+ - Tue, 17 Sep 2013 13:29:35 GMT
212
+ content-type:
213
+ - application/json; charset=utf-8
214
+ x-url:
215
+ - /postcode/B463LD
216
+ transfer-encoding:
217
+ - chunked
218
+ date:
219
+ - Tue, 17 Sep 2013 14:44:19 GMT
220
+ age:
221
+ - '4484'
222
+ connection:
223
+ - keep-alive
224
+ body:
225
+ encoding: US-ASCII
226
+ string: ! '{"wgs84_lat": 52.496789409955881, "coordsyst": "G", "shortcuts":
227
+ {"WMC": 66024, "ward": {"county": 15881, "district": 7606}, "council": {"county":
228
+ 2243, "district": 2458}}, "wgs84_lon": -1.706805276569471, "postcode": "B46
229
+ 3LD", "easting": 420002, "areas": {"40352": {"parent_area": null, "generation_high":
230
+ 20, "all_names": {}, "id": 40352, "codes": {"ons": "E02006473"}, "name": "North
231
+ Warwickshire 006", "country": "E", "type_name": "Middle Layer Super Output
232
+ Area (Full)", "generation_low": 13, "country_name": "England", "type": "OMF"},
233
+ "11809": {"parent_area": null, "generation_high": 20, "all_names": {}, "id":
234
+ 11809, "codes": {"ons": "05", "gss": "E15000005", "unit_id": "41426"}, "name":
235
+ "West Midlands", "country": "E", "type_name": "European region", "generation_low":
236
+ 1, "country_name": "England", "type": "EUR"}, "2243": {"parent_area": null,
237
+ "generation_high": 20, "all_names": {}, "id": 2243, "codes": {"ons": "44",
238
+ "gss": "E10000031", "unit_id": "10049"}, "name": "Warwickshire County Council",
239
+ "country": "E", "type_name": "County council", "generation_low": 1, "country_name":
240
+ "England", "type": "CTY"}, "900001": {"parent_area": null, "generation_high":
241
+ 20, "all_names": {}, "id": 900001, "codes": {}, "name": "European Parliament",
242
+ "country": "", "type_name": "European Parliament", "generation_low": 1, "country_name":
243
+ "-", "type": "EUP"}, "66024": {"parent_area": null, "generation_high": 20,
244
+ "all_names": {}, "id": 66024, "codes": {"gss": "E14000854", "unit_id": "24700"},
245
+ "name": "North Warwickshire", "country": "E", "type_name": "UK Parliament
246
+ constituency", "generation_low": 13, "country_name": "England", "type": "WMC"},
247
+ "15881": {"parent_area": 2243, "generation_high": 20, "all_names": {}, "id":
248
+ 15881, "codes": {"unit_id": "10112"}, "name": "Coleshill", "country": "E",
249
+ "type_name": "County council electoral division", "generation_low": 3, "country_name":
250
+ "England", "type": "CED"}, "97162": {"parent_area": null, "generation_high":
251
+ 20, "all_names": {}, "id": 97162, "codes": {"ons": "E01031021"}, "name": "North
252
+ Warwickshire 006C", "country": "E", "type_name": "Lower Layer Super Output
253
+ Area (Full)", "generation_low": 13, "country_name": "England", "type": "OLF"},
254
+ "131540": {"parent_area": null, "generation_high": 20, "all_names": {}, "id":
255
+ 131540, "codes": {"ons": "E01031021"}, "name": "North Warwickshire 006C",
256
+ "country": "E", "type_name": "Lower Layer Super Output Area (Generalised)",
257
+ "generation_low": 13, "country_name": "England", "type": "OLG"}, "7606": {"parent_area":
258
+ 2458, "generation_high": 20, "all_names": {}, "id": 7606, "codes": {"ons":
259
+ "44UBGC", "gss": "E05007463", "unit_id": "10113"}, "name": "Coleshill South",
260
+ "country": "E", "type_name": "District council ward", "generation_low": 1,
261
+ "country_name": "England", "type": "DIW"}, "55160": {"parent_area": 2458,
262
+ "generation_high": 20, "all_names": {}, "id": 55160, "codes": {"ons": "44UB010",
263
+ "gss": "E04009636", "unit_id": "10183"}, "name": "Coleshill", "country": "E",
264
+ "type_name": "Civil parish/community", "generation_low": 12, "country_name":
265
+ "England", "type": "CPC"}, "47546": {"parent_area": null, "generation_high":
266
+ 20, "all_names": {}, "id": 47546, "codes": {"ons": "E02006473"}, "name": "North
267
+ Warwickshire 006", "country": "E", "type_name": "Middle Layer Super Output
268
+ Area (Generalised)", "generation_low": 13, "country_name": "England", "type":
269
+ "OMG"}, "2458": {"parent_area": null, "generation_high": 20, "all_names":
270
+ {}, "id": 2458, "codes": {"ons": "44UB", "gss": "E07000218", "unit_id": "10124"},
271
+ "name": "North Warwickshire Borough Council", "country": "E", "type_name":
272
+ "District council", "generation_low": 1, "country_name": "England", "type":
273
+ "DIS"}, "900000": {"parent_area": null, "generation_high": 19, "all_names":
274
+ {}, "id": 900000, "codes": {}, "name": "House of Commons", "country": "",
275
+ "type_name": "UK Parliament", "generation_low": 1, "country_name": "-", "type":
276
+ "WMP"}}, "northing": 288805}'
277
+ http_version: '1.1'
278
+ recorded_at: Tue, 17 Sep 2013 14:44:19 GMT
279
+ - request:
280
+ method: get
281
+ uri: http://mapit.mysociety.org/point/4326/-1.706805276569471,52.49678940995588
282
+ body:
283
+ encoding: US-ASCII
284
+ string: ''
285
+ headers:
286
+ accept:
287
+ - ! '*/*'
288
+ user-agent:
289
+ - Ruby
290
+ response:
291
+ status:
292
+ code: 200
293
+ message: OK
294
+ headers:
295
+ expires:
296
+ - Tue, 15 Oct 2013 13:29:35 GMT
297
+ vary:
298
+ - Cookie,Accept-Encoding
299
+ etag:
300
+ - ! '"dd54c79a7ffa9ada97f196e2b607b2e1;gzip"'
301
+ cache-control:
302
+ - max-age=2419200
303
+ access-control-allow-origin:
304
+ - ! '*'
305
+ last-modified:
306
+ - Tue, 17 Sep 2013 13:29:35 GMT
307
+ content-type:
308
+ - application/json; charset=utf-8
309
+ x-url:
310
+ - /point/4326/-1.706805276569471,52.49678940995588
311
+ transfer-encoding:
312
+ - chunked
313
+ date:
314
+ - Tue, 17 Sep 2013 14:44:19 GMT
315
+ age:
316
+ - '4484'
317
+ connection:
318
+ - keep-alive
319
+ body:
320
+ encoding: US-ASCII
321
+ string: ! '{"40352": {"parent_area": null, "generation_high": 20, "all_names":
322
+ {}, "id": 40352, "codes": {"ons": "E02006473"}, "name": "North Warwickshire
323
+ 006", "country": "E", "type_name": "Middle Layer Super Output Area (Full)",
324
+ "generation_low": 13, "country_name": "England", "type": "OMF"}, "11809":
325
+ {"parent_area": null, "generation_high": 20, "all_names": {}, "id": 11809,
326
+ "codes": {"ons": "05", "gss": "E15000005", "unit_id": "41426"}, "name": "West
327
+ Midlands", "country": "E", "type_name": "European region", "generation_low":
328
+ 1, "country_name": "England", "type": "EUR"}, "2243": {"parent_area": null,
329
+ "generation_high": 20, "all_names": {}, "id": 2243, "codes": {"ons": "44",
330
+ "gss": "E10000031", "unit_id": "10049"}, "name": "Warwickshire County Council",
331
+ "country": "E", "type_name": "County council", "generation_low": 1, "country_name":
332
+ "England", "type": "CTY"}, "66024": {"parent_area": null, "generation_high":
333
+ 20, "all_names": {}, "id": 66024, "codes": {"gss": "E14000854", "unit_id":
334
+ "24700"}, "name": "North Warwickshire", "country": "E", "type_name": "UK Parliament
335
+ constituency", "generation_low": 13, "country_name": "England", "type": "WMC"},
336
+ "15881": {"parent_area": 2243, "generation_high": 20, "all_names": {}, "id":
337
+ 15881, "codes": {"unit_id": "10112"}, "name": "Coleshill", "country": "E",
338
+ "type_name": "County council electoral division", "generation_low": 3, "country_name":
339
+ "England", "type": "CED"}, "97162": {"parent_area": null, "generation_high":
340
+ 20, "all_names": {}, "id": 97162, "codes": {"ons": "E01031021"}, "name": "North
341
+ Warwickshire 006C", "country": "E", "type_name": "Lower Layer Super Output
342
+ Area (Full)", "generation_low": 13, "country_name": "England", "type": "OLF"},
343
+ "131540": {"parent_area": null, "generation_high": 20, "all_names": {}, "id":
344
+ 131540, "codes": {"ons": "E01031021"}, "name": "North Warwickshire 006C",
345
+ "country": "E", "type_name": "Lower Layer Super Output Area (Generalised)",
346
+ "generation_low": 13, "country_name": "England", "type": "OLG"}, "7606": {"parent_area":
347
+ 2458, "generation_high": 20, "all_names": {}, "id": 7606, "codes": {"ons":
348
+ "44UBGC", "gss": "E05007463", "unit_id": "10113"}, "name": "Coleshill South",
349
+ "country": "E", "type_name": "District council ward", "generation_low": 1,
350
+ "country_name": "England", "type": "DIW"}, "55160": {"parent_area": 2458,
351
+ "generation_high": 20, "all_names": {}, "id": 55160, "codes": {"ons": "44UB010",
352
+ "gss": "E04009636", "unit_id": "10183"}, "name": "Coleshill", "country": "E",
353
+ "type_name": "Civil parish/community", "generation_low": 12, "country_name":
354
+ "England", "type": "CPC"}, "47546": {"parent_area": null, "generation_high":
355
+ 20, "all_names": {}, "id": 47546, "codes": {"ons": "E02006473"}, "name": "North
356
+ Warwickshire 006", "country": "E", "type_name": "Middle Layer Super Output
357
+ Area (Generalised)", "generation_low": 13, "country_name": "England", "type":
358
+ "OMG"}, "2458": {"parent_area": null, "generation_high": 20, "all_names":
359
+ {}, "id": 2458, "codes": {"ons": "44UB", "gss": "E07000218", "unit_id": "10124"},
360
+ "name": "North Warwickshire Borough Council", "country": "E", "type_name":
361
+ "District council", "generation_low": 1, "country_name": "England", "type":
362
+ "DIS"}}'
363
+ http_version: '1.1'
364
+ recorded_at: Tue, 17 Sep 2013 14:44:19 GMT
365
+ recorded_with: VCR 2.4.0