dor-workflow-service 2.8.0 → 2.9.0

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: 5fdff2480a76ac6aa1ad7b2c40d7235dd49eb6f4892e64377a4639818e0ab4e0
4
- data.tar.gz: 82f479e4c82f6c4c00482f7c27bb632f47e3304fab848db414f49a3af455019b
3
+ metadata.gz: a0b888963479c4de1033bd8798b2b0359716cb1ced1eef603dda97368ddc1c24
4
+ data.tar.gz: 4453dd238b37050a525f9864d3595385ad271e72d86907006715745b0a704e9c
5
5
  SHA512:
6
- metadata.gz: 81ee6c76518548076d5194c5beba817a09a4df679c29ae24c6e0f127b5f8b253eed9e7ac036f47830acb60bc47520976fd8bc493434aa5a230e130537bec7f90
7
- data.tar.gz: 2759509e64aa9ad5c4d53c0a7bb6f10bc700a9f0e36ce67a88bf7db11ba7b84b6ee84c532823f6702264cea7cc30611bdcdb502df171f1cd563f54a3f1e43d83
6
+ metadata.gz: 2e4121d6d2a23703e28d1f2acaf889afb7ae4990906c0d40134a06343533a3778d006bc8a88e6b0a19974a3e637ec54263b5eedbb427c326ae57fdc4514b33d9
7
+ data.tar.gz: 3c7c109f9301ace8b71c61d94ea5d8f4bf2d2fb4397db8e209e3c34e2c195c9ec6398b1a8f6475a3eb993338f81508f4be6f0b863d9d9ae21b04aefb1b1cd27e
@@ -15,6 +15,10 @@ module Dor
15
15
  ng_xml.at_xpath('/workflow/@objectId').text
16
16
  end
17
17
 
18
+ def workflow_name
19
+ ng_xml.at_xpath('/workflow/@id').text
20
+ end
21
+
18
22
  # @param [Integer] version the version we are checking for.
19
23
  def active_for?(version:)
20
24
  result = ng_xml.at_xpath("/workflow/process[@version=#{version}]")
@@ -3,7 +3,7 @@
3
3
  module Dor
4
4
  module Workflow
5
5
  module Service
6
- VERSION = '2.8.0'
6
+ VERSION = '2.9.0'
7
7
  end
8
8
  end
9
9
  end
@@ -17,6 +17,18 @@ RSpec.describe Dor::Workflow::Response::Workflow do
17
17
  it { is_expected.to eq 'druid:mw971zk1113' }
18
18
  end
19
19
 
20
+ describe '#workflow_name' do
21
+ subject { instance.workflow_name }
22
+
23
+ let(:xml) do
24
+ <<~XML
25
+ <workflow repository="dor" objectId="druid:mw971zk1113" id="assemblyWF">
26
+ </workflow>
27
+ XML
28
+ end
29
+ it { is_expected.to eq 'assemblyWF' }
30
+ end
31
+
20
32
  describe '#active?' do
21
33
  subject { instance.active_for?(version: 2) }
22
34
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dor-workflow-service
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.0
4
+ version: 2.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Willy Mene