dor-services-client 15.10.0 → 15.11.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8467ba23bd9a15f5d6c692298e3525452007fbf4e505f776d57075f5d753e419
4
- data.tar.gz: 333641b7ec8b66168f1debebf1cd78a50d7805b6400397ad1d93171094b1f326
3
+ metadata.gz: 18ff6ef4f51e40372f52681a6bbe257c347ab020e3512dd8d64b8b760c757a3b
4
+ data.tar.gz: 76eb8acbc819956390a0b60b20d88ffd62fdf698430d4b9c469daaea0b2160c9
5
5
  SHA512:
6
- metadata.gz: 5e1c13af8621423fa025523ed9981ab6932ec61f9e3f76af60fba0e32c967df4a5c4112aeff9718d3033c9df140b9fa3c30c986b80cf0b1c194da0254d39473c
7
- data.tar.gz: f9867cced6f822a9cf8da1b3c86ae03952d4dd523015af67bd1b1ad45ab17d2e8a014b8c2fbe3e560e1fc81ce9a663075ed91c4aa6305e3e6956e207d161930a
6
+ metadata.gz: d5639ed16ce0185cc344ae98459593e91bf2286223500a182242e51820041021f8ac8b2685935a0213d842084e9a955b7bc482c03e639b6568768c3f128dc318
7
+ data.tar.gz: 14256c492c36a3c03975a00393325541e6a65896ee49ef2e0bfba40f283dd1e3bc56c36cd0f398b6a3851552d875f4e7edf5d5f916389fe6ccbf06c75d1915c1
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dor-services-client (15.10.0)
4
+ dor-services-client (15.11.0)
5
5
  activesupport (>= 7.0.0)
6
6
  cocina-models (~> 0.103.2)
7
7
  deprecation
data/README.md CHANGED
@@ -60,7 +60,7 @@ objects_client = Dor::Services::Client.objects
60
60
 
61
61
  # Register a non-existent object
62
62
  objects_client.register(params: {})
63
- objects_client.register(params: {}, assign_doi: true)
63
+ objects_client.register(params: {}, assign_doi: true, user_name: 'dude')
64
64
 
65
65
  # Find object by source ID
66
66
  objects_client.find(source_id: 'sul:abc123')
@@ -84,7 +84,7 @@ background_jobs_client.show(job_id: 123)
84
84
  object_client = Dor::Services::Client.object(object_identifier)
85
85
 
86
86
  # Update an object
87
- object_client.update(params: dro)
87
+ object_client.update(params: dro, user_name: 'dude', description: 'things change sometimes')
88
88
 
89
89
  # Publish an object (push to PURL)
90
90
  object_client.publish(workflow: 'releaseWF', lane_id: 'low')
@@ -29,7 +29,7 @@ module Dor
29
29
  # @param [Cocina::Models::DROWithMetadata|CollectionWithMetadata|AdminPolicyWithMetadata|DRO|Collection|AdminPolicy] params model object
30
30
  # @param [boolean] skip_lock do not provide ETag
31
31
  # @param [boolean] validate validate the response object
32
- # @param [string] who the sunetid of the user performing the update
32
+ # @param [string] user_name the sunetid of the user performing the update
33
33
  # @param [string] description a description of the update
34
34
  # @raise [NotFoundResponse] when the response is a 404 (object not found)
35
35
  # @raise [UnexpectedResponse] when the response is not successful.
@@ -37,7 +37,7 @@ module Dor
37
37
  # @return [Cocina::Models::DROWithMetadata,Cocina::Models::CollectionWithMetadata,Cocina::Models::AdminPolicyWithMetadata] the returned model
38
38
  # rubocop:disable Metrics/AbcSize
39
39
  # rubocop:disable Metrics/MethodLength
40
- def update(params:, skip_lock: false, validate: false, who: nil, description: nil)
40
+ def update(params:, skip_lock: false, validate: false, user_name: nil, description: nil)
41
41
  raise ArgumentError, 'Cocina object not provided.' unless params.respond_to?(:externalIdentifier)
42
42
 
43
43
  # Raised if Cocina::Models::*WithMetadata not provided.
@@ -45,7 +45,7 @@ module Dor
45
45
 
46
46
  resp = connection.patch do |req|
47
47
  req.url object_path
48
- req.params = { event_description: description, event_who: who }.compact
48
+ req.params = { event_description: description, user_name: user_name }.compact
49
49
  req.headers['Content-Type'] = 'application/json'
50
50
  # asking the service to return JSON (else it'll be plain text)
51
51
  req.headers['Accept'] = 'application/json'
@@ -80,10 +80,9 @@ module Dor
80
80
  # @raise [NotFoundResponse] when the response is a 404 (object not found)
81
81
  # @raise [UnexpectedResponse] if the request is unsuccessful.
82
82
  def destroy(user_name: nil)
83
- path = object_path
84
- path += "?user_name=#{user_name}" if user_name
85
83
  resp = connection.delete do |req|
86
- req.url path
84
+ req.url object_path
85
+ req.params = { user_name: user_name }.compact
87
86
  end
88
87
  raise_exception_based_on_response!(resp, object_identifier) unless resp.success?
89
88
 
@@ -10,13 +10,13 @@ module Dor
10
10
  # Creates a new object in DOR
11
11
  # @param params [Cocina::Models::RequestDRO,Cocina::Models::RequestCollection,Cocina::Models::RequestAdminPolicy]
12
12
  # @param [boolean] assign a doi to the object
13
- # @param [string] who the sunetid of the user registering the object
13
+ # @param [string] user_name the sunetid of the user registering the object
14
14
  # @param [boolean] validate validate the response object
15
15
  # @return [Cocina::Models::DROWithMetadata,Cocina::Models::CollectionWithMetadata,Cocina::Models::AdminPolicyWithMetadata] the returned model
16
- def register(params:, assign_doi: false, validate: false, who: nil)
16
+ def register(params:, assign_doi: false, validate: false, user_name: nil)
17
17
  resp = connection.post do |req|
18
18
  req.url objects_path
19
- req.params = { assign_doi: assign_doi, event_who: who }.compact
19
+ req.params = { assign_doi: assign_doi, user_name: user_name }.compact
20
20
  req.headers['Content-Type'] = 'application/json'
21
21
  # asking the service to return JSON (else it'll be plain text)
22
22
  req.headers['Accept'] = 'application/json'
@@ -3,7 +3,7 @@
3
3
  module Dor
4
4
  module Services
5
5
  class Client
6
- VERSION = '15.10.0'
6
+ VERSION = '15.11.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: 15.10.0
4
+ version: 15.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Coyne