dor-services 5.6.0 → 5.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dor-services.rb +1 -2
- data/lib/dor/config.rb +1 -1
- data/lib/dor/datastreams/default_object_rights_ds.rb +11 -2
- data/lib/dor/datastreams/desc_metadata_ds.rb +1 -1
- data/lib/dor/datastreams/embargo_metadata_ds.rb +1 -1
- data/lib/dor/datastreams/geo_metadata_ds.rb +1 -1
- data/lib/dor/datastreams/human.xslt +46 -0
- data/lib/dor/datastreams/version_metadata_ds.rb +2 -2
- data/lib/dor/migrations/content_metadata_ds/change_content_type.rb +1 -1
- data/lib/dor/models/contentable.rb +1 -1
- data/lib/dor/models/describable.rb +3 -3
- data/lib/dor/models/editable.rb +2 -2
- data/lib/dor/models/identifiable.rb +3 -5
- data/lib/dor/models/itemizable.rb +5 -6
- data/lib/dor/models/processable.rb +11 -5
- data/lib/dor/services/digital_stacks_service.rb +1 -1
- data/lib/dor/services/merge_service.rb +2 -2
- data/lib/dor/services/search_service.rb +1 -1
- data/lib/dor/services/suri_service.rb +1 -1
- data/lib/dor/services/technical_metadata_service.rb +2 -0
- data/lib/dor/utils/sdr_client.rb +1 -0
- data/lib/dor/version.rb +1 -1
- data/lib/dor/workflow/graph.rb +5 -5
- data/lib/dor/workflow/process.rb +2 -2
- metadata +4 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5bcf35abdc1bd0a65db743cf5d878cd69407c844
|
4
|
+
data.tar.gz: 50ae2af9196a9e6c2fce640653dd8dbbb317c348
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 17d5f020c434ca6fe2279ff74091495aad6195570a0a729a4bdd5fd378b905e826dcc9cca53c46ee138a03ca3243b6ccb1b25a41cc0718a5844cb24e9db04b40
|
7
|
+
data.tar.gz: eeb1e14c56abb72485ed20367cf28f2b1a07d04ac1a7e01d7812c00ea6db984027b972c3eda6daf35eec09cf4f7fcf716b327252afd40fdb7f04b552b0965611
|
data/lib/dor-services.rb
CHANGED
@@ -1,13 +1,12 @@
|
|
1
1
|
require 'active_fedora'
|
2
2
|
require 'active_support/core_ext/module/attribute_accessors'
|
3
3
|
require 'modsulator'
|
4
|
-
require 'nokogiri-pretty'
|
5
4
|
require 'dor/utils/sdr_client'
|
6
5
|
|
7
6
|
module Dor
|
8
7
|
@@registered_classes = {}
|
9
8
|
mattr_reader :registered_classes
|
10
|
-
INDEX_VERSION_FIELD = 'dor_services_version_ssi'
|
9
|
+
INDEX_VERSION_FIELD = 'dor_services_version_ssi'.freeze
|
11
10
|
|
12
11
|
class << self
|
13
12
|
|
data/lib/dor/config.rb
CHANGED
@@ -30,7 +30,7 @@ module Dor
|
|
30
30
|
|
31
31
|
def autoconfigure(url, cert_file = Config.ssl.cert_file, key_file = Config.ssl.key_file, key_pass = Config.ssl.key_pass)
|
32
32
|
client = make_rest_client(url, cert_file, key_file, key_pass)
|
33
|
-
config = Confstruct::Configuration.symbolize_hash JSON.parse(client.get
|
33
|
+
config = Confstruct::Configuration.symbolize_hash JSON.parse(client.get(accept: 'application/json'))
|
34
34
|
configure(config)
|
35
35
|
end
|
36
36
|
|
@@ -94,7 +94,7 @@ module Dor
|
|
94
94
|
end
|
95
95
|
|
96
96
|
def content
|
97
|
-
ng_xml.
|
97
|
+
prettify(ng_xml).to_s
|
98
98
|
end
|
99
99
|
|
100
100
|
# Purge the XML of any empty or duplicate elements -- keeps <rightsMetadata> clean
|
@@ -127,7 +127,16 @@ module Dor
|
|
127
127
|
doc.xpath('/rightsMetadata/copyright').each { |node| norm.remove_empty_nodes(node) }
|
128
128
|
doc.xpath('/rightsMetadata/use').each { |node| norm.remove_empty_nodes(node) }
|
129
129
|
end
|
130
|
-
self.content = doc
|
130
|
+
self.content = prettify(doc)
|
131
|
+
end
|
132
|
+
|
133
|
+
# Returns a nicely indented XML document.
|
134
|
+
# Note that the XSL file was taken from the (apparently defunct) nokogiri-pretty project:
|
135
|
+
# https://github.com/tobym/nokogiri-pretty/blob/master/lib/indent.xsl
|
136
|
+
# The only modification made was to declare UTF-8 to be the encoding, instead of ISO-8859-1.
|
137
|
+
def prettify(xml_doc)
|
138
|
+
template = Nokogiri::XSLT(File.read(File.expand_path('../human.xslt', __FILE__)))
|
139
|
+
template.apply_to(xml_doc)
|
131
140
|
end
|
132
141
|
end
|
133
142
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module Dor
|
2
2
|
class DescMetadataDS < ActiveFedora::OmDatastream
|
3
3
|
|
4
|
-
MODS_NS = 'http://www.loc.gov/mods/v3'
|
4
|
+
MODS_NS = 'http://www.loc.gov/mods/v3'.freeze
|
5
5
|
set_terminology do |t|
|
6
6
|
t.root :path => 'mods', :xmlns => MODS_NS, :index_as => [:not_searchable]
|
7
7
|
t.originInfo :index_as => [:not_searchable] do
|
@@ -99,7 +99,7 @@ class EmbargoMetadataDS < ActiveFedora::OmDatastream
|
|
99
99
|
# Sets the embargaAccess node
|
100
100
|
# @param [Nokogiri::XML::Document] new_doc Document that will replace the existing releaseAccess node
|
101
101
|
def release_access_node=(new_doc)
|
102
|
-
if
|
102
|
+
if new_doc.root.name != 'releaseAccess'
|
103
103
|
raise 'Trying to replace releaseAccess with a non-releaseAccess document'
|
104
104
|
end
|
105
105
|
|
@@ -0,0 +1,46 @@
|
|
1
|
+
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
2
|
+
<xsl:output method="xml" encoding="UTF-8"/>
|
3
|
+
<xsl:param name="indent-increment" select="' '"/>
|
4
|
+
|
5
|
+
<xsl:template name="newline">
|
6
|
+
<xsl:text disable-output-escaping="yes">
|
7
|
+
</xsl:text>
|
8
|
+
</xsl:template>
|
9
|
+
|
10
|
+
<xsl:template match="comment() | processing-instruction()">
|
11
|
+
<xsl:param name="indent" select="''"/>
|
12
|
+
<xsl:call-template name="newline"/>
|
13
|
+
<xsl:value-of select="$indent"/>
|
14
|
+
<xsl:copy />
|
15
|
+
</xsl:template>
|
16
|
+
|
17
|
+
<xsl:template match="text()">
|
18
|
+
<xsl:param name="indent" select="''"/>
|
19
|
+
<xsl:call-template name="newline"/>
|
20
|
+
<xsl:value-of select="$indent"/>
|
21
|
+
<xsl:value-of select="normalize-space(.)"/>
|
22
|
+
</xsl:template>
|
23
|
+
|
24
|
+
<xsl:template match="text()[normalize-space(.)='']"/>
|
25
|
+
|
26
|
+
<xsl:template match="*">
|
27
|
+
<xsl:param name="indent" select="''"/>
|
28
|
+
<xsl:call-template name="newline"/>
|
29
|
+
<xsl:value-of select="$indent"/>
|
30
|
+
<xsl:choose>
|
31
|
+
<xsl:when test="count(child::*) > 0">
|
32
|
+
<xsl:copy>
|
33
|
+
<xsl:copy-of select="@*"/>
|
34
|
+
<xsl:apply-templates select="*|text()">
|
35
|
+
<xsl:with-param name="indent" select="concat ($indent, $indent-increment)"/>
|
36
|
+
</xsl:apply-templates>
|
37
|
+
<xsl:call-template name="newline"/>
|
38
|
+
<xsl:value-of select="$indent"/>
|
39
|
+
</xsl:copy>
|
40
|
+
</xsl:when>
|
41
|
+
<xsl:otherwise>
|
42
|
+
<xsl:copy-of select="."/>
|
43
|
+
</xsl:otherwise>
|
44
|
+
</xsl:choose>
|
45
|
+
</xsl:template>
|
46
|
+
</xsl:stylesheet>
|
@@ -201,10 +201,10 @@ module Dor
|
|
201
201
|
# @option opts [Symbol] :significance which part of the version tag to increment
|
202
202
|
def sync_then_increment_version(known_version, opts = {})
|
203
203
|
cv = current_version_id.to_i
|
204
|
-
raise Dor::Exception
|
204
|
+
raise Dor::Exception, "Cannot sync to a version greater than current: #{cv}, requested #{known_version}" if cv < known_version
|
205
205
|
|
206
206
|
while cv != known_version &&
|
207
|
-
|
207
|
+
current_version_node.remove
|
208
208
|
cv = current_version_id.to_i
|
209
209
|
end
|
210
210
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Dor::ContentMetadataDS.on_upgrade '3.6.0', 'Change contentMetadata type attribute' do |ds|
|
2
2
|
translations = { 'googleScannedBook' => 'book', 'etd' => 'file', 'eem' => 'file' }
|
3
3
|
translations.any? do |old_type, new_type|
|
4
|
-
current_type =
|
4
|
+
current_type = ds.contentType.to_ary.first rescue ds.contentType
|
5
5
|
(current_type == old_type) && (ds.contentType = new_type)
|
6
6
|
end
|
7
7
|
end
|
@@ -181,7 +181,7 @@ module Dor
|
|
181
181
|
secondary_file['id'] = new_secondary_file_name(secondary_file['id'], max_sequence)
|
182
182
|
|
183
183
|
if primary_cm.at_xpath("//file[@id = '#{secondary_file['id']}']")
|
184
|
-
raise Dor::Exception
|
184
|
+
raise Dor::Exception, "File '#{secondary_file['id']}' from secondary object #{src_pid} already exist in primary object: #{pid}"
|
185
185
|
end
|
186
186
|
end
|
187
187
|
|
@@ -5,7 +5,7 @@ module Dor
|
|
5
5
|
DESC_MD_FORMATS = {
|
6
6
|
'http://www.tei-c.org/ns/1.0' => 'tei',
|
7
7
|
'http://www.loc.gov/mods/v3' => 'mods'
|
8
|
-
}
|
8
|
+
}.freeze
|
9
9
|
class CrosswalkError < Exception; end
|
10
10
|
|
11
11
|
included do
|
@@ -211,7 +211,7 @@ module Dor
|
|
211
211
|
def to_solr(solr_doc = {}, *args)
|
212
212
|
super solr_doc, *args
|
213
213
|
mods_sources = {
|
214
|
-
'sw_language_ssim'
|
214
|
+
'sw_language_ssim' => :sw_language_facet,
|
215
215
|
'sw_language_tesim' => :sw_language_facet,
|
216
216
|
'sw_genre_ssim' => :sw_genre,
|
217
217
|
'sw_genre_tesim' => :sw_genre,
|
@@ -244,7 +244,7 @@ module Dor
|
|
244
244
|
title = node.text
|
245
245
|
end
|
246
246
|
creator_title = creator + title
|
247
|
-
add_solr_value(solr_doc, 'creator_title', creator_title
|
247
|
+
add_solr_value(solr_doc, 'creator_title', creator_title, :string, [:stored_sortable])
|
248
248
|
rescue CrosswalkError => e
|
249
249
|
ActiveFedora.logger.warn "Cannot index #{pid}.descMetadata: #{e.message}"
|
250
250
|
end
|
data/lib/dor/models/editable.rb
CHANGED
@@ -35,7 +35,7 @@ module Dor
|
|
35
35
|
:uri => 'https://creativecommons.org/licenses/by-nc-nd/3.0/' },
|
36
36
|
'pdm' => { :human_readable => 'Public Domain Mark 1.0',
|
37
37
|
:uri => 'https://creativecommons.org/publicdomain/mark/1.0/'}
|
38
|
-
}
|
38
|
+
}.freeze
|
39
39
|
OPEN_DATA_COMMONS_USE_LICENSES = {
|
40
40
|
'pddl' => { :human_readable => 'Open Data Commons Public Domain Dedication and License 1.0',
|
41
41
|
:uri => 'http://opendatacommons.org/licenses/pddl/1.0/' },
|
@@ -43,7 +43,7 @@ module Dor
|
|
43
43
|
:uri => 'http://opendatacommons.org/licenses/by/1.0/' },
|
44
44
|
'odc-odbl' => { :human_readable => 'Open Data Commons Open Database License 1.0',
|
45
45
|
:uri => 'http://opendatacommons.org/licenses/odbl/1.0/' }
|
46
|
-
}
|
46
|
+
}.freeze
|
47
47
|
|
48
48
|
def to_solr(solr_doc = {}, *args)
|
49
49
|
super(solr_doc, *args)
|
@@ -209,12 +209,10 @@ module Dor
|
|
209
209
|
end
|
210
210
|
|
211
211
|
def get_related_obj_display_title(related_obj, default_title)
|
212
|
-
|
213
|
-
desc_md_ds_title = if related_obj
|
214
|
-
desc_md_ds = related_obj.datastreams['descMetadata']
|
215
|
-
desc_md_ds ? desc_md_ds.title_info.main_title.first : nil
|
216
|
-
end
|
212
|
+
return default_title unless related_obj
|
217
213
|
|
214
|
+
desc_md_ds = related_obj.datastreams['descMetadata']
|
215
|
+
desc_md_ds_title = desc_md_ds ? desc_md_ds.title_info.main_title.first : nil
|
218
216
|
desc_md_ds_title.present? ? desc_md_ds_title : default_title
|
219
217
|
end
|
220
218
|
|
@@ -9,7 +9,7 @@ module Dor
|
|
9
9
|
has_metadata :name => 'contentMetadata', :type => Dor::ContentMetadataDS, :label => 'Content Metadata', :control_group => 'M'
|
10
10
|
end
|
11
11
|
|
12
|
-
DIFF_FILENAME = 'cm_inv_diff'
|
12
|
+
DIFF_FILENAME = 'cm_inv_diff'.freeze
|
13
13
|
|
14
14
|
# Deletes all cm_inv_diff files in the workspace for the Item
|
15
15
|
def clear_diff_cache
|
@@ -23,20 +23,19 @@ module Dor
|
|
23
23
|
|
24
24
|
# Retrieves file difference manifest for contentMetadata from SDR
|
25
25
|
#
|
26
|
-
# @param [
|
26
|
+
# @param [Symbol] subset keyword for file attributes :shelve, :preserve, :publish. Default is :all.
|
27
27
|
# @param [String] version
|
28
|
-
# @return [
|
28
|
+
# @return [Moab::FileInventoryDifference] XML contents of cm_inv_diff manifest
|
29
29
|
def get_content_diff(subset = :all, version = nil)
|
30
30
|
if Dor::Config.stacks.local_workspace_root.nil?
|
31
31
|
raise Dor::ParameterError, 'Missing Dor::Config.stacks.local_workspace_root'
|
32
32
|
end
|
33
33
|
|
34
|
-
|
35
|
-
if current_content.nil?
|
34
|
+
if contentMetadata.nil?
|
36
35
|
raise Dor::Exception, 'Missing contentMetadata datastream'
|
37
36
|
end
|
38
37
|
|
39
|
-
Sdr::Client.get_content_diff(pid,
|
38
|
+
Sdr::Client.get_content_diff(pid, contentMetadata.content, subset, version)
|
40
39
|
end
|
41
40
|
end
|
42
41
|
end
|
@@ -23,7 +23,7 @@ module Dor
|
|
23
23
|
7 => 'Accessioned (indexed)',
|
24
24
|
8 => 'Accessioned (indexed, ingested)',
|
25
25
|
9 => 'Opened'
|
26
|
-
}
|
26
|
+
}.freeze
|
27
27
|
|
28
28
|
# milestones from accessioning and the order they happen in
|
29
29
|
STEPS = {
|
@@ -36,7 +36,7 @@ module Dor
|
|
36
36
|
'indexed' => 7,
|
37
37
|
'shelved' => 8,
|
38
38
|
'opened' => 9
|
39
|
-
}
|
39
|
+
}.freeze
|
40
40
|
|
41
41
|
# This is a work-around for some strange logic in ActiveFedora that
|
42
42
|
# don't allow self.workflows.new? to work if we load the object using
|
@@ -138,7 +138,9 @@ module Dor
|
|
138
138
|
# @return [String] single composed status from status_info
|
139
139
|
def status(include_time = false)
|
140
140
|
status_info_hash = status_info
|
141
|
-
current_version
|
141
|
+
current_version = status_info_hash[:current_version]
|
142
|
+
status_code = status_info_hash[:status_code]
|
143
|
+
status_time = status_info_hash[:status_time]
|
142
144
|
|
143
145
|
# use the translation table to get the appropriate verbage for the latest step
|
144
146
|
result = "v#{current_version} #{STATUS_CODE_DISP_TXT[status_code]}"
|
@@ -229,8 +231,12 @@ module Dor
|
|
229
231
|
# handles formating utc date/time to human readable
|
230
232
|
# XXX: bad form to hardcode TZ here. Code smell abounds.
|
231
233
|
def format_date(datetime)
|
232
|
-
d =
|
233
|
-
|
234
|
+
d =
|
235
|
+
if datetime.is_a?(Time)
|
236
|
+
datetime
|
237
|
+
else
|
238
|
+
DateTime.parse(datetime).in_time_zone(ActiveSupport::TimeZone.new('Pacific Time (US & Canada)'))
|
239
|
+
end
|
234
240
|
I18n.l(d).strftime('%Y-%m-%d %I:%M%p')
|
235
241
|
rescue
|
236
242
|
d = datetime.is_a?(Time) ? datetime : Time.parse(datetime.to_s)
|
@@ -101,7 +101,7 @@ module Dor
|
|
101
101
|
def self.copy_file(workspace_pathname, stacks_pathname, moab_signature)
|
102
102
|
if stacks_pathname.exist?
|
103
103
|
file_signature = Moab::FileSignature.new.signature_from_file(stacks_pathname)
|
104
|
-
stacks_pathname.delete if
|
104
|
+
stacks_pathname.delete if file_signature != moab_signature
|
105
105
|
end
|
106
106
|
unless stacks_pathname.exist?
|
107
107
|
stacks_pathname.parent.mkpath
|
@@ -23,9 +23,9 @@ module Dor
|
|
23
23
|
end
|
24
24
|
|
25
25
|
def check_objects_editable
|
26
|
-
raise Dor::Exception
|
26
|
+
raise Dor::Exception, "Primary object is not editable: #{@primary.pid}" unless @primary.allows_modification?
|
27
27
|
non_editable = @secondary_objs.detect {|obj| !obj.allows_modification? }
|
28
|
-
raise Dor::Exception
|
28
|
+
raise Dor::Exception, "Secondary object is not editable: #{non_editable.pid}" if non_editable
|
29
29
|
end
|
30
30
|
|
31
31
|
def move_metadata_and_content
|
@@ -4,7 +4,7 @@ require 'active_support/core_ext'
|
|
4
4
|
module Dor
|
5
5
|
class SearchService
|
6
6
|
|
7
|
-
RISEARCH_TEMPLATE = "select $object from <#ri> where $object <dc:identifier> '%s'"
|
7
|
+
RISEARCH_TEMPLATE = "select $object from <#ri> where $object <dc:identifier> '%s'".freeze
|
8
8
|
@@index_version = nil
|
9
9
|
|
10
10
|
class << self
|
@@ -17,7 +17,7 @@ module Dor
|
|
17
17
|
ids = resource["identifiers?quantity=#{quantity}"].post('').chomp.split(/\n/).collect { |id| "#{Config.suri.id_namespace}:#{id.strip}" }
|
18
18
|
else
|
19
19
|
repo = ActiveFedora::Base.respond_to?(:connection_for_pid) ? ActiveFedora::Base.connection_for_pid(0) : ActiveFedora.fedora.connection
|
20
|
-
resp = Nokogiri::XML(repo.next_pid
|
20
|
+
resp = Nokogiri::XML(repo.next_pid(numPIDs: quantity))
|
21
21
|
ids = resp.xpath('/pidList/pid').collect { |node| node.text }
|
22
22
|
end
|
23
23
|
want_array ? ids : ids.first
|
@@ -50,6 +50,8 @@ module Dor
|
|
50
50
|
def self.get_content_group_diff(dor_item)
|
51
51
|
inventory_diff = dor_item.get_content_diff('all')
|
52
52
|
inventory_diff.group_difference('content')
|
53
|
+
rescue Dor::Exception # no contentMetadata
|
54
|
+
Moab::FileGroupDifference.new
|
53
55
|
end
|
54
56
|
|
55
57
|
# @param [FileGroupDifference] content_group_diff
|
data/lib/dor/utils/sdr_client.rb
CHANGED
@@ -33,6 +33,7 @@ module Sdr
|
|
33
33
|
Moab::SignatureCatalog.new(:digital_object_id => druid, :version_id => 0)
|
34
34
|
end
|
35
35
|
|
36
|
+
# @return [Moab::FileInventoryDifference] the differences for the given content and subset
|
36
37
|
def get_content_diff(druid, current_content, subset = :all, version = nil)
|
37
38
|
unless %w(all shelve preserve publish).include?(subset.to_s)
|
38
39
|
raise Dor::ParameterError, "Invalid subset value: #{subset}"
|
data/lib/dor/version.rb
CHANGED
data/lib/dor/workflow/graph.rb
CHANGED
@@ -4,10 +4,10 @@ module Dor
|
|
4
4
|
module Workflow
|
5
5
|
class Graph
|
6
6
|
|
7
|
-
FILL_COLORS = { 'waiting' => 'white', 'ready' => 'white', 'error' => '#8B0000', 'blocked' => 'white', 'completed' => 'darkgreen', 'unknown' => '#CFCFCF' }
|
8
|
-
TEXT_COLORS = { 'waiting' => 'black', 'ready' => 'black', 'error' => 'white', 'blocked' => '#8B0000', 'completed' => 'white', 'unknown' => 'black' }
|
9
|
-
PATTERNS = { 'waiting' => 'diagonals', 'ready' => 'filled', 'error' => 'filled', 'blocked' => 'diagonals', 'completed' => 'filled', 'unknown' => 'filled' }
|
10
|
-
RESERVED_KEYS = %w(repository name)
|
7
|
+
FILL_COLORS = { 'waiting' => 'white', 'ready' => 'white', 'error' => '#8B0000', 'blocked' => 'white', 'completed' => 'darkgreen', 'unknown' => '#CFCFCF' }.freeze
|
8
|
+
TEXT_COLORS = { 'waiting' => 'black', 'ready' => 'black', 'error' => 'white', 'blocked' => '#8B0000', 'completed' => 'white', 'unknown' => 'black' }.freeze
|
9
|
+
PATTERNS = { 'waiting' => 'diagonals', 'ready' => 'filled', 'error' => 'filled', 'blocked' => 'diagonals', 'completed' => 'filled', 'unknown' => 'filled' }.freeze
|
10
|
+
RESERVED_KEYS = %w(repository name).freeze
|
11
11
|
|
12
12
|
attr_reader :repo, :name, :processes, :graph, :root
|
13
13
|
|
@@ -142,7 +142,7 @@ class Graph
|
|
142
142
|
edge.dir = 'both'
|
143
143
|
edge.arrowhead = 'none'
|
144
144
|
edge.arrowtail = 'none'
|
145
|
-
edge.style = 'dashed' if
|
145
|
+
edge.style = 'dashed' if wf1 != wf2
|
146
146
|
prerequisites << process
|
147
147
|
}
|
148
148
|
self
|
data/lib/dor/workflow/process.rb
CHANGED
@@ -53,11 +53,11 @@ module Workflow
|
|
53
53
|
end
|
54
54
|
|
55
55
|
def ready?
|
56
|
-
self.waiting? &&
|
56
|
+
self.waiting? && !prerequisite.nil? && prerequisite.all? { |pr| (prq = owner[pr]) && prq.completed? }
|
57
57
|
end
|
58
58
|
|
59
59
|
def blocked?
|
60
|
-
self.waiting? &&
|
60
|
+
self.waiting? && !prerequisite.nil? && prerequisite.any? { |pr| (prq = owner[pr]) && (prq.error? || prq.blocked?) }
|
61
61
|
end
|
62
62
|
|
63
63
|
def state
|
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.
|
4
|
+
version: 5.7.0
|
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: 2016-03-
|
17
|
+
date: 2016-03-30 00:00:00.000000000 Z
|
18
18
|
dependencies:
|
19
19
|
- !ruby/object:Gem::Dependency
|
20
20
|
name: active-fedora
|
@@ -120,20 +120,6 @@ dependencies:
|
|
120
120
|
- - "~>"
|
121
121
|
- !ruby/object:Gem::Version
|
122
122
|
version: '1.6'
|
123
|
-
- !ruby/object:Gem::Dependency
|
124
|
-
name: nokogiri-pretty
|
125
|
-
requirement: !ruby/object:Gem::Requirement
|
126
|
-
requirements:
|
127
|
-
- - "~>"
|
128
|
-
- !ruby/object:Gem::Version
|
129
|
-
version: '0.1'
|
130
|
-
type: :runtime
|
131
|
-
prerelease: false
|
132
|
-
version_requirements: !ruby/object:Gem::Requirement
|
133
|
-
requirements:
|
134
|
-
- - "~>"
|
135
|
-
- !ruby/object:Gem::Version
|
136
|
-
version: '0.1'
|
137
123
|
- !ruby/object:Gem::Dependency
|
138
124
|
name: om
|
139
125
|
requirement: !ruby/object:Gem::Requirement
|
@@ -579,6 +565,7 @@ files:
|
|
579
565
|
- lib/dor/datastreams/embargo_metadata_ds.rb
|
580
566
|
- lib/dor/datastreams/events_ds.rb
|
581
567
|
- lib/dor/datastreams/geo_metadata_ds.rb
|
568
|
+
- lib/dor/datastreams/human.xslt
|
582
569
|
- lib/dor/datastreams/identity.xsl
|
583
570
|
- lib/dor/datastreams/identity_metadata_ds.rb
|
584
571
|
- lib/dor/datastreams/rights_metadata_ds.rb
|
@@ -665,7 +652,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
665
652
|
version: 1.3.6
|
666
653
|
requirements: []
|
667
654
|
rubyforge_project:
|
668
|
-
rubygems_version: 2.4.
|
655
|
+
rubygems_version: 2.4.5.1
|
669
656
|
signing_key:
|
670
657
|
specification_version: 4
|
671
658
|
summary: Ruby implmentation of DOR services used by the SULAIR Digital Library
|