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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b313f462c72acccca17b5987e03cd3d75959ab786ebbbfa6d293a1afae5bdabb
4
- data.tar.gz: 0cb57fe9ee63e6b86794f561d6bf8be33b06bfed28dec574bde6540f616ef0d9
3
+ metadata.gz: ba47d60cffc6985c853c485c72ab3a5bb42bdd7a4768a29feebc580176102047
4
+ data.tar.gz: 5c712b7691db2b6b26cf9f64a799948f3fe3c4a65b72f9b71580a2da524a5077
5
5
  SHA512:
6
- metadata.gz: 1519b179ec0889a4743a0d6fd1ef5f5c703c610e77ed9929d9cba38f30e762e3862e3924709a9b62ab6fc7e2246f8823bf724f03f33f1b97f530f7a8d83ee87e
7
- data.tar.gz: ec5323d174b0e20ee13296d6b52522d537915be05127c314c3422502524822ec98b97380ddf79629914329e9cf7b01cc9cfeaa2bc961b3ac635628b85bcac910
6
+ metadata.gz: ad6119d07af80cc547058ac821cd16a8b3023b2772cb6687d22dd73abf46a64f465c4a9004bdaa8a07521388f1817c16c00bd0cafe48488b27b6a01eef22451c
7
+ data.tar.gz: 782c53f720e2102b5b7c8c0349a22562356e037dfcc2917106bbea1174e3baa68661f778dc3df17efb6597836b3d3ab5bafd435be901766f92602044f09aac2b
@@ -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 [String, nil] Regular expression to match against filenames.
26
- # @param mime_type [String, nil] Regular expression to match against MIME types.
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
@@ -2,5 +2,5 @@
2
2
 
3
3
  # :nodoc:
4
4
  module CocinaDisplay
5
- VERSION = "2.7.0" # :nodoc:
5
+ VERSION = "2.9.0" # :nodoc:
6
6
  end
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.7.0
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: 1980-01-02 00:00:00.000000000 Z
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: 4.0.6
329
+ rubygems_version: 3.6.2
330
330
  specification_version: 4
331
331
  summary: Helpers for rendering Cocina metadata
332
332
  test_files: []