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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 999ab2db6a129de6b99ddc21d61750e0691d89074e69737a44def52aa0088d0c
4
- data.tar.gz: 3c0488469dc69c038072fdff2ec093afd4115e5d82213f1e8e604967605e4545
3
+ metadata.gz: a6a98b91f456de3720fd592ee203e53147e89b316596af0e9f505b624a3fddf9
4
+ data.tar.gz: dad70ca22ab235c15281acd92b9a609ddb081b2c1c577e4f94fa51cfe27075d3
5
5
  SHA512:
6
- metadata.gz: 430d3c2645ff34c099d81abb9723b87dd5de40c29b7c0c2d4b83a7750f947b8cef61939ed0be949f8343ca6b0170f5a353476a8ee15a8512f15e4a71f76a753c
7
- data.tar.gz: 280aa45a9897ece2e92aa8bb9448b6c2e21c9698f2ab22eb9569b1cf2248697c99d368b110fa753c5320b29bcc73b67e203e55a4aec14984857fc90166d3f51d
6
+ metadata.gz: bffd3df8d64f6206b0e7e2e56ba997b93ff62f0b6cf80b865251505498e8bb340cc820f962875157d3db540593003e1d98f311523acb2f64a1f0db6089043a73
7
+ data.tar.gz: f23c44bc73d717373f4acebebaef225d2299ebc2b96db4f10d81d999a2b1546be15bd1ebaf6334f7b7cc43c46628d363938acb991ec694fe6d956cd9c628cf11
@@ -33,6 +33,7 @@ module Dor
33
33
  @@repo_cache[name]
34
34
  end
35
35
 
36
+ # @return [Dor::WorkflowDefinitionDs]
36
37
  def definition
37
38
  datastreams['workflowDefinition']
38
39
  end
@@ -1,3 +1,3 @@
1
1
  module Dor
2
- VERSION = '5.32.0'.freeze
2
+ VERSION = '5.32.1'.freeze
3
3
  end
@@ -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) unless node.nil?
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
@@ -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
- # @param info [Nokogiri::XML::Element]
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.0
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-15 00:00:00.000000000 Z
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: 5.2.0
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: 5.2.0
58
+ version: 6.0.0
59
59
  - !ruby/object:Gem::Dependency
60
60
  name: confstruct
61
61
  requirement: !ruby/object:Gem::Requirement