dor-services-client 6.21.0 → 6.26.0.beta.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop_todo.yml +1 -1
- data/dor-services-client.gemspec +1 -1
- data/lib/dor/services/client/object.rb +14 -2
- data/lib/dor/services/client/version.rb +1 -1
- metadata +11 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a49955ced1894bfcf308683a6337deaa59aeab7fd405db834451d1431134c764
|
4
|
+
data.tar.gz: 30bdb02fd296c0263ef3632bf7b3c19263c865eecd5a4c0a261b1024eb9eadcd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 11f6a583325eb9913df2860f014ea0a23e4c7d89b9d13374970a0eb83497e9b73d419dd503966723a5e8b15cdc35c62a8d8df941c016fb7f20e57dcdb775fdba
|
7
|
+
data.tar.gz: 792cb313a59b7e83c8f3469b585cb87315171e47634b9bc8bb8d62aad975dc363014b73bd92a1e41473cd34896a1bf3e23fa6b4f6056277b610a8768cd9bb02f
|
data/.rubocop_todo.yml
CHANGED
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.54.0.beta' # leave pinned to patch level until cocina-models hits 1.0
|
27
27
|
spec.add_dependency 'deprecation', '>= 0'
|
28
28
|
spec.add_dependency 'faraday', '>= 0.15', '< 2'
|
29
29
|
spec.add_dependency 'moab-versioning', '~> 4.0'
|
@@ -52,13 +52,25 @@ module Dor
|
|
52
52
|
# @raise [UnexpectedResponse] when the response is not successful.
|
53
53
|
# @return [Cocina::Models::DRO,Cocina::Models::Collection,Cocina::Models::AdminPolicy] the returned model
|
54
54
|
def find
|
55
|
+
find_with_metadata.first
|
56
|
+
end
|
57
|
+
|
58
|
+
# Retrieves the Cocina model and response metadata
|
59
|
+
# @raise [NotFoundResponse] when the response is a 404 (object not found)
|
60
|
+
# @raise [UnexpectedResponse] when the response is not successful.
|
61
|
+
# @return [Array<Cocina::Models::DRO,Cocina::Models::Collection,Cocina::Models::AdminPolicy,Hash>] a tuple where
|
62
|
+
# the first is the model and the second is a hash of metadata
|
63
|
+
def find_with_metadata
|
55
64
|
resp = connection.get do |req|
|
56
65
|
req.url object_path
|
57
66
|
end
|
67
|
+
raise_exception_based_on_response!(resp) unless resp.success?
|
58
68
|
|
59
|
-
|
69
|
+
model = Cocina::Models.build(JSON.parse(resp.body))
|
60
70
|
|
61
|
-
|
71
|
+
# Don't use #slice here as Faraday will downcase the keys.
|
72
|
+
metadata = { 'Last-Modified' => resp.headers['Last-Modified'] }
|
73
|
+
[model, metadata]
|
62
74
|
end
|
63
75
|
|
64
76
|
# Updates the object
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dor-services-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.
|
4
|
+
version: 6.26.0.beta.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Coyne
|
8
8
|
- Michael Giarlo
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2021-
|
12
|
+
date: 2021-03-10 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.54.0.beta
|
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.54.0.beta
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
name: deprecation
|
50
50
|
requirement: !ruby/object:Gem::Requirement
|
@@ -205,7 +205,7 @@ dependencies:
|
|
205
205
|
- - ">="
|
206
206
|
- !ruby/object:Gem::Version
|
207
207
|
version: '0'
|
208
|
-
description:
|
208
|
+
description:
|
209
209
|
email:
|
210
210
|
- jcoyne@justincoyne.com
|
211
211
|
- leftwing@alumni.rutgers.edu
|
@@ -252,7 +252,7 @@ files:
|
|
252
252
|
homepage: https://github.com/sul-dlss/dor-services-client
|
253
253
|
licenses: []
|
254
254
|
metadata: {}
|
255
|
-
post_install_message:
|
255
|
+
post_install_message:
|
256
256
|
rdoc_options: []
|
257
257
|
require_paths:
|
258
258
|
- lib
|
@@ -263,12 +263,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
263
263
|
version: '0'
|
264
264
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
265
265
|
requirements:
|
266
|
-
- - "
|
266
|
+
- - ">"
|
267
267
|
- !ruby/object:Gem::Version
|
268
|
-
version:
|
268
|
+
version: 1.3.1
|
269
269
|
requirements: []
|
270
|
-
rubygems_version: 3.0.
|
271
|
-
signing_key:
|
270
|
+
rubygems_version: 3.0.6
|
271
|
+
signing_key:
|
272
272
|
specification_version: 4
|
273
273
|
summary: A client for dor-services-app
|
274
274
|
test_files: []
|