cocina-models 0.97.0 → 0.98.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +1 -1
- data/.rubocop.yml +19 -6
- data/Gemfile.lock +28 -24
- data/README.md +35 -30
- data/description_types.yml +4 -0
- data/docs/description_types.md +4 -0
- data/lib/cocina/generator/generator.rb +6 -5
- data/lib/cocina/models/administrative.rb +0 -1
- data/lib/cocina/models/builders/name_title_group_builder.rb +1 -5
- data/lib/cocina/models/mapping/from_mods/admin_metadata.rb +2 -3
- data/lib/cocina/models/mapping/from_mods/event.rb +2 -3
- data/lib/cocina/models/request_administrative.rb +0 -1
- data/lib/cocina/models/utils.rb +15 -0
- data/lib/cocina/models/validatable.rb +1 -1
- data/lib/cocina/models/version.rb +1 -1
- data/openapi.yml +0 -34
- metadata +4 -4
- data/lib/cocina/models/release_tag.rb +0 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ddc2be2ab60d4baa71e5d36e310afb176a649aa60fea3c566650975d4ffe4a6e
|
4
|
+
data.tar.gz: 6a63e80f2dc8f18e69a011c071b83ff8a268e011504cd413b3d4f341a853c5b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 523922282cfcdbb335484dbb2c429561cc60250aa26dd31dbbb6c2823e95966cb5ce6cb00f4dc1c6943f1fb1d1ae1bce18e36c6ba9b0c1b9a44a87a5fa72fcff
|
7
|
+
data.tar.gz: 609e78a360608dcaa8234ccb34621822c61ccec96d28e2c53e5fea4fa38add47655f5ca627627af57b9409e5f106bb17c28b3bbe9aee46a73d51ef0a3e7d4c64
|
data/.circleci/config.yml
CHANGED
data/.rubocop.yml
CHANGED
@@ -303,7 +303,7 @@ RSpec/SubjectDeclaration: # new in 2.5
|
|
303
303
|
Enabled: true
|
304
304
|
FactoryBot/SyntaxMethods: # new in 2.7
|
305
305
|
Enabled: true
|
306
|
-
|
306
|
+
RSpecRails/AvoidSetupHook: # new in 2.4
|
307
307
|
Enabled: true
|
308
308
|
Style/NestedFileDirname: # new in 1.26
|
309
309
|
Enabled: true
|
@@ -343,7 +343,7 @@ RSpec/ChangeByZero: # new in 2.11.0
|
|
343
343
|
Enabled: true
|
344
344
|
Capybara/SpecificMatcher: # new in 2.12
|
345
345
|
Enabled: false
|
346
|
-
|
346
|
+
RSpecRails/HaveHttpStatus: # new in 2.12
|
347
347
|
Enabled: false
|
348
348
|
|
349
349
|
RSpec/ClassCheck: # new in 2.13
|
@@ -394,9 +394,9 @@ FactoryBot/ConsistentParenthesesStyle: # new in 2.14
|
|
394
394
|
Enabled: true
|
395
395
|
FactoryBot/FactoryNameStyle: # new in 2.16
|
396
396
|
Enabled: true
|
397
|
-
|
397
|
+
RSpecRails/InferredSpecType: # new in 2.14
|
398
398
|
Enabled: true
|
399
|
-
|
399
|
+
RSpecRails/MinitestAssertions: # new in 2.17
|
400
400
|
Enabled: true
|
401
401
|
Style/RedundantHeredocDelimiterQuotes: # new in 1.45
|
402
402
|
Enabled: true
|
@@ -411,7 +411,7 @@ RSpec/RedundantAround: # new in 2.19
|
|
411
411
|
Enabled: true
|
412
412
|
RSpec/SkipBlockInsideExample: # new in 2.19
|
413
413
|
Enabled: true
|
414
|
-
|
414
|
+
RSpecRails/TravelAround: # new in 2.19
|
415
415
|
Enabled: true
|
416
416
|
|
417
417
|
Lint/DuplicateMatchPattern: # new in 1.50
|
@@ -457,7 +457,7 @@ Style/YAMLFileRead: # new in 1.53
|
|
457
457
|
Enabled: true
|
458
458
|
RSpec/ReceiveMessages: # new in 2.23
|
459
459
|
Enabled: true
|
460
|
-
|
460
|
+
RSpecRails/NegationBeValid: # new in 2.23
|
461
461
|
Enabled: true
|
462
462
|
|
463
463
|
Lint/ItWithoutArgumentsInBlock: # new in 1.59
|
@@ -498,3 +498,16 @@ RSpec/IsExpectedSpecify: # new in 2.27
|
|
498
498
|
Enabled: true
|
499
499
|
RSpec/RepeatedSubjectCall: # new in 2.27
|
500
500
|
Enabled: true
|
501
|
+
|
502
|
+
Style/MapIntoArray: # new in 1.63
|
503
|
+
Enabled: true
|
504
|
+
Style/SendWithLiteralMethodName: # new in 1.64
|
505
|
+
Enabled: true
|
506
|
+
Style/SuperArguments: # new in 1.64
|
507
|
+
Enabled: true
|
508
|
+
RSpec/EmptyOutput: # new in 2.29
|
509
|
+
Enabled: true
|
510
|
+
RSpec/ExpectInLet: # new in 2.30
|
511
|
+
Enabled: true
|
512
|
+
RSpec/UndescriptiveLiteralsDescription: # new in 2.29
|
513
|
+
Enabled: true
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
cocina-models (0.
|
4
|
+
cocina-models (0.98.1)
|
5
5
|
activesupport
|
6
6
|
deprecation
|
7
7
|
dry-struct (~> 1.0)
|
@@ -20,7 +20,7 @@ PATH
|
|
20
20
|
GEM
|
21
21
|
remote: https://rubygems.org/
|
22
22
|
specs:
|
23
|
-
activesupport (7.1.3.
|
23
|
+
activesupport (7.1.3.4)
|
24
24
|
base64
|
25
25
|
bigdecimal
|
26
26
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
@@ -39,8 +39,9 @@ GEM
|
|
39
39
|
json_schema (~> 0.14, >= 0.14.3)
|
40
40
|
openapi_parser (~> 1.0)
|
41
41
|
rack (>= 1.5)
|
42
|
-
commonmarker (
|
43
|
-
|
42
|
+
commonmarker (1.1.4)
|
43
|
+
rb_sys (~> 0.9)
|
44
|
+
concurrent-ruby (1.3.3)
|
44
45
|
connection_pool (2.4.1)
|
45
46
|
deprecation (1.1.0)
|
46
47
|
activesupport
|
@@ -79,36 +80,38 @@ GEM
|
|
79
80
|
jsonpath (1.1.5)
|
80
81
|
multi_json
|
81
82
|
language_server-protocol (3.17.0.3)
|
82
|
-
mini_portile2 (2.8.
|
83
|
-
minitest (5.
|
83
|
+
mini_portile2 (2.8.7)
|
84
|
+
minitest (5.24.0)
|
84
85
|
multi_json (1.15.0)
|
85
86
|
mutex_m (0.2.0)
|
86
|
-
nokogiri (1.16.
|
87
|
+
nokogiri (1.16.6)
|
87
88
|
mini_portile2 (~> 2.8.2)
|
88
89
|
racc (~> 1.4)
|
89
|
-
openapi3_parser (0.
|
90
|
-
commonmarker (
|
90
|
+
openapi3_parser (0.10.0)
|
91
|
+
commonmarker (>= 1.0)
|
91
92
|
openapi_parser (1.0.0)
|
92
93
|
optimist (3.1.0)
|
93
|
-
parallel (1.
|
94
|
-
parser (3.3.
|
94
|
+
parallel (1.25.1)
|
95
|
+
parser (3.3.3.0)
|
95
96
|
ast (~> 2.4.1)
|
96
97
|
racc
|
97
98
|
patience_diff (1.2.0)
|
98
99
|
optimist (~> 3.0)
|
99
|
-
racc (1.
|
100
|
-
rack (3.
|
100
|
+
racc (1.8.0)
|
101
|
+
rack (3.1.4)
|
101
102
|
rainbow (3.1.1)
|
102
103
|
rake (13.2.1)
|
103
|
-
|
104
|
-
|
104
|
+
rb_sys (0.9.97)
|
105
|
+
regexp_parser (2.9.2)
|
106
|
+
rexml (3.3.0)
|
107
|
+
strscan
|
105
108
|
rspec (3.13.0)
|
106
109
|
rspec-core (~> 3.13.0)
|
107
110
|
rspec-expectations (~> 3.13.0)
|
108
111
|
rspec-mocks (~> 3.13.0)
|
109
112
|
rspec-core (3.13.0)
|
110
113
|
rspec-support (~> 3.13.0)
|
111
|
-
rspec-expectations (3.13.
|
114
|
+
rspec-expectations (3.13.1)
|
112
115
|
diff-lcs (>= 1.2.0, < 2.0)
|
113
116
|
rspec-support (~> 3.13.0)
|
114
117
|
rspec-mocks (3.13.1)
|
@@ -117,7 +120,7 @@ GEM
|
|
117
120
|
rspec-support (3.13.1)
|
118
121
|
rspec_junit_formatter (0.6.0)
|
119
122
|
rspec-core (>= 2, < 4, != 2.12.0)
|
120
|
-
rubocop (1.
|
123
|
+
rubocop (1.64.1)
|
121
124
|
json (~> 2.3)
|
122
125
|
language_server-protocol (>= 3.17.0)
|
123
126
|
parallel (~> 1.10)
|
@@ -130,19 +133,19 @@ GEM
|
|
130
133
|
unicode-display_width (>= 2.4.0, < 3.0)
|
131
134
|
rubocop-ast (1.31.3)
|
132
135
|
parser (>= 3.3.1.0)
|
133
|
-
rubocop-capybara (2.
|
134
|
-
rubocop (~> 1.41)
|
135
|
-
rubocop-factory_bot (2.25.1)
|
136
|
+
rubocop-capybara (2.21.0)
|
136
137
|
rubocop (~> 1.41)
|
138
|
+
rubocop-factory_bot (2.26.1)
|
139
|
+
rubocop (~> 1.61)
|
137
140
|
rubocop-rake (0.6.0)
|
138
141
|
rubocop (~> 1.0)
|
139
|
-
rubocop-rspec (2.
|
142
|
+
rubocop-rspec (2.31.0)
|
140
143
|
rubocop (~> 1.40)
|
141
144
|
rubocop-capybara (~> 2.17)
|
142
145
|
rubocop-factory_bot (~> 2.22)
|
143
146
|
rubocop-rspec_rails (~> 2.28)
|
144
|
-
rubocop-rspec_rails (2.
|
145
|
-
rubocop (~> 1.
|
147
|
+
rubocop-rspec_rails (2.29.1)
|
148
|
+
rubocop (~> 1.61)
|
146
149
|
ruby-progressbar (1.13.0)
|
147
150
|
simplecov (0.22.0)
|
148
151
|
docile (~> 1.1)
|
@@ -150,6 +153,7 @@ GEM
|
|
150
153
|
simplecov_json_formatter (~> 0.1)
|
151
154
|
simplecov-html (0.12.3)
|
152
155
|
simplecov_json_formatter (0.1.4)
|
156
|
+
strscan (3.1.0)
|
153
157
|
super_diff (0.12.1)
|
154
158
|
attr_extras (>= 6.2.4)
|
155
159
|
diff-lcs
|
@@ -158,7 +162,7 @@ GEM
|
|
158
162
|
tzinfo (2.0.6)
|
159
163
|
concurrent-ruby (~> 1.0)
|
160
164
|
unicode-display_width (2.5.0)
|
161
|
-
zeitwerk (2.6.
|
165
|
+
zeitwerk (2.6.16)
|
162
166
|
|
163
167
|
PLATFORMS
|
164
168
|
ruby
|
data/README.md
CHANGED
@@ -53,10 +53,10 @@ Beyond what is necessary to test the generator, the Cocina model classes are not
|
|
53
53
|
|
54
54
|
## Testing validation changes
|
55
55
|
|
56
|
-
If there is a possibility that a model, mapping, or validation change will conflict with some existing objects then [validate-cocina](https://github.com/sul-dlss/dor-services-app/blob/main/bin/validate-cocina) should be used for testing. This must be run on sdr-infra since it requires deploying a branch of cocina-models.
|
56
|
+
If there is a possibility that a model, mapping, or validation change will conflict with some existing objects then [validate-cocina](https://github.com/sul-dlss/dor-services-app/blob/main/bin/validate-cocina) should be used for testing. This must be run on the `sdr-infra` VM since it requires deploying a branch of cocina-models.
|
57
57
|
|
58
58
|
1. Create a cocina-models branch containing the proposed change and push to GitHub.
|
59
|
-
2. On sdr-infra, check out `main`, update the `Gemfile` so that cocina-models references the branch, and `bundle install`.
|
59
|
+
2. On the `sdr-infra` VM, while logged in as the `deploy` user, check out `main`, update the `Gemfile` so that cocina-models references the branch, and `bundle install`.
|
60
60
|
3. Select the appropriate environment vars below - they are set to values in puppet. (first 2 lines are the same; last two lines use different variables)
|
61
61
|
|
62
62
|
For QA:
|
@@ -94,33 +94,30 @@ RAILS_ENV=production bin/validate-cocina -p 8
|
|
94
94
|
|
95
95
|
Custom reports stored in dor-services-app can be run similarly to validation testing described above.
|
96
96
|
|
97
|
-
1.
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
```
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
```
|
122
|
-
scp deploy@sdr-infra:/opt/app/deploy/dor-services-app/BadIso8601Dates.csv BadIso8601Dates.csv
|
123
|
-
```
|
97
|
+
1. Connect to the `sdr-infra` box:
|
98
|
+
```shell
|
99
|
+
ssh sdr-infra
|
100
|
+
```
|
101
|
+
1. Start a shell as the `deploy` user:
|
102
|
+
```shell
|
103
|
+
# you may or may not need to supply the `-n SUNETID` argument
|
104
|
+
ksu deploy
|
105
|
+
```
|
106
|
+
1. Go to the `~/dor-services-app` directory and reset to main if needed (verify nobody else is using this first though):
|
107
|
+
```shell
|
108
|
+
cd ~/dor-services-app
|
109
|
+
git status # see if there are any unsaved changes, if so, you may need to git stash them
|
110
|
+
git pull # OR git reset --hard main to just ditch any local unsaved changes
|
111
|
+
```
|
112
|
+
1. Connect to the desired database by setting the environment variables as described in the section above. This must be done each time you SSH back into the box to run a new report.
|
113
|
+
1. Run the report (good idea to do it in a screen or via background process in case you get disconnected):
|
114
|
+
```shell
|
115
|
+
bundle exec bin/rails r -e production "BadIso8601Dates.report" > BadIso8601Dates.csv
|
116
|
+
```
|
117
|
+
1. When done, you can pull the report to your laptop as needed:
|
118
|
+
```shell
|
119
|
+
scp sdr-infra:/opt/app/deploy/dor-services-app/BadIso8601Dates.csv .
|
120
|
+
```
|
124
121
|
|
125
122
|
## Releasing a patch change
|
126
123
|
A patch change is a change that (1) does not affect the data model; (2) does not alter the openapi.yml; and more broadly (3) does not matter if some applications have the change and others do not.
|
@@ -129,6 +126,14 @@ A patch change can be released as part of regular dependency updates or selectiv
|
|
129
126
|
|
130
127
|
## Releasing major or minor change
|
131
128
|
|
129
|
+
NOTE: If dependency updates are about to be released, you have the option of shortening the process and stopping after Step 3. This is because Steps 4 onwards will be taken care of by the regular dependency updates process (basically the updating of cocina-models, dor-services-client and sdr-client as needed in the rest of the associated apps). You still do need to manually bump some gems and the pinned version of cocina-models in a couple apps and get those PRs approved and merged, as described in Steps 1-3 below.
|
130
|
+
|
131
|
+
IMPORTANT: If you do opt to skip steps 4 onward, you should NOT merge the cocina-models bump dor-services-app and sdr-api PRs you created in step 3 until you are ready to finish the dependency updates process. You can have them reviewed and approved, but if you merge, you will greatly increase the risk of issues if the main branch of DSA or sdr-api are deployed after steps 1-3 are complete but before the rest of the apps are updated to use the new cocina-models via regular dependency updates. The fix for this is to either roll-back DSA and sdr-api to the previous release tag, or proceed forwards with step 4-5.
|
132
|
+
|
133
|
+
Before you release a major or minor change, think about if this release will include new validations. Even if your change didn't make any changes that would affect validation, there may be other unreleased changes since the previous version of the gem was cut and released. Best practice is to scan back through the commit history until you get to the last version bump and see if there any significant changes that may affect validation.
|
134
|
+
|
135
|
+
If unsure, ask the team or ask for help to just run the validation report anyway (as described above).
|
136
|
+
|
132
137
|
### Step 0: Share intent to change the models
|
133
138
|
|
134
139
|
Send a note to `#dlss-infra-chg-mgmt` on Slack to let people know what is changing and when.
|
@@ -164,7 +169,7 @@ This can be accomplished by copying and pasting the cocina-models schemas to the
|
|
164
169
|
|
165
170
|
If step 3A was needed, use the same PRs to also bump the versions of cocina-models, sdr-client, and dor-services-client in these applications/services. Why? When [dor-services-app](https://github.com/sul-dlss/dor-services-app), for example, is updated to use the new models (via the auto-update script), these clients should be updated at the same time or there is risk of models produced by dor-services-app not being acceptable to the clients.
|
166
171
|
|
167
|
-
With or without step 3A, perform `bundle update` for cocina-models, sdr-client, and dor-services-client gems in the listed services and then make PRs for those repos. You may need to update how these gems are pinned in the `Gemfile` in order to bump them.
|
172
|
+
With or without step 3A, perform `bundle update` for cocina-models, sdr-client, and dor-services-client gems in the listed services and then make PRs for those repos. You may first need to update how these gems are pinned in the `Gemfile` in order to bump them. Note that dor-services-app only needs a bump to cocina-models gem and sdr-api only needs a bump to cocina-models and dor-services-client gems.
|
168
173
|
|
169
174
|
#### Step 3C: Merge 'em
|
170
175
|
|
data/description_types.yml
CHANGED
@@ -344,6 +344,8 @@ identifier:
|
|
344
344
|
code: ark
|
345
345
|
- value: arXiv
|
346
346
|
code: arxiv
|
347
|
+
- value: Bates range
|
348
|
+
description: Used in law, medicine, and business for documents as they are scanned or processed, such as for pretrial discovery.
|
347
349
|
- value: case identifier
|
348
350
|
- value: case number
|
349
351
|
- value: CCP
|
@@ -357,6 +359,8 @@ identifier:
|
|
357
359
|
code: doi
|
358
360
|
- value: druid
|
359
361
|
- value: EUR-OP
|
362
|
+
- value: filing number
|
363
|
+
description: Used when placing a paper in the official custody of the clerk of court to enter into the case records.
|
360
364
|
- value: FOLIO
|
361
365
|
description: FOLIO HRID for the source record of the metadata.
|
362
366
|
- value: GTIN-14 ID
|
data/docs/description_types.md
CHANGED
@@ -352,6 +352,8 @@ _Path: identifier.type_
|
|
352
352
|
* Apis ID
|
353
353
|
* ARK
|
354
354
|
* arXiv
|
355
|
+
* Bates range
|
356
|
+
* Used in law, medicine, and business for documents as they are scanned or processed, such as for pretrial discovery.
|
355
357
|
* case identifier
|
356
358
|
* case number
|
357
359
|
* CCP
|
@@ -364,6 +366,8 @@ _Path: identifier.type_
|
|
364
366
|
* DOI
|
365
367
|
* druid
|
366
368
|
* EUR-OP
|
369
|
+
* filing number
|
370
|
+
* Used when placing a paper in the official custody of the clerk of court to enter into the case records.
|
367
371
|
* FOLIO
|
368
372
|
* FOLIO HRID for the source record of the metadata.
|
369
373
|
* GTIN-14 ID
|
@@ -127,11 +127,12 @@ module Cocina
|
|
127
127
|
run("rubocop -a #{filepaths.join(' ')} > /dev/null")
|
128
128
|
end
|
129
129
|
|
130
|
-
NO_CLEAN = [
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
130
|
+
NO_CLEAN = %w[
|
131
|
+
checkable.rb
|
132
|
+
utils.rb
|
133
|
+
validatable.rb
|
134
|
+
version.rb
|
135
|
+
vocabulary.rb
|
135
136
|
].freeze
|
136
137
|
|
137
138
|
def clean_output
|
@@ -71,11 +71,7 @@ module Cocina
|
|
71
71
|
def self.contributor_name_value_slices(contributor)
|
72
72
|
return if contributor&.name.blank?
|
73
73
|
|
74
|
-
|
75
|
-
Array(contributor.name).each do |contrib_name|
|
76
|
-
slices << value_slices(contrib_name)
|
77
|
-
end
|
78
|
-
slices.flatten
|
74
|
+
Array(contributor.name).map { |contrib_name| value_slices(contrib_name) }.flatten
|
79
75
|
end
|
80
76
|
|
81
77
|
# @params [Cocina::Models::DescriptiveValue] desc_value
|
@@ -196,9 +196,8 @@ module Cocina
|
|
196
196
|
end
|
197
197
|
|
198
198
|
def build_date_values(origin_info_node)
|
199
|
-
date_values =
|
200
|
-
|
201
|
-
date_values << build_date_desc_values(mods_el_name, origin_info_node, cocina_type)
|
199
|
+
date_values = DATE_ELEMENTS_2_TYPE.map do |mods_el_name, cocina_type|
|
200
|
+
build_date_desc_values(mods_el_name, origin_info_node, cocina_type)
|
202
201
|
end
|
203
202
|
date_values.flatten.compact
|
204
203
|
end
|
@@ -5,7 +5,6 @@ module Cocina
|
|
5
5
|
class RequestAdministrative < Struct
|
6
6
|
# example: druid:bc123df4567
|
7
7
|
attribute :hasAdminPolicy, Druid
|
8
|
-
attribute :releaseTags, Types::Strict::Array.of(ReleaseTag).default([].freeze)
|
9
8
|
# Internal project this resource is a part of. This governs routing of messages about this object.
|
10
9
|
# example: Google Books
|
11
10
|
attribute? :partOfProject, Types::Strict::String
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Cocina
|
4
|
+
module Models
|
5
|
+
module Utils
|
6
|
+
# @param [Cocina::Models::Dro] dro
|
7
|
+
# @param [Array<Cocina::Models::File>]
|
8
|
+
def self.files(dro)
|
9
|
+
dro.structural.contains.flat_map do |fileset|
|
10
|
+
fileset.structural.contains
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
data/openapi.yml
CHANGED
@@ -229,11 +229,6 @@ components:
|
|
229
229
|
properties:
|
230
230
|
hasAdminPolicy:
|
231
231
|
$ref: '#/components/schemas/Druid'
|
232
|
-
releaseTags:
|
233
|
-
description: Tags for release
|
234
|
-
type: array
|
235
|
-
items:
|
236
|
-
$ref: '#/components/schemas/ReleaseTag'
|
237
232
|
required:
|
238
233
|
- hasAdminPolicy
|
239
234
|
AdminPolicyAccessTemplate:
|
@@ -1528,35 +1523,6 @@ components:
|
|
1528
1523
|
valueAt:
|
1529
1524
|
description: URL or other pointer to the location of the related resource information.
|
1530
1525
|
type: string
|
1531
|
-
ReleaseTag:
|
1532
|
-
description: A tag that indicates the item or collection should be released.
|
1533
|
-
type: object
|
1534
|
-
additionalProperties: false
|
1535
|
-
required:
|
1536
|
-
- release
|
1537
|
-
- what
|
1538
|
-
properties:
|
1539
|
-
who:
|
1540
|
-
description: Who did this release
|
1541
|
-
type: string
|
1542
|
-
example: petucket
|
1543
|
-
what:
|
1544
|
-
description: What is being released. This item or the whole collection.
|
1545
|
-
type: string
|
1546
|
-
enum:
|
1547
|
-
- self
|
1548
|
-
- collection
|
1549
|
-
example: self
|
1550
|
-
date:
|
1551
|
-
description: When did this action happen
|
1552
|
-
type: string
|
1553
|
-
format: date-time
|
1554
|
-
to:
|
1555
|
-
description: What platform is it released to
|
1556
|
-
type: string
|
1557
|
-
example: Searchworks
|
1558
|
-
release:
|
1559
|
-
type: boolean
|
1560
1526
|
RequestAdminPolicy:
|
1561
1527
|
description: Same as an AdminPolicy, but doesn't have an externalIdentifier as one will be created
|
1562
1528
|
type: object
|
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.
|
4
|
+
version: 0.98.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: 2024-
|
11
|
+
date: 2024-06-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -491,7 +491,6 @@ files:
|
|
491
491
|
- lib/cocina/models/presentation.rb
|
492
492
|
- lib/cocina/models/purl.rb
|
493
493
|
- lib/cocina/models/related_resource.rb
|
494
|
-
- lib/cocina/models/release_tag.rb
|
495
494
|
- lib/cocina/models/request_admin_policy.rb
|
496
495
|
- lib/cocina/models/request_administrative.rb
|
497
496
|
- lib/cocina/models/request_collection.rb
|
@@ -511,6 +510,7 @@ files:
|
|
511
510
|
- lib/cocina/models/symphony_catalog_link.rb
|
512
511
|
- lib/cocina/models/title.rb
|
513
512
|
- lib/cocina/models/use_and_reproduction_statement.rb
|
513
|
+
- lib/cocina/models/utils.rb
|
514
514
|
- lib/cocina/models/validatable.rb
|
515
515
|
- lib/cocina/models/validators/associated_name_validator.rb
|
516
516
|
- lib/cocina/models/validators/catalog_links_validator.rb
|
@@ -549,7 +549,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
549
549
|
- !ruby/object:Gem::Version
|
550
550
|
version: '0'
|
551
551
|
requirements: []
|
552
|
-
rubygems_version: 3.
|
552
|
+
rubygems_version: 3.4.19
|
553
553
|
signing_key:
|
554
554
|
specification_version: 4
|
555
555
|
summary: Data models for the SDR
|
@@ -1,21 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Cocina
|
4
|
-
module Models
|
5
|
-
# A tag that indicates the item or collection should be released.
|
6
|
-
class ReleaseTag < Struct
|
7
|
-
# Who did this release
|
8
|
-
# example: petucket
|
9
|
-
attribute? :who, Types::Strict::String
|
10
|
-
# What is being released. This item or the whole collection.
|
11
|
-
# example: self
|
12
|
-
attribute :what, Types::Strict::String.enum('self', 'collection')
|
13
|
-
# When did this action happen
|
14
|
-
attribute? :date, Types::Params::DateTime
|
15
|
-
# What platform is it released to
|
16
|
-
# example: Searchworks
|
17
|
-
attribute? :to, Types::Strict::String
|
18
|
-
attribute :release, Types::Strict::Bool.default(false)
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|