gds-api-adapters 18.5.0 → 18.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 919dffdccf96237db74ef931b5c6faae4e6d22e3
4
- data.tar.gz: eaab2b00d6af70a9f3ffa3dd5ec1c3f3e10a83eb
3
+ metadata.gz: 25af22810d4e67476e08d444e3c56efaa38d490c
4
+ data.tar.gz: f8d6841e428b96d3f3afb45703744c7ccfc69fe8
5
5
  SHA512:
6
- metadata.gz: 33e38a256ab4308f129eb5a6394c060e5c41ae12e8fac02832b92ea3ff1c9c6f38f97c6515b580573b4edb2165fc8edc2fd4fe492eaa8f80cc595378a7fa46fb
7
- data.tar.gz: e46d51533058c74f011c7df68fe3a5601e3674fbc11a96a4b9eb411b18375e00c7bda25f61a2459a3eacd448a96235a5d1788a9408c25be64ab621a09e9898df
6
+ metadata.gz: 8993bcbf68eb8ce8e914c727cdaad25f939b2180c911a098892ce074ea7c999d04e38eee32dc9c655bb06c8b484b5d2d1470e76e5673cd9a76fc80e153cea2cc
7
+ data.tar.gz: 57cd8c103bf952a300274aa89d12760a0ee53a23dea8b0e5ae9bc0452f709b724511d64d8db95cffa162d9ce5d22465ac4eb7542fafc03135fbc0ad820fee92e
@@ -1,3 +1,4 @@
1
+ require 'json'
1
2
  require 'gds_api/test_helpers/json_client_helper'
2
3
 
3
4
  module GdsApi
@@ -54,14 +55,24 @@ module GdsApi
54
55
  .to_return(body: no_search_results_found)
55
56
  end
56
57
 
