dor-services 4.12.2 → 4.12.3
Sign up to get free protection for your applications and to get access to all the features.
- data/config/certs/dlss-dev-test.crt +18 -0
- data/config/certs/dlss-dev-test.key +15 -0
- data/config/certs/robots-dor-dev.crt +29 -0
- data/config/certs/robots-dor-dev.key +27 -0
- data/config/dev_console_env.rb +66 -0
- data/lib/dor-services.rb +2 -1
- data/lib/dor/models/governable.rb +8 -8
- data/lib/dor/services/cleanup_reset_service.rb +101 -0
- data/lib/dor/services/cleanup_service.rb +23 -21
- data/lib/dor/services/reset_workspace_service.rb +35 -0
- data/lib/dor/version.rb +1 -1
- metadata +80 -8
- checksums.yaml +0 -15
- data/lib/dor/services/archive_workspace_service.rb +0 -19
@@ -0,0 +1,18 @@
|
|
1
|
+
-----BEGIN CERTIFICATE-----
|
2
|
+
MIIC3zCCAccCCQC3NmcDpol4lzANBgkqhkiG9w0BAQUFADBtMQswCQYDVQQGEwJV
|
3
|
+
UzETMBEGA1UECBMKQ2FsaWZvcm5pYTERMA8GA1UEBxMIU3RhbmZvcmQxETAPBgNV
|
4
|
+
BAoTCFN0YW5mb3JkMQ0wCwYDVQQLEwRETFNTMRQwEgYDVQQDEwtMeWJlclRlc3RD
|
5
|
+
QTAeFw0xMTAyMjMxNjUzNTlaFw0yMTAyMjAxNjUzNTlaMHoxCzAJBgNVBAYTAlVT
|
6
|
+
MRMwEQYDVQQIEwpDYWxpZm9ybmlhMREwDwYDVQQHEwhTdGFuZm9yZDEcMBoGA1UE
|
7
|
+
ChMTU3RhbmZvcmQgVW5pdmVyc2l0eTENMAsGA1UECxMERExTUzEWMBQGA1UEAxMN
|
8
|
+
ZGxzcy1kZXYtdGVzdDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAl70WWl1c
|
9
|
+
eC50SwKDCr+vhNFH9N+YdTzh3rIRVKzJFPKvNqkye0jwq9MApyEtQzdyk3eDInlK
|
10
|
+
dOwKX0XpoLnzm9SgBIY714ojYKZMRPPaIc2k5D7mYgyAUYyWLTJnO93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hz7qgRhBpKhRirCfHMW
|
26
|
+
EfQV5k32vEGoSI+eG8zcGb9mwDeb/EWXAMGXrx2YuYFu7txtwC2mZXc=
|
27
|
+
-----END RSA PRIVATE KEY-----
|
@@ -0,0 +1,66 @@
|
|
1
|
+
# Copied from common-accessioning config/environments
|
2
|
+
|
3
|
+
cert_dir = File.join(File.dirname(__FILE__), ".", "certs")
|
4
|
+
|
5
|
+
Dor::Config.configure do
|
6
|
+
fedora do
|
7
|
+
url 'https://sul-dor-dev.stanford.edu/fedora'
|
8
|
+
end
|
9
|
+
|
10
|
+
ssl do
|
11
|
+
cert_file File.join(cert_dir,"robots-dor-dev.crt")
|
12
|
+
key_file File.join(cert_dir,"robots-dor-dev.key")
|
13
|
+
key_pass ''
|
14
|
+
end
|
15
|
+
|
16
|
+
suri do
|
17
|
+
mint_ids true
|
18
|
+
id_namespace 'druid'
|
19
|
+
url 'https://lyberservices-dev.stanford.edu'
|
20
|
+
user 'labware'
|
21
|
+
pass 'lyberteam'
|
22
|
+
end
|
23
|
+
|
24
|
+
metadata do
|
25
|
+
exist.url 'http://viewer:l3l%40nd@lyberapps-dev.stanford.edu/exist/rest/'
|
26
|
+
catalog.url 'http://lyberservices-prod.stanford.edu/catalog/mods'
|
27
|
+
end
|
28
|
+
|
29
|
+
stacks do
|
30
|
+
document_cache_host 'purl-dev.stanford.edu'
|
31
|
+
document_cache_user 'lyberadmin'
|
32
|
+
local_workspace_root '/dor/workspace'
|
33
|
+
storage_root '/stacks'
|
34
|
+
host 'stacks-dev.stanford.edu'
|
35
|
+
user 'lyberadmin'
|
36
|
+
local_stacks_root '/stacks'
|
37
|
+
local_document_cache_root '/purl/document_cache'
|
38
|
+
end
|
39
|
+
|
40
|
+
gsearch.url 'https://dor-dev.stanford.edu/solr/gsearch'
|
41
|
+
solrizer.url 'https://dor-dev.stanford.edu/solr'
|
42
|
+
workflow.url 'https://lyberservices-dev.stanford.edu/workflow/'
|
43
|
+
dor_services.url 'https://dorAdmin:dorAdmin@sul-lyberservices-dev.stanford.edu/dor/v1'
|
44
|
+
|
45
|
+
cleanup do
|
46
|
+
local_workspace_root '/dor/workspace'
|
47
|
+
local_export_home '/dor/export'
|
48
|
+
end
|
49
|
+
|
50
|
+
sdr do
|
51
|
+
local_workspace_root '/dor/workspace'
|
52
|
+
local_export_home '/dor/export'
|
53
|
+
datastreams do
|
54
|
+
contentMetadata 'required'
|
55
|
+
descMetadata 'required'
|
56
|
+
identityMetadata 'required'
|
57
|
+
provenanceMetadata 'required'
|
58
|
+
relationshipMetadata 'required'
|
59
|
+
rightsMetadata 'optional'
|
60
|
+
sourceMetadata 'optional'
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
accessioning_robot_sleep_time 30
|
65
|
+
|
66
|
+
end
|
data/lib/dor-services.rb
CHANGED
@@ -139,7 +139,8 @@ module Dor
|
|
139
139
|
autoload :ProvenanceMetadataService, 'dor/services/provenance_metadata_service'
|
140
140
|
autoload :TechnicalMetadataService, 'dor/services/technical_metadata_service'
|
141
141
|
autoload :MergeService, 'dor/services/merge_service'
|
142
|
-
autoload :
|
142
|
+
autoload :ResetWorkspaceService, 'dor/services/reset_workspace_service'
|
143
|
+
autoload :CleanupResetService, 'dor/services/cleanup_reset_service'
|
143
144
|
|
144
145
|
# Versioning Classes
|
145
146
|
module Versioning
|
@@ -120,28 +120,28 @@ module Dor
|
|
120
120
|
end
|
121
121
|
end
|
122
122
|
def groups_which_manage_item
|
123
|
-
['dor-administrator','dor-apo-manager', 'dor-apo-depositor']
|
123
|
+
['dor-administrator', 'sdr-administrator', 'dor-apo-manager', 'dor-apo-depositor']
|
124
124
|
end
|
125
125
|
def groups_which_manage_desc_metadata
|
126
|
-
['dor-administrator','dor-apo-manager', 'dor-apo-depositor', 'dor-apo-metadata']
|
126
|
+
['dor-administrator', 'sdr-administrator', 'dor-apo-manager', 'dor-apo-depositor', 'dor-apo-metadata']
|
127
127
|
end
|
128
128
|
def groups_which_manage_system_metadata
|
129
|
-
['dor-administrator','dor-apo-manager', 'dor-apo-depositor']
|
129
|
+
['dor-administrator', 'sdr-administrator', 'dor-apo-manager', 'dor-apo-depositor']
|
130
130
|
end
|
131
131
|
def groups_which_manage_content
|
132
|
-
['dor-administrator','dor-apo-manager', 'dor-apo-depositor']
|
132
|
+
['dor-administrator', 'sdr-administrator', 'dor-apo-manager', 'dor-apo-depositor']
|
133
133
|
end
|
134
134
|
def groups_which_manage_rights
|
135
|
-
['dor-administrator','dor-apo-manager', 'dor-apo-depositor']
|
135
|
+
['dor-administrator', 'sdr-administrator', 'dor-apo-manager', 'dor-apo-depositor']
|
136
136
|
end
|
137
137
|
def groups_which_manage_embargo
|
138
|
-
['dor-administrator','dor-apo-manager', 'dor-apo-depositor']
|
138
|
+
['dor-administrator', 'sdr-administrator', 'dor-apo-manager', 'dor-apo-depositor']
|
139
139
|
end
|
140
140
|
def groups_which_view_content
|
141
|
-
['dor-administrator','dor-apo-manager', 'dor-apo-depositor', 'dor-viewer']
|
141
|
+
['dor-administrator', 'sdr-administrator', 'dor-apo-manager', 'dor-apo-depositor', 'dor-viewer', 'sdr-viewer']
|
142
142
|
end
|
143
143
|
def groups_which_view_metadata
|
144
|
-
['dor-administrator','dor-apo-manager', 'dor-apo-depositor', 'dor-viewer']
|
144
|
+
['dor-administrator', 'sdr-administrator', 'dor-apo-manager', 'dor-apo-depositor', 'dor-viewer', 'sdr-viewer']
|
145
145
|
end
|
146
146
|
def intersect arr1, arr2
|
147
147
|
return (arr1 & arr2).length > 0
|
@@ -0,0 +1,101 @@
|
|
1
|
+
require 'pathname'
|
2
|
+
|
3
|
+
module Dor
|
4
|
+
|
5
|
+
# Remove all traces of the object's data files from the workspace and export areas
|
6
|
+
class CleanupResetService
|
7
|
+
|
8
|
+
# @param [String] druid The identifier for the object whose reset data is to be removed
|
9
|
+
# @return [void] remove copy of the reset data that was exported to preservation core
|
10
|
+
def self.cleanup_by_reset_druid(druid)
|
11
|
+
last_version = get_druid_last_version(druid)
|
12
|
+
cleanup_reset_workspace_content(druid, last_version, Config.cleanup.local_workspace_root)
|
13
|
+
cleanup_reset_workspace_content(druid, last_version, Config.cleanup.local_assembly_root)
|
14
|
+
cleanup_reset_export(druid, last_version)
|
15
|
+
end
|
16
|
+
|
17
|
+
def self.get_druid_last_version(druid)
|
18
|
+
druid_obj = Dor::Item.find(druid)
|
19
|
+
last_version = druid_obj.current_version.to_i
|
20
|
+
|
21
|
+
#if the current version is still open, avoid this versioned directory
|
22
|
+
if Dor::WorkflowService.get_lifecycle('dor', druid, 'accessioned').nil? then
|
23
|
+
last_version = last_version - 1
|
24
|
+
end
|
25
|
+
return last_version
|
26
|
+
end
|
27
|
+
|
28
|
+
# @param [String] druid The identifier for the object whose reset data is to be removed
|
29
|
+
# @param [String] base The base directory to delete from
|
30
|
+
# @param [Integer] last_version The last version that the data should be removed until version 1
|
31
|
+
# @return [void] remove all the object's reset data files from the workspace area equal to less than the last_version
|
32
|
+
def self.cleanup_reset_workspace_content(druid,last_version, base)
|
33
|
+
base_druid = DruidTools::Druid.new(druid, base)
|
34
|
+
base_druid_tree = base_druid.pathname.to_s
|
35
|
+
#if it is truncated tree /aa/111/aaa/1111/content,
|
36
|
+
#we should follow the regular cleanup technique
|
37
|
+
|
38
|
+
reset_directories = get_reset_dir_list(last_version, base_druid_tree)
|
39
|
+
reset_directories.each do |path|
|
40
|
+
FileUtils.rm_rf(path)
|
41
|
+
end
|
42
|
+
base_druid.prune_ancestors(base_druid.pathname.parent)
|
43
|
+
end
|
44
|
+
|
45
|
+
|
46
|
+
# @param [String] druid The identifier for the object whose reset data is to be removed
|
47
|
+
# @param [String] base The base directory to delete from
|
48
|
+
# @param [Integer] last_version The last version that the data should be removed until version 1
|
49
|
+
# @return [void] prepares a list of reset directories that should be removed
|
50
|
+
def self.get_reset_dir_list(last_version, base_druid_tree)
|
51
|
+
reset_directories = []
|
52
|
+
for i in 1..last_version
|
53
|
+
reset_path = "#{base_druid_tree}_v#{i}"
|
54
|
+
reset_directories.append(reset_path) if File.exists?(reset_path)
|
55
|
+
end
|
56
|
+
return reset_directories
|
57
|
+
end
|
58
|
+
|
59
|
+
# @param [String] druid The identifier for the object whose reset bags data is to be removed
|
60
|
+
# @return [void] remove copy of the reset data that was exported to preservation core
|
61
|
+
def self.cleanup_reset_export(druid, last_version)
|
62
|
+
id = druid.split(':').last
|
63
|
+
base_bag_directory = File.join(Config.cleanup.local_export_home, id)
|
64
|
+
|
65
|
+
bag_dir_list = get_reset_bag_dir_list(last_version, base_bag_directory)
|
66
|
+
bag_dir_list.each do |bag_dir|
|
67
|
+
Pathname(bag_dir).rmtree
|
68
|
+
end
|
69
|
+
|
70
|
+
bag_tar_list = get_reset_bag_tar_list(last_version, base_bag_directory)
|
71
|
+
bag_tar_list.each do |bag_tar|
|
72
|
+
Pathname(bag_tar).rmtree
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
# @param [Integer] last_version The last version that the data should be removed until version 1
|
77
|
+
# @param [String] base_bag_directory The base bag directory including the export home and druid id
|
78
|
+
# @return [void] prepares a list of reset bag directories that should be removed
|
79
|
+
def self.get_reset_bag_dir_list(last_version, base_bag_directory)
|
80
|
+
reset_bags = []
|
81
|
+
for i in 1..last_version do
|
82
|
+
reset_path = "#{base_bag_directory}_v#{i}"
|
83
|
+
reset_bags.append(reset_path) if File.exists?(reset_path)
|
84
|
+
end
|
85
|
+
return reset_bags
|
86
|
+
end
|
87
|
+
|
88
|
+
# @param [String] base_bag_directory The base bag directory including the export home and druid id
|
89
|
+
# @param [Integer] last_version The last version that the data should be removed until version 1
|
90
|
+
# @return [void] prepares a list of reset bag tars that should be removed
|
91
|
+
def self.get_reset_bag_tar_list(last_version, base_bag_directory)
|
92
|
+
reset_bags = []
|
93
|
+
for i in 1..last_version do
|
94
|
+
reset_path = "#{base_bag_directory}_v#{i}.tar"
|
95
|
+
reset_bags.append(reset_path) if File.exists?(reset_path)
|
96
|
+
end
|
97
|
+
return reset_bags
|
98
|
+
end
|
99
|
+
|
100
|
+
end
|
101
|
+
end
|
@@ -18,31 +18,13 @@ module Dor
|
|
18
18
|
cleanup_export(druid)
|
19
19
|
end
|
20
20
|
|
21
|
-
# Tries to remove any exsitence of the object in our systems
|
22
|
-
# Does the following:
|
23
|
-
# - Removes item from Dor/Fedora/Solr
|
24
|
-
# - Removes content from dor workspace
|
25
|
-
# - Removes content from assembly workspace
|
26
|
-
# - Removes content from sdr export area
|
27
|
-
# - Removes content from stacks
|
28
|
-
# - Removes content from purl
|
29
|
-
# - Removes active workflows
|
30
|
-
# @param [String] druid id of the object you wish to remove
|
31
|
-
def self.nuke!(druid)
|
32
|
-
cleanup_by_druid druid
|
33
|
-
cleanup_stacks druid
|
34
|
-
cleanup_purl_doc_cache druid
|
35
|
-
remove_active_workflows druid
|
36
|
-
delete_from_dor druid
|
37
|
-
end
|
38
|
-
|
39
21
|
# @param [String] druid The identifier for the object whose data is to be removed
|
40
22
|
# @param [String] base The base directory to delete from
|
41
23
|
# @return [void] remove the object's data files from the workspace area
|
42
24
|
def self.cleanup_workspace_content(druid, base)
|
43
25
|
DruidTools::Druid.new(druid, base).prune!
|
44
26
|
end
|
45
|
-
|
27
|
+
|
46
28
|
# @param [String] druid The identifier for the object whose data is to be removed
|
47
29
|
# @return [void] remove copy of the data that was exported to preservation core
|
48
30
|
def self.cleanup_export(druid)
|
@@ -60,6 +42,24 @@ module Dor
|
|
60
42
|
pathname.rmtree if pathname.exist?
|
61
43
|
end
|
62
44
|
|
45
|
+
# Tries to remove any exsitence of the object in our systems
|
46
|
+
# Does the following:
|
47
|
+
# - Removes item from Dor/Fedora/Solr
|
48
|
+
# - Removes content from dor workspace
|
49
|
+
# - Removes content from assembly workspace
|
50
|
+
# - Removes content from sdr export area
|
51
|
+
# - Removes content from stacks
|
52
|
+
# - Removes content from purl
|
53
|
+
# - Removes active workflows
|
54
|
+
# @param [String] druid id of the object you wish to remove
|
55
|
+
def self.nuke!(druid)
|
56
|
+
cleanup_by_druid druid
|
57
|
+
cleanup_stacks druid
|
58
|
+
cleanup_purl_doc_cache druid
|
59
|
+
remove_active_workflows druid
|
60
|
+
delete_from_dor druid
|
61
|
+
end
|
62
|
+
|
63
63
|
def self.cleanup_stacks(druid)
|
64
64
|
DruidTools::StacksDruid.new(druid, Config.stacks.local_storage_root).prune!
|
65
65
|
end
|
@@ -83,7 +83,9 @@ module Dor
|
|
83
83
|
Dor::SearchService.solr.delete_by_id(pid)
|
84
84
|
Dor::SearchService.solr.commit
|
85
85
|
end
|
86
|
+
end
|
87
|
+
|
88
|
+
end
|
86
89
|
|
87
|
-
end
|
88
90
|
|
89
|
-
|
91
|
+
|
@@ -0,0 +1,35 @@
|
|
1
|
+
module Dor
|
2
|
+
|
3
|
+
# Rename the druid trees at the end of the accessionWF in order to be cleaned/deleted later.
|
4
|
+
class ResetWorkspaceService
|
5
|
+
|
6
|
+
def self.reset_workspace_druid_tree(druid, version, workspace_root)
|
7
|
+
|
8
|
+
druid_tree_path = DruidTools::Druid.new(druid, workspace_root).pathname.to_s
|
9
|
+
|
10
|
+
raise "The archived directory #{druid_tree_path}_v#{version} already existed." if File.exists?("#{druid_tree_path}_v#{version}")
|
11
|
+
|
12
|
+
if File.exists?(druid_tree_path)
|
13
|
+
FileUtils.mv(druid_tree_path, "#{druid_tree_path}_v#{version}")
|
14
|
+
end #Else is a truncated tree where we shouldn't do anything
|
15
|
+
|
16
|
+
end
|
17
|
+
|
18
|
+
def self.reset_export_bag(druid, version, export_root)
|
19
|
+
|
20
|
+
id = druid.split(':').last
|
21
|
+
bag_dir = File.join(export_root, id)
|
22
|
+
|
23
|
+
raise "The archived bag #{bag_dir}_v#{version} already existed." if File.exists?("#{bag_dir}_v#{version}")
|
24
|
+
|
25
|
+
if File.exists?(bag_dir)
|
26
|
+
FileUtils.mv(bag_dir, "#{bag_dir}_v#{version}")
|
27
|
+
end
|
28
|
+
|
29
|
+
if File.exists?("#{bag_dir}.tar")
|
30
|
+
FileUtils.mv("#{bag_dir}.tar", "#{bag_dir}_v#{version}.tar")
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
end
|
35
|
+
end
|
data/lib/dor/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dor-services
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.12.
|
4
|
+
version: 4.12.3
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- Michael Klein
|
@@ -12,11 +13,12 @@ authors:
|
|
12
13
|
autorequire:
|
13
14
|
bindir: bin
|
14
15
|
cert_chain: []
|
15
|
-
date: 2014-
|
16
|
+
date: 2014-08-06 00:00:00.000000000 Z
|
16
17
|
dependencies:
|
17
18
|
- !ruby/object:Gem::Dependency
|
18
19
|
name: active-fedora
|
19
20
|
requirement: !ruby/object:Gem::Requirement
|
21
|
+
none: false
|
20
22
|
requirements:
|
21
23
|
- - ~>
|
22
24
|
- !ruby/object:Gem::Version
|
@@ -24,6 +26,7 @@ dependencies:
|
|
24
26
|
type: :runtime
|
25
27
|
prerelease: false
|
26
28
|
version_requirements: !ruby/object:Gem::Requirement
|
29
|
+
none: false
|
27
30
|
requirements:
|
28
31
|
- - ~>
|
29
32
|
- !ruby/object:Gem::Version
|
@@ -31,6 +34,7 @@ dependencies:
|
|
31
34
|
- !ruby/object:Gem::Dependency
|
32
35
|
name: activesupport
|
33
36
|
requirement: !ruby/object:Gem::Requirement
|
37
|
+
none: false
|
34
38
|
requirements:
|
35
39
|
- - ~>
|
36
40
|
- !ruby/object:Gem::Version
|
@@ -41,6 +45,7 @@ dependencies:
|
|
41
45
|
type: :runtime
|
42
46
|
prerelease: false
|
43
47
|
version_requirements: !ruby/object:Gem::Requirement
|
48
|
+
none: false
|
44
49
|
requirements:
|
45
50
|
- - ~>
|
46
51
|
- !ruby/object:Gem::Version
|
@@ -51,6 +56,7 @@ dependencies:
|
|
51
56
|
- !ruby/object:Gem::Dependency
|
52
57
|
name: confstruct
|
53
58
|
requirement: !ruby/object:Gem::Requirement
|
59
|
+
none: false
|
54
60
|
requirements:
|
55
61
|
- - ~>
|
56
62
|
- !ruby/object:Gem::Version
|
@@ -58,6 +64,7 @@ dependencies:
|
|
58
64
|
type: :runtime
|
59
65
|
prerelease: false
|
60
66
|
version_requirements: !ruby/object:Gem::Requirement
|
67
|
+
none: false
|
61
68
|
requirements:
|
62
69
|
- - ~>
|
63
70
|
- !ruby/object:Gem::Version
|
@@ -65,6 +72,7 @@ dependencies:
|
|
65
72
|
- !ruby/object:Gem::Dependency
|
66
73
|
name: equivalent-xml
|
67
74
|
requirement: !ruby/object:Gem::Requirement
|
75
|
+
none: false
|
68
76
|
requirements:
|
69
77
|
- - ~>
|
70
78
|
- !ruby/object:Gem::Version
|
@@ -72,6 +80,7 @@ dependencies:
|
|
72
80
|
type: :runtime
|
73
81
|
prerelease: false
|
74
82
|
version_requirements: !ruby/object:Gem::Requirement
|
83
|
+
none: false
|
75
84
|
requirements:
|
76
85
|
- - ~>
|
77
86
|
- !ruby/object:Gem::Version
|
@@ -79,6 +88,7 @@ dependencies:
|
|
79
88
|
- !ruby/object:Gem::Dependency
|
80
89
|
name: json
|
81
90
|
requirement: !ruby/object:Gem::Requirement
|
91
|
+
none: false
|
82
92
|
requirements:
|
83
93
|
- - ~>
|
84
94
|
- !ruby/object:Gem::Version
|
@@ -86,6 +96,7 @@ dependencies:
|
|
86
96
|
type: :runtime
|
87
97
|
prerelease: false
|
88
98
|
version_requirements: !ruby/object:Gem::Requirement
|
99
|
+
none: false
|
89
100
|
requirements:
|
90
101
|
- - ~>
|
91
102
|
- !ruby/object:Gem::Version
|
@@ -93,6 +104,7 @@ dependencies:
|
|
93
104
|
- !ruby/object:Gem::Dependency
|
94
105
|
name: net-sftp
|
95
106
|
requirement: !ruby/object:Gem::Requirement
|
107
|
+
none: false
|
96
108
|
requirements:
|
97
109
|
- - ~>
|
98
110
|
- !ruby/object:Gem::Version
|
@@ -100,6 +112,7 @@ dependencies:
|
|
100
112
|
type: :runtime
|
101
113
|
prerelease: false
|
102
114
|
version_requirements: !ruby/object:Gem::Requirement
|
115
|
+
none: false
|
103
116
|
requirements:
|
104
117
|
- - ~>
|
105
118
|
- !ruby/object:Gem::Version
|
@@ -107,6 +120,7 @@ dependencies:
|
|
107
120
|
- !ruby/object:Gem::Dependency
|
108
121
|
name: net-ssh
|
109
122
|
requirement: !ruby/object:Gem::Requirement
|
123
|
+
none: false
|
110
124
|
requirements:
|
111
125
|
- - ~>
|
112
126
|
- !ruby/object:Gem::Version
|
@@ -114,6 +128,7 @@ dependencies:
|
|
114
128
|
type: :runtime
|
115
129
|
prerelease: false
|
116
130
|
version_requirements: !ruby/object:Gem::Requirement
|
131
|
+
none: false
|
117
132
|
requirements:
|
118
133
|
- - ~>
|
119
134
|
- !ruby/object:Gem::Version
|
@@ -121,6 +136,7 @@ dependencies:
|
|
121
136
|
- !ruby/object:Gem::Dependency
|
122
137
|
name: nokogiri
|
123
138
|
requirement: !ruby/object:Gem::Requirement
|
139
|
+
none: false
|
124
140
|
requirements:
|
125
141
|
- - ~>
|
126
142
|
- !ruby/object:Gem::Version
|
@@ -128,6 +144,7 @@ dependencies:
|
|
128
144
|
type: :runtime
|
129
145
|
prerelease: false
|
130
146
|
version_requirements: !ruby/object:Gem::Requirement
|
147
|
+
none: false
|
131
148
|
requirements:
|
132
149
|
- - ~>
|
133
150
|
- !ruby/object:Gem::Version
|
@@ -135,6 +152,7 @@ dependencies:
|
|
135
152
|
- !ruby/object:Gem::Dependency
|
136
153
|
name: om
|
137
154
|
requirement: !ruby/object:Gem::Requirement
|
155
|
+
none: false
|
138
156
|
requirements:
|
139
157
|
- - ~>
|
140
158
|
- !ruby/object:Gem::Version
|
@@ -142,6 +160,7 @@ dependencies:
|
|
142
160
|
type: :runtime
|
143
161
|
prerelease: false
|
144
162
|
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
none: false
|
145
164
|
requirements:
|
146
165
|
- - ~>
|
147
166
|
- !ruby/object:Gem::Version
|
@@ -149,6 +168,7 @@ dependencies:
|
|
149
168
|
- !ruby/object:Gem::Dependency
|
150
169
|
name: progressbar
|
151
170
|
requirement: !ruby/object:Gem::Requirement
|
171
|
+
none: false
|
152
172
|
requirements:
|
153
173
|
- - ~>
|
154
174
|
- !ruby/object:Gem::Version
|
@@ -156,6 +176,7 @@ dependencies:
|
|
156
176
|
type: :runtime
|
157
177
|
prerelease: false
|
158
178
|
version_requirements: !ruby/object:Gem::Requirement
|
179
|
+
none: false
|
159
180
|
requirements:
|
160
181
|
- - ~>
|
161
182
|
- !ruby/object:Gem::Version
|
@@ -163,6 +184,7 @@ dependencies:
|
|
163
184
|
- !ruby/object:Gem::Dependency
|
164
185
|
name: rdf
|
165
186
|
requirement: !ruby/object:Gem::Requirement
|
187
|
+
none: false
|
166
188
|
requirements:
|
167
189
|
- - ~>
|
168
190
|
- !ruby/object:Gem::Version
|
@@ -170,6 +192,7 @@ dependencies:
|
|
170
192
|
type: :runtime
|
171
193
|
prerelease: false
|
172
194
|
version_requirements: !ruby/object:Gem::Requirement
|
195
|
+
none: false
|
173
196
|
requirements:
|
174
197
|
- - ~>
|
175
198
|
- !ruby/object:Gem::Version
|
@@ -177,6 +200,7 @@ dependencies:
|
|
177
200
|
- !ruby/object:Gem::Dependency
|
178
201
|
name: rest-client
|
179
202
|
requirement: !ruby/object:Gem::Requirement
|
203
|
+
none: false
|
180
204
|
requirements:
|
181
205
|
- - ~>
|
182
206
|
- !ruby/object:Gem::Version
|
@@ -184,6 +208,7 @@ dependencies:
|
|
184
208
|
type: :runtime
|
185
209
|
prerelease: false
|
186
210
|
version_requirements: !ruby/object:Gem::Requirement
|
211
|
+
none: false
|
187
212
|
requirements:
|
188
213
|
- - ~>
|
189
214
|
- !ruby/object:Gem::Version
|
@@ -191,6 +216,7 @@ dependencies:
|
|
191
216
|
- !ruby/object:Gem::Dependency
|
192
217
|
name: rsolr-ext
|
193
218
|
requirement: !ruby/object:Gem::Requirement
|
219
|
+
none: false
|
194
220
|
requirements:
|
195
221
|
- - ~>
|
196
222
|
- !ruby/object:Gem::Version
|
@@ -198,6 +224,7 @@ dependencies:
|
|
198
224
|
type: :runtime
|
199
225
|
prerelease: false
|
200
226
|
version_requirements: !ruby/object:Gem::Requirement
|
227
|
+
none: false
|
201
228
|
requirements:
|
202
229
|
- - ~>
|
203
230
|
- !ruby/object:Gem::Version
|
@@ -205,6 +232,7 @@ dependencies:
|
|
205
232
|
- !ruby/object:Gem::Dependency
|
206
233
|
name: ruby-cache
|
207
234
|
requirement: !ruby/object:Gem::Requirement
|
235
|
+
none: false
|
208
236
|
requirements:
|
209
237
|
- - ~>
|
210
238
|
- !ruby/object:Gem::Version
|
@@ -212,6 +240,7 @@ dependencies:
|
|
212
240
|
type: :runtime
|
213
241
|
prerelease: false
|
214
242
|
version_requirements: !ruby/object:Gem::Requirement
|
243
|
+
none: false
|
215
244
|
requirements:
|
216
245
|
- - ~>
|
217
246
|
- !ruby/object:Gem::Version
|
@@ -219,6 +248,7 @@ dependencies:
|
|
219
248
|
- !ruby/object:Gem::Dependency
|
220
249
|
name: ruby-graphviz
|
221
250
|
requirement: !ruby/object:Gem::Requirement
|
251
|
+
none: false
|
222
252
|
requirements:
|
223
253
|
- - ~>
|
224
254
|
- !ruby/object:Gem::Version
|
@@ -226,6 +256,7 @@ dependencies:
|
|
226
256
|
type: :runtime
|
227
257
|
prerelease: false
|
228
258
|
version_requirements: !ruby/object:Gem::Requirement
|
259
|
+
none: false
|
229
260
|
requirements:
|
230
261
|
- - ~>
|
231
262
|
- !ruby/object:Gem::Version
|
@@ -233,6 +264,7 @@ dependencies:
|
|
233
264
|
- !ruby/object:Gem::Dependency
|
234
265
|
name: rubydora
|
235
266
|
requirement: !ruby/object:Gem::Requirement
|
267
|
+
none: false
|
236
268
|
requirements:
|
237
269
|
- - ~>
|
238
270
|
- !ruby/object:Gem::Version
|
@@ -240,6 +272,7 @@ dependencies:
|
|
240
272
|
type: :runtime
|
241
273
|
prerelease: false
|
242
274
|
version_requirements: !ruby/object:Gem::Requirement
|
275
|
+
none: false
|
243
276
|
requirements:
|
244
277
|
- - ~>
|
245
278
|
- !ruby/object:Gem::Version
|
@@ -247,6 +280,7 @@ dependencies:
|
|
247
280
|
- !ruby/object:Gem::Dependency
|
248
281
|
name: solrizer
|
249
282
|
requirement: !ruby/object:Gem::Requirement
|
283
|
+
none: false
|
250
284
|
requirements:
|
251
285
|
- - ~>
|
252
286
|
- !ruby/object:Gem::Version
|
@@ -254,6 +288,7 @@ dependencies:
|
|
254
288
|
type: :runtime
|
255
289
|
prerelease: false
|
256
290
|
version_requirements: !ruby/object:Gem::Requirement
|
291
|
+
none: false
|
257
292
|
requirements:
|
258
293
|
- - ~>
|
259
294
|
- !ruby/object:Gem::Version
|
@@ -261,6 +296,7 @@ dependencies:
|
|
261
296
|
- !ruby/object:Gem::Dependency
|
262
297
|
name: systemu
|
263
298
|
requirement: !ruby/object:Gem::Requirement
|
299
|
+
none: false
|
264
300
|
requirements:
|
265
301
|
- - ~>
|
266
302
|
- !ruby/object:Gem::Version
|
@@ -268,6 +304,7 @@ dependencies:
|
|
268
304
|
type: :runtime
|
269
305
|
prerelease: false
|
270
306
|
version_requirements: !ruby/object:Gem::Requirement
|
307
|
+
none: false
|
271
308
|
requirements:
|
272
309
|
- - ~>
|
273
310
|
- !ruby/object:Gem::Version
|
@@ -275,6 +312,7 @@ dependencies:
|
|
275
312
|
- !ruby/object:Gem::Dependency
|
276
313
|
name: uuidtools
|
277
314
|
requirement: !ruby/object:Gem::Requirement
|
315
|
+
none: false
|
278
316
|
requirements:
|
279
317
|
- - ~>
|
280
318
|
- !ruby/object:Gem::Version
|
@@ -282,6 +320,7 @@ dependencies:
|
|
282
320
|
type: :runtime
|
283
321
|
prerelease: false
|
284
322
|
version_requirements: !ruby/object:Gem::Requirement
|
323
|
+
none: false
|
285
324
|
requirements:
|
286
325
|
- - ~>
|
287
326
|
- !ruby/object:Gem::Version
|
@@ -289,6 +328,7 @@ dependencies:
|
|
289
328
|
- !ruby/object:Gem::Dependency
|
290
329
|
name: validatable
|
291
330
|
requirement: !ruby/object:Gem::Requirement
|
331
|
+
none: false
|
292
332
|
requirements:
|
293
333
|
- - ~>
|
294
334
|
- !ruby/object:Gem::Version
|
@@ -296,6 +336,7 @@ dependencies:
|
|
296
336
|
type: :runtime
|
297
337
|
prerelease: false
|
298
338
|
version_requirements: !ruby/object:Gem::Requirement
|
339
|
+
none: false
|
299
340
|
requirements:
|
300
341
|
- - ~>
|
301
342
|
- !ruby/object:Gem::Version
|
@@ -303,6 +344,7 @@ dependencies:
|
|
303
344
|
- !ruby/object:Gem::Dependency
|
304
345
|
name: dor-workflow-service
|
305
346
|
requirement: !ruby/object:Gem::Requirement
|
347
|
+
none: false
|
306
348
|
requirements:
|
307
349
|
- - ~>
|
308
350
|
- !ruby/object:Gem::Version
|
@@ -313,6 +355,7 @@ dependencies:
|
|
313
355
|
type: :runtime
|
314
356
|
prerelease: false
|
315
357
|
version_requirements: !ruby/object:Gem::Requirement
|
358
|
+
none: false
|
316
359
|
requirements:
|
317
360
|
- - ~>
|
318
361
|
- !ruby/object:Gem::Version
|
@@ -323,20 +366,23 @@ dependencies:
|
|
323
366
|
- !ruby/object:Gem::Dependency
|
324
367
|
name: druid-tools
|
325
368
|
requirement: !ruby/object:Gem::Requirement
|
369
|
+
none: false
|
326
370
|
requirements:
|
327
371
|
- - ~>
|
328
372
|
- !ruby/object:Gem::Version
|
329
|
-
version: 0.3.
|
373
|
+
version: 0.3.1
|
330
374
|
type: :runtime
|
331
375
|
prerelease: false
|
332
376
|
version_requirements: !ruby/object:Gem::Requirement
|
377
|
+
none: false
|
333
378
|
requirements:
|
334
379
|
- - ~>
|
335
380
|
- !ruby/object:Gem::Version
|
336
|
-
version: 0.3.
|
381
|
+
version: 0.3.1
|
337
382
|
- !ruby/object:Gem::Dependency
|
338
383
|
name: lyber-utils
|
339
384
|
requirement: !ruby/object:Gem::Requirement
|
385
|
+
none: false
|
340
386
|
requirements:
|
341
387
|
- - ~>
|
342
388
|
- !ruby/object:Gem::Version
|
@@ -344,6 +390,7 @@ dependencies:
|
|
344
390
|
type: :runtime
|
345
391
|
prerelease: false
|
346
392
|
version_requirements: !ruby/object:Gem::Requirement
|
393
|
+
none: false
|
347
394
|
requirements:
|
348
395
|
- - ~>
|
349
396
|
- !ruby/object:Gem::Version
|
@@ -351,6 +398,7 @@ dependencies:
|
|
351
398
|
- !ruby/object:Gem::Dependency
|
352
399
|
name: moab-versioning
|
353
400
|
requirement: !ruby/object:Gem::Requirement
|
401
|
+
none: false
|
354
402
|
requirements:
|
355
403
|
- - '='
|
356
404
|
- !ruby/object:Gem::Version
|
@@ -358,6 +406,7 @@ dependencies:
|
|
358
406
|
type: :runtime
|
359
407
|
prerelease: false
|
360
408
|
version_requirements: !ruby/object:Gem::Requirement
|
409
|
+
none: false
|
361
410
|
requirements:
|
362
411
|
- - '='
|
363
412
|
- !ruby/object:Gem::Version
|
@@ -365,6 +414,7 @@ dependencies:
|
|
365
414
|
- !ruby/object:Gem::Dependency
|
366
415
|
name: stanford-mods
|
367
416
|
requirement: !ruby/object:Gem::Requirement
|
417
|
+
none: false
|
368
418
|
requirements:
|
369
419
|
- - ~>
|
370
420
|
- !ruby/object:Gem::Version
|
@@ -372,6 +422,7 @@ dependencies:
|
|
372
422
|
type: :runtime
|
373
423
|
prerelease: false
|
374
424
|
version_requirements: !ruby/object:Gem::Requirement
|
425
|
+
none: false
|
375
426
|
requirements:
|
376
427
|
- - ~>
|
377
428
|
- !ruby/object:Gem::Version
|
@@ -379,6 +430,7 @@ dependencies:
|
|
379
430
|
- !ruby/object:Gem::Dependency
|
380
431
|
name: fakeweb
|
381
432
|
requirement: !ruby/object:Gem::Requirement
|
433
|
+
none: false
|
382
434
|
requirements:
|
383
435
|
- - ~>
|
384
436
|
- !ruby/object:Gem::Version
|
@@ -386,6 +438,7 @@ dependencies:
|
|
386
438
|
type: :development
|
387
439
|
prerelease: false
|
388
440
|
version_requirements: !ruby/object:Gem::Requirement
|
441
|
+
none: false
|
389
442
|
requirements:
|
390
443
|
- - ~>
|
391
444
|
- !ruby/object:Gem::Version
|
@@ -393,6 +446,7 @@ dependencies:
|
|
393
446
|
- !ruby/object:Gem::Dependency
|
394
447
|
name: haml
|
395
448
|
requirement: !ruby/object:Gem::Requirement
|
449
|
+
none: false
|
396
450
|
requirements:
|
397
451
|
- - ~>
|
398
452
|
- !ruby/object:Gem::Version
|
@@ -400,6 +454,7 @@ dependencies:
|
|
400
454
|
type: :development
|
401
455
|
prerelease: false
|
402
456
|
version_requirements: !ruby/object:Gem::Requirement
|
457
|
+
none: false
|
403
458
|
requirements:
|
404
459
|
- - ~>
|
405
460
|
- !ruby/object:Gem::Version
|
@@ -407,6 +462,7 @@ dependencies:
|
|
407
462
|
- !ruby/object:Gem::Dependency
|
408
463
|
name: jhove-service
|
409
464
|
requirement: !ruby/object:Gem::Requirement
|
465
|
+
none: false
|
410
466
|
requirements:
|
411
467
|
- - ~>
|
412
468
|
- !ruby/object:Gem::Version
|
@@ -414,6 +470,7 @@ dependencies:
|
|
414
470
|
type: :development
|
415
471
|
prerelease: false
|
416
472
|
version_requirements: !ruby/object:Gem::Requirement
|
473
|
+
none: false
|
417
474
|
requirements:
|
418
475
|
- - ~>
|
419
476
|
- !ruby/object:Gem::Version
|
@@ -421,6 +478,7 @@ dependencies:
|
|
421
478
|
- !ruby/object:Gem::Dependency
|
422
479
|
name: rake
|
423
480
|
requirement: !ruby/object:Gem::Requirement
|
481
|
+
none: false
|
424
482
|
requirements:
|
425
483
|
- - ~>
|
426
484
|
- !ruby/object:Gem::Version
|
@@ -428,6 +486,7 @@ dependencies:
|
|
428
486
|
type: :development
|
429
487
|
prerelease: false
|
430
488
|
version_requirements: !ruby/object:Gem::Requirement
|
489
|
+
none: false
|
431
490
|
requirements:
|
432
491
|
- - ~>
|
433
492
|
- !ruby/object:Gem::Version
|
@@ -435,6 +494,7 @@ dependencies:
|
|
435
494
|
- !ruby/object:Gem::Dependency
|
436
495
|
name: rdoc
|
437
496
|
requirement: !ruby/object:Gem::Requirement
|
497
|
+
none: false
|
438
498
|
requirements:
|
439
499
|
- - ~>
|
440
500
|
- !ruby/object:Gem::Version
|
@@ -442,6 +502,7 @@ dependencies:
|
|
442
502
|
type: :development
|
443
503
|
prerelease: false
|
444
504
|
version_requirements: !ruby/object:Gem::Requirement
|
505
|
+
none: false
|
445
506
|
requirements:
|
446
507
|
- - ~>
|
447
508
|
- !ruby/object:Gem::Version
|
@@ -449,6 +510,7 @@ dependencies:
|
|
449
510
|
- !ruby/object:Gem::Dependency
|
450
511
|
name: rspec
|
451
512
|
requirement: !ruby/object:Gem::Requirement
|
513
|
+
none: false
|
452
514
|
requirements:
|
453
515
|
- - ~>
|
454
516
|
- !ruby/object:Gem::Version
|
@@ -456,6 +518,7 @@ dependencies:
|
|
456
518
|
type: :development
|
457
519
|
prerelease: false
|
458
520
|
version_requirements: !ruby/object:Gem::Requirement
|
521
|
+
none: false
|
459
522
|
requirements:
|
460
523
|
- - ~>
|
461
524
|
- !ruby/object:Gem::Version
|
@@ -463,6 +526,7 @@ dependencies:
|
|
463
526
|
- !ruby/object:Gem::Dependency
|
464
527
|
name: yard
|
465
528
|
requirement: !ruby/object:Gem::Requirement
|
529
|
+
none: false
|
466
530
|
requirements:
|
467
531
|
- - ~>
|
468
532
|
- !ruby/object:Gem::Version
|
@@ -470,6 +534,7 @@ dependencies:
|
|
470
534
|
type: :development
|
471
535
|
prerelease: false
|
472
536
|
version_requirements: !ruby/object:Gem::Requirement
|
537
|
+
none: false
|
473
538
|
requirements:
|
474
539
|
- - ~>
|
475
540
|
- !ruby/object:Gem::Version
|
@@ -532,7 +597,7 @@ files:
|
|
532
597
|
- lib/dor/models/upgradable.rb
|
533
598
|
- lib/dor/models/versionable.rb
|
534
599
|
- lib/dor/models/workflow_object.rb
|
535
|
-
- lib/dor/services/
|
600
|
+
- lib/dor/services/cleanup_reset_service.rb
|
536
601
|
- lib/dor/services/cleanup_service.rb
|
537
602
|
- lib/dor/services/digital_stacks_service.rb
|
538
603
|
- lib/dor/services/merge_service.rb
|
@@ -540,6 +605,7 @@ files:
|
|
540
605
|
- lib/dor/services/metadata_handlers/mdtoolkit_handler.rb
|
541
606
|
- lib/dor/services/metadata_service.rb
|
542
607
|
- lib/dor/services/registration_service.rb
|
608
|
+
- lib/dor/services/reset_workspace_service.rb
|
543
609
|
- lib/dor/services/sdr_ingest_service.rb
|
544
610
|
- lib/dor/services/search_service.rb
|
545
611
|
- lib/dor/services/suri_service.rb
|
@@ -558,34 +624,40 @@ files:
|
|
558
624
|
- lib/gsearch/schema.xml
|
559
625
|
- lib/tasks/dor.rake
|
560
626
|
- lib/tasks/rdoc.rake
|
627
|
+
- config/certs/dlss-dev-test.crt
|
628
|
+
- config/certs/dlss-dev-test.key
|
561
629
|
- config/certs/README
|
630
|
+
- config/certs/robots-dor-dev.crt
|
631
|
+
- config/certs/robots-dor-dev.key
|
562
632
|
- config/config_defaults.yml
|
633
|
+
- config/dev_console_env.rb
|
563
634
|
- config/dev_console_env.rb.example
|
564
635
|
- config/predicate_mappings.yml
|
565
636
|
- bin/dor-indexer
|
566
637
|
- bin/dor-indexerd
|
567
638
|
homepage:
|
568
639
|
licenses: []
|
569
|
-
metadata: {}
|
570
640
|
post_install_message:
|
571
641
|
rdoc_options: []
|
572
642
|
require_paths:
|
573
643
|
- lib
|
574
644
|
required_ruby_version: !ruby/object:Gem::Requirement
|
645
|
+
none: false
|
575
646
|
requirements:
|
576
647
|
- - ! '>='
|
577
648
|
- !ruby/object:Gem::Version
|
578
649
|
version: '0'
|
579
650
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
651
|
+
none: false
|
580
652
|
requirements:
|
581
653
|
- - ! '>='
|
582
654
|
- !ruby/object:Gem::Version
|
583
655
|
version: 1.3.6
|
584
656
|
requirements: []
|
585
657
|
rubyforge_project:
|
586
|
-
rubygems_version:
|
658
|
+
rubygems_version: 1.8.25
|
587
659
|
signing_key:
|
588
|
-
specification_version:
|
660
|
+
specification_version: 3
|
589
661
|
summary: Ruby implmentation of DOR services used by the SULAIR Digital Library
|
590
662
|
test_files: []
|
591
663
|
has_rdoc:
|
checksums.yaml
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
---
|
2
|
-
!binary "U0hBMQ==":
|
3
|
-
metadata.gz: !binary |-
|
4
|
-
MTI2ZjBkOTExNzRmMGZhNTlmYzNjOTg0MzUyYWFlMzAyYzMwMjMzMA==
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
MDNmMjQzNzU1YTBhYzIwMmJmNzcwNzEzNmUwNWUyYThjYzY2Njg1YQ==
|
7
|
-
SHA512:
|
8
|
-
metadata.gz: !binary |-
|
9
|
-
MjNmY2RhNmVkZGVkNTRjMWU3NzU4ZTlhZjY2OTkxMTg2ZmI5OWIxMGNhMTU5
|
10
|
-
M2QyYzE1OGM1MzA4NmNjY2M4ZDE3ZDY5ZDEwZDQwNmNkMmYyYWY5Y2UzYjNk
|
11
|
-
MWM4OTFkMDFlOWZjMzUwODM0MmU4NzBmMzI2OTllMGEyMDE5MTg=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
MzQ0YzQ2OGQ5M2Q0NGQ1MmIwMzY0NjgzOGIwMmI3MDc3OGZmMGNiMTllZWQ1
|
14
|
-
YjlmZTQ4MzUyNmQ0NzZjYjgzNzI3MjY4ODFhZjZiZTUyZWM4MTJkMzM5NjAy
|
15
|
-
MTdhNGJiMGVlNGU4NmRhYTQzZjRmYzAzNjc1ZDVkODc1YjY4MTY=
|
@@ -1,19 +0,0 @@
|
|
1
|
-
module Dor
|
2
|
-
|
3
|
-
# Rename the druid trees at the end of the accessionWF in order to be cleaned/deleted later.
|
4
|
-
class ArchiveWorkspaceService
|
5
|
-
|
6
|
-
def self.archive_workspace_druid_tree(druid, version, workspace_root)
|
7
|
-
|
8
|
-
druid_tree_path = DruidTools::Druid.new(druid, workspace_root).pathname.to_s
|
9
|
-
|
10
|
-
raise "The archived directory #{druid_tree_path}_v#{version} already existed." if File.exists?("#{druid_tree_path}_v#{version}")
|
11
|
-
|
12
|
-
if File.exists?(druid_tree_path)
|
13
|
-
FileUtils.mv(druid_tree_path, "#{druid_tree_path}_v#{version}")
|
14
|
-
end #Else is a truncated tree where we shouldn't do anything
|
15
|
-
|
16
|
-
end
|
17
|
-
|
18
|
-
end
|
19
|
-
end
|