dor-services-client 15.29.0 → 15.29.1

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: cd3669f190df2c0b0ac9bcb68759ea32032d9f1b6056e7091a64d52e9e598d0c
4
- data.tar.gz: 82915a887dd9a6e03b1edb2bd905678fd766b4f4e7d30dec3d0416b74beb8145
3
+ metadata.gz: bcc0e43718d388d9c03d17a6838017f61e601fb52009a12f00bdc98c08f2bec6
4
+ data.tar.gz: 0c794f62685e9a8eab1d57d2974582304f1e65c679e58b000f16a018a9c611d7
5
5
  SHA512:
6
- metadata.gz: 53cce339633bec1bbeee814420516de024e068eb8e714dc5471ca72d997ee2f9864a001010e381432b8de89f946f797e55fcf871f2f71802ceeeebca2da164ed
7
- data.tar.gz: 3de69dd67cd35171234bb5b1f4f4c714079018b6909904a922089f8e2a8d138ad44c607e956917db671dcf96758e430258797b087890b47ed0fb1c4655d8b6b4
6
+ metadata.gz: c2ffd5f8701aab5f1ff1d9b89af477552605eb6299457643bd21b324432e2a975457227bfbc28b3a526ee13c949bf7b88e55037282aca8408d34eae61ce2efbd
7
+ data.tar.gz: 463c4f4c914cd046325b98654426682d3d8b07a119c8f6afde7cdf1068a152ac264417f10d393e1c2fef62f5b45234e4bdceb9f097acc7f11637f3972d816a62
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dor-services-client (15.29.0)
4
+ dor-services-client (15.29.1)
5
5
  activesupport (>= 7.0.0)
6
6
  cocina-models (~> 0.111.0)
7
7
  deprecation
data/README.md CHANGED
@@ -127,6 +127,9 @@ object_client.find
127
127
  # Returns "lite" Cocina metadata (excluding specified attributes)
128
128
  object_client.find_lite(structural: false, geographic: false)
129
129
 
130
+ # Return the lock (ETag) for the object
131
+ object_client.lock
132
+
130
133
  # Query for an object's collections
131
134
  object_client.collections
132
135
 
@@ -80,6 +80,17 @@ module Dor
80
80
  build_cocina_from_response(JSON.parse(resp.body), headers: resp.headers, validate: validate)
81
81
  end
82
82
 
83
+ # @raise [NotFoundResponse] when the response is a 404 (object not found)
84
+ # @raise [UnexpectedResponse] when the response is not successful.
85
+ # @return [String] the ETag value for the object
86
+ def lock
87
+ resp = connection.head do |req|
88
+ req.url object_path
89
+ end
90
+ raise_exception_based_on_response!(resp) unless resp.success?
91
+ resp.headers['ETag']
92
+ end
93
+
83
94
  BASE_ALLOWED_FIELDS = %i[external_identifier cocina_version label version administrative description].freeze
84
95
  DRO_ALLOWED_FIELDS = BASE_ALLOWED_FIELDS + %i[content_type access identification structural geographic]
85
96
 
@@ -3,7 +3,7 @@
3
3
  module Dor
4
4
  module Services
5
5
  class Client
6
- VERSION = '15.29.0'
6
+ VERSION = '15.29.1'
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.29.0
4
+ version: 15.29.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Coyne