dor-services-client 12.16.0 → 12.17.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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/dor/services/client/accession.rb +1 -2
- data/lib/dor/services/client/object_version.rb +2 -4
- data/lib/dor/services/client/objects.rb +1 -2
- data/lib/dor/services/client/version.rb +1 -1
- data/lib/dor/services/client/versioned_service.rb +6 -0
- data/lib/dor/services/client.rb +1 -0
- 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: 28239d64f9889da5c2eb01d1f7c1a724454a3f9d6e5dc04454e6d537d8b1530c
|
4
|
+
data.tar.gz: abffc94573aa3106b599477bff35c786c4ce4d6ba6bc41e9dea37dc43e8b220a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 70a705670a2f0ac259b7af85806f909311d2222eb0af263d1bcbd2d96bffb0cf34185e2a9a38f4ba8cd5e1da1f3f9d1c01d4d0c490ddf29873a421d40402212e
|
7
|
+
data.tar.gz: 5ff867b49a8d5a552a6d0d5ffada7298fec9d8e19df029f8b79de2899ed1ab65b4058ddf4c0986ae99f1e6c63749bea999e3f165e3bb369416986f19e7e488ad
|
data/Gemfile.lock
CHANGED
@@ -24,8 +24,7 @@ module Dor
|
|
24
24
|
# @raise [UnexpectedResponse] when the response is not successful.
|
25
25
|
def start(params = {})
|
26
26
|
resp = connection.post do |req|
|
27
|
-
req.url path
|
28
|
-
req.params = params
|
27
|
+
req.url with_querystring(url: path, params: params)
|
29
28
|
end
|
30
29
|
return true if resp.success?
|
31
30
|
|
@@ -59,9 +59,8 @@ module Dor
|
|
59
59
|
# @return [Cocina::Models::DROWithMetadata|CollectionWithMetadata|AdminPolicyWithMetadata] cocina model with updated version
|
60
60
|
def open(**params)
|
61
61
|
resp = connection.post do |req|
|
62
|
-
req.url open_new_version_path
|
62
|
+
req.url with_querystring(url: open_new_version_path, params: params)
|
63
63
|
req.headers['Content-Type'] = 'application/json'
|
64
|
-
req.body = params.to_json if params.any?
|
65
64
|
end
|
66
65
|
|
67
66
|
raise_exception_based_on_response!(resp) unless resp.success?
|
@@ -79,9 +78,8 @@ module Dor
|
|
79
78
|
# @return [String] a message confirming successful closing
|
80
79
|
def close(**params)
|
81
80
|
resp = connection.post do |req|
|
82
|
-
req.url close_version_path
|
81
|
+
req.url with_querystring(url: close_version_path, params: params)
|
83
82
|
req.headers['Content-Type'] = 'application/json'
|
84
|
-
req.body = params.to_json if params.any?
|
85
83
|
end
|
86
84
|
return resp.body if resp.success?
|
87
85
|
|
@@ -14,11 +14,10 @@ module Dor
|
|
14
14
|
# @return [Cocina::Models::DROWithMetadata,Cocina::Models::CollectionWithMetadata,Cocina::Models::AdminPolicyWithMetadata] the returned model
|
15
15
|
def register(params:, assign_doi: false, validate: false)
|
16
16
|
resp = connection.post do |req|
|
17
|
-
req.url objects_path
|
17
|
+
req.url with_querystring(url: objects_path, params: { assign_doi: assign_doi })
|
18
18
|
req.headers['Content-Type'] = 'application/json'
|
19
19
|
# asking the service to return JSON (else it'll be plain text)
|
20
20
|
req.headers['Accept'] = 'application/json'
|
21
|
-
req.params[:assign_doi] = true if assign_doi
|
22
21
|
req.body = params.to_json
|
23
22
|
end
|
24
23
|
|
data/lib/dor/services/client.rb
CHANGED
@@ -5,6 +5,7 @@ require 'active_support/core_ext/module/delegation'
|
|
5
5
|
require 'active_support/core_ext/object/blank'
|
6
6
|
require 'active_support/json'
|
7
7
|
require 'active_support/core_ext/object/json'
|
8
|
+
require 'active_support/core_ext/object/to_query'
|
8
9
|
require 'cocina/models'
|
9
10
|
require 'faraday'
|
10
11
|
require 'faraday/retry'
|
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: 12.
|
4
|
+
version: 12.17.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: 2023-09-
|
12
|
+
date: 2023-09-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|