dor-services 5.1.0 → 5.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +13 -5
  2. data/config/dev_console_env.rb +45 -32
  3. data/lib/dor-services.rb +52 -49
  4. data/lib/dor/datastreams/administrative_metadata_ds.rb +2 -2
  5. data/lib/dor/datastreams/content_metadata_ds.rb +114 -144
  6. data/lib/dor/datastreams/default_object_rights_ds.rb +10 -12
  7. data/lib/dor/datastreams/desc_metadata_ds.rb +4 -4
  8. data/lib/dor/datastreams/events_ds.rb +8 -8
  9. data/lib/dor/datastreams/identity_metadata_ds.rb +40 -23
  10. data/lib/dor/datastreams/rights_metadata_ds.rb +109 -0
  11. data/lib/dor/datastreams/role_metadata_ds.rb +4 -4
  12. data/lib/dor/datastreams/simple_dublin_core_ds.rb +6 -6
  13. data/lib/dor/datastreams/version_metadata_ds.rb +29 -10
  14. data/lib/dor/models/admin_policy_object.rb +3 -3
  15. data/lib/dor/models/describable.rb +5 -4
  16. data/lib/dor/models/editable.rb +29 -33
  17. data/lib/dor/models/embargoable.rb +1 -12
  18. data/lib/dor/models/governable.rb +4 -27
  19. data/lib/dor/models/identifiable.rb +60 -58
  20. data/lib/dor/models/item.rb +5 -9
  21. data/lib/dor/models/presentable.rb +15 -2
  22. data/lib/dor/models/processable.rb +34 -30
  23. data/lib/dor/models/publishable.rb +5 -14
  24. data/lib/dor/models/{releasable.rb → releaseable.rb} +59 -15
  25. data/lib/dor/models/rightsable.rb +25 -0
  26. data/lib/dor/models/versionable.rb +6 -3
  27. data/lib/dor/models/workflow_object.rb +4 -4
  28. data/lib/dor/services/cleanup_reset_service.rb +1 -2
  29. data/lib/dor/services/cleanup_service.rb +1 -1
  30. data/lib/dor/services/registration_service.rb +0 -3
  31. data/lib/dor/services/sdr_ingest_service.rb +1 -1
  32. data/lib/dor/services/search_service.rb +1 -1
  33. data/lib/dor/utils/sdr_client.rb +23 -0
  34. data/lib/dor/version.rb +1 -1
  35. data/lib/dor/workflow/document.rb +23 -22
  36. data/lib/tasks/rdoc.rake +4 -4
  37. metadata +113 -96
  38. data/config/environments/development.rb +0 -84
  39. data/config/environments/development.rb.old +0 -84
  40. data/config/environments/test.rb +0 -84
  41. data/lib/tasks/dor.rake +0 -39
@@ -1,84 +0,0 @@
1
- cert_dir = File.join(File.dirname(__FILE__), "..", "certs")
2
-
3
- Dor::Config.configure do
4
- fedora do
5
- url 'https://sul-dor-test.stanford.edu/fedora'
6
- end
7
-
8
- ssl do
9
- cert_file File.join(cert_dir,"robots-dor-dev.crt")
10
- key_file File.join(cert_dir,"robots-dor-dev.key")
11
- key_pass ''
12
- end
13
-
14
- suri do
15
- mint_ids true
16
- id_namespace 'druid'
17
- url 'https://lyberservices-dev.stanford.edu'
18
- user 'labware'
19
- pass 'lyberteam'
20
- end
21
-
22
- metadata do
23
- exist.url 'http://viewer:l3l%40nd@lyberapps-dev.stanford.edu/exist/rest/'
24
- catalog.url 'http://lyberservices-prod.stanford.edu/catalog/mods'
25
- end
26
-
27
- stacks do
28
- document_cache_host 'purl-dev.stanford.edu'
29
- local_stacks_root '/stacks'
30
- local_document_cache_root '/purl/document_cache'
31
- local_workspace_root '/dor/workspace'
32
- url 'http://stacks-dev.stanford.edu'
33
- iiif_profile 'http://iiif.io/api/image/2/level1.json'
34
- end
35
-
36
- solrizer.url 'http://127.0.0.1/solr/argo_test'
37
- workflow.url 'https://lyberservices-dev.stanford.edu/workflow/'
38
- dor_services.url 'https://dorAdmin:dorAdmin@sul-lyberservices-dev.stanford.edu/dor'
39
-
40
- cleanup do
41
- local_workspace_root '/dor/workspace'
42
- local_export_home '/dor/export'
43
- end
44
-
45
- sdr do
46
- url 'https://sdrAdmin:sdrAdmin@sul-sdr-services-dev.stanford.edu/sdr/'
47
- local_workspace_root '/dor/workspace'
48
- local_export_home '/dor/export'
49
- datastreams do
50
- administrativeMetadata 'optional'
51
- contentMetadata 'optional'
52
- descMetadata 'required'
53
- defaultObjectRights 'optional'
54
- events 'optional'
55
- embargoMetadata 'optional'
56
- identityMetadata 'required'
57
- provenanceMetadata 'required'
58
- relationshipMetadata 'required'
59
- rightsMetadata 'optional'
60
- roleMetadata 'optional'
61
- sourceMetadata 'optional'
62
- technicalMetadata 'optional'
63
- versionMetadata 'required'
64
- workflows 'optional'
65
- end
66
- end
67
-
68
- accessioning_robot_sleep_time 30
69
-
70
- end
71
-
72
-
73
- #WORKFLOW_URI = 'http://lyberservices-test.stanford.edu/workflow'
74
-
75
- # Constants for Dor::WorkflowService
76
- #module Dor
77
- # CREATE_WORKFLOW = DOR_CREATE_WORKFLOW = true
78
- # WF_URI = 'http://lyberservices-test.stanford.edu/workflow'
79
- #end
80
-
81
- # External application locations
82
- JHOVE_HOME = File.join(ENV['HOME'], 'jhoveToolkit')
83
-
84
- REDIS_URL = "sul-lyberservices-dev.stanford.edu:6379/resque:#{ENV['ROBOT_ENVIRONMENT']}"
@@ -1,84 +0,0 @@
1
- cert_dir = File.join(File.dirname(__FILE__), "..", "certs")
2
-
3
- Dor::Config.configure do
4
- fedora do
5
- url 'https://sul-dor-dev.stanford.edu/fedora'
6
- end
7
-
8
- ssl do
9
- cert_file File.join(cert_dir,"robots-dor-dev.crt")
10
- key_file File.join(cert_dir,"robots-dor-dev.key")
11
- key_pass ''
12
- end
13
-
14
- suri do
15
- mint_ids true
16
- id_namespace 'druid'
17
- url 'https://lyberservices-dev.stanford.edu'
18
- user 'labware'
19
- pass 'lyberteam'
20
- end
21
-
22
- metadata do
23
- exist.url 'http://viewer:l3l%40nd@lyberapps-dev.stanford.edu/exist/rest/'
24
- catalog.url 'http://lyberservices-prod.stanford.edu/catalog/mods'
25
- end
26
-
27
- stacks do
28
- document_cache_host 'purl-dev.stanford.edu'
29
- local_stacks_root '/stacks'
30
- local_document_cache_root '/purl/document_cache'
31
- local_workspace_root '/dor/workspace'
32
- url 'http://stacks-dev.stanford.edu'
33
- iiif_profile 'http://iiif.io/api/image/2/level1.json'
34
- end
35
-
36
- solrizer.url 'http://sul-solr.stanford.edu/solr/argo_dev'
37
- workflow.url 'https://lyberservices-dev.stanford.edu/workflow/'
38
- dor_services.url 'https://dorAdmin:dorAdmin@sul-lyberservices-dev.stanford.edu/dor'
39
-
40
- cleanup do
41
- local_workspace_root '/dor/workspace'
42
- local_export_home '/dor/export'
43
- end
44
-
45
- sdr do
46
- url 'https://sdrAdmin:sdrAdmin@sul-sdr-services-dev.stanford.edu/sdr/'
47
- local_workspace_root '/dor/workspace'
48
- local_export_home '/dor/export'
49
- datastreams do
50
- administrativeMetadata 'optional'
51
- contentMetadata 'optional'
52
- descMetadata 'required'
53
- defaultObjectRights 'optional'
54
- events 'optional'
55
- embargoMetadata 'optional'
56
- identityMetadata 'required'
57
- provenanceMetadata 'required'
58
- relationshipMetadata 'required'
59
- rightsMetadata 'optional'
60
- roleMetadata 'optional'
61
- sourceMetadata 'optional'
62
- technicalMetadata 'optional'
63
- versionMetadata 'required'
64
- workflows 'optional'
65
- end
66
- end
67
-
68
- accessioning_robot_sleep_time 30
69
-
70
- end
71
-
72
-
73
- #WORKFLOW_URI = 'http://lyberservices-test.stanford.edu/workflow'
74
-
75
- # Constants for Dor::WorkflowService
76
- #module Dor
77
- # CREATE_WORKFLOW = DOR_CREATE_WORKFLOW = true
78
- # WF_URI = 'http://lyberservices-test.stanford.edu/workflow'
79
- #end
80
-
81
- # External application locations
82
- JHOVE_HOME = File.join(ENV['HOME'], 'jhoveToolkit')
83
-
84
- REDIS_URL = "sul-lyberservices-dev.stanford.edu:6379/resque:#{ENV['ROBOT_ENVIRONMENT']}"
@@ -1,84 +0,0 @@
1
- cert_dir = File.join(File.dirname(__FILE__), "..", "certs")
2
-
3
- Dor::Config.configure do
4
- fedora do
5
- url 'https://sul-dor-test.stanford.edu/fedora'
6
- end
7
-
8
- ssl do
9
- cert_file File.join(cert_dir,"robots-dor-dev.crt")
10
- key_file File.join(cert_dir,"robots-dor-dev.key")
11
- key_pass ''
12
- end
13
-
14
- suri do
15
- mint_ids true
16
- id_namespace 'druid'
17
- url 'https://lyberservices-dev.stanford.edu'
18
- user 'labware'
19
- pass 'lyberteam'
20
- end
21
-
22
- metadata do
23
- exist.url 'http://viewer:l3l%40nd@lyberapps-dev.stanford.edu/exist/rest/'
24
- catalog.url 'http://lyberservices-prod.stanford.edu/catalog/mods'
25
- end
26
-
27
- stacks do
28
- document_cache_host 'purl-dev.stanford.edu'
29
- local_stacks_root '/stacks'
30
- local_document_cache_root '/purl/document_cache'
31
- local_workspace_root '/dor/workspace'
32
- url 'http://stacks-dev.stanford.edu'
33
- iiif_profile 'http://iiif.io/api/image/2/level1.json'
34
- end
35
-
36
- solrizer.url 'http://127.0.0.1/solr/argo_test'
37
- workflow.url 'https://lyberservices-dev.stanford.edu/workflow/'
38
- dor_services.url 'https://dorAdmin:dorAdmin@sul-lyberservices-dev.stanford.edu/dor'
39
-
40
- cleanup do
41
- local_workspace_root '/dor/workspace'
42
- local_export_home '/dor/export'
43
- end
44
-
45
- sdr do
46
- url 'https://sdrAdmin:sdrAdmin@sul-sdr-services-dev.stanford.edu/sdr/'
47
- local_workspace_root '/dor/workspace'
48
- local_export_home '/dor/export'
49
- datastreams do
50
- administrativeMetadata 'optional'
51
- contentMetadata 'optional'
52
- descMetadata 'required'
53
- defaultObjectRights 'optional'
54
- events 'optional'
55
- embargoMetadata 'optional'
56
- identityMetadata 'required'
57
- provenanceMetadata 'required'
58
- relationshipMetadata 'required'
59
- rightsMetadata 'optional'
60
- roleMetadata 'optional'
61
- sourceMetadata 'optional'
62
- technicalMetadata 'optional'
63
- versionMetadata 'required'
64
- workflows 'optional'
65
- end
66
- end
67
-
68
- accessioning_robot_sleep_time 30
69
-
70
- end
71
-
72
-
73
- #WORKFLOW_URI = 'http://lyberservices-test.stanford.edu/workflow'
74
-
75
- # Constants for Dor::WorkflowService
76
- #module Dor
77
- # CREATE_WORKFLOW = DOR_CREATE_WORKFLOW = true
78
- # WF_URI = 'http://lyberservices-test.stanford.edu/workflow'
79
- #end
80
-
81
- # External application locations
82
- JHOVE_HOME = File.join(ENV['HOME'], 'jhoveToolkit')
83
-
84
- REDIS_URL = "sul-lyberservices-dev.stanford.edu:6379/resque:#{ENV['ROBOT_ENVIRONMENT']}"
data/lib/tasks/dor.rake DELETED
@@ -1,39 +0,0 @@
1
- desc "Bump version number before release"
2
- task :bump_version, [:level] do |t, args|
3
- levels = ['major','minor','patch','rc']
4
- version_file = File.expand_path('../../dor/version.rb',__FILE__)
5
- file_content = File.read(version_file)
6
- (declaration,version) = file_content.scan(/^(\s*VERSION = )['"](.+)['"]/).flatten
7
- version = version.split(/\./)
8
- index = levels.index(args[:level] || (version.length == 4 ? 'rc' : 'patch'))
9
- if version.length == 4 and index < 3
10
- version.pop
11
- end
12
- if index == 3
13
- puts version.inspect
14
- rc = version.length == 4 ? version.pop : 'rc0'
15
- puts rc
16
- rc.sub!(/^rc(\d+)$/) { |m| "rc#{$1.to_i+1}" }
17
- puts rc
18
- version << rc
19
- puts version.inspect
20
- else
21
- version[index] = version[index].to_i+1
22
- (index+1).upto(2) { |i| version[i] = '0' }
23
- end
24
- version = version.join('.')
25
- file_content.sub!(/^(\s*VERSION = )['"](.+)['"]/,"#{declaration}'#{version}'")
26
- File.open(version_file,'w') { |f| f.write(file_content) }
27
-
28
- readme_file = File.expand_path('../../../README.rdoc',__FILE__)
29
- file_content = File.read(readme_file)
30
- lines = file_content.lines.to_a
31
- line = lines.index(lines.find { |l| l =~ /^== Copyright/ })
32
- lines.insert(line-1, "- <b>#{version}</b>\n")
33
- File.open(readme_file,'w') { |f| f.write(lines.join("")) }
34
- if File.basename(ENV['EDITOR']) =~ /^r?mate$/
35
- `#{ENV['EDITOR']} -l #{line} -w #{readme_file}`
36
- end
37
-
38
- $stderr.puts "Version bumped to #{version}"
39
- end