gds-api-adapters 57.2.3 → 57.2.4
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.rb +14 -2
- data/lib/gds_api/email_alert_api.rb +2 -0
- 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: 588c881df929ae172881c6770eb146c6928f8c7ceb61cc84bb8c0933cb521306
|
4
|
+
data.tar.gz: c52ea31c0777b1a63809db604883e331732ad076493990e31ba14c4c76e07cf9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8349e6f60104d3b5d93483e9b6f70f46c5fafb1f6718ebc789646629dc3e00f00fb3705ad08e2f458821dafedfe387b0454a20a69421003dfbfc9e7106293c02
|
7
|
+
data.tar.gz: 344e6d2897db08590b80657d76dee87b17ba727735e57a173bac56f106bd4bd0e0c666119bd52f9d35e6ffcc6eb96b0339c8141af01b86389005eba8d0ea310c
|
data/lib/gds_api.rb
CHANGED
@@ -42,9 +42,15 @@ module GdsApi
|
|
42
42
|
|
43
43
|
# Creates a GdsApi::ContentStore adapter
|
44
44
|
#
|
45
|
+
# This will set a bearer token if a CONTENT_STORE_BEARER_TOKEN environment
|
46
|
+
# variable is set
|
47
|
+
#
|
45
48
|
# @return [GdsApi::ContentStore]
|
46
49
|
def self.content_store(options = {})
|
47
|
-
GdsApi::ContentStore.new(
|
50
|
+
GdsApi::ContentStore.new(
|
51
|
+
Plek.find('content-store'),
|
52
|
+
{ bearer_token: ENV['CONTENT_STORE_BEARER_TOKEN'] }.merge(options),
|
53
|
+
)
|
48
54
|
end
|
49
55
|
|
50
56
|
# Creates a GdsApi::EmailAlertApi adapter
|
@@ -147,9 +153,15 @@ module GdsApi
|
|
147
153
|
|
148
154
|
# Creates a GdsApi::Router adapter for communicating with Router API
|
149
155
|
#
|
156
|
+
# This will set a bearer token if a ROUTER_API_BEARER_TOKEN environment
|
157
|
+
# variable is set
|
158
|
+
#
|
150
159
|
# @return [GdsApi::Router]
|
151
160
|
def self.router(options = {})
|
152
|
-
GdsApi::Router.new(
|
161
|
+
GdsApi::Router.new(
|
162
|
+
Plek.find('router-api'),
|
163
|
+
{ bearer_token: ENV['ROUTER_API_BEARER_TOKEN'] }.merge(options),
|
164
|
+
)
|
153
165
|
end
|
154
166
|
|
155
167
|
# Creates a GdsApi::Rummager adapter to access via a rummager.* hostname
|
@@ -25,6 +25,7 @@ class GdsApi::EmailAlertApi < GdsApi::Base
|
|
25
25
|
email_document_supertype = attributes["email_document_supertype"]
|
26
26
|
government_document_supertype = attributes["government_document_supertype"]
|
27
27
|
gov_delivery_id = attributes["gov_delivery_id"]
|
28
|
+
content_purpose_supergroup = attributes["content_purpose_supergroup"]
|
28
29
|
|
29
30
|
if tags && links
|
30
31
|
message = "please provide either tags or links (or neither), but not both"
|
@@ -38,6 +39,7 @@ class GdsApi::EmailAlertApi < GdsApi::Base
|
|
38
39
|
params[:email_document_supertype] = email_document_supertype if email_document_supertype
|
39
40
|
params[:government_document_supertype] = government_document_supertype if government_document_supertype
|
40
41
|
params[:gov_delivery_id] = gov_delivery_id if gov_delivery_id
|
42
|
+
params[:content_purpose_supergroup] = content_purpose_supergroup if content_purpose_supergroup
|
41
43
|
|
42
44
|
query_string = nested_query_string(params)
|
43
45
|
get_json("#{endpoint}/subscriber-lists?" + query_string)
|
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: 57.2.
|
4
|
+
version: 57.2.4
|
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: 2019-01-
|
11
|
+
date: 2019-01-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|