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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5515f870b52fe39b0f260c2d6976341eb76618e3712bcc82990a627aa29a64e6
4
- data.tar.gz: 948a36694831e322678f063af8d4708f83c050d4e6d7e7a0497583b28210fe8b
3
+ metadata.gz: 5fdff2480a76ac6aa1ad7b2c40d7235dd49eb6f4892e64377a4639818e0ab4e0
4
+ data.tar.gz: 82f479e4c82f6c4c00482f7c27bb632f47e3304fab848db414f49a3af455019b
5
5
  SHA512:
6
- metadata.gz: ee60412db4d20e900709ef67a45a7664bff90b3447d3093e60171d7d32b49ca27e53f7ac6bb4b273bd9bc0db798ce32e704d4f1d68dfe8425523aa37a3873b4f
7
- data.tar.gz: dcfa65184fb90ec3a5e47ae1c1cb5bdd1215aaad49389451e444ad05ab8f3f36b5c50b5416cff0af2a8a318f7e70c942dc6c69df0a9624475719f98e564436fe
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}]")
@@ -3,7 +3,7 @@
3
3
  module Dor
4
4
  module Workflow
5
5
  module Service
6
- VERSION = '2.7.0'
6
+ VERSION = '2.8.0'
7
7
  end
8
8
  end
9
9
  end
@@ -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.7.0
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-04 00:00:00.000000000 Z
12
+ date: 2019-02-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport