gds-api-adapters 57.2.3 → 57.2.4

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
  SHA256:
3
- metadata.gz: cdf50d9974acdcfdfd5ad1d517abd007598a86f7a811cfa7cc7852f8ef4ad7af
4
- data.tar.gz: eb23da4637a18a3b049af473929cba6c27ad4beb27a1c3b3c0c39f2ca01eb6b1
3
+ metadata.gz: 588c881df929ae172881c6770eb146c6928f8c7ceb61cc84bb8c0933cb521306
4
+ data.tar.gz: c52ea31c0777b1a63809db604883e331732ad076493990e31ba14c4c76e07cf9
5
5
  SHA512:
6
- metadata.gz: 270ebb6f01941b807ccda0e9b7f77b0e8d97f09e116d4137633319266a5473005daf79049b5669a8a0b0e1375f4b967e1a7fc49c39067230a6b9a3f30607dee8
7
- data.tar.gz: 94e63c8caa8917f9441ddf4340079a5aea7fdcf5f585629d813e01857570ca5d870c3423d97a732ae6ec6b459cc45dd510705fb9e7e7c886a08b5924c4be3fbf
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(Plek.find('content-store'), options)
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(Plek.find('router-api'), options)
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)
@@ -1,3 +1,3 @@
1
1
  module GdsApi
2
- VERSION = '57.2.3'.freeze
2
+ VERSION = '57.2.4'.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: 57.2.3
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-28 00:00:00.000000000 Z
11
+ date: 2019-01-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable