dor-services-client 15.15.0 → 15.15.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 664c758fdb6930cfa0c0756f6282d6268b0174ed59a23266006cc4ca75e366a1
|
4
|
+
data.tar.gz: e723073e8376db61491580fe0e02d3a8d3affd146387743f24ffdff2c8d42521
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: efc9dfa6cef3526a8a9af187b851c2344fb2508880364ee1825c3df74a1812317a70e1073d50732ad25829796c12726e2c6a8bfff5988c6d7b7698e7df366d69
|
7
|
+
data.tar.gz: f7de64fac118e5cfaaca0b73449baa6f72f1431ca9cd220ba7edf1cd154233a5e9da16824c00e8ad0b75ad0e7280ddd71e64fa5f993cdfa3f49ca6be8e9c6eaa
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
dor-services-client (15.15.
|
4
|
+
dor-services-client (15.15.2)
|
5
5
|
activesupport (>= 7.0.0)
|
6
6
|
cocina-models (~> 0.104.1)
|
7
7
|
deprecation
|
@@ -84,7 +84,7 @@ GEM
|
|
84
84
|
activesupport (>= 3.0, < 9.0)
|
85
85
|
equivalent-xml (0.6.0)
|
86
86
|
nokogiri (>= 1.4.3)
|
87
|
-
faraday (2.13.
|
87
|
+
faraday (2.13.2)
|
88
88
|
faraday-net_http (>= 2.0, < 3.5)
|
89
89
|
json
|
90
90
|
logger
|
@@ -131,7 +131,7 @@ GEM
|
|
131
131
|
rspec-core (~> 3.13.0)
|
132
132
|
rspec-expectations (~> 3.13.0)
|
133
133
|
rspec-mocks (~> 3.13.0)
|
134
|
-
rspec-core (3.13.
|
134
|
+
rspec-core (3.13.5)
|
135
135
|
rspec-support (~> 3.13.0)
|
136
136
|
rspec-expectations (3.13.5)
|
137
137
|
diff-lcs (>= 1.2.0, < 2.0)
|
@@ -55,7 +55,14 @@ module Dor
|
|
55
55
|
end
|
56
56
|
|
57
57
|
def workflow(workflow_name)
|
58
|
-
|
58
|
+
raise ArgumentError, '`workflow_name` argument cannot be blank in call to `#workflow(workflow_name)' if workflow_name.blank?
|
59
|
+
|
60
|
+
# Return memoized object instance if workflow_name value is the same
|
61
|
+
#
|
62
|
+
# This allows the client to interact with multiple workflows for a given object
|
63
|
+
return @workflow if @workflow&.workflow_name == workflow_name
|
64
|
+
|
65
|
+
@workflow = ObjectWorkflow.new(**parent_params.merge({ workflow_name: workflow_name }))
|
59
66
|
end
|
60
67
|
|
61
68
|
# Retrieves the Cocina model
|
@@ -107,7 +107,7 @@ module Dor
|
|
107
107
|
def close(**params)
|
108
108
|
resp = connection.post do |req|
|
109
109
|
req.url close_version_path
|
110
|
-
req.params = params
|
110
|
+
req.params = params.compact
|
111
111
|
req.headers['Content-Type'] = 'application/json'
|
112
112
|
end
|
113
113
|
return resp.body if resp.success?
|
@@ -5,6 +5,8 @@ module Dor
|
|
5
5
|
class Client
|
6
6
|
# API calls around workflow for an object.
|
7
7
|
class ObjectWorkflow < VersionedService
|
8
|
+
attr_reader :workflow_name
|
9
|
+
|
8
10
|
# @param object_identifier [String] the druid for the object
|
9
11
|
# @param [String] workflow_name The name of the workflow
|
10
12
|
def initialize(connection:, version:, object_identifier:, workflow_name:)
|
@@ -61,7 +63,7 @@ module Dor
|
|
61
63
|
|
62
64
|
private
|
63
65
|
|
64
|
-
attr_reader :object_identifier
|
66
|
+
attr_reader :object_identifier
|
65
67
|
end
|
66
68
|
end
|
67
69
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dor-services-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 15.15.
|
4
|
+
version: 15.15.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Coyne
|
8
8
|
- Michael Giarlo
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -292,7 +292,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
292
292
|
- !ruby/object:Gem::Version
|
293
293
|
version: '0'
|
294
294
|
requirements: []
|
295
|
-
rubygems_version: 3.6.
|
295
|
+
rubygems_version: 3.6.9
|
296
296
|
specification_version: 4
|
297
297
|
summary: A client for dor-services-app
|
298
298
|
test_files: []
|