dor-services-client 9.1.0 → 9.1.1

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: a4b8ec2c059acbd588a6d64e931035f5552b16bacf9d0e6a1f0b8194fb371bb2
4
- data.tar.gz: 750be3e2a2a234299c63ee1aeb6b40c4a0a87116785cf085bc359d80676465da
3
+ metadata.gz: a0cdf365381c6038c6b2cc8450158528c83f1daf5e7d41cff74f8fc5b48a6848
4
+ data.tar.gz: c82464b2f24334a7f7640d17435d5c0dc7de72d898ed3de6034747dd0555026d
5
5
  SHA512:
6
- metadata.gz: d0ffa417486e6136c276b2aa289d4f17e01a798ea288e727ce5b2955b722934ce7b992318ff3c88e3060a57a7cfd2a203b29d0302c6862d79cce80e6f4bab1d9
7
- data.tar.gz: f707910e959af48ab45e29a4328217517b42c50f49314ff14e142afed33688d842b2ecfc9df8ea740e59914c31cbbd4d5b5dbff67cbb7b6e1b64e197a7aa1618
6
+ metadata.gz: ad1b643a11d1254d44dcbcdad0ac308a16eaadc0ad658407247e23250c6a1c0ba466ced3ebab25652cd7d72d0cec73fbf8ccaa2ee9b44b25d817f1d2ea77a960
7
+ data.tar.gz: c88e40ce8d62e1e64d77e8f31a856a27bc7d88af254a3116d70621cb83fbcd3b189e5c40b28bea42c73d73f1a32adade49aff0ee570dcdcbdaa0f2e310d07d71
@@ -3,7 +3,7 @@
3
3
  module Dor
4
4
  module Services
5
5
  class Client
6
- VERSION = '9.1.0'
6
+ VERSION = '9.1.1'
7
7
  end
8
8
  end
9
9
  end
@@ -13,6 +13,8 @@ module Dor
13
13
  412 => PreconditionFailedResponse
14
14
  }.freeze
15
15
 
16
+ JSON_API_MIME_TYPE = 'application/vnd.api+json'
17
+
16
18
  def initialize(connection:, version:)
17
19
  @connection = connection
18
20
  @api_version = version
@@ -28,7 +30,7 @@ module Dor
28
30
  attr_reader :connection, :api_version
29
31
 
30
32
  def raise_exception_based_on_response!(response, object_identifier = nil)
31
- data = if response.headers['content-type'] == 'application/json'
33
+ data = if response.headers.fetch('content-type', '').start_with?(JSON_API_MIME_TYPE)
32
34
  JSON.parse(response.body)
33
35
  else
34
36
  {}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dor-services-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.1.0
4
+ version: 9.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Coyne
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2022-04-20 00:00:00.000000000 Z
12
+ date: 2022-04-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport