cocina-models 0.108.1 → 0.108.2
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/Gemfile.lock +11 -11
- data/lib/cocina/models/mapping/from_mods/form.rb +23 -0
- data/lib/cocina/models/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 591a295c29fd91ae7619a635403d6e1c0dcc0aca4b329f62e12f0f9eb10399e7
|
|
4
|
+
data.tar.gz: 971731836904292e3db7a54122823476a74e44dbc3eef67230fa4382f51c73d8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 50802b14fd29c231c0c883b03820ebf2be0cec2cd72ecc6992f35205821253dd84582383a19d2895e5df5db2bc7d17eabc317f9c2308a77e1cb75d1697eff352
|
|
7
|
+
data.tar.gz: 9abf3d779130d8eef574e995c382aedba1e592eb04db04a14fc57df939946fc099857137c786b06d2e5a8db9b801946b7f1b6016af6ca9d235699a539b96d16c
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
cocina-models (0.108.
|
|
4
|
+
cocina-models (0.108.2)
|
|
5
5
|
activesupport
|
|
6
6
|
deprecation
|
|
7
7
|
dry-struct (~> 1.0)
|
|
@@ -19,7 +19,7 @@ PATH
|
|
|
19
19
|
GEM
|
|
20
20
|
remote: https://rubygems.org/
|
|
21
21
|
specs:
|
|
22
|
-
activesupport (8.1.
|
|
22
|
+
activesupport (8.1.1)
|
|
23
23
|
base64
|
|
24
24
|
bigdecimal
|
|
25
25
|
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
@@ -42,7 +42,7 @@ GEM
|
|
|
42
42
|
rack (>= 1.5)
|
|
43
43
|
concurrent-ruby (1.3.5)
|
|
44
44
|
connection_pool (2.5.4)
|
|
45
|
-
date (3.
|
|
45
|
+
date (3.5.0)
|
|
46
46
|
debug (1.11.0)
|
|
47
47
|
irb (~> 1.10)
|
|
48
48
|
reline (>= 0.3.8)
|
|
@@ -77,12 +77,12 @@ GEM
|
|
|
77
77
|
activesupport (>= 3.0, < 9.0)
|
|
78
78
|
equivalent-xml (0.6.0)
|
|
79
79
|
nokogiri (>= 1.4.3)
|
|
80
|
-
erb (5.1.
|
|
80
|
+
erb (5.1.3)
|
|
81
81
|
i18n (1.14.7)
|
|
82
82
|
concurrent-ruby (~> 1.0)
|
|
83
83
|
ice_nine (0.11.2)
|
|
84
84
|
io-console (0.8.1)
|
|
85
|
-
irb (1.15.
|
|
85
|
+
irb (1.15.3)
|
|
86
86
|
pp (>= 0.6.0)
|
|
87
87
|
rdoc (>= 4.0.0)
|
|
88
88
|
reline (>= 0.4.2)
|
|
@@ -115,10 +115,10 @@ GEM
|
|
|
115
115
|
date
|
|
116
116
|
stringio
|
|
117
117
|
racc (1.8.1)
|
|
118
|
-
rack (3.2.
|
|
118
|
+
rack (3.2.4)
|
|
119
119
|
rainbow (3.1.1)
|
|
120
|
-
rake (13.3.
|
|
121
|
-
rdoc (6.15.
|
|
120
|
+
rake (13.3.1)
|
|
121
|
+
rdoc (6.15.1)
|
|
122
122
|
erb
|
|
123
123
|
psych (>= 4.0.0)
|
|
124
124
|
tsort
|
|
@@ -134,13 +134,13 @@ GEM
|
|
|
134
134
|
rspec-expectations (3.13.5)
|
|
135
135
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
136
136
|
rspec-support (~> 3.13.0)
|
|
137
|
-
rspec-mocks (3.13.
|
|
137
|
+
rspec-mocks (3.13.7)
|
|
138
138
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
139
139
|
rspec-support (~> 3.13.0)
|
|
140
140
|
rspec-support (3.13.6)
|
|
141
141
|
rspec_junit_formatter (0.6.0)
|
|
142
142
|
rspec-core (>= 2, < 4, != 2.12.0)
|
|
143
|
-
rubocop (1.81.
|
|
143
|
+
rubocop (1.81.7)
|
|
144
144
|
json (~> 2.3)
|
|
145
145
|
language_server-protocol (~> 3.17.0.2)
|
|
146
146
|
lint_roller (~> 1.1.0)
|
|
@@ -180,7 +180,7 @@ GEM
|
|
|
180
180
|
unicode-display_width (3.2.0)
|
|
181
181
|
unicode-emoji (~> 4.1)
|
|
182
182
|
unicode-emoji (4.1.0)
|
|
183
|
-
uri (1.0
|
|
183
|
+
uri (1.1.0)
|
|
184
184
|
zeitwerk (2.7.3)
|
|
185
185
|
|
|
186
186
|
PLATFORMS
|
|
@@ -29,6 +29,7 @@ module Cocina
|
|
|
29
29
|
add_types(forms)
|
|
30
30
|
add_physical_descriptions(forms)
|
|
31
31
|
add_subject_cartographics(forms)
|
|
32
|
+
add_etd_resource_type(forms)
|
|
32
33
|
Primary.adjust(forms, 'genre', notifier, match_type: true)
|
|
33
34
|
Primary.adjust(forms, 'resource type', notifier, match_type: true)
|
|
34
35
|
end
|
|
@@ -187,6 +188,28 @@ module Cocina
|
|
|
187
188
|
end
|
|
188
189
|
end
|
|
189
190
|
|
|
191
|
+
def add_etd_resource_type(forms)
|
|
192
|
+
thesis_node = resource_element.xpath('mods:note[@type="thesis"]', mods: Description::DESC_METADATA_NS).first
|
|
193
|
+
return unless thesis_node
|
|
194
|
+
|
|
195
|
+
doi_node = resource_element.xpath('mods:identifier[@type="doi"]', mods: Description::DESC_METADATA_NS).first
|
|
196
|
+
return unless doi_node
|
|
197
|
+
|
|
198
|
+
forms.push({
|
|
199
|
+
source: {
|
|
200
|
+
value: 'DataCite resource types'
|
|
201
|
+
},
|
|
202
|
+
type: 'resource type',
|
|
203
|
+
value: 'Dissertation'
|
|
204
|
+
}, {
|
|
205
|
+
source: {
|
|
206
|
+
value: 'Stanford self-deposit resource types'
|
|
207
|
+
},
|
|
208
|
+
type: 'resource type',
|
|
209
|
+
structuredValue: [{ type: 'subtype', value: 'Academic thesis' }]
|
|
210
|
+
})
|
|
211
|
+
end
|
|
212
|
+
|
|
190
213
|
def manuscript_form
|
|
191
214
|
{
|
|
192
215
|
value: 'manuscript',
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cocina-models
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.108.
|
|
4
|
+
version: 0.108.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Justin Coyne
|
|
8
8
|
bindir: exe
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date:
|
|
10
|
+
date: 2025-11-06 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: activesupport
|
|
@@ -537,7 +537,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
537
537
|
- !ruby/object:Gem::Version
|
|
538
538
|
version: '0'
|
|
539
539
|
requirements: []
|
|
540
|
-
rubygems_version: 3.
|
|
540
|
+
rubygems_version: 3.6.2
|
|
541
541
|
specification_version: 4
|
|
542
542
|
summary: Data models for the SDR
|
|
543
543
|
test_files: []
|