preservation-client 7.0.2 → 7.2.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 +2 -1
- data/.rubocop.yml +109 -31
- data/Gemfile.lock +72 -74
- data/README.md +3 -3
- 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 +2 -2
- metadata +6 -12
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a0ddf2ef6f8e254553fa58ad4365dbe832187e22c1e45953923d492177a45fb8
|
|
4
|
+
data.tar.gz: db159e384f0ad33da9789cba5bb8fb60dda3336e8a123115e444d5f2d2c498fc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a33370379e09b916f7a79603308871d4f362fd7f2ceb88f39609a2048d4980a776324d82989d636c7ed3bf265bf83e5ca83824435266bc4ba82bde18087535fa
|
|
7
|
+
data.tar.gz: f2222e97c86fc2f6a23c5a3baad9ab65a379e1c65bcf3a0f9326d2953a802f3f9adc8d6f53d44cfe017f4987585602ff2bae3f36d565148d25ae3111f33ddc26
|
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,8 +1,8 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
preservation-client (7.0
|
|
5
|
-
activesupport (>= 4.2
|
|
4
|
+
preservation-client (7.2.0)
|
|
5
|
+
activesupport (>= 4.2)
|
|
6
6
|
faraday (~> 2.0)
|
|
7
7
|
moab-versioning (>= 5.0.0, < 7)
|
|
8
8
|
zeitwerk (~> 2.1)
|
|
@@ -10,137 +10,135 @@ PATH
|
|
|
10
10
|
GEM
|
|
11
11
|
remote: https://rubygems.org/
|
|
12
12
|
specs:
|
|
13
|
-
activesupport (
|
|
13
|
+
activesupport (8.1.2)
|
|
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
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
bigdecimal (
|
|
31
|
-
byebug (
|
|
25
|
+
uri (>= 0.13.1)
|
|
26
|
+
addressable (2.8.8)
|
|
27
|
+
public_suffix (>= 2.0.2, < 8.0)
|
|
28
|
+
ast (2.4.3)
|
|
29
|
+
base64 (0.3.0)
|
|
30
|
+
bigdecimal (4.0.1)
|
|
31
|
+
byebug (12.0.0)
|
|
32
32
|
coderay (1.1.3)
|
|
33
|
-
concurrent-ruby (1.3.
|
|
34
|
-
connection_pool (
|
|
35
|
-
crack (1.0.
|
|
33
|
+
concurrent-ruby (1.3.6)
|
|
34
|
+
connection_pool (3.0.2)
|
|
35
|
+
crack (1.0.1)
|
|
36
36
|
bigdecimal
|
|
37
37
|
rexml
|
|
38
|
-
diff-lcs (1.
|
|
38
|
+
diff-lcs (1.6.2)
|
|
39
39
|
docile (1.4.1)
|
|
40
|
-
drb (2.2.
|
|
40
|
+
drb (2.2.3)
|
|
41
41
|
druid-tools (3.0.0)
|
|
42
|
-
faraday (2.
|
|
42
|
+
faraday (2.14.0)
|
|
43
43
|
faraday-net_http (>= 2.0, < 3.5)
|
|
44
44
|
json
|
|
45
45
|
logger
|
|
46
|
-
faraday-net_http (3.4.
|
|
47
|
-
net-http (
|
|
48
|
-
hashdiff (1.1
|
|
49
|
-
i18n (1.14.
|
|
46
|
+
faraday-net_http (3.4.2)
|
|
47
|
+
net-http (~> 0.5)
|
|
48
|
+
hashdiff (1.2.1)
|
|
49
|
+
i18n (1.14.8)
|
|
50
50
|
concurrent-ruby (~> 1.0)
|
|
51
|
-
json (2.
|
|
52
|
-
language_server-protocol (3.17.0.
|
|
53
|
-
|
|
51
|
+
json (2.18.0)
|
|
52
|
+
language_server-protocol (3.17.0.5)
|
|
53
|
+
lint_roller (1.1.0)
|
|
54
|
+
logger (1.7.0)
|
|
54
55
|
method_source (1.1.0)
|
|
55
|
-
minitest (
|
|
56
|
-
|
|
56
|
+
minitest (6.0.1)
|
|
57
|
+
prism (~> 1.5)
|
|
58
|
+
moab-versioning (6.1.2)
|
|
57
59
|
druid-tools (>= 1.0.0)
|
|
58
60
|
json
|
|
59
61
|
nokogiri
|
|
60
62
|
nokogiri-happymapper
|
|
61
|
-
net-http (0.
|
|
62
|
-
uri
|
|
63
|
-
nokogiri (1.
|
|
63
|
+
net-http (0.9.1)
|
|
64
|
+
uri (>= 0.11.1)
|
|
65
|
+
nokogiri (1.19.0-arm64-darwin)
|
|
64
66
|
racc (~> 1.4)
|
|
65
|
-
nokogiri (1.
|
|
67
|
+
nokogiri (1.19.0-x86_64-darwin)
|
|
66
68
|
racc (~> 1.4)
|
|
67
|
-
nokogiri (1.
|
|
69
|
+
nokogiri (1.19.0-x86_64-linux-gnu)
|
|
68
70
|
racc (~> 1.4)
|
|
69
|
-
nokogiri-happymapper (0.10.
|
|
71
|
+
nokogiri-happymapper (0.10.1)
|
|
70
72
|
nokogiri (~> 1.5)
|
|
71
|
-
parallel (1.
|
|
72
|
-
parser (3.3.
|
|
73
|
+
parallel (1.27.0)
|
|
74
|
+
parser (3.3.10.0)
|
|
73
75
|
ast (~> 2.4.1)
|
|
74
76
|
racc
|
|
75
|
-
|
|
77
|
+
prism (1.7.0)
|
|
78
|
+
pry (0.15.2)
|
|
76
79
|
coderay (~> 1.1)
|
|
77
80
|
method_source (~> 1.0)
|
|
78
|
-
pry-byebug (3.
|
|
79
|
-
byebug (~>
|
|
80
|
-
pry (>= 0.13, < 0.
|
|
81
|
-
public_suffix (
|
|
81
|
+
pry-byebug (3.11.0)
|
|
82
|
+
byebug (~> 12.0)
|
|
83
|
+
pry (>= 0.13, < 0.16)
|
|
84
|
+
public_suffix (7.0.2)
|
|
82
85
|
racc (1.8.1)
|
|
83
86
|
rainbow (3.1.1)
|
|
84
|
-
rake (13.
|
|
85
|
-
regexp_parser (2.
|
|
86
|
-
rexml (3.4.
|
|
87
|
-
rspec (3.13.
|
|
87
|
+
rake (13.3.1)
|
|
88
|
+
regexp_parser (2.11.3)
|
|
89
|
+
rexml (3.4.4)
|
|
90
|
+
rspec (3.13.2)
|
|
88
91
|
rspec-core (~> 3.13.0)
|
|
89
92
|
rspec-expectations (~> 3.13.0)
|
|
90
93
|
rspec-mocks (~> 3.13.0)
|
|
91
|
-
rspec-core (3.13.
|
|
94
|
+
rspec-core (3.13.6)
|
|
92
95
|
rspec-support (~> 3.13.0)
|
|
93
|
-
rspec-expectations (3.13.
|
|
96
|
+
rspec-expectations (3.13.5)
|
|
94
97
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
95
98
|
rspec-support (~> 3.13.0)
|
|
96
|
-
rspec-mocks (3.13.
|
|
99
|
+
rspec-mocks (3.13.7)
|
|
97
100
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
98
101
|
rspec-support (~> 3.13.0)
|
|
99
|
-
rspec-support (3.13.
|
|
100
|
-
rubocop (1.
|
|
102
|
+
rspec-support (3.13.6)
|
|
103
|
+
rubocop (1.82.1)
|
|
101
104
|
json (~> 2.3)
|
|
102
|
-
language_server-protocol (
|
|
105
|
+
language_server-protocol (~> 3.17.0.2)
|
|
106
|
+
lint_roller (~> 1.1.0)
|
|
103
107
|
parallel (~> 1.10)
|
|
104
108
|
parser (>= 3.3.0.2)
|
|
105
109
|
rainbow (>= 2.2.2, < 4.0)
|
|
106
110
|
regexp_parser (>= 2.9.3, < 3.0)
|
|
107
|
-
rubocop-ast (>= 1.
|
|
111
|
+
rubocop-ast (>= 1.48.0, < 2.0)
|
|
108
112
|
ruby-progressbar (~> 1.7)
|
|
109
113
|
unicode-display_width (>= 2.4.0, < 4.0)
|
|
110
|
-
rubocop-ast (1.
|
|
111
|
-
parser (>= 3.3.
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
rubocop (
|
|
116
|
-
rubocop-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
rubocop (~> 1.40)
|
|
120
|
-
rubocop-capybara (~> 2.17)
|
|
121
|
-
rubocop-factory_bot (~> 2.22)
|
|
122
|
-
rubocop-rspec_rails (~> 2.28)
|
|
123
|
-
rubocop-rspec_rails (2.29.1)
|
|
124
|
-
rubocop (~> 1.61)
|
|
114
|
+
rubocop-ast (1.49.0)
|
|
115
|
+
parser (>= 3.3.7.2)
|
|
116
|
+
prism (~> 1.7)
|
|
117
|
+
rubocop-rake (0.7.1)
|
|
118
|
+
lint_roller (~> 1.1)
|
|
119
|
+
rubocop (>= 1.72.1)
|
|
120
|
+
rubocop-rspec (3.9.0)
|
|
121
|
+
lint_roller (~> 1.1)
|
|
122
|
+
rubocop (~> 1.81)
|
|
125
123
|
ruby-progressbar (1.13.0)
|
|
126
124
|
securerandom (0.4.1)
|
|
127
125
|
simplecov (0.22.0)
|
|
128
126
|
docile (~> 1.1)
|
|
129
127
|
simplecov-html (~> 0.11)
|
|
130
128
|
simplecov_json_formatter (~> 0.1)
|
|
131
|
-
simplecov-html (0.13.
|
|
129
|
+
simplecov-html (0.13.2)
|
|
132
130
|
simplecov_json_formatter (0.1.4)
|
|
133
131
|
tzinfo (2.0.6)
|
|
134
132
|
concurrent-ruby (~> 1.0)
|
|
135
|
-
unicode-display_width (3.
|
|
136
|
-
unicode-emoji (~> 4.
|
|
137
|
-
unicode-emoji (4.0
|
|
138
|
-
uri (1.
|
|
139
|
-
webmock (3.
|
|
133
|
+
unicode-display_width (3.2.0)
|
|
134
|
+
unicode-emoji (~> 4.1)
|
|
135
|
+
unicode-emoji (4.2.0)
|
|
136
|
+
uri (1.1.1)
|
|
137
|
+
webmock (3.26.1)
|
|
140
138
|
addressable (>= 2.8.0)
|
|
141
139
|
crack (>= 0.3.2)
|
|
142
140
|
hashdiff (>= 0.4.0, < 2.0.0)
|
|
143
|
-
zeitwerk (2.7.
|
|
141
|
+
zeitwerk (2.7.4)
|
|
144
142
|
|
|
145
143
|
PLATFORMS
|
|
146
144
|
arm64-darwin-23
|
|
@@ -159,9 +157,9 @@ DEPENDENCIES
|
|
|
159
157
|
rspec (~> 3.0)
|
|
160
158
|
rubocop (~> 1.24)
|
|
161
159
|
rubocop-rake
|
|
162
|
-
rubocop-rspec
|
|
160
|
+
rubocop-rspec
|
|
163
161
|
simplecov
|
|
164
162
|
webmock
|
|
165
163
|
|
|
166
164
|
BUNDLED WITH
|
|
167
|
-
2.
|
|
165
|
+
2.7.2
|
data/README.md
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
[](https://badge.fury.io/rb/preservation-client)
|
|
2
2
|
[](https://circleci.com/gh/sul-dlss/preservation-client)
|
|
3
|
-
[](https://codeclimate.com/github/sul-dlss/preservation-client/test_coverage)
|
|
3
|
+
[](https://codecov.io/github/sul-dlss/preservation-client)
|
|
5
4
|
|
|
6
5
|
# preservation-client
|
|
7
6
|
|
|
@@ -66,9 +65,10 @@ Note that the preservation service is behind a firewall.
|
|
|
66
65
|
- druids may be with or without the "druid:" prefix - 'oo000oo0000' or 'druid:oo000oo0000'
|
|
67
66
|
- methods can be called as `client_instance.objects.method` or `Preservation::Client.objects.method`
|
|
68
67
|
|
|
69
|
-
### Get
|
|
68
|
+
### Get information about the preserved object (Moab)
|
|
70
69
|
|
|
71
70
|
- `client.objects.current_version('oo000oo0000')` - returns latest version as an Integer
|
|
71
|
+
- `client.objects.object('oo000oo0000')` - returns Preservation::client::Object
|
|
72
72
|
|
|
73
73
|
### Retrieve file signature (checksum) information
|
|
74
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
|
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
|
|
|
29
29
|
spec.require_paths = ['lib']
|
|
30
30
|
spec.required_ruby_version = '>= 3.0'
|
|
31
31
|
|
|
32
|
-
spec.add_dependency 'activesupport', '>= 4.2'
|
|
32
|
+
spec.add_dependency 'activesupport', '>= 4.2'
|
|
33
33
|
spec.add_dependency 'faraday', '~> 2.0'
|
|
34
34
|
spec.add_dependency 'moab-versioning', '>= 5.0.0', '< 7'
|
|
35
35
|
spec.add_dependency 'zeitwerk', '~> 2.1'
|
|
@@ -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.0
|
|
4
|
+
version: 7.2.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-01-16 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: activesupport
|
|
@@ -16,9 +16,6 @@ dependencies:
|
|
|
16
16
|
- - ">="
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
18
|
version: '4.2'
|
|
19
|
-
- - "<"
|
|
20
|
-
- !ruby/object:Gem::Version
|
|
21
|
-
version: '8'
|
|
22
19
|
type: :runtime
|
|
23
20
|
prerelease: false
|
|
24
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -26,9 +23,6 @@ dependencies:
|
|
|
26
23
|
- - ">="
|
|
27
24
|
- !ruby/object:Gem::Version
|
|
28
25
|
version: '4.2'
|
|
29
|
-
- - "<"
|
|
30
|
-
- !ruby/object:Gem::Version
|
|
31
|
-
version: '8'
|
|
32
26
|
- !ruby/object:Gem::Dependency
|
|
33
27
|
name: faraday
|
|
34
28
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -165,16 +159,16 @@ dependencies:
|
|
|
165
159
|
name: rubocop-rspec
|
|
166
160
|
requirement: !ruby/object:Gem::Requirement
|
|
167
161
|
requirements:
|
|
168
|
-
- - "
|
|
162
|
+
- - ">="
|
|
169
163
|
- !ruby/object:Gem::Version
|
|
170
|
-
version: '
|
|
164
|
+
version: '0'
|
|
171
165
|
type: :development
|
|
172
166
|
prerelease: false
|
|
173
167
|
version_requirements: !ruby/object:Gem::Requirement
|
|
174
168
|
requirements:
|
|
175
|
-
- - "
|
|
169
|
+
- - ">="
|
|
176
170
|
- !ruby/object:Gem::Version
|
|
177
|
-
version: '
|
|
171
|
+
version: '0'
|
|
178
172
|
- !ruby/object:Gem::Dependency
|
|
179
173
|
name: simplecov
|
|
180
174
|
requirement: !ruby/object:Gem::Requirement
|