dor-services-client 14.8.0 → 14.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +9 -10
- data/dor-services-client.gemspec +1 -1
- data/lib/dor/services/client/object.rb +4 -0
- data/lib/dor/services/client/user_version.rb +41 -0
- data/lib/dor/services/client/version.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0617e31e85fd412f80cfce8eecfbc05c3a9e9039158ed7e93bb7a8b5dd73f44f
|
4
|
+
data.tar.gz: f555839734ce309b4a8d161691b9903f2c4dcafde73b85607c71ba14eba00b93
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e3b3c31bff0f82e979e23a0a2749122a44a4646f73594b9fa9e7b4c3fcc992908acd8f77f6436a1b530bba8035c5c1649fded38a638b014b6d265b22d28aac1d
|
7
|
+
data.tar.gz: f34661793f42deeca10cd7abd9ce2420aa1c3a9950cf64342eeaa05bdd6f5b0674defc2c2608fb5476ba43ef1d2bd42765eb16c3f4536783ee46a8343da12590
|
data/Gemfile.lock
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
dor-services-client (14.
|
4
|
+
dor-services-client (14.10.0)
|
5
5
|
activesupport (>= 4.2, < 8)
|
6
|
-
cocina-models (~> 0.
|
6
|
+
cocina-models (~> 0.97.0)
|
7
7
|
deprecation
|
8
8
|
faraday (~> 2.0)
|
9
9
|
faraday-retry
|
@@ -12,7 +12,7 @@ PATH
|
|
12
12
|
GEM
|
13
13
|
remote: https://rubygems.org/
|
14
14
|
specs:
|
15
|
-
activesupport (7.1.3.
|
15
|
+
activesupport (7.1.3.3)
|
16
16
|
base64
|
17
17
|
bigdecimal
|
18
18
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
@@ -29,7 +29,7 @@ GEM
|
|
29
29
|
base64 (0.2.0)
|
30
30
|
bigdecimal (3.1.8)
|
31
31
|
byebug (11.1.3)
|
32
|
-
cocina-models (0.
|
32
|
+
cocina-models (0.97.0)
|
33
33
|
activesupport
|
34
34
|
deprecation
|
35
35
|
dry-struct (~> 1.0)
|
@@ -41,7 +41,6 @@ GEM
|
|
41
41
|
nokogiri
|
42
42
|
openapi3_parser
|
43
43
|
openapi_parser (~> 1.0)
|
44
|
-
rss
|
45
44
|
super_diff
|
46
45
|
thor
|
47
46
|
zeitwerk (~> 2.1)
|
@@ -94,7 +93,7 @@ GEM
|
|
94
93
|
jsonpath (1.1.5)
|
95
94
|
multi_json
|
96
95
|
language_server-protocol (3.17.0.3)
|
97
|
-
minitest (5.
|
96
|
+
minitest (5.23.0)
|
98
97
|
multi_json (1.15.0)
|
99
98
|
mutex_m (0.2.0)
|
100
99
|
net-http (0.4.1)
|
@@ -120,7 +119,8 @@ GEM
|
|
120
119
|
rainbow (3.1.1)
|
121
120
|
rake (13.2.1)
|
122
121
|
regexp_parser (2.9.1)
|
123
|
-
rexml (3.2.
|
122
|
+
rexml (3.2.8)
|
123
|
+
strscan (>= 3.0.9)
|
124
124
|
rspec (3.13.0)
|
125
125
|
rspec-core (~> 3.13.0)
|
126
126
|
rspec-expectations (~> 3.13.0)
|
@@ -134,8 +134,6 @@ GEM
|
|
134
134
|
diff-lcs (>= 1.2.0, < 2.0)
|
135
135
|
rspec-support (~> 3.13.0)
|
136
136
|
rspec-support (3.13.1)
|
137
|
-
rss (0.3.0)
|
138
|
-
rexml
|
139
137
|
rubocop (1.63.5)
|
140
138
|
json (~> 2.3)
|
141
139
|
language_server-protocol (>= 3.17.0)
|
@@ -167,6 +165,7 @@ GEM
|
|
167
165
|
simplecov_json_formatter (~> 0.1)
|
168
166
|
simplecov-html (0.12.3)
|
169
167
|
simplecov_json_formatter (0.1.4)
|
168
|
+
strscan (3.1.0)
|
170
169
|
super_diff (0.12.1)
|
171
170
|
attr_extras (>= 6.2.4)
|
172
171
|
diff-lcs
|
@@ -180,7 +179,7 @@ GEM
|
|
180
179
|
addressable (>= 2.8.0)
|
181
180
|
crack (>= 0.3.2)
|
182
181
|
hashdiff (>= 0.4.0, < 2.0.0)
|
183
|
-
zeitwerk (2.6.
|
182
|
+
zeitwerk (2.6.14)
|
184
183
|
|
185
184
|
PLATFORMS
|
186
185
|
arm64-darwin-23
|
data/dor-services-client.gemspec
CHANGED
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.required_ruby_version = '>= 3.0', '< 4'
|
26
26
|
|
27
27
|
spec.add_dependency 'activesupport', '>= 4.2', '< 8'
|
28
|
-
spec.add_dependency 'cocina-models', '~> 0.
|
28
|
+
spec.add_dependency 'cocina-models', '~> 0.97.0'
|
29
29
|
spec.add_dependency 'deprecation', '>= 0'
|
30
30
|
spec.add_dependency 'faraday', '~> 2.0'
|
31
31
|
spec.add_dependency 'faraday-retry'
|
@@ -38,6 +38,10 @@ module Dor
|
|
38
38
|
@version ||= ObjectVersion.new(**parent_params)
|
39
39
|
end
|
40
40
|
|
41
|
+
def user_version
|
42
|
+
@user_version ||= UserVersion.new(**parent_params)
|
43
|
+
end
|
44
|
+
|
41
45
|
def accession(params = {})
|
42
46
|
@accession ||= Accession.new(**parent_params.merge(params))
|
43
47
|
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Dor
|
4
|
+
module Services
|
5
|
+
class Client
|
6
|
+
# API calls that are about user versions
|
7
|
+
class UserVersion < VersionedService
|
8
|
+
Version = Struct.new(:version, :userVersion, keyword_init: true)
|
9
|
+
|
10
|
+
# @param object_identifier [String] the pid for the object
|
11
|
+
def initialize(connection:, version:, object_identifier:)
|
12
|
+
super(connection: connection, version: version)
|
13
|
+
@object_identifier = object_identifier
|
14
|
+
end
|
15
|
+
|
16
|
+
# @return [Array] a list of the user versions
|
17
|
+
# @raise [UnexpectedResponse] on an unsuccessful response from the server
|
18
|
+
def inventory
|
19
|
+
resp = connection.get do |req|
|
20
|
+
req.url base_path
|
21
|
+
end
|
22
|
+
raise_exception_based_on_response!(resp, object_identifier) unless resp.success?
|
23
|
+
|
24
|
+
JSON.parse(resp.body).fetch('user_versions').map { |params| Version.new(**params.symbolize_keys!) }
|
25
|
+
end
|
26
|
+
|
27
|
+
private
|
28
|
+
|
29
|
+
attr_reader :object_identifier
|
30
|
+
|
31
|
+
def object_path
|
32
|
+
"#{api_version}/objects/#{object_identifier}"
|
33
|
+
end
|
34
|
+
|
35
|
+
def base_path
|
36
|
+
"#{object_path}/user_versions"
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
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: 14.
|
4
|
+
version: 14.10.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-05-
|
12
|
+
date: 2024-05-17 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.97.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.97.0
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
name: deprecation
|
50
50
|
requirement: !ruby/object:Gem::Requirement
|
@@ -252,6 +252,7 @@ files:
|
|
252
252
|
- lib/dor/services/client/release_tags.rb
|
253
253
|
- lib/dor/services/client/response_error_formatter.rb
|
254
254
|
- lib/dor/services/client/transfer.rb
|
255
|
+
- lib/dor/services/client/user_version.rb
|
255
256
|
- lib/dor/services/client/version.rb
|
256
257
|
- lib/dor/services/client/versioned_service.rb
|
257
258
|
- lib/dor/services/client/virtual_objects.rb
|