dor-services 5.32.0 → 5.32.1
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/workflow_object.rb +1 -0
- data/lib/dor/version.rb +1 -1
- data/lib/dor/workflow/document.rb +2 -3
- data/lib/dor/workflow/process.rb +8 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a6a98b91f456de3720fd592ee203e53147e89b316596af0e9f505b624a3fddf9
|
4
|
+
data.tar.gz: dad70ca22ab235c15281acd92b9a609ddb081b2c1c577e4f94fa51cfe27075d3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bffd3df8d64f6206b0e7e2e56ba997b93ff62f0b6cf80b865251505498e8bb340cc820f962875157d3db540593003e1d98f311523acb2f64a1f0db6089043a73
|
7
|
+
data.tar.gz: f23c44bc73d717373f4acebebaef225d2299ebc2b96db4f10d81d999a2b1546be15bd1ebaf6334f7b7cc43c46628d363938acb991ec694fe6d956cd9c628cf11
|
data/lib/dor/version.rb
CHANGED
@@ -40,6 +40,7 @@ module Workflow
|
|
40
40
|
ng_xml.at_xpath('/workflow/process[not(@version)]') ? true : false
|
41
41
|
end
|
42
42
|
|
43
|
+
# @return [Dor::WorkflowDefinitionDs]
|
43
44
|
def definition
|
44
45
|
@definition ||= begin
|
45
46
|
if @@definitions.key? workflowId.first
|
@@ -71,14 +72,12 @@ module Workflow
|
|
71
72
|
if definition
|
72
73
|
definition.processes.collect do |process|
|
73
74
|
node = ng_xml.at("/workflow/process[@name = '#{process.name}']")
|
74
|
-
process.update!(node, self)
|
75
|
-
process
|
75
|
+
process.update!(node, self)
|
76
76
|
end
|
77
77
|
else
|
78
78
|
find_by_terms(:workflow, :process).collect do |x|
|
79
79
|
pnode = Dor::Workflow::Process.new(repository, workflowId, {})
|
80
80
|
pnode.update!(x, self)
|
81
|
-
pnode
|
82
81
|
end.sort_by(&:datetime)
|
83
82
|
end
|
84
83
|
end
|
data/lib/dor/workflow/process.rb
CHANGED
@@ -3,6 +3,9 @@ module Workflow
|
|
3
3
|
class Process
|
4
4
|
attr_reader :owner, :repo, :workflow
|
5
5
|
|
6
|
+
# @param repo [String] the name of the repository, typically 'dor'
|
7
|
+
# @param workflow [String] the name of the workflow, e.g. 'assemblyWF'
|
8
|
+
# @param attrs [Nokogiri::XML::Node, Hash]
|
6
9
|
def initialize(repo, workflow, attrs)
|
7
10
|
@workflow = workflow
|
8
11
|
@repo = repo
|
@@ -82,14 +85,18 @@ module Workflow
|
|
82
85
|
@attrs['elapsed'].nil? ? nil : @attrs['elapsed'].to_f
|
83
86
|
end
|
84
87
|
|
85
|
-
#
|
88
|
+
# Updates this object with the attributes passed in.
|
89
|
+
# @param info [Hash,Nokogiri::XML::Element,NilClass]
|
86
90
|
# @param new_owner [Dor::Workflow::Document]
|
87
91
|
def update!(info, new_owner)
|
88
92
|
@owner = new_owner
|
93
|
+
return self if info.nil?
|
94
|
+
|
89
95
|
if info.is_a? Nokogiri::XML::Node
|
90
96
|
info = Hash[info.attributes.collect { |k, v| [k, v.value] }]
|
91
97
|
end
|
92
98
|
@attrs.merge! info
|
99
|
+
self
|
93
100
|
end
|
94
101
|
|
95
102
|
def to_hash
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dor-services
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.32.
|
4
|
+
version: 5.32.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Klein
|
@@ -14,7 +14,7 @@ authors:
|
|
14
14
|
autorequire:
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
|
-
date: 2018-11-
|
17
|
+
date: 2018-11-16 00:00:00.000000000 Z
|
18
18
|
dependencies:
|
19
19
|
- !ruby/object:Gem::Dependency
|
20
20
|
name: active-fedora
|
@@ -45,7 +45,7 @@ dependencies:
|
|
45
45
|
version: 4.2.10
|
46
46
|
- - "<"
|
47
47
|
- !ruby/object:Gem::Version
|
48
|
-
version:
|
48
|
+
version: 6.0.0
|
49
49
|
type: :runtime
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -55,7 +55,7 @@ dependencies:
|
|
55
55
|
version: 4.2.10
|
56
56
|
- - "<"
|
57
57
|
- !ruby/object:Gem::Version
|
58
|
-
version:
|
58
|
+
version: 6.0.0
|
59
59
|
- !ruby/object:Gem::Dependency
|
60
60
|
name: confstruct
|
61
61
|
requirement: !ruby/object:Gem::Requirement
|