dor-services 6.5.1 → 6.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dor/exceptions.rb +6 -0
- data/lib/dor/services/version_service.rb +1 -1
- data/lib/dor/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '03910688a2a69cb49c106e7880699b27afc3d5003c5bae6dea3bb355389f5fab'
|
4
|
+
data.tar.gz: 8486a5b5fb60208f4bd8565e2dae88aba9eb0f8247684e7a01fa05d5a1995cce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d0f4c34c5a90c92cd7981cfbe68d0fd6ec305a51e66b6d19451edb40f3d591496d26a024dc41a6f795b7fb8b58a3765482f8412bff9c8f32340961e21df8be0
|
7
|
+
data.tar.gz: 799de786b209a5549af2e3f68c318f92e69bd02b2a58fac0b51eb51582231a5ca5675682acb704648a9473f77b9d49fd2f00400af00f455c3b7984a660db85f5
|
data/lib/dor/exceptions.rb
CHANGED
@@ -7,6 +7,12 @@ module Dor
|
|
7
7
|
# Raised when the data does not conform to expectations
|
8
8
|
class DataError < RuntimeError; end
|
9
9
|
|
10
|
+
# Raised when trying to open a version that is already open
|
11
|
+
# rubocop:disable Lint/InheritException
|
12
|
+
# See https://github.com/rubocop-hq/rubocop/issues/6770
|
13
|
+
class VersionAlreadyOpenError < Exception; end
|
14
|
+
# rubocop:enable Lint/InheritException
|
15
|
+
|
10
16
|
class DuplicateIdError < RuntimeError
|
11
17
|
attr_reader :pid
|
12
18
|
|
@@ -25,7 +25,7 @@ module Dor
|
|
25
25
|
# During local development, we need a way to open a new version even if the object has not been accessioned.
|
26
26
|
raise(Dor::Exception, 'Object net yet accessioned') unless
|
27
27
|
opts[:assume_accessioned] || Dor::Config.workflow.client.get_lifecycle('dor', work.pid, 'accessioned')
|
28
|
-
raise Dor::
|
28
|
+
raise Dor::VersionAlreadyOpenError, 'Object already opened for versioning' if open?
|
29
29
|
raise Dor::Exception, 'Object currently being accessioned' if Dor::Config.workflow.client.get_active_lifecycle('dor', work.pid, 'submitted')
|
30
30
|
|
31
31
|
sdr_version = Sdr::Client.current_version work.pid
|
data/lib/dor/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dor-services
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.
|
4
|
+
version: 6.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Klein
|
@@ -14,7 +14,7 @@ authors:
|
|
14
14
|
autorequire:
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
|
-
date: 2019-02-
|
17
|
+
date: 2019-02-15 00:00:00.000000000 Z
|
18
18
|
dependencies:
|
19
19
|
- !ruby/object:Gem::Dependency
|
20
20
|
name: active-fedora
|