cocina-models 0.21.0 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rubocop_todo.yml +3 -7
- data/README.md +2 -2
- data/docs/maps/DRO.json +16 -4
- data/docs/schema.json +29 -4
- data/docs/schema.md +2 -1
- data/lib/cocina/models/dro.rb +8 -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: 4da1f34a862366edd3a370ae52e3d9cecb29dc1f1f4938196444db5071870a56
|
|
4
|
+
data.tar.gz: f8a2b7fc4d308bbf884a46b5f2c765f7989f2467a3749742faad34112a5b30d7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b9ade72909e628f07fdbddd8ab673482410e92571897543b2266194ee5c5d060f3efc003dcf1431c0583ee73f6a31a06b1a4b0d93b9e2818b4ec169fb665bffc
|
|
7
|
+
data.tar.gz: fda63f0e397f9f9778e5ae957bc8bd9866038cb82d649f11e09d64d0d89d618878ddac1ade3659b5786ce83ab73605b56fdf874c34212edf2d7d054f5e24ea0d
|
data/.rubocop_todo.yml
CHANGED
|
@@ -1,18 +1,14 @@
|
|
|
1
1
|
# This configuration was generated by
|
|
2
2
|
# `rubocop --auto-gen-config`
|
|
3
|
-
# on 2020-
|
|
3
|
+
# on 2020-02-13 12:54:33 -0500 using RuboCop version 0.79.0.
|
|
4
4
|
# The point is for the user to remove these configuration records
|
|
5
5
|
# one by one as the offenses are removed from the code base.
|
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
|
8
8
|
|
|
9
|
-
# Offense count:
|
|
10
|
-
Metrics/AbcSize:
|
|
11
|
-
Max: 18
|
|
12
|
-
|
|
13
|
-
# Offense count: 2
|
|
9
|
+
# Offense count: 3
|
|
14
10
|
# Configuration parameters: Max.
|
|
15
11
|
RSpec/ExampleLength:
|
|
16
12
|
Exclude:
|
|
17
13
|
- 'spec/cocina/models/dro_spec.rb'
|
|
18
|
-
- 'spec/cocina/models/
|
|
14
|
+
- 'spec/cocina/models/request_dro_spec.rb'
|
data/README.md
CHANGED
|
@@ -22,10 +22,10 @@ cd docs
|
|
|
22
22
|
prmd combine --meta meta.json maps/ > schema.json
|
|
23
23
|
|
|
24
24
|
# Check it’s all good
|
|
25
|
-
|
|
25
|
+
prmd verify schema.json
|
|
26
26
|
|
|
27
27
|
# Build docs
|
|
28
|
-
|
|
28
|
+
prmd doc schema.json > schema.md
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
Then check in the resulting changes to `docs/schema.json` and `docs/schema.md`
|
data/docs/maps/DRO.json
CHANGED
|
@@ -86,10 +86,22 @@
|
|
|
86
86
|
"type": "string",
|
|
87
87
|
"enum": ["world", "stanford", "location-based", "citation-only", "dark"]
|
|
88
88
|
},
|
|
89
|
-
"
|
|
90
|
-
"description": "
|
|
91
|
-
"type": "
|
|
92
|
-
"
|
|
89
|
+
"embargo": {
|
|
90
|
+
"description": "Embargo metadata",
|
|
91
|
+
"type": "object",
|
|
92
|
+
"required": ["releaseDate", "access"],
|
|
93
|
+
"properties": {
|
|
94
|
+
"releaseDate": {
|
|
95
|
+
"description": "Date when the DRO is released from an embargo.",
|
|
96
|
+
"type": "string",
|
|
97
|
+
"format": "date-time"
|
|
98
|
+
},
|
|
99
|
+
"access": {
|
|
100
|
+
"description": "Access level for the DRO when released from embargo.",
|
|
101
|
+
"type": "string",
|
|
102
|
+
"enum": ["world", "stanford", "location-based", "citation-only", "dark"]
|
|
103
|
+
}
|
|
104
|
+
}
|
|
93
105
|
},
|
|
94
106
|
"license": {
|
|
95
107
|
"description": "The license governing reuse of the DRO. Should be an IRI for known licenses (i.e. CC, RightsStatement.org URI, etc.).",
|
data/docs/schema.json
CHANGED
|
@@ -557,12 +557,37 @@
|
|
|
557
557
|
"dark"
|
|
558
558
|
]
|
|
559
559
|
},
|
|
560
|
-
"
|
|
561
|
-
"description": "
|
|
560
|
+
"embargo": {
|
|
561
|
+
"description": "Embargo metadata",
|
|
562
562
|
"type": [
|
|
563
|
-
"
|
|
563
|
+
"object"
|
|
564
564
|
],
|
|
565
|
-
"
|
|
565
|
+
"required": [
|
|
566
|
+
"releaseDate",
|
|
567
|
+
"access"
|
|
568
|
+
],
|
|
569
|
+
"properties": {
|
|
570
|
+
"releaseDate": {
|
|
571
|
+
"description": "Date when the DRO is released from an embargo.",
|
|
572
|
+
"type": [
|
|
573
|
+
"string"
|
|
574
|
+
],
|
|
575
|
+
"format": "date-time"
|
|
576
|
+
},
|
|
577
|
+
"access": {
|
|
578
|
+
"description": "Access level for the DRO when released from embargo.",
|
|
579
|
+
"type": [
|
|
580
|
+
"string"
|
|
581
|
+
],
|
|
582
|
+
"enum": [
|
|
583
|
+
"world",
|
|
584
|
+
"stanford",
|
|
585
|
+
"location-based",
|
|
586
|
+
"citation-only",
|
|
587
|
+
"dark"
|
|
588
|
+
]
|
|
589
|
+
}
|
|
590
|
+
}
|
|
566
591
|
},
|
|
567
592
|
"license": {
|
|
568
593
|
"description": "The license governing reuse of the DRO. Should be an IRI for known licenses (i.e. CC, RightsStatement.org URI, etc.).",
|
data/docs/schema.md
CHANGED
|
@@ -81,7 +81,8 @@ Domain-defined abstraction of a 'work'. Digital Repository Objects' abstraction
|
|
|
81
81
|
| **access:access** | *string* | Access level for the DRO.<br/> **one of:**`"world"` or `"stanford"` or `"location-based"` or `"citation-only"` or `"dark"` | `"world"` |
|
|
82
82
|
| **access:copyright** | *string* | The human readable copyright statement that applies to the DRO. | `"example"` |
|
|
83
83
|
| **access:download** | *string* | Download level for the DRO metadata.<br/> **one of:**`"world"` or `"stanford"` or `"location-based"` or `"citation-only"` or `"dark"` | `"world"` |
|
|
84
|
-
| **access:
|
|
84
|
+
| **access:embargo:access** | *string* | Access level for the DRO when released from embargo.<br/> **one of:**`"world"` or `"stanford"` or `"location-based"` or `"citation-only"` or `"dark"` | `"world"` |
|
|
85
|
+
| **access:embargo:releaseDate** | *date-time* | Date when the DRO is released from an embargo. | `"2015-01-01T12:00:00Z"` |
|
|
85
86
|
| **access:license** | *string* | The license governing reuse of the DRO. Should be an IRI for known licenses (i.e. CC, RightsStatement.org URI, etc.). | `"example"` |
|
|
86
87
|
| **access:reuseAndReproductionStatement** | *string* | The human readable reuse and reproduction statement that applies to the DRO. | `"example"` |
|
|
87
88
|
| **access:termsOfUse** | *string* | License or terms of use governing reuse of the DRO. Should be a text statement. | `"example"` |
|
data/lib/cocina/models/dro.rb
CHANGED
|
@@ -26,7 +26,14 @@ module Cocina
|
|
|
26
26
|
|
|
27
27
|
# Subschema for access concerns
|
|
28
28
|
class Access < Struct
|
|
29
|
-
|
|
29
|
+
# Subschema for embargo concerns
|
|
30
|
+
class Embargo < Struct
|
|
31
|
+
attribute :releaseDate, Types::Params::DateTime
|
|
32
|
+
attribute :access, Types::String.default('dark')
|
|
33
|
+
.enum('world', 'stanford', 'location-based', 'citation-only', 'dark')
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
attribute :embargo, Embargo.optional.default(nil)
|
|
30
37
|
end
|
|
31
38
|
|
|
32
39
|
# Subschema for administrative concerns
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cocina-models
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.22.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Justin Coyne
|
|
@@ -209,7 +209,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
209
209
|
- !ruby/object:Gem::Version
|
|
210
210
|
version: '0'
|
|
211
211
|
requirements: []
|
|
212
|
-
rubygems_version: 3.
|
|
212
|
+
rubygems_version: 3.1.2
|
|
213
213
|
signing_key:
|
|
214
214
|
specification_version: 4
|
|
215
215
|
summary: Data models for the SDR
|