cocina-models 0.89.0 → 0.89.1

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: 6350dbb0cb127ef0fffb8a31e84c622bd0a6ed1a93d8a8fbed44462f1749b1c3
4
- data.tar.gz: fcdfede93a6ae1c22f6b322513ef8b30f0474f7ad9aae9f9601711faf22903c1
3
+ metadata.gz: a0dbfb214630511f046a824a0f6774e203db38bcef1c7af9dc6118932148caa4
4
+ data.tar.gz: d087a39d4cb3270cd01d8fc77beb0c053a45431867c47570715c09fc0868e856
5
5
  SHA512:
6
- metadata.gz: ee21ac69b1e00d6ae0de058bda4c3b32905566804635221e60d51ab011db0c49a22d7f166f919b8327ba32b68423a11e9020bc746d122e127504475c163c9a38
7
- data.tar.gz: d4e3e69934c64064279a4f16af8c7e1e3d0cd05623f357c891a5c9c6e462338efd51a1799c4d23aa06feda2b8ba56738949f548caaf21724dbad4f5c2c16c6f6
6
+ metadata.gz: b083699765ee6bd9715ff5fe575ca994220ebb7f1d8ec9e7526b15f2af320c8c99b7c85cabb843e00027f37fddf68a50cf91b2c2e7513b8cdc82e5cd16a70bfe
7
+ data.tar.gz: f3d50447698ba52af5d8f71565cd77235970f318ba78105de1e88dc4bd23134d9e826d167ad745adfd3aeeb0d2add3bf854fad0f713f512984188b5e9ea355c3
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cocina-models (0.89.0)
4
+ cocina-models (0.89.1)
5
5
  activesupport
6
6
  deprecation
7
7
  dry-struct (~> 1.0)
@@ -69,7 +69,7 @@ GEM
69
69
  jsonpath (1.1.2)
70
70
  multi_json
71
71
  mini_portile2 (2.8.1)
72
- minitest (5.17.0)
72
+ minitest (5.18.0)
73
73
  multi_json (1.15.0)
74
74
  nokogiri (1.14.2)
75
75
  mini_portile2 (~> 2.8.0)
@@ -84,7 +84,7 @@ GEM
84
84
  patience_diff (1.2.0)
85
85
  optimist (~> 3.0)
86
86
  racc (1.6.2)
87
- rack (3.0.4.1)
87
+ rack (3.0.4.2)
88
88
  rainbow (3.1.1)
89
89
  rake (13.0.6)
90
90
  regexp_parser (2.7.0)
@@ -106,7 +106,7 @@ GEM
106
106
  rspec-core (>= 2, < 4, != 2.12.0)
107
107
  rss (0.2.9)
108
108
  rexml
109
- rubocop (1.46.0)
109
+ rubocop (1.48.0)
110
110
  json (~> 2.3)
111
111
  parallel (~> 1.10)
112
112
  parser (>= 3.2.0.0)
@@ -116,7 +116,7 @@ GEM
116
116
  rubocop-ast (>= 1.26.0, < 2.0)
117
117
  ruby-progressbar (~> 1.7)
118
118
  unicode-display_width (>= 2.4.0, < 3.0)
119
- rubocop-ast (1.26.0)
119
+ rubocop-ast (1.27.0)
120
120
  parser (>= 3.2.1.0)
121
121
  rubocop-capybara (2.17.1)
122
122
  rubocop (~> 1.41)
@@ -125,7 +125,7 @@ GEM
125
125
  rubocop-rspec (2.18.1)
126
126
  rubocop (~> 1.33)
127
127
  rubocop-capybara (~> 2.17)
128
- ruby-progressbar (1.11.0)
128
+ ruby-progressbar (1.13.0)
129
129
  simplecov (0.22.0)
130
130
  docile (~> 1.1)
131
131
  simplecov-html (~> 0.11)
