cocina-models 0.91.0 → 0.91.2

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: f7ef9101cd3e5b9e42625b2afbc651919ba5f8e1617d5372324cb950a8f78b23
4
- data.tar.gz: 433c3651004d4f32c380f0cee4b38887fe2ef3bc550436e326af299db01d12b3
3
+ metadata.gz: be675cb9628dfffe8a5e2d7bd804966d80d489498e30ce5106ed30165b8296e5
4
+ data.tar.gz: a7c51082c4c74bcaaab6bd5a433c9063bf8ec50a25ceb445c273dcba74915884
5
5
  SHA512:
6
- metadata.gz: 74cfeeb356d0fd34295010870f2e81c2ef08d9db3c3679ec1b22a8e6f6325bfb62058a23654c024d58a19a59a8b1dd73d611cfec749f2adce2aa6ac938f46c92
7
- data.tar.gz: 906583af0a50b81f26f4c487b3288196f918d116f617c253ce10cc72564e7f459bb1ff422bc0af6def4d222571232fa4e1c52609be82e5226eb4d85f92f1c42c
6
+ metadata.gz: e2bdbb3f395297c0265bc64e10c379f7742c315a62139580c29f84b21adf980a0ad7741b618a2f6102405b36e3040ef374fd12de75942c119d6e9f2d4625d478
7
+ data.tar.gz: ea90f6775f38553cc3c6c2a39b6737788d95afb984a486847150e27da67d542f986afc2d97b14e81d440d3acf785773a74bc1a870b8a4d40e9a5acf97f16b67e
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cocina-models (0.91.0)
4
+ cocina-models (0.91.2)
5
5
  activesupport
6
6
  deprecation
7
7
  dry-struct (~> 1.0)
@@ -125,7 +125,7 @@ GEM
125
125
  parser (>= 3.2.1.0)
126
126
  rubocop-capybara (2.18.0)
127
127
  rubocop (~> 1.41)
128
- rubocop-factory_bot (2.23.1)
128
+ rubocop-factory_bot (2.24.0)
129
129
  rubocop (~> 1.33)
130
130
  rubocop-rake (0.6.0)
131
131
  rubocop (~> 1.0)
@@ -77,7 +77,7 @@ module Cocina
77
77
  write_location(loc)
78
78
  end
79
79
  Array(names).each do |name|
80
- xml.publisher name.value, name_attributes(name)
80
+ xml.publisher name.value, name_attributes(name) if name
81
81
  end
82
82
  Array(notes).each do |note|
83
83
  write_note(note)
@@ -9,14 +9,14 @@ module Cocina
9
9
  # NOTE: H2 is the first case of structured form values we're implementing
10
10
  H2_SOURCE_LABEL = 'Stanford self-deposit resource types'
11
11
  PHYSICAL_DESCRIPTION_TAG = {
12
- 'reformatting quality' => :reformattingQuality,
13
- 'form' => :form,
14
- 'media type' => :internetMediaType,
15
- 'extent' => :extent,
16
- 'digital origin' => :digitalOrigin,
17
- 'media' => :form,
18
12
  'carrier' => :form,
13
+ 'digital origin' => :digitalOrigin,
14
+ 'extent' => :extent,
15
+ 'form' => :form,
19
16
  'material' => :form,
17
+ 'media' => :form,
18
+ 'media type' => :internetMediaType,
19
+ 'reformatting quality' => :reformattingQuality,
20
20
  'technique' => :form
21
21
  }.freeze
22
22
 
@@ -183,10 +183,7 @@ module Cocina
183
183
  attributes = {
184
184
  unit: unit_for(form_value)
185
185
  }.tap do |attrs|
186
- if PHYSICAL_DESCRIPTION_TAG.fetch(form_type) == :form && form_type != 'form'
187
- attrs[:type] =
188
- form_type
189
- end
186
+ attrs[:type] = form_type if PHYSICAL_DESCRIPTION_TAG.fetch(form_type) == :form && form_type != 'form'
190
187
  end.compact
191
188
 
192
189
  xml.public_send PHYSICAL_DESCRIPTION_TAG.fetch(form_type), form_value.value,
@@ -298,7 +298,7 @@ module Cocina
298
298
 
299
299
  def time_range(subject)
300
300
  subject.structuredValue.each do |point|
301
- xml.temporal point.value, point: point.type, encoding: subject.encoding.code
301
+ xml.temporal point.value, point: point.type, encoding: subject.encoding&.code
302
302
  end
303
303
  end
304
304
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Cocina
4
4
  module Models
5
- VERSION = '0.91.0'
5
+ VERSION = '0.91.2'
6
6
  end
7
7
  end
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.91.0
4
+ version: 0.91.2
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-09-11 00:00:00.000000000 Z
11
+ date: 2023-09-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -545,7 +545,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
545
545
  - !ruby/object:Gem::Version
546
546
  version: '0'
547
547
  requirements: []
548
- rubygems_version: 3.3.7
548
+ rubygems_version: 3.4.13
549
549
  signing_key:
550
550
  specification_version: 4
551
551
  summary: Data models for the SDR