dor-services-client 0.6.0 → 0.7.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: d9a014a5399050c8fbb36f61a3dccfcef19c9d6ece0dba3dbe5c77f5d2cc68d9
4
- data.tar.gz: 33bcf38b482c228139dafd4749c121c1c4ca1f3000e2e47ae76695171026b06d
3
+ metadata.gz: 875495ec63471d10398a445d157995ea10d279be90f83f6fd00de0587dbd9eda
4
+ data.tar.gz: df2c81d982fd112a808806ab41eaade32edcac05be679dbbfc5bdb5ab5c4625c
5
5
  SHA512:
6
- metadata.gz: e74d8b9cc1194ffb8907743d1467cf952d39d4ef7e7f9c49e83551fef9c6310f8ab11181c5763c4c7a429bbe1afd63f1046d83552c176778322f4b93f68b6e80
7
- data.tar.gz: bc7017b700945dcfb3f3a2093167694d984132d00957bba5274e6f60cd4894128d0339cbf5809f58a1c9c574e9b64739ad64ae6e1a05f63d6f1d10eb5cc7e48a
6
+ metadata.gz: 5fd7d69b9ea0a9282be2d6c7e5be789f20df33f6870633fb3fe248b2963c5d1cf3f6c0b6ab2b1659107f490ac4825a32f417643b3b8e55b5d3a25dbd06eb908e
7
+ data.tar.gz: 1869bd7147d957bbb5568110ce6e389eefee1956d911bac2eda31f5fa379ff57d44a97c697503b6b0a5b7f27786a2a1288b9b7b1b23b3e0a2ca2dd77dc6c3a2a
@@ -120,6 +120,10 @@ module Dor
120
120
  # @raise [UnexpectedResponse] when the response is not successful.
121
121
  # @return [boolean] true on success
122
122
  delegate :publish, to: :objects
123
+
124
+ # Notify goobi system of a new object
125
+ delegate :notify_goobi, to: :objects
126
+
123
127
  end
124
128
 
125
129
  # Gets the current version number for the object
@@ -27,6 +27,19 @@ module Dor
27
27
  true
28
28
  end
29
29
 
30
+ # Notify the external Goobi system for a new object that was registered in DOR
31
+ # @param object [String] the pid for the object
32
+ # @raise [UnexpectedResponse] when the response is not successful.
33
+ # @return [boolean] true on success
34
+ def notify_goobi(object:)
35
+ resp = connection.post do |req|
36
+ req.url "#{api_version}/objects/#{object}/notify_goobi"
37
+ end
38
+ raise UnexpectedResponse, "#{resp.reason_phrase}: #{resp.status} (#{resp.body})" unless resp.success?
39
+
40
+ true
41
+ end
42
+
30
43
  # Gets the current version number for the object
31
44
  # @param object [String] the pid for the object
32
45
  # @raise [UnexpectedResponse] when the response is not successful.
@@ -3,7 +3,7 @@
3
3
  module Dor
4
4
  module Services
5
5
  class Client
6
- VERSION = '0.6.0'
6
+ VERSION = '0.7.0'
7
7
  end
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dor-services-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Coyne