cocina-models 0.84.1 → 0.84.4

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: 9e1b47286ce6d52c99a76f6370a1f1a902d204759a7e0d11966b42d94d01ee19
4
- data.tar.gz: e6f5f432fab07a70965b78b94f3f5a1ff6e103ce274011ee55b7a130ae7bc974
3
+ metadata.gz: ec3a00a348ca9a851ee3455b7b0208628ca9590556ad76b0f536c4da3e1b6079
4
+ data.tar.gz: 156105d8055745c353db2690e2c39b72a043243272fddc72fb80e5e9a42b81c4
5
5
  SHA512:
6
- metadata.gz: '0908f1699111ae772ebea61c0f5824c78cd694640aa3acaaded5311f2039a366469765206cf88f49410734054d660cbb6414afa0695c5a3b831b42be857e30ac'
7
- data.tar.gz: 075d804c7525993965ffe30ae6d7e266c62d8a1b842cebc7096db3cd0c824af1b733180740faf3ba7db246cdd4c822ca9e67699cfa160810e62f12e0e919ea5d
6
+ metadata.gz: ff595ddde9a4729ed1e77239d78b7d1729798708bb44a407a6019d98943b50d8f14a3ad12fa06f17085294d499a32b82ece50f7ca6f23a30ce857bcd12a2de87
7
+ data.tar.gz: 3bdb368b93e0ba0fc8f865cbb2888045589c2169af810f3380f18e2c8511fafea30fc088980a4503f6f0405a1b60daf575c1df07ac7463830058e9517827d97a
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cocina-models (0.84.1)
4
+ cocina-models (0.84.4)
5
5
  activesupport
6
6
  deprecation
7
7
  dry-struct (~> 1.0)
data/README.md CHANGED
@@ -87,6 +87,38 @@ RAILS_ENV=production bin/validate-cocina -p 8
87
87
  ```
88
88
  5. Check `validate-cocina.csv` for validation errors.
89
89
 
90
+ ## Running Reports in DSA
91
+
92
+ Custom reports stored in dor-services-app can be run similarly to validation testing described above.
93
+
94
+ 1. Go the sdr-infra box:
95
+
96
+ ```
97
+ ssh deploy@sdr-infra
98
+ ```
99
+
100
+ 2. Go to the dor-services-app directory and reset to main if needed (verify nobody else is using this first though):
101
+
102
+ ```
103
+ cd dor-services-app
104
+ git status # see if there are any unsaved changes, if so, you may need to git stash them
105
+ git pull # OR git reset --hard main to just ditch any local unsaved changes
106
+ ```
107
+
108
+ 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.
109
+
110
+ 4. Run the report (good idea to do it in a screen or via background process in case you get disconnected):
111
+
112
+ ```
113
+ bundle exec bin/rails r -e production "BadIso8601Dates.report" > BadIso8601Dates.csv
114
+ ```
115
+
116
+ 5. When done, you can pull the report to your laptop as needed:
117
+
118
+ ```
119
+ scp deploy@sdr-infra:/opt/app/deploy/dor-services-app/BadIso8601Dates.csv BadIso8601Dates.csv
120
+ ```
121
+
90
122
  ## Releasing
91
123
 
92
124
  ### Step 0: Share intent to change the models
@@ -76,7 +76,8 @@ module Cocina
76
76
  #
77
77
  # So we catch the false positives from the upstream gem and allow
78
78
  # this pattern to validate
79
- /\AY-?\d{5,}\Z/.match?(value)
79
+ /\AY-?\d{5,}\Z/.match?(value) ||
80
+ /\A-?\d{1,3}\Z/.match?(value) # temporarily allow format violations
80
81
  end
81
82
 
82
83
  def valid_iso8601?(value)
@@ -96,11 +97,9 @@ module Cocina
96
97
  # * YYYY
97
98
  # * YYYY-MM
98
99
  #
99
- # So we catch the false positives from the upstream gem and allow
100
+ # This catches the false positives from the upstream gem and allow
100
101
  # these two patterns to validate
101
- #
102
- # Also have a temporary exemption for MM/DD/YY
103
- %r{\A((\d{4}(-0[1-9]|-1[0-2])?)|(\d{2}/\d{2}/\d{2}))\Z}.match?(value)
102
+ /\A\d{4}(-0[1-9]|-1[0-2])?\Z/.match?(value)
104
103
  end
105
104
 
106
105
  def druid
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Cocina
4
4
  module Models
5
- VERSION = '0.84.1'
5
+ VERSION = '0.84.4'
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.1
4
+ version: 0.84.4
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-08-25 00:00:00.000000000 Z
11
+ date: 2022-09-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport