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 +4 -4
- data/Gemfile.lock +6 -6
- data/lib/cocina/models/folio_catalog_link.rb +1 -1
- data/lib/cocina/models/version.rb +1 -1
- data/lib/cocina/rspec/factories.rb +12 -2
- data/openapi.yml +3 -3
- 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: a0dbfb214630511f046a824a0f6774e203db38bcef1c7af9dc6118932148caa4
|
4
|
+
data.tar.gz: d087a39d4cb3270cd01d8fc77beb0c053a45431867c47570715c09fc0868e856
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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
|
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
|
@@ -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
|
1162
|
-
This means that this
|
1163
|
-
if there is more than one
|
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.
|
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-
|
11
|
+
date: 2023-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|