dor-services 6.5.1 → 6.6.0

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: 26cf9591463283fa3678b92ff682233bd3effae0218110731d38fa630237b452
4
- data.tar.gz: 6ed2349469f5b15ce7c1a9dc567c81316a7e09c51e2354b7341eadbc3909c95c
3
+ metadata.gz: '03910688a2a69cb49c106e7880699b27afc3d5003c5bae6dea3bb355389f5fab'
4
+ data.tar.gz: 8486a5b5fb60208f4bd8565e2dae88aba9eb0f8247684e7a01fa05d5a1995cce
5
5
  SHA512:
6
- metadata.gz: 0fc803a546f58ef037d632390f5da35e3c257ed6713c939d99653ffe5e0253d03e4e0cb3086537d5d7d74fe847a373d177dbb8232213418eb8090fd116d830ab
7
- data.tar.gz: 29fe609720fd13f0520e1f86111f6dfa357570d83fe3d02a085fbc3ebf297975c43d14270c6aeb6a1c2aaf88b93a2c7264a6fffae85f75787d0722c6526051c7
6
+ metadata.gz: 9d0f4c34c5a90c92cd7981cfbe68d0fd6ec305a51e66b6d19451edb40f3d591496d26a024dc41a6f795b7fb8b58a3765482f8412bff9c8f32340961e21df8be0
7
+ data.tar.gz: 799de786b209a5549af2e3f68c318f92e69bd02b2a58fac0b51eb51582231a5ca5675682acb704648a9473f77b9d49fd2f00400af00f455c3b7984a660db85f5
@@ -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::Exception, 'Object already opened for versioning' if open?
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dor
4
- VERSION = '6.5.1'
4
+ VERSION = '6.6.0'
5
5
  end
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.5.1
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-08 00:00:00.000000000 Z
17
+ date: 2019-02-15 00:00:00.000000000 Z
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency
20
20
  name: active-fedora