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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 38c6748d5c7659224f4139fc5d96b6b58732183bf133bb8ea32657a81fadc9ff
4
- data.tar.gz: 29615bf905de450af973bd8a7ee00d0cd45810a8d2bd2b55166b2e686e0e048f
3
+ metadata.gz: e147c55355cc4c2f11ed358c5091c0942e48168948da875a1fd1ff97f7dfb95a
4
+ data.tar.gz: fd668019a9193c1620d419b9a3815115a1bc0d8a93e635721bbf1251db80df10
5
5
  SHA512:
6
- metadata.gz: 3d6192a5bc54d0133483649d0bf421a4ce32f85b328d9cda131a6ce8aff7df180b045de1b58d5c78836a7ec53e326b04a141e3a616046febfc31650ec8ef4e80
7
- data.tar.gz: 93069e72c38d812ddd493c0de9abcb80a0733fad353a36721821250cbf8c36482b1711748760a8f9a1cbc8fa4915654cf4236496f4a99eaa4ab8e687fee74cbe
6
+ metadata.gz: 3f9485a94c43606870b8d47f7b0d29597660fe82a884fab5128922501e65eccee5787c43a27f796dd35af36992bb04a417eb89e045e2bd74be4c8b30212e2d04
7
+ data.tar.gz: 0707161a4e5399762878ed9d9215ae59a807d046fa7f3b199e09227f8fb5da69484b32dc0a942df5fb1281aafd8ec29a054b0eae04f40a68ceddc84fda15e406
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cocina-models (0.94.1)
4
+ cocina-models (0.94.2)
5
5
  activesupport
6
6
  deprecation
7
7
  dry-struct (~> 1.0)
@@ -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}"
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Cocina
4
4
  module Models
5
- VERSION = '0.94.1'
5
+ VERSION = '0.94.2'
6
6
  end
7
7
  end
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.1
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-23 00:00:00.000000000 Z
11
+ date: 2024-01-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport