gds-api-adapters 69.1.0 → 69.2.0
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/asset_manager.rb +9 -10
- data/lib/gds_api/email_alert_api.rb +0 -11
- data/lib/gds_api/test_helpers/email_alert_api.rb +0 -5
- 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: 294f4287f0eb5a9fad08a2732fba69502b5622e5a8ebbc8bef4acc54a98b5c71
|
4
|
+
data.tar.gz: a9ecd5e2dbaf5e0fe31f678330300256b629e9ecd7b53c6f25b7c0e5ddaa4180
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76d12236b2395137708802139460673ef5cb8e2634e84dfb29066dc69cfa2dbba08c049554cc74f363e2e9c22ce7b4d924b06e498704666c3c8fd60a4a0adfc4
|
7
|
+
data.tar.gz: c1186893c71cd5daa83f62d52c0849954f1fc3395e224b934372bba08696691478553ce2c0a5ec25f2ba53ff7b5a7f08b936aee7bdf5160ad13604d3e09d19a8
|
@@ -7,12 +7,13 @@ class GdsApi::AssetManager < GdsApi::Base
|
|
7
7
|
#
|
8
8
|
# Makes a +POST+ request to the asset manager api to create an asset.
|
9
9
|
#
|
10
|
-
# The asset must be provided as a +Hash+ with a
|
10
|
+
# The asset must be provided as a +Hash+ with a +file+ attribute that
|
11
11
|
# behaves like a +File+ object. The +content-type+ that the asset manager will
|
12
|
-
# subsequently serve will be based
|
13
|
-
#
|
12
|
+
# subsequently serve will be based on the file's extension (derived from
|
13
|
+
# +#path+). If you supply a +content-type+ via, for example
|
14
14
|
# +ActionDispatch::Http::UploadedFile+ or another multipart wrapper, it will
|
15
|
-
# be ignored.
|
15
|
+
# be ignored. To provide a +content-type+ directly you must be specify it
|
16
|
+
# as a +content_type+ attribute of the hash.
|
16
17
|
#
|
17
18
|
# @param asset [Hash] The attributes for the asset to send to the api. Must
|
18
19
|
# contain +file+, which behaves like a +File+. All other attributes will be
|
@@ -143,12 +144,10 @@ class GdsApi::AssetManager < GdsApi::Base
|
|
143
144
|
#
|
144
145
|
# Makes a +PUT+ request to the asset manager api to update an asset.
|
145
146
|
#
|
146
|
-
# The asset must be provided as a +Hash+ with a
|
147
|
-
# behaves like a +File+ object. The +content-type+
|
148
|
-
#
|
149
|
-
#
|
150
|
-
# +ActionDispatch::Http::UploadedFile+ or another multipart wrapper, it will
|
151
|
-
# be ignored.
|
147
|
+
# The asset must be provided as a +Hash+ with a +file+ attribute that
|
148
|
+
# behaves like a +File+ object. The +content-type+ of the file will be based
|
149
|
+
# on the files extension unless you specify a +content_type+ attribute of
|
150
|
+
# the hash to set it.
|
152
151
|
#
|
153
152
|
# @param id [String] The asset identifier (a UUID).
|
154
153
|
# @param asset [Hash] The attributes for the asset to send to the api. Must
|
@@ -40,17 +40,6 @@ class GdsApi::EmailAlertApi < GdsApi::Base
|
|
40
40
|
post_json("#{endpoint}/messages", message, headers)
|
41
41
|
end
|
42
42
|
|
43
|
-
# Unpublishing alert
|
44
|
-
#
|
45
|
-
# @param message [Hash] content_id
|
46
|
-
#
|
47
|
-
# Used by email-alert-service to send a message to email-alert-api
|
48
|
-
# when an unpublishing message is put on the Rabbitmq queue by
|
49
|
-
# publishing-api
|
50
|
-
def send_unpublish_message(message)
|
51
|
-
post_json("#{endpoint}/unpublish-messages", message)
|
52
|
-
end
|
53
|
-
|
54
43
|
# Get topic matches
|
55
44
|
#
|
56
45
|
# @param attributes [Hash] tags, links, document_type,
|
@@ -150,11 +150,6 @@ module GdsApi
|
|
150
150
|
.to_return(status: 422)
|
151
151
|
end
|
152
152
|
|
153
|
-
def stub_email_alert_api_accepts_unpublishing_message
|
154
|
-
stub_request(:post, "#{EMAIL_ALERT_API_ENDPOINT}/unpublish-messages")
|
155
|
-
.to_return(status: 202, body: {}.to_json)
|
156
|
-
end
|
157
|
-
|
158
153
|
def stub_email_alert_api_accepts_content_change
|
159
154
|
stub_request(:post, "#{EMAIL_ALERT_API_ENDPOINT}/content-changes")
|
160
155
|
.to_return(status: 202, body: {}.to_json)
|
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: 69.
|
4
|
+
version: 69.2.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: 2021-01-
|
11
|
+
date: 2021-01-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|