dor-services-client 14.21.0 → 15.1.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: 3ff6813b9be520819736afe92755b1d8cc43588fad5f6f1af004cad685c57292
4
- data.tar.gz: 6d2c7eb5cb09746fb7d523a3dfedf6a98f3735d35da9c91b619c3893ddf04cf2
3
+ metadata.gz: 5d7ec32221ccf11fa986b36536aa4a298ac724a0686411ee7246e897e92c2bed
4
+ data.tar.gz: 9aadc355af7981afee4a2c82ba27c924d3693e905c07663237dbab2800f130b7
5
5
  SHA512:
6
- metadata.gz: 6ad3758cdc34002e137d7d6e7702f9b639e9b56177d0ca94dc55893a7607a5ca4a20cb524018148de76a1b249a608a3a1482d5e24d7c0d30a58e0ede2df5a398
7
- data.tar.gz: 16342d7ae5dbaa1138a9127cd497e43e45f6f6c78d79e1bb76d5db2b1ab18160ca5d7e608ad0d1c7ba312cc37c2f897cb3bf4b5bd8755e7c540b1fd53a7c8b8b
6
+ metadata.gz: a9575501c47cae7331a1761873c2f380ed6c50a4c9d64e13adf530188a6abc20b5b5be55216d9d0e4950544c8092ee47046b4097e11749f5fa8498c573c5665c
7
+ data.tar.gz: b7da6ff18817b7fd1b84757d2c701b73d6b989e6de0afa24ff1f57ccdb73331d6f7b79900b3d283dd2f17cc6230368cf1440973ceb0c483e79bb781823265340
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dor-services-client (14.21.0)
4
+ dor-services-client (15.1.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.3.4)
15
+ activesupport (7.2.1)
16
16
  base64
17
17
  bigdecimal
18
- concurrent-ruby (~> 1.0, >= 1.0.2)
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
- mutex_m
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.4-arm64-darwin)
48
- commonmarker (1.1.4-x86_64-darwin)
49
- commonmarker (1.1.4-x86_64-linux)
50
- concurrent-ruby (1.3.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.10.0)
85
- faraday-net_http (>= 2.0, < 3.2)
85
+ faraday (2.12.0)
86
+ faraday-net_http (>= 2.0, < 3.4)
87
+ json
86
88
  logger
87
- faraday-net_http (3.1.1)
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.0)
92
- i18n (1.14.5)
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.0)
100
- minitest (5.24.1)
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.25.1)
116
- parser (3.3.4.0)
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.0)
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.2)
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.0)
132
+ rspec-core (3.13.1)
133
133
  rspec-support (~> 3.13.0)
134
- rspec-expectations (3.13.1)
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.1)
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.65.0)
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
- rexml (>= 3.2.5, < 4.0)
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.31.3)
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.12.3)
170
+ simplecov-html (0.13.1)
171
171
  simplecov_json_formatter (0.1.4)
172
- strscan (3.1.0)
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.1)
176
+ thor (1.3.2)
178
177
  tzinfo (2.0.6)
179
178
  concurrent-ruby (~> 1.0)
180
- unicode-display_width (2.5.0)
181
- uri (0.13.0)
182
- webmock (3.23.1)
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.16)
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, remove, and reset workspaces
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
@@ -3,7 +3,7 @@
3
3
  module Dor
4
4
  module Services
5
5
  class Client
6
- VERSION = '14.21.0'
6
+ VERSION = '15.1.0'
7
7
  end
8
8
  end
9
9
  end
@@ -31,54 +31,30 @@ module Dor
31
31
  end
32
32
  # rubocop:enable Metrics/AbcSize
33
33
 
34
- # Cleans up a workspace
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
- # @param [String] workflow (nil) which workflow to callback to.
38
39
  # @param [String] lane_id for prioritization (default or low)
39
40
  # @return [String] the URL of the background job on dor-service-app
40
- def cleanup(workflow: nil, lane_id: nil)
41
+ def cleanup(lane_id: nil)
42
+ cleanup_workspace_path = workspace_path
43
+ cleanup_workspace_path += "?lane-id=#{lane_id}" if lane_id
41
44
  resp = connection.delete do |req|
42
- req.url with_query_params(workspace_path, workflow, lane_id)
45
+ req.url cleanup_workspace_path
43
46
  end
44
47
  return resp.headers['Location'] if resp.success?
45
48
 
46
49
  raise_exception_based_on_response!(resp, object_identifier)
47
50
  end
48
51
 
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
52
  private
63
53
 
64
54
  def workspace_path
65
55
  "#{api_version}/objects/#{object_identifier}/workspace"
66
56
  end
67
57
 
68
- def query_params_for(workflow, lane_id)
69
- [].tap do |params|
70
- params << "workflow=#{workflow}" if workflow
71
- params << "lane-id=#{lane_id}" if lane_id
72
- end
73
- end
74
-
75
- def with_query_params(url, workflow, lane_id)
76
- query_params = query_params_for(workflow, lane_id)
77
- return url unless query_params.any?
78
-
79
- "#{url}?#{query_params.join('&')}"
80
- end
81
-
82
58
  attr_reader :object_identifier
83
59
  end
84
60
  end
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.21.0
4
+ version: 15.1.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-08-06 00:00:00.000000000 Z
12
+ date: 2024-10-10 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.4.19
283
+ rubygems_version: 3.5.15
284
284
  signing_key:
285
285
  specification_version: 4
286
286
  summary: A client for dor-services-app