dor-services-client 6.29.0 → 6.33.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: e44b232de63ec88be66da8ef7f2334860a33e996632b7ecb79ee2e2928af33e1
4
- data.tar.gz: 9e373dcc5e8ebeb39b154853898117a88397d3dc263f466a60fcf6c1010c3f31
3
+ metadata.gz: 6af60d75398d4b35149fecee7360558221123baf3fa52444370fb5a975ffec8e
4
+ data.tar.gz: 180adddca61edca3ec7b5fbf8c8786509c13ad56fb79068155ad040434fc4608
5
5
  SHA512:
6
- metadata.gz: 9f87acf4192e098774c638f061f519ccd6f8b555d8087eeb591517c6892345e079b5d180de532ecb04a3a7e902af4aa4a620dc485b6f7a21ed66cf106e59607c
7
- data.tar.gz: ecd7f9b38217c6b8d73d8cc25156fd5ea6c8ded64de91f442e1980fbc800076a1847ebb28a67b1a8edf6a52e861bb8387eafc2e547f0c2dfd91b288c930036de
6
+ metadata.gz: ba700b3070dcd7b2989e7aaff2bc487793041eab87e8d0228e76b06179e8bee192d4ffba8db92d9b38819432350931c3e2819aec8f2016e9deb2ef6c7e5ed08a
7
+ data.tar.gz: 771aab35c8b76dc663ea61a4805338bd136bad6b3d926262e0293691d8d885615eff1095448de27dffb3b465f6ebd0a82c6dc0ff836566f61cbe0ed4b548a7eb
data/README.md CHANGED
@@ -166,10 +166,6 @@ object_client.workspace.create(source: object_path_string)
166
166
  object_client.workspace.cleanup
167
167
  object_client.workspace.reset
168
168
 
169
-
170
- # Update embargo
171
- object_client.embargo.update(embargo_date: date_string, requesting_user: username_string)
172
-
173
169
  # Search for administrative tags:
174
170
  Dor::Services::Client.administrative_tags.search(q: 'Project')
175
171
  ```
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
25
25
  spec.required_ruby_version = '~> 2.6'
26
26
 
27
27
  spec.add_dependency 'activesupport', '>= 4.2', '< 7'
28
- spec.add_dependency 'cocina-models', '~> 0.55.0' # leave pinned to patch level until cocina-models hits 1.0
28
+ spec.add_dependency 'cocina-models', '~> 0.59.0' # leave pinned to patch level until cocina-models hits 1.0
29
29
  spec.add_dependency 'deprecation', '>= 0'
30
30
  spec.add_dependency 'faraday', '>= 0.15', '< 2'
31
31
  spec.add_dependency 'moab-versioning', '~> 4.0'
@@ -76,7 +76,7 @@ module Dor
76
76
  end
77
77
 
78
78
  # rubocop:disable Lint/StructNewOverride
79
- Datastream = Struct.new(:label, :dsid, :pid, :size, :mimeType, keyword_init: true)
79
+ Datastream = Struct.new(:label, :dsid, :pid, :size, :mimeType, :versionId, keyword_init: true)
80
80
  # rubocop:enable Lint/StructNewOverride
81
81
 
82
82
  # @return [Array] the list of datastreams for the item
@@ -87,7 +87,7 @@ module Dor
87
87
  end
88
88
  raise_exception_based_on_response!(resp, object_identifier) unless resp.success?
89
89
 
90
- JSON.parse(resp.body).map { |params| Datastream.new(**params) }
90
+ JSON.parse(resp.body).map { |params| Datastream.new(**params.symbolize_keys!) }
91
91
  end
92
92
 
93
93
  # @param [String] dsid the identifier for the datastream
@@ -39,10 +39,6 @@ module Dor
39
39
  @version ||= ObjectVersion.new(**parent_params)
40
40
  end
41
41
 
42
- def embargo
43
- @embargo ||= Embargo.new(**parent_params)
44
- end
45
-
46
42
  def accession(params = {})
47
43
  @accession ||= Accession.new(**parent_params.merge(params))
48
44
  end
@@ -88,7 +88,7 @@ module Dor
88
88
  end
89
89
  raise_exception_based_on_response!(resp, object_identifier) unless resp.success?
90
90
 
91
- JSON.parse(resp.body).fetch('versions').map { |params| Version.new(**params) }
91
+ JSON.parse(resp.body).fetch('versions').map { |params| Version.new(**params.symbolize_keys!) }
92
92
  end
93
93
 
94
94
  private
@@ -3,7 +3,7 @@
3
3
  module Dor
4
4
  module Services
5
5
  class Client
6
- VERSION = '6.29.0'
6
+ VERSION = '6.33.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: 6.29.0
4
+ version: 6.33.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: 2021-03-18 00:00:00.000000000 Z
12
+ date: 2021-04-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -37,14 +37,14 @@ dependencies:
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 0.55.0
40
+ version: 0.59.0
41
41
  type: :runtime
42
42
  prerelease: false
43
43
  version_requirements: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 0.55.0
47
+ version: 0.59.0
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: deprecation
50
50
  requirement: !ruby/object:Gem::Requirement
@@ -234,7 +234,6 @@ files:
234
234
  - lib/dor/services/client/background_job_results.rb
235
235
  - lib/dor/services/client/collections.rb
236
236
  - lib/dor/services/client/connection_wrapper.rb
237
- - lib/dor/services/client/embargo.rb
238
237
  - lib/dor/services/client/error_faraday_middleware.rb
239
238
  - lib/dor/services/client/events.rb
240
239
  - lib/dor/services/client/marcxml.rb
@@ -269,7 +268,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
269
268
  - !ruby/object:Gem::Version
270
269
  version: '0'
271
270
  requirements: []
272
- rubygems_version: 3.1.4
271
+ rubygems_version: 3.0.3
273
272
  signing_key:
274
273
  specification_version: 4
275
274
  summary: A client for dor-services-app
@@ -1,47 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Dor
4
- module Services
5
- class Client
6
- # API calls that are about managing embargo on a repository object
7
- class Embargo < VersionedService
8
- # @param object_identifier [String] the pid for the object
9
- def initialize(connection:, version:, object_identifier:)
10
- super(connection: connection, version: version)
11
- @object_identifier = object_identifier
12
- end
13
-
14
- # @param [String] embargo_date The date to update the embargo to (ISO 8601)
15
- # @param [String] requesting_user Who is making this change.
16
- #
17
- # @example
18
- # client.update(embargo_date: '2099-10-20', requesting_user: 'jane')
19
- #
20
- # @raise [UnexpectedResponse] on an unsuccessful response from the server
21
- #
22
- # @return [NilClass] when the update is successful
23
- def update(embargo_date:, requesting_user:)
24
- resp = connection.patch do |req|
25
- req.url path
26
- req.headers['Content-Type'] = 'application/json'
27
- req.body = {
28
- embargo_date: embargo_date,
29
- requesting_user: requesting_user
30
- }.to_json
31
- end
32
- return if resp.success?
33
-
34
- raise_exception_based_on_response!(resp, object_identifier)
35
- end
36
-
37
- private
38
-
39
- attr_reader :object_identifier
40
-
41
- def path
42
- "#{api_version}/objects/#{object_identifier}/embargo"
43
- end
44
- end
45
- end
46
- end
47
- end