dor-workflow-client 7.0.0 → 7.0.2
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: f6b39aa68d201501560723248e1227a926a054bef2b9d0bd52fb838bfe59b4ab
|
4
|
+
data.tar.gz: d5ec6e469fa8caf1ab3bd89f284000bdf0a1a99ea5e076de92b3a9c6e03d46ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee3c55767e033f381642b56af7b2b783598b818798d85b6106b3d7defcccb39a6942e2daa3a7abde0133f5e5664bd9927abee6549919d17e35ff52c89b04267e
|
7
|
+
data.tar.gz: c213c42ee4cd545bf81b9104f74449f15af44a947d5e546e4dfd2cde240c0cc0d468bf6b55b3cd94b22517c931922f97ef6f67c1f62445ee32e8df080172e812
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
dor-workflow-client (7.0.
|
4
|
+
dor-workflow-client (7.0.2)
|
5
5
|
activesupport (>= 3.2.1, < 8)
|
6
6
|
deprecation (>= 0.99.0)
|
7
7
|
faraday (~> 2.0)
|
@@ -28,7 +28,7 @@ GEM
|
|
28
28
|
base64 (0.2.0)
|
29
29
|
bigdecimal (3.1.5)
|
30
30
|
byebug (11.1.3)
|
31
|
-
concurrent-ruby (1.2.
|
31
|
+
concurrent-ruby (1.2.3)
|
32
32
|
connection_pool (2.4.1)
|
33
33
|
crack (0.4.5)
|
34
34
|
rexml
|
@@ -58,7 +58,7 @@ GEM
|
|
58
58
|
mini_portile2 (~> 2.8.2)
|
59
59
|
racc (~> 1.4)
|
60
60
|
parallel (1.24.0)
|
61
|
-
parser (3.3.0.
|
61
|
+
parser (3.3.0.4)
|
62
62
|
ast (~> 2.4.1)
|
63
63
|
racc
|
64
64
|
public_suffix (5.0.4)
|
@@ -21,6 +21,15 @@ module Dor
|
|
21
21
|
JSON.parse(body)
|
22
22
|
end
|
23
23
|
|
24
|
+
# Retrieves a list of workflow template name
|
25
|
+
#
|
26
|
+
# @return [Array<String>] the list of templates
|
27
|
+
#
|
28
|
+
def all
|
29
|
+
body = requestor.request 'workflow_templates'
|
30
|
+
JSON.parse(body)
|
31
|
+
end
|
32
|
+
|
24
33
|
private
|
25
34
|
|
26
35
|
attr_reader :requestor
|
data/lib/dor/workflow/client.rb
CHANGED
@@ -18,4 +18,15 @@ RSpec.describe Dor::Workflow::Client::WorkflowTemplate do
|
|
18
18
|
expect(mock_requestor).to have_received(:request).with('workflow_templates/accessionWF')
|
19
19
|
end
|
20
20
|
end
|
21
|
+
|
22
|
+
describe '#all' do
|
23
|
+
subject(:workflow_templates) { routes.all }
|
24
|
+
|
25
|
+
let(:data) { '["assemblyWF","registrationWF"]' }
|
26
|
+
|
27
|
+
it 'returns a list of templates' do
|
28
|
+
expect(workflow_templates).to eq %w[assemblyWF registrationWF]
|
29
|
+
expect(mock_requestor).to have_received(:request).with('workflow_templates')
|
30
|
+
end
|
31
|
+
end
|
21
32
|
end
|