gds-api-adapters 32.0.0 → 32.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gds_api/test_helpers/publishing_api_v2.rb +13 -0
- data/lib/gds_api/version.rb +1 -1
- metadata +40 -40
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4f7f3f751f921cd3894b47614d1717441d5d28fc
|
4
|
+
data.tar.gz: c54260b9c268b61eacfb800615f0f81d9127dcde
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b4f42f6c9c57dcc553217982501382a32da1afdf69ddbcd98c28e3ea937741805a7825c6ca1cf5ba1d22c5474f2e542ef2928234cbf167bc75a6cd0b9e0b08d0
|
7
|
+
data.tar.gz: 1d061e662f69c3e92e45446f595e3c912acf5a467eec10605d481d3a04c77385d1018f2864e719dfad09d5dbe9eeb9182d0b62b708b1f0982c8e06803b26dbde
|
@@ -199,6 +199,19 @@ module GdsApi
|
|
199
199
|
stub_request(:get, url).to_return(status: 200, body: item.to_json, headers: {})
|
200
200
|
end
|
201
201
|
|
202
|
+
def publishing_api_has_item_in_sequence(content_id, items)
|
203
|
+
items = items.map(&:with_indifferent_access)
|
204
|
+
url = PUBLISHING_API_V2_ENDPOINT + "/content/" + content_id
|
205
|
+
calls = -1
|
206
|
+
|
207
|
+
stub_request(:get, url).to_return do |request|
|
208
|
+
calls += 1
|
209
|
+
item = items[calls] || items.last
|
210
|
+
|
211
|
+
{ status: 200, body: item.to_json, headers: {} }
|
212
|
+
end
|
213
|
+
end
|
214
|
+
|
202
215
|
def publishing_api_does_not_have_item(content_id)
|
203
216
|
url = PUBLISHING_API_V2_ENDPOINT + "/content/" + content_id
|
204
217
|
stub_request(:get, url).to_return(status: 404, body: resource_not_found(content_id, "content item").to_json, headers: {})
|
data/lib/gds_api/version.rb
CHANGED
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: 32.
|
4
|
+
version: 32.1.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: 2016-07-
|
11
|
+
date: 2016-07-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: plek
|
@@ -471,55 +471,55 @@ signing_key:
|
|
471
471
|
specification_version: 4
|
472
472
|
summary: Adapters to work with GDS APIs
|
473
473
|
test_files:
|
474
|
-
- test/
|
475
|
-
- test/json_client_test.rb
|
476
|
-
- test/content_store_test.rb
|
477
|
-
- test/publishing_api_test.rb
|
478
|
-
- test/business_support_api_test.rb
|
479
|
-
- test/middleware/govuk_header_sniffer_test.rb
|
480
|
-
- test/whitehall_admin_api_test.rb
|
481
|
-
- test/list_response_test.rb
|
482
|
-
- test/maslow_test.rb
|
483
|
-
- test/panopticon_registerer_test.rb
|
484
|
-
- test/support_test.rb
|
485
|
-
- test/asset_manager_test.rb
|
486
|
-
- test/helpers_test.rb
|
487
|
-
- test/licence_application_api_test.rb
|
488
|
-
- test/test_helper.rb
|
489
|
-
- test/govuk_headers_test.rb
|
490
|
-
- test/publisher_api_test.rb
|
474
|
+
- test/support_api_test.rb
|
491
475
|
- test/mapit_test.rb
|
492
|
-
- test/
|
493
|
-
- test/publishing_api_v2_test.rb
|
476
|
+
- test/publishing_api_test.rb
|
494
477
|
- test/publishing_api_v2/lookup_test.rb
|
495
|
-
- test/publishing_api_v2/get_expanded_links_test.rb
|
496
478
|
- test/publishing_api_v2/get_links_test.rb
|
497
|
-
- test/
|
498
|
-
- test/
|
499
|
-
- test/
|
500
|
-
- test/router_test.rb
|
479
|
+
- test/publishing_api_v2/get_expanded_links_test.rb
|
480
|
+
- test/whitehall_admin_api_test.rb
|
481
|
+
- test/pp_data_in_test.rb
|
501
482
|
- test/publishing_api/special_route_publisher_test.rb
|
502
|
-
- test/external_link_tracker_test.rb
|
503
483
|
- test/need_api_test.rb
|
484
|
+
- test/publisher_api_test.rb
|
485
|
+
- test/rummager_helpers_test.rb
|
486
|
+
- test/support_test.rb
|
487
|
+
- test/test_helpers/publishing_api_test.rb
|
488
|
+
- test/test_helpers/pact_helper.rb
|
489
|
+
- test/test_helpers/panopticon_test.rb
|
490
|
+
- test/test_helpers/email_alert_api_test.rb
|
491
|
+
- test/test_helpers/publishing_api_v2_test.rb
|
492
|
+
- test/licence_application_api_test.rb
|
493
|
+
- test/gov_uk_delivery_test.rb
|
494
|
+
- test/maslow_test.rb
|
495
|
+
- test/govuk_headers_test.rb
|
496
|
+
- test/helpers_test.rb
|
497
|
+
- test/panopticon_registerer_test.rb
|
504
498
|
- test/panopticon_test.rb
|
505
|
-
- test/
|
499
|
+
- test/middleware/govuk_header_sniffer_test.rb
|
500
|
+
- test/rummager_test.rb
|
501
|
+
- test/json_client_test.rb
|
502
|
+
- test/email_alert_api_test.rb
|
503
|
+
- test/content_api_test.rb
|
504
|
+
- test/response_test.rb
|
505
|
+
- test/organisations_api_test.rb
|
506
|
+
- test/imminence_api_test.rb
|
507
|
+
- test/content_store_test.rb
|
508
|
+
- test/asset_manager_test.rb
|
506
509
|
- test/fixtures/hello.txt
|
507
510
|
- test/fixtures/new_policies_for_dwp.json
|
511
|
+
- test/fixtures/world_organisations_australia.json
|
508
512
|
- test/fixtures/no_services_and_info_data_found_fixture.json
|
509
|
-
- test/fixtures/services_and_info_fixture.json
|
510
513
|
- test/fixtures/old_policies_for_dwp.json
|
511
|
-
- test/fixtures/
|
514
|
+
- test/fixtures/services_and_info_fixture.json
|
512
515
|
- test/fixtures/sub_sector_organisations.json
|
513
516
|
- test/fixtures/finder_api/cma-case-schema.json
|
517
|
+
- test/router_test.rb
|
518
|
+
- test/list_response_test.rb
|
519
|
+
- test/external_link_tracker_test.rb
|
520
|
+
- test/gds_api_base_test.rb
|
514
521
|
- test/worldwide_api_test.rb
|
515
|
-
- test/
|
516
|
-
- test/
|
517
|
-
- test/
|
518
|
-
- test/test_helpers/panopticon_test.rb
|
519
|
-
- test/test_helpers/email_alert_api_test.rb
|
520
|
-
- test/gov_uk_delivery_test.rb
|
521
|
-
- test/imminence_api_test.rb
|
522
|
-
- test/email_alert_api_test.rb
|
523
|
-
- test/response_test.rb
|
524
|
-
- test/rummager_test.rb
|
522
|
+
- test/test_helper.rb
|
523
|
+
- test/publishing_api_v2_test.rb
|
524
|
+
- test/business_support_api_test.rb
|
525
525
|
has_rdoc:
|