dor-services-client 15.69.0 → 15.70.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: f7eb1b5eb6201610e9bd4496dcc0709e4a3348639aae0655c25373b98d00c621
4
- data.tar.gz: f45e73e423f64393198f41d2ef7f4d954bc0794b470aea4e7b647e2f37cd2e01
3
+ metadata.gz: d2d01ad7fc1729cfbadc4a1b5b2295cb506d0c280cf3ccdad25e2d587ba6e6b0
4
+ data.tar.gz: 83ffa45286a613eaff5debb049ac448f972a007c0acf48cafd32cac7fae954e2
5
5
  SHA512:
6
- metadata.gz: ba12e822c3fcbd54f30d140ed114ee680854580b00a9632aa77b6f1081ca31258693836f4b5b325e18bfde34c38c3055cd81c6e4cc6f7c18ceb76de03403ac50
7
- data.tar.gz: 5d825bc8d170005932dcd7d9d104c43ad7a3560aa6e99673c245fa6abbf1de01993286cef5aeb4930ea297db304fa88db58a5bd6ea6b6bd6d2deb595e51869d3
6
+ metadata.gz: b9f74ef35fac2d94a9e4061bb8197ec91465423e1c027a0f669851d989bad7326ce36234ca8d9d339963131e1ae67ba25b6d3db8eab1d096b7db17a4b4093e44
7
+ data.tar.gz: 48002be6cf8082e8ec5aba236d7d3e96b0df6feb6aebf5a30ab95c0393d54a5f15911e2e95133330ae3dad5b5c5ac0b5710b1a41a7aebc6362bd1d9987e38bc0
data/.circleci/config.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  version: 2.1
2
2
  orbs:
3
- ruby-rails: sul-dlss/ruby-rails@4.13.1
3
+ ruby-rails: sul-dlss/ruby-rails@5.0.0
4
4
  workflows:
5
5
  build:
6
6
  jobs:
data/.rubocop.yml CHANGED
@@ -4,9 +4,14 @@ plugins:
4
4
  - rubocop-rspec
5
5
 
6
6
  AllCops:
7
- TargetRubyVersion: 3.0
7
+ TargetRubyVersion: 4.0
8
8
  SuggestExtensions: false
9
9
 
10
+ # Development uses Ruby 4, but the gem still supports older consumers.
11
+ Gemspec/RequiredRubyVersion:
12
+ Exclude:
13
+ - dor-services-client.gemspec
14
+
10
15
  Metrics/BlockLength:
11
16
  Exclude:
12
17
  - 'dor-services-client.gemspec'
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dor-services-client (15.69.0)
4
+ dor-services-client (15.70.0)
5
5
  activesupport (>= 7.0.0)
6
6
  cocina-models (~> 0.133.0)
7
7
  deprecation
@@ -27,7 +27,7 @@ GEM
27
27
  securerandom (>= 0.3)
28
28
  tzinfo (~> 2.0, >= 2.0.5)
29
29
  uri (>= 0.13.1)
30
- addressable (2.9.0)
30
+ addressable (2.9.2)
31
31
  public_suffix (>= 2.0.2, < 8.0)
32
32
  ast (2.4.3)
33
33
  attr_extras (7.1.0)
@@ -49,7 +49,7 @@ GEM
49
49
  super_diff
50
50
  thor
51
51
  zeitwerk (~> 2.1)
52
- cocina_display (2.13.0)
52
+ cocina_display (2.14.0)
53
53
  activesupport (>= 7)
54
54
  edtf (~> 3.2)
55
55
  geo_coord (~> 0.2)
@@ -92,30 +92,30 @@ GEM
92
92
  activesupport (>= 3.0, < 9.0)
93
93
  equivalent-xml (0.6.0)
94
94
  nokogiri (>= 1.4.3)
95
- faraday (2.14.4)
96
- faraday-net_http (>= 2.0, < 3.5)
95
+ faraday (2.15.1)
96
+ faraday-net_http (>= 2.0, < 3.6)
97
97
  json
98
98
  logger
99
- faraday-net_http (3.4.4)
99
+ faraday-net_http (3.5.0)
100
100
  net-http (~> 0.5)
101
101
  faraday-retry (2.4.0)
102
102
  faraday (~> 2.0)
103
103
  geo_coord (0.2.0)
104
104
  hashdiff (1.2.1)
105
- hashie (5.1.0)
105
+ hashie (5.2.0)
106
106
  logger
107
107
  i18n (1.15.2)
108
108
  concurrent-ruby (~> 1.0)
109
109
  ice_nine (0.11.2)
110
- io-console (0.9.4)
110
+ io-console (0.9.5)
111
111
  iso8601 (0.13.0)
112
- janeway-jsonpath (1.1.0)
113
- json (3.0.2)
114
- jsonschema_rs (0.58.5-arm64-darwin)
112
+ janeway-jsonpath (1.2.0)
113
+ json (3.1.0)
114
+ jsonschema_rs (0.60.2-arm64-darwin)
115
115
  bigdecimal (>= 3.1, < 5)
116
- jsonschema_rs (0.58.5-x86_64-darwin)
116
+ jsonschema_rs (0.60.2-x86_64-darwin)
117
117
  bigdecimal (>= 3.1, < 5)
118
- jsonschema_rs (0.58.5-x86_64-linux)
118
+ jsonschema_rs (0.60.2-x86_64-linux)
119
119
  bigdecimal (>= 3.1, < 5)
120
120
  language_server-protocol (3.17.0.6)
121
121
  lint_roller (1.1.0)
@@ -123,17 +123,20 @@ GEM
123
123
  minitest (6.0.6)
124
124
  drb (~> 2.0)
125
125
  prism (~> 1.5)
126
- net-http (0.9.1)
126
+ net-http (0.10.0)
127
+ net-protocol (>= 0.3.0)
127
128
  uri (>= 0.11.1)
128
- nokogiri (1.19.4-arm64-darwin)
129
+ net-protocol (0.4.0)
130
+ timeout
131
+ nokogiri (1.19.6-arm64-darwin)
129
132
  racc (~> 1.4)
130
- nokogiri (1.19.4-x86_64-darwin)
133
+ nokogiri (1.19.6-x86_64-darwin)
131
134
  racc (~> 1.4)
132
- nokogiri (1.19.4-x86_64-linux-gnu)
135
+ nokogiri (1.19.6-x86_64-linux-gnu)
133
136
  racc (~> 1.4)
134
137
  optimist (3.2.1)
135
138
  parallel (2.3.0)
136
- parser (3.3.12.0)
139
+ parser (3.3.13.0)
137
140
  ast (~> 2.4.1)
138
141
  racc
139
142
  patience_diff (1.2.0)
@@ -160,14 +163,14 @@ GEM
160
163
  diff-lcs (>= 1.2.0, < 2.0)
161
164
  rspec-support (~> 3.13.0)
162
165
  rspec-support (3.13.7)
163
- rubocop (1.91.0)
166
+ rubocop (1.92.2)
164
167
  json (>= 2.3)
165
168
  language_server-protocol (~> 3.17.0.2)
166
169
  lint_roller (~> 1.1.0)
167
170
  parallel (>= 1.10)
168
171
  parser (>= 3.3.0.2)
169
172
  rainbow (>= 2.2.2, < 4.0)
170
- regexp_parser (>= 2.9.3, < 3.0)
173
+ regexp_parser (>= 2.11.3, < 3.0)
171
174
  rubocop-ast (>= 1.49.0, < 2.0)
172
175
  ruby-progressbar (~> 1.7)
173
176
  unicode-display_width (>= 2.4.0, < 4.0)
@@ -186,13 +189,14 @@ GEM
186
189
  diff-lcs (~> 1.5)
187
190
  patience_diff (~> 1.2)
188
191
  thor (1.5.0)
192
+ timeout (0.6.1)
189
193
  tzinfo (2.0.6)
190
194
  concurrent-ruby (~> 1.0)
191
195
  unicode-display_width (3.3.0)
192
196
  unicode-emoji (~> 4.3)
193
197
  unicode-emoji (4.3.0)
194
- uri (1.1.1)
195
- webmock (3.26.4)
198
+ uri (1.1.2)
199
+ webmock (3.34.0)
196
200
  addressable (>= 2.8.0)
197
201
  crack (>= 0.3.2)
198
202
  hashdiff (>= 0.4.0, < 2.0.0)
@@ -220,4 +224,4 @@ DEPENDENCIES
220
224
  webmock
221
225
 
222
226
  BUNDLED WITH
223
- 4.0.22
227
+ 4.0.23
data/README.md CHANGED
@@ -134,6 +134,10 @@ object_client.user_version.update(user_version: Dor::Services::Client::UserVersi
134
134
  # Return the Cocina metadata
135
135
  object_client.find
136
136
 
137
+ # Return the Cocina metadata without the file sets (structural.contains), e.g., for objects with many files.
138
+ # Don't use the returned object for an update, which would remove its files.
139
+ object_client.find(without_structural_contains: true)
140
+
137
141
  # Returns "lite" Cocina metadata (excluding specified attributes)
138
142
  object_client.find_lite(structural: false, geographic: false)
139
143
 
@@ -169,7 +173,7 @@ object_client.events.list(event_types: ['version_open', 'version_close'])
169
173
  object_client.events.list(from: '2026-10-01', to: Time.now)
170
174
 
171
175
  # Create workspaces
172
- object_client.workspace.create(source: object_path_string)
176
+ object_client.workspace.create(content: true, metadata: true)
173
177
 
174
178
  # Reindex
175
179
  object_client.reindex
@@ -231,6 +235,8 @@ result.errors
231
235
 
232
236
  ## Development
233
237
 
238
+ Use Ruby 4.0.7 for development and testing.
239
+
234
240
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
235
241
 
236
242
  To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
@@ -68,12 +68,15 @@ module Dor
68
68
 
69
69
  # Retrieves the Cocina model
70
70
  # @param [boolean] validate validate the response object
71
+ # @param [boolean] without_structural_contains omit the file sets (structural.contains), e.g., for objects
72
+ # with many files. The returned model must not be used for an update, which would remove its files.
71
73
  # @raise [NotFoundResponse] when the response is a 404 (object not found)
72
74
  # @raise [UnexpectedResponse] when the response is not successful.
73
75
  # @return [Cocina::Models::DROWithMetadata,Cocina::Models::CollectionWithMetadata,Cocina::Models::AdminPolicyWithMetadata] the returned model
74
- def find(validate: false)
76
+ def find(validate: false, without_structural_contains: false)
75
77
  resp = connection.get do |req|
76
78
  req.url object_path
79
+ req.params['without_structural_contains'] = true if without_structural_contains
77
80
  end
78
81
  raise_exception_based_on_response!(resp) unless resp.success?
79
82
 
@@ -3,7 +3,7 @@
3
3
  module Dor
4
4
  module Services
5
5
  class Client
6
- VERSION = '15.69.0'
6
+ VERSION = '15.70.0'
7
7
  end
8
8
  end
9
9
  end
@@ -12,16 +12,13 @@ module Dor
12
12
  end
13
13
 
14
14
  # Initializes a new workspace
15
- # @param source [String] the path to the object (optional)
16
15
  # @param content [Boolean] determines if the content directory should be created (defaults to false)
17
16
  # @param metadata [Boolean] determines if the metadata directory should be created (defaults to false)
18
17
  # @raise [UnexpectedResponse] if the request is unsuccessful.
19
18
  # @return [String] the path to the directory created
20
- # rubocop:disable Metrics/AbcSize
21
- def create(source: nil, content: false, metadata: false)
19
+ def create(content: false, metadata: false)
22
20
  resp = connection.post do |req|
23
21
  req.url workspace_path
24
- req.params['source'] = source if source
25
22
  req.params['content'] = content
26
23
  req.params['metadata'] = metadata
27
24
  end
@@ -29,7 +26,6 @@ module Dor
29
26
 
30
27
  raise_exception_based_on_response!(resp, object_identifier) unless resp.success?
31
28
  end
32
- # rubocop:enable Metrics/AbcSize
33
29
 
34
30
  private
35
31
 
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.69.0
4
+ version: 15.70.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Coyne