cocina-models 0.84.5 → 0.86.0

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: f88398655e31aa97ffb0ac963a0400dd2864535dd10819d53b57efecfeb6359f
4
- data.tar.gz: 89e6074e7ba0c38db6db81e00263f84fc579fa039615d1f6be1b52ec32daff4b
3
+ metadata.gz: 15d31900b286fa2945fbbb10a957cdb71aadc1b7f3f4a0463a9ab04ac5d181d5
4
+ data.tar.gz: d1ee89eec766056327f8999bff0ae9c15d908b4d75338d98c6ab427c5a8c5ef8
5
5
  SHA512:
6
- metadata.gz: 88d62e72d63ac8f5760f7ada91f7052c15ae0572f49c96ff601f4bc8f76db481015e48b910840cb862fe3bad80e91932172d6b7fe1e45bb62112dcf3613089be
7
- data.tar.gz: c3164b24d4184f9fe10a3d4b2a0bbf58881fc63bf7237f46a01065a70f4b9d1315d8ea982c1dde2bbec4c8bff327b15c857c666596575da3ce6e8bc58bcb8648
6
+ metadata.gz: 7dafbf718bf85eecf60c896342e88b94381055b8b39f729eecfc3117d5e632c70763e4630d358e09e7477b235f3bc007321884fa0ac7930f663b9dbcc25ac112
7
+ data.tar.gz: b1c7a624ecdb052f1273b0aa1bc9267c046bab1b25b32e79ad4a9c7dc18da60b426cc334a1f2d36c64c9b45682589929343b9b6b872b02ba4b1538937bafd5b1
data/.rubocop.yml CHANGED
@@ -6,8 +6,7 @@ require:
6
6
  - rubocop-rake
7
7
 
8
8
  AllCops:
9
- # dor-services-app is stuck at ruby 2 until we get off Fedora3
10
- TargetRubyVersion: 2.7
9
+ TargetRubyVersion: 3.0
11
10
 
12
11
  # ----- Layout ------
13
12
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cocina-models (0.84.5)
4
+ cocina-models (0.86.0)
5
5
  activesupport
6
6
  deprecation
7
7
  dry-struct (~> 1.0)
@@ -32,13 +32,13 @@ GEM
32
32
  json_schema (~> 0.14, >= 0.14.3)
33
33
  openapi_parser (>= 0.11.1, < 1.0)
34
34
  rack (>= 1.5)
35
- commonmarker (0.23.5)
35
+ commonmarker (0.23.6)
36
36
  concurrent-ruby (1.1.10)
37
37
  deprecation (1.1.0)
38
38
  activesupport
39
39
  diff-lcs (1.5.0)
40
40
  docile (1.4.0)
41
- dry-container (0.10.1)
41
+ dry-container (0.11.0)
42
42
  concurrent-ruby (~> 1.0)
43
43
  dry-core (0.8.1)
44
44
  concurrent-ruby (~> 1.0)
@@ -100,7 +100,7 @@ GEM
100
100
  rspec-mocks (3.11.1)
101
101
  diff-lcs (>= 1.2.0, < 2.0)
102
102
  rspec-support (~> 3.11.0)
103
- rspec-support (3.11.0)
103
+ rspec-support (3.11.1)
104
104
  rspec_junit_formatter (0.5.1)
105
105
  rspec-core (>= 2, < 4, != 2.12.0)
106
106
  rss (0.2.9)
@@ -119,7 +119,7 @@ GEM
119
119
  parser (>= 3.1.1.0)
120
120
  rubocop-rake (0.6.0)
121
121
  rubocop (~> 1.0)
122
- rubocop-rspec (2.13.1)
122
+ rubocop-rspec (2.13.2)
123
123
  rubocop (~> 1.33)
124
124
  ruby-progressbar (1.11.0)
125
125
  simplecov (0.21.2)
@@ -135,7 +135,7 @@ GEM
135
135
  thor (1.2.1)
136
136
  tzinfo (2.0.5)
137
137
  concurrent-ruby (~> 1.0)
138
- unicode-display_width (2.2.0)
138
+ unicode-display_width (2.3.0)
139
139
  zeitwerk (2.6.0)
