dor-services 6.0.1 → 6.0.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e548811519b3b37c921c727cffcab68013bc5efdbcd2f28310c81c6f30f776bb
|
4
|
+
data.tar.gz: b975beadda238cef372cc020bcac83b53bb8de94a158c1f4f3301aeab44fbf0c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 120606bd2ab5c52ac8908a15e8402e06675af037cc9a4f2721e15804933cb1faf9ade415b833230b872a42d15e7b22ae8dadd614c1820d62c2e2c2012dc4eede
|
7
|
+
data.tar.gz: 3ac8789d051b8ecdfbc2e558448bb733766dece388580cc952107894114b7f6442883f3bbf714130268ca6adde14df07728c14faa469c9d2295a57864b8d82a8
|
@@ -3,6 +3,7 @@
|
|
3
3
|
module Dor
|
4
4
|
# TODO: class docs
|
5
5
|
class WorkflowDs < ActiveFedora::OmDatastream
|
6
|
+
before_save :build_location
|
6
7
|
set_terminology do |t|
|
7
8
|
t.root(:path => 'workflows')
|
8
9
|
t.workflow {
|
@@ -18,6 +19,18 @@ module Dor
|
|
18
19
|
}
|
19
20
|
end
|
20
21
|
|
22
|
+
# Called before saving, but after a pid has been assigned
|
23
|
+
def build_location
|
24
|
+
return unless new?
|
25
|
+
|
26
|
+
self.dsLocation = File.join(Dor::Config.workflow.url, "dor/objects/#{pid}/workflows")
|
27
|
+
end
|
28
|
+
|
29
|
+
# Called by rubydora. This lets us customize the mime-type
|
30
|
+
def self.default_attributes
|
31
|
+
super.merge(mimeType: 'application/xml')
|
32
|
+
end
|
33
|
+
|
21
34
|
def get_workflow(wf, repo = 'dor')
|
22
35
|
xml = Dor::Config.workflow.client.get_workflow_xml(repo, pid, wf)
|
23
36
|
xml = Nokogiri::XML(xml)
|
@@ -7,8 +7,11 @@ module Dor
|
|
7
7
|
extend ActiveSupport::Concern
|
8
8
|
|
9
9
|
included do
|
10
|
-
has_metadata :
|
11
|
-
|
10
|
+
has_metadata name: 'workflows',
|
11
|
+
type: Dor::WorkflowDs,
|
12
|
+
label: 'Workflows',
|
13
|
+
control_group: 'E',
|
14
|
+
autocreate: true
|
12
15
|
end
|
13
16
|
|
14
17
|
# verbiage we want to use to describe an item when it has completed a particular step
|
@@ -38,17 +41,6 @@ module Dor
|
|
38
41
|
'opened' => 9
|
39
42
|
}.freeze
|
40
43
|
|
41
|
-
# This is a work-around for some strange logic in ActiveFedora that
|
42
|
-
# don't allow self.workflows.new? to work if we load the object using
|
43
|
-
# .load_instance_from_solr.
|
44
|
-
def set_workflows_datastream_location
|
45
|
-
return if self.respond_to?(:inner_object) && inner_object.is_a?(ActiveFedora::SolrDigitalObject)
|
46
|
-
return unless workflows.new?
|
47
|
-
|
48
|
-
workflows.mimeType = 'application/xml'
|
49
|
-
workflows.dsLocation = File.join(Dor::Config.workflow.url, "dor/objects/#{pid}/workflows")
|
50
|
-
end
|
51
|
-
|
52
44
|
def empty_datastream?(datastream)
|
53
45
|
return true if datastream.new?
|
54
46
|
|
@@ -108,6 +108,8 @@ module Dor
|
|
108
108
|
unless stacks_pathname.exist?
|
109
109
|
stacks_pathname.parent.mkpath
|
110
110
|
FileUtils.cp workspace_pathname.to_s, stacks_pathname.to_s
|
111
|
+
# Change permissions
|
112
|
+
FileUtils.chmod 'u=rw,go=r', stacks_pathname.to_s
|
111
113
|
return true
|
112
114
|
end
|
113
115
|
false
|
data/lib/dor/version.rb
CHANGED
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: 6.0.
|
4
|
+
version: 6.0.2
|
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-
|
17
|
+
date: 2018-12-04 00:00:00.000000000 Z
|
18
18
|
dependencies:
|
19
19
|
- !ruby/object:Gem::Dependency
|
20
20
|
name: active-fedora
|