dor-services 4.18.2 → 4.18.3

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
  SHA1:
3
- metadata.gz: 9232b84330925dd2bbfe09157db80a89208ee848
4
- data.tar.gz: f9a7bec17f4874ca2a220edfff920de3799e0c9f
3
+ metadata.gz: 205cebf2764bc876e00db2938d5fcbfabe7198e8
4
+ data.tar.gz: c18316e7a5cd7cfd93feb569066209499e351861
5
5
  SHA512:
6
- metadata.gz: 88561649d4102348c1b2d900a76eed32f541969dd925055cf096e7b7a50539361119fa747436830ecbf0685355062029dcc2b46d2a4fe68d7bf1f432622ce427
7
- data.tar.gz: 78abfbe5a56076256879b4be0959b4cfd71ebfb84eeb9292906b5ce5275df15b4a30cef8df2c80f7efb5c310a5c84d0f867c124e1dc3b2dce5353d4aad9b8465
6
+ metadata.gz: afa7c3292c64e9f35c0388b29bd14ee769babdc9058958aabd73cfc19fc1b8fb01426c2b64ea6b8b97a4b3a01b96a99794eedc6e1b21021d28a6d7e3125fd817
7
+ data.tar.gz: b13731f7566ef63f21110c8342469a4fe26b45c6f1d43cbd627aa94e7390422c79a16e4aaf32e0c72157121ba703351a82148bf6ff38a2633d27a31a5f0de74b
data/lib/dor/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Dor
2
- VERSION = '4.18.2'
2
+ VERSION = '4.18.3'
3
3
  end
@@ -15,6 +15,7 @@ module Workflow
15
15
  t.elapsed(:path=>{:attribute=>"elapsed"})
16
16
  t.lifecycle(:path=>{:attribute=>"lifecycle"})
17
17
  t.attempts(:path=>{:attribute=>"attempts"}, :index_as => [:not_searchable])
18
+ t.version(:path=>{:attribute=>"version"})
18
19
  }
19
20
  end
20
21
  @@definitions={}
@@ -30,9 +31,10 @@ module Workflow
30
31
  def priority
31
32
  processes.map {|proc| proc.priority.to_i }.detect(0) {|p| p > 0}
32
33
  end
33
-
34
+
35
+ # @return [Boolean] if any process node does not have version, returns true, false otherwise (all processes have version)
34
36
  def active?
35
- processes.any? { |proc| !proc.version }
37
+ ng_xml.at_xpath("/workflow/process[not(@version)]") ? true : false
36
38
  end
37
39
 
38
40
  def definition
@@ -66,7 +68,8 @@ module Workflow
66
68
  if ng_xml.search("/workflow/process").length == 0
67
69
  return []
68
70
  end
69
- @processes ||= if self.definition
71
+ @processes ||=
72
+ if self.definition
70
73
  self.definition.processes.collect do |process|
71
74
  node = ng_xml.at("/workflow/process[@name = '#{process.name}']")
72
75
  process.update!(node,self) unless node.nil?
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: 4.18.2
4
+ version: 4.18.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Klein
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2015-03-09 00:00:00.000000000 Z
15
+ date: 2015-03-19 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: active-fedora