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: b390045df77872eff71b5a5e3c751a9091613bcedf606274b1918656a01457c0
4
- data.tar.gz: 7f9f5c6a0e2da810ffb87a5ad6ffc8052e324686e571ec9bf8ee3a07e565b363
3
+ metadata.gz: accf0f5721d9f46ecb702af9350c6c473283f8730f28248dbe511b1510659c85
4
+ data.tar.gz: 27d8cb31d8ffec45ac356c963f2d1c0fb53b71b3e01598e408093a5dbff1a5a2
5
5
  SHA512:
6
- metadata.gz: aff59a9c8aa7d016121b62005e4728190ed06c6b4bc3ed14a8e35d854178b5102265f351a4cec454ddf2c68aa8c290099bda43950596fe31801ac6788708d394
7
- data.tar.gz: 52ba48122256caae1a34e1e0e6c305bb798a700b24788a271e2d1a9c8dfdeae1ec85c3122ef0d265cd4416f481b3b0de73e36472d845f9a5cd56373cf88f4254
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,
@@ -279,6 +279,7 @@ module GdsApi
279
279
  "subscriber_list" => {
280
280
  "id" => "447135c3-07d6-4c3a-8a3b-efa49ef70e52",
281
281
  "title" => "Some title",
282
+ "active_subscriptions_count" => 42,
282
283
  }.merge(attributes)
283
284
  }
284
285
  end
@@ -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
- query = with_drafts ? "" : "?with_drafts=false"
447
- url = PUBLISHING_API_V2_ENDPOINT + "/expanded-links/" + links[:content_id] + query
448
- stub_request(:get, url).to_return(status: 200, body: links.to_json, headers: {})
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
@@ -1,3 +1,3 @@
1
1
  module GdsApi
2
- VERSION = '52.5.1'.freeze
2
+ VERSION = '52.6.0'.freeze
3
3
  end
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.5.1
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-03-29 00:00:00.000000000 Z
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.3
456
+ rubygems_version: 2.7.6
457
457
  signing_key:
458
458
  specification_version: 4
459
459
  summary: Adapters to work with GDS APIs