dor-services-client 3.2.0 → 3.3.0
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: a2ebe3368e30be787ecac8213732a489b42683a685f243e3c49581ef96cdd979
|
4
|
+
data.tar.gz: 11b4d153f78945281c13332144b3e1cb8fe7caa7415d8b3f4900c18a091ae10e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 66d7dfe11d7b17ba10a417d9826bda58f2c13afa6df2b9e62dacb0acbbd4f2ae5c60cc26b895fc1ea9fde866e74cb1f23d2f5cdb34d1df86cdd53beafcba0169
|
7
|
+
data.tar.gz: 4881039ada3e08b91c3590d97f01a4099bcc88e6c09ea9cfc2df91b0b77069349bb046c856748d61fe007edaad6f23ca118d92c6dff10a39fb561dc87d4f521b
|
data/dor-services-client.gemspec
CHANGED
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.require_paths = ['lib']
|
24
24
|
|
25
25
|
spec.add_dependency 'activesupport', '>= 4.2', '< 7'
|
26
|
-
spec.add_dependency 'cocina-models', '~> 0.
|
26
|
+
spec.add_dependency 'cocina-models', '~> 0.6.0'
|
27
27
|
spec.add_dependency 'deprecation'
|
28
28
|
spec.add_dependency 'faraday', '~> 0.15'
|
29
29
|
spec.add_dependency 'moab-versioning', '~> 4.0'
|
@@ -29,7 +29,7 @@ module Dor
|
|
29
29
|
private
|
30
30
|
|
31
31
|
def response_to_models(resp)
|
32
|
-
JSON.parse(resp.body)['collections'].map { |data| Cocina::Models
|
32
|
+
JSON.parse(resp.body)['collections'].map { |data| Cocina::Models.build(data) }
|
33
33
|
end
|
34
34
|
|
35
35
|
def object_path
|
@@ -46,13 +46,13 @@ module Dor
|
|
46
46
|
# Retrieves the Cocina model
|
47
47
|
# @raise [NotFoundResponse] when the response is a 404 (object not found)
|
48
48
|
# @raise [UnexpectedResponse] when the response is not successful.
|
49
|
-
# @return [Cocina::Models::DRO] the returned model
|
49
|
+
# @return [Cocina::Models::DRO,Cocina::Models::Collection,Cocina::Models::AdminPolicy] the returned model
|
50
50
|
def find
|
51
51
|
resp = connection.get do |req|
|
52
52
|
req.url object_path
|
53
53
|
end
|
54
54
|
|
55
|
-
return Cocina::Models
|
55
|
+
return Cocina::Models.build(JSON.parse(resp.body)) if resp.success?
|
56
56
|
|
57
57
|
raise_exception_based_on_response!(resp)
|
58
58
|
end
|
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: 3.
|
4
|
+
version: 3.3.0
|
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: 2019-10-
|
12
|
+
date: 2019-10-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -37,14 +37,14 @@ dependencies:
|
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.
|
40
|
+
version: 0.6.0
|
41
41
|
type: :runtime
|
42
42
|
prerelease: false
|
43
43
|
version_requirements: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.
|
47
|
+
version: 0.6.0
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
name: deprecation
|
50
50
|
requirement: !ruby/object:Gem::Requirement
|