140
140
 
141
141
  PLATFORMS
data/README.md CHANGED
@@ -136,24 +136,34 @@ which pushes the gem to rubygems.org. Next write up the release notes: https://
136
136
 
137
137
  ### Step 2: Update client gems coupled to the models
138
138
 
139
- **NOTE**: You can skip this step if the new release is a patch-level bump only.
139
+ **NOTE**: You may skip this step if the new release is a patch-level bump only, as the client gems are pinned to a minor release of cocina-models. However, a PR to update Gemfile.lock with the new cocina-models version is welcome ... and not a blocker.
140
140
 
141
- Next, you should release versions of [sdr-client](https://github.com/sul-dlss/sdr-client) and [dor-services-client](https://github.com/sul-dlss/dor-services-client/) pinned to this version because applications such as [Argo](https://github.com/sul-dlss/argo) depend on both of these gems using the same models.
141
+ If this is a minor or major cocina-models version change, release new versions of [sdr-client](https://github.com/sul-dlss/sdr-client) and [dor-services-client](https://github.com/sul-dlss/dor-services-client/) pinned to use the new cocina-models version because applications such as [Argo](https://github.com/sul-dlss/argo) depend on both of these gems using the same models.
142
142
 
143
- ### Step 3: Update service API specifications and gems
143
+ ### Step 3: Update services directly coupled to the models
144
144
 
145
- **NOTE**: You can skip this first half of the step if there have not been any changes to the `cocina-models` OpenAPI spec since the prior release.
146
-
147
- The cocina-models gem is used in applications that have an API specification that accepts Cocina models. Next, make sure that the `openapi.yml` for these applications include the `openapi.yml` schema changes made in cocina-models. This list of services is known to include:
145
+ This list of services is known to include:
148
146
 
149
147
  * [sul-dlss/sdr-api](https://github.com/sul-dlss/sdr-api)
150
148
  * [sul-dlss/dor-services-app](https://github.com/sul-dlss/dor-services-app/)
151
149
 
152
- This can be accomplished by copying and pasting these schemas. By convention, these schemas are listed first in the `openapi.yml` of the associated projects, followed by the application-specific schemas.
150
+ **NOTE**: You can skip step 3A if there have not been any changes to the `cocina-models` OpenAPI spec since the prior release.
151
+
152
+ #### Step 3A: Update API specifications
153
+
154
+ The cocina-models gem is used in applications that have an API specification that accepts Cocina models. Make sure that the `openapi.yml` for these applications include the `openapi.yml` schema changes made in cocina-models.
155
+
156
+ This can be accomplished by copying and pasting the cocina-models schemas to the openapi.yml of the associated project. By convention, these schemas are listed first in the `openapi.yml` of the associated projects, followed by the application-specific schemas.
157
+
158
+ #### Step 3B: Bump gems and create the PRs
159
+
160
+ 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.
161
+
162
+ 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.
153
163
 
154
- #### Step 3b: Bump gems
164
+ #### Step 3C: Merge 'em
155
165
 
156
- At the same, we have found it convenient to use these 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
+ Get the directly coupled services PRs merged before the deploy in step 5.
157
167
 
158
168
  ### Step 4: Update other dependent applications
159
169
 
@@ -161,19 +171,19 @@ Once the above listed steps have been completed, all applications that use cocin
161
171
 
162
172
  There are scripts to help with updating other dependent applications:
163
173
 
164
- #### Step 4A: Create the PRs
174
+ #### Step 4A: Create the Cocina Level 2 PRs
165
175
 
166
176
  There is a Jenkins CI job that you can run manually to create all the PRs you need. Head to https://sul-ci-prod.stanford.edu/job/SUL-DLSS/job/access-update-scripts/job/cocina-level2-updates/ and then click `Build Now`. Click the new build that is created and then `Console Output` to watch the build. Once it has completed, you can proceed with the next step.
167
177
 
168
178
  If for some reason the above method does not work, the sul-dlss/access-update-scripts repo has a script for this: `cocina_level2_prs.rb`. You will need a github access token with scopes of "read:org" and "repo" (see https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) to run it, as noted in the comments at the top of that script.
169
179
 
170
- #### Step 4B: Merge the PRs
180
+ #### Step 4B: Merge the Cocina Level 2 PRs
171
181
 
172
182
  [sul-dlss/access-update-scripts](https://github.com/sul-dlss/access-update-scripts) has a switch in the `merge-all.rb` script for this, as noted in the comments at the top of that script. (`REPOS_PATH=infrastructure GH_ACCESS_TOKEN=abc123 COCINA_LEVEL2= ./merge-all.rb`)
173
183
 
174
184
  ### Step 5: Deploy all affected applications together
175
185
 
176
- [sul-dlss/sdr-deploy](https://github.com/sul-dlss/sdr-deploy) has a flag in the deploy script to limit deploys to cocina dependent applications. Refer to instructions in the [sdr-deploy/README](https://github.com/sul-dlss/sdr-deploy/blob/main/README.md#only-deploy-repos-related-to-cocina-models-update).
186
+ [sul-dlss/sdr-deploy](https://github.com/sul-dlss/sdr-deploy) has a flag (-c) in the deploy script to limit deploys to cocina dependent applications. Refer to instructions in the [sdr-deploy/README](https://github.com/sul-dlss/sdr-deploy/blob/main/README.md#only-deploy-repos-related-to-cocina-models-update).
177
187
 
178
188
  Note that running the integration tests is currently the best way we have to check for unintended effects and/or bugs when rolling out cocina-models changes.
179
189
 
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
22
22
  spec.bindir = 'exe'
23
23
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
24
24
  spec.require_paths = ['lib']
25
- spec.required_ruby_version = '>= 2.7'
25
+ spec.required_ruby_version = '>= 3.0'
26
26
 
27
27
  spec.add_dependency 'activesupport'
28
28
  spec.add_dependency 'deprecation'
@@ -6,9 +6,9 @@ module Cocina
6
6
  module ToMods
7
7
  # Maps geo extension from cocina to MODS
8
8
  class Geographic # rubocop:disable Metrics/ClassLength
9
- TYPE_REGEX = /^type$/.freeze
10
- MEDIA_REGEX = /^media type$/.freeze
11
- DATA_FORMAT_REGEX = /^data format$/.freeze
9
+ TYPE_REGEX = /^type$/
10
+ MEDIA_REGEX = /^media type$/
11
+ DATA_FORMAT_REGEX = /^data format$/
12
12
 
13
13
  ABOUT_URI_PREFIX = 'http://purl.stanford.edu/'
14
14
 
@@ -12,7 +12,7 @@ module Cocina
12
12
  'genre' => :genre,
13
13
  'occupation' => :occupation
14
14
  }.freeze
15
- DEORDINAL_REGEX = /(?<=[0-9])(?:st|nd|rd|th)/.freeze
15
+ DEORDINAL_REGEX = /(?<=[0-9])(?:st|nd|rd|th)/
16
16
 
17
17
  # @params [Nokogiri::XML::Builder] xml
18
18
  # @params [Array<Cocina::Models::DescriptiveValue>] subjects
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Cocina
4
4
  module Models
5
- VERSION = '0.84.5'
5
+ VERSION = '0.86.0'
6
6
  end
7
7
  end
data/openapi.yml CHANGED
@@ -1459,7 +1459,7 @@ components:
1459
1459
  description: Width in pixels
1460
1460
  type: integer
1461
1461
  Purl:
1462
- description: Stanford persistent URL associated with the related resource. Note this is http, not https.
1462
+ description: Stanford persistent URL associated with the related resource.
1463
1463
  type: string
1464
1464
  format: uri
1465
1465
  # Canonical URI is https
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.84.5
4
+ version: 0.86.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Coyne
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-09-14 00:00:00.000000000 Z
11
+ date: 2022-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -531,7 +531,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
531
531
  requirements:
532
532
  - - ">="
533
533
  - !ruby/object:Gem::Version
534
- version: '2.7'
534
+ version: '3.0'
535
535
  required_rubygems_version: !ruby/object:Gem::Requirement
536
536
  requirements:
537
537
  - - ">="