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: '05129b08c176476bd2e3ced8d6f3dfff99ddc118988170c11c6df428897fd5bd'
4
- data.tar.gz: 4da1003e323c07a7ba9e530a2ebe46c58c5e4f200aa879dd78942fb91a9f1d0a
3
+ metadata.gz: a2ebe3368e30be787ecac8213732a489b42683a685f243e3c49581ef96cdd979
4
+ data.tar.gz: 11b4d153f78945281c13332144b3e1cb8fe7caa7415d8b3f4900c18a091ae10e
5
5
  SHA512:
6
- metadata.gz: 2e90d10bcee7498339bcb684e67da2612f6d4ad9fbef24b2de270c0d3ea1c508f63bae430b14d6bebc602f60286c712eb2c59eb54a33405cf5caf82928f1a657
7
- data.tar.gz: fa54d821c6e50fc56ca824f54d89d74c0a9455c41809176c5f1f41068ca8a3f5171e27dae950477c3df7f662aab00e2b0264c8f60250723a828cb8a0661a1cb7
6
+ metadata.gz: 66d7dfe11d7b17ba10a417d9826bda58f2c13afa6df2b9e62dacb0acbbd4f2ae5c60cc26b895fc1ea9fde866e74cb1f23d2f5cdb34d1df86cdd53beafcba0169
7
+ data.tar.gz: 4881039ada3e08b91c3590d97f01a4099bcc88e6c09ea9cfc2df91b0b77069349bb046c856748d61fe007edaad6f23ca118d92c6dff10a39fb561dc87d4f521b
@@ -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.4.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::DRO.new(data.symbolize_keys) }
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::DRO.from_json(resp.body) if resp.success?
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
@@ -3,7 +3,7 @@
3
3
  module Dor
4
4
  module Services
5
5
  class Client
6
- VERSION = '3.2.0'
6
+ VERSION = '3.3.0'
7
7
  end
8
8
  end
9
9
  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.2.0
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-10 00:00:00.000000000 Z
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.4.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.4.0
47
+ version: 0.6.0
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: deprecation
50
50
  requirement: !ruby/object:Gem::Requirement