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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 19929d8822946703d616323856ec7de6f1e49f9e6c654c118476a7af965bf448
4
- data.tar.gz: e66d0f99e968293beb0902c240dc0e8eda6ed50daab520f2222a7ef76b6c2e8a
3
+ metadata.gz: dd184715a310407f67be332d5c8f9fc3ba825ebad50532b904938a6749167db6
4
+ data.tar.gz: 7a79fac8e92902504524f1ca6c09a2423dd7f25a1953759ea561aebc3cc77c82
5
5
  SHA512:
6
- metadata.gz: 4142cb26d773ac192adfbe602dcdf2af1e5ba1e6bee2cb098ef4316f42e52530f179fd9b5cdc5dee7e94485d8c721fe01af7df3df9f4cc9580520ddd245caf94
7
- data.tar.gz: 2c819bb26879c3305fa8eecf2a0ab01f215c2450dc5b0582f8aaf9f649116017e4fd0d871383060ddc75cd302d3d5ce55ac4c8a82095f87a300cbe839283f89b
6
+ metadata.gz: b922b6b0cbf7bd50e4ec5f7e464d4a16841a67181d4ac529143579a523b0b31589be7953d1f9a20bfa271e029e6f0856ffb4f1f8edf54cd45458c5c625bd6b67
7
+ data.tar.gz: d4c75ec159921b6b03f39877546a66aa88aafd833368b8c1acdf0c368738535c7bdc21ca0a4c63a832cdeef1ff8684e2897da835cf9356d5f63ee07543d89e8e
data/.circleci/config.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  version: 2.1
2
2
  orbs:
3
- ruby-rails: sul-dlss/ruby-rails@3.1.2
3
+ ruby-rails: sul-dlss/ruby-rails@3.2.0
4
4
  workflows:
5
5
  build:
6
6
  jobs:
data/Gemfile.lock CHANGED
@@ -1,9 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dor-services-client (12.9.1)
4
+ dor-services-client (12.11.0)
5
5
  activesupport (>= 4.2, < 8)
6
- cocina-models (~> 0.86.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 (6.2.5)
23
+ attr_extras (7.1.0)
24
24
  byebug (11.1.3)
25
- cocina-models (0.86.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.6)
41
- concurrent-ruby (1.1.10)
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-container (0.11.0)
48
+ dry-core (1.0.0)
49
49
  concurrent-ruby (~> 1.0)
50
- dry-core (0.8.1)
50
+ zeitwerk (~> 2.6)
51
+ dry-inflector (1.0.0)
52
+ dry-logic (1.5.0)
51
53
  concurrent-ruby (~> 1.0)
52
- dry-inflector (0.3.0)
53
- dry-logic (1.2.0)
54
- concurrent-ruby (~> 1.0)
55
- dry-core (~> 0.5, >= 0.5)
56
- dry-struct (1.4.0)
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
- dry-types (1.5.1)
60
+ zeitwerk (~> 2.6)
61
+ dry-types (1.7.0)
61
62
  concurrent-ruby (~> 1.0)
62
- dry-container (~> 0.3)
63
- dry-core (~> 0.5, >= 0.5)
64
- dry-inflector (~> 0.1, >= 0.1.2)
65
- dry-logic (~> 1.0, >= 1.0.2)
66
- edtf (3.1.0)
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.5.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.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.2)
81
+ json (2.6.3)
81
82
  jsonpath (1.1.2)
82
83
  multi_json
83
- minitest (5.16.3)
84
+ minitest (5.17.0)
84
85
  multi_json (1.15.0)
85
- nokogiri (1.13.8-x86_64-darwin)
86
+ nokogiri (1.14.2-x86_64-darwin)
86
87
  racc (~> 1.4)
87
- nokogiri (1.13.8-x86_64-linux)
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.1.2.1)
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.0)
99
- racc (1.6.0)
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.6.0)
103
+ regexp_parser (2.7.0)
103
104
  rexml (3.2.5)
104
- rspec (3.11.0)
105
- rspec-core (~> 3.11.0)
106
- rspec-expectations (~> 3.11.0)
107
- rspec-mocks (~> 3.11.0)
108
- rspec-core (3.11.0)
109
- rspec-support (~> 3.11.0)
110
- rspec-expectations (3.11.1)
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.11.0)
113
- rspec-mocks (3.11.1)
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.11.0)
116
- rspec-support (3.11.1)
116
+ rspec-support (~> 3.12.0)
117
+ rspec-support (3.12.0)
117
118
  rss (0.2.9)
118
119
  rexml
119
- rubocop (1.36.0)
120
+ rubocop (1.45.1)
120
121
  json (~> 2.3)
121
122
  parallel (~> 1.10)
122
- parser (>= 3.1.2.1)
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.20.1, < 2.0)
127
+ rubocop-ast (>= 1.24.1, < 2.0)
127
128
  ruby-progressbar (~> 1.7)
128
- unicode-display_width (>= 1.4.0, < 3.0)
129
- rubocop-ast (1.21.0)
130
- parser (>= 3.1.1.0)
131
- rubocop-rspec (2.13.2)
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.21.2)
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.5)
150
+ tzinfo (2.0.6)
147
151
  concurrent-ruby (~> 1.0)
148
- unicode-display_width (2.3.0)
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.1)
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.3.17
176
+ 2.4.6
@@ -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.86.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'
@@ -3,7 +3,7 @@
3
3
  module Dor
4
4
  module Services
5
5
  class Client
6
- VERSION = '12.9.1'
6
+ VERSION = '12.11.0'
7
7
  end
8
8
  end
9
9
  end
@@ -24,13 +24,21 @@ module Dor
24
24
  end
25
25
 
26
26
  # Cleans up a workspace
27
- # @raise [UnexpectedResponse] if the request is unsuccessful.
28
- # @return nil
29
- def cleanup
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 workspace_path
37
+ req.url cleanup_path
32
38
  end
33
- raise_exception_based_on_response!(resp, object_identifier) unless resp.success?
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.9.1
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: 2022-10-06 00:00:00.000000000 Z
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.86.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.86.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.3
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: []