57
- def rummager_has_four_new_policies_for_every_organisation
58
- stub_request(:get, %r{/unified_search.json})
59
- .to_return(body: four_new_policies_results)
58
+ def rummager_has_new_policies_for_every_organisation(options = {})
59
+ if count = options[:count]
60
+ stub_request(:get, %r{/unified_search.json.*count=#{count}.*})
61
+ .to_return(body: first_n_results(new_policies_results, n: count))
62
+ else
63
+ stub_request(:get, %r{/unified_search.json})
64
+ .to_return(body: new_policies_results)
65
+ end
60
66
  end
61
67
 
62
- def rummager_has_four_old_policies_for_every_organisation
63
- stub_request(:get, %r{/unified_search.json})
64
- .to_return(body: four_old_policies_results)
68
+ def rummager_has_old_policies_for_every_organisation(options = {})
69
+ if count = options[:count]
70
+ stub_request(:get, %r{/unified_search.json.*count=#{count}.*})
71
+ .to_return(body: first_n_results(old_policies_results, n: count))
72
+ else
73
+ stub_request(:get, %r{/unified_search.json})
74
+ .to_return(body: old_policies_results)
75
+ end
65
76
  end
66
77
 
67
78
  private
@@ -100,24 +111,32 @@ module GdsApi
100
111
  )
101
112
  end
102
113
 
103
- def four_new_policies_results
114
+ def new_policies_results
104
115
  File.read(
105
116
  File.expand_path(
106
- "../../../../test/fixtures/4_new_policies_for_dwp.json",
117
+ "../../../../test/fixtures/new_policies_for_dwp.json",
107
118
  __FILE__
108
119
  )
109
120
  )
110
121
  end
111
122
 
112
- def four_old_policies_results
123
+ def old_policies_results
113
124
  File.read(
114
125
  File.expand_path(
115
- "../../../../test/fixtures/4_old_policies_for_dwp.json",
126
+ "../../../../test/fixtures/old_policies_for_dwp.json",
116
127
  __FILE__
117
128
  )
118
129
  )
119
130
  end
120
131
 
132
+ def first_n_results(results, options)
133
+ n = options[:n]
134
+ results = JSON.parse(results)
135
+ results["results"] = results["results"][0...n]
136
+
137
+ results.to_json
138
+ end
139
+
121
140
  def client
122
141
  GdsApi::Rummager.new("http://example.com")
123
142
  end
@@ -1,3 +1,3 @@
1
1
  module GdsApi
2
- VERSION = '18.5.0'
2
+ VERSION = '18.6.0'
3
3
  end
@@ -0,0 +1,298 @@
1
+ {
2
+ "results": [
3
+ {
4
+ "title": "Welfare reform",
5
+ "description": "The governments policy on welfare reform",
6
+ "link": "/government/policies/welfare-reform",
7
+ "slug": "welfare-reform",
8
+ "format": "policy",
9
+ "organisations": [
10
+ {
11
+ "slug": "department-for-work-pensions",
12
+ "link": "/government/organisations/department-for-work-pensions",
13
+ "title": "Department for Work and Pensions",
14
+ "acronym": "DWP",
15
+ "organisation_type": "Ministerial department",
16
+ "organisation_state": "live"
17
+ }
18
+ ],
19
+ "public_timestamp": "2015-04-23T09:31:18.369Z",
20
+ "index": "mainstream",
21
+ "es_score": null,
22
+ "_id": "/government/policies/welfare-reform",
23
+ "document_type": "policy"
24
+ },
25
+ {
26
+ "title": "State Pension simplification",
27
+ "description": "The governments policy on state pension simplification",
28
+ "link": "/government/policies/state-pension-simplification",
29
+ "slug": "state-pension-simplification",
30
+ "format": "policy",
31
+ "organisations": [
32
+ {
33
+ "slug": "department-for-work-pensions",
34
+ "link": "/government/organisations/department-for-work-pensions",
35
+ "title": "Department for Work and Pensions",
36
+ "acronym": "DWP",
37
+ "organisation_type": "Ministerial department",
38
+ "organisation_state": "live"
39
+ }
40
+ ],
41
+ "public_timestamp": "2015-04-23T09:31:16.374Z",
42
+ "index": "mainstream",
43
+ "es_score": null,
44
+ "_id": "/government/policies/state-pension-simplification",
45
+ "document_type": "policy"
46
+ },
47
+ {
48
+ "title": "State Pension age",
49
+ "description": "The governments policy on state pension age",
50
+ "link": "/government/policies/state-pension-age",
51
+ "slug": "state-pension-age",
52
+ "format": "policy",
53
+ "organisations": [
54
+ {
55
+ "slug": "department-for-work-pensions",
56
+ "link": "/government/organisations/department-for-work-pensions",
57
+ "title": "Department for Work and Pensions",
58
+ "acronym": "DWP",
59
+ "organisation_type": "Ministerial department",
60
+ "organisation_state": "live"
61
+ }
62
+ ],
63
+ "public_timestamp": "2015-04-23T09:31:16.279Z",
64
+ "index": "mainstream",
65
+ "es_score": null,
66
+ "_id": "/government/policies/state-pension-age",
67
+ "document_type": "policy"
68
+ },
69
+ {
70
+ "title": "Poverty and social justice",
71
+ "description": "The governments policy on poverty and social justice",
72
+ "link": "/government/policies/poverty-and-social-justice",
73
+ "slug": "poverty-and-social-justice",
74
+ "format": "policy",
75
+ "organisations": [
76
+ {
77
+ "slug": "department-for-work-pensions",
78
+ "link": "/government/organisations/department-for-work-pensions",
79
+ "title": "Department for Work and Pensions",
80
+ "acronym": "DWP",
81
+ "organisation_type": "Ministerial department",
82
+ "organisation_state": "live"
83
+ },
84
+ {
85
+ "slug": "department-for-education",
86
+ "link": "/government/organisations/department-for-education",
87
+ "title": "Department for Education",
88
+ "acronym": "DfE",
89
+ "organisation_type": "Ministerial department",
90
+ "organisation_state": "live"
91
+ }
92
+ ],
93
+ "public_timestamp": "2015-04-23T09:31:13.699Z",
94
+ "index": "mainstream",
95
+ "es_score": null,
96
+ "_id": "/government/policies/poverty-and-social-justice",
97
+ "document_type": "policy"
98
+ },
99
+ {
100
+ "title": "Older people",
101
+ "description": "The governments policy on older people",
102
+ "link": "/government/policies/older-people",
103
+ "slug": "older-people",
104
+ "format": "policy",
105
+ "organisations": [
106
+ {
107
+ "slug": "department-for-work-pensions",
108
+ "link": "/government/organisations/department-for-work-pensions",
109
+ "title": "Department for Work and Pensions",
110
+ "acronym": "DWP",
111
+ "organisation_type": "Ministerial department",
112
+ "organisation_state": "live"
113
+ }
114
+ ],
115
+ "public_timestamp": "2015-04-23T09:31:12.726Z",
116
+ "index": "mainstream",
117
+ "es_score": null,
118
+ "_id": "/government/policies/older-people",
119
+ "document_type": "policy"
120
+ },
121
+ {
122
+ "title": "Household energy",
123
+ "description": "The governments policy on household energy",
124
+ "link": "/government/policies/household-energy",
125
+ "slug": "household-energy",
126
+ "format": "policy",
127
+ "organisations": [
128
+ {
129
+ "slug": "ofgem",
130
+ "link": "/government/organisations/ofgem",
131
+ "title": "Ofgem",
132
+ "organisation_state": "exempt"
133
+ },
134
+ {
135
+ "slug": "department-for-work-pensions",
136
+ "link": "/government/organisations/department-for-work-pensions",
137
+ "title": "Department for Work and Pensions",
138
+ "acronym": "DWP",
139
+ "organisation_type": "Ministerial department",
140
+ "organisation_state": "live"
141
+ },
142
+ {
143
+ "slug": "department-for-communities-and-local-government",
144
+ "link": "/government/organisations/department-for-communities-and-local-government",
145
+ "title": "Department for Communities and Local Government",
146
+ "acronym": "DCLG",
147
+ "organisation_type": "Ministerial department",
148
+ "organisation_state": "live"
149
+ },
150
+ {
151
+ "slug": "department-of-energy-climate-change",
152
+ "link": "/government/organisations/department-of-energy-climate-change",
153
+ "title": "Department of Energy & Climate Change",
154
+ "acronym": "DECC",
155
+ "organisation_type": "Ministerial department",
156
+ "organisation_state": "live"
157
+ }
158
+ ],
159
+ "public_timestamp": "2015-04-23T09:31:09.099Z",
160
+ "index": "mainstream",
161
+ "es_score": null,
162
+ "_id": "/government/policies/household-energy",
163
+ "document_type": "policy"
164
+ },
165
+ {
166
+ "title": "Health and safety reform",
167
+ "description": "The governments policy on health and safety reform",
168
+ "link": "/government/policies/health-and-safety-reform",
169
+ "slug": "health-and-safety-reform",
170
+ "format": "policy",
171
+ "organisations": [
172
+ {
173
+ "slug": "department-for-work-pensions",
174
+ "link": "/government/organisations/department-for-work-pensions",
175
+ "title": "Department for Work and Pensions",
176
+ "acronym": "DWP",
177
+ "organisation_type": "Ministerial department",
178
+ "organisation_state": "live"
179
+ }
180
+ ],
181
+ "public_timestamp": "2015-04-23T09:31:08.391Z",
182
+ "index": "mainstream",
183
+ "es_score": null,
184
+ "_id": "/government/policies/health-and-safety-reform",
185
+ "document_type": "policy"
186
+ },
187
+ {
188
+ "title": "European funds",
189
+ "description": "The governments policy on european funds",
190
+ "link": "/government/policies/european-funds",
191
+ "slug": "european-funds",
192
+ "format": "policy",
193
+ "organisations": [
194
+ {
195
+ "slug": "department-for-work-pensions",
196
+ "link": "/government/organisations/department-for-work-pensions",
197
+ "title": "Department for Work and Pensions",
198
+ "acronym": "DWP",
199
+ "organisation_type": "Ministerial department",
200
+ "organisation_state": "live"
201
+ },
202
+ {
203
+ "slug": "department-for-communities-and-local-government",
204
+ "link": "/government/organisations/department-for-communities-and-local-government",
205
+ "title": "Department for Communities and Local Government",
206
+ "acronym": "DCLG",
207
+ "organisation_type": "Ministerial department",
208
+ "organisation_state": "live"
209
+ },
210
+ {
211
+ "slug": "department-for-environment-food-rural-affairs",
212
+ "link": "/government/organisations/department-for-environment-food-rural-affairs",
213
+ "title": "Department for Environment, Food & Rural Affairs",
214
+ "acronym": "Defra",
215
+ "organisation_type": "Ministerial department",
216
+ "organisation_state": "live"
217
+ },
218
+ {
219
+ "slug": "department-for-business-innovation-skills",
220
+ "link": "/government/organisations/department-for-business-innovation-skills",
221
+ "title": "Department for Business, Innovation & Skills",
222
+ "acronym": "BIS",
223
+ "organisation_type": "Ministerial department",
224
+ "organisation_state": "live"
225
+ },
226
+ {
227
+ "slug": "hm-treasury",
228
+ "link": "/government/organisations/hm-treasury",
229
+ "title": "HM Treasury",
230
+ "acronym": "HMT",
231
+ "organisation_type": "Ministerial department",
232
+ "organisation_state": "live"
233
+ }
234
+ ],
235
+ "public_timestamp": "2015-04-23T09:31:06.188Z",
236
+ "index": "mainstream",
237
+ "es_score": null,
238
+ "_id": "/government/policies/european-funds",
239
+ "document_type": "policy"
240
+ },
241
+ {
242
+ "title": "Employment",
243
+ "description": "The governments policy on employment",
244
+ "link": "/government/policies/employment",
245
+ "slug": "employment",
246
+ "format": "policy",
247
+ "organisations": [
248
+ {
249
+ "slug": "department-for-work-pensions",
250
+ "link": "/government/organisations/department-for-work-pensions",
251
+ "title": "Department for Work and Pensions",
252
+ "acronym": "DWP",
253
+ "organisation_type": "Ministerial department",
254
+ "organisation_state": "live"
255
+ },
256
+ {
257
+ "slug": "hm-treasury",
258
+ "link": "/government/organisations/hm-treasury",
259
+ "title": "HM Treasury",
260
+ "acronym": "HMT",
261
+ "organisation_type": "Ministerial department",
262
+ "organisation_state": "live"
263
+ }
264
+ ],
265
+ "public_timestamp": "2015-04-23T09:31:05.592Z",
266
+ "index": "mainstream",
267
+ "es_score": null,
268
+ "_id": "/government/policies/employment",
269
+ "document_type": "policy"
270
+ },
271
+ {
272
+ "title": "Child maintenance reform",
273
+ "description": "The governments policy on child maintenance reform",
274
+ "link": "/government/policies/child-maintenance-reform",
275
+ "slug": "child-maintenance-reform",
276
+ "format": "policy",
277
+ "organisations": [
278
+ {
279
+ "slug": "department-for-work-pensions",
280
+ "link": "/government/organisations/department-for-work-pensions",
281
+ "title": "Department for Work and Pensions",
282
+ "acronym": "DWP",
283
+ "organisation_type": "Ministerial department",
284
+ "organisation_state": "live"
285
+ }
286
+ ],
287
+ "public_timestamp": "2015-04-23T09:31:02.116Z",
288
+ "index": "mainstream",
289
+ "es_score": null,
290
+ "_id": "/government/policies/child-maintenance-reform",
291
+ "document_type": "policy"
292
+ }
293
+ ],
294
+ "total": 11,
295
+ "start": 0,
296
+ "facets": {},
297
+ "suggested_queries": []
298
+ }
@@ -0,0 +1,413 @@
1
+ {
2
+ "results": [
3
+ {
4
+ "topics": [
5
+ {
6
+ "slug": "employment",
7
+ "link": "/government/topics/employment",
8
+ "title": "Employment"
9
+ },
10
+ {
11
+ "slug": "welfare",
12
+ "link": "/government/topics/welfare",
13
+ "title": "Welfare"
14
+ }
15
+ ],
16
+ "title": "Employment",
17
+ "description": "How the government is getting Britain working and helping people break the cycle of benefit dependency.",
18
+ "link": "/government/policies/helping-people-to-find-and-stay-in-work",
19
+ "format": "policy",
20
+ "display_type": "Policy",
21
+ "organisations": [
22
+ {
23
+ "slug": "department-for-work-pensions",
24
+ "link": "/government/organisations/department-for-work-pensions",
25
+ "title": "Department for Work and Pensions",
26
+ "acronym": "DWP",
27
+ "organisation_type": "Ministerial department",
28
+ "organisation_state": "live"
29
+ },
30
+ {
31
+ "slug": "hm-treasury",
32
+ "link": "/government/organisations/hm-treasury",
33
+ "title": "HM Treasury",
34
+ "acronym": "HMT",
35
+ "organisation_type": "Ministerial department",
36
+ "organisation_state": "live"
37
+ }
38
+ ],
39
+ "public_timestamp": "2015-03-26T15:06:42.000+00:00",
40
+ "index": "government",
41
+ "es_score": null,
42
+ "_id": "/government/policies/helping-people-to-find-and-stay-in-work",
43
+ "document_type": "edition"
44
+ },
45
+ {
46
+ "topics": [
47
+ {
48
+ "slug": "energy",
49
+ "link": "/government/topics/energy",
50
+ "title": "Energy"
51
+ },
52
+ {
53
+ "slug": "climate-change",
54
+ "link": "/government/topics/climate-change",
55
+ "title": "Climate change"
56
+ }
57
+ ],
58
+ "title": "Household energy",
59
+ "description": "How we're helping households to save on their energy bills and supporting people in fuel poverty.",
60
+ "link": "/government/policies/helping-households-to-cut-their-energy-bills",
61
+ "format": "policy",
62
+ "display_type": "Policy",
63
+ "organisations": [
64
+ {
65
+ "slug": "department-for-communities-and-local-government",
66
+ "link": "/government/organisations/department-for-communities-and-local-government",
67
+ "title": "Department for Communities and Local Government",
68
+ "acronym": "DCLG",
69
+ "organisation_type": "Ministerial department",
70
+ "organisation_state": "live"
71
+ },
72
+ {
73
+ "slug": "department-for-work-pensions",
74
+ "link": "/government/organisations/department-for-work-pensions",
75
+ "title": "Department for Work and Pensions",
76
+ "acronym": "DWP",
77
+ "organisation_type": "Ministerial department",
78
+ "organisation_state": "live"
79
+ },
80
+ {
81
+ "slug": "department-of-energy-climate-change",
82
+ "link": "/government/organisations/department-of-energy-climate-change",
83
+ "title": "Department of Energy & Climate Change",
84
+ "acronym": "DECC",
85
+ "organisation_type": "Ministerial department",
86
+ "organisation_state": "live"
87
+ },
88
+ {
89
+ "slug": "ofgem",
90
+ "link": "/government/organisations/ofgem",
91
+ "title": "Ofgem",
92
+ "organisation_state": "exempt"
93
+ }
94
+ ],
95
+ "public_timestamp": "2015-03-26T11:40:02.000+00:00",
96
+ "index": "government",
97
+ "es_score": null,
98
+ "_id": "/government/policies/helping-households-to-cut-their-energy-bills",
99
+ "document_type": "edition"
100
+ },
101
+ {
102
+ "topics": [
103
+ {
104
+ "slug": "welfare",
105
+ "link": "/government/topics/welfare",
106
+ "title": "Welfare"
107
+ },
108
+ {
109
+ "slug": "community-and-society",
110
+ "link": "/government/topics/community-and-society",
111
+ "title": "Community and society"
112
+ }
113
+ ],
114
+ "title": "Poverty and social justice",
115
+ "description": "How the government is working to help people overcome complex problems that lead to poverty, to help them change the course of their lives",
116
+ "link": "/government/policies/helping-to-reduce-poverty-and-improve-social-justice",
117
+ "format": "policy",
118
+ "display_type": "Policy",
119
+ "organisations": [
120
+ {
121
+ "slug": "department-for-education",
122
+ "link": "/government/organisations/department-for-education",
123
+ "title": "Department for Education",
124
+ "acronym": "DfE",
125
+ "organisation_type": "Ministerial department",
126
+ "organisation_state": "live"
127
+ },
128
+ {
129
+ "slug": "department-for-work-pensions",
130
+ "link": "/government/organisations/department-for-work-pensions",
131
+ "title": "Department for Work and Pensions",
132
+ "acronym": "DWP",
133
+ "organisation_type": "Ministerial department",
134
+ "organisation_state": "live"
135
+ }
136
+ ],
137
+ "public_timestamp": "2014-10-22T16:15:41.000+01:00",
138
+ "index": "government",
139
+ "es_score": null,
140
+ "_id": "/government/policies/helping-to-reduce-poverty-and-improve-social-justice",
141
+ "document_type": "edition"
142
+ },
143
+ {
144
+ "topics": [
145
+ {
146
+ "slug": "employment",
147
+ "link": "/government/topics/employment",
148
+ "title": "Employment"
149
+ },
150
+ {
151
+ "slug": "welfare",
152
+ "link": "/government/topics/welfare",
153
+ "title": "Welfare"
154
+ }
155
+ ],
156
+ "title": "Welfare reform",
157
+ "description": "Making the welfare system fairer, more affordable and better able to reduce poverty, worklessness and welfare dependency.",
158
+ "link": "/government/policies/simplifying-the-welfare-system-and-making-sure-work-pays",
159
+ "format": "policy",
160
+ "display_type": "Policy",
161
+ "organisations": [
162
+ {
163
+ "slug": "department-for-work-pensions",
164
+ "link": "/government/organisations/department-for-work-pensions",
165
+ "title": "Department for Work and Pensions",
166
+ "acronym": "DWP",
167
+ "organisation_type": "Ministerial department",
168
+ "organisation_state": "live"
169
+ }
170
+ ],
171
+ "public_timestamp": "2014-10-22T11:30:00.000+01:00",
172
+ "index": "government",
173
+ "es_score": null,
174
+ "_id": "/government/policies/simplifying-the-welfare-system-and-making-sure-work-pays",
175
+ "document_type": "edition"
176
+ },
177
+ {
178
+ "topics": [
179
+ {
180
+ "slug": "business-and-enterprise",
181
+ "link": "/government/topics/business-and-enterprise",
182
+ "title": "Business and enterprise"
183
+ },
184
+ {
185
+ "slug": "europe",
186
+ "link": "/government/topics/europe",
187
+ "title": "Europe"
188
+ },
189
+ {
190
+ "slug": "uk-economy",
191
+ "link": "/government/topics/uk-economy",
192
+ "title": "UK economy"
193
+ }
194
+ ],
195
+ "title": "European funds",
196
+ "description": "Negotiating the European Union (EU) Common Strategic Framework for 2014 to 2020.",
197
+ "link": "/government/policies/making-european-funding-work-better-for-the-uk-economy",
198
+ "format": "policy",
199
+ "display_type": "Policy",
200
+ "organisations": [
201
+ {
202
+ "slug": "department-for-business-innovation-skills",
203
+ "link": "/government/organisations/department-for-business-innovation-skills",
204
+ "title": "Department for Business, Innovation & Skills",
205
+ "acronym": "BIS",
206
+ "organisation_type": "Ministerial department",
207
+ "organisation_state": "live"
208
+ },
209
+ {
210
+ "slug": "department-for-communities-and-local-government",
211
+ "link": "/government/organisations/department-for-communities-and-local-government",
212
+ "title": "Department for Communities and Local Government",
213
+ "acronym": "DCLG",
214
+ "organisation_type": "Ministerial department",
215
+ "organisation_state": "live"
216
+ },
217
+ {
218
+ "slug": "department-for-environment-food-rural-affairs",
219
+ "link": "/government/organisations/department-for-environment-food-rural-affairs",
220
+ "title": "Department for Environment, Food & Rural Affairs",
221
+ "acronym": "Defra",
222
+ "organisation_type": "Ministerial department",
223
+ "organisation_state": "live"
224
+ },
225
+ {
226
+ "slug": "department-for-work-pensions",
227
+ "link": "/government/organisations/department-for-work-pensions",
228
+ "title": "Department for Work and Pensions",
229
+ "acronym": "DWP",
230
+ "organisation_type": "Ministerial department",
231
+ "organisation_state": "live"
232
+ },
233
+ {
234
+ "slug": "hm-treasury",
235
+ "link": "/government/organisations/hm-treasury",
236
+ "title": "HM Treasury",
237
+ "acronym": "HMT",
238
+ "organisation_type": "Ministerial department",
239
+ "organisation_state": "live"
240
+ }
241
+ ],
242
+ "public_timestamp": "2014-07-23T14:21:36.000+01:00",
243
+ "index": "government",
244
+ "es_score": null,
245
+ "_id": "/government/policies/making-european-funding-work-better-for-the-uk-economy",
246
+ "document_type": "edition"
247
+ },
248
+ {
249
+ "topics": [
250
+ {
251
+ "slug": "pensions-and-ageing-society",
252
+ "link": "/government/topics/pensions-and-ageing-society",
253
+ "title": "Pensions and ageing society"
254
+ }
255
+ ],
256
+ "title": "Older people",
257
+ "description": "What the government is doing to help improve life for older people in an ageing society.",
258
+ "link": "/government/policies/improving-opportunities-for-older-people",
259
+ "format": "policy",
260
+ "display_type": "Policy",
261
+ "organisations": [
262
+ {
263
+ "slug": "department-for-work-pensions",
264
+ "link": "/government/organisations/department-for-work-pensions",
265
+ "title": "Department for Work and Pensions",
266
+ "acronym": "DWP",
267
+ "organisation_type": "Ministerial department",
268
+ "organisation_state": "live"
269
+ }
270
+ ],
271
+ "public_timestamp": "2014-06-13T09:30:06.000+01:00",
272
+ "index": "government",
273
+ "es_score": null,
274
+ "_id": "/government/policies/improving-opportunities-for-older-people",
275
+ "document_type": "edition"
276
+ },
277
+ {
278
+ "topics": [
279
+ {
280
+ "slug": "business-and-enterprise",
281
+ "link": "/government/topics/business-and-enterprise",
282
+ "title": "Business and enterprise"
283
+ },
284
+ {
285
+ "slug": "regulation-reform",
286
+ "link": "/government/topics/regulation-reform",
287
+ "title": "Regulation reform"
288
+ }
289
+ ],
290
+ "title": "Health and safety reform",
291
+ "description": "How the government is improving the health and safety system, making sure it is taken seriously and reducing the burden on business.",
292
+ "link": "/government/policies/improving-the-health-and-safety-system",
293
+ "format": "policy",
294
+ "display_type": "Policy",
295
+ "organisations": [
296
+ {
297
+ "slug": "department-for-work-pensions",
298
+ "link": "/government/organisations/department-for-work-pensions",
299
+ "title": "Department for Work and Pensions",
300
+ "acronym": "DWP",
301
+ "organisation_type": "Ministerial department",
302
+ "organisation_state": "live"
303
+ }
304
+ ],
305
+ "public_timestamp": "2014-01-02T14:31:58.000+00:00",
306
+ "index": "government",
307
+ "es_score": null,
308
+ "_id": "/government/policies/improving-the-health-and-safety-system",
309
+ "document_type": "edition"
310
+ },
311
+ {
312
+ "topics": [
313
+ {
314
+ "slug": "pensions-and-ageing-society",
315
+ "link": "/government/topics/pensions-and-ageing-society",
316
+ "title": "Pensions and ageing society"
317
+ }
318
+ ],
319
+ "title": "State Pension age",
320
+ "description": "How the government is making sure the State Pension is affordable in the long term and fair between generations.",
321
+ "link": "/government/policies/reviewing-the-state-pension-age",
322
+ "format": "policy",
323
+ "display_type": "Policy",
324
+ "organisations": [
325
+ {
326
+ "slug": "department-for-work-pensions",
327
+ "link": "/government/organisations/department-for-work-pensions",
328
+ "title": "Department for Work and Pensions",
329
+ "acronym": "DWP",
330
+ "organisation_type": "Ministerial department",
331
+ "organisation_state": "live"
332
+ }
333
+ ],
334
+ "public_timestamp": "2013-12-05T14:19:47.000+00:00",
335
+ "index": "government",
336
+ "es_score": null,
337
+ "_id": "/government/policies/reviewing-the-state-pension-age",
338
+ "document_type": "edition"
339
+ },
340
+ {
341
+ "topics": [
342
+ {
343
+ "slug": "pensions-and-ageing-society",
344
+ "link": "/government/topics/pensions-and-ageing-society",
345
+ "title": "Pensions and ageing society"
346
+ }
347
+ ],
348
+ "title": "State Pension simplification",
349
+ "description": "How the government is making the State Pension simpler and fairer so it’s a good starting point for planning and saving for retirement.",
350
+ "link": "/government/policies/making-the-state-pension-simpler-and-fairer",
351
+ "format": "policy",
352
+ "display_type": "Policy",
353
+ "organisations": [
354
+ {
355
+ "slug": "department-for-work-pensions",
356
+ "link": "/government/organisations/department-for-work-pensions",
357
+ "title": "Department for Work and Pensions",
358
+ "acronym": "DWP",
359
+ "organisation_type": "Ministerial department",
360
+ "organisation_state": "live"
361
+ }
362
+ ],
363
+ "public_timestamp": "2013-08-08T09:30:52.000+01:00",
364
+ "index": "government",
365
+ "es_score": null,
366
+ "_id": "/government/policies/making-the-state-pension-simpler-and-fairer",
367
+ "document_type": "edition"
368
+ },
369
+ {
370
+ "topics": [
371
+ {
372
+ "slug": "children-and-young-people",
373
+ "link": "/government/topics/children-and-young-people",
374
+ "title": "Children and young people"
375
+ },
376
+ {
377
+ "slug": "welfare",
378
+ "link": "/government/topics/welfare",
379
+ "title": "Welfare"
380
+ },
381
+ {
382
+ "slug": "community-and-society",
383
+ "link": "/government/topics/community-and-society",
384
+ "title": "Community and society"
385
+ }
386
+ ],
387
+ "title": "Child maintenance reform",
388
+ "description": "Increasing the number of children who benefit from effective maintenance arrangements and improving collaboration between separated parents.",
389
+ "link": "/government/policies/improving-the-child-maintenance-system",
390
+ "format": "policy",
391
+ "display_type": "Policy",
392
+ "organisations": [
393
+ {
394
+ "slug": "department-for-work-pensions",
395
+ "link": "/government/organisations/department-for-work-pensions",
396
+ "title": "Department for Work and Pensions",
397
+ "acronym": "DWP",
398
+ "organisation_type": "Ministerial department",
399
+ "organisation_state": "live"
400
+ }
401
+ ],
402
+ "public_timestamp": "2013-08-08T09:28:12.000+01:00",
403
+ "index": "government",
404
+ "es_score": null,
405
+ "_id": "/government/policies/improving-the-child-maintenance-system",
406
+ "document_type": "edition"
407
+ }
408
+ ],
409
+ "total": 11,
410
+ "start": 0,
411
+ "facets": {},
412
+ "suggested_queries": []
413
+ }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gds-api-adapters
3
3
  version: !ruby/object:Gem::Version
4
- version: 18.5.0
4
+ version: 18.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Stewart
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-23 00:00:00.000000000 Z
11
+ date: 2015-04-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: plek
@@ -357,11 +357,11 @@ files:
357
357
  - test/fact_cave_test.rb
358
358
  - test/finder_api_test.rb
359
359
  - test/finder_schema_test.rb
360
- - test/fixtures/4_new_policies_for_dwp.json
361
- - test/fixtures/4_old_policies_for_dwp.json
362
360
  - test/fixtures/finder_api/cma-case-schema.json
363
361
  - test/fixtures/hello.txt
362
+ - test/fixtures/new_policies_for_dwp.json
364
363
  - test/fixtures/no_services_and_info_data_found_fixture.json
364
+ - test/fixtures/old_policies_for_dwp.json
365
365
  - test/fixtures/services_and_info_fixture.json
366
366
  - test/fixtures/sub_sector_organisations.json
367
367
  - test/fixtures/world_organisations_australia.json
@@ -446,11 +446,11 @@ test_files:
446
446
  - test/content_store_test.rb
447
447
  - test/asset_manager_test.rb
448
448
  - test/fixtures/hello.txt
449
+ - test/fixtures/new_policies_for_dwp.json
449
450
  - test/fixtures/world_organisations_australia.json
450
451
  - test/fixtures/no_services_and_info_data_found_fixture.json
452
+ - test/fixtures/old_policies_for_dwp.json
451
453
  - test/fixtures/services_and_info_fixture.json
452
- - test/fixtures/4_old_policies_for_dwp.json
453
- - test/fixtures/4_new_policies_for_dwp.json
454
454
  - test/fixtures/sub_sector_organisations.json
455
455
  - test/fixtures/finder_api/cma-case-schema.json
456
456
  - test/router_test.rb
@@ -1,104 +0,0 @@
1
- {
2
- "results": [
3
- {
4
- "title": "Welfare reform",
5
- "description": "The governments policy on welfare reform",
6
- "link": "/government/policies/welfare-reform",
7
- "slug": "welfare-reform",
8
- "format": "policy",
9
- "organisations": [
10
- {
11
- "slug": "department-for-work-pensions",
12
- "link": "/government/organisations/department-for-work-pensions",
13
- "title": "Department for Work and Pensions",
14
- "acronym": "DWP",
15
- "organisation_type": "Ministerial department",
16
- "organisation_state": "live"
17
- }
18
- ],
19
- "public_timestamp": "2015-04-23T09:31:18.369Z",
20
- "index": "mainstream",
21
- "es_score": null,
22
- "_id": "/government/policies/welfare-reform",
23
- "document_type": "policy"
24
- },
25
- {
26
- "title": "State Pension simplification",
27
- "description": "The governments policy on state pension simplification",
28
- "link": "/government/policies/state-pension-simplification",
29
- "slug": "state-pension-simplification",
30
- "format": "policy",
31
- "organisations": [
32
- {
33
- "slug": "department-for-work-pensions",
34
- "link": "/government/organisations/department-for-work-pensions",
35
- "title": "Department for Work and Pensions",
36
- "acronym": "DWP",
37
- "organisation_type": "Ministerial department",
38
- "organisation_state": "live"
39
- }
40
- ],
41
- "public_timestamp": "2015-04-23T09:31:16.374Z",
42
- "index": "mainstream",
43
- "es_score": null,
44
- "_id": "/government/policies/state-pension-simplification",
45
- "document_type": "policy"
46
- },
47
- {
48
- "title": "State Pension age",
49
- "description": "The governments policy on state pension age",
50
- "link": "/government/policies/state-pension-age",
51
- "slug": "state-pension-age",
52
- "format": "policy",
53
- "organisations": [
54
- {
55
- "slug": "department-for-work-pensions",
56
- "link": "/government/organisations/department-for-work-pensions",
57
- "title": "Department for Work and Pensions",
58
- "acronym": "DWP",
59
- "organisation_type": "Ministerial department",
60
- "organisation_state": "live"
61
- }
62
- ],
63
- "public_timestamp": "2015-04-23T09:31:16.279Z",
64
- "index": "mainstream",
65
- "es_score": null,
66
- "_id": "/government/policies/state-pension-age",
67
- "document_type": "policy"
68
- },
69
- {
70
- "title": "Poverty and social justice",
71
- "description": "The governments policy on poverty and social justice",
72
- "link": "/government/policies/poverty-and-social-justice",
73
- "slug": "poverty-and-social-justice",
74
- "format": "policy",
75
- "organisations": [
76
- {
77
- "slug": "department-for-work-pensions",
78
- "link": "/government/organisations/department-for-work-pensions",
79
- "title": "Department for Work and Pensions",
80
- "acronym": "DWP",
81
- "organisation_type": "Ministerial department",
82
- "organisation_state": "live"
83
- },
84
- {
85
- "slug": "department-for-education",
86
- "link": "/government/organisations/department-for-education",
87
- "title": "Department for Education",
88
- "acronym": "DfE",
89
- "organisation_type": "Ministerial department",
90
- "organisation_state": "live"
91
- }
92
- ],
93
- "public_timestamp": "2015-04-23T09:31:13.699Z",
94
- "index": "mainstream",
95
- "es_score": null,
96
- "_id": "/government/policies/poverty-and-social-justice",
97
- "document_type": "policy"
98
- }
99
- ],
100
- "total": 11,
101
- "start": 0,
102
- "facets": {},
103
- "suggested_queries": []
104
- }
@@ -1,182 +0,0 @@
1
- {
2
- "results": [
3
- {
4
- "topics": [
5
- {
6
- "slug": "employment",
7
- "link": "/government/topics/employment",
8
- "title": "Employment"
9
- },
10
- {
11
- "slug": "welfare",
12
- "link": "/government/topics/welfare",
13
- "title": "Welfare"
14
- }
15
- ],
16
- "title": "Employment",
17
- "description": "How the government is getting Britain working and helping people break the cycle of benefit dependency.",
18
- "link": "/government/policies/helping-people-to-find-and-stay-in-work",
19
- "format": "policy",
20
- "display_type": "Policy",
21
- "organisations": [
22
- {
23
- "slug": "department-for-work-pensions",
24
- "link": "/government/organisations/department-for-work-pensions",
25
- "title": "Department for Work and Pensions",
26
- "acronym": "DWP",
27
- "organisation_type": "Ministerial department",
28
- "organisation_state": "live"
29
- },
30
- {
31
- "slug": "hm-treasury",
32
- "link": "/government/organisations/hm-treasury",
33
- "title": "HM Treasury",
34
- "acronym": "HMT",
35
- "organisation_type": "Ministerial department",
36
- "organisation_state": "live"
37
- }
38
- ],
39
- "public_timestamp": "2015-03-26T15:06:42.000+00:00",
40
- "index": "government",
41
- "es_score": null,
42
- "_id": "/government/policies/helping-people-to-find-and-stay-in-work",
43
- "document_type": "edition"
44
- },
45
- {
46
- "topics": [
47
- {
48
- "slug": "energy",
49
- "link": "/government/topics/energy",
50
- "title": "Energy"
51
- },
52
- {
53
- "slug": "climate-change",
54
- "link": "/government/topics/climate-change",
55
- "title": "Climate change"
56
- }
57
- ],
58
- "title": "Household energy",
59
- "description": "How we're helping households to save on their energy bills and supporting people in fuel poverty.",
60
- "link": "/government/policies/helping-households-to-cut-their-energy-bills",
61
- "format": "policy",
62
- "display_type": "Policy",
63
- "organisations": [
64
- {
65
- "slug": "department-for-communities-and-local-government",
66
- "link": "/government/organisations/department-for-communities-and-local-government",
67
- "title": "Department for Communities and Local Government",
68
- "acronym": "DCLG",
69
- "organisation_type": "Ministerial department",
70
- "organisation_state": "live"
71
- },
72
- {
73
- "slug": "department-for-work-pensions",
74
- "link": "/government/organisations/department-for-work-pensions",
75
- "title": "Department for Work and Pensions",
76
- "acronym": "DWP",
77
- "organisation_type": "Ministerial department",
78
- "organisation_state": "live"
79
- },
80
- {
81
- "slug": "department-of-energy-climate-change",
82
- "link": "/government/organisations/department-of-energy-climate-change",
83
- "title": "Department of Energy & Climate Change",
84
- "acronym": "DECC",
85
- "organisation_type": "Ministerial department",
86
- "organisation_state": "live"
87
- },
88
- {
89
- "slug": "ofgem",
90
- "link": "/government/organisations/ofgem",
91
- "title": "Ofgem",
92
- "organisation_state": "exempt"
93
- }
94
- ],
95
- "public_timestamp": "2015-03-26T11:40:02.000+00:00",
96
- "index": "government",
97
- "es_score": null,
98
- "_id": "/government/policies/helping-households-to-cut-their-energy-bills",
99
- "document_type": "edition"
100
- },
101
- {
102
- "topics": [
103
- {
104
- "slug": "welfare",
105
- "link": "/government/topics/welfare",
106
- "title": "Welfare"
107
- },
108
- {
109
- "slug": "community-and-society",
110
- "link": "/government/topics/community-and-society",
111
- "title": "Community and society"
112
- }
113
- ],
114
- "title": "Poverty and social justice",
115
- "description": "How the government is working to help people overcome complex problems that lead to poverty, to help them change the course of their lives",
116
- "link": "/government/policies/helping-to-reduce-poverty-and-improve-social-justice",
117
- "format": "policy",
118
- "display_type": "Policy",
119
- "organisations": [
120
- {
121
- "slug": "department-for-education",
122
- "link": "/government/organisations/department-for-education",
123
- "title": "Department for Education",
124
- "acronym": "DfE",
125
- "organisation_type": "Ministerial department",
126
- "organisation_state": "live"
127
- },
128
- {
129
- "slug": "department-for-work-pensions",
130
- "link": "/government/organisations/department-for-work-pensions",
131
- "title": "Department for Work and Pensions",
132
- "acronym": "DWP",
133
- "organisation_type": "Ministerial department",
134
- "organisation_state": "live"
135
- }
136
- ],
137
- "public_timestamp": "2014-10-22T16:15:41.000+01:00",
138
- "index": "government",
139
- "es_score": null,
140
- "_id": "/government/policies/helping-to-reduce-poverty-and-improve-social-justice",
141
- "document_type": "edition"
142
- },
143
- {
144
- "topics": [
145
- {
146
- "slug": "employment",
147
- "link": "/government/topics/employment",
148
- "title": "Employment"
149
- },
150
- {
151
- "slug": "welfare",
152
- "link": "/government/topics/welfare",
153
- "title": "Welfare"
154
- }
155
- ],
156
- "title": "Welfare reform",
157
- "description": "Making the welfare system fairer, more affordable and better able to reduce poverty, worklessness and welfare dependency.",
158
- "link": "/government/policies/simplifying-the-welfare-system-and-making-sure-work-pays",
159
- "format": "policy",
160
- "display_type": "Policy",
161
- "organisations": [
162
- {
163
- "slug": "department-for-work-pensions",
164
- "link": "/government/organisations/department-for-work-pensions",
165
- "title": "Department for Work and Pensions",
166
- "acronym": "DWP",
167
- "organisation_type": "Ministerial department",
168
- "organisation_state": "live"
169
- }
170
- ],
171
- "public_timestamp": "2014-10-22T11:30:00.000+01:00",
172
- "index": "government",
173
- "es_score": null,
174
- "_id": "/government/policies/simplifying-the-welfare-system-and-making-sure-work-pays",
175
- "document_type": "edition"
176
- }
177
- ],
178
- "total": 11,
179
- "start": 0,
180
- "facets": {},
181
- "suggested_queries": []
182
- }