cocina-models 0.84.3 → 0.84.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: aab0f71139e7186ac04a7f2132ae54dc4c90986fa8a5d96d1b827469502df1a1
4
- data.tar.gz: dc0014735d2b42cf8031540677aa64a8a8fb975a20b5e7e3c895a699a2ec6c49
3
+ metadata.gz: f88398655e31aa97ffb0ac963a0400dd2864535dd10819d53b57efecfeb6359f
4
+ data.tar.gz: 89e6074e7ba0c38db6db81e00263f84fc579fa039615d1f6be1b52ec32daff4b
5
5
  SHA512:
6
- metadata.gz: b6aec7701fad871d5d10403ef0af0fa6b786f4ec97f01f3bd5021943e34071c4c253a5569f129cdc804556180cbbf19f862bc8edad5842abf1bad4b9f9c9b2c3
7
- data.tar.gz: d8584408d94f5698c1c55e2477583c95079c20447e59f5a6361a481a71c8ae9d2cee475002a5ca3ee2eb4532e75afcb01a94a87500b85618a34072e273151b57
6
+ metadata.gz: 88d62e72d63ac8f5760f7ada91f7052c15ae0572f49c96ff601f4bc8f76db481015e48b910840cb862fe3bad80e91932172d6b7fe1e45bb62112dcf3613089be
7
+ data.tar.gz: c3164b24d4184f9fe10a3d4b2a0bbf58881fc63bf7237f46a01065a70f4b9d1315d8ea982c1dde2bbec4c8bff327b15c857c666596575da3ce6e8bc58bcb8648
data/.rubocop.yml CHANGED
@@ -336,3 +336,10 @@ RSpec/Capybara/SpecificMatcher: # new in 2.12
336
336
  Enabled: false
337
337
  RSpec/Rails/HaveHttpStatus: # new in 2.12
338
338
  Enabled: false
339
+
340
+ RSpec/ClassCheck: # new in 2.13
341
+ Enabled: true
342
+ RSpec/NoExpectationExample: # new in 2.13
343
+ Enabled: true
344
+ RSpec/Capybara/SpecificFinders: # new in 2.13
345
+ Enabled: true
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cocina-models (0.84.3)
4
+ cocina-models (0.84.5)
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.0.3.1)
23
+ activesupport (7.0.4)
24
24
  concurrent-ruby (~> 1.0, >= 1.0.2)
25
25
  i18n (>= 1.6, < 2)
26
26
  minitest (>= 5.1)
@@ -83,7 +83,7 @@ GEM
83
83
  patience_diff (1.2.0)
84
84
  optimist (~> 3.0)
85
85
  racc (1.6.0)
86
- rack (2.2.4)
86
+ rack (3.0.0)
87
87
  rainbow (3.1.1)
88
88
  rake (13.0.6)
89
89
  regexp_parser (2.5.0)
@@ -94,7 +94,7 @@ GEM
94
94
  rspec-mocks (~> 3.11.0)
95
95
  rspec-core (3.11.0)
96
96
  rspec-support (~> 3.11.0)
97
- rspec-expectations (3.11.0)
97
+ rspec-expectations (3.11.1)
98
98
  diff-lcs (>= 1.2.0, < 2.0)
99
99
  rspec-support (~> 3.11.0)
100
100
  rspec-mocks (3.11.1)
@@ -105,7 +105,7 @@ GEM
105
105
  rspec-core (>= 2, < 4, != 2.12.0)
106
106
  rss (0.2.9)
107
107
  rexml
108
- rubocop (1.35.1)
108
+ rubocop (1.36.0)
109
109
  json (~> 2.3)
110
110
  parallel (~> 1.10)
111
111
  parser (>= 3.1.2.1)
@@ -119,8 +119,8 @@ GEM
119
119
  parser (>= 3.1.1.0)
120
120
  rubocop-rake (0.6.0)
121
121
  rubocop (~> 1.0)
122
- rubocop-rspec (2.12.1)
123
- rubocop (~> 1.31)
122
+ rubocop-rspec (2.13.1)
123
+ rubocop (~> 1.33)
124
124
  ruby-progressbar (1.11.0)
125
125
  simplecov (0.21.2)
126
126
  docile (~> 1.1)
data/README.md CHANGED
@@ -55,7 +55,8 @@ If there is a possibility that a model or validation change will conflict with s
55
55
 
56
56
  1. Create a cocina-models branch containing the proposed change and push to GitHub.
57
57
  2. On sdr-infra, check out `main`, update the `Gemfile` so that cocina-models references the branch, and `bundle install`.
58
- 3. Select the appropriate database.
58
+ 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)
59
+
59
60
  For QA:
60
61
  ```
61
62
  export DATABASE_NAME="dor_services"
@@ -87,6 +88,38 @@ RAILS_ENV=production bin/validate-cocina -p 8
87
88
  ```
88
89
  5. Check `validate-cocina.csv` for validation errors.
89
90
 
91
+ ## Running Reports in DSA
92
+
93
+ Custom reports stored in dor-services-app can be run similarly to validation testing described above.
94
+
95
+ 1. Go the sdr-infra box:
96
+
97
+ ```
98
+ ssh deploy@sdr-infra
99
+ ```
100
+
101
+ 2. Go to the dor-services-app directory and reset to main if needed (verify nobody else is using this first though):
102
+
103
+ ```
104
+ cd dor-services-app
105
+ git status # see if there are any unsaved changes, if so, you may need to git stash them
106
+ git pull # OR git reset --hard main to just ditch any local unsaved changes
107
+ ```
108
+
109
+ 3. 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.
110
+
111
+ 4. Run the report (good idea to do it in a screen or via background process in case you get disconnected):
112
+
113
+ ```
114
+ bundle exec bin/rails r -e production "BadIso8601Dates.report" > BadIso8601Dates.csv
115
+ ```
116
+
117
+ 5. When done, you can pull the report to your laptop as needed:
118
+
119
+ ```
120
+ scp deploy@sdr-infra:/opt/app/deploy/dor-services-app/BadIso8601Dates.csv BadIso8601Dates.csv
121
+ ```
122
+
90
123
  ## Releasing
91
124
 
92
125
  ### Step 0: Share intent to change the models
@@ -34,7 +34,7 @@ module Cocina
34
34
  values.concat(extent_values.flatten)
35
35
  values.concat(part_note_value_for(part_element, 'text'))
36
36
  values.concat(part_note_value_for(part_element, 'date'))
37
- values.reject!(&:blank?)
37
+ values.compact_blank!
38
38
 
39
39
  return if values.empty?
40
40
 
@@ -50,7 +50,7 @@ module Cocina
50
50
  values.concat(extent_values)
51
51
  values.concat(part_note_value_for(part_element, 'text'))
52
52
  values.concat(part_note_value_for(part_element, 'date'))
53
- values.reject!(&:blank?)
53
+ values.compact_blank!
54
54
 
55
55
  return if values.empty?
56
56
 
@@ -83,7 +83,7 @@ module Cocina
83
83
  detail_values.concat(part_note_value_for(detail_node, 'number'))
84
84
  detail_values.concat(part_note_value_for(detail_node, 'caption'))
85
85
  detail_values.concat(part_note_value_for(detail_node, 'title'))
86
- detail_values.reject!(&:blank?)
86
+ detail_values.compact_blank!
87
87
  if detail_values.present?
88
88
  detail_values.concat(part_note_value_for(detail_node, 'detail type',
89
89
  xpath: '@type'))
@@ -101,7 +101,7 @@ module Cocina
101
101
  extent_values = []
102
102
  extent_values.concat(part_note_value_for(extent_node, 'list'))
103
103
  extent_values << pages_for(extent_node)
104
- extent_values.reject!(&:blank?)
104
+ extent_values.compact_blank!
105
105
  if extent_values.present?
106
106
  extent_values.concat(part_note_value_for(extent_node, 'extent unit',
107
107
  xpath: '@unit'))
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Cocina
4
4
  module Models
5
- VERSION = '0.84.3'
5
+ VERSION = '0.84.5'
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.84.3
4
+ version: 0.84.5
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-01 00:00:00.000000000 Z
11
+ date: 2022-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -538,7 +538,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
538
538
  - !ruby/object:Gem::Version
539
539
  version: '0'
540
540
  requirements: []
541
- rubygems_version: 3.3.7
541
+ rubygems_version: 3.2.32
542
542
  signing_key:
543
543
  specification_version: 4
544
544
  summary: Data models for the SDR