dor-services-client 14.20.0 → 15.0.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 +36 -37
- data/README.md +1 -2
- data/lib/dor/services/client/object_version.rb +11 -0
- data/lib/dor/services/client/version.rb +1 -1
- data/lib/dor/services/client/workspace.rb +3 -14
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c9b0b8817f35c2ad2ea2d03a6ab1d70bf5290f525c4aa9b377af70764ae1926
|
4
|
+
data.tar.gz: 2075c060e362ff9e4464501ef72618b737036d23b0e73a9e0474f9f122c867a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d7131523aae0d2efe4011a3bbd4a62e2786ef276434edb61212137f2f0ef1337fe4c67c9ee6b2dd7b6b92fcb7e938f54ec3078087c029266fecfb298b2372197
|
7
|
+
data.tar.gz: fc19e0baf6f1d199bbbf8c0c8fb863f90e8b9eb22118508ea34386817c1077c95d771cb3cce881e302f195ee6f1d17a1caa4d4daa75ec3cd92a8bc341e98c417
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
dor-services-client (
|
4
|
+
dor-services-client (15.0.0)
|
5
5
|
activesupport (>= 4.2, < 8)
|
6
6
|
cocina-models (~> 0.99.0)
|
7
7
|
deprecation
|
@@ -12,16 +12,17 @@ PATH
|
|
12
12
|
GEM
|
13
13
|
remote: https://rubygems.org/
|
14
14
|
specs:
|
15
|
-
activesupport (7.1
|
15
|
+
activesupport (7.2.1)
|
16
16
|
base64
|
17
17
|
bigdecimal
|
18
|
-
concurrent-ruby (~> 1.0, >= 1.
|
18
|
+
concurrent-ruby (~> 1.0, >= 1.3.1)
|
19
19
|
connection_pool (>= 2.2.5)
|
20
20
|
drb
|
21
21
|
i18n (>= 1.6, < 2)
|
22
|
+
logger (>= 1.4.2)
|
22
23
|
minitest (>= 5.1)
|
23
|
-
|
24
|
-
tzinfo (~> 2.0)
|
24
|
+
securerandom (>= 0.3)
|
25
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
25
26
|
addressable (2.8.7)
|
26
27
|
public_suffix (>= 2.0.2, < 7.0)
|
27
28
|
ast (2.4.2)
|
@@ -44,10 +45,10 @@ GEM
|
|
44
45
|
super_diff
|
45
46
|
thor
|
46
47
|
zeitwerk (~> 2.1)
|
47
|
-
commonmarker (1.1.
|
48
|
-
commonmarker (1.1.
|
49
|
-
commonmarker (1.1.
|
50
|
-
concurrent-ruby (1.3.
|
48
|
+
commonmarker (1.1.5-arm64-darwin)
|
49
|
+
commonmarker (1.1.5-x86_64-darwin)
|
50
|
+
commonmarker (1.1.5-x86_64-linux)
|
51
|
+
concurrent-ruby (1.3.4)
|
51
52
|
connection_pool (2.4.1)
|
52
53
|
crack (1.0.0)
|
53
54
|
bigdecimal
|
@@ -81,25 +82,25 @@ GEM
|
|
81
82
|
activesupport (>= 3.0, < 8.0)
|
82
83
|
equivalent-xml (0.6.0)
|
83
84
|
nokogiri (>= 1.4.3)
|
84
|
-
faraday (2.
|
85
|
-
faraday-net_http (>= 2.0, < 3.
|
85
|
+
faraday (2.12.0)
|
86
|
+
faraday-net_http (>= 2.0, < 3.4)
|
87
|
+
json
|
86
88
|
logger
|
87
|
-
faraday-net_http (3.
|
89
|
+
faraday-net_http (3.3.0)
|
88
90
|
net-http
|
89
91
|
faraday-retry (2.2.1)
|
90
92
|
faraday (~> 2.0)
|
91
|
-
hashdiff (1.1.
|
92
|
-
i18n (1.14.
|
93
|
+
hashdiff (1.1.1)
|
94
|
+
i18n (1.14.6)
|
93
95
|
concurrent-ruby (~> 1.0)
|
94
96
|
ice_nine (0.11.2)
|
95
97
|
json (2.7.2)
|
96
98
|
jsonpath (1.1.5)
|
97
99
|
multi_json
|
98
100
|
language_server-protocol (3.17.0.3)
|
99
|
-
logger (1.6.
|
100
|
-
minitest (5.
|
101
|
+
logger (1.6.1)
|
102
|
+
minitest (5.25.1)
|
101
103
|
multi_json (1.15.0)
|
102
|
-
mutex_m (0.2.0)
|
103
104
|
net-http (0.4.1)
|
104
105
|
uri
|
105
106
|
nokogiri (1.16.7-arm64-darwin)
|
@@ -112,44 +113,42 @@ GEM
|
|
112
113
|
commonmarker (>= 1.0)
|
113
114
|
openapi_parser (1.0.0)
|
114
115
|
optimist (3.1.0)
|
115
|
-
parallel (1.
|
116
|
-
parser (3.3.
|
116
|
+
parallel (1.26.3)
|
117
|
+
parser (3.3.5.0)
|
117
118
|
ast (~> 2.4.1)
|
118
119
|
racc
|
119
120
|
patience_diff (1.2.0)
|
120
121
|
optimist (~> 3.0)
|
121
122
|
public_suffix (6.0.1)
|
122
|
-
racc (1.8.
|
123
|
+
racc (1.8.1)
|
123
124
|
rainbow (3.1.1)
|
124
125
|
rake (13.2.1)
|
125
126
|
regexp_parser (2.9.2)
|
126
|
-
rexml (3.3.
|
127
|
-
strscan
|
127
|
+
rexml (3.3.8)
|
128
128
|
rspec (3.13.0)
|
129
129
|
rspec-core (~> 3.13.0)
|
130
130
|
rspec-expectations (~> 3.13.0)
|
131
131
|
rspec-mocks (~> 3.13.0)
|
132
|
-
rspec-core (3.13.
|
132
|
+
rspec-core (3.13.1)
|
133
133
|
rspec-support (~> 3.13.0)
|
134
|
-
rspec-expectations (3.13.
|
134
|
+
rspec-expectations (3.13.3)
|
135
135
|
diff-lcs (>= 1.2.0, < 2.0)
|
136
136
|
rspec-support (~> 3.13.0)
|
137
|
-
rspec-mocks (3.13.
|
137
|
+
rspec-mocks (3.13.2)
|
138
138
|
diff-lcs (>= 1.2.0, < 2.0)
|
139
139
|
rspec-support (~> 3.13.0)
|
140
140
|
rspec-support (3.13.1)
|
141
|
-
rubocop (1.
|
141
|
+
rubocop (1.66.1)
|
142
142
|
json (~> 2.3)
|
143
143
|
language_server-protocol (>= 3.17.0)
|
144
144
|
parallel (~> 1.10)
|
145
145
|
parser (>= 3.3.0.2)
|
146
146
|
rainbow (>= 2.2.2, < 4.0)
|
147
147
|
regexp_parser (>= 2.4, < 3.0)
|
148
|
-
|
149
|
-
rubocop-ast (>= 1.31.1, < 2.0)
|
148
|
+
rubocop-ast (>= 1.32.2, < 2.0)
|
150
149
|
ruby-progressbar (~> 1.7)
|
151
150
|
unicode-display_width (>= 2.4.0, < 3.0)
|
152
|
-
rubocop-ast (1.
|
151
|
+
rubocop-ast (1.32.3)
|
153
152
|
parser (>= 3.3.1.0)
|
154
153
|
rubocop-capybara (2.21.0)
|
155
154
|
rubocop (~> 1.41)
|
@@ -163,27 +162,27 @@ GEM
|
|
163
162
|
rubocop-rspec_rails (2.29.1)
|
164
163
|
rubocop (~> 1.61)
|
165
164
|
ruby-progressbar (1.13.0)
|
165
|
+
securerandom (0.3.1)
|
166
166
|
simplecov (0.22.0)
|
167
167
|
docile (~> 1.1)
|
168
168
|
simplecov-html (~> 0.11)
|
169
169
|
simplecov_json_formatter (~> 0.1)
|
170
|
-
simplecov-html (0.
|
170
|
+
simplecov-html (0.13.1)
|
171
171
|
simplecov_json_formatter (0.1.4)
|
172
|
-
|
173
|
-
super_diff (0.12.1)
|
172
|
+
super_diff (0.13.0)
|
174
173
|
attr_extras (>= 6.2.4)
|
175
174
|
diff-lcs
|
176
175
|
patience_diff
|
177
|
-
thor (1.3.
|
176
|
+
thor (1.3.2)
|
178
177
|
tzinfo (2.0.6)
|
179
178
|
concurrent-ruby (~> 1.0)
|
180
|
-
unicode-display_width (2.
|
181
|
-
uri (0.13.
|
182
|
-
webmock (3.
|
179
|
+
unicode-display_width (2.6.0)
|
180
|
+
uri (0.13.1)
|
181
|
+
webmock (3.24.0)
|
183
182
|
addressable (>= 2.8.0)
|
184
183
|
crack (>= 0.3.2)
|
185
184
|
hashdiff (>= 0.4.0, < 2.0.0)
|
186
|
-
zeitwerk (2.6.
|
185
|
+
zeitwerk (2.6.18)
|
187
186
|
|
188
187
|
PLATFORMS
|
189
188
|
arm64-darwin-23
|
data/README.md
CHANGED
@@ -164,10 +164,9 @@ object_client.release_tags.list(public: true) # only public release tags (i.e. l
|
|
164
164
|
object_client.events.create(type: type, data: data)
|
165
165
|
object_client.events.list
|
166
166
|
|
167
|
-
# Create
|
167
|
+
# Create and reset workspaces
|
168
168
|
object_client.workspace.create(source: object_path_string)
|
169
169
|
object_client.workspace.cleanup
|
170
|
-
object_client.workspace.reset
|
171
170
|
|
172
171
|
# Reindex
|
173
172
|
object_client.reindex
|
@@ -152,6 +152,17 @@ module Dor
|
|
152
152
|
VersionStatus.new(JSON.parse(resp.body).symbolize_keys!)
|
153
153
|
end
|
154
154
|
|
155
|
+
# @return [Hash] the solr document for the user version
|
156
|
+
# @raise [UnexpectedResponse] on an unsuccessful response from the server
|
157
|
+
def solr(version)
|
158
|
+
resp = connection.get do |req|
|
159
|
+
req.url "#{base_path}/#{version}/solr"
|
160
|
+
end
|
161
|
+
raise_exception_based_on_response!(resp) unless resp.success?
|
162
|
+
|
163
|
+
JSON.parse(resp.body)
|
164
|
+
end
|
165
|
+
|
155
166
|
private
|
156
167
|
|
157
168
|
attr_reader :object_identifier
|
@@ -31,7 +31,9 @@ module Dor
|
|
31
31
|
end
|
32
32
|
# rubocop:enable Metrics/AbcSize
|
33
33
|
|
34
|
-
# Cleans up
|
34
|
+
# Cleans up and resets the workspace
|
35
|
+
# After an object has been copied to preservation the workspace can be
|
36
|
+
# reset. This is called by the reset-workspace step of the accessionWF
|
35
37
|
# @raise [NotFoundResponse] when the response is a 404 (object not found)
|
36
38
|
# @raise [UnexpectedResponse] when the response is not successful.
|
37
39
|
# @param [String] workflow (nil) which workflow to callback to.
|
@@ -46,19 +48,6 @@ module Dor
|
|
46
48
|
raise_exception_based_on_response!(resp, object_identifier)
|
47
49
|
end
|
48
50
|
|
49
|
-
# After an object has been copied to preservation the workspace can be
|
50
|
-
# reset. This is called by the reset-workspace step of the accessionWF
|
51
|
-
# @param [String] workflow (nil) which workflow to callback to.
|
52
|
-
# @param [String] lane_id for prioritization (default or low)
|
53
|
-
# @raise [UnexpectedResponse] if the request is unsuccessful.
|
54
|
-
# @return nil
|
55
|
-
def reset(workflow: nil, lane_id: nil)
|
56
|
-
resp = connection.post do |req|
|
57
|
-
req.url with_query_params("#{workspace_path}/reset", workflow, lane_id)
|
58
|
-
end
|
59
|
-
raise_exception_based_on_response!(resp, object_identifier) unless resp.success?
|
60
|
-
end
|
61
|
-
|
62
51
|
private
|
63
52
|
|
64
53
|
def workspace_path
|
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:
|
4
|
+
version: 15.0.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-10-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -280,7 +280,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
280
280
|
- !ruby/object:Gem::Version
|
281
281
|
version: '0'
|
282
282
|
requirements: []
|
283
|
-
rubygems_version: 3.
|
283
|
+
rubygems_version: 3.5.15
|
284
284
|
signing_key:
|
285
285
|
specification_version: 4
|
286
286
|
summary: A client for dor-services-app
|