gds-api-adapters 67.0.1 → 67.1.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: fa2f8e5ae181c47883077132c2fb3a4910d28567860c2466f594ebf0d5aaa305
|
4
|
+
data.tar.gz: 1f5c76190d01dea3f9d7772bd613e7b05f532e2a1df4eaed2987df335ac707e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d86be0927061f0fe19b6da7333dcdbba7ab1f54411a6c6bfbbe59f7bbc9a6b6c469609e3ecd597c5c2d41798170f114f14396791b980a7c26968e45fcb975913
|
7
|
+
data.tar.gz: fb2556343854773fec59ce8e02341263cfb5829bdd18223c65381035274b6554aeb431fc12e98a0483c1608879c272bead25f58f97ce29d540a33c17b3631905
|
@@ -224,16 +224,14 @@ class GdsApi::EmailAlertApi < GdsApi::Base
|
|
224
224
|
#
|
225
225
|
# @param [string] address Address to send verification email to
|
226
226
|
# @param [string] destination Path on GOV.UK that subscriber will be emailed
|
227
|
-
# @param [string, nil] redirect Path on GOV.UK to be encoded into the token for redirecting
|
228
227
|
#
|
229
228
|
# @return [Hash] subscriber
|
230
229
|
#
|
231
|
-
def send_subscriber_verification_email(address:, destination
|
230
|
+
def send_subscriber_verification_email(address:, destination:)
|
232
231
|
post_json(
|
233
232
|
"#{endpoint}/subscribers/auth-token",
|
234
233
|
address: address,
|
235
234
|
destination: destination,
|
236
|
-
redirect: redirect,
|
237
235
|
)
|
238
236
|
end
|
239
237
|
|
@@ -98,9 +98,9 @@ module GdsApi
|
|
98
98
|
subscriptions.each do |id, params|
|
99
99
|
latest_id, latest_params = get_latest_matching(params, subscriptions)
|
100
100
|
stub_request(:get, "#{EMAIL_ALERT_API_ENDPOINT}/subscriptions/#{id}")
|
101
|
-
.to_return(status: 200, body: get_subscription_response(id, params).to_json)
|
101
|
+
.to_return(status: 200, body: get_subscription_response(id, **params).to_json)
|
102
102
|
stub_request(:get, "#{EMAIL_ALERT_API_ENDPOINT}/subscriptions/#{id}/latest")
|
103
|
-
.to_return(status: 200, body: get_subscription_response(latest_id, latest_params).to_json)
|
103
|
+
.to_return(status: 200, body: get_subscription_response(latest_id, **latest_params).to_json)
|
104
104
|
end
|
105
105
|
end
|
106
106
|
|
@@ -394,9 +394,11 @@ module GdsApi
|
|
394
394
|
# Stub GET /v2/content/:content_id to return a 404 response
|
395
395
|
#
|
396
396
|
# @param content_id [UUID]
|
397
|
-
def stub_publishing_api_does_not_have_item(content_id)
|
397
|
+
def stub_publishing_api_does_not_have_item(content_id, params = {})
|
398
398
|
url = PUBLISHING_API_V2_ENDPOINT + "/content/" + content_id
|
399
|
-
stub_request(:get, url)
|
399
|
+
stub_request(:get, url)
|
400
|
+
.with(query: hash_including(params))
|
401
|
+
.to_return(status: 404, body: resource_not_found(content_id, "content item").to_json, headers: {})
|
400
402
|
end
|
401
403
|
|
402
404
|
# Stub a request to links endpoint
|
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: 67.0
|
4
|
+
version: 67.1.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: 2020-
|
11
|
+
date: 2020-12-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -198,14 +198,14 @@ dependencies:
|
|
198
198
|
requirements:
|
199
199
|
- - "~>"
|
200
200
|
- !ruby/object:Gem::Version
|
201
|
-
version: '
|
201
|
+
version: '3.6'
|
202
202
|
type: :development
|
203
203
|
prerelease: false
|
204
204
|
version_requirements: !ruby/object:Gem::Requirement
|
205
205
|
requirements:
|
206
206
|
- - "~>"
|
207
207
|
- !ruby/object:Gem::Version
|
208
|
-
version: '
|
208
|
+
version: '3.6'
|
209
209
|
- !ruby/object:Gem::Dependency
|
210
210
|
name: pry
|
211
211
|
requirement: !ruby/object:Gem::Requirement
|
@@ -447,7 +447,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
447
447
|
- !ruby/object:Gem::Version
|
448
448
|
version: '0'
|
449
449
|
requirements: []
|
450
|
-
rubygems_version: 3.
|
450
|
+
rubygems_version: 3.1.4
|
451
451
|
signing_key:
|
452
452
|
specification_version: 4
|
453
453
|
summary: Adapters to work with GDS APIs
|