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,355 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://mapit.mysociety.org/postcode/SW1A1AA
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
+ - Thu, 26 Sep 2013 12:29:30 GMT
21
+ vary:
22
+ - Cookie,Accept-Encoding
23
+ etag:
24
+ - ! '"2e5ca6db5b6ac0a3f008b0293a20a095;gzip"'
25
+ cache-control:
26
+ - max-age=2419200
27
+ access-control-allow-origin:
28
+ - ! '*'
29
+ last-modified:
30
+ - Thu, 29 Aug 2013 12:29:30 GMT
31
+ content-type:
32
+ - application/json; charset=utf-8
33
+ x-url:
34
+ - /postcode/SW1A1AA
35
+ transfer-encoding:
36
+ - chunked
37
+ date:
38
+ - Tue, 17 Sep 2013 14:44:17 GMT
39
+ age:
40
+ - '1649687'
41
+ connection:
42
+ - keep-alive
43
+ body:
44
+ encoding: US-ASCII
45
+ string: ! '{"wgs84_lat": 51.501009611553926, "coordsyst": "G", "shortcuts":
46
+ {"WMC": 65759, "ward": 8569, "council": 2504}, "wgs84_lon": -0.14158706711000901,
47
+ "postcode": "SW1A 1AA", "easting": 529090, "areas": {"900000": {"parent_area":
48
+ null, "generation_high": 19, "all_names": {}, "id": 900000, "codes": {}, "name":
49
+ "House of Commons", "country": "", "type_name": "UK Parliament", "generation_low":
50
+ 1, "country_name": "-", "type": "WMP"}, "900001": {"parent_area": null, "generation_high":
51
+ 20, "all_names": {}, "id": 900001, "codes": {}, "name": "European Parliament",
52
+ "country": "", "type_name": "European Parliament", "generation_low": 1, "country_name":
53
+ "-", "type": "EUP"}, "42050": {"parent_area": null, "generation_high": 20,
54
+ "all_names": {}, "id": 42050, "codes": {"ons": "E02000977"}, "name": "Westminster
55
+ 018", "country": "E", "type_name": "Middle Layer Super Output Area (Generalised)",
56
+ "generation_low": 13, "country_name": "England", "type": "OMG"}, "900006":
57
+ {"parent_area": null, "generation_high": 20, "all_names": {}, "id": 900006,
58
+ "codes": {}, "name": "London Assembly", "country": "E", "type_name": "London
59
+ Assembly area", "generation_low": 1, "country_name": "England", "type": "LAS"},
60
+ "2247": {"parent_area": null, "generation_high": 20, "all_names": {}, "id":
61
+ 2247, "codes": {"unit_id": "41441"}, "name": "Greater London Authority", "country":
62
+ "E", "type_name": "Greater London Authority", "generation_low": 1, "country_name":
63
+ "England", "type": "GLA"}, "34856": {"parent_area": null, "generation_high":
64
+ 20, "all_names": {}, "id": 34856, "codes": {"ons": "E02000977"}, "name": "Westminster
65
+ 018", "country": "E", "type_name": "Middle Layer Super Output Area (Full)",
66
+ "generation_low": 13, "country_name": "England", "type": "OMF"}, "105255":
67
+ {"parent_area": null, "generation_high": 20, "all_names": {}, "id": 105255,
68
+ "codes": {"ons": "E01004736"}, "name": "Westminster 018C", "country": "E",
69
+ "type_name": "Lower Layer Super Output Area (Generalised)", "generation_low":
70
+ 13, "country_name": "England", "type": "OLG"}, "900002": {"parent_area": 900006,
71
+ "generation_high": 20, "all_names": {}, "id": 900002, "codes": {}, "name":
72
+ "London Assembly", "country": "E", "type_name": "London Assembly area (shared)",
73
+ "generation_low": 1, "country_name": "England", "type": "LAE"}, "2504": {"parent_area":
74
+ null, "generation_high": 20, "all_names": {}, "id": 2504, "codes": {"ons":
75
+ "00BK", "gss": "E09000033", "unit_id": "11164"}, "name": "Westminster City
76
+ Council", "country": "E", "type_name": "London borough", "generation_low":
77
+ 1, "country_name": "England", "type": "LBO"}, "11828": {"parent_area": 2247,
78
+ "generation_high": 20, "all_names": {}, "id": 11828, "codes": {"gss": "E32000014",
79
+ "unit_id": "41449"}, "name": "West Central", "country": "E", "type_name":
80
+ "London Assembly constituency", "generation_low": 1, "country_name": "England",
81
+ "type": "LAC"}, "8569": {"parent_area": 2504, "generation_high": 20, "all_names":
82
+ {}, "id": 8569, "codes": {"ons": "00BKGQ", "gss": "E05000644", "unit_id":
83
+ "11162"}, "name": "St James''s", "country": "E", "type_name": "London borough
84
+ ward", "generation_low": 1, "country_name": "England", "type": "LBW"}, "70877":
85
+ {"parent_area": null, "generation_high": 20, "all_names": {}, "id": 70877,
86
+ "codes": {"ons": "E01004736"}, "name": "Westminster 018C", "country": "E",
87
+ "type_name": "Lower Layer Super Output Area (Full)", "generation_low": 13,
88
+ "country_name": "England", "type": "OLF"}, "11806": {"parent_area": null,
89
+ "generation_high": 20, "all_names": {}, "id": 11806, "codes": {"ons": "07",
90
+ "gss": "E15000007", "unit_id": "41428"}, "name": "London", "country": "E",
91
+ "type_name": "European region", "generation_low": 1, "country_name": "England",
92
+ "type": "EUR"}, "65759": {"parent_area": null, "generation_high": 20, "all_names":
93
+ {}, "id": 65759, "codes": {"gss": "E14000639", "unit_id": "25040"}, "name":
94
+ "Cities of London and Westminster", "country": "E", "type_name": "UK Parliament
95
+ constituency", "generation_low": 13, "country_name": "England", "type": "WMC"}},
96
+ "northing": 179645}'
97
+ http_version: '1.1'
98
+ recorded_at: Tue, 17 Sep 2013 14:44:17 GMT
99
+ - request:
100
+ method: get
101
+ uri: http://mapit.mysociety.org/point/4326/-0.141587067110009,51.501009611553926
102
+ body:
103
+ encoding: US-ASCII
104
+ string: ''
105
+ headers:
106
+ accept:
107
+ - ! '*/*'
108
+ user-agent:
109
+ - Ruby
110
+ response:
111
+ status:
112
+ code: 200
113
+ message: OK
114
+ headers:
115
+ expires:
116
+ - Tue, 15 Oct 2013 11:11:05 GMT
117
+ vary:
118
+ - Cookie,Accept-Encoding
119
+ etag:
120
+ - ! '"017a7a0a2be950c74ec3e27e78a9de30;gzip"'
121
+ cache-control:
122
+ - max-age=2419200
123
+ access-control-allow-origin:
124
+ - ! '*'
125
+ last-modified:
126
+ - Tue, 17 Sep 2013 11:11:05 GMT
127
+ content-type:
128
+ - application/json; charset=utf-8
129
+ x-url:
130
+ - /point/4326/-0.141587067110009,51.501009611553926
131
+ transfer-encoding:
132
+ - chunked
133
+ date:
134
+ - Tue, 17 Sep 2013 14:44:17 GMT
135
+ age:
136
+ - '12792'
137
+ connection:
138
+ - keep-alive
139
+ body:
140
+ encoding: US-ASCII
141
+ string: ! '{"42050": {"parent_area": null, "generation_high": 20, "all_names":
142
+ {}, "id": 42050, "codes": {"ons": "E02000977"}, "name": "Westminster 018",
143
+ "country": "E", "type_name": "Middle Layer Super Output Area (Generalised)",
144
+ "generation_low": 13, "country_name": "England", "type": "OMG"}, "2247": {"parent_area":
145
+ null, "generation_high": 20, "all_names": {}, "id": 2247, "codes": {"unit_id":
146
+ "41441"}, "name": "Greater London Authority", "country": "E", "type_name":
147
+ "Greater London Authority", "generation_low": 1, "country_name": "England",
148
+ "type": "GLA"}, "34856": {"parent_area": null, "generation_high": 20, "all_names":
149
+ {}, "id": 34856, "codes": {"ons": "E02000977"}, "name": "Westminster 018",
150
+ "country": "E", "type_name": "Middle Layer Super Output Area (Full)", "generation_low":
151
+ 13, "country_name": "England", "type": "OMF"}, "105255": {"parent_area": null,
152
+ "generation_high": 20, "all_names": {}, "id": 105255, "codes": {"ons": "E01004736"},
153
+ "name": "Westminster 018C", "country": "E", "type_name": "Lower Layer Super
154
+ Output Area (Generalised)", "generation_low": 13, "country_name": "England",
155
+ "type": "OLG"}, "2504": {"parent_area": null, "generation_high": 20, "all_names":
156
+ {}, "id": 2504, "codes": {"ons": "00BK", "gss": "E09000033", "unit_id": "11164"},
157
+ "name": "Westminster City Council", "country": "E", "type_name": "London borough",
158
+ "generation_low": 1, "country_name": "England", "type": "LBO"}, "11828": {"parent_area":
159
+ 2247, "generation_high": 20, "all_names": {}, "id": 11828, "codes": {"gss":
160
+ "E32000014", "unit_id": "41449"}, "name": "West Central", "country": "E",
161
+ "type_name": "London Assembly constituency", "generation_low": 1, "country_name":
162
+ "England", "type": "LAC"}, "8569": {"parent_area": 2504, "generation_high":
163
+ 20, "all_names": {}, "id": 8569, "codes": {"ons": "00BKGQ", "gss": "E05000644",
164
+ "unit_id": "11162"}, "name": "St James''s", "country": "E", "type_name": "London
165
+ borough ward", "generation_low": 1, "country_name": "England", "type": "LBW"},
166
+ "70877": {"parent_area": null, "generation_high": 20, "all_names": {}, "id":
167
+ 70877, "codes": {"ons": "E01004736"}, "name": "Westminster 018C", "country":
168
+ "E", "type_name": "Lower Layer Super Output Area (Full)", "generation_low":
169
+ 13, "country_name": "England", "type": "OLF"}, "11806": {"parent_area": null,
170
+ "generation_high": 20, "all_names": {}, "id": 11806, "codes": {"ons": "07",
171
+ "gss": "E15000007", "unit_id": "41428"}, "name": "London", "country": "E",
172
+ "type_name": "European region", "generation_low": 1, "country_name": "England",
173
+ "type": "EUR"}, "65759": {"parent_area": null, "generation_high": 20, "all_names":
174
+ {}, "id": 65759, "codes": {"gss": "E14000639", "unit_id": "25040"}, "name":
175
+ "Cities of London and Westminster", "country": "E", "type_name": "UK Parliament
176
+ constituency", "generation_low": 13, "country_name": "England", "type": "WMC"}}'
177
+ http_version: '1.1'
178
+ recorded_at: Tue, 17 Sep 2013 14:44:17 GMT
179
+ - request:
180
+ method: get
181
+ uri: http://mapit.mysociety.org/postcode/SW1A1AA
182
+ body:
183
+ encoding: US-ASCII
184
+ string: ''
185
+ headers:
186
+ accept:
187
+ - ! '*/*'
188
+ user-agent:
189
+ - Ruby
190
+ response:
191
+ status:
192
+ code: 200
193
+ message: OK
194
+ headers:
195
+ expires:
196
+ - Thu, 26 Sep 2013 12:29:30 GMT
197
+ vary:
198
+ - Cookie,Accept-Encoding
199
+ etag:
200
+ - ! '"2e5ca6db5b6ac0a3f008b0293a20a095;gzip"'
201
+ cache-control:
202
+ - max-age=2419200
203
+ access-control-allow-origin:
204
+ - ! '*'
205
+ last-modified:
206
+ - Thu, 29 Aug 2013 12:29:30 GMT
207
+ content-type:
208
+ - application/json; charset=utf-8
209
+ x-url:
210
+ - /postcode/SW1A1AA
211
+ transfer-encoding:
212
+ - chunked
213
+ date:
214
+ - Tue, 17 Sep 2013 14:44:17 GMT
215
+ age:
216
+ - '1649687'
217
+ connection:
218
+ - keep-alive
219
+ body:
220
+ encoding: US-ASCII
221
+ string: ! '{"wgs84_lat": 51.501009611553926, "coordsyst": "G", "shortcuts":
222
+ {"WMC": 65759, "ward": 8569, "council": 2504}, "wgs84_lon": -0.14158706711000901,
223
+ "postcode": "SW1A 1AA", "easting": 529090, "areas": {"900000": {"parent_area":
224
+ null, "generation_high": 19, "all_names": {}, "id": 900000, "codes": {}, "name":
225
+ "House of Commons", "country": "", "type_name": "UK Parliament", "generation_low":
226
+ 1, "country_name": "-", "type": "WMP"}, "900001": {"parent_area": null, "generation_high":
227
+ 20, "all_names": {}, "id": 900001, "codes": {}, "name": "European Parliament",
228
+ "country": "", "type_name": "European Parliament", "generation_low": 1, "country_name":
229
+ "-", "type": "EUP"}, "42050": {"parent_area": null, "generation_high": 20,
230
+ "all_names": {}, "id": 42050, "codes": {"ons": "E02000977"}, "name": "Westminster
231
+ 018", "country": "E", "type_name": "Middle Layer Super Output Area (Generalised)",
232
+ "generation_low": 13, "country_name": "England", "type": "OMG"}, "900006":
233
+ {"parent_area": null, "generation_high": 20, "all_names": {}, "id": 900006,
234
+ "codes": {}, "name": "London Assembly", "country": "E", "type_name": "London
235
+ Assembly area", "generation_low": 1, "country_name": "England", "type": "LAS"},
236
+ "2247": {"parent_area": null, "generation_high": 20, "all_names": {}, "id":
237
+ 2247, "codes": {"unit_id": "41441"}, "name": "Greater London Authority", "country":
238
+ "E", "type_name": "Greater London Authority", "generation_low": 1, "country_name":
239
+ "England", "type": "GLA"}, "34856": {"parent_area": null, "generation_high":
240
+ 20, "all_names": {}, "id": 34856, "codes": {"ons": "E02000977"}, "name": "Westminster
241
+ 018", "country": "E", "type_name": "Middle Layer Super Output Area (Full)",
242
+ "generation_low": 13, "country_name": "England", "type": "OMF"}, "105255":
243
+ {"parent_area": null, "generation_high": 20, "all_names": {}, "id": 105255,
244
+ "codes": {"ons": "E01004736"}, "name": "Westminster 018C", "country": "E",
245
+ "type_name": "Lower Layer Super Output Area (Generalised)", "generation_low":
246
+ 13, "country_name": "England", "type": "OLG"}, "900002": {"parent_area": 900006,
247
+ "generation_high": 20, "all_names": {}, "id": 900002, "codes": {}, "name":
248
+ "London Assembly", "country": "E", "type_name": "London Assembly area (shared)",
249
+ "generation_low": 1, "country_name": "England", "type": "LAE"}, "2504": {"parent_area":
250
+ null, "generation_high": 20, "all_names": {}, "id": 2504, "codes": {"ons":
251
+ "00BK", "gss": "E09000033", "unit_id": "11164"}, "name": "Westminster City
252
+ Council", "country": "E", "type_name": "London borough", "generation_low":
253
+ 1, "country_name": "England", "type": "LBO"}, "11828": {"parent_area": 2247,
254
+ "generation_high": 20, "all_names": {}, "id": 11828, "codes": {"gss": "E32000014",
255
+ "unit_id": "41449"}, "name": "West Central", "country": "E", "type_name":
256
+ "London Assembly constituency", "generation_low": 1, "country_name": "England",
257
+ "type": "LAC"}, "8569": {"parent_area": 2504, "generation_high": 20, "all_names":
258
+ {}, "id": 8569, "codes": {"ons": "00BKGQ", "gss": "E05000644", "unit_id":
259
+ "11162"}, "name": "St James''s", "country": "E", "type_name": "London borough
260
+ ward", "generation_low": 1, "country_name": "England", "type": "LBW"}, "70877":
261
+ {"parent_area": null, "generation_high": 20, "all_names": {}, "id": 70877,
262
+ "codes": {"ons": "E01004736"}, "name": "Westminster 018C", "country": "E",
263
+ "type_name": "Lower Layer Super Output Area (Full)", "generation_low": 13,
264
+ "country_name": "England", "type": "OLF"}, "11806": {"parent_area": null,
265
+ "generation_high": 20, "all_names": {}, "id": 11806, "codes": {"ons": "07",
266
+ "gss": "E15000007", "unit_id": "41428"}, "name": "London", "country": "E",
267
+ "type_name": "European region", "generation_low": 1, "country_name": "England",
268
+ "type": "EUR"}, "65759": {"parent_area": null, "generation_high": 20, "all_names":
269
+ {}, "id": 65759, "codes": {"gss": "E14000639", "unit_id": "25040"}, "name":
270
+ "Cities of London and Westminster", "country": "E", "type_name": "UK Parliament
271
+ constituency", "generation_low": 13, "country_name": "England", "type": "WMC"}},
272
+ "northing": 179645}'
273
+ http_version: '1.1'
274
+ recorded_at: Tue, 17 Sep 2013 14:44:17 GMT
275
+ - request:
276
+ method: get
277
+ uri: http://mapit.mysociety.org/point/4326/-0.141587067110009,51.501009611553926
278
+ body:
279
+ encoding: US-ASCII
280
+ string: ''
281
+ headers:
282
+ accept:
283
+ - ! '*/*'
284
+ user-agent:
285
+ - Ruby
286
+ response:
287
+ status:
288
+ code: 200
289
+ message: OK
290
+ headers:
291
+ expires:
292
+ - Tue, 15 Oct 2013 11:11:05 GMT
293
+ vary:
294
+ - Cookie,Accept-Encoding
295
+ etag:
296
+ - ! '"017a7a0a2be950c74ec3e27e78a9de30;gzip"'
297
+ cache-control:
298
+ - max-age=2419200
299
+ access-control-allow-origin:
300
+ - ! '*'
301
+ last-modified:
302
+ - Tue, 17 Sep 2013 11:11:05 GMT
303
+ content-type:
304
+ - application/json; charset=utf-8
305
+ x-url:
306
+ - /point/4326/-0.141587067110009,51.501009611553926
307
+ transfer-encoding:
308
+ - chunked
309
+ date:
310
+ - Tue, 17 Sep 2013 14:44:17 GMT
311
+ age:
312
+ - '12792'
313
+ connection:
314
+ - keep-alive
315
+ body:
316
+ encoding: US-ASCII
317
+ string: ! '{"42050": {"parent_area": null, "generation_high": 20, "all_names":
318
+ {}, "id": 42050, "codes": {"ons": "E02000977"}, "name": "Westminster 018",
319
+ "country": "E", "type_name": "Middle Layer Super Output Area (Generalised)",
320
+ "generation_low": 13, "country_name": "England", "type": "OMG"}, "2247": {"parent_area":
321
+ null, "generation_high": 20, "all_names": {}, "id": 2247, "codes": {"unit_id":
322
+ "41441"}, "name": "Greater London Authority", "country": "E", "type_name":
323
+ "Greater London Authority", "generation_low": 1, "country_name": "England",
324
+ "type": "GLA"}, "34856": {"parent_area": null, "generation_high": 20, "all_names":
325
+ {}, "id": 34856, "codes": {"ons": "E02000977"}, "name": "Westminster 018",
326
+ "country": "E", "type_name": "Middle Layer Super Output Area (Full)", "generation_low":
327
+ 13, "country_name": "England", "type": "OMF"}, "105255": {"parent_area": null,
328
+ "generation_high": 20, "all_names": {}, "id": 105255, "codes": {"ons": "E01004736"},
329
+ "name": "Westminster 018C", "country": "E", "type_name": "Lower Layer Super
330
+ Output Area (Generalised)", "generation_low": 13, "country_name": "England",
331
+ "type": "OLG"}, "2504": {"parent_area": null, "generation_high": 20, "all_names":
332
+ {}, "id": 2504, "codes": {"ons": "00BK", "gss": "E09000033", "unit_id": "11164"},
333
+ "name": "Westminster City Council", "country": "E", "type_name": "London borough",
334
+ "generation_low": 1, "country_name": "England", "type": "LBO"}, "11828": {"parent_area":
335
+ 2247, "generation_high": 20, "all_names": {}, "id": 11828, "codes": {"gss":
336
+ "E32000014", "unit_id": "41449"}, "name": "West Central", "country": "E",
337
+ "type_name": "London Assembly constituency", "generation_low": 1, "country_name":
338
+ "England", "type": "LAC"}, "8569": {"parent_area": 2504, "generation_high":
339
+ 20, "all_names": {}, "id": 8569, "codes": {"ons": "00BKGQ", "gss": "E05000644",
340
+ "unit_id": "11162"}, "name": "St James''s", "country": "E", "type_name": "London
341
+ borough ward", "generation_low": 1, "country_name": "England", "type": "LBW"},
342
+ "70877": {"parent_area": null, "generation_high": 20, "all_names": {}, "id":
343
+ 70877, "codes": {"ons": "E01004736"}, "name": "Westminster 018C", "country":
344
+ "E", "type_name": "Lower Layer Super Output Area (Full)", "generation_low":
345
+ 13, "country_name": "England", "type": "OLF"}, "11806": {"parent_area": null,
346
+ "generation_high": 20, "all_names": {}, "id": 11806, "codes": {"ons": "07",
347
+ "gss": "E15000007", "unit_id": "41428"}, "name": "London", "country": "E",
348
+ "type_name": "European region", "generation_low": 1, "country_name": "England",
349
+ "type": "EUR"}, "65759": {"parent_area": null, "generation_high": 20, "all_names":
350
+ {}, "id": 65759, "codes": {"gss": "E14000639", "unit_id": "25040"}, "name":
351
+ "Cities of London and Westminster", "country": "E", "type_name": "UK Parliament
352
+ constituency", "generation_low": 13, "country_name": "England", "type": "WMC"}}'
353
+ http_version: '1.1'
354
+ recorded_at: Tue, 17 Sep 2013 14:44:17 GMT
355
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,355 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://mapit.mysociety.org/postcode/SW1A1AA
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
+ - Thu, 26 Sep 2013 12:29:30 GMT
21
+ vary:
22
+ - Cookie,Accept-Encoding
23
+ etag:
24
+ - ! '"2e5ca6db5b6ac0a3f008b0293a20a095;gzip"'
25
+ cache-control:
26
+ - max-age=2419200
27
+ access-control-allow-origin:
28
+ - ! '*'
29
+ last-modified:
30
+ - Thu, 29 Aug 2013 12:29:30 GMT
31
+ content-type:
32
+ - application/json; charset=utf-8
33
+ x-url:
34
+ - /postcode/SW1A1AA
35
+ transfer-encoding:
36
+ - chunked
37
+ date:
38
+ - Tue, 17 Sep 2013 14:44:16 GMT
39
+ age:
40
+ - '1649687'
41
+ connection:
42
+ - keep-alive
43
+ body:
44
+ encoding: US-ASCII
45
+ string: ! '{"wgs84_lat": 51.501009611553926, "coordsyst": "G", "shortcuts":
46
+ {"WMC": 65759, "ward": 8569, "council": 2504}, "wgs84_lon": -0.14158706711000901,
47
+ "postcode": "SW1A 1AA", "easting": 529090, "areas": {"900000": {"parent_area":
48
+ null, "generation_high": 19, "all_names": {}, "id": 900000, "codes": {}, "name":
49
+ "House of Commons", "country": "", "type_name": "UK Parliament", "generation_low":
50
+ 1, "country_name": "-", "type": "WMP"}, "900001": {"parent_area": null, "generation_high":
51
+ 20, "all_names": {}, "id": 900001, "codes": {}, "name": "European Parliament",
52
+ "country": "", "type_name": "European Parliament", "generation_low": 1, "country_name":
53
+ "-", "type": "EUP"}, "42050": {"parent_area": null, "generation_high": 20,
54
+ "all_names": {}, "id": 42050, "codes": {"ons": "E02000977"}, "name": "Westminster
55
+ 018", "country": "E", "type_name": "Middle Layer Super Output Area (Generalised)",
56
+ "generation_low": 13, "country_name": "England", "type": "OMG"}, "900006":
57
+ {"parent_area": null, "generation_high": 20, "all_names": {}, "id": 900006,
58
+ "codes": {}, "name": "London Assembly", "country": "E", "type_name": "London
59
+ Assembly area", "generation_low": 1, "country_name": "England", "type": "LAS"},
60
+ "2247": {"parent_area": null, "generation_high": 20, "all_names": {}, "id":
61
+ 2247, "codes": {"unit_id": "41441"}, "name": "Greater London Authority", "country":
62
+ "E", "type_name": "Greater London Authority", "generation_low": 1, "country_name":
63
+ "England", "type": "GLA"}, "34856": {"parent_area": null, "generation_high":
64
+ 20, "all_names": {}, "id": 34856, "codes": {"ons": "E02000977"}, "name": "Westminster
65
+ 018", "country": "E", "type_name": "Middle Layer Super Output Area (Full)",
66
+ "generation_low": 13, "country_name": "England", "type": "OMF"}, "105255":
67
+ {"parent_area": null, "generation_high": 20, "all_names": {}, "id": 105255,
68
+ "codes": {"ons": "E01004736"}, "name": "Westminster 018C", "country": "E",
69
+ "type_name": "Lower Layer Super Output Area (Generalised)", "generation_low":
70
+ 13, "country_name": "England", "type": "OLG"}, "900002": {"parent_area": 900006,
71
+ "generation_high": 20, "all_names": {}, "id": 900002, "codes": {}, "name":
72
+ "London Assembly", "country": "E", "type_name": "London Assembly area (shared)",
73
+ "generation_low": 1, "country_name": "England", "type": "LAE"}, "2504": {"parent_area":
74
+ null, "generation_high": 20, "all_names": {}, "id": 2504, "codes": {"ons":
75
+ "00BK", "gss": "E09000033", "unit_id": "11164"}, "name": "Westminster City
76
+ Council", "country": "E", "type_name": "London borough", "generation_low":
77
+ 1, "country_name": "England", "type": "LBO"}, "11828": {"parent_area": 2247,
78
+ "generation_high": 20, "all_names": {}, "id": 11828, "codes": {"gss": "E32000014",
79
+ "unit_id": "41449"}, "name": "West Central", "country": "E", "type_name":
80
+ "London Assembly constituency", "generation_low": 1, "country_name": "England",
81
+ "type": "LAC"}, "8569": {"parent_area": 2504, "generation_high": 20, "all_names":
82
+ {}, "id": 8569, "codes": {"ons": "00BKGQ", "gss": "E05000644", "unit_id":
83
+ "11162"}, "name": "St James''s", "country": "E", "type_name": "London borough
84
+ ward", "generation_low": 1, "country_name": "England", "type": "LBW"}, "70877":
85
+ {"parent_area": null, "generation_high": 20, "all_names": {}, "id": 70877,
86
+ "codes": {"ons": "E01004736"}, "name": "Westminster 018C", "country": "E",
87
+ "type_name": "Lower Layer Super Output Area (Full)", "generation_low": 13,
88
+ "country_name": "England", "type": "OLF"}, "11806": {"parent_area": null,
89
+ "generation_high": 20, "all_names": {}, "id": 11806, "codes": {"ons": "07",
90
+ "gss": "E15000007", "unit_id": "41428"}, "name": "London", "country": "E",
91
+ "type_name": "European region", "generation_low": 1, "country_name": "England",
92
+ "type": "EUR"}, "65759": {"parent_area": null, "generation_high": 20, "all_names":
93
+ {}, "id": 65759, "codes": {"gss": "E14000639", "unit_id": "25040"}, "name":
94
+ "Cities of London and Westminster", "country": "E", "type_name": "UK Parliament
95
+ constituency", "generation_low": 13, "country_name": "England", "type": "WMC"}},
96
+ "northing": 179645}'
97
+ http_version: '1.1'
98
+ recorded_at: Tue, 17 Sep 2013 14:44:16 GMT
99
+ - request:
100
+ method: get
101
+ uri: http://mapit.mysociety.org/point/4326/-0.141587067110009,51.501009611553926
102
+ body:
103
+ encoding: US-ASCII
104
+ string: ''
105
+ headers:
106
+ accept:
107
+ - ! '*/*'
108
+ user-agent:
109
+ - Ruby
110
+ response:
111
+ status:
112
+ code: 200
113
+ message: OK
114
+ headers:
115
+ expires:
116
+ - Tue, 15 Oct 2013 11:11:05 GMT
117
+ vary:
118
+ - Cookie,Accept-Encoding
119
+ etag:
120
+ - ! '"017a7a0a2be950c74ec3e27e78a9de30;gzip"'
121
+ cache-control:
122
+ - max-age=2419200
123
+ access-control-allow-origin:
124
+ - ! '*'
125
+ last-modified:
126
+ - Tue, 17 Sep 2013 11:11:05 GMT
127
+ content-type:
128
+ - application/json; charset=utf-8
129
+ x-url:
130
+ - /point/4326/-0.141587067110009,51.501009611553926
131
+ transfer-encoding:
132
+ - chunked
133
+ date:
134
+ - Tue, 17 Sep 2013 14:44:16 GMT
135
+ age:
136
+ - '12792'
137
+ connection:
138
+ - keep-alive
139
+ body:
140
+ encoding: US-ASCII
141
+ string: ! '{"42050": {"parent_area": null, "generation_high": 20, "all_names":
142
+ {}, "id": 42050, "codes": {"ons": "E02000977"}, "name": "Westminster 018",
143
+ "country": "E", "type_name": "Middle Layer Super Output Area (Generalised)",
144
+ "generation_low": 13, "country_name": "England", "type": "OMG"}, "2247": {"parent_area":
145
+ null, "generation_high": 20, "all_names": {}, "id": 2247, "codes": {"unit_id":
146
+ "41441"}, "name": "Greater London Authority", "country": "E", "type_name":
147
+ "Greater London Authority", "generation_low": 1, "country_name": "England",
148
+ "type": "GLA"}, "34856": {"parent_area": null, "generation_high": 20, "all_names":
149
+ {}, "id": 34856, "codes": {"ons": "E02000977"}, "name": "Westminster 018",
150
+ "country": "E", "type_name": "Middle Layer Super Output Area (Full)", "generation_low":
151
+ 13, "country_name": "England", "type": "OMF"}, "105255": {"parent_area": null,
152
+ "generation_high": 20, "all_names": {}, "id": 105255, "codes": {"ons": "E01004736"},
153
+ "name": "Westminster 018C", "country": "E", "type_name": "Lower Layer Super
154
+ Output Area (Generalised)", "generation_low": 13, "country_name": "England",
155
+ "type": "OLG"}, "2504": {"parent_area": null, "generation_high": 20, "all_names":
156
+ {}, "id": 2504, "codes": {"ons": "00BK", "gss": "E09000033", "unit_id": "11164"},
157
+ "name": "Westminster City Council", "country": "E", "type_name": "London borough",
158
+ "generation_low": 1, "country_name": "England", "type": "LBO"}, "11828": {"parent_area":
159
+ 2247, "generation_high": 20, "all_names": {}, "id": 11828, "codes": {"gss":
160
+ "E32000014", "unit_id": "41449"}, "name": "West Central", "country": "E",
161
+ "type_name": "London Assembly constituency", "generation_low": 1, "country_name":
162
+ "England", "type": "LAC"}, "8569": {"parent_area": 2504, "generation_high":
163
+ 20, "all_names": {}, "id": 8569, "codes": {"ons": "00BKGQ", "gss": "E05000644",
164
+ "unit_id": "11162"}, "name": "St James''s", "country": "E", "type_name": "London
165
+ borough ward", "generation_low": 1, "country_name": "England", "type": "LBW"},
166
+ "70877": {"parent_area": null, "generation_high": 20, "all_names": {}, "id":
167
+ 70877, "codes": {"ons": "E01004736"}, "name": "Westminster 018C", "country":
168
+ "E", "type_name": "Lower Layer Super Output Area (Full)", "generation_low":
169
+ 13, "country_name": "England", "type": "OLF"}, "11806": {"parent_area": null,
170
+ "generation_high": 20, "all_names": {}, "id": 11806, "codes": {"ons": "07",
171
+ "gss": "E15000007", "unit_id": "41428"}, "name": "London", "country": "E",
172
+ "type_name": "European region", "generation_low": 1, "country_name": "England",
173
+ "type": "EUR"}, "65759": {"parent_area": null, "generation_high": 20, "all_names":
174
+ {}, "id": 65759, "codes": {"gss": "E14000639", "unit_id": "25040"}, "name":
175
+ "Cities of London and Westminster", "country": "E", "type_name": "UK Parliament
176
+ constituency", "generation_low": 13, "country_name": "England", "type": "WMC"}}'
177
+ http_version: '1.1'
178
+ recorded_at: Tue, 17 Sep 2013 14:44:16 GMT
179
+ - request:
180
+ method: get
181
+ uri: http://mapit.mysociety.org/postcode/SW1A1AA
182
+ body:
183
+ encoding: US-ASCII
184
+ string: ''
185
+ headers:
186
+ accept:
187
+ - ! '*/*'
188
+ user-agent:
189
+ - Ruby
190
+ response:
191
+ status:
192
+ code: 200
193
+ message: OK
194
+ headers:
195
+ expires:
196
+ - Thu, 26 Sep 2013 12:29:30 GMT
197
+ vary:
198
+ - Cookie,Accept-Encoding
199
+ etag:
200
+ - ! '"2e5ca6db5b6ac0a3f008b0293a20a095;gzip"'
201
+ cache-control:
202
+ - max-age=2419200
203
+ access-control-allow-origin:
204
+ - ! '*'
205
+ last-modified:
206
+ - Thu, 29 Aug 2013 12:29:30 GMT
207
+ content-type:
208
+ - application/json; charset=utf-8
209
+ x-url:
210
+ - /postcode/SW1A1AA
211
+ transfer-encoding:
212
+ - chunked
213
+ date:
214
+ - Tue, 17 Sep 2013 14:44:16 GMT
215
+ age:
216
+ - '1649687'
217
+ connection:
218
+ - keep-alive
219
+ body:
220
+ encoding: US-ASCII
221
+ string: ! '{"wgs84_lat": 51.501009611553926, "coordsyst": "G", "shortcuts":
222
+ {"WMC": 65759, "ward": 8569, "council": 2504}, "wgs84_lon": -0.14158706711000901,
223
+ "postcode": "SW1A 1AA", "easting": 529090, "areas": {"900000": {"parent_area":
224
+ null, "generation_high": 19, "all_names": {}, "id": 900000, "codes": {}, "name":
225
+ "House of Commons", "country": "", "type_name": "UK Parliament", "generation_low":
226
+ 1, "country_name": "-", "type": "WMP"}, "900001": {"parent_area": null, "generation_high":
227
+ 20, "all_names": {}, "id": 900001, "codes": {}, "name": "European Parliament",
228
+ "country": "", "type_name": "European Parliament", "generation_low": 1, "country_name":
229
+ "-", "type": "EUP"}, "42050": {"parent_area": null, "generation_high": 20,
230
+ "all_names": {}, "id": 42050, "codes": {"ons": "E02000977"}, "name": "Westminster
231
+ 018", "country": "E", "type_name": "Middle Layer Super Output Area (Generalised)",
232
+ "generation_low": 13, "country_name": "England", "type": "OMG"}, "900006":
233
+ {"parent_area": null, "generation_high": 20, "all_names": {}, "id": 900006,
234
+ "codes": {}, "name": "London Assembly", "country": "E", "type_name": "London
235
+ Assembly area", "generation_low": 1, "country_name": "England", "type": "LAS"},
236
+ "2247": {"parent_area": null, "generation_high": 20, "all_names": {}, "id":
237
+ 2247, "codes": {"unit_id": "41441"}, "name": "Greater London Authority", "country":
238
+ "E", "type_name": "Greater London Authority", "generation_low": 1, "country_name":
239
+ "England", "type": "GLA"}, "34856": {"parent_area": null, "generation_high":
240
+ 20, "all_names": {}, "id": 34856, "codes": {"ons": "E02000977"}, "name": "Westminster
241
+ 018", "country": "E", "type_name": "Middle Layer Super Output Area (Full)",
242
+ "generation_low": 13, "country_name": "England", "type": "OMF"}, "105255":
243
+ {"parent_area": null, "generation_high": 20, "all_names": {}, "id": 105255,
244
+ "codes": {"ons": "E01004736"}, "name": "Westminster 018C", "country": "E",
245
+ "type_name": "Lower Layer Super Output Area (Generalised)", "generation_low":
246
+ 13, "country_name": "England", "type": "OLG"}, "900002": {"parent_area": 900006,
247
+ "generation_high": 20, "all_names": {}, "id": 900002, "codes": {}, "name":
248
+ "London Assembly", "country": "E", "type_name": "London Assembly area (shared)",
249
+ "generation_low": 1, "country_name": "England", "type": "LAE"}, "2504": {"parent_area":
250
+ null, "generation_high": 20, "all_names": {}, "id": 2504, "codes": {"ons":
251
+ "00BK", "gss": "E09000033", "unit_id": "11164"}, "name": "Westminster City
252
+ Council", "country": "E", "type_name": "London borough", "generation_low":
253
+ 1, "country_name": "England", "type": "LBO"}, "11828": {"parent_area": 2247,
254
+ "generation_high": 20, "all_names": {}, "id": 11828, "codes": {"gss": "E32000014",
255
+ "unit_id": "41449"}, "name": "West Central", "country": "E", "type_name":
256
+ "London Assembly constituency", "generation_low": 1, "country_name": "England",
257
+ "type": "LAC"}, "8569": {"parent_area": 2504, "generation_high": 20, "all_names":
258
+ {}, "id": 8569, "codes": {"ons": "00BKGQ", "gss": "E05000644", "unit_id":
259
+ "11162"}, "name": "St James''s", "country": "E", "type_name": "London borough
260
+ ward", "generation_low": 1, "country_name": "England", "type": "LBW"}, "70877":
261
+ {"parent_area": null, "generation_high": 20, "all_names": {}, "id": 70877,
262
+ "codes": {"ons": "E01004736"}, "name": "Westminster 018C", "country": "E",
263
+ "type_name": "Lower Layer Super Output Area (Full)", "generation_low": 13,
264
+ "country_name": "England", "type": "OLF"}, "11806": {"parent_area": null,
265
+ "generation_high": 20, "all_names": {}, "id": 11806, "codes": {"ons": "07",
266
+ "gss": "E15000007", "unit_id": "41428"}, "name": "London", "country": "E",
267
+ "type_name": "European region", "generation_low": 1, "country_name": "England",
268
+ "type": "EUR"}, "65759": {"parent_area": null, "generation_high": 20, "all_names":
269
+ {}, "id": 65759, "codes": {"gss": "E14000639", "unit_id": "25040"}, "name":
270
+ "Cities of London and Westminster", "country": "E", "type_name": "UK Parliament
271
+ constituency", "generation_low": 13, "country_name": "England", "type": "WMC"}},
272
+ "northing": 179645}'
273
+ http_version: '1.1'
274
+ recorded_at: Tue, 17 Sep 2013 14:44:17 GMT
275
+ - request:
276
+ method: get
277
+ uri: http://mapit.mysociety.org/point/4326/-0.141587067110009,51.501009611553926
278
+ body:
279
+ encoding: US-ASCII
280
+ string: ''
281
+ headers:
282
+ accept:
283
+ - ! '*/*'
284
+ user-agent:
285
+ - Ruby
286
+ response:
287
+ status:
288
+ code: 200
289
+ message: OK
290
+ headers:
291
+ expires:
292
+ - Tue, 15 Oct 2013 11:11:05 GMT
293
+ vary:
294
+ - Cookie,Accept-Encoding
295
+ etag:
296
+ - ! '"017a7a0a2be950c74ec3e27e78a9de30;gzip"'
297
+ cache-control:
298
+ - max-age=2419200
299
+ access-control-allow-origin:
300
+ - ! '*'
301
+ last-modified:
302
+ - Tue, 17 Sep 2013 11:11:05 GMT
303
+ content-type:
304
+ - application/json; charset=utf-8
305
+ x-url:
306
+ - /point/4326/-0.141587067110009,51.501009611553926
307
+ transfer-encoding:
308
+ - chunked
309
+ date:
310
+ - Tue, 17 Sep 2013 14:44:17 GMT
311
+ age:
312
+ - '12792'
313
+ connection:
314
+ - keep-alive
315
+ body:
316
+ encoding: US-ASCII
317
+ string: ! '{"42050": {"parent_area": null, "generation_high": 20, "all_names":
318
+ {}, "id": 42050, "codes": {"ons": "E02000977"}, "name": "Westminster 018",
319
+ "country": "E", "type_name": "Middle Layer Super Output Area (Generalised)",
320
+ "generation_low": 13, "country_name": "England", "type": "OMG"}, "2247": {"parent_area":
321
+ null, "generation_high": 20, "all_names": {}, "id": 2247, "codes": {"unit_id":
322
+ "41441"}, "name": "Greater London Authority", "country": "E", "type_name":
323
+ "Greater London Authority", "generation_low": 1, "country_name": "England",
324
+ "type": "GLA"}, "34856": {"parent_area": null, "generation_high": 20, "all_names":
325
+ {}, "id": 34856, "codes": {"ons": "E02000977"}, "name": "Westminster 018",
326
+ "country": "E", "type_name": "Middle Layer Super Output Area (Full)", "generation_low":
327
+ 13, "country_name": "England", "type": "OMF"}, "105255": {"parent_area": null,
328
+ "generation_high": 20, "all_names": {}, "id": 105255, "codes": {"ons": "E01004736"},
329
+ "name": "Westminster 018C", "country": "E", "type_name": "Lower Layer Super
330
+ Output Area (Generalised)", "generation_low": 13, "country_name": "England",
331
+ "type": "OLG"}, "2504": {"parent_area": null, "generation_high": 20, "all_names":
332
+ {}, "id": 2504, "codes": {"ons": "00BK", "gss": "E09000033", "unit_id": "11164"},
333
+ "name": "Westminster City Council", "country": "E", "type_name": "London borough",
334
+ "generation_low": 1, "country_name": "England", "type": "LBO"}, "11828": {"parent_area":
335
+ 2247, "generation_high": 20, "all_names": {}, "id": 11828, "codes": {"gss":
336
+ "E32000014", "unit_id": "41449"}, "name": "West Central", "country": "E",
337
+ "type_name": "London Assembly constituency", "generation_low": 1, "country_name":
338
+ "England", "type": "LAC"}, "8569": {"parent_area": 2504, "generation_high":
339
+ 20, "all_names": {}, "id": 8569, "codes": {"ons": "00BKGQ", "gss": "E05000644",
340
+ "unit_id": "11162"}, "name": "St James''s", "country": "E", "type_name": "London
341
+ borough ward", "generation_low": 1, "country_name": "England", "type": "LBW"},
342
+ "70877": {"parent_area": null, "generation_high": 20, "all_names": {}, "id":
343
+ 70877, "codes": {"ons": "E01004736"}, "name": "Westminster 018C", "country":
344
+ "E", "type_name": "Lower Layer Super Output Area (Full)", "generation_low":
345
+ 13, "country_name": "England", "type": "OLF"}, "11806": {"parent_area": null,
346
+ "generation_high": 20, "all_names": {}, "id": 11806, "codes": {"ons": "07",
347
+ "gss": "E15000007", "unit_id": "41428"}, "name": "London", "country": "E",
348
+ "type_name": "European region", "generation_low": 1, "country_name": "England",
349
+ "type": "EUR"}, "65759": {"parent_area": null, "generation_high": 20, "all_names":
350
+ {}, "id": 65759, "codes": {"gss": "E14000639", "unit_id": "25040"}, "name":
351
+ "Cities of London and Westminster", "country": "E", "type_name": "UK Parliament
352
+ constituency", "generation_low": 13, "country_name": "England", "type": "WMC"}}'
353
+ http_version: '1.1'
354
+ recorded_at: Tue, 17 Sep 2013 14:44:17 GMT
355
+ recorded_with: VCR 2.4.0