dor-services 8.4.0 → 8.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/dor/datastreams/identity_metadata_ds.rb +6 -1
- data/lib/dor/indexers/releasable_indexer.rb +0 -1
- data/lib/dor/models/abstract.rb +5 -1
- data/lib/dor/release_tags/identity_metadata.rb +0 -23
- data/lib/dor/release_tags/purl.rb +1 -0
- data/lib/dor/services/collection_service.rb +1 -1
- data/lib/dor/services/release_tag_service.rb +1 -0
- data/lib/dor/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 61f15c16dd2f9137b47772916d0a6e44cbb374c88e4370e891ff51e8338feaf3
|
4
|
+
data.tar.gz: fe8b53c9d1f31e4dd3e1f3ab91878a4d2f8e2cd999332e31d2d4004e4e4f152f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1abaab49ac04961de4ee7a95ef5e3b9c10cb0fe331da1c88f20989c11cda7705878deb346bd7d1c16aac1ded1e0b2564138a3a043ad0a0d7c5931a76cf800b95
|
7
|
+
data.tar.gz: 06f071e7d3e82b8bd2bac465b3667a2b09a010160f0cfe4ca847af56b906d5bcccb4a5c8eafe19ef0b470a73f3e62e7fc7b09ec981dc9be7144429fca5f9b0e3
|
@@ -70,7 +70,7 @@ module Dor
|
|
70
70
|
alias source_id= sourceId=
|
71
71
|
|
72
72
|
def tags
|
73
|
-
|
73
|
+
tag
|
74
74
|
end
|
75
75
|
|
76
76
|
# helper method to get just the content type tag
|
@@ -88,6 +88,11 @@ module Dor
|
|
88
88
|
end
|
89
89
|
end
|
90
90
|
|
91
|
+
# @param [Array<String>] values
|
92
|
+
def other_ids=(values)
|
93
|
+
values.each { |value| add_otherId(value) }
|
94
|
+
end
|
95
|
+
|
91
96
|
def add_otherId(other_id)
|
92
97
|
ng_xml_will_change!
|
93
98
|
(name, val) = other_id.split(/:/, 2)
|
@@ -12,7 +12,6 @@ module Dor
|
|
12
12
|
# @return [Hash] the partial solr document for releasable concerns
|
13
13
|
def to_solr
|
14
14
|
solr_doc = {}
|
15
|
-
|
16
15
|
# TODO: sort of worried about the performance impact in bulk reindex
|
17
16
|
# situations, since released_for recurses all parent collections. jmartin 2015-07-14
|
18
17
|
released_for.each do |release_target, release_info|
|
data/lib/dor/models/abstract.rb
CHANGED
@@ -118,7 +118,11 @@ module Dor
|
|
118
118
|
|
119
119
|
delegate :full_title, :stanford_mods, to: :descMetadata
|
120
120
|
delegate :rights, to: :rightsMetadata
|
121
|
-
delegate :catkey, :catkey=, :
|
121
|
+
delegate :catkey, :catkey=, :source_id, :source_id=,
|
122
|
+
:objectId, :objectId=, :objectCreator, :objectCreator=,
|
123
|
+
:objectLabel, :objectLabel=, :objectType, :objectType=,
|
124
|
+
:other_ids=, :otherId, :tag=, :tags,
|
125
|
+
:previous_catkeys, :content_type_tag, to: :identityMetadata
|
122
126
|
|
123
127
|
def read_rights=(rights)
|
124
128
|
rightsMetadata.set_read_rights(rights)
|
@@ -175,29 +175,6 @@ module Dor
|
|
175
175
|
nil # We're out of tags, no applicable ones
|
176
176
|
end
|
177
177
|
|
178
|
-
# This function calls purl and gets a list of all release tags currently in purl. It then compares to the list you have generated.
|
179
|
-
# Any tag that is on purl, but not in the newly generated list is added to the new list with a value of false.
|
180
|
-
# @param new_tags [Hash{String => Boolean}] all new tags in the form of !{"Project" => Boolean}
|
181
|
-
# @return [Hash] same form as new_tags, with all missing tags not in new_tags, but in current_tag_names, added in with a Boolean value of false
|
182
|
-
def add_tags_from_purl(new_tags)
|
183
|
-
missing_tags = release_tags_from_purl.map(&:downcase) - new_tags.keys.map(&:downcase)
|
184
|
-
Honeybadger.notify("Found missing release tags on PURL for #{pid}: #{missing_tags.inspect}") if missing_tags.present? && defined? Honeybadger
|
185
|
-
|
186
|
-
missing_tags.each do |missing_tag|
|
187
|
-
new_tags[missing_tag.capitalize] = { 'release' => false }
|
188
|
-
end
|
189
|
-
new_tags
|
190
|
-
end
|
191
|
-
|
192
|
-
# Pull all release nodes from the public xml obtained via the purl query
|
193
|
-
# @param doc [Nokogiri::HTML::Document] The druid of the object you want
|
194
|
-
# @return [Array] An array containing all the release tags
|
195
|
-
def release_tags_from_purl_xml(doc)
|
196
|
-
nodes = doc.xpath('//publicObject/releaseData').children
|
197
|
-
# We only want the nodes with a name that isn't text
|
198
|
-
nodes.reject { |n| n.name.nil? || n.name.casecmp('text') == 0 }.map { |n| n.attr('to') }.uniq
|
199
|
-
end
|
200
|
-
|
201
178
|
attr_reader :item
|
202
179
|
end
|
203
180
|
end
|
@@ -6,6 +6,7 @@ module Dor
|
|
6
6
|
# Determine projects in which an item is released
|
7
7
|
# @param [String] pid identifier of the item to get the release tags for
|
8
8
|
def initialize(pid:, purl_host:)
|
9
|
+
Deprecation.warn(self, "Dor::ReleaseTags::Purl is deprecated and will be removed in dor-services 9.0. (it's moving to dor-services-app)")
|
9
10
|
@pid = pid
|
10
11
|
@purl_host = purl_host
|
11
12
|
end
|
@@ -10,6 +10,7 @@ module Dor
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def initialize(item)
|
13
|
+
Deprecation.warn(self, "Dor::ReleaseTagService is deprecated and will be removed in dor-services 9.0. (it's moving to dor-services-app)")
|
13
14
|
@identity_metadata_service = ReleaseTags::IdentityMetadata.new(item)
|
14
15
|
@purl_service = ReleaseTags::Purl.new(pid: item.pid, purl_host: Dor::Config.stacks.document_cache_host)
|
15
16
|
end
|
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: 8.
|
4
|
+
version: 8.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Klein
|
@@ -20,7 +20,7 @@ authors:
|
|
20
20
|
autorequire:
|
21
21
|
bindir: bin
|
22
22
|
cert_chain: []
|
23
|
-
date: 2020-02-
|
23
|
+
date: 2020-02-06 00:00:00.000000000 Z
|
24
24
|
dependencies:
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: active-fedora
|