gds-api-adapters 42.0.0 → 43.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b48ed5e62411b6df5e7e9ac26d42679294ef5459
|
|
4
|
+
data.tar.gz: 8474492df99a5031c4da270997e946715ceda219
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 43297f9e3e76f1898e4fea1dda878c4c082257ad88edc3903c2c352eec1bc603e10997faaf16d2de8ee117990e90aa9e76702fd225acd074822e780a97e059b4
|
|
7
|
+
data.tar.gz: 6f9d342fe5a6e21ca824cfb25cd8fb49e8719e1b10ae5bd7e746ff23fe5f99498ec6eabe531825bf72272532ba727f8505ce48790e6fb4553b2df9c965249400
|
data/lib/gds_api/content_api.rb
CHANGED
|
@@ -92,16 +92,6 @@ class GdsApi::ContentApi < GdsApi::Base
|
|
|
92
92
|
get_json("#{@endpoint}/licences.json?ids=#{ids}")
|
|
93
93
|
end
|
|
94
94
|
|
|
95
|
-
def business_support_schemes(facets)
|
|
96
|
-
url = "#{base_url}/business_support_schemes.json"
|
|
97
|
-
query = facets.map { |k, v| "#{k}=#{v}" }
|
|
98
|
-
if query.any?
|
|
99
|
-
url += "?#{query.join('&')}"
|
|
100
|
-
end
|
|
101
|
-
|
|
102
|
-
get_json(url)
|
|
103
|
-
end
|
|
104
|
-
|
|
105
95
|
def get_list(url)
|
|
106
96
|
get_json(url) { |r|
|
|
107
97
|
GdsApi::ListResponse.new(r, self, web_urls_relative_to: @web_urls_relative_to)
|
|
@@ -15,10 +15,10 @@ module GdsApi
|
|
|
15
15
|
put_content_response = publishing_api.put_content(
|
|
16
16
|
options.fetch(:content_id),
|
|
17
17
|
base_path: options.fetch(:base_path),
|
|
18
|
-
document_type: options
|
|
19
|
-
schema_name: "special_route",
|
|
18
|
+
document_type: options.fetch(:document_type, "special_route"),
|
|
19
|
+
schema_name: options.fetch(:schema_name, "special_route"),
|
|
20
20
|
title: options.fetch(:title),
|
|
21
|
-
description: options
|
|
21
|
+
description: options.fetch(:description, ""),
|
|
22
22
|
locale: "en",
|
|
23
23
|
details: {},
|
|
24
24
|
routes: [
|
|
@@ -343,26 +343,6 @@ module GdsApi
|
|
|
343
343
|
end
|
|
344
344
|
end
|
|
345
345
|
|
|
346
|
-
def setup_content_api_business_support_schemes_stubs
|
|
347
|
-
setup_business_support_stubs(CONTENT_API_ENDPOINT, 'business_support_schemes')
|
|
348
|
-
end
|
|
349
|
-
|
|
350
|
-
def content_api_has_business_support_scheme(scheme, facets)
|
|
351
|
-
api_has_business_support(scheme, facets)
|
|
352
|
-
end
|
|
353
|
-
|
|
354
|
-
def content_api_has_default_business_support_schemes
|
|
355
|
-
empty_results = {
|
|
356
|
-
"_response_info" => { "status" => "ok" },
|
|
357
|
-
"description" => "Business Support Schemes!",
|
|
358
|
-
"total" => 0, "startIndex" => 1, "pageSize" => 0, "currentPage" => 1, "pages" => 1,
|
|
359
|
-
"results" => []
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
stub_request(:get, %r{\A#{CONTENT_API_ENDPOINT}/business_support_schemes\.json}).
|
|
363
|
-
to_return(body: empty_results.to_json)
|
|
364
|
-
end
|
|
365
|
-
|
|
366
346
|
def content_api_licence_hash(licence_identifier, options = {})
|
|
367
347
|
details = {
|
|
368
348
|
title: "Publisher title",
|
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:
|
|
4
|
+
version: 43.0.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: 2017-04-
|
|
11
|
+
date: 2017-04-28 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: plek
|