dor-services 6.3.0 → 6.4.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 +0 -1
- data/lib/dor/datastreams/rights_metadata_ds.rb +1 -1
- data/lib/dor/models/admin_policy_object.rb +31 -2
- data/lib/dor/services/sdr_ingest_service.rb +1 -1
- data/lib/dor/version.rb +1 -1
- data/lib/dor/workflow/document.rb +2 -0
- metadata +4 -5
- data/lib/dor/models/concerns/editable.rb +0 -42
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b8f84301c1b84bb4155b4dec895cb2b3d63daea54637b35f51728a8268c792ee
|
4
|
+
data.tar.gz: 8accea8e3978a89bf772dd0ecb14b17229b6755b8a8a1c3e12b790b59eaae3ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 923ed4f14197cdb8fdc821276b7d500ffaa0fde36187cf537ee894ac025213dde7fe7905bd71e25f9d1b25d057b10649c48016e6bbf41a5dd1cef4efc3df001c
|
7
|
+
data.tar.gz: 26e4f1ab094617dc635340f0a31858ba0e1d9ad31565c7bedd83fb58b013432ecfc303a875702a4db846eaa820e5cf0776ab3bb1daac2e726fe70fcf6e775ee0
|
data/lib/dor-services.rb
CHANGED
@@ -76,7 +76,7 @@ module Dor
|
|
76
76
|
@dra_object ||= Dor::RightsAuth.parse(ng_xml, true)
|
77
77
|
end
|
78
78
|
|
79
|
-
# key is the rights type code, used by e.g. RightsMetadataDS#set_read_rights and
|
79
|
+
# key is the rights type code, used by e.g. RightsMetadataDS#set_read_rights and AdminPolicyObject#default_rights=
|
80
80
|
# value is the human-readable string, used for indexing, and for things like building select lists in the argo UI.
|
81
81
|
def self.valid_rights_types
|
82
82
|
RIGHTS_TYPE_CODES.keys
|
@@ -2,13 +2,12 @@
|
|
2
2
|
|
3
3
|
module Dor
|
4
4
|
class AdminPolicyObject < Dor::Abstract
|
5
|
-
include Editable
|
6
|
-
|
7
5
|
has_many :things, property: :is_governed_by, class_name: 'ActiveFedora::Base'
|
8
6
|
has_object_type 'adminPolicy'
|
9
7
|
has_metadata name: 'administrativeMetadata', type: Dor::AdministrativeMetadataDS, label: 'Administrative Metadata'
|
10
8
|
has_metadata name: 'roleMetadata', type: Dor::RoleMetadataDS, label: 'Role Metadata'
|
11
9
|
has_metadata name: 'defaultObjectRights', type: Dor::DefaultObjectRightsDS, label: 'Default Object Rights'
|
10
|
+
belongs_to :agreement_object, property: :referencesAgreement, class_name: 'Dor::Item'
|
12
11
|
|
13
12
|
self.resource_indexer = CompositeIndexer.new(
|
14
13
|
DataIndexer,
|
@@ -18,5 +17,35 @@ module Dor
|
|
18
17
|
ProcessableIndexer,
|
19
18
|
WorkflowIndexer
|
20
19
|
)
|
20
|
+
|
21
|
+
CREATIVE_COMMONS_USE_LICENSES = ActiveSupport::Deprecation::DeprecatedConstantProxy.new('CREATIVE_COMMONS_USE_LICENSES', 'Dor::CreativeCommonsLicenseService')
|
22
|
+
OPEN_DATA_COMMONS_USE_LICENSES = ActiveSupport::Deprecation::DeprecatedConstantProxy.new('OPEN_DATA_COMMONS_USE_LICENSES', 'Dor::OpenDataLicenseService')
|
23
|
+
|
24
|
+
delegate :add_roleplayer, :purge_roles, :roles, to: :roleMetadata
|
25
|
+
delegate :mods_title, :mods_title=, to: :descMetadata
|
26
|
+
delegate :default_collections, :add_default_collection, :remove_default_collection,
|
27
|
+
:metadata_source, :metadata_source=,
|
28
|
+
:default_workflows, :default_workflow=,
|
29
|
+
:desc_metadata_source, :desc_metadata_source=,
|
30
|
+
:desc_metadata_format, :desc_metadata_format=, to: :administrativeMetadata
|
31
|
+
|
32
|
+
delegate :use_statement, :use_statement=,
|
33
|
+
:copyright_statement, :copyright_statement=,
|
34
|
+
:creative_commons_license, :creative_commons_license_human,
|
35
|
+
:open_data_commons_license, :open_data_commons_license_human,
|
36
|
+
:use_license, :use_license_uri, :use_license_human,
|
37
|
+
:creative_commons_license=, :creative_commons_license_human=,
|
38
|
+
:open_data_commons_license=, :open_data_commons_license_human=,
|
39
|
+
:use_license=, :default_rights, :default_rights=, to: :defaultObjectRights
|
40
|
+
|
41
|
+
def agreement
|
42
|
+
agreement_object ? agreement_object.pid : ''
|
43
|
+
end
|
44
|
+
|
45
|
+
def agreement=(val)
|
46
|
+
raise ArgumentError, 'agreement must have a valid druid' if val.blank?
|
47
|
+
|
48
|
+
self.agreement_object = Dor.find val.to_s, cast: true
|
49
|
+
end
|
21
50
|
end
|
22
51
|
end
|
@@ -47,7 +47,7 @@ module Dor
|
|
47
47
|
# @param [String] druid The object identifier
|
48
48
|
# @return [Moab::SignatureCatalog] the catalog of all files previously ingested
|
49
49
|
def self.get_signature_catalog(druid)
|
50
|
-
|
50
|
+
Dor::Services::Client.object(druid).sdr.signature_catalog
|
51
51
|
end
|
52
52
|
|
53
53
|
# @param [Dor::Item] dor_item The representation of the digital object
|
data/lib/dor/version.rb
CHANGED
@@ -3,6 +3,7 @@
|
|
3
3
|
module Dor
|
4
4
|
module Workflow
|
5
5
|
class Document
|
6
|
+
extend Deprecation
|
6
7
|
include SolrDocHelper
|
7
8
|
include ::OM::XML::Document
|
8
9
|
|
@@ -41,6 +42,7 @@ module Dor
|
|
41
42
|
def active?
|
42
43
|
ng_xml.at_xpath('/workflow/process[not(@version)]') ? true : false
|
43
44
|
end
|
45
|
+
deprecation_deprecate active?: 'Workflow::Document#active? has moved to Argo. This implementation does not work with the new workflow server, which returns all versions'
|
44
46
|
|
45
47
|
# @return [Dor::WorkflowDefinitionDs]
|
46
48
|
def definition
|
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.
|
4
|
+
version: 6.4.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: 2019-
|
17
|
+
date: 2019-02-02 00:00:00.000000000 Z
|
18
18
|
dependencies:
|
19
19
|
- !ruby/object:Gem::Dependency
|
20
20
|
name: active-fedora
|
@@ -90,14 +90,14 @@ dependencies:
|
|
90
90
|
requirements:
|
91
91
|
- - "~>"
|
92
92
|
- !ruby/object:Gem::Version
|
93
|
-
version: '1.
|
93
|
+
version: '1.3'
|
94
94
|
type: :runtime
|
95
95
|
prerelease: false
|
96
96
|
version_requirements: !ruby/object:Gem::Requirement
|
97
97
|
requirements:
|
98
98
|
- - "~>"
|
99
99
|
- !ruby/object:Gem::Version
|
100
|
-
version: '1.
|
100
|
+
version: '1.3'
|
101
101
|
- !ruby/object:Gem::Dependency
|
102
102
|
name: equivalent-xml
|
103
103
|
requirement: !ruby/object:Gem::Requirement
|
@@ -631,7 +631,6 @@ files:
|
|
631
631
|
- lib/dor/models/concerns/assembleable.rb
|
632
632
|
- lib/dor/models/concerns/contentable.rb
|
633
633
|
- lib/dor/models/concerns/describable.rb
|
634
|
-
- lib/dor/models/concerns/editable.rb
|
635
634
|
- lib/dor/models/concerns/embargoable.rb
|
636
635
|
- lib/dor/models/concerns/eventable.rb
|
637
636
|
- lib/dor/models/concerns/geoable.rb
|
@@ -1,42 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Dor
|
4
|
-
## This is basically used just by APOs. Arguably "editable" is the wrong name.
|
5
|
-
module Editable
|
6
|
-
extend ActiveSupport::Concern
|
7
|
-
|
8
|
-
included do
|
9
|
-
belongs_to :agreement_object, property: :referencesAgreement, class_name: 'Dor::Item'
|
10
|
-
end
|
11
|
-
|
12
|
-
CREATIVE_COMMONS_USE_LICENSES = ActiveSupport::Deprecation::DeprecatedConstantProxy.new('CREATIVE_COMMONS_USE_LICENSES', 'Dor::CreativeCommonsLicenseService')
|
13
|
-
OPEN_DATA_COMMONS_USE_LICENSES = ActiveSupport::Deprecation::DeprecatedConstantProxy.new('OPEN_DATA_COMMONS_USE_LICENSES', 'Dor::OpenDataLicenseService')
|
14
|
-
|
15
|
-
delegate :add_roleplayer, :purge_roles, :roles, to: :roleMetadata
|
16
|
-
delegate :mods_title, :mods_title=, to: :descMetadata
|
17
|
-
delegate :default_collections, :add_default_collection, :remove_default_collection,
|
18
|
-
:metadata_source, :metadata_source=,
|
19
|
-
:default_workflows, :default_workflow=,
|
20
|
-
:desc_metadata_source, :desc_metadata_source=,
|
21
|
-
:desc_metadata_format, :desc_metadata_format=, to: :administrativeMetadata
|
22
|
-
|
23
|
-
delegate :use_statement, :use_statement=,
|
24
|
-
:copyright_statement, :copyright_statement=,
|
25
|
-
:creative_commons_license, :creative_commons_license_human,
|
26
|
-
:open_data_commons_license, :open_data_commons_license_human,
|
27
|
-
:use_license, :use_license_uri, :use_license_human,
|
28
|
-
:creative_commons_license=, :creative_commons_license_human=,
|
29
|
-
:open_data_commons_license=, :open_data_commons_license_human=,
|
30
|
-
:use_license=, :default_rights, :default_rights=, to: :defaultObjectRights
|
31
|
-
|
32
|
-
def agreement
|
33
|
-
agreement_object ? agreement_object.pid : ''
|
34
|
-
end
|
35
|
-
|
36
|
-
def agreement=(val)
|
37
|
-
raise ArgumentError, 'agreement must have a valid druid' if val.blank?
|
38
|
-
|
39
|
-
self.agreement_object = Dor.find val.to_s, cast: true
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|