preservation-client 7.1.0 → 7.3.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 -2
- data/.rubocop.yml +109 -31
- data/Gemfile.lock +77 -74
- data/README.md +2 -1
- data/lib/preservation/client/objects.rb +8 -2
- data/lib/preservation/client/version.rb +1 -1
- data/lib/preservation/client.rb +6 -0
- data/preservation-client.gemspec +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 164a8df77b290866471041f9da4a8cd1950e54e3caf5df094e4201c997b6c1c7
|
|
4
|
+
data.tar.gz: 93d3fd16f175e7ecdee4538b917698c1be483c9d8233b6d8b1a79306b4be3567
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ad80fe3e37727f57c9e28ab83cac8f058013a9764cce950ab46a535eac845cffd7a5e9b6fcb8149849d87810d319aed4305a1661f9ad29760c5d2d47f4b7d56f
|
|
7
|
+
data.tar.gz: c7e0a0cef3816863d13b3019ccd21f9465e07236a14f058cf748ddfaa19a51f08b3d0f39fb7a3024025495d961b16bd85400e2566ad03b09efc4b52b3ebaee11
|
data/.circleci/config.yml
CHANGED
data/.rubocop.yml
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
inherit_from: .rubocop_todo.yml
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
plugins:
|
|
4
4
|
- rubocop-rspec
|
|
5
5
|
- rubocop-rake
|
|
6
6
|
|
|
@@ -167,10 +167,6 @@ RSpec/IdenticalEqualityAssertion: # new in 2.4
|
|
|
167
167
|
Enabled: true
|
|
168
168
|
RSpec/SubjectDeclaration: # new in 2.5
|
|
169
169
|
Enabled: true
|
|
170
|
-
FactoryBot/SyntaxMethods: # new in 2.7
|
|
171
|
-
Enabled: true
|
|
172
|
-
RSpec/Rails/AvoidSetupHook: # new in 2.4
|
|
173
|
-
Enabled: true
|
|
174
170
|
Gemspec/DeprecatedAttributeAssignment: # new in 1.30
|
|
175
171
|
Enabled: true
|
|
176
172
|
Layout/LineContinuationLeadingSpace: # new in 1.31
|
|
@@ -216,13 +212,6 @@ RSpec/ClassCheck: # new in 2.13
|
|
|
216
212
|
Enabled: true
|
|
217
213
|
RSpec/NoExpectationExample: # new in 2.13
|
|
218
214
|
Enabled: true
|
|
219
|
-
Capybara/SpecificFinders: # new in 2.13
|
|
220
|
-
Enabled: true
|
|
221
|
-
Capybara/SpecificMatcher: # new in 2.12
|
|
222
|
-
Enabled: true
|
|
223
|
-
RSpec/Rails/HaveHttpStatus: # new in 2.12
|
|
224
|
-
Enabled: true
|
|
225
|
-
|
|
226
215
|
Gemspec/DevelopmentDependencies: # new in 1.44
|
|
227
216
|
Enabled: true
|
|
228
217
|
Lint/DuplicateMagicComment: # new in 1.37
|
|
@@ -271,22 +260,6 @@ Style/RedundantRegexpConstructor: # new in 1.52
|
|
|
271
260
|
Enabled: true
|
|
272
261
|
Style/RedundantStringEscape: # new in 1.37
|
|
273
262
|
Enabled: true
|
|
274
|
-
Capybara/MatchStyle: # new in 2.17
|
|
275
|
-
Enabled: true
|
|
276
|
-
Capybara/NegationMatcher: # new in 2.14
|
|
277
|
-
Enabled: true
|
|
278
|
-
Capybara/SpecificActions: # new in 2.14
|
|
279
|
-
Enabled: true
|
|
280
|
-
FactoryBot/AssociationStyle: # new in 2.23
|
|
281
|
-
Enabled: true
|
|
282
|
-
FactoryBot/ConsistentParenthesesStyle: # new in 2.14
|
|
283
|
-
Enabled: true
|
|
284
|
-
FactoryBot/FactoryAssociationWithStrategy: # new in 2.23
|
|
285
|
-
Enabled: true
|
|
286
|
-
FactoryBot/FactoryNameStyle: # new in 2.16
|
|
287
|
-
Enabled: true
|
|
288
|
-
FactoryBot/RedundantFactoryOption: # new in 2.23
|
|
289
|
-
Enabled: true
|
|
290
263
|
RSpec/BeEmpty: # new in 2.20
|
|
291
264
|
Enabled: true
|
|
292
265
|
RSpec/ContainExactly: # new in 2.19
|
|
@@ -305,9 +278,114 @@ RSpec/SkipBlockInsideExample: # new in 2.19
|
|
|
305
278
|
Enabled: true
|
|
306
279
|
RSpec/SortMetadata: # new in 2.14
|
|
307
280
|
Enabled: true
|
|
308
|
-
|
|
281
|
+
Gemspec/AddRuntimeDependency: # new in 1.65
|
|
282
|
+
Enabled: true
|
|
283
|
+
Lint/ArrayLiteralInRegexp: # new in 1.71
|
|
284
|
+
Enabled: true
|
|
285
|
+
Lint/ConstantReassignment: # new in 1.70
|
|
286
|
+
Enabled: true
|
|
287
|
+
Lint/CopDirectiveSyntax: # new in 1.72
|
|
288
|
+
Enabled: true
|
|
289
|
+
Lint/DuplicateSetElement: # new in 1.67
|
|
290
|
+
Enabled: true
|
|
291
|
+
Lint/HashNewWithKeywordArgumentsAsDefault: # new in 1.69
|
|
292
|
+
Enabled: true
|
|
293
|
+
Lint/ItWithoutArgumentsInBlock: # new in 1.59
|
|
294
|
+
Enabled: true
|
|
295
|
+
Lint/LiteralAssignmentInCondition: # new in 1.58
|
|
296
|
+
Enabled: true
|
|
297
|
+
Lint/MixedCaseRange: # new in 1.53
|
|
298
|
+
Enabled: true
|
|
299
|
+
Lint/NumericOperationWithConstantResult: # new in 1.69
|
|
300
|
+
Enabled: true
|
|
301
|
+
Lint/RedundantRegexpQuantifiers: # new in 1.53
|
|
302
|
+
Enabled: true
|
|
303
|
+
Lint/RedundantTypeConversion: # new in 1.72
|
|
304
|
+
Enabled: true
|
|
305
|
+
Lint/SharedMutableDefault: # new in 1.70
|
|
306
|
+
Enabled: true
|
|
307
|
+
Lint/SuppressedExceptionInNumberConversion: # new in 1.72
|
|
308
|
+
Enabled: true
|
|
309
|
+
Lint/UnescapedBracketInRegexp: # new in 1.68
|
|
310
|
+
Enabled: true
|
|
311
|
+
Lint/UselessConstantScoping: # new in 1.72
|
|
312
|
+
Enabled: true
|
|
313
|
+
Lint/UselessDefined: # new in 1.69
|
|
314
|
+
Enabled: true
|
|
315
|
+
Lint/UselessNumericOperation: # new in 1.66
|
|
316
|
+
Enabled: true
|
|
317
|
+
Style/AmbiguousEndlessMethodDefinition: # new in 1.68
|
|
318
|
+
Enabled: true
|
|
319
|
+
Style/BitwisePredicate: # new in 1.68
|
|
320
|
+
Enabled: true
|
|
321
|
+
Style/CombinableDefined: # new in 1.68
|
|
322
|
+
Enabled: true
|
|
323
|
+
Style/DigChain: # new in 1.69
|
|
324
|
+
Enabled: true
|
|
325
|
+
Style/FileNull: # new in 1.69
|
|
326
|
+
Enabled: true
|
|
327
|
+
Style/FileTouch: # new in 1.69
|
|
328
|
+
Enabled: true
|
|
329
|
+
Style/HashSlice: # new in 1.71
|
|
330
|
+
Enabled: true
|
|
331
|
+
Style/ItAssignment: # new in 1.70
|
|
332
|
+
Enabled: true
|
|
333
|
+
Style/KeywordArgumentsMerging: # new in 1.68
|
|
334
|
+
Enabled: true
|
|
335
|
+
Style/MapIntoArray: # new in 1.63
|
|
336
|
+
Enabled: true
|
|
337
|
+
Style/RedundantCurrentDirectoryInPath: # new in 1.53
|
|
338
|
+
Enabled: true
|
|
339
|
+
Style/RedundantFormat: # new in 1.72
|
|
340
|
+
Enabled: true
|
|
341
|
+
Style/RedundantInterpolationUnfreeze: # new in 1.66
|
|
342
|
+
Enabled: true
|
|
343
|
+
Style/RedundantRegexpArgument: # new in 1.53
|
|
344
|
+
Enabled: true
|
|
345
|
+
Style/ReturnNilInPredicateMethodDefinition: # new in 1.53
|
|
346
|
+
Enabled: true
|
|
347
|
+
Style/SafeNavigationChainLength: # new in 1.68
|
|
348
|
+
Enabled: true
|
|
349
|
+
Style/SendWithLiteralMethodName: # new in 1.64
|
|
350
|
+
Enabled: true
|
|
351
|
+
Style/SingleLineDoEndBlock: # new in 1.57
|
|
352
|
+
Enabled: true
|
|
353
|
+
Style/SuperArguments: # new in 1.64
|
|
354
|
+
Enabled: true
|
|
355
|
+
Style/SuperWithArgsParentheses: # new in 1.58
|
|
356
|
+
Enabled: true
|
|
357
|
+
Style/YAMLFileRead: # new in 1.53
|
|
358
|
+
Enabled: true
|
|
359
|
+
|
|
360
|
+
Gemspec/AttributeAssignment: # new in 1.77
|
|
361
|
+
Enabled: true
|
|
362
|
+
Layout/EmptyLinesAfterModuleInclusion: # new in 1.79
|
|
363
|
+
Enabled: true
|
|
364
|
+
Lint/UselessDefaultValueArgument: # new in 1.76
|
|
365
|
+
Enabled: true
|
|
366
|
+
Lint/UselessOr: # new in 1.76
|
|
367
|
+
Enabled: true
|
|
368
|
+
Naming/PredicateMethod: # new in 1.76
|
|
369
|
+
Enabled: true
|
|
370
|
+
Style/ArrayIntersectWithSingleElement: # new in 1.81
|
|
371
|
+
Enabled: true
|
|
372
|
+
Style/CollectionQuerying: # new in 1.77
|
|
373
|
+
Enabled: true
|
|
374
|
+
Style/ComparableBetween: # new in 1.74
|
|
375
|
+
Enabled: true
|
|
376
|
+
Style/EmptyStringInsideInterpolation: # new in 1.76
|
|
377
|
+
Enabled: true
|
|
378
|
+
Style/HashFetchChain: # new in 1.75
|
|
379
|
+
Enabled: true
|
|
380
|
+
Style/ItBlockParameter: # new in 1.75
|
|
381
|
+
Enabled: true
|
|
382
|
+
Style/ModuleMemberExistenceCheck: # new in 1.82
|
|
383
|
+
Enabled: true
|
|
384
|
+
Style/RedundantArrayFlatten: # new in 1.76
|
|
309
385
|
Enabled: true
|
|
310
|
-
RSpec/
|
|
386
|
+
RSpec/IncludeExamples: # new in 3.6
|
|
311
387
|
Enabled: true
|
|
312
|
-
RSpec/
|
|
388
|
+
RSpec/LeakyLocalVariable: # new in 3.8
|
|
313
389
|
Enabled: true
|
|
390
|
+
RSpec/Output: # new in 3.9
|
|
391
|
+
Enabled: true
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
preservation-client (7.
|
|
4
|
+
preservation-client (7.3.0)
|
|
5
5
|
activesupport (>= 4.2)
|
|
6
6
|
faraday (~> 2.0)
|
|
7
7
|
moab-versioning (>= 5.0.0, < 7)
|
|
@@ -10,138 +10,141 @@ PATH
|
|
|
10
10
|
GEM
|
|
11
11
|
remote: https://rubygems.org/
|
|
12
12
|
specs:
|
|
13
|
-
activesupport (8.
|
|
13
|
+
activesupport (8.1.3)
|
|
14
14
|
base64
|
|
15
|
-
benchmark (>= 0.3)
|
|
16
15
|
bigdecimal
|
|
17
16
|
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
18
17
|
connection_pool (>= 2.2.5)
|
|
19
18
|
drb
|
|
20
19
|
i18n (>= 1.6, < 2)
|
|
20
|
+
json
|
|
21
21
|
logger (>= 1.4.2)
|
|
22
22
|
minitest (>= 5.1)
|
|
23
23
|
securerandom (>= 0.3)
|
|
24
24
|
tzinfo (~> 2.0, >= 2.0.5)
|
|
25
25
|
uri (>= 0.13.1)
|
|
26
|
-
addressable (2.
|
|
27
|
-
public_suffix (>= 2.0.2, <
|
|
28
|
-
ast (2.4.
|
|
29
|
-
base64 (0.
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
26
|
+
addressable (2.9.0)
|
|
27
|
+
public_suffix (>= 2.0.2, < 8.0)
|
|
28
|
+
ast (2.4.3)
|
|
29
|
+
base64 (0.3.0)
|
|
30
|
+
bigdecimal (4.1.2)
|
|
31
|
+
byebug (13.0.0)
|
|
32
|
+
reline (>= 0.6.0)
|
|
33
33
|
coderay (1.1.3)
|
|
34
|
-
concurrent-ruby (1.3.
|
|
35
|
-
connection_pool (
|
|
36
|
-
crack (1.0.
|
|
34
|
+
concurrent-ruby (1.3.6)
|
|
35
|
+
connection_pool (3.0.2)
|
|
36
|
+
crack (1.0.1)
|
|
37
37
|
bigdecimal
|
|
38
38
|
rexml
|
|
39
|
-
diff-lcs (1.
|
|
39
|
+
diff-lcs (1.6.2)
|
|
40
40
|
docile (1.4.1)
|
|
41
|
-
drb (2.2.
|
|
41
|
+
drb (2.2.3)
|
|
42
42
|
druid-tools (3.0.0)
|
|
43
|
-
faraday (2.
|
|
43
|
+
faraday (2.14.2)
|
|
44
44
|
faraday-net_http (>= 2.0, < 3.5)
|
|
45
45
|
json
|
|
46
46
|
logger
|
|
47
|
-
faraday-net_http (3.4.
|
|
48
|
-
net-http (
|
|
49
|
-
hashdiff (1.1
|
|
50
|
-
i18n (1.14.
|
|
47
|
+
faraday-net_http (3.4.2)
|
|
48
|
+
net-http (~> 0.5)
|
|
49
|
+
hashdiff (1.2.1)
|
|
50
|
+
i18n (1.14.8)
|
|
51
51
|
concurrent-ruby (~> 1.0)
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
io-console (0.8.2)
|
|
53
|
+
json (2.19.5)
|
|
54
|
+
language_server-protocol (3.17.0.5)
|
|
55
|
+
lint_roller (1.1.0)
|
|
56
|
+
logger (1.7.0)
|
|
55
57
|
method_source (1.1.0)
|
|
56
|
-
minitest (
|
|
57
|
-
|
|
58
|
+
minitest (6.0.6)
|
|
59
|
+
drb (~> 2.0)
|
|
60
|
+
prism (~> 1.5)
|
|
61
|
+
moab-versioning (6.1.2)
|
|
58
62
|
druid-tools (>= 1.0.0)
|
|
59
63
|
json
|
|
60
64
|
nokogiri
|
|
61
65
|
nokogiri-happymapper
|
|
62
|
-
net-http (0.
|
|
63
|
-
uri
|
|
64
|
-
nokogiri (1.
|
|
66
|
+
net-http (0.9.1)
|
|
67
|
+
uri (>= 0.11.1)
|
|
68
|
+
nokogiri (1.19.3-arm64-darwin)
|
|
65
69
|
racc (~> 1.4)
|
|
66
|
-
nokogiri (1.
|
|
70
|
+
nokogiri (1.19.3-x86_64-darwin)
|
|
67
71
|
racc (~> 1.4)
|
|
68
|
-
nokogiri (1.
|
|
72
|
+
nokogiri (1.19.3-x86_64-linux-gnu)
|
|
69
73
|
racc (~> 1.4)
|
|
70
|
-
nokogiri-happymapper (0.10.
|
|
74
|
+
nokogiri-happymapper (0.10.1)
|
|
71
75
|
nokogiri (~> 1.5)
|
|
72
|
-
parallel (1.
|
|
73
|
-
parser (3.3.
|
|
76
|
+
parallel (2.1.0)
|
|
77
|
+
parser (3.3.11.1)
|
|
74
78
|
ast (~> 2.4.1)
|
|
75
79
|
racc
|
|
76
|
-
|
|
80
|
+
prism (1.9.0)
|
|
81
|
+
pry (0.16.0)
|
|
77
82
|
coderay (~> 1.1)
|
|
78
83
|
method_source (~> 1.0)
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
84
|
+
reline (>= 0.6.0)
|
|
85
|
+
pry-byebug (3.12.0)
|
|
86
|
+
byebug (~> 13.0)
|
|
87
|
+
pry (>= 0.13, < 0.17)
|
|
88
|
+
public_suffix (7.0.5)
|
|
83
89
|
racc (1.8.1)
|
|
84
90
|
rainbow (3.1.1)
|
|
85
|
-
rake (13.2
|
|
86
|
-
regexp_parser (2.
|
|
87
|
-
|
|
88
|
-
|
|
91
|
+
rake (13.4.2)
|
|
92
|
+
regexp_parser (2.12.0)
|
|
93
|
+
reline (0.6.3)
|
|
94
|
+
io-console (~> 0.5)
|
|
95
|
+
rexml (3.4.4)
|
|
96
|
+
rspec (3.13.2)
|
|
89
97
|
rspec-core (~> 3.13.0)
|
|
90
98
|
rspec-expectations (~> 3.13.0)
|
|
91
99
|
rspec-mocks (~> 3.13.0)
|
|
92
|
-
rspec-core (3.13.
|
|
100
|
+
rspec-core (3.13.6)
|
|
93
101
|
rspec-support (~> 3.13.0)
|
|
94
|
-
rspec-expectations (3.13.
|
|
102
|
+
rspec-expectations (3.13.5)
|
|
95
103
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
96
104
|
rspec-support (~> 3.13.0)
|
|
97
|
-
rspec-mocks (3.13.
|
|
105
|
+
rspec-mocks (3.13.8)
|
|
98
106
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
99
107
|
rspec-support (~> 3.13.0)
|
|
100
|
-
rspec-support (3.13.
|
|
101
|
-
rubocop (1.
|
|
108
|
+
rspec-support (3.13.7)
|
|
109
|
+
rubocop (1.86.2)
|
|
102
110
|
json (~> 2.3)
|
|
103
|
-
language_server-protocol (
|
|
104
|
-
|
|
111
|
+
language_server-protocol (~> 3.17.0.2)
|
|
112
|
+
lint_roller (~> 1.1.0)
|
|
113
|
+
parallel (>= 1.10)
|
|
105
114
|
parser (>= 3.3.0.2)
|
|
106
115
|
rainbow (>= 2.2.2, < 4.0)
|
|
107
116
|
regexp_parser (>= 2.9.3, < 3.0)
|
|
108
|
-
rubocop-ast (>= 1.
|
|
117
|
+
rubocop-ast (>= 1.49.0, < 2.0)
|
|
109
118
|
ruby-progressbar (~> 1.7)
|
|
110
119
|
unicode-display_width (>= 2.4.0, < 4.0)
|
|
111
|
-
rubocop-ast (1.
|
|
112
|
-
parser (>= 3.3.
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
rubocop (
|
|
117
|
-
rubocop-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
rubocop (~> 1.40)
|
|
121
|
-
rubocop-capybara (~> 2.17)
|
|
122
|
-
rubocop-factory_bot (~> 2.22)
|
|
123
|
-
rubocop-rspec_rails (~> 2.28)
|
|
124
|
-
rubocop-rspec_rails (2.29.1)
|
|
125
|
-
rubocop (~> 1.61)
|
|
120
|
+
rubocop-ast (1.49.1)
|
|
121
|
+
parser (>= 3.3.7.2)
|
|
122
|
+
prism (~> 1.7)
|
|
123
|
+
rubocop-rake (0.7.1)
|
|
124
|
+
lint_roller (~> 1.1)
|
|
125
|
+
rubocop (>= 1.72.1)
|
|
126
|
+
rubocop-rspec (3.9.0)
|
|
127
|
+
lint_roller (~> 1.1)
|
|
128
|
+
rubocop (~> 1.81)
|
|
126
129
|
ruby-progressbar (1.13.0)
|
|
127
130
|
securerandom (0.4.1)
|
|
128
131
|
simplecov (0.22.0)
|
|
129
132
|
docile (~> 1.1)
|
|
130
133
|
simplecov-html (~> 0.11)
|
|
131
134
|
simplecov_json_formatter (~> 0.1)
|
|
132
|
-
simplecov-html (0.13.
|
|
135
|
+
simplecov-html (0.13.2)
|
|
133
136
|
simplecov_json_formatter (0.1.4)
|
|
134
137
|
tzinfo (2.0.6)
|
|
135
138
|
concurrent-ruby (~> 1.0)
|
|
136
|
-
unicode-display_width (3.
|
|
137
|
-
unicode-emoji (~> 4.
|
|
138
|
-
unicode-emoji (4.0
|
|
139
|
-
uri (1.
|
|
140
|
-
webmock (3.
|
|
139
|
+
unicode-display_width (3.2.0)
|
|
140
|
+
unicode-emoji (~> 4.1)
|
|
141
|
+
unicode-emoji (4.2.0)
|
|
142
|
+
uri (1.1.1)
|
|
143
|
+
webmock (3.26.2)
|
|
141
144
|
addressable (>= 2.8.0)
|
|
142
145
|
crack (>= 0.3.2)
|
|
143
146
|
hashdiff (>= 0.4.0, < 2.0.0)
|
|
144
|
-
zeitwerk (2.7.
|
|
147
|
+
zeitwerk (2.7.5)
|
|
145
148
|
|
|
146
149
|
PLATFORMS
|
|
147
150
|
arm64-darwin-23
|
|
@@ -160,9 +163,9 @@ DEPENDENCIES
|
|
|
160
163
|
rspec (~> 3.0)
|
|
161
164
|
rubocop (~> 1.24)
|
|
162
165
|
rubocop-rake
|
|
163
|
-
rubocop-rspec
|
|
166
|
+
rubocop-rspec
|
|
164
167
|
simplecov
|
|
165
168
|
webmock
|
|
166
169
|
|
|
167
170
|
BUNDLED WITH
|
|
168
|
-
2.
|
|
171
|
+
2.7.2
|
data/README.md
CHANGED
|
@@ -65,9 +65,10 @@ Note that the preservation service is behind a firewall.
|
|
|
65
65
|
- druids may be with or without the "druid:" prefix - 'oo000oo0000' or 'druid:oo000oo0000'
|
|
66
66
|
- methods can be called as `client_instance.objects.method` or `Preservation::Client.objects.method`
|
|
67
67
|
|
|
68
|
-
### Get
|
|
68
|
+
### Get information about the preserved object (Moab)
|
|
69
69
|
|
|
70
70
|
- `client.objects.current_version('oo000oo0000')` - returns latest version as an Integer
|
|
71
|
+
- `client.objects.object('oo000oo0000')` - returns Preservation::client::Object
|
|
71
72
|
|
|
72
73
|
### Retrieve file signature (checksum) information
|
|
73
74
|
|
|
@@ -38,11 +38,17 @@ module Preservation
|
|
|
38
38
|
inventory_diff.group_difference('content')
|
|
39
39
|
end
|
|
40
40
|
|
|
41
|
+
# @param [String] druid - with or without prefix: 'druid:ab123cd4567' OR 'ab123cd4567'
|
|
42
|
+
# @return [Preservation::Client::Object] attributes of the Preserved Object
|
|
43
|
+
def object(druid)
|
|
44
|
+
resp_body = get_json("objects/#{druid}.json", druid)
|
|
45
|
+
Object.new(**resp_body)
|
|
46
|
+
end
|
|
47
|
+
|
|
41
48
|
# @param [String] druid - with or without prefix: 'druid:ab123cd4567' OR 'ab123cd4567'
|
|
42
49
|
# @return [Integer] the current version of the Preserved Object
|
|
43
50
|
def current_version(druid)
|
|
44
|
-
|
|
45
|
-
resp_body[:current_version]
|
|
51
|
+
object(druid).current_version
|
|
46
52
|
end
|
|
47
53
|
|
|
48
54
|
# retrieve a content file from a Moab object
|
data/lib/preservation/client.rb
CHANGED
|
@@ -34,6 +34,12 @@ module Preservation
|
|
|
34
34
|
# timeouts
|
|
35
35
|
class ConnectionFailedError < Error; end
|
|
36
36
|
|
|
37
|
+
Object = Struct.new('Object', :druid, :current_version, :ok_on_local_storage) do
|
|
38
|
+
def ok_on_local_storage?
|
|
39
|
+
ok_on_local_storage
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
|
|
37
43
|
DEFAULT_API_VERSION = 'v1'
|
|
38
44
|
DEFAULT_TIMEOUT = 300
|
|
39
45
|
TOKEN_HEADER = 'Authorization'
|
data/preservation-client.gemspec
CHANGED
|
@@ -40,7 +40,7 @@ Gem::Specification.new do |spec|
|
|
|
40
40
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
|
41
41
|
spec.add_development_dependency 'rubocop', '~> 1.24'
|
|
42
42
|
spec.add_development_dependency 'rubocop-rake'
|
|
43
|
-
spec.add_development_dependency 'rubocop-rspec'
|
|
43
|
+
spec.add_development_dependency 'rubocop-rspec'
|
|
44
44
|
spec.add_development_dependency 'simplecov'
|
|
45
45
|
spec.add_development_dependency 'webmock'
|
|
46
46
|
spec.metadata['rubygems_mfa_required'] = 'true'
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: preservation-client
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 7.
|
|
4
|
+
version: 7.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Naomi Dushay
|
|
8
8
|
bindir: exe
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date:
|
|
10
|
+
date: 2026-05-18 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: activesupport
|
|
@@ -159,16 +159,16 @@ dependencies:
|
|
|
159
159
|
name: rubocop-rspec
|
|
160
160
|
requirement: !ruby/object:Gem::Requirement
|
|
161
161
|
requirements:
|
|
162
|
-
- - "
|
|
162
|
+
- - ">="
|
|
163
163
|
- !ruby/object:Gem::Version
|
|
164
|
-
version: '
|
|
164
|
+
version: '0'
|
|
165
165
|
type: :development
|
|
166
166
|
prerelease: false
|
|
167
167
|
version_requirements: !ruby/object:Gem::Requirement
|
|
168
168
|
requirements:
|
|
169
|
-
- - "
|
|
169
|
+
- - ">="
|
|
170
170
|
- !ruby/object:Gem::Version
|
|
171
|
-
version: '
|
|
171
|
+
version: '0'
|
|
172
172
|
- !ruby/object:Gem::Dependency
|
|
173
173
|
name: simplecov
|
|
174
174
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -247,7 +247,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
247
247
|
- !ruby/object:Gem::Version
|
|
248
248
|
version: '0'
|
|
249
249
|
requirements: []
|
|
250
|
-
rubygems_version: 3.6.
|
|
250
|
+
rubygems_version: 3.6.2
|
|
251
251
|
specification_version: 4
|
|
252
252
|
summary: A thin client for getting info from SDR preservation.
|
|
253
253
|
test_files: []
|