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: aed52be59d8bdd07de43af3d484e04d7d0aefa98dd8a8813840401a1cd06978c
4
- data.tar.gz: d81de9c43e0bc80eb50b02048422a399f77dc2a450db8ecf5aec165cdcc18251
3
+ metadata.gz: f6b39aa68d201501560723248e1227a926a054bef2b9d0bd52fb838bfe59b4ab
4
+ data.tar.gz: d5ec6e469fa8caf1ab3bd89f284000bdf0a1a99ea5e076de92b3a9c6e03d46ee
5
5
  SHA512:
6
- metadata.gz: 672a4500292b005090dddf14ab56bdb8adfc981badaf2840e7c9439d84b996143aa047fbe1948efb9aa2c5b22c188ce02ee8929814fc9a4d072a6bd5aec4d6bd
7
- data.tar.gz: 2ede4f3978b2f7e27fc405146b9f106bddd7b9f787c4eb26295ee09fff2c1b7be02145da55f6f9ddae93de7da36c20709116114484da59e4adcc61f55bcc2fd7
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.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.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.3)
61
+ parser (3.3.0.4)
62
62
  ast (~> 2.4.1)
63
63
  racc
64
64
  public_suffix (5.0.4)
@@ -3,7 +3,7 @@
3
3
  module Dor
4
4
  module Workflow
5
5
  class Client
6
- VERSION = '7.0.0'
6
+ VERSION = '7.0.2'
7
7
  end
8
8
  end
9
9
  end
@@ -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
@@ -71,6 +71,10 @@ module Dor
71
71
  templates.retrieve(name)
72
72
  end
73
73
 
74
+ def workflow_templates
75
+ templates.all
76
+ end
77
+
74
78
  def templates
75
79
  WorkflowTemplate.new(requestor: requestor)
76
80
  end
@@ -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
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: 7.0.0
4
+ version: 7.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Willy Mene