dor-services-client 14.17.0 → 14.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +7 -7
- data/lib/dor/services/client/object_version.rb +20 -2
- data/lib/dor/services/client/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4136d57baaf81fc1d27cc97a9d9fca6dae65a9dc5e736fb73c33b83b79224ee2
|
4
|
+
data.tar.gz: 66cb019012bff4ff0a2b9a1c5595c1306055a899de81851f076654027d137e07
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 25fa723dfa2453e4976b6059c3e3b8f2b9c8d0e6a3ba3c60332c87d04a334c3ed7956d39902001e5fad8acb847a41ac55d9b60adcc84410690c9089939072c27
|
7
|
+
data.tar.gz: 48036d3c29fd7029b54d4670f92542f4fbf58d357e78a5ec21c2c6aa5f84a34387e3f2583eec096768727c3eb726c93e70065131c2b6c6f6c45e48a1979e6766
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
dor-services-client (14.
|
4
|
+
dor-services-client (14.19.0)
|
5
5
|
activesupport (>= 4.2, < 8)
|
6
6
|
cocina-models (~> 0.98.0)
|
7
7
|
deprecation
|
@@ -55,7 +55,7 @@ GEM
|
|
55
55
|
deprecation (1.1.0)
|
56
56
|
activesupport
|
57
57
|
diff-lcs (1.5.1)
|
58
|
-
docile (1.4.
|
58
|
+
docile (1.4.1)
|
59
59
|
drb (2.2.1)
|
60
60
|
dry-core (1.0.1)
|
61
61
|
concurrent-ruby (~> 1.0)
|
@@ -84,7 +84,7 @@ GEM
|
|
84
84
|
faraday (2.10.0)
|
85
85
|
faraday-net_http (>= 2.0, < 3.2)
|
86
86
|
logger
|
87
|
-
faraday-net_http (3.1.
|
87
|
+
faraday-net_http (3.1.1)
|
88
88
|
net-http
|
89
89
|
faraday-retry (2.2.1)
|
90
90
|
faraday (~> 2.0)
|
@@ -102,11 +102,11 @@ GEM
|
|
102
102
|
mutex_m (0.2.0)
|
103
103
|
net-http (0.4.1)
|
104
104
|
uri
|
105
|
-
nokogiri (1.16.
|
105
|
+
nokogiri (1.16.7-arm64-darwin)
|
106
106
|
racc (~> 1.4)
|
107
|
-
nokogiri (1.16.
|
107
|
+
nokogiri (1.16.7-x86_64-darwin)
|
108
108
|
racc (~> 1.4)
|
109
|
-
nokogiri (1.16.
|
109
|
+
nokogiri (1.16.7-x86_64-linux)
|
110
110
|
racc (~> 1.4)
|
111
111
|
openapi3_parser (0.10.0)
|
112
112
|
commonmarker (>= 1.0)
|
@@ -118,7 +118,7 @@ GEM
|
|
118
118
|
racc
|
119
119
|
patience_diff (1.2.0)
|
120
120
|
optimist (~> 3.0)
|
121
|
-
public_suffix (6.0.
|
121
|
+
public_suffix (6.0.1)
|
122
122
|
racc (1.8.0)
|
123
123
|
rainbow (3.1.1)
|
124
124
|
rake (13.2.1)
|
@@ -4,8 +4,15 @@ module Dor
|
|
4
4
|
module Services
|
5
5
|
class Client
|
6
6
|
# API calls that are about versions
|
7
|
-
class ObjectVersion < VersionedService
|
8
|
-
Version = Struct.new(:versionId, :message, keyword_init: true)
|
7
|
+
class ObjectVersion < VersionedService # rubocop:disable Metrics/ClassLength
|
8
|
+
Version = Struct.new(:versionId, :message, :cocina, keyword_init: true) do
|
9
|
+
alias_method :version, :versionId
|
10
|
+
|
11
|
+
def cocina?
|
12
|
+
cocina
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
9
16
|
VersionStatus = Struct.new(:versionId, :open, :openable, :assembling, :accessioning, :closeable, keyword_init: true) do
|
10
17
|
alias_method :version, :versionId
|
11
18
|
|
@@ -40,6 +47,17 @@ module Dor
|
|
40
47
|
@object_identifier = object_identifier
|
41
48
|
end
|
42
49
|
|
50
|
+
# @return [Cocina::Models::DROWithMetadata] the object metadata
|
51
|
+
# @raise [UnexpectedResponse] on an unsuccessful response from the server
|
52
|
+
def find(version)
|
53
|
+
resp = connection.get do |req|
|
54
|
+
req.url "#{base_path}/#{version}"
|
55
|
+
end
|
56
|
+
raise_exception_based_on_response!(resp) unless resp.success?
|
57
|
+
|
58
|
+
build_cocina_from_response(resp, validate: false)
|
59
|
+
end
|
60
|
+
|
43
61
|
# Get the current version for a DOR object. This comes from ObjectVersion table in the DSA
|
44
62
|
# @raise [NotFoundResponse] when the response is a 404 (object not found)
|
45
63
|
# @raise [UnexpectedResponse] when the response is not successful.
|
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: 14.
|
4
|
+
version: 14.19.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: 2024-
|
12
|
+
date: 2024-08-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|