cocina_display 2.7.0 → 2.9.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/config/marc_countries.yml +1 -1
- data/lib/cocina_display/cocina_record.rb +0 -8
- data/lib/cocina_display/concerns/forms.rb +1 -1
- data/lib/cocina_display/concerns/structural.rb +2 -2
- data/lib/cocina_display/concerns/titles.rb +4 -0
- data/lib/cocina_display/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ba47d60cffc6985c853c485c72ab3a5bb42bdd7a4768a29feebc580176102047
|
|
4
|
+
data.tar.gz: 5c712b7691db2b6b26cf9f64a799948f3fe3c4a65b72f9b71580a2da524a5077
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ad6119d07af80cc547058ac821cd16a8b3023b2772cb6687d22dd73abf46a64f465c4a9004bdaa8a07521388f1817c16c00bd0cafe48488b27b6a01eef22451c
|
|
7
|
+
data.tar.gz: 782c53f720e2102b5b7c8c0349a22562356e037dfcc2917106bbea1174e3baa68661f778dc3df17efb6597836b3d3ab5bafd435be901766f92602044f09aac2b
|
data/config/marc_countries.yml
CHANGED
|
@@ -218,7 +218,7 @@ nl: "New Caledonia"
|
|
|
218
218
|
nm: "Northern Mariana Islands" # discontinued
|
|
219
219
|
nmu: "New Mexico"
|
|
220
220
|
nn: "Vanuatu"
|
|
221
|
-
no: "Norway"
|
|
221
|
+
"no": "Norway" # "no" is a reserved word in YAML, so it must be quoted
|
|
222
222
|
np: "Nepal"
|
|
223
223
|
nq: "Nicaragua"
|
|
224
224
|
nr: "Nigeria"
|
|
@@ -60,14 +60,6 @@ module CocinaDisplay
|
|
|
60
60
|
cocina_doc["type"]&.delete_prefix("https://cocina.sul.stanford.edu/models/")
|
|
61
61
|
end
|
|
62
62
|
|
|
63
|
-
# Primary processing label for the object.
|
|
64
|
-
# @note For public Cocina fetched via PURL, this is generated at publish time from the title. It will have the same value as #display_title.
|
|
65
|
-
# @see https://github.com/sul-dlss/cocina_display/issues/205#issuecomment-3781393715
|
|
66
|
-
# @return [String, nil]
|
|
67
|
-
def label
|
|
68
|
-
cocina_doc["label"]
|
|
69
|
-
end
|
|
70
|
-
|
|
71
63
|
# True if the object is a collection.
|
|
72
64
|
# @return [Boolean]
|
|
73
65
|
def collection?
|
|
@@ -191,7 +191,7 @@ module CocinaDisplay
|
|
|
191
191
|
# Is the object a digital resource without a more specific resource type?
|
|
192
192
|
# @return [Boolean]
|
|
193
193
|
def digital_only?
|
|
194
|
-
resource_type_values.all?("digital")
|
|
194
|
+
resource_type_values.present? && resource_type_values.all?("digital")
|
|
195
195
|
end
|
|
196
196
|
|
|
197
197
|
# Map a MODS or LC resource type to SearchWorks format value(s).
|
|
@@ -22,8 +22,8 @@ module CocinaDisplay
|
|
|
22
22
|
# Traverses nested FileSet structure to return a flattened array.
|
|
23
23
|
# Optionally filter by filename or MIME type regex, or by role.
|
|
24
24
|
# Filters are combined with AND logic (all must match).
|
|
25
|
-
# @param filename [
|
|
26
|
-
# @param mime_type [
|
|
25
|
+
# @param filename [Regexp, nil] Regular expression to match against filenames.
|
|
26
|
+
# @param mime_type [Regexp, nil] Regular expression to match against MIME types.
|
|
27
27
|
# @param use [String, nil] Usage type to match against (e.g., "thumbnail").
|
|
28
28
|
# @return [Array<CocinaDisplay::Structural::File>]
|
|
29
29
|
# @example
|
|
@@ -26,6 +26,10 @@ module CocinaDisplay
|
|
|
26
26
|
primary_title&.display_title
|
|
27
27
|
end
|
|
28
28
|
|
|
29
|
+
# SDR no longer populates a label field with pregenerated titles; this
|
|
30
|
+
# alias is provided for backwards compatibility.
|
|
31
|
+
alias_method :label, :display_title
|
|
32
|
+
|
|
29
33
|
# A string value for sorting by title that sorts missing values last.
|
|
30
34
|
# If there are multiple primary titles, uses the first.
|
|
31
35
|
# @see CocinaDisplay::Title#sort_title
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cocina_display
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.9.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Nick Budak
|
|
8
8
|
bindir: exe
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date:
|
|
10
|
+
date: 2026-07-14 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: janeway-jsonpath
|
|
@@ -326,7 +326,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
326
326
|
- !ruby/object:Gem::Version
|
|
327
327
|
version: '0'
|
|
328
328
|
requirements: []
|
|
329
|
-
rubygems_version:
|
|
329
|
+
rubygems_version: 3.6.2
|
|
330
330
|
specification_version: 4
|
|
331
331
|
summary: Helpers for rendering Cocina metadata
|
|
332
332
|
test_files: []
|