gds-api-adapters 97.4.0 → 97.4.1
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.rb +30 -6
- data/lib/gds_api/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a3d86ff9c8bece588fe1eae2ec8ec8c71ca5ef5108c7b900f19f8444fb2d016b
|
4
|
+
data.tar.gz: 4d83794af16a9af548c3a1f803afb2e05f619728e3623305b6af667a9315b635
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc5856e22afbf5d6484a1b31074e14ed3a1d40dbdb902cb6ed7fb8f62c01c28ea238dbbe0d370373a9d08180057fbf69207916dc72a3706eee9174eacfc62129
|
7
|
+
data.tar.gz: 18e2a2894684c34f4ee5fe549bb88dae6cdc712e885996d597239e6ae8b9b780314c68ad3c2e7fc13b7af898eedb222541597272b1552400a83353fba08d246c
|
@@ -371,13 +371,28 @@ module GdsApi
|
|
371
371
|
# "base_path" => "/organisation/bar",
|
372
372
|
# },
|
373
373
|
# }] # an array of content items that embed the target content_id
|
374
|
+
# rollup: {
|
375
|
+
# "views" => 1
|
376
|
+
# "locations" => 1
|
377
|
+
# "instances" => 1
|
378
|
+
# "organisations" => 1
|
379
|
+
# } # metadata with the total counts across all pages
|
374
380
|
# )
|
375
|
-
# @param content_id [UUID
|
381
|
+
# @param content_id [UUID]
|
376
382
|
# @param total Integer
|
377
383
|
# @param total_pages Integer
|
378
|
-
# @param results [
|
379
|
-
|
380
|
-
|
384
|
+
# @param results [Array]
|
385
|
+
# @param rollup [Hash]
|
386
|
+
def stub_publishing_api_has_embedded_content(
|
387
|
+
content_id:,
|
388
|
+
total: 0,
|
389
|
+
total_pages: 0,
|
390
|
+
results: [],
|
391
|
+
page_number: nil,
|
392
|
+
order: nil,
|
393
|
+
rollup: {}
|
394
|
+
)
|
395
|
+
url = "#{PUBLISHING_API_V2_ENDPOINT}/content/#{content_id}/host-content"
|
381
396
|
|
382
397
|
query = {
|
383
398
|
"page" => page_number,
|
@@ -390,12 +405,20 @@ module GdsApi
|
|
390
405
|
"content_id" => content_id,
|
391
406
|
"total" => total,
|
392
407
|
"total_pages" => total_pages,
|
408
|
+
"rollup" => rollup,
|
393
409
|
"results" => results,
|
394
410
|
}.to_json)
|
395
411
|
end
|
396
412
|
|
397
|
-
def stub_publishing_api_has_embedded_content_for_any_content_id(
|
398
|
-
|
413
|
+
def stub_publishing_api_has_embedded_content_for_any_content_id(
|
414
|
+
total: 0,
|
415
|
+
total_pages: 0,
|
416
|
+
results: [],
|
417
|
+
page_number: nil,
|
418
|
+
order: nil,
|
419
|
+
rollup: {}
|
420
|
+
)
|
421
|
+
url = %r{\A#{PUBLISHING_API_V2_ENDPOINT}/content/[0-9a-fA-F-]{36}/host-content}
|
399
422
|
|
400
423
|
query = {
|
401
424
|
"page" => page_number,
|
@@ -408,6 +431,7 @@ module GdsApi
|
|
408
431
|
"content_id" => SecureRandom.uuid,
|
409
432
|
"total" => total,
|
410
433
|
"total_pages" => total_pages,
|
434
|
+
"rollup" => rollup,
|
411
435
|
"results" => results,
|
412
436
|
}.to_json)
|
413
437
|
end
|
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: 97.4.
|
4
|
+
version: 97.4.1
|
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: 2024-11-
|
11
|
+
date: 2024-11-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|