gds-api-adapters 69.1.0 → 69.2.0

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: 30536128d763109b2965438ade68ca08a7bc60782f3ad29f4f874ee051d687ef
4
- data.tar.gz: 18db0bcda095594ec145e1ab54a6d80b68aa62df2d4348789931b2298d80b9ed
3
+ metadata.gz: 294f4287f0eb5a9fad08a2732fba69502b5622e5a8ebbc8bef4acc54a98b5c71
4
+ data.tar.gz: a9ecd5e2dbaf5e0fe31f678330300256b629e9ecd7b53c6f25b7c0e5ddaa4180
5
5
  SHA512:
6
- metadata.gz: f488b6b0512fd5a2ae41bad2116c225b2f39446f3d01fe4e493a1d4f0e4673176561dc0a1a79a68f349fc68f92c3b4d14e3cf8a506ffd81a014f22e3a6ad5480
7
- data.tar.gz: 8cb30f4f8c075c4674a792a9647112268be2a52a77c14c7d20c2ee65f5f2fbcf082e4c6211a6603984426e887a240b0910d4d894575a0f267ba156600e1ed2b5
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 single +file+ attribute that
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 *only* on the file's extension (derived
13
- # from +#path+). If you supply a +content-type+ via, for example
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 single +file+ attribute that
147
- # behaves like a +File+ object. The +content-type+ that the asset manager will
148
- # subsequently serve will be based *only* on the file's extension (derived
149
- # from +#path+). If you supply a +content-type+ via, for example
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)
@@ -1,3 +1,3 @@
1
1
  module GdsApi
2
- VERSION = "69.1.0".freeze
2
+ VERSION = "69.2.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: 69.1.0
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-19 00:00:00.000000000 Z
11
+ date: 2021-01-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable