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 +4 -4
- data/.circleci/config.yml +1 -1
- data/.rubocop.yml +6 -1
- data/Gemfile.lock +27 -23
- data/README.md +7 -1
- data/lib/dor/services/client/object.rb +4 -1
- data/lib/dor/services/client/version.rb +1 -1
- data/lib/dor/services/client/workspace.rb +1 -5
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d2d01ad7fc1729cfbadc4a1b5b2295cb506d0c280cf3ccdad25e2d587ba6e6b0
|
|
4
|
+
data.tar.gz: 83ffa45286a613eaff5debb049ac448f972a007c0acf48cafd32cac7fae954e2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b9f74ef35fac2d94a9e4061bb8197ec91465423e1c027a0f669851d989bad7326ce36234ca8d9d339963131e1ae67ba25b6d3db8eab1d096b7db17a4b4093e44
|
|
7
|
+
data.tar.gz: 48002be6cf8082e8ec5aba236d7d3e96b0df6feb6aebf5a30ab95c0393d54a5f15911e2e95133330ae3dad5b5c5ac0b5710b1a41a7aebc6362bd1d9987e38bc0
|
data/.circleci/config.yml
CHANGED
data/.rubocop.yml
CHANGED
|
@@ -4,9 +4,14 @@ plugins:
|
|
|
4
4
|
- rubocop-rspec
|
|
5
5
|
|
|
6
6
|
AllCops:
|
|
7
|
-
TargetRubyVersion:
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
96
|
-
faraday-net_http (>= 2.0, < 3.
|
|
95
|
+
faraday (2.15.1)
|
|
96
|
+
faraday-net_http (>= 2.0, < 3.6)
|
|
97
97
|
json
|
|
98
98
|
logger
|
|
99
|
-
faraday-net_http (3.
|
|
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.
|
|
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.
|
|
110
|
+
io-console (0.9.5)
|
|
111
111
|
iso8601 (0.13.0)
|
|
112
|
-
janeway-jsonpath (1.
|
|
113
|
-
json (3.0
|
|
114
|
-
jsonschema_rs (0.
|
|
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.
|
|
116
|
+
jsonschema_rs (0.60.2-x86_64-darwin)
|
|
117
117
|
bigdecimal (>= 3.1, < 5)
|
|
118
|
-
jsonschema_rs (0.
|
|
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.
|
|
126
|
+
net-http (0.10.0)
|
|
127
|
+
net-protocol (>= 0.3.0)
|
|
127
128
|
uri (>= 0.11.1)
|
|
128
|
-
|
|
129
|
+
net-protocol (0.4.0)
|
|
130
|
+
timeout
|
|
131
|
+
nokogiri (1.19.6-arm64-darwin)
|
|
129
132
|
racc (~> 1.4)
|
|
130
|
-
nokogiri (1.19.
|
|
133
|
+
nokogiri (1.19.6-x86_64-darwin)
|
|
131
134
|
racc (~> 1.4)
|
|
132
|
-
nokogiri (1.19.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
195
|
-
webmock (3.
|
|
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.
|
|
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(
|
|
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
|
|
|
@@ -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
|
-
|
|
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
|
|