dor-services-client 15.19.1 → 15.19.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4114ac9d54c635344a05f5f2568bb5ba34253bc4bce9b582022b875b603336b9
4
- data.tar.gz: edb4e3a047e0dabf506e4e89e03b7f59527627b77520a9def8d2d3daa9ded9a1
3
+ metadata.gz: fa1a06e75409fb25247a47027d95865b82a00d3beb16a777641e3482d0f3783a
4
+ data.tar.gz: 827ec0e64bc3f5e2ce7d88a0a7948fcc177256f275adffb2e4fe842b57a1a8dc
5
5
  SHA512:
6
- metadata.gz: 4c7ef185c5e7608ec875ac216a089be50c472c648dcc826ab59455e69785844a82007da5b0abd0a3cddc5acb24f9195fc5ee8f79134ebff9af0f671a211c53f2
7
- data.tar.gz: a0eec5090500cf1dab6884ecf159d5de33f90d9947f7f55c61b5c365b520b2731e370c8ec5b07dc51f95bb65077d94c509919f35c4a6fb2dfec814813c0fd805
6
+ metadata.gz: 0b465a37f74dd5825d992a3261bbb054cdb7fa0a30e86675979dd90ccc290543666003d720b4860fc23ff7b6dab6106f029d138315304ad0844f70cb867cf94c
7
+ data.tar.gz: 688da5bfaf7138b2c0db2c2cb7f5d342a7f8b35798fc0218224cb130056a3d4fb054cde2786eae38391927336d8784b955a778e9ca3292108f1917c508e1cc06
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dor-services-client (15.19.1)
4
+ dor-services-client (15.19.2)
5
5
  activesupport (>= 7.0.0)
6
6
  cocina-models (~> 0.105.0)
7
7
  deprecation
@@ -17,8 +17,15 @@ module Dor
17
17
 
18
18
  # @return [Dor::Services::Client::Process]
19
19
  def process(process)
20
- @process ||= Process.new(connection: connection, version: api_version, object_identifier: object_identifier,
21
- workflow_name: workflow_name, process: process, object_workflow_client: self)
20
+ raise ArgumentError, '`process` argument cannot be blank in call to `#process(process)`' if process.blank?
21
+
22
+ # Return memoized object instance if process value is the same
23
+ #
24
+ # This allows the client to interact with multiple workflows for a given object
25
+ return @process if @process&.process == process
26
+
27
+ @process = Process.new(connection: connection, version: api_version, object_identifier: object_identifier,
28
+ workflow_name: workflow_name, process: process, object_workflow_client: self)
22
29
  end
23
30
 
24
31
  # @return [Workflow::Response::Workflow]
@@ -44,10 +44,10 @@ module Dor
44
44
  perform_update(status: 'error', error_msg: error_msg, error_text: error_text)
45
45
  end
46
46
 
47
- private
48
-
49
47
  attr_reader :object_identifier, :workflow_name, :process, :object_workflow_client
50
48
 
49
+ private
50
+
51
51
  def perform_update(**payload)
52
52
  resp = connection.put do |req|
53
53
  req.url "#{api_version}/objects/#{object_identifier}/workflows/#{workflow_name}/processes/#{process}"
@@ -3,7 +3,7 @@
3
3
  module Dor
4
4
  module Services
5
5
  class Client
6
- VERSION = '15.19.1'
6
+ VERSION = '15.19.2'
7
7
  end
8
8
  end
9
9
  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: 15.19.1
4
+ version: 15.19.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Coyne