dor-services-client 3.3.0 → 3.4.0

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: a2ebe3368e30be787ecac8213732a489b42683a685f243e3c49581ef96cdd979
4
- data.tar.gz: 11b4d153f78945281c13332144b3e1cb8fe7caa7415d8b3f4900c18a091ae10e
3
+ metadata.gz: dc6f22107403e5fc4222c05ca9bebfd64bb927946558ec947dc9a267aca259c5
4
+ data.tar.gz: 8be38410f5ce1372134c2f2a705424453a4fb2fd3e99f21814ee5b052c015dca
5
5
  SHA512:
6
- metadata.gz: 66d7dfe11d7b17ba10a417d9826bda58f2c13afa6df2b9e62dacb0acbbd4f2ae5c60cc26b895fc1ea9fde866e74cb1f23d2f5cdb34d1df86cdd53beafcba0169
7
- data.tar.gz: 4881039ada3e08b91c3590d97f01a4099bcc88e6c09ea9cfc2df91b0b77069349bb046c856748d61fe007edaad6f23ca118d92c6dff10a39fb561dc87d4f521b
6
+ metadata.gz: e80c475af39123c7e4d6b397a03e2a603878e61800d9b2bc8a4e8c18c4c5f0b941bf2edec35e522378f29ca8f46b738f9196c6e2e476ff4b2fbe6dab68258e08
7
+ data.tar.gz: 2f050d33ff044fa0bf4f76ea57d75022b96ba44794d2d7384c43ae8485b0d1e47150ae839d271a367832d2cec2d728aa401e60b9832c3061c2d26a5076b4c6f5
data/README.md CHANGED
@@ -78,6 +78,9 @@ object_client.publish
78
78
  # Shelve an object (push to Stacks)
79
79
  object_client.shelve
80
80
 
81
+ # Preserve an object (push to SDR)
82
+ object_client.preserve
83
+
81
84
  # Update the MARC record
82
85
  object_client.update_marc_record
83
86
 
@@ -109,9 +112,10 @@ object_client.files.retrieve(filename: filename_string)
109
112
  object_client.files.preserved_content(filename: filename_string, version: version_string)
110
113
  object_client.files.list
111
114
  object_client.release_tags.create(release: release, what: what, to: to, who: who)
115
+
116
+ # Retrieve information from SDR
112
117
  object_client.sdr.content_diff(current_content: existing_content)
113
118
  object_client.sdr.metadata(datastream: dsid)
114
- object_client.sdr.signature_catalog
115
119
 
116
120
  # Create, remove, and reset workspaces
117
121
  object_client.workspace.create(source: object_path_string)
@@ -72,7 +72,20 @@ module Dor
72
72
  resp = connection.post do |req|
73
73
  req.url "#{object_path}/publish"
74
74
  end
75
- return true if resp.success?
75
+ return resp.headers['Location'] if resp.success?
76
+
77
+ raise_exception_based_on_response!(resp)
78
+ end
79
+
80
+ # Preserve an object (send to SDR)
81
+ # @raise [NotFoundResponse] when the response is a 404 (object not found)
82
+ # @raise [UnexpectedResponse] when the response is not successful.
83
+ # @return [String] URL from Location response header if no errors
84
+ def preserve
85
+ resp = connection.post do |req|
86
+ req.url "#{object_path}/preserve"
87
+ end
88
+ return resp.headers['Location'] if resp.success?
76
89
 
77
90
  raise_exception_based_on_response!(resp)
78
91
  end
@@ -85,7 +98,7 @@ module Dor
85
98
  resp = connection.post do |req|
86
99
  req.url "#{object_path}/shelve"
87
100
  end
88
- return true if resp.success?
101
+ return resp.headers['Location'] if resp.success?
89
102
 
90
103
  raise_exception_based_on_response!(resp)
91
104
  end
@@ -42,6 +42,7 @@ module Dor
42
42
 
43
43
  Moab::SignatureCatalog.parse resp.body
44
44
  end
45
+ deprecation_deprecate :signature_catalog
45
46
 
46
47
  # Retrieves file difference manifest for contentMetadata from SDR
47
48
  #
@@ -3,7 +3,7 @@
3
3
  module Dor
4
4
  module Services
5
5
  class Client
6
- VERSION = '3.3.0'
6
+ VERSION = '3.4.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: 3.3.0
4
+ version: 3.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Coyne
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2019-10-15 00:00:00.000000000 Z
12
+ date: 2019-10-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport