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 +4 -4
- data/README.md +5 -1
- data/lib/dor/services/client/object.rb +15 -2
- data/lib/dor/services/client/sdr.rb +1 -0
- data/lib/dor/services/client/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: dc6f22107403e5fc4222c05ca9bebfd64bb927946558ec947dc9a267aca259c5
|
4
|
+
data.tar.gz: 8be38410f5ce1372134c2f2a705424453a4fb2fd3e99f21814ee5b052c015dca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
101
|
+
return resp.headers['Location'] if resp.success?
|
89
102
|
|
90
103
|
raise_exception_based_on_response!(resp)
|
91
104
|
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.
|
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-
|
12
|
+
date: 2019-10-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|