cocina-models 0.94.1 → 0.94.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/cocina/models/builders/title_builder.rb +11 -1
- data/lib/cocina/models/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: e147c55355cc4c2f11ed358c5091c0942e48168948da875a1fd1ff97f7dfb95a
|
4
|
+
data.tar.gz: fd668019a9193c1620d419b9a3815115a1bc0d8a93e635721bbf1251db80df10
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f9485a94c43606870b8d47f7b0d29597660fe82a884fab5128922501e65eccee5787c43a27f796dd35af36992bb04a417eb89e045e2bd74be4c8b30212e2d04
|
7
|
+
data.tar.gz: 0707161a4e5399762878ed9d9215ae59a807d046fa7f3b199e09227f8fb5da69484b32dc0a942df5fb1281aafd8ec29a054b0eae04f40a68ceddc84fda15e406
|
data/Gemfile.lock
CHANGED
@@ -201,6 +201,16 @@ module Cocina
|
|
201
201
|
# @return [String] the title value from combining the pieces of the structured_values by type and order
|
202
202
|
# with desired punctuation per specs
|
203
203
|
#
|
204
|
+
# - nonsorting characters value is followed by a space, unless the nonsorting
|
205
|
+
# character count note has a numeric value equal to the length of the
|
206
|
+
# nonsorting characters value, in which case no space is inserted
|
207
|
+
# - subtitle is preceded by space colon space, unless it is at the beginning
|
208
|
+
# of the title string
|
209
|
+
# - partName and partNumber are always separated from each other by comma space
|
210
|
+
# - first partName or partNumber in the string is preceded by period space
|
211
|
+
# - partName or partNumber before nonsorting characters or main title is followed
|
212
|
+
# by period space
|
213
|
+
#
|
204
214
|
# for punctuaion funky town, thank MARC and catalog cards
|
205
215
|
#
|
206
216
|
# rubocop:disable Metrics/AbcSize
|
@@ -245,7 +255,7 @@ module Cocina
|
|
245
255
|
end
|
246
256
|
when 'subtitle'
|
247
257
|
result = if !add_punctuation?
|
248
|
-
[result, value].select(&:presence).join(' ')
|
258
|
+
[result, value.sub(/^:/, '').strip].select(&:presence).join(' ')
|
249
259
|
elsif result.present?
|
250
260
|
# subtitle is preceded by space colon space, unless it is at the beginning of the title string
|
251
261
|
"#{result.sub(/[. :]+$/, '')} : #{value.sub(/^:/, '').strip}"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocina-models
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.94.
|
4
|
+
version: 0.94.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Coyne
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-01-
|
11
|
+
date: 2024-01-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|