@@ -7,7 +7,7 @@ module Cocina
7
7
  # Catalog that is the source of the linked record.
8
8
  # example: folio
9
9
  attribute :catalog, Types::Strict::String.enum('folio', 'previous folio')
10
- # Only one of the catkeys should be designated for refreshing. This means that this key is the one used to pull metadata from the catalog if there is more than one key present.
10
+ # Only one of the Folio instance HRIDs should be designated for refreshing. This means that this HRID is the one used to pull metadata from the catalog if there is more than one HRID present.
11
11
  attribute :refresh, Types::Strict::Bool.default(false)
12
12
  # Record identifier that is unique within the context of the linked record's catalog.
13
13
  attribute :catalogRecordId, MigratedFromSymphonyIdentifier | MigratedFromVoyagerIdentifier | CreatedInFolioIdentifier
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Cocina
4
4
  module Models
5
- VERSION = '0.89.0'
5
+ VERSION = '0.89.1'
6
6
  end
7
7
  end
@@ -90,7 +90,7 @@ module Cocina
90
90
 
91
91
  # rubocop:disable Metrics/ParameterLists
92
92
  def self.build_request_dro_properties(type:, version:, label:, title:, source_id:, admin_policy_id:,
93
- barcode: nil, catkeys: [], collection_ids: [])
93
+ barcode: nil, catkeys: [], folio_instance_hrids: [], collection_ids: [])
94
94
  {
95
95
  type: type,
96
96
  version: version,
@@ -112,6 +112,11 @@ module Cocina
112
112
  { catalog: 'symphony', catalogRecordId: catkey, refresh: index.zero? }
113
113
  end
114
114
  end
115
+ if folio_instance_hrids.present?
116
+ props[:identification][:catalogLinks] = folio_instance_hrids.map.with_index do |folio_id, index|
117
+ { catalog: 'folio', catalogRecordId: folio_id, refresh: index.zero? }
118
+ end
119
+ end
115
120
  props[:identification][:barcode] = barcode if barcode
116
121
  end
117
122
  end
@@ -130,7 +135,7 @@ module Cocina
130
135
  end
131
136
 
132
137
  # rubocop:disable Metrics/ParameterLists
133
- def self.build_request_collection_properties(type:, version:, label:, title:, admin_policy_id:, source_id: nil, catkeys: [])
138
+ def self.build_request_collection_properties(type:, version:, label:, title:, admin_policy_id:, source_id: nil, catkeys: [], folio_instance_hrids: [])
134
139
  {
135
140
  type: type,
136
141
  version: version,
@@ -147,6 +152,11 @@ module Cocina
147
152
  { catalog: 'symphony', catalogRecordId: catkey, refresh: index.zero? }
148
153
  end
149
154
  end
155
+ if folio_instance_hrids.present?
156
+ props[:identification][:catalogLinks] = folio_instance_hrids.map.with_index do |folio_id, index|
157
+ { catalog: 'folio', catalogRecordId: folio_id, refresh: index.zero? }
158
+ end
159
+ end
150
160
  props[:identification][:sourceId] = source_id if source_id
151
161
  end
152
162
  end
data/openapi.yml CHANGED
@@ -1158,9 +1158,9 @@ components:
1158
1158
  - previous folio
1159
1159
  example: folio
1160
1160
  refresh:
1161
- description: Only one of the catkeys should be designated for refreshing.
1162
- This means that this key is the one used to pull metadata from the catalog
1163
- if there is more than one key present.
1161
+ description: Only one of the Folio instance HRIDs should be designated for refreshing.
1162
+ This means that this HRID is the one used to pull metadata from the catalog
1163
+ if there is more than one HRID present.
1164
1164
  type: boolean
1165
1165
  default: false
1166
1166
  catalogRecordId:
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.89.0
4
+ version: 0.89.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Coyne
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-02-28 00:00:00.000000000 Z
11
+ date: 2023-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport