dor-services-client 14.16.0 → 14.18.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: 84c1347c52df031a1e077e9072d72058e37aba7af9d4c1051b0b6c8c6f78a353
4
- data.tar.gz: 13480656465ac2ce78e4721592edbb2b25d3b1b2ec6fd5016adcaabc4bee6a3e
3
+ metadata.gz: 410670858a6fc9b9b3eb0b680061594471a6a682d85e666f3bf25024bb2069eb
4
+ data.tar.gz: 7c650e9738ed21e34ff5529e06ee671598bb3ab5a50a7001aa9581a60fa569c6
5
5
  SHA512:
6
- metadata.gz: 774f6b86cafd3576d39093767f817546e8a4c1b678472225de82a253a4348b31578cb14409b2aa07b33048f728b9a4e697344c4009e173aa4ad418e7a486fe54
7
- data.tar.gz: f119eadc2bb364047fca2f1d36d9269778327a7bd457d86da9eac5c47238c9b263e456a6b785bedbc650bcf1be775078d6ae6e988324a40aac5d1fd06d438272
6
+ metadata.gz: 7471ac2399737050d387b8a36df88bdb7e1c5e60cf960b5ff313132660a0072c86e157be0f6e1df18625394bedcad3c9fa98702821e43cedc414131d7a1d99a3
7
+ data.tar.gz: e198a1adc98a31ab498beea281966f24567dee5b565a22a3c7b6aa7ba0453854146cd6f6e50aee1996d7e5e5f1f0c471f38abcb49cd3aeda13d9a7d14a72cb4e
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dor-services-client (14.16.0)
4
+ dor-services-client (14.18.0)
5
5
  activesupport (>= 4.2, < 8)
6
6
  cocina-models (~> 0.98.0)
7
7
  deprecation
@@ -55,7 +55,7 @@ GEM
55
55
  deprecation (1.1.0)
56
56
  activesupport
57
57
  diff-lcs (1.5.1)
58
- docile (1.4.0)
58
+ docile (1.4.1)
59
59
  drb (2.2.1)
60
60
  dry-core (1.0.1)
61
61
  concurrent-ruby (~> 1.0)
@@ -84,7 +84,7 @@ GEM
84
84
  faraday (2.10.0)
85
85
  faraday-net_http (>= 2.0, < 3.2)
86
86
  logger
87
- faraday-net_http (3.1.0)
87
+ faraday-net_http (3.1.1)
88
88
  net-http
89
89
  faraday-retry (2.2.1)
90
90
  faraday (~> 2.0)
@@ -102,28 +102,28 @@ GEM
102
102
  mutex_m (0.2.0)
103
103
  net-http (0.4.1)
104
104
  uri
105
- nokogiri (1.16.6-arm64-darwin)
105
+ nokogiri (1.16.7-arm64-darwin)
106
106
  racc (~> 1.4)
107
- nokogiri (1.16.6-x86_64-darwin)
107
+ nokogiri (1.16.7-x86_64-darwin)
108
108
  racc (~> 1.4)
109
- nokogiri (1.16.6-x86_64-linux)
109
+ nokogiri (1.16.7-x86_64-linux)
110
110
  racc (~> 1.4)
111
111
  openapi3_parser (0.10.0)
112
112
  commonmarker (>= 1.0)
113
113
  openapi_parser (1.0.0)
114
114
  optimist (3.1.0)
115
115
  parallel (1.25.1)
116
- parser (3.3.3.0)
116
+ parser (3.3.4.0)
117
117
  ast (~> 2.4.1)
118
118
  racc
119
119
  patience_diff (1.2.0)
120
120
  optimist (~> 3.0)
121
- public_suffix (6.0.0)
121
+ public_suffix (6.0.1)
122
122
  racc (1.8.0)
123
123
  rainbow (3.1.1)
124
124
  rake (13.2.1)
125
125
  regexp_parser (2.9.2)
126
- rexml (3.3.1)
126
+ rexml (3.3.2)
127
127
  strscan
128
128
  rspec (3.13.0)
129
129
  rspec-core (~> 3.13.0)
@@ -138,13 +138,13 @@ GEM
138
138
  diff-lcs (>= 1.2.0, < 2.0)
139
139
  rspec-support (~> 3.13.0)
140
140
  rspec-support (3.13.1)
141
- rubocop (1.64.1)
141
+ rubocop (1.65.0)
142
142
  json (~> 2.3)
143
143
  language_server-protocol (>= 3.17.0)
144
144
  parallel (~> 1.10)
145
145
  parser (>= 3.3.0.2)
146
146
  rainbow (>= 2.2.2, < 4.0)
147
- regexp_parser (>= 1.8, < 3.0)
147
+ regexp_parser (>= 2.4, < 3.0)
148
148
  rexml (>= 3.2.5, < 4.0)
149
149
  rubocop-ast (>= 1.31.1, < 2.0)
150
150
  ruby-progressbar (~> 1.7)
@@ -40,6 +40,17 @@ module Dor
40
40
  @object_identifier = object_identifier
41
41
  end
42
42
 
43
+ # @return [Cocina::Models::DROWithMetadata] the object metadata
44
+ # @raise [UnexpectedResponse] on an unsuccessful response from the server
45
+ def find(version)
46
+ resp = connection.get do |req|
47
+ req.url "#{base_path}/#{version}"
48
+ end
49
+ raise_exception_based_on_response!(resp) unless resp.success?
50
+
51
+ build_cocina_from_response(resp, validate: false)
52
+ end
53
+
43
54
  # Get the current version for a DOR object. This comes from ObjectVersion table in the DSA
44
55
  # @raise [NotFoundResponse] when the response is a 404 (object not found)
45
56
  # @raise [UnexpectedResponse] when the response is not successful.
@@ -5,7 +5,19 @@ module Dor
5
5
  class Client
6
6
  # API calls that are about user versions
7
7
  class UserVersion < VersionedService
8
- Version = Struct.new(:version, :userVersion, :withdrawn, keyword_init: true)
8
+ Version = Struct.new(:version, :userVersion, :withdrawn, :withdrawable, :restorable, :head, keyword_init: true) do
9
+ def restorable?
10
+ restorable
11
+ end
12
+
13
+ def withdrawable?
14
+ withdrawable
15
+ end
16
+
17
+ def head?
18
+ head
19
+ end
20
+ end
9
21
 
10
22
  # @param object_identifier [String] the pid for the object
11
23
  def initialize(connection:, version:, object_identifier:)
@@ -3,7 +3,7 @@
3
3
  module Dor
4
4
  module Services
5
5
  class Client
6
- VERSION = '14.16.0'
6
+ VERSION = '14.18.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: 14.16.0
4
+ version: 14.18.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: 2024-07-10 00:00:00.000000000 Z
12
+ date: 2024-07-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -280,7 +280,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
280
280
  - !ruby/object:Gem::Version
281
281
  version: '0'
282
282
  requirements: []
283
- rubygems_version: 3.5.15
283
+ rubygems_version: 3.4.19
284
284
  signing_key:
285
285
  specification_version: 4
286
286
  summary: A client for dor-services-app