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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a0cdf365381c6038c6b2cc8450158528c83f1daf5e7d41cff74f8fc5b48a6848
|
4
|
+
data.tar.gz: c82464b2f24334a7f7640d17435d5c0dc7de72d898ed3de6034747dd0555026d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad1b643a11d1254d44dcbcdad0ac308a16eaadc0ad658407247e23250c6a1c0ba466ced3ebab25652cd7d72d0cec73fbf8ccaa2ee9b44b25d817f1d2ea77a960
|
7
|
+
data.tar.gz: c88e40ce8d62e1e64d77e8f31a856a27bc7d88af254a3116d70621cb83fbcd3b189e5c40b28bea42c73d73f1a32adade49aff0ee570dcdcbdaa0f2e310d07d71
|
@@ -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
|
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.
|
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-
|
12
|
+
date: 2022-04-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|