dor-services-client 13.0.1 → 13.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: 74d7e3fd877e278b201d95659d3003b2a80823060553d3b6922914dac87b7c20
4
- data.tar.gz: dceb16866228a3fcd1230d1d3e81be9083fdc1a92d41f6d937a964bd913dd9ff
3
+ metadata.gz: 07a7f4f3a4799676f9af98bc7a8dbb3b991a2a907a430a103d652258365feff8
4
+ data.tar.gz: 0601c6f446cda0eb0e8cc09286c5e082f26c9dbf54a51fb5e3958f7bec679274
5
5
  SHA512:
6
- metadata.gz: 49c37f1ab1f9cfabedf44f1f3d94c677c86c91207ed383e33d16679e5f326767f1b36ddd764bfdf928984ee2007abb8cba9d4a41ac557a4bee6e8aba174f00c6
7
- data.tar.gz: 9b4fabacd6a69c13101da1d59378d359e11a297a0ee7e120ae5a1cf38ab54302774706dbc7756100507964641eb5ed34c5cc3f515ee53f44ba577b0c2f6ab994
6
+ metadata.gz: 7760cdb2c74b39ded300b991c617214ac455c9d3be14a9a477e74404f222b530f9817056329b86b20cab170a13964ac3e9f2eb78bd999d3347692bc890716fe4
7
+ data.tar.gz: ac7d1c9102f10883157ac49c849a6d3984fd020fe314e263df8a8316b3205b1aa3fb5738dacc28671a4957f676fa41a2137906a9e310e10ee0b8ac1dddc2e21b
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dor-services-client (13.0.1)
4
+ dor-services-client (13.1.0)
5
5
  activesupport (>= 4.2, < 8)
6
6
  cocina-models (~> 0.91.0)
7
7
  deprecation
@@ -12,7 +12,7 @@ PATH
12
12
  GEM
13
13
  remote: https://rubygems.org/
14
14
  specs:
15
- activesupport (7.1.0)
15
+ activesupport (7.1.1)
16
16
  base64
17
17
  bigdecimal
18
18
  concurrent-ruby (~> 1.0, >= 1.0.2)
@@ -90,7 +90,7 @@ GEM
90
90
  concurrent-ruby (~> 1.0)
91
91
  ice_nine (0.11.2)
92
92
  json (2.6.3)
93
- jsonpath (1.1.4)
93
+ jsonpath (1.1.5)
94
94
  multi_json
95
95
  language_server-protocol (3.17.0.3)
96
96
  minitest (5.20.0)
@@ -114,7 +114,7 @@ GEM
114
114
  racc (1.7.1)
115
115
  rainbow (3.1.1)
116
116
  rake (13.0.6)
117
- regexp_parser (2.8.1)
117
+ regexp_parser (2.8.2)
118
118
  rexml (3.2.6)
119
119
  rspec (3.12.0)
120
120
  rspec-core (~> 3.12.0)
@@ -131,12 +131,12 @@ GEM
131
131
  rspec-support (3.12.1)
132
132
  rss (0.3.0)
133
133
  rexml
134
- rubocop (1.56.4)
134
+ rubocop (1.57.1)
135
135
  base64 (~> 0.1.1)
136
136
  json (~> 2.3)
137
137
  language_server-protocol (>= 3.17.0)
138
138
  parallel (~> 1.10)
139
- parser (>= 3.2.2.3)
139
+ parser (>= 3.2.2.4)
140
140
  rainbow (>= 2.2.2, < 4.0)
141
141
  regexp_parser (>= 1.8, < 3.0)
142
142
  rexml (>= 3.2.5, < 4.0)
@@ -3,7 +3,7 @@
3
3
  module Dor
4
4
  module Services
5
5
  class Client
6
- VERSION = '13.0.1'
6
+ VERSION = '13.1.0'
7
7
  end
8
8
  end
9
9
  end
@@ -30,11 +30,8 @@ module Dor
30
30
  # @param [String] lane_id for prioritization (default or low)
31
31
  # @return [String] the URL of the background job on dor-service-app
32
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}"
36
33
  resp = connection.delete do |req|
37
- req.url cleanup_path
34
+ req.url with_query_params(workspace_path, workflow, lane_id)
38
35
  end
39
36
  return resp.headers['Location'] if resp.success?
40
37
 
@@ -43,11 +40,13 @@ module Dor
43
40
 
44
41
  # After an object has been copied to preservation the workspace can be
45
42
  # reset. This is called by the reset-workspace step of the accessionWF
43
+ # @param [String] workflow (nil) which workflow to callback to.
44
+ # @param [String] lane_id for prioritization (default or low)
46
45
  # @raise [UnexpectedResponse] if the request is unsuccessful.
47
46
  # @return nil
48
- def reset
47
+ def reset(workflow: nil, lane_id: nil)
49
48
  resp = connection.post do |req|
50
- req.url "#{workspace_path}/reset"
49
+ req.url with_query_params("#{workspace_path}/reset", workflow, lane_id)
51
50
  end
52
51
  raise_exception_based_on_response!(resp, object_identifier) unless resp.success?
53
52
  end
@@ -65,6 +64,13 @@ module Dor
65
64
  end
66
65
  end
67
66
 
67
+ def with_query_params(url, workflow, lane_id)
68
+ query_params = query_params_for(workflow, lane_id)
69
+ return url unless query_params.any?
70
+
71
+ "#{url}?#{query_params.join('&')}"
72
+ end
73
+
68
74
  attr_reader :object_identifier
69
75
  end
70
76
  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: 13.0.1
4
+ version: 13.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: 2023-10-09 00:00:00.000000000 Z
12
+ date: 2023-10-20 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.4.19
281
+ rubygems_version: 3.3.7
282
282
  signing_key:
283
283
  specification_version: 4
284
284
  summary: A client for dor-services-app