dor-services 4.22.3 → 4.22.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/bin/dor-indexer +19 -20
- data/bin/dor-indexerd +2 -3
- data/config/certs/robots-dor-dev.crt +29 -0
- data/config/certs/robots-dor-dev.key +27 -0
- data/config/dev_console_env.rb +77 -0
- data/lib/dor-services.rb +3 -3
- data/lib/dor/config.rb +15 -15
- data/lib/dor/datastreams/administrative_metadata_ds.rb +5 -5
- data/lib/dor/datastreams/content_metadata_ds.rb +181 -225
- data/lib/dor/datastreams/datastream_spec_solrizer.rb +1 -1
- data/lib/dor/datastreams/default_object_rights_ds.rb +8 -10
- data/lib/dor/datastreams/desc_metadata_ds.rb +35 -34
- data/lib/dor/datastreams/embargo_metadata_ds.rb +7 -7
- data/lib/dor/datastreams/events_ds.rb +11 -11
- data/lib/dor/datastreams/geo_metadata_ds.rb +86 -86
- data/lib/dor/datastreams/identity_metadata_ds.rb +19 -19
- data/lib/dor/datastreams/role_metadata_ds.rb +3 -3
- data/lib/dor/datastreams/simple_dublin_core_ds.rb +13 -13
- data/lib/dor/datastreams/version_metadata_ds.rb +5 -5
- data/lib/dor/datastreams/workflow_definition_ds.rb +21 -21
- data/lib/dor/migrations/identifiable/assert_adminPolicy.rb +1 -1
- data/lib/dor/migrations/identifiable/fix_model_assertions.rb +1 -1
- data/lib/dor/migrations/identifiable/record_remediation.rb +2 -2
- data/lib/dor/migrations/identifiable/uriify_augmented_contentlocation_refs.rb +1 -1
- data/lib/dor/migrations/identifiable/uriify_contentlocation_refs.rb +1 -1
- data/lib/dor/migrations/processable/unify_workflows.rb +4 -4
- data/lib/dor/migrations/versionable/add_missing_version_md.rb +1 -1
- data/lib/dor/models/admin_policy_object.rb +1 -1
- data/lib/dor/models/assembleable.rb +5 -5
- data/lib/dor/models/contentable.rb +27 -27
- data/lib/dor/models/describable.rb +168 -179
- data/lib/dor/models/discoverable.rb +13 -13
- data/lib/dor/models/editable.rb +55 -55
- data/lib/dor/models/embargoable.rb +26 -26
- data/lib/dor/models/eventable.rb +3 -3
- data/lib/dor/models/geoable.rb +8 -8
- data/lib/dor/models/governable.rb +14 -14
- data/lib/dor/models/identifiable.rb +117 -143
- data/lib/dor/models/item.rb +2 -2
- data/lib/dor/models/itemizable.rb +9 -9
- data/lib/dor/models/presentable.rb +8 -8
- data/lib/dor/models/preservable.rb +4 -4
- data/lib/dor/models/processable.rb +22 -23
- data/lib/dor/models/releaseable.rb +26 -26
- data/lib/dor/models/shelvable.rb +14 -14
- data/lib/dor/models/upgradable.rb +13 -13
- data/lib/dor/models/versionable.rb +2 -2
- data/lib/dor/models/workflow_object.rb +4 -4
- data/lib/dor/services/cleanup_reset_service.rb +27 -27
- data/lib/dor/services/cleanup_service.rb +4 -7
- data/lib/dor/services/digital_stacks_service.rb +10 -10
- data/lib/dor/services/merge_service.rb +1 -1
- data/lib/dor/services/metadata_handlers/mdtoolkit_handler.rb +2 -2
- data/lib/dor/services/metadata_service.rb +20 -20
- data/lib/dor/services/registration_service.rb +27 -27
- data/lib/dor/services/reset_workspace_service.rb +15 -15
- data/lib/dor/services/sdr_ingest_service.rb +6 -6
- data/lib/dor/services/search_service.rb +2 -2
- data/lib/dor/services/suri_service.rb +5 -5
- data/lib/dor/services/technical_metadata_service.rb +2 -3
- data/lib/dor/utils/ng_tidy.rb +9 -9
- data/lib/dor/utils/predicate_patch.rb +1 -1
- data/lib/dor/utils/solr_doc_helper.rb +2 -2
- data/lib/dor/version.rb +1 -1
- data/lib/dor/workflow/document.rb +19 -19
- data/lib/dor/workflow/graph.rb +36 -36
- data/lib/dor/workflow/process.rb +12 -12
- data/lib/tasks/dor.rake +1 -1
- data/lib/tasks/rdoc.rake +3 -3
- metadata +6 -3
data/lib/dor/workflow/process.rb
CHANGED
@@ -23,8 +23,8 @@ module Workflow
|
|
23
23
|
'batch_limit' => node['batch-limit'] ? node['batch-limit'].to_i : nil,
|
24
24
|
'error_limit' => node['error-limit'] ? node['error-limit'].to_i : nil,
|
25
25
|
'prerequisite' => node.xpath('prereq').collect { |p|
|
26
|
-
repo = (p['repository'].nil?
|
27
|
-
wf = (p['workflow'].nil?
|
26
|
+
repo = (p['repository'].nil? || p['repository'] == @repo) ? nil : p['repository']
|
27
|
+
wf = (p['workflow'].nil? || p['workflow'] == @workflow) ? nil : p['workflow']
|
28
28
|
[repo,wf,p.text.to_s].compact.join(':')
|
29
29
|
},
|
30
30
|
'priority' => node['priority'] ? node['priority'].to_i : 0
|
@@ -43,22 +43,22 @@ module Workflow
|
|
43
43
|
def note ; @attrs['note'] ; end
|
44
44
|
def version ; @attrs['version'] ; end
|
45
45
|
def priority ; @attrs['priority'] ; end
|
46
|
-
def completed? ;
|
47
|
-
def error? ;
|
48
|
-
def waiting? ;
|
49
|
-
def date_time ;@attrs['datetime'] ; end
|
46
|
+
def completed? ; status == 'completed' ; end
|
47
|
+
def error? ; status == 'error' ; end
|
48
|
+
def waiting? ; status == 'waiting' ; end
|
49
|
+
def date_time ;@attrs['datetime'] ; end
|
50
50
|
|
51
51
|
def archived?
|
52
52
|
return true if(@attrs['archived'] =~ /true$/i)
|
53
|
-
|
53
|
+
false
|
54
54
|
end
|
55
55
|
|
56
56
|
def ready?
|
57
|
-
self.waiting?
|
57
|
+
self.waiting? && (!prerequisite.nil?) && prerequisite.all? { |pr| (prq = owner[pr]) && prq.completed? }
|
58
58
|
end
|
59
59
|
|
60
60
|
def blocked?
|
61
|
-
self.waiting?
|
61
|
+
self.waiting? && (!prerequisite.nil?) && prerequisite.any? { |pr| (prq = owner[pr]) && (prq.error? || prq.blocked?) }
|
62
62
|
end
|
63
63
|
|
64
64
|
def state
|
@@ -83,7 +83,7 @@ module Workflow
|
|
83
83
|
@attrs['elapsed'].nil? ? nil : @attrs['elapsed'].to_f
|
84
84
|
end
|
85
85
|
|
86
|
-
def update!(info, new_owner=nil)
|
86
|
+
def update!(info, new_owner = nil)
|
87
87
|
@owner = new_owner unless new_owner.nil?
|
88
88
|
if info.is_a? Nokogiri::XML::Node
|
89
89
|
info = Hash[info.attributes.collect { |k,v| [k,v.value] }]
|
@@ -92,8 +92,8 @@ module Workflow
|
|
92
92
|
end
|
93
93
|
|
94
94
|
def to_hash
|
95
|
-
@attrs.reject { |k,v| v.nil?
|
95
|
+
@attrs.reject { |k,v| v.nil? || v == 0 || (v.respond_to?(:empty?) && v.empty?) }
|
96
96
|
end
|
97
97
|
end
|
98
98
|
end
|
99
|
-
end
|
99
|
+
end
|
data/lib/tasks/dor.rake
CHANGED
@@ -24,7 +24,7 @@ task :bump_version, [:level] do |t, args|
|
|
24
24
|
version = version.join('.')
|
25
25
|
file_content.sub!(/^(\s*VERSION = )['"](.+)['"]/,"#{declaration}'#{version}'")
|
26
26
|
File.open(version_file,'w') { |f| f.write(file_content) }
|
27
|
-
|
27
|
+
|
28
28
|
readme_file = File.expand_path('../../../README.rdoc',__FILE__)
|
29
29
|
file_content = File.read(readme_file)
|
30
30
|
lines = file_content.lines.to_a
|
data/lib/tasks/rdoc.rake
CHANGED
@@ -10,11 +10,11 @@ namespace :doc do
|
|
10
10
|
require 'yard/rake/yardoc_task'
|
11
11
|
|
12
12
|
YARD::Rake::YardocTask.new(:generate) do |yt|
|
13
|
-
yt.files = Dir.glob(File.join(project_root, 'lib', '*.rb')) +
|
13
|
+
yt.files = Dir.glob(File.join(project_root, 'lib', '*.rb')) +
|
14
14
|
Dir.glob(File.join(project_root, 'lib', '**', '*.rb')) +
|
15
15
|
[ File.join(project_root, 'README.rdoc') ] +
|
16
16
|
[ File.join(project_root, 'LICENSE') ]
|
17
|
-
|
17
|
+
|
18
18
|
yt.options = ['--output-dir', doc_destination, '--readme', 'README.rdoc']
|
19
19
|
end
|
20
20
|
rescue LoadError
|
@@ -29,4 +29,4 @@ namespace :doc do
|
|
29
29
|
rm_r doc_destination if File.exists?(doc_destination)
|
30
30
|
end
|
31
31
|
|
32
|
-
end
|
32
|
+
end
|
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.22.
|
4
|
+
version: 4.22.4
|
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-10-
|
15
|
+
date: 2015-10-23 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: active-fedora
|
@@ -540,7 +540,10 @@ files:
|
|
540
540
|
- bin/dor-indexer
|
541
541
|
- bin/dor-indexerd
|
542
542
|
- config/certs/README
|
543
|
+
- config/certs/robots-dor-dev.crt
|
544
|
+
- config/certs/robots-dor-dev.key
|
543
545
|
- config/config_defaults.yml
|
546
|
+
- config/dev_console_env.rb
|
544
547
|
- config/dev_console_env.rb.example
|
545
548
|
- config/predicate_mappings.yml
|
546
549
|
- lib/dor-services.rb
|
@@ -643,7 +646,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
643
646
|
version: 1.3.6
|
644
647
|
requirements: []
|
645
648
|
rubyforge_project:
|
646
|
-
rubygems_version: 2.
|
649
|
+
rubygems_version: 2.2.2
|
647
650
|
signing_key:
|
648
651
|
specification_version: 4
|
649
652
|
summary: Ruby implmentation of DOR services used by the SULAIR Digital Library
|