dor-services-client 14.6.1 → 14.8.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 +21 -18
- data/README.md +3 -0
- data/lib/dor/services/client/accession.rb +5 -1
- data/lib/dor/services/client/object.rb +13 -0
- data/lib/dor/services/client/object_version.rb +2 -1
- data/lib/dor/services/client/version.rb +1 -1
- 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: 3798160cbee5f498c2dcf18ce6304974ad6f93c32a4eee9bd41273d59e902b62
|
4
|
+
data.tar.gz: 3905de84edd954d62a9a14b5fb519551324f08ce45386e6546f424d4f03acb97
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d7e7053d66ead2fda66a24bfbde91391beedf301dbf7f93e9c5e68898a73658cf8b2739d85cfcea977d2e1228bfe7f804f39cad877587eb95fe73e159aeb62c5
|
7
|
+
data.tar.gz: d0fd6b0504df2de67b082cd1b8dfa5b4c282210b14ad8c6d613a34287b0f0df517228c04aac81acb69e4bb5b18ce649f1727216db7a847b261e4f533b8d3ee39
|
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.8.0)
|
5
5
|
activesupport (>= 4.2, < 8)
|
6
6
|
cocina-models (~> 0.96.0)
|
7
7
|
deprecation
|
@@ -27,7 +27,7 @@ GEM
|
|
27
27
|
ast (2.4.2)
|
28
28
|
attr_extras (7.1.0)
|
29
29
|
base64 (0.2.0)
|
30
|
-
bigdecimal (3.1.
|
30
|
+
bigdecimal (3.1.8)
|
31
31
|
byebug (11.1.3)
|
32
32
|
cocina-models (0.96.0)
|
33
33
|
activesupport
|
@@ -84,13 +84,13 @@ GEM
|
|
84
84
|
faraday-net_http (>= 2.0, < 3.2)
|
85
85
|
faraday-net_http (3.1.0)
|
86
86
|
net-http
|
87
|
-
faraday-retry (2.2.
|
87
|
+
faraday-retry (2.2.1)
|
88
88
|
faraday (~> 2.0)
|
89
89
|
hashdiff (1.1.0)
|
90
|
-
i18n (1.14.
|
90
|
+
i18n (1.14.5)
|
91
91
|
concurrent-ruby (~> 1.0)
|
92
92
|
ice_nine (0.11.2)
|
93
|
-
json (2.7.
|
93
|
+
json (2.7.2)
|
94
94
|
jsonpath (1.1.5)
|
95
95
|
multi_json
|
96
96
|
language_server-protocol (3.17.0.3)
|
@@ -99,25 +99,27 @@ GEM
|
|
99
99
|
mutex_m (0.2.0)
|
100
100
|
net-http (0.4.1)
|
101
101
|
uri
|
102
|
-
nokogiri (1.16.
|
102
|
+
nokogiri (1.16.5-arm64-darwin)
|
103
103
|
racc (~> 1.4)
|
104
|
-
nokogiri (1.16.
|
104
|
+
nokogiri (1.16.5-x86_64-darwin)
|
105
|
+
racc (~> 1.4)
|
106
|
+
nokogiri (1.16.5-x86_64-linux)
|
105
107
|
racc (~> 1.4)
|
106
108
|
openapi3_parser (0.9.2)
|
107
109
|
commonmarker (~> 0.17)
|
108
110
|
openapi_parser (1.0.0)
|
109
111
|
optimist (3.1.0)
|
110
112
|
parallel (1.24.0)
|
111
|
-
parser (3.3.0
|
113
|
+
parser (3.3.1.0)
|
112
114
|
ast (~> 2.4.1)
|
113
115
|
racc
|
114
116
|
patience_diff (1.2.0)
|
115
117
|
optimist (~> 3.0)
|
116
|
-
public_suffix (5.0.
|
118
|
+
public_suffix (5.0.5)
|
117
119
|
racc (1.7.3)
|
118
120
|
rainbow (3.1.1)
|
119
|
-
rake (13.1
|
120
|
-
regexp_parser (2.9.
|
121
|
+
rake (13.2.1)
|
122
|
+
regexp_parser (2.9.1)
|
121
123
|
rexml (3.2.6)
|
122
124
|
rspec (3.13.0)
|
123
125
|
rspec-core (~> 3.13.0)
|
@@ -128,13 +130,13 @@ GEM
|
|
128
130
|
rspec-expectations (3.13.0)
|
129
131
|
diff-lcs (>= 1.2.0, < 2.0)
|
130
132
|
rspec-support (~> 3.13.0)
|
131
|
-
rspec-mocks (3.13.
|
133
|
+
rspec-mocks (3.13.1)
|
132
134
|
diff-lcs (>= 1.2.0, < 2.0)
|
133
135
|
rspec-support (~> 3.13.0)
|
134
136
|
rspec-support (3.13.1)
|
135
137
|
rss (0.3.0)
|
136
138
|
rexml
|
137
|
-
rubocop (1.
|
139
|
+
rubocop (1.63.5)
|
138
140
|
json (~> 2.3)
|
139
141
|
language_server-protocol (>= 3.17.0)
|
140
142
|
parallel (~> 1.10)
|
@@ -145,18 +147,18 @@ GEM
|
|
145
147
|
rubocop-ast (>= 1.31.1, < 2.0)
|
146
148
|
ruby-progressbar (~> 1.7)
|
147
149
|
unicode-display_width (>= 2.4.0, < 3.0)
|
148
|
-
rubocop-ast (1.31.
|
149
|
-
parser (>= 3.3.0
|
150
|
+
rubocop-ast (1.31.3)
|
151
|
+
parser (>= 3.3.1.0)
|
150
152
|
rubocop-capybara (2.20.0)
|
151
153
|
rubocop (~> 1.41)
|
152
154
|
rubocop-factory_bot (2.25.1)
|
153
155
|
rubocop (~> 1.41)
|
154
|
-
rubocop-rspec (2.
|
156
|
+
rubocop-rspec (2.29.2)
|
155
157
|
rubocop (~> 1.40)
|
156
158
|
rubocop-capybara (~> 2.17)
|
157
159
|
rubocop-factory_bot (~> 2.22)
|
158
160
|
rubocop-rspec_rails (~> 2.28)
|
159
|
-
rubocop-rspec_rails (2.28.
|
161
|
+
rubocop-rspec_rails (2.28.3)
|
160
162
|
rubocop (~> 1.40)
|
161
163
|
ruby-progressbar (1.13.0)
|
162
164
|
simplecov (0.22.0)
|
@@ -165,7 +167,7 @@ GEM
|
|
165
167
|
simplecov_json_formatter (~> 0.1)
|
166
168
|
simplecov-html (0.12.3)
|
167
169
|
simplecov_json_formatter (0.1.4)
|
168
|
-
super_diff (0.
|
170
|
+
super_diff (0.12.1)
|
169
171
|
attr_extras (>= 6.2.4)
|
170
172
|
diff-lcs
|
171
173
|
patience_diff
|
@@ -181,6 +183,7 @@ GEM
|
|
181
183
|
zeitwerk (2.6.13)
|
182
184
|
|
183
185
|
PLATFORMS
|
186
|
+
arm64-darwin-23
|
184
187
|
x86_64-darwin-19
|
185
188
|
x86_64-darwin-20
|
186
189
|
x86_64-darwin-21
|
data/README.md
CHANGED
@@ -161,6 +161,9 @@ object_client.workspace.create(source: object_path_string)
|
|
161
161
|
object_client.workspace.cleanup
|
162
162
|
object_client.workspace.reset
|
163
163
|
|
164
|
+
# Reindex
|
165
|
+
object_client.reindex
|
166
|
+
|
164
167
|
# Search for administrative tags:
|
165
168
|
Dor::Services::Client.administrative_tags.search(q: 'Project')
|
166
169
|
```
|
@@ -18,12 +18,16 @@ module Dor
|
|
18
18
|
# @option params [String] :description set description of version change - required
|
19
19
|
# @option params [String] :opening_user_name add opening username to the event - optional
|
20
20
|
# @option params [String] :workflow the workflow to start - defaults to 'assemblyWF'
|
21
|
+
# @option params [Hash] :context the workflow context - optional
|
21
22
|
# @return [Boolean] true on success
|
22
23
|
# @raise [NotFoundResponse] when the response is a 404 (object not found)
|
23
24
|
# @raise [UnexpectedResponse] when the response is not successful.
|
24
25
|
def start(params = {})
|
26
|
+
body = params[:context] ? { 'context' => params[:context] }.to_json : ''
|
25
27
|
resp = connection.post do |req|
|
26
|
-
req.url with_querystring(url: path, params: params)
|
28
|
+
req.url with_querystring(url: path, params: params.except(:context))
|
29
|
+
req.headers['Content-Type'] = 'application/json'
|
30
|
+
req.body = body
|
27
31
|
end
|
28
32
|
return true if resp.success?
|
29
33
|
|
@@ -164,6 +164,19 @@ module Dor
|
|
164
164
|
raise_exception_based_on_response!(resp)
|
165
165
|
end
|
166
166
|
|
167
|
+
# Reindex the object in Solr.
|
168
|
+
# @raise [NotFoundResponse] when the response is a 404 (object not found)
|
169
|
+
# @raise [UnexpectedResponse] when the response is not successful.
|
170
|
+
# @return [boolean] true on success
|
171
|
+
def reindex
|
172
|
+
resp = connection.post do |req|
|
173
|
+
req.url "#{object_path}/reindex"
|
174
|
+
end
|
175
|
+
return true if resp.success?
|
176
|
+
|
177
|
+
raise_exception_based_on_response!(resp)
|
178
|
+
end
|
179
|
+
|
167
180
|
private
|
168
181
|
|
169
182
|
def parent_params
|
@@ -5,7 +5,7 @@ module Dor
|
|
5
5
|
class Client
|
6
6
|
# API calls that are about versions
|
7
7
|
class ObjectVersion < VersionedService
|
8
|
-
Version = Struct.new(:versionId, :
|
8
|
+
Version = Struct.new(:versionId, :message, keyword_init: true)
|
9
9
|
VersionStatus = Struct.new(:versionId, :open, :openable, :assembling, :accessioning, :closeable, keyword_init: true) do
|
10
10
|
alias_method :version, :versionId
|
11
11
|
|
@@ -98,6 +98,7 @@ module Dor
|
|
98
98
|
# @param description [String] (optional) - a description of the object version being opened
|
99
99
|
# @param user_name [String] (optional) - sunetid
|
100
100
|
# @param start_accession [Boolean] (optional) - whether to start accessioning workflow; defaults to true
|
101
|
+
# @param user_versions [String] (optional - values are none, new, or update) - create, update, or do nothing with user versions on close; defaults to none.
|
101
102
|
# @raise [NotFoundResponse] when the response is a 404 (object not found)
|
102
103
|
# @raise [UnexpectedResponse] when the response is not successful.
|
103
104
|
# @return [String] a message confirming successful closing
|
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.8.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-05-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -278,7 +278,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
278
278
|
- !ruby/object:Gem::Version
|
279
279
|
version: '0'
|
280
280
|
requirements: []
|
281
|
-
rubygems_version: 3.5.
|
281
|
+
rubygems_version: 3.5.9
|
282
282
|
signing_key:
|
283
283
|
specification_version: 4
|
284
284
|
summary: A client for dor-services-app
|