gds-api-adapters 52.5.1 → 52.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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: accf0f5721d9f46ecb702af9350c6c473283f8730f28248dbe511b1510659c85
|
4
|
+
data.tar.gz: 27d8cb31d8ffec45ac356c963f2d1c0fb53b71b3e01598e408093a5dbff1a5a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 636879880957a7bb7d8f4f516ed6a2fef9e0e7c8599928f5602d4a826115b4e3c0d32f3ba8f1908ae6cfe2ba626d88f0fc89644d5bd798a01d59c64b83ee618e
|
7
|
+
data.tar.gz: d0867f25e9925feef2b27260430470ab6e640f7bbc60383917626d1899dcbe221c67671274a861b8764cf7d24c0bd291b38bd7e8ba6389c5e047b12d2b76d937
|
@@ -8,7 +8,6 @@ module GdsApi
|
|
8
8
|
"description" => "Description for #{base_path}",
|
9
9
|
"schema_name" => "guide",
|
10
10
|
"document_type" => "guide",
|
11
|
-
"need_ids" => ["100001"],
|
12
11
|
"public_updated_at" => "2014-05-06T12:01:00+00:00",
|
13
12
|
# base_path is added in as necessary (ie for content-store GET responses)
|
14
13
|
# "base_path" => base_path,
|
@@ -441,11 +441,16 @@ module GdsApi
|
|
441
441
|
# ]
|
442
442
|
# }
|
443
443
|
# }
|
444
|
-
def publishing_api_has_expanded_links(links, with_drafts: true)
|
444
|
+
def publishing_api_has_expanded_links(links, with_drafts: true, generate: false)
|
445
445
|
links = deep_transform_keys(links, &:to_sym)
|
446
|
-
|
447
|
-
|
448
|
-
|
446
|
+
request_params = {}
|
447
|
+
request_params['with_drafts'] = false if !with_drafts
|
448
|
+
request_params['generate'] = true if generate
|
449
|
+
|
450
|
+
url = PUBLISHING_API_V2_ENDPOINT + "/expanded-links/" + links[:content_id]
|
451
|
+
stub_request(:get, url)
|
452
|
+
.with(query: request_params)
|
453
|
+
.to_return(status: 200, body: links.to_json, headers: {})
|
449
454
|
end
|
450
455
|
|
451
456
|
# Stub a request to get links for content ids
|
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: 52.
|
4
|
+
version: 52.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GOV.UK Dev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-06-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: plek
|
@@ -453,7 +453,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
453
453
|
version: '0'
|
454
454
|
requirements: []
|
455
455
|
rubyforge_project:
|
456
|
-
rubygems_version: 2.7.
|
456
|
+
rubygems_version: 2.7.6
|
457
457
|
signing_key:
|
458
458
|
specification_version: 4
|
459
459
|
summary: Adapters to work with GDS APIs
|