dor-workflow-client 3.16.0 → 3.17.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0dfb0e0a75797f6a4fd5eb82b3d85d1e3a51added686152e6bd9951b570d88d9
|
4
|
+
data.tar.gz: 669d8c62f6b4543def7cfe06c01df1f9c289657b1b5ac88ac289ac4b4b7fd8d1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c690c2ec0ecce118cdf311276a9c5eac83519734aaf086c56b82c1af58914804046a4a9c9dc5f17ff2c3cb7961eb4f4ec13dd67f25a328f026ef6de0e042ca7
|
7
|
+
data.tar.gz: 7e9c5a41382a32fc7a797f61eab8ba3217f5896fffe8094f321ec7a9394ff146cbb3dfaee4b94dd3e352460a8ea9d19503f7d8bf8011510a675d7cf5d193ea4d
|
@@ -266,6 +266,14 @@ module Dor
|
|
266
266
|
Workflow::Response::Workflow.new(xml: xml)
|
267
267
|
end
|
268
268
|
|
269
|
+
# @param [String] pid id of object
|
270
|
+
# @param [String] workflow_name The name of the workflow
|
271
|
+
# @param [String] process The name of the workflow step
|
272
|
+
# @return [Workflow::Response::Process]
|
273
|
+
def process(pid:, workflow_name:, process:)
|
274
|
+
workflow(pid: pid, workflow_name: workflow_name).process_for_recent_version(name: process)
|
275
|
+
end
|
276
|
+
|
269
277
|
# Deletes a workflow from a particular repository and druid
|
270
278
|
# @param [String] repo The repository the object resides in. The service recoginzes "dor" and "sdr" at the moment
|
271
279
|
# @param [String] druid The id of the object to delete the workflow from
|
@@ -57,4 +57,17 @@ RSpec.describe Dor::Workflow::Response::Process do
|
|
57
57
|
end
|
58
58
|
it { is_expected.to eq 'start-assembly' }
|
59
59
|
end
|
60
|
+
|
61
|
+
describe '#lane_id' do
|
62
|
+
subject { instance.lane_id }
|
63
|
+
|
64
|
+
let(:xml) do
|
65
|
+
<<~XML
|
66
|
+
<workflow repository="dor" objectId="druid:mw971zk1113" id="assemblyWF">
|
67
|
+
<process name="start-assembly" laneId="default">
|
68
|
+
</workflow>
|
69
|
+
XML
|
70
|
+
end
|
71
|
+
it { is_expected.to eq 'default' }
|
72
|
+
end
|
60
73
|
end
|
@@ -49,6 +49,24 @@ RSpec.describe Dor::Workflow::Client::WorkflowRoutes do
|
|
49
49
|
end
|
50
50
|
end
|
51
51
|
|
52
|
+
describe '#process' do
|
53
|
+
let(:xml) do
|
54
|
+
<<~XML
|
55
|
+
<workflow repository="dor" objectId="druid:mw971zk1113" id="accessionWF">
|
56
|
+
<process laneId="default" lifecycle="submitted" elapsed="0.0" attempts="1" datetime="2013-02-18T15:08:10-0800" status="completed" name="start-accession"/>
|
57
|
+
</workflow>
|
58
|
+
XML
|
59
|
+
end
|
60
|
+
|
61
|
+
before do
|
62
|
+
allow(routes).to receive(:fetch_workflow) { xml }
|
63
|
+
end
|
64
|
+
|
65
|
+
it 'returns a process' do
|
66
|
+
expect(routes.process(pid: 'druid:mw971zk1113', workflow_name: 'accessionWF', process: 'start-accession')).to be_kind_of Dor::Workflow::Response::Process
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
52
70
|
describe '#update_status' do
|
53
71
|
let(:mock_requestor) { instance_double(Dor::Workflow::Client::Requestor, request: '{"next_steps":["submit-marc"]}') }
|
54
72
|
let(:druid) { 'druid:mw971zk1113' }
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dor-workflow-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.17.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Willy Mene
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-01-
|
12
|
+
date: 2020-01-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -253,7 +253,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
253
253
|
- !ruby/object:Gem::Version
|
254
254
|
version: '0'
|
255
255
|
requirements: []
|
256
|
-
rubygems_version: 3.
|
256
|
+
rubygems_version: 3.1.2
|
257
257
|
signing_key:
|
258
258
|
specification_version: 4
|
259
259
|
summary: Provides convenience methods to work with the DOR Workflow Service
|