dor-services-client 12.9.0 → 12.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 +35 -31
- data/lib/dor/services/client/version.rb +1 -1
- data/lib/dor/services/client/workspace.rb +20 -5
- data/lib/dor/services/client.rb +2 -0
- 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: a6a8b96cc8e3c10974deb25a74cfcb78d0ef7a7abdfd9b587da2e1f1cb6773a5
|
4
|
+
data.tar.gz: 5800821a52f4b09fcbd34dd997c87327103d8e8ca6081ef17ccd70318e70a8b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f9b6cc1c3486776c79e0df52b0ef47580c7288af6c66a69ac049590469cabdebe25a2df12f3f98831531b8771525ceb324a42e7673c4dbe8c69e29a7445ae126
|
7
|
+
data.tar.gz: d6cb1eec07c4f9806c5f9a976cd38bc161a8396aaee014a06d6e2b8001bb46d101234398267e04901b96742994b9faf27129a0397a3a7c7539bb3043ac4f6f69
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
dor-services-client (12.
|
4
|
+
dor-services-client (12.10.0)
|
5
5
|
activesupport (>= 4.2, < 8)
|
6
6
|
cocina-models (~> 0.86.0)
|
7
7
|
deprecation
|
@@ -47,30 +47,34 @@ GEM
|
|
47
47
|
docile (1.4.0)
|
48
48
|
dry-container (0.11.0)
|
49
49
|
concurrent-ruby (~> 1.0)
|
50
|
-
dry-core (0.
|
50
|
+
dry-core (0.9.1)
|
51
51
|
concurrent-ruby (~> 1.0)
|
52
|
+
zeitwerk (~> 2.6)
|
52
53
|
dry-inflector (0.3.0)
|
53
|
-
dry-logic (1.
|
54
|
+
dry-logic (1.3.0)
|
54
55
|
concurrent-ruby (~> 1.0)
|
55
|
-
dry-core (~> 0.
|
56
|
-
|
57
|
-
|
58
|
-
dry-
|
56
|
+
dry-core (~> 0.9, >= 0.9)
|
57
|
+
zeitwerk (~> 2.6)
|
58
|
+
dry-struct (1.5.2)
|
59
|
+
dry-core (~> 0.9, >= 0.9)
|
60
|
+
dry-types (~> 1.6)
|
59
61
|
ice_nine (~> 0.11)
|
60
|
-
|
62
|
+
zeitwerk (~> 2.6)
|
63
|
+
dry-types (1.6.1)
|
61
64
|
concurrent-ruby (~> 1.0)
|
62
65
|
dry-container (~> 0.3)
|
63
|
-
dry-core (~> 0.
|
66
|
+
dry-core (~> 0.9, >= 0.9)
|
64
67
|
dry-inflector (~> 0.1, >= 0.1.2)
|
65
|
-
dry-logic (~> 1.
|
68
|
+
dry-logic (~> 1.3, >= 1.3)
|
69
|
+
zeitwerk (~> 2.6)
|
66
70
|
edtf (3.1.0)
|
67
71
|
activesupport (>= 3.0, < 8.0)
|
68
72
|
equivalent-xml (0.6.0)
|
69
73
|
nokogiri (>= 1.4.3)
|
70
|
-
faraday (2.
|
74
|
+
faraday (2.6.0)
|
71
75
|
faraday-net_http (>= 2.0, < 3.1)
|
72
76
|
ruby2_keywords (>= 0.0.4)
|
73
|
-
faraday-net_http (3.0.
|
77
|
+
faraday-net_http (3.0.1)
|
74
78
|
faraday-retry (2.0.0)
|
75
79
|
faraday (~> 2.0)
|
76
80
|
hashdiff (1.0.1)
|
@@ -82,9 +86,9 @@ GEM
|
|
82
86
|
multi_json
|
83
87
|
minitest (5.16.3)
|
84
88
|
multi_json (1.15.0)
|
85
|
-
nokogiri (1.13.
|
89
|
+
nokogiri (1.13.9-x86_64-darwin)
|
86
90
|
racc (~> 1.4)
|
87
|
-
nokogiri (1.13.
|
91
|
+
nokogiri (1.13.9-x86_64-linux)
|
88
92
|
racc (~> 1.4)
|
89
93
|
openapi3_parser (0.9.2)
|
90
94
|
commonmarker (~> 0.17)
|
@@ -99,36 +103,36 @@ GEM
|
|
99
103
|
racc (1.6.0)
|
100
104
|
rainbow (3.1.1)
|
101
105
|
rake (13.0.6)
|
102
|
-
regexp_parser (2.
|
106
|
+
regexp_parser (2.6.0)
|
103
107
|
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.
|
108
|
+
rspec (3.12.0)
|
109
|
+
rspec-core (~> 3.12.0)
|
110
|
+
rspec-expectations (~> 3.12.0)
|
111
|
+
rspec-mocks (~> 3.12.0)
|
112
|
+
rspec-core (3.12.0)
|
113
|
+
rspec-support (~> 3.12.0)
|
114
|
+
rspec-expectations (3.12.0)
|
111
115
|
diff-lcs (>= 1.2.0, < 2.0)
|
112
|
-
rspec-support (~> 3.
|
113
|
-
rspec-mocks (3.
|
116
|
+
rspec-support (~> 3.12.0)
|
117
|
+
rspec-mocks (3.12.0)
|
114
118
|
diff-lcs (>= 1.2.0, < 2.0)
|
115
|
-
rspec-support (~> 3.
|
116
|
-
rspec-support (3.
|
119
|
+
rspec-support (~> 3.12.0)
|
120
|
+
rspec-support (3.12.0)
|
117
121
|
rss (0.2.9)
|
118
122
|
rexml
|
119
|
-
rubocop (1.
|
123
|
+
rubocop (1.37.1)
|
120
124
|
json (~> 2.3)
|
121
125
|
parallel (~> 1.10)
|
122
126
|
parser (>= 3.1.2.1)
|
123
127
|
rainbow (>= 2.2.2, < 4.0)
|
124
128
|
regexp_parser (>= 1.8, < 3.0)
|
125
129
|
rexml (>= 3.2.5, < 4.0)
|
126
|
-
rubocop-ast (>= 1.
|
130
|
+
rubocop-ast (>= 1.23.0, < 2.0)
|
127
131
|
ruby-progressbar (~> 1.7)
|
128
132
|
unicode-display_width (>= 1.4.0, < 3.0)
|
129
|
-
rubocop-ast (1.
|
133
|
+
rubocop-ast (1.23.0)
|
130
134
|
parser (>= 3.1.1.0)
|
131
|
-
rubocop-rspec (2.
|
135
|
+
rubocop-rspec (2.14.2)
|
132
136
|
rubocop (~> 1.33)
|
133
137
|
ruby-progressbar (1.11.0)
|
134
138
|
ruby2_keywords (0.0.5)
|
@@ -150,7 +154,7 @@ GEM
|
|
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.4)
|
154
158
|
|
155
159
|
PLATFORMS
|
156
160
|
x86_64-darwin-19
|
@@ -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
|
data/lib/dor/services/client.rb
CHANGED
@@ -153,6 +153,8 @@ module Dor
|
|
153
153
|
# the Faraday instance will be passed an empty block, which
|
154
154
|
# causes the adapter not to be set. Thus, everything breaks.
|
155
155
|
builder.adapter Faraday.default_adapter
|
156
|
+
# 5 minutes read timeout for very large cocina (eg. many files) object create/update (default if none set is 60 seconds)
|
157
|
+
builder.options[:timeout] = 300
|
156
158
|
builder.headers[:user_agent] = user_agent
|
157
159
|
builder.headers[TOKEN_HEADER] = "Bearer #{token}"
|
158
160
|
builder.request :retry, max: 4, interval: 1, backoff_factor: 2 if with_retries
|
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: 12.
|
4
|
+
version: 12.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: 2022-
|
12
|
+
date: 2022-11-02 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.3.7
|
284
284
|
signing_key:
|
285
285
|
specification_version: 4
|
286
286
|
summary: A client for dor-services-app
|