cocina-models 0.84.3 → 0.84.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +32 -0
- data/lib/cocina/models/validators/date_time_validator.rb +2 -1
- data/lib/cocina/models/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ec3a00a348ca9a851ee3455b7b0208628ca9590556ad76b0f536c4da3e1b6079
|
4
|
+
data.tar.gz: 156105d8055745c353db2690e2c39b72a043243272fddc72fb80e5e9a42b81c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff595ddde9a4729ed1e77239d78b7d1729798708bb44a407a6019d98943b50d8f14a3ad12fa06f17085294d499a32b82ece50f7ca6f23a30ce857bcd12a2de87
|
7
|
+
data.tar.gz: 3bdb368b93e0ba0fc8f865cbb2888045589c2169af810f3380f18e2c8511fafea30fc088980a4503f6f0405a1b60daf575c1df07ac7463830058e9517827d97a
|
data/Gemfile.lock
CHANGED
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)
|