dor-services-client 12.14.0 → 12.16.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +1 -1
- data/.rubocop.yml +109 -3
- data/.rubocop_todo.yml +11 -13
- data/Gemfile.lock +47 -40
- data/README.md +6 -6
- data/dor-services-client.gemspec +1 -1
- data/lib/dor/services/client/object.rb +12 -4
- data/lib/dor/services/client/version.rb +1 -1
- metadata +5 -6
- data/lib/dor/services/client/metadata.rb +0 -62
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ec7edce5ca401aae71ab8e4b98b1b1c44c646e4565f25ba615ff8b0536ad807f
|
4
|
+
data.tar.gz: faabe27c830efb9135f1d171ca6a78193ce46c5edf98455850a9d555c470e336
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1150fe0e08f2ea9a6bfe9a9bb198c85e661c0cb856b4d4c50392da8c69ce478d81cbc88d6c9936f95f2cedefbe3ab147944b69764fd3b0cd52ed7761eda1ae2d
|
7
|
+
data.tar.gz: 72c6d2a0c24e2cce44ead61de2f5eed38234b72fcbf75a0131e14e0c5b4126b2d0a3cbeeb69e18d614061a43f5a409791956f14cedf168c900576b6bd6b47a15
|
data/.circleci/config.yml
CHANGED
data/.rubocop.yml
CHANGED
@@ -133,7 +133,7 @@ RSpec/IdenticalEqualityAssertion: # new in 2.4
|
|
133
133
|
Enabled: true
|
134
134
|
RSpec/SubjectDeclaration: # new in 2.5
|
135
135
|
Enabled: true
|
136
|
-
|
136
|
+
FactoryBot/SyntaxMethods: # new in 2.7
|
137
137
|
Enabled: true
|
138
138
|
RSpec/Rails/AvoidSetupHook: # new in 2.4
|
139
139
|
Enabled: true
|
@@ -177,7 +177,7 @@ Style/MapCompactWithConditionalBlock: # new in 1.30
|
|
177
177
|
Enabled: true
|
178
178
|
RSpec/ChangeByZero: # new in 2.11.0
|
179
179
|
Enabled: true
|
180
|
-
|
180
|
+
Capybara/SpecificMatcher: # new in 2.12
|
181
181
|
Enabled: false
|
182
182
|
RSpec/Rails/HaveHttpStatus: # new in 2.12
|
183
183
|
Enabled: false
|
@@ -186,5 +186,111 @@ RSpec/ClassCheck: # new in 2.13
|
|
186
186
|
Enabled: true
|
187
187
|
RSpec/NoExpectationExample: # new in 2.13
|
188
188
|
Enabled: true
|
189
|
-
|
189
|
+
Capybara/SpecificFinders: # new in 2.13
|
190
190
|
Enabled: true
|
191
|
+
|
192
|
+
Gemspec/DevelopmentDependencies: # new in 1.44
|
193
|
+
Enabled: false
|
194
|
+
Lint/DuplicateMagicComment: # new in 1.37
|
195
|
+
Enabled: true
|
196
|
+
Lint/DuplicateMatchPattern: # new in 1.50
|
197
|
+
Enabled: true
|
198
|
+
Lint/UselessRescue: # new in 1.43
|
199
|
+
Enabled: true
|
200
|
+
Metrics/CollectionLiteralLength: # new in 1.47
|
201
|
+
Enabled: true
|
202
|
+
Style/ArrayIntersect: # new in 1.40
|
203
|
+
Enabled: true
|
204
|
+
Style/ComparableClamp: # new in 1.44
|
205
|
+
Enabled: true
|
206
|
+
Style/ConcatArrayLiterals: # new in 1.41
|
207
|
+
Enabled: true
|
208
|
+
Style/DataInheritance: # new in 1.49
|
209
|
+
Enabled: true
|
210
|
+
Style/DirEmpty: # new in 1.48
|
211
|
+
Enabled: true
|
212
|
+
Style/ExactRegexpMatch: # new in 1.51
|
213
|
+
Enabled: true
|
214
|
+
Style/FileEmpty: # new in 1.48
|
215
|
+
Enabled: true
|
216
|
+
Style/MapToSet: # new in 1.42
|
217
|
+
Enabled: true
|
218
|
+
Style/MinMaxComparison: # new in 1.42
|
219
|
+
Enabled: true
|
220
|
+
Style/OperatorMethodCall: # new in 1.37
|
221
|
+
Enabled: true
|
222
|
+
Style/RedundantArrayConstructor: # new in 1.52
|
223
|
+
Enabled: true
|
224
|
+
Style/RedundantConstantBase: # new in 1.40
|
225
|
+
Enabled: true
|
226
|
+
Style/RedundantDoubleSplatHashBraces: # new in 1.41
|
227
|
+
Enabled: true
|
228
|
+
Style/RedundantEach: # new in 1.38
|
229
|
+
Enabled: true
|
230
|
+
Style/RedundantFilterChain: # new in 1.52
|
231
|
+
Enabled: true
|
232
|
+
Style/RedundantHeredocDelimiterQuotes: # new in 1.45
|
233
|
+
Enabled: true
|
234
|
+
Style/RedundantLineContinuation: # new in 1.49
|
235
|
+
Enabled: true
|
236
|
+
Style/RedundantRegexpConstructor: # new in 1.52
|
237
|
+
Enabled: true
|
238
|
+
Style/RedundantStringEscape: # new in 1.37
|
239
|
+
Enabled: true
|
240
|
+
Capybara/MatchStyle: # new in 2.17
|
241
|
+
Enabled: true
|
242
|
+
Capybara/NegationMatcher: # new in 2.14
|
243
|
+
Enabled: true
|
244
|
+
Capybara/SpecificActions: # new in 2.14
|
245
|
+
Enabled: true
|
246
|
+
FactoryBot/AssociationStyle: # new in 2.23
|
247
|
+
Enabled: true
|
248
|
+
FactoryBot/ConsistentParenthesesStyle: # new in 2.14
|
249
|
+
Enabled: true
|
250
|
+
FactoryBot/FactoryAssociationWithStrategy: # new in 2.23
|
251
|
+
Enabled: true
|
252
|
+
FactoryBot/FactoryNameStyle: # new in 2.16
|
253
|
+
Enabled: true
|
254
|
+
FactoryBot/RedundantFactoryOption: # new in 2.23
|
255
|
+
Enabled: true
|
256
|
+
RSpec/BeEmpty: # new in 2.20
|
257
|
+
Enabled: true
|
258
|
+
RSpec/ContainExactly: # new in 2.19
|
259
|
+
Enabled: true
|
260
|
+
RSpec/DuplicatedMetadata: # new in 2.16
|
261
|
+
Enabled: true
|
262
|
+
RSpec/IndexedLet: # new in 2.20
|
263
|
+
Enabled: true
|
264
|
+
RSpec/MatchArray: # new in 2.19
|
265
|
+
Enabled: true
|
266
|
+
RSpec/PendingWithoutReason: # new in 2.16
|
267
|
+
Enabled: true
|
268
|
+
RSpec/RedundantAround: # new in 2.19
|
269
|
+
Enabled: true
|
270
|
+
RSpec/SkipBlockInsideExample: # new in 2.19
|
271
|
+
Enabled: true
|
272
|
+
RSpec/SortMetadata: # new in 2.14
|
273
|
+
Enabled: true
|
274
|
+
RSpec/Rails/InferredSpecType: # new in 2.14
|
275
|
+
Enabled: true
|
276
|
+
RSpec/Rails/MinitestAssertions: # new in 2.17
|
277
|
+
Enabled: true
|
278
|
+
RSpec/Rails/TravelAround: # new in 2.19
|
279
|
+
Enabled: true
|
280
|
+
|
281
|
+
Lint/MixedCaseRange: # new in 1.53
|
282
|
+
Enabled: true
|
283
|
+
Lint/RedundantRegexpQuantifiers: # new in 1.53
|
284
|
+
Enabled: true
|
285
|
+
Style/RedundantCurrentDirectoryInPath: # new in 1.53
|
286
|
+
Enabled: true
|
287
|
+
Style/RedundantRegexpArgument: # new in 1.53
|
288
|
+
Enabled: true
|
289
|
+
Style/ReturnNilInPredicateMethodDefinition: # new in 1.53
|
290
|
+
Enabled: true
|
291
|
+
Style/YAMLFileRead: # new in 1.53
|
292
|
+
Enabled: true
|
293
|
+
RSpec/ReceiveMessages: # new in 2.23
|
294
|
+
Enabled: true
|
295
|
+
RSpec/Rails/NegationBeValid: # new in 2.23
|
296
|
+
Enabled: true
|
data/.rubocop_todo.yml
CHANGED
@@ -1,28 +1,27 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config --auto-gen-only-exclude`
|
3
|
-
# on
|
3
|
+
# on 2023-06-20 05:36:17 UTC using RuboCop version 1.52.1.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
8
8
|
|
9
|
-
# Offense count:
|
10
|
-
# Configuration parameters:
|
9
|
+
# Offense count: 1
|
10
|
+
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
|
11
11
|
Metrics/AbcSize:
|
12
12
|
Exclude:
|
13
13
|
- 'lib/dor/services/client/marcxml.rb'
|
14
14
|
|
15
15
|
# Offense count: 1
|
16
|
-
# Configuration parameters: CountComments, Max, CountAsOne,
|
16
|
+
# Configuration parameters: CountComments, Max, CountAsOne, AllowedMethods, AllowedPatterns.
|
17
17
|
Metrics/MethodLength:
|
18
18
|
Exclude:
|
19
19
|
- 'lib/dor/services/client/transfer.rb'
|
20
20
|
|
21
|
-
# Offense count:
|
21
|
+
# Offense count: 3
|
22
22
|
RSpec/AnyInstance:
|
23
23
|
Exclude:
|
24
24
|
- 'spec/dor/services/client/async_result_spec.rb'
|
25
|
-
- 'spec/dor/services/client/metadata_spec.rb'
|
26
25
|
- 'spec/dor/services/client/object_version_spec.rb'
|
27
26
|
|
28
27
|
# Offense count: 6
|
@@ -31,18 +30,17 @@ RSpec/IdenticalEqualityAssertion:
|
|
31
30
|
- 'spec/dor/services/client_spec.rb'
|
32
31
|
|
33
32
|
# Offense count: 1
|
34
|
-
#
|
33
|
+
# This cop supports safe autocorrection (--autocorrect).
|
35
34
|
RSpec/MultipleSubjects:
|
36
35
|
Exclude:
|
37
36
|
- 'spec/dor/services/client/object_spec.rb'
|
38
37
|
|
39
|
-
# Offense count:
|
40
|
-
# Configuration parameters: Max.
|
38
|
+
# Offense count: 9
|
39
|
+
# Configuration parameters: Max, AllowedGroups.
|
41
40
|
RSpec/NestedGroups:
|
42
41
|
Exclude:
|
43
42
|
- 'spec/dor/services/client/accession_spec.rb'
|
44
43
|
- 'spec/dor/services/client/background_job_results_spec.rb'
|
45
|
-
- 'spec/dor/services/client/metadata_spec.rb'
|
46
44
|
- 'spec/dor/services/client/objects_spec.rb'
|
47
45
|
- 'spec/dor/services/client_spec.rb'
|
48
46
|
|
@@ -65,9 +63,9 @@ Style/Documentation:
|
|
65
63
|
- 'test/**/*'
|
66
64
|
- 'lib/dor/services/client.rb'
|
67
65
|
|
68
|
-
# Offense count:
|
69
|
-
#
|
70
|
-
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives,
|
66
|
+
# Offense count: 47
|
67
|
+
# This cop supports safe autocorrection (--autocorrect).
|
68
|
+
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
|
71
69
|
# URISchemes: http, https
|
72
70
|
Layout/LineLength:
|
73
71
|
Max: 164
|
data/Gemfile.lock
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
dor-services-client (12.
|
4
|
+
dor-services-client (12.16.0)
|
5
5
|
activesupport (>= 4.2, < 8)
|
6
|
-
cocina-models (~> 0.
|
6
|
+
cocina-models (~> 0.91.0)
|
7
7
|
deprecation
|
8
8
|
faraday (~> 2.0)
|
9
9
|
faraday-retry
|
@@ -12,17 +12,18 @@ PATH
|
|
12
12
|
GEM
|
13
13
|
remote: https://rubygems.org/
|
14
14
|
specs:
|
15
|
-
activesupport (7.0.
|
15
|
+
activesupport (7.0.8)
|
16
16
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
17
17
|
i18n (>= 1.6, < 2)
|
18
18
|
minitest (>= 5.1)
|
19
19
|
tzinfo (~> 2.0)
|
20
|
-
addressable (2.8.
|
20
|
+
addressable (2.8.5)
|
21
21
|
public_suffix (>= 2.0.2, < 6.0)
|
22
22
|
ast (2.4.2)
|
23
23
|
attr_extras (7.1.0)
|
24
|
+
base64 (0.1.1)
|
24
25
|
byebug (11.1.3)
|
25
|
-
cocina-models (0.
|
26
|
+
cocina-models (0.91.0)
|
26
27
|
activesupport
|
27
28
|
deprecation
|
28
29
|
dry-struct (~> 1.0)
|
@@ -32,12 +33,12 @@ GEM
|
|
32
33
|
jsonpath
|
33
34
|
nokogiri
|
34
35
|
openapi3_parser
|
35
|
-
openapi_parser (
|
36
|
+
openapi_parser (~> 1.0)
|
36
37
|
rss
|
37
38
|
super_diff
|
38
39
|
thor
|
39
40
|
zeitwerk (~> 2.1)
|
40
|
-
commonmarker (0.23.
|
41
|
+
commonmarker (0.23.10)
|
41
42
|
concurrent-ruby (1.2.2)
|
42
43
|
crack (0.4.5)
|
43
44
|
rexml
|
@@ -45,7 +46,7 @@ GEM
|
|
45
46
|
activesupport
|
46
47
|
diff-lcs (1.5.0)
|
47
48
|
docile (1.4.0)
|
48
|
-
dry-core (1.0.
|
49
|
+
dry-core (1.0.1)
|
49
50
|
concurrent-ruby (~> 1.0)
|
50
51
|
zeitwerk (~> 2.6)
|
51
52
|
dry-inflector (1.0.0)
|
@@ -68,74 +69,79 @@ GEM
|
|
68
69
|
activesupport (>= 3.0, < 8.0)
|
69
70
|
equivalent-xml (0.6.0)
|
70
71
|
nokogiri (>= 1.4.3)
|
71
|
-
faraday (2.7.
|
72
|
+
faraday (2.7.10)
|
72
73
|
faraday-net_http (>= 2.0, < 3.1)
|
73
74
|
ruby2_keywords (>= 0.0.4)
|
74
75
|
faraday-net_http (3.0.2)
|
75
|
-
faraday-retry (2.
|
76
|
+
faraday-retry (2.2.0)
|
76
77
|
faraday (~> 2.0)
|
77
78
|
hashdiff (1.0.1)
|
78
|
-
i18n (1.
|
79
|
+
i18n (1.14.1)
|
79
80
|
concurrent-ruby (~> 1.0)
|
80
81
|
ice_nine (0.11.2)
|
81
82
|
json (2.6.3)
|
82
|
-
jsonpath (1.1.
|
83
|
+
jsonpath (1.1.3)
|
83
84
|
multi_json
|
84
|
-
|
85
|
-
minitest (5.
|
85
|
+
language_server-protocol (3.17.0.3)
|
86
|
+
minitest (5.20.0)
|
86
87
|
multi_json (1.15.0)
|
87
|
-
nokogiri (1.
|
88
|
-
mini_portile2 (~> 2.8.0)
|
88
|
+
nokogiri (1.15.4-x86_64-darwin)
|
89
89
|
racc (~> 1.4)
|
90
|
-
nokogiri (1.
|
90
|
+
nokogiri (1.15.4-x86_64-linux)
|
91
91
|
racc (~> 1.4)
|
92
92
|
openapi3_parser (0.9.2)
|
93
93
|
commonmarker (~> 0.17)
|
94
|
-
openapi_parser (0.
|
95
|
-
optimist (3.0
|
96
|
-
parallel (1.
|
97
|
-
parser (3.2.
|
94
|
+
openapi_parser (1.0.0)
|
95
|
+
optimist (3.1.0)
|
96
|
+
parallel (1.23.0)
|
97
|
+
parser (3.2.2.3)
|
98
98
|
ast (~> 2.4.1)
|
99
|
+
racc
|
99
100
|
patience_diff (1.2.0)
|
100
101
|
optimist (~> 3.0)
|
101
|
-
public_suffix (5.0.
|
102
|
-
racc (1.
|
102
|
+
public_suffix (5.0.3)
|
103
|
+
racc (1.7.1)
|
103
104
|
rainbow (3.1.1)
|
104
105
|
rake (13.0.6)
|
105
|
-
regexp_parser (2.
|
106
|
-
rexml (3.2.
|
106
|
+
regexp_parser (2.8.1)
|
107
|
+
rexml (3.2.6)
|
107
108
|
rspec (3.12.0)
|
108
109
|
rspec-core (~> 3.12.0)
|
109
110
|
rspec-expectations (~> 3.12.0)
|
110
111
|
rspec-mocks (~> 3.12.0)
|
111
|
-
rspec-core (3.12.
|
112
|
+
rspec-core (3.12.2)
|
112
113
|
rspec-support (~> 3.12.0)
|
113
|
-
rspec-expectations (3.12.
|
114
|
+
rspec-expectations (3.12.3)
|
114
115
|
diff-lcs (>= 1.2.0, < 2.0)
|
115
116
|
rspec-support (~> 3.12.0)
|
116
|
-
rspec-mocks (3.12.
|
117
|
+
rspec-mocks (3.12.6)
|
117
118
|
diff-lcs (>= 1.2.0, < 2.0)
|
118
119
|
rspec-support (~> 3.12.0)
|
119
|
-
rspec-support (3.12.
|
120
|
-
rss (0.
|
120
|
+
rspec-support (3.12.1)
|
121
|
+
rss (0.3.0)
|
121
122
|
rexml
|
122
|
-
rubocop (1.
|
123
|
+
rubocop (1.56.3)
|
124
|
+
base64 (~> 0.1.1)
|
123
125
|
json (~> 2.3)
|
126
|
+
language_server-protocol (>= 3.17.0)
|
124
127
|
parallel (~> 1.10)
|
125
|
-
parser (>= 3.2.
|
128
|
+
parser (>= 3.2.2.3)
|
126
129
|
rainbow (>= 2.2.2, < 4.0)
|
127
130
|
regexp_parser (>= 1.8, < 3.0)
|
128
131
|
rexml (>= 3.2.5, < 4.0)
|
129
|
-
rubocop-ast (>= 1.
|
132
|
+
rubocop-ast (>= 1.28.1, < 2.0)
|
130
133
|
ruby-progressbar (~> 1.7)
|
131
134
|
unicode-display_width (>= 2.4.0, < 3.0)
|
132
|
-
rubocop-ast (1.
|
135
|
+
rubocop-ast (1.29.0)
|
133
136
|
parser (>= 3.2.1.0)
|
134
|
-
rubocop-capybara (2.
|
137
|
+
rubocop-capybara (2.18.0)
|
135
138
|
rubocop (~> 1.41)
|
136
|
-
rubocop-
|
139
|
+
rubocop-factory_bot (2.23.1)
|
140
|
+
rubocop (~> 1.33)
|
141
|
+
rubocop-rspec (2.24.0)
|
137
142
|
rubocop (~> 1.33)
|
138
143
|
rubocop-capybara (~> 2.17)
|
144
|
+
rubocop-factory_bot (~> 2.22)
|
139
145
|
ruby-progressbar (1.13.0)
|
140
146
|
ruby2_keywords (0.0.5)
|
141
147
|
simplecov (0.22.0)
|
@@ -148,20 +154,21 @@ GEM
|
|
148
154
|
attr_extras (>= 6.2.4)
|
149
155
|
diff-lcs
|
150
156
|
patience_diff
|
151
|
-
thor (1.2.
|
157
|
+
thor (1.2.2)
|
152
158
|
tzinfo (2.0.6)
|
153
159
|
concurrent-ruby (~> 1.0)
|
154
160
|
unicode-display_width (2.4.2)
|
155
|
-
webmock (3.
|
161
|
+
webmock (3.19.1)
|
156
162
|
addressable (>= 2.8.0)
|
157
163
|
crack (>= 0.3.2)
|
158
164
|
hashdiff (>= 0.4.0, < 2.0.0)
|
159
|
-
zeitwerk (2.6.
|
165
|
+
zeitwerk (2.6.11)
|
160
166
|
|
161
167
|
PLATFORMS
|
162
168
|
x86_64-darwin-19
|
163
169
|
x86_64-darwin-20
|
164
170
|
x86_64-darwin-21
|
171
|
+
x86_64-darwin-22
|
165
172
|
x86_64-linux
|
166
173
|
|
167
174
|
DEPENDENCIES
|
@@ -176,4 +183,4 @@ DEPENDENCIES
|
|
176
183
|
webmock
|
177
184
|
|
178
185
|
BUNDLED WITH
|
179
|
-
2.
|
186
|
+
2.4.13
|
data/README.md
CHANGED
@@ -114,6 +114,12 @@ object_client.preserve(lane_id: 'low')
|
|
114
114
|
# Update the MARC record (used in the releaseWF)
|
115
115
|
object_client.update_marc_record
|
116
116
|
|
117
|
+
# Update the DOI metadata (used by robot)
|
118
|
+
object_client.update_doi_metadata
|
119
|
+
|
120
|
+
# Update the Orcid work (used by robot)
|
121
|
+
object_client.update_orcid_work
|
122
|
+
|
117
123
|
# Copy metadata from Symphony into descMetadata
|
118
124
|
object_client.refresh_descriptive_metadata_from_ils
|
119
125
|
|
@@ -132,12 +138,6 @@ object_client.version.open(description: 'Changed title', significance: 'minor')
|
|
132
138
|
# see dor-services-app openapi.yml for optional params
|
133
139
|
object_client.version.close
|
134
140
|
|
135
|
-
# Get the Dublin Core XML representation
|
136
|
-
object_client.metadata.dublin_core
|
137
|
-
|
138
|
-
# Get the public descriptive XML representation
|
139
|
-
object_client.metadata.descriptive
|
140
|
-
|
141
141
|
# Return the Cocina metadata
|
142
142
|
object_client.find
|
143
143
|
|
data/dor-services-client.gemspec
CHANGED
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.required_ruby_version = '>= 3.0', '< 4'
|
26
26
|
|
27
27
|
spec.add_dependency 'activesupport', '>= 4.2', '< 8'
|
28
|
-
spec.add_dependency 'cocina-models', '~> 0.
|
28
|
+
spec.add_dependency 'cocina-models', '~> 0.91.0'
|
29
29
|
spec.add_dependency 'deprecation', '>= 0'
|
30
30
|
spec.add_dependency 'faraday', '~> 2.0'
|
31
31
|
spec.add_dependency 'faraday-retry'
|
@@ -18,10 +18,6 @@ module Dor
|
|
18
18
|
@object_identifier = object_identifier
|
19
19
|
end
|
20
20
|
|
21
|
-
def metadata
|
22
|
-
@metadata ||= Metadata.new(**parent_params)
|
23
|
-
end
|
24
|
-
|
25
21
|
def events
|
26
22
|
@events ||= Events.new(**parent_params)
|
27
23
|
end
|
@@ -110,6 +106,18 @@ module Dor
|
|
110
106
|
raise_exception_based_on_response!(resp)
|
111
107
|
end
|
112
108
|
|
109
|
+
# Update the ORCID Work
|
110
|
+
# @raise [NotFoundResponse] when the response is a 404 (object not found)
|
111
|
+
# @return [Boolean] true on success
|
112
|
+
def update_orcid_work
|
113
|
+
resp = connection.post do |req|
|
114
|
+
req.url "#{object_path}/update_orcid_work"
|
115
|
+
end
|
116
|
+
return true if resp.success?
|
117
|
+
|
118
|
+
raise_exception_based_on_response!(resp)
|
119
|
+
end
|
120
|
+
|
113
121
|
# Notify the external Goobi system for a new object that was registered in DOR
|
114
122
|
# @raise [NotFoundResponse] when the response is a 404 (object not found)
|
115
123
|
# @raise [UnexpectedResponse] when the response is not successful.
|
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: 12.
|
4
|
+
version: 12.16.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: 2023-
|
12
|
+
date: 2023-09-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -37,14 +37,14 @@ dependencies:
|
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.
|
40
|
+
version: 0.91.0
|
41
41
|
type: :runtime
|
42
42
|
prerelease: false
|
43
43
|
version_requirements: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.
|
47
|
+
version: 0.91.0
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
name: deprecation
|
50
50
|
requirement: !ruby/object:Gem::Requirement
|
@@ -247,7 +247,6 @@ files:
|
|
247
247
|
- lib/dor/services/client/events.rb
|
248
248
|
- lib/dor/services/client/marcxml.rb
|
249
249
|
- lib/dor/services/client/members.rb
|
250
|
-
- lib/dor/services/client/metadata.rb
|
251
250
|
- lib/dor/services/client/mutate.rb
|
252
251
|
- lib/dor/services/client/object.rb
|
253
252
|
- lib/dor/services/client/object_version.rb
|
@@ -280,7 +279,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
280
279
|
- !ruby/object:Gem::Version
|
281
280
|
version: '0'
|
282
281
|
requirements: []
|
283
|
-
rubygems_version: 3.
|
282
|
+
rubygems_version: 3.3.7
|
284
283
|
signing_key:
|
285
284
|
specification_version: 4
|
286
285
|
summary: A client for dor-services-app
|
@@ -1,62 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'active_support/json' # required for serializing time as iso8601
|
4
|
-
|
5
|
-
module Dor
|
6
|
-
module Services
|
7
|
-
class Client
|
8
|
-
# API calls that are about retrieving metadata
|
9
|
-
class Metadata < VersionedService
|
10
|
-
# @param object_identifier [String] the pid for the object
|
11
|
-
def initialize(connection:, version:, object_identifier:)
|
12
|
-
super(connection: connection, version: version)
|
13
|
-
@object_identifier = object_identifier
|
14
|
-
end
|
15
|
-
|
16
|
-
# @return [String, NilClass] The Dublin Core XML representation of the object or nil if response is 404
|
17
|
-
# @raise [UnexpectedResponse] on an unsuccessful response from the server
|
18
|
-
def dublin_core
|
19
|
-
resp = connection.get do |req|
|
20
|
-
req.url "#{base_path}/dublin_core"
|
21
|
-
end
|
22
|
-
return resp.body if resp.success?
|
23
|
-
return if resp.status == 404
|
24
|
-
|
25
|
-
raise_exception_based_on_response!(resp, object_identifier)
|
26
|
-
end
|
27
|
-
|
28
|
-
# @return [String, NilClass] The public descriptive metadata XML representation of the object or nil if response is 404
|
29
|
-
# @raise [UnexpectedResponse] on an unsuccessful response from the server
|
30
|
-
def descriptive
|
31
|
-
resp = connection.get do |req|
|
32
|
-
req.url "#{base_path}/descriptive"
|
33
|
-
end
|
34
|
-
return resp.body if resp.success?
|
35
|
-
return if resp.status == 404
|
36
|
-
|
37
|
-
raise_exception_based_on_response!(resp, object_identifier)
|
38
|
-
end
|
39
|
-
|
40
|
-
# @return [String, NilClass] the dor object's source MODS XML or nil if response is 404
|
41
|
-
# @raise [UnexpectedResponse] on an unsuccessful response from the server
|
42
|
-
def mods
|
43
|
-
resp = connection.get do |req|
|
44
|
-
req.url "#{base_path}/mods"
|
45
|
-
end
|
46
|
-
return resp.body if resp.success?
|
47
|
-
return if resp.status == 404
|
48
|
-
|
49
|
-
raise_exception_based_on_response!(resp, object_identifier)
|
50
|
-
end
|
51
|
-
|
52
|
-
private
|
53
|
-
|
54
|
-
attr_reader :object_identifier
|
55
|
-
|
56
|
-
def base_path
|
57
|
-
"#{api_version}/objects/#{object_identifier}/metadata"
|
58
|
-
end
|
59
|
-
end
|
60
|
-
end
|
61
|
-
end
|
62
|
-
end
|