dor-services-client 12.9.1 → 12.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +1 -1
- data/Gemfile.lock +59 -55
- data/dor-services-client.gemspec +1 -1
- data/lib/dor/services/client/version.rb +1 -1
- data/lib/dor/services/client/workspace.rb +20 -5
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd184715a310407f67be332d5c8f9fc3ba825ebad50532b904938a6749167db6
|
4
|
+
data.tar.gz: 7a79fac8e92902504524f1ca6c09a2423dd7f25a1953759ea561aebc3cc77c82
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b922b6b0cbf7bd50e4ec5f7e464d4a16841a67181d4ac529143579a523b0b31589be7953d1f9a20bfa271e029e6f0856ffb4f1f8edf54cd45458c5c625bd6b67
|
7
|
+
data.tar.gz: d4c75ec159921b6b03f39877546a66aa88aafd833368b8c1acdf0c368738535c7bdc21ca0a4c63a832cdeef1ff8684e2897da835cf9356d5f63ee07543d89e8e
|
data/.circleci/config.yml
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
dor-services-client (12.
|
4
|
+
dor-services-client (12.11.0)
|
5
5
|
activesupport (>= 4.2, < 8)
|
6
|
-
cocina-models (~> 0.
|
6
|
+
cocina-models (~> 0.87.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.0.4)
|
15
|
+
activesupport (7.0.4.2)
|
16
16
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
17
17
|
i18n (>= 1.6, < 2)
|
18
18
|
minitest (>= 5.1)
|
@@ -20,9 +20,9 @@ GEM
|
|
20
20
|
addressable (2.8.1)
|
21
21
|
public_suffix (>= 2.0.2, < 6.0)
|
22
22
|
ast (2.4.2)
|
23
|
-
attr_extras (
|
23
|
+
attr_extras (7.1.0)
|
24
24
|
byebug (11.1.3)
|
25
|
-
cocina-models (0.
|
25
|
+
cocina-models (0.87.0)
|
26
26
|
activesupport
|
27
27
|
deprecation
|
28
28
|
dry-struct (~> 1.0)
|
@@ -37,102 +37,106 @@ GEM
|
|
37
37
|
super_diff
|
38
38
|
thor
|
39
39
|
zeitwerk (~> 2.1)
|
40
|
-
commonmarker (0.23.
|
41
|
-
concurrent-ruby (1.
|
40
|
+
commonmarker (0.23.8)
|
41
|
+
concurrent-ruby (1.2.0)
|
42
42
|
crack (0.4.5)
|
43
43
|
rexml
|
44
44
|
deprecation (1.1.0)
|
45
45
|
activesupport
|
46
46
|
diff-lcs (1.5.0)
|
47
47
|
docile (1.4.0)
|
48
|
-
dry-
|
48
|
+
dry-core (1.0.0)
|
49
49
|
concurrent-ruby (~> 1.0)
|
50
|
-
|
50
|
+
zeitwerk (~> 2.6)
|
51
|
+
dry-inflector (1.0.0)
|
52
|
+
dry-logic (1.5.0)
|
51
53
|
concurrent-ruby (~> 1.0)
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
dry-core (~> 0
|
56
|
-
|
57
|
-
dry-core (~> 0.5, >= 0.5)
|
58
|
-
dry-types (~> 1.5)
|
54
|
+
dry-core (~> 1.0, < 2)
|
55
|
+
zeitwerk (~> 2.6)
|
56
|
+
dry-struct (1.6.0)
|
57
|
+
dry-core (~> 1.0, < 2)
|
58
|
+
dry-types (>= 1.7, < 2)
|
59
59
|
ice_nine (~> 0.11)
|
60
|
-
|
60
|
+
zeitwerk (~> 2.6)
|
61
|
+
dry-types (1.7.0)
|
61
62
|
concurrent-ruby (~> 1.0)
|
62
|
-
dry-
|
63
|
-
dry-
|
64
|
-
dry-
|
65
|
-
|
66
|
-
edtf (3.1.
|
63
|
+
dry-core (~> 1.0, < 2)
|
64
|
+
dry-inflector (~> 1.0, < 2)
|
65
|
+
dry-logic (>= 1.4, < 2)
|
66
|
+
zeitwerk (~> 2.6)
|
67
|
+
edtf (3.1.1)
|
67
68
|
activesupport (>= 3.0, < 8.0)
|
68
69
|
equivalent-xml (0.6.0)
|
69
70
|
nokogiri (>= 1.4.3)
|
70
|
-
faraday (2.
|
71
|
+
faraday (2.7.4)
|
71
72
|
faraday-net_http (>= 2.0, < 3.1)
|
72
73
|
ruby2_keywords (>= 0.0.4)
|
73
|
-
faraday-net_http (3.0.
|
74
|
+
faraday-net_http (3.0.2)
|
74
75
|
faraday-retry (2.0.0)
|
75
76
|
faraday (~> 2.0)
|
76
77
|
hashdiff (1.0.1)
|
77
78
|
i18n (1.12.0)
|
78
79
|
concurrent-ruby (~> 1.0)
|
79
80
|
ice_nine (0.11.2)
|
80
|
-
json (2.6.
|
81
|
+
json (2.6.3)
|
81
82
|
jsonpath (1.1.2)
|
82
83
|
multi_json
|
83
|
-
minitest (5.
|
84
|
+
minitest (5.17.0)
|
84
85
|
multi_json (1.15.0)
|
85
|
-
nokogiri (1.
|
86
|
+
nokogiri (1.14.2-x86_64-darwin)
|
86
87
|
racc (~> 1.4)
|
87
|
-
nokogiri (1.
|
88
|
+
nokogiri (1.14.2-x86_64-linux)
|
88
89
|
racc (~> 1.4)
|
89
90
|
openapi3_parser (0.9.2)
|
90
91
|
commonmarker (~> 0.17)
|
91
92
|
openapi_parser (0.15.0)
|
92
93
|
optimist (3.0.1)
|
93
94
|
parallel (1.22.1)
|
94
|
-
parser (3.
|
95
|
+
parser (3.2.1.0)
|
95
96
|
ast (~> 2.4.1)
|
96
97
|
patience_diff (1.2.0)
|
97
98
|
optimist (~> 3.0)
|
98
|
-
public_suffix (5.0.
|
99
|
-
racc (1.6.
|
99
|
+
public_suffix (5.0.1)
|
100
|
+
racc (1.6.2)
|
100
101
|
rainbow (3.1.1)
|
101
102
|
rake (13.0.6)
|
102
|
-
regexp_parser (2.
|
103
|
+
regexp_parser (2.7.0)
|
103
104
|
rexml (3.2.5)
|
104
|
-
rspec (3.
|
105
|
-
rspec-core (~> 3.
|
106
|
-
rspec-expectations (~> 3.
|
107
|
-
rspec-mocks (~> 3.
|
108
|
-
rspec-core (3.
|
109
|
-
rspec-support (~> 3.
|
110
|
-
rspec-expectations (3.
|
105
|
+
rspec (3.12.0)
|
106
|
+
rspec-core (~> 3.12.0)
|
107
|
+
rspec-expectations (~> 3.12.0)
|
108
|
+
rspec-mocks (~> 3.12.0)
|
109
|
+
rspec-core (3.12.1)
|
110
|
+
rspec-support (~> 3.12.0)
|
111
|
+
rspec-expectations (3.12.2)
|
111
112
|
diff-lcs (>= 1.2.0, < 2.0)
|
112
|
-
rspec-support (~> 3.
|
113
|
-
rspec-mocks (3.
|
113
|
+
rspec-support (~> 3.12.0)
|
114
|
+
rspec-mocks (3.12.3)
|
114
115
|
diff-lcs (>= 1.2.0, < 2.0)
|
115
|
-
rspec-support (~> 3.
|
116
|
-
rspec-support (3.
|
116
|
+
rspec-support (~> 3.12.0)
|
117
|
+
rspec-support (3.12.0)
|
117
118
|
rss (0.2.9)
|
118
119
|
rexml
|
119
|
-
rubocop (1.
|
120
|
+
rubocop (1.45.1)
|
120
121
|
json (~> 2.3)
|
121
122
|
parallel (~> 1.10)
|
122
|
-
parser (>= 3.
|
123
|
+
parser (>= 3.2.0.0)
|
123
124
|
rainbow (>= 2.2.2, < 4.0)
|
124
125
|
regexp_parser (>= 1.8, < 3.0)
|
125
126
|
rexml (>= 3.2.5, < 4.0)
|
126
|
-
rubocop-ast (>= 1.
|
127
|
+
rubocop-ast (>= 1.24.1, < 2.0)
|
127
128
|
ruby-progressbar (~> 1.7)
|
128
|
-
unicode-display_width (>=
|
129
|
-
rubocop-ast (1.
|
130
|
-
parser (>= 3.
|
131
|
-
rubocop-
|
129
|
+
unicode-display_width (>= 2.4.0, < 3.0)
|
130
|
+
rubocop-ast (1.26.0)
|
131
|
+
parser (>= 3.2.1.0)
|
132
|
+
rubocop-capybara (2.17.0)
|
133
|
+
rubocop (~> 1.41)
|
134
|
+
rubocop-rspec (2.18.1)
|
132
135
|
rubocop (~> 1.33)
|
136
|
+
rubocop-capybara (~> 2.17)
|
133
137
|
ruby-progressbar (1.11.0)
|
134
138
|
ruby2_keywords (0.0.5)
|
135
|
-
simplecov (0.
|
139
|
+
simplecov (0.22.0)
|
136
140
|
docile (~> 1.1)
|
137
141
|
simplecov-html (~> 0.11)
|
138
142
|
simplecov_json_formatter (~> 0.1)
|
@@ -143,14 +147,14 @@ GEM
|
|
143
147
|
diff-lcs
|
144
148
|
patience_diff
|
145
149
|
thor (1.2.1)
|
146
|
-
tzinfo (2.0.
|
150
|
+
tzinfo (2.0.6)
|
147
151
|
concurrent-ruby (~> 1.0)
|
148
|
-
unicode-display_width (2.
|
152
|
+
unicode-display_width (2.4.2)
|
149
153
|
webmock (3.18.1)
|
150
154
|
addressable (>= 2.8.0)
|
151
155
|
crack (>= 0.3.2)
|
152
156
|
hashdiff (>= 0.4.0, < 2.0.0)
|
153
|
-
zeitwerk (2.6.
|
157
|
+
zeitwerk (2.6.7)
|
154
158
|
|
155
159
|
PLATFORMS
|
156
160
|
x86_64-darwin-19
|
@@ -169,4 +173,4 @@ DEPENDENCIES
|
|
169
173
|
webmock
|
170
174
|
|
171
175
|
BUNDLED WITH
|
172
|
-
2.
|
176
|
+
2.4.6
|
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.87.0'
|
29
29
|
spec.add_dependency 'deprecation', '>= 0'
|
30
30
|
spec.add_dependency 'faraday', '~> 2.0'
|
31
31
|
spec.add_dependency 'faraday-retry'
|
@@ -24,13 +24,21 @@ module Dor
|
|
24
24
|
end
|
25
25
|
|
26
26
|
# Cleans up a workspace
|
27
|
-
# @raise [
|
28
|
-
# @
|
29
|
-
|
27
|
+
# @raise [NotFoundResponse] when the response is a 404 (object not found)
|
28
|
+
# @raise [UnexpectedResponse] when the response is not successful.
|
29
|
+
# @param [String] workflow (nil) which workflow to callback to.
|
30
|
+
# @param [String] lane_id for prioritization (default or low)
|
31
|
+
# @return [String] the URL of the background job on dor-service-app
|
32
|
+
def cleanup(workflow: nil, lane_id: nil)
|
33
|
+
query_params = query_params_for(workflow, lane_id)
|
34
|
+
query_string = query_params.any? ? "?#{query_params.join('&')}" : ''
|
35
|
+
cleanup_path = "#{workspace_path}#{query_string}"
|
30
36
|
resp = connection.delete do |req|
|
31
|
-
req.url
|
37
|
+
req.url cleanup_path
|
32
38
|
end
|
33
|
-
|
39
|
+
return resp.headers['Location'] if resp.success?
|
40
|
+
|
41
|
+
raise_exception_based_on_response!(resp, object_identifier)
|
34
42
|
end
|
35
43
|
|
36
44
|
# After an object has been copied to preservation the workspace can be
|
@@ -50,6 +58,13 @@ module Dor
|
|
50
58
|
"#{api_version}/objects/#{object_identifier}/workspace"
|
51
59
|
end
|
52
60
|
|
61
|
+
def query_params_for(workflow, lane_id)
|
62
|
+
[].tap do |params|
|
63
|
+
params << "workflow=#{workflow}" if workflow
|
64
|
+
params << "lane-id=#{lane_id}" if lane_id
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
53
68
|
attr_reader :object_identifier
|
54
69
|
end
|
55
70
|
end
|
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: 12.
|
4
|
+
version: 12.11.0
|
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:
|
12
|
+
date: 2023-02-14 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.87.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.87.0
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
name: deprecation
|
50
50
|
requirement: !ruby/object:Gem::Requirement
|
@@ -213,7 +213,7 @@ dependencies:
|
|
213
213
|
- - ">="
|
214
214
|
- !ruby/object:Gem::Version
|
215
215
|
version: '0'
|
216
|
-
description:
|
216
|
+
description:
|
217
217
|
email:
|
218
218
|
- jcoyne@justincoyne.com
|
219
219
|
- leftwing@alumni.rutgers.edu
|
@@ -262,7 +262,7 @@ homepage: https://github.com/sul-dlss/dor-services-client
|
|
262
262
|
licenses: []
|
263
263
|
metadata:
|
264
264
|
rubygems_mfa_required: 'true'
|
265
|
-
post_install_message:
|
265
|
+
post_install_message:
|
266
266
|
rdoc_options: []
|
267
267
|
require_paths:
|
268
268
|
- lib
|
@@ -280,8 +280,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
280
280
|
- !ruby/object:Gem::Version
|
281
281
|
version: '0'
|
282
282
|
requirements: []
|
283
|
-
rubygems_version: 3.2.
|
284
|
-
signing_key:
|
283
|
+
rubygems_version: 3.2.32
|
284
|
+
signing_key:
|
285
285
|
specification_version: 4
|
286
286
|
summary: A client for dor-services-app
|
287
287
|
test_files: []
|