dor-workflow-service 2.7.0 → 2.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dor/models/response/workflow.rb +4 -0
- data/lib/dor/workflow_version.rb +1 -1
- data/spec/models/response/workflow_spec.rb +12 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5fdff2480a76ac6aa1ad7b2c40d7235dd49eb6f4892e64377a4639818e0ab4e0
|
4
|
+
data.tar.gz: 82f479e4c82f6c4c00482f7c27bb632f47e3304fab848db414f49a3af455019b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 81ee6c76518548076d5194c5beba817a09a4df679c29ae24c6e0f127b5f8b253eed9e7ac036f47830acb60bc47520976fd8bc493434aa5a230e130537bec7f90
|
7
|
+
data.tar.gz: 2759509e64aa9ad5c4d53c0a7bb6f10bc700a9f0e36ce67a88bf7db11ba7b84b6ee84c532823f6702264cea7cc30611bdcdb502df171f1cd563f54a3f1e43d83
|
@@ -11,6 +11,10 @@ module Dor
|
|
11
11
|
@xml = xml
|
12
12
|
end
|
13
13
|
|
14
|
+
def pid
|
15
|
+
ng_xml.at_xpath('/workflow/@objectId').text
|
16
|
+
end
|
17
|
+
|
14
18
|
# @param [Integer] version the version we are checking for.
|
15
19
|
def active_for?(version:)
|
16
20
|
result = ng_xml.at_xpath("/workflow/process[@version=#{version}]")
|
data/lib/dor/workflow_version.rb
CHANGED
@@ -5,6 +5,18 @@ require 'spec_helper'
|
|
5
5
|
RSpec.describe Dor::Workflow::Response::Workflow do
|
6
6
|
subject(:instance) { described_class.new(xml: xml) }
|
7
7
|
|
8
|
+
describe '#pid' do
|
9
|
+
subject { instance.pid }
|
10
|
+
|
11
|
+
let(:xml) do
|
12
|
+
<<~XML
|
13
|
+
<workflow repository="dor" objectId="druid:mw971zk1113" id="assemblyWF">
|
14
|
+
</workflow>
|
15
|
+
XML
|
16
|
+
end
|
17
|
+
it { is_expected.to eq 'druid:mw971zk1113' }
|
18
|
+
end
|
19
|
+
|
8
20
|
describe '#active?' do
|
9
21
|
subject { instance.active_for?(version: 2) }
|
10
22
|
|
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.
|
4
|
+
version: 2.8.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: 2019-02-
|
12
|
+
date: 2019-02-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|