sdr-client 2.4.0 → 2.6.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 +122 -2
- data/.rubocop_todo.yml +26 -28
- data/Gemfile +12 -0
- data/Gemfile.lock +50 -41
- data/lib/sdr_client/deposit/files/direct_upload_request.rb +20 -2
- data/lib/sdr_client/version.rb +1 -1
- data/sdr-client.gemspec +1 -10
- metadata +5 -131
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e21c93822b4e8d8980f8bdd0e10d421abc93b4ea135a72e2df031c61f524bcc6
|
|
4
|
+
data.tar.gz: 0743ae560dcbc85e38e350d7a7f0e6248cfd003a7d2fd2624f8c509922d5b330
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 70a7b89c29ff97969b1e2144ed85a380be022cfe49a994fe4b3d7a6c1711f8b26199a37451a23b813bbff5e276e27483af01127a124ce9b758de3a9145e0554d
|
|
7
|
+
data.tar.gz: 95846265c5a963713e7a69009fd129a40f06afd43d9be8fa0a3c2a179abd11add3910e6445b722f61ba6cb21445b2ce0a0803ebcf3c366f13f2548600432c2cd
|
data/.circleci/config.yml
CHANGED
data/.rubocop.yml
CHANGED
|
@@ -150,7 +150,7 @@ RSpec/IdenticalEqualityAssertion: # new in 2.4
|
|
|
150
150
|
Enabled: true
|
|
151
151
|
RSpec/SubjectDeclaration: # new in 2.5
|
|
152
152
|
Enabled: true
|
|
153
|
-
|
|
153
|
+
FactoryBot/SyntaxMethods: # new in 2.7
|
|
154
154
|
Enabled: true
|
|
155
155
|
RSpec/Rails/AvoidSetupHook: # new in 2.4
|
|
156
156
|
Enabled: true
|
|
@@ -174,7 +174,7 @@ Style/MapCompactWithConditionalBlock: # new in 1.30
|
|
|
174
174
|
Enabled: true
|
|
175
175
|
RSpec/ChangeByZero: # new in 2.11.0
|
|
176
176
|
Enabled: true
|
|
177
|
-
|
|
177
|
+
Capybara/SpecificMatcher: # new in 2.12
|
|
178
178
|
Enabled: true
|
|
179
179
|
RSpec/Rails/HaveHttpStatus: # new in 2.12
|
|
180
180
|
Enabled: true
|
|
@@ -185,3 +185,123 @@ Style/EmptyHeredoc: # new in 1.32
|
|
|
185
185
|
Enabled: true
|
|
186
186
|
Style/MagicCommentFormat: # new in 1.35
|
|
187
187
|
Enabled: true
|
|
188
|
+
|
|
189
|
+
Lint/DuplicateMagicComment: # new in 1.37
|
|
190
|
+
Enabled: true
|
|
191
|
+
Lint/DuplicateMatchPattern: # new in 1.50
|
|
192
|
+
Enabled: true
|
|
193
|
+
Lint/UselessRescue: # new in 1.43
|
|
194
|
+
Enabled: true
|
|
195
|
+
Metrics/CollectionLiteralLength: # new in 1.47
|
|
196
|
+
Enabled: true
|
|
197
|
+
Style/ArrayIntersect: # new in 1.40
|
|
198
|
+
Enabled: true
|
|
199
|
+
Style/ComparableClamp: # new in 1.44
|
|
200
|
+
Enabled: true
|
|
201
|
+
Style/ConcatArrayLiterals: # new in 1.41
|
|
202
|
+
Enabled: true
|
|
203
|
+
Style/DataInheritance: # new in 1.49
|
|
204
|
+
Enabled: true
|
|
205
|
+
Style/DirEmpty: # new in 1.48
|
|
206
|
+
Enabled: true
|
|
207
|
+
Style/ExactRegexpMatch: # new in 1.51
|
|
208
|
+
Enabled: true
|
|
209
|
+
Style/FileEmpty: # new in 1.48
|
|
210
|
+
Enabled: true
|
|
211
|
+
Style/MapToSet: # new in 1.42
|
|
212
|
+
Enabled: true
|
|
213
|
+
Style/MinMaxComparison: # new in 1.42
|
|
214
|
+
Enabled: true
|
|
215
|
+
Style/OperatorMethodCall: # new in 1.37
|
|
216
|
+
Enabled: true
|
|
217
|
+
Style/RedundantArrayConstructor: # new in 1.52
|
|
218
|
+
Enabled: true
|
|
219
|
+
Style/RedundantConstantBase: # new in 1.40
|
|
220
|
+
Enabled: true
|
|
221
|
+
Style/RedundantDoubleSplatHashBraces: # new in 1.41
|
|
222
|
+
Enabled: true
|
|
223
|
+
Style/RedundantEach: # new in 1.38
|
|
224
|
+
Enabled: true
|
|
225
|
+
Style/RedundantFilterChain: # new in 1.52
|
|
226
|
+
Enabled: true
|
|
227
|
+
Style/RedundantHeredocDelimiterQuotes: # new in 1.45
|
|
228
|
+
Enabled: true
|
|
229
|
+
Style/RedundantLineContinuation: # new in 1.49
|
|
230
|
+
Enabled: true
|
|
231
|
+
Style/RedundantRegexpConstructor: # new in 1.52
|
|
232
|
+
Enabled: true
|
|
233
|
+
Style/RedundantStringEscape: # new in 1.37
|
|
234
|
+
Enabled: true
|
|
235
|
+
Capybara/MatchStyle: # new in 2.17
|
|
236
|
+
Enabled: true
|
|
237
|
+
Capybara/NegationMatcher: # new in 2.14
|
|
238
|
+
Enabled: true
|
|
239
|
+
Capybara/SpecificActions: # new in 2.14
|
|
240
|
+
Enabled: true
|
|
241
|
+
Capybara/SpecificFinders: # new in 2.13
|
|
242
|
+
Enabled: true
|
|
243
|
+
FactoryBot/AssociationStyle: # new in 2.23
|
|
244
|
+
Enabled: true
|
|
245
|
+
FactoryBot/ConsistentParenthesesStyle: # new in 2.14
|
|
246
|
+
Enabled: true
|
|
247
|
+
FactoryBot/FactoryAssociationWithStrategy: # new in 2.23
|
|
248
|
+
Enabled: true
|
|
249
|
+
FactoryBot/FactoryNameStyle: # new in 2.16
|
|
250
|
+
Enabled: true
|
|
251
|
+
FactoryBot/RedundantFactoryOption: # new in 2.23
|
|
252
|
+
Enabled: true
|
|
253
|
+
RSpec/BeEmpty: # new in 2.20
|
|
254
|
+
Enabled: true
|
|
255
|
+
RSpec/ContainExactly: # new in 2.19
|
|
256
|
+
Enabled: true
|
|
257
|
+
RSpec/DuplicatedMetadata: # new in 2.16
|
|
258
|
+
Enabled: true
|
|
259
|
+
RSpec/IndexedLet: # new in 2.20
|
|
260
|
+
Enabled: true
|
|
261
|
+
RSpec/MatchArray: # new in 2.19
|
|
262
|
+
Enabled: true
|
|
263
|
+
RSpec/NoExpectationExample: # new in 2.13
|
|
264
|
+
Enabled: true
|
|
265
|
+
RSpec/PendingWithoutReason: # new in 2.16
|
|
266
|
+
Enabled: true
|
|
267
|
+
RSpec/RedundantAround: # new in 2.19
|
|
268
|
+
Enabled: true
|
|
269
|
+
RSpec/SkipBlockInsideExample: # new in 2.19
|
|
270
|
+
Enabled: true
|
|
271
|
+
RSpec/SortMetadata: # new in 2.14
|
|
272
|
+
Enabled: true
|
|
273
|
+
RSpec/Rails/InferredSpecType: # new in 2.14
|
|
274
|
+
Enabled: true
|
|
275
|
+
RSpec/Rails/MinitestAssertions: # new in 2.17
|
|
276
|
+
Enabled: true
|
|
277
|
+
RSpec/Rails/TravelAround: # new in 2.19
|
|
278
|
+
Enabled: true
|
|
279
|
+
|
|
280
|
+
Gemspec/DevelopmentDependencies: # new in 1.44
|
|
281
|
+
Enabled: true
|
|
282
|
+
Lint/MixedCaseRange: # new in 1.53
|
|
283
|
+
Enabled: true
|
|
284
|
+
Lint/RedundantRegexpQuantifiers: # new in 1.53
|
|
285
|
+
Enabled: true
|
|
286
|
+
Style/RedundantCurrentDirectoryInPath: # new in 1.53
|
|
287
|
+
Enabled: true
|
|
288
|
+
Style/RedundantRegexpArgument: # new in 1.53
|
|
289
|
+
Enabled: true
|
|
290
|
+
Style/ReturnNilInPredicateMethodDefinition: # new in 1.53
|
|
291
|
+
Enabled: true
|
|
292
|
+
Style/YAMLFileRead: # new in 1.53
|
|
293
|
+
Enabled: true
|
|
294
|
+
RSpec/EmptyMetadata: # new in 2.24
|
|
295
|
+
Enabled: true
|
|
296
|
+
RSpec/Eq: # new in 2.24
|
|
297
|
+
Enabled: true
|
|
298
|
+
RSpec/MetadataStyle: # new in 2.24
|
|
299
|
+
Enabled: true
|
|
300
|
+
RSpec/ReceiveMessages: # new in 2.23
|
|
301
|
+
Enabled: true
|
|
302
|
+
RSpec/SpecFilePathFormat: # new in 2.24
|
|
303
|
+
Enabled: true
|
|
304
|
+
RSpec/SpecFilePathSuffix: # new in 2.24
|
|
305
|
+
Enabled: true
|
|
306
|
+
RSpec/Rails/NegationBeValid: # new in 2.23
|
|
307
|
+
Enabled: true
|
data/.rubocop_todo.yml
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# This configuration was generated by
|
|
2
2
|
# `rubocop --auto-gen-config --auto-gen-only-exclude`
|
|
3
|
-
# on
|
|
3
|
+
# on 2023-09-11 17:08:41 UTC using RuboCop version 1.56.3.
|
|
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
9
|
# Offense count: 1
|
|
10
|
-
# Configuration parameters: Include.
|
|
10
|
+
# Configuration parameters: Severity, Include.
|
|
11
11
|
# Include: **/*.gemspec
|
|
12
12
|
Gemspec/RequiredRubyVersion:
|
|
13
13
|
Exclude:
|
|
@@ -27,20 +27,20 @@ Lint/UnusedMethodArgument:
|
|
|
27
27
|
- 'lib/sdr_client/deposit/image_file_set_strategy.rb'
|
|
28
28
|
|
|
29
29
|
# Offense count: 4
|
|
30
|
-
# Configuration parameters: AllowedMethods, AllowedPatterns,
|
|
30
|
+
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
|
|
31
31
|
Metrics/AbcSize:
|
|
32
32
|
Exclude:
|
|
33
33
|
- 'lib/sdr_client/cli.rb'
|
|
34
34
|
- 'lib/sdr_client/update.rb'
|
|
35
35
|
|
|
36
36
|
# Offense count: 1
|
|
37
|
-
# Configuration parameters: AllowedMethods, AllowedPatterns,
|
|
37
|
+
# Configuration parameters: AllowedMethods, AllowedPatterns, Max.
|
|
38
38
|
Metrics/CyclomaticComplexity:
|
|
39
39
|
Exclude:
|
|
40
40
|
- 'lib/sdr_client/update.rb'
|
|
41
41
|
|
|
42
42
|
# Offense count: 12
|
|
43
|
-
# Configuration parameters: CountComments, Max, CountAsOne,
|
|
43
|
+
# Configuration parameters: CountComments, Max, CountAsOne, AllowedMethods, AllowedPatterns.
|
|
44
44
|
Metrics/MethodLength:
|
|
45
45
|
Exclude:
|
|
46
46
|
- 'lib/sdr_client/cli.rb'
|
|
@@ -59,14 +59,6 @@ RSpec/ExampleLength:
|
|
|
59
59
|
- 'spec/sdr_client/model_deposit_spec.rb'
|
|
60
60
|
- 'spec/sdr_client/update_spec.rb'
|
|
61
61
|
|
|
62
|
-
# Offense count: 2
|
|
63
|
-
# Configuration parameters: Include, CustomTransform, IgnoreMethods, SpecSuffixOnly.
|
|
64
|
-
# Include: **/*_spec*rb*, **/spec/**/*
|
|
65
|
-
RSpec/FilePath:
|
|
66
|
-
Exclude:
|
|
67
|
-
- 'spec/sdr_client/client_spec.rb'
|
|
68
|
-
- 'spec/sdr_client/model_deposit_spec.rb'
|
|
69
|
-
|
|
70
62
|
# Offense count: 1
|
|
71
63
|
# Configuration parameters: EnforcedStyle.
|
|
72
64
|
# SupportedStyles: have_received, receive
|
|
@@ -85,18 +77,9 @@ RSpec/MultipleExpectations:
|
|
|
85
77
|
- 'spec/sdr_client/login_spec.rb'
|
|
86
78
|
- 'spec/sdr_client/model_deposit_spec.rb'
|
|
87
79
|
|
|
88
|
-
# Offense count: 36
|
|
89
|
-
# Configuration parameters: AllowSubject, Max.
|
|
90
|
-
RSpec/MultipleMemoizedHelpers:
|
|
91
|
-
Exclude:
|
|
92
|
-
- 'spec/sdr_client/deposit/metadata_builder_spec.rb'
|
|
93
|
-
- 'spec/sdr_client/deposit/model_process_spec.rb'
|
|
94
|
-
- 'spec/sdr_client/deposit/process_spec.rb'
|
|
95
|
-
- 'spec/sdr_client/deposit/request_spec.rb'
|
|
96
|
-
- 'spec/sdr_client/update_spec.rb'
|
|
97
|
-
|
|
98
80
|
# Offense count: 24
|
|
99
|
-
# Configuration parameters: IgnoreSharedExamples.
|
|
81
|
+
# Configuration parameters: EnforcedStyle, IgnoreSharedExamples.
|
|
82
|
+
# SupportedStyles: always, named_only
|
|
100
83
|
RSpec/NamedSubject:
|
|
101
84
|
Exclude:
|
|
102
85
|
- 'spec/sdr_client/background_job_results_spec.rb'
|
|
@@ -107,7 +90,7 @@ RSpec/NamedSubject:
|
|
|
107
90
|
- 'spec/sdr_client/login_spec.rb'
|
|
108
91
|
|
|
109
92
|
# Offense count: 19
|
|
110
|
-
# Configuration parameters: Max.
|
|
93
|
+
# Configuration parameters: Max, AllowedGroups.
|
|
111
94
|
RSpec/NestedGroups:
|
|
112
95
|
Exclude:
|
|
113
96
|
- 'spec/sdr_client/deposit/metadata_builder_spec.rb'
|
|
@@ -116,7 +99,22 @@ RSpec/NestedGroups:
|
|
|
116
99
|
- 'spec/sdr_client/login_spec.rb'
|
|
117
100
|
- 'spec/sdr_client/update_spec.rb'
|
|
118
101
|
|
|
119
|
-
# Offense count:
|
|
102
|
+
# Offense count: 5
|
|
103
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
104
|
+
RSpec/ReceiveMessages:
|
|
105
|
+
Exclude:
|
|
106
|
+
- 'spec/sdr_client/update_spec.rb'
|
|
107
|
+
|
|
108
|
+
# Offense count: 2
|
|
109
|
+
# Configuration parameters: Include, CustomTransform, IgnoreMethods, IgnoreMetadata.
|
|
110
|
+
# Include: **/*_spec.rb
|
|
111
|
+
RSpec/SpecFilePathFormat:
|
|
112
|
+
Exclude:
|
|
113
|
+
- '**/spec/routing/**/*'
|
|
114
|
+
- 'spec/sdr_client/client_spec.rb'
|
|
115
|
+
- 'spec/sdr_client/model_deposit_spec.rb'
|
|
116
|
+
|
|
117
|
+
# Offense count: 21
|
|
120
118
|
# This cop supports safe autocorrection (--autocorrect).
|
|
121
119
|
Style/KeywordParametersOrder:
|
|
122
120
|
Exclude:
|
|
@@ -137,9 +135,9 @@ Style/StringConcatenation:
|
|
|
137
135
|
- 'lib/sdr_client/deposit/create_resource.rb'
|
|
138
136
|
- 'spec/sdr_client/deposit_spec.rb'
|
|
139
137
|
|
|
140
|
-
# Offense count:
|
|
138
|
+
# Offense count: 35
|
|
141
139
|
# This cop supports safe autocorrection (--autocorrect).
|
|
142
|
-
# Configuration parameters: Max, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns
|
|
140
|
+
# Configuration parameters: Max, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
|
|
143
141
|
# URISchemes: http, https
|
|
144
142
|
Layout/LineLength:
|
|
145
143
|
Exclude:
|
data/Gemfile
CHANGED
|
@@ -7,3 +7,15 @@ gemspec
|
|
|
7
7
|
|
|
8
8
|
gem 'byebug'
|
|
9
9
|
gem 'rspec_junit_formatter' # For circleCI
|
|
10
|
+
|
|
11
|
+
group :development do
|
|
12
|
+
gem 'bundler', '~> 2.0'
|
|
13
|
+
gem 'rake', '~> 13.0'
|
|
14
|
+
gem 'rspec', '~> 3.0'
|
|
15
|
+
gem 'rubocop', '~> 1.24'
|
|
16
|
+
gem 'rubocop-rake'
|
|
17
|
+
gem 'rubocop-rspec', '~> 2.1'
|
|
18
|
+
gem 'simplecov'
|
|
19
|
+
gem 'thor'
|
|
20
|
+
gem 'webmock', '~> 3.7'
|
|
21
|
+
end
|
data/Gemfile.lock
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
sdr-client (2.
|
|
4
|
+
sdr-client (2.6.0)
|
|
5
5
|
activesupport
|
|
6
|
-
cocina-models (~> 0.
|
|
6
|
+
cocina-models (~> 0.91.0)
|
|
7
7
|
config
|
|
8
8
|
dry-monads
|
|
9
9
|
faraday (>= 0.16)
|
|
@@ -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,14 +33,14 @@ 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
|
-
config (4.1
|
|
43
|
+
config (4.2.1)
|
|
43
44
|
deep_merge (~> 1.2, >= 1.2.1)
|
|
44
45
|
dry-validation (~> 1.0, >= 1.0.0)
|
|
45
46
|
crack (0.4.5)
|
|
@@ -49,10 +50,10 @@ GEM
|
|
|
49
50
|
activesupport
|
|
50
51
|
diff-lcs (1.5.0)
|
|
51
52
|
docile (1.4.0)
|
|
52
|
-
dry-configurable (1.0
|
|
53
|
+
dry-configurable (1.1.0)
|
|
53
54
|
dry-core (~> 1.0, < 2)
|
|
54
55
|
zeitwerk (~> 2.6)
|
|
55
|
-
dry-core (1.0.
|
|
56
|
+
dry-core (1.0.1)
|
|
56
57
|
concurrent-ruby (~> 1.0)
|
|
57
58
|
zeitwerk (~> 2.6)
|
|
58
59
|
dry-inflector (1.0.0)
|
|
@@ -65,12 +66,12 @@ GEM
|
|
|
65
66
|
concurrent-ruby (~> 1.0)
|
|
66
67
|
dry-core (~> 1.0, < 2)
|
|
67
68
|
zeitwerk (~> 2.6)
|
|
68
|
-
dry-schema (1.13.
|
|
69
|
+
dry-schema (1.13.3)
|
|
69
70
|
concurrent-ruby (~> 1.0)
|
|
70
71
|
dry-configurable (~> 1.0, >= 1.0.1)
|
|
71
72
|
dry-core (~> 1.0, < 2)
|
|
72
73
|
dry-initializer (~> 3.0)
|
|
73
|
-
dry-logic (>= 1.
|
|
74
|
+
dry-logic (>= 1.4, < 2)
|
|
74
75
|
dry-types (>= 1.7, < 2)
|
|
75
76
|
zeitwerk (~> 2.6)
|
|
76
77
|
dry-struct (1.6.0)
|
|
@@ -94,76 +95,83 @@ GEM
|
|
|
94
95
|
activesupport (>= 3.0, < 8.0)
|
|
95
96
|
equivalent-xml (0.6.0)
|
|
96
97
|
nokogiri (>= 1.4.3)
|
|
97
|
-
faraday (2.7.
|
|
98
|
+
faraday (2.7.10)
|
|
98
99
|
faraday-net_http (>= 2.0, < 3.1)
|
|
99
100
|
ruby2_keywords (>= 0.0.4)
|
|
100
101
|
faraday-net_http (3.0.2)
|
|
101
102
|
hashdiff (1.0.1)
|
|
102
|
-
i18n (1.
|
|
103
|
+
i18n (1.14.1)
|
|
103
104
|
concurrent-ruby (~> 1.0)
|
|
104
105
|
ice_nine (0.11.2)
|
|
105
106
|
json (2.6.3)
|
|
106
|
-
jsonpath (1.1.
|
|
107
|
+
jsonpath (1.1.3)
|
|
107
108
|
multi_json
|
|
109
|
+
language_server-protocol (3.17.0.3)
|
|
108
110
|
launchy (2.5.2)
|
|
109
111
|
addressable (~> 2.8)
|
|
110
|
-
minitest (5.
|
|
112
|
+
minitest (5.20.0)
|
|
111
113
|
multi_json (1.15.0)
|
|
112
|
-
nokogiri (1.
|
|
114
|
+
nokogiri (1.15.4-x86_64-darwin)
|
|
113
115
|
racc (~> 1.4)
|
|
114
|
-
nokogiri (1.
|
|
116
|
+
nokogiri (1.15.4-x86_64-linux)
|
|
115
117
|
racc (~> 1.4)
|
|
116
118
|
openapi3_parser (0.9.2)
|
|
117
119
|
commonmarker (~> 0.17)
|
|
118
|
-
openapi_parser (0.
|
|
119
|
-
optimist (3.0
|
|
120
|
-
parallel (1.
|
|
121
|
-
parser (3.2.
|
|
120
|
+
openapi_parser (1.0.0)
|
|
121
|
+
optimist (3.1.0)
|
|
122
|
+
parallel (1.23.0)
|
|
123
|
+
parser (3.2.2.3)
|
|
122
124
|
ast (~> 2.4.1)
|
|
125
|
+
racc
|
|
123
126
|
patience_diff (1.2.0)
|
|
124
127
|
optimist (~> 3.0)
|
|
125
|
-
public_suffix (5.0.
|
|
126
|
-
racc (1.
|
|
128
|
+
public_suffix (5.0.3)
|
|
129
|
+
racc (1.7.1)
|
|
127
130
|
rainbow (3.1.1)
|
|
128
131
|
rake (13.0.6)
|
|
129
|
-
regexp_parser (2.
|
|
130
|
-
rexml (3.2.
|
|
132
|
+
regexp_parser (2.8.1)
|
|
133
|
+
rexml (3.2.6)
|
|
131
134
|
rspec (3.12.0)
|
|
132
135
|
rspec-core (~> 3.12.0)
|
|
133
136
|
rspec-expectations (~> 3.12.0)
|
|
134
137
|
rspec-mocks (~> 3.12.0)
|
|
135
|
-
rspec-core (3.12.
|
|
138
|
+
rspec-core (3.12.2)
|
|
136
139
|
rspec-support (~> 3.12.0)
|
|
137
|
-
rspec-expectations (3.12.
|
|
140
|
+
rspec-expectations (3.12.3)
|
|
138
141
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
139
142
|
rspec-support (~> 3.12.0)
|
|
140
|
-
rspec-mocks (3.12.
|
|
143
|
+
rspec-mocks (3.12.6)
|
|
141
144
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
142
145
|
rspec-support (~> 3.12.0)
|
|
143
|
-
rspec-support (3.12.
|
|
146
|
+
rspec-support (3.12.1)
|
|
144
147
|
rspec_junit_formatter (0.6.0)
|
|
145
148
|
rspec-core (>= 2, < 4, != 2.12.0)
|
|
146
|
-
rss (0.
|
|
149
|
+
rss (0.3.0)
|
|
147
150
|
rexml
|
|
148
|
-
rubocop (1.
|
|
151
|
+
rubocop (1.56.3)
|
|
152
|
+
base64 (~> 0.1.1)
|
|
149
153
|
json (~> 2.3)
|
|
154
|
+
language_server-protocol (>= 3.17.0)
|
|
150
155
|
parallel (~> 1.10)
|
|
151
|
-
parser (>= 3.2.
|
|
156
|
+
parser (>= 3.2.2.3)
|
|
152
157
|
rainbow (>= 2.2.2, < 4.0)
|
|
153
158
|
regexp_parser (>= 1.8, < 3.0)
|
|
154
159
|
rexml (>= 3.2.5, < 4.0)
|
|
155
|
-
rubocop-ast (>= 1.
|
|
160
|
+
rubocop-ast (>= 1.28.1, < 2.0)
|
|
156
161
|
ruby-progressbar (~> 1.7)
|
|
157
162
|
unicode-display_width (>= 2.4.0, < 3.0)
|
|
158
|
-
rubocop-ast (1.
|
|
163
|
+
rubocop-ast (1.29.0)
|
|
159
164
|
parser (>= 3.2.1.0)
|
|
160
|
-
rubocop-capybara (2.
|
|
165
|
+
rubocop-capybara (2.18.0)
|
|
161
166
|
rubocop (~> 1.41)
|
|
167
|
+
rubocop-factory_bot (2.23.1)
|
|
168
|
+
rubocop (~> 1.33)
|
|
162
169
|
rubocop-rake (0.6.0)
|
|
163
170
|
rubocop (~> 1.0)
|
|
164
|
-
rubocop-rspec (2.
|
|
171
|
+
rubocop-rspec (2.24.0)
|
|
165
172
|
rubocop (~> 1.33)
|
|
166
173
|
rubocop-capybara (~> 2.17)
|
|
174
|
+
rubocop-factory_bot (~> 2.22)
|
|
167
175
|
ruby-progressbar (1.13.0)
|
|
168
176
|
ruby2_keywords (0.0.5)
|
|
169
177
|
simplecov (0.22.0)
|
|
@@ -176,19 +184,20 @@ GEM
|
|
|
176
184
|
attr_extras (>= 6.2.4)
|
|
177
185
|
diff-lcs
|
|
178
186
|
patience_diff
|
|
179
|
-
thor (1.2.
|
|
187
|
+
thor (1.2.2)
|
|
180
188
|
tzinfo (2.0.6)
|
|
181
189
|
concurrent-ruby (~> 1.0)
|
|
182
190
|
unicode-display_width (2.4.2)
|
|
183
|
-
webmock (3.
|
|
191
|
+
webmock (3.19.1)
|
|
184
192
|
addressable (>= 2.8.0)
|
|
185
193
|
crack (>= 0.3.2)
|
|
186
194
|
hashdiff (>= 0.4.0, < 2.0.0)
|
|
187
|
-
zeitwerk (2.6.
|
|
195
|
+
zeitwerk (2.6.11)
|
|
188
196
|
|
|
189
197
|
PLATFORMS
|
|
190
198
|
x86_64-darwin-19
|
|
191
199
|
x86_64-darwin-21
|
|
200
|
+
x86_64-darwin-22
|
|
192
201
|
x86_64-linux
|
|
193
202
|
|
|
194
203
|
DEPENDENCIES
|
|
@@ -206,4 +215,4 @@ DEPENDENCIES
|
|
|
206
215
|
webmock (~> 3.7)
|
|
207
216
|
|
|
208
217
|
BUNDLED WITH
|
|
209
|
-
2.
|
|
218
|
+
2.4.13
|
|
@@ -10,19 +10,37 @@ module SdrClient
|
|
|
10
10
|
checksum = Digest::MD5.file(path).base64digest
|
|
11
11
|
new(checksum: checksum,
|
|
12
12
|
byte_size: ::File.size(path),
|
|
13
|
-
content_type: content_type
|
|
13
|
+
content_type: clean_and_translate_content_type(content_type),
|
|
14
14
|
filename: file_name)
|
|
15
15
|
end
|
|
16
16
|
|
|
17
17
|
def as_json
|
|
18
18
|
{
|
|
19
|
-
blob: { filename: filename, byte_size: byte_size, checksum: checksum,
|
|
19
|
+
blob: { filename: filename, byte_size: byte_size, checksum: checksum,
|
|
20
|
+
content_type: self.class.clean_and_translate_content_type(content_type) }
|
|
20
21
|
}
|
|
21
22
|
end
|
|
22
23
|
|
|
23
24
|
def to_json(*_args)
|
|
24
25
|
JSON.generate(as_json)
|
|
25
26
|
end
|
|
27
|
+
|
|
28
|
+
# Invalid JSON files with a content type of application/json will trigger 400 errors in sdr-api
|
|
29
|
+
# since they are parsed and rejected (not clear why and what part of the stack is doing this).
|
|
30
|
+
# The work around is to change the content_type for any JSON files to a custom stand-in and
|
|
31
|
+
# specific to avoid the parsing, and then have this translated back to application/json after .
|
|
32
|
+
# upload is complete. There is a corresponding change in sdr-api to translate the content_type back
|
|
33
|
+
# before the Cocina is saved.
|
|
34
|
+
# See https://github.com/sul-dlss/happy-heron/issues/3075 for the original bug report
|
|
35
|
+
# See https://github.com/sul-dlss/sdr-api/pull/585 for the change in sdr-api
|
|
36
|
+
def self.clean_and_translate_content_type(content_type)
|
|
37
|
+
return 'application/octet-stream' if content_type.blank?
|
|
38
|
+
|
|
39
|
+
# ActiveStorage is expecting "application/x-stata-dta" not "application/x-stata-dta;version=14"
|
|
40
|
+
content_type = content_type.split(';')&.first
|
|
41
|
+
|
|
42
|
+
content_type == 'application/json' ? 'application/x-stanford-json' : content_type
|
|
43
|
+
end
|
|
26
44
|
end
|
|
27
45
|
end
|
|
28
46
|
end
|
data/lib/sdr_client/version.rb
CHANGED
data/sdr-client.gemspec
CHANGED
|
@@ -28,20 +28,11 @@ Gem::Specification.new do |spec|
|
|
|
28
28
|
spec.require_paths = ['lib']
|
|
29
29
|
|
|
30
30
|
spec.add_dependency 'activesupport'
|
|
31
|
-
spec.add_dependency 'cocina-models', '~> 0.
|
|
31
|
+
spec.add_dependency 'cocina-models', '~> 0.91.0'
|
|
32
32
|
spec.add_dependency 'config'
|
|
33
33
|
spec.add_dependency 'dry-monads'
|
|
34
34
|
spec.add_dependency 'faraday', '>= 0.16'
|
|
35
35
|
spec.add_dependency 'launchy'
|
|
36
36
|
|
|
37
|
-
spec.add_development_dependency 'bundler', '~> 2.0'
|
|
38
|
-
spec.add_development_dependency 'rake', '~> 13.0'
|
|
39
|
-
spec.add_development_dependency 'rspec', '~> 3.0'
|
|
40
|
-
spec.add_development_dependency 'rubocop', '~> 1.24'
|
|
41
|
-
spec.add_development_dependency 'rubocop-rake'
|
|
42
|
-
spec.add_development_dependency 'rubocop-rspec', '~> 2.1'
|
|
43
|
-
spec.add_development_dependency 'simplecov'
|
|
44
|
-
spec.add_development_dependency 'thor'
|
|
45
|
-
spec.add_development_dependency 'webmock', '~> 3.7'
|
|
46
37
|
spec.metadata['rubygems_mfa_required'] = 'true'
|
|
47
38
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sdr-client
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.6.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Justin Coyne
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-
|
|
11
|
+
date: 2023-09-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|
|
@@ -30,14 +30,14 @@ dependencies:
|
|
|
30
30
|
requirements:
|
|
31
31
|
- - "~>"
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: 0.
|
|
33
|
+
version: 0.91.0
|
|
34
34
|
type: :runtime
|
|
35
35
|
prerelease: false
|
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
37
|
requirements:
|
|
38
38
|
- - "~>"
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
|
-
version: 0.
|
|
40
|
+
version: 0.91.0
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
42
|
name: config
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -94,132 +94,6 @@ dependencies:
|
|
|
94
94
|
- - ">="
|
|
95
95
|
- !ruby/object:Gem::Version
|
|
96
96
|
version: '0'
|
|
97
|
-
- !ruby/object:Gem::Dependency
|
|
98
|
-
name: bundler
|
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
|
100
|
-
requirements:
|
|
101
|
-
- - "~>"
|
|
102
|
-
- !ruby/object:Gem::Version
|
|
103
|
-
version: '2.0'
|
|
104
|
-
type: :development
|
|
105
|
-
prerelease: false
|
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
107
|
-
requirements:
|
|
108
|
-
- - "~>"
|
|
109
|
-
- !ruby/object:Gem::Version
|
|
110
|
-
version: '2.0'
|
|
111
|
-
- !ruby/object:Gem::Dependency
|
|
112
|
-
name: rake
|
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
|
114
|
-
requirements:
|
|
115
|
-
- - "~>"
|
|
116
|
-
- !ruby/object:Gem::Version
|
|
117
|
-
version: '13.0'
|
|
118
|
-
type: :development
|
|
119
|
-
prerelease: false
|
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
121
|
-
requirements:
|
|
122
|
-
- - "~>"
|
|
123
|
-
- !ruby/object:Gem::Version
|
|
124
|
-
version: '13.0'
|
|
125
|
-
- !ruby/object:Gem::Dependency
|
|
126
|
-
name: rspec
|
|
127
|
-
requirement: !ruby/object:Gem::Requirement
|
|
128
|
-
requirements:
|
|
129
|
-
- - "~>"
|
|
130
|
-
- !ruby/object:Gem::Version
|
|
131
|
-
version: '3.0'
|
|
132
|
-
type: :development
|
|
133
|
-
prerelease: false
|
|
134
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
135
|
-
requirements:
|
|
136
|
-
- - "~>"
|
|
137
|
-
- !ruby/object:Gem::Version
|
|
138
|
-
version: '3.0'
|
|
139
|
-
- !ruby/object:Gem::Dependency
|
|
140
|
-
name: rubocop
|
|
141
|
-
requirement: !ruby/object:Gem::Requirement
|
|
142
|
-
requirements:
|
|
143
|
-
- - "~>"
|
|
144
|
-
- !ruby/object:Gem::Version
|
|
145
|
-
version: '1.24'
|
|
146
|
-
type: :development
|
|
147
|
-
prerelease: false
|
|
148
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
149
|
-
requirements:
|
|
150
|
-
- - "~>"
|
|
151
|
-
- !ruby/object:Gem::Version
|
|
152
|
-
version: '1.24'
|
|
153
|
-
- !ruby/object:Gem::Dependency
|
|
154
|
-
name: rubocop-rake
|
|
155
|
-
requirement: !ruby/object:Gem::Requirement
|
|
156
|
-
requirements:
|
|
157
|
-
- - ">="
|
|
158
|
-
- !ruby/object:Gem::Version
|
|
159
|
-
version: '0'
|
|
160
|
-
type: :development
|
|
161
|
-
prerelease: false
|
|
162
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
163
|
-
requirements:
|
|
164
|
-
- - ">="
|
|
165
|
-
- !ruby/object:Gem::Version
|
|
166
|
-
version: '0'
|
|
167
|
-
- !ruby/object:Gem::Dependency
|
|
168
|
-
name: rubocop-rspec
|
|
169
|
-
requirement: !ruby/object:Gem::Requirement
|
|
170
|
-
requirements:
|
|
171
|
-
- - "~>"
|
|
172
|
-
- !ruby/object:Gem::Version
|
|
173
|
-
version: '2.1'
|
|
174
|
-
type: :development
|
|
175
|
-
prerelease: false
|
|
176
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
177
|
-
requirements:
|
|
178
|
-
- - "~>"
|
|
179
|
-
- !ruby/object:Gem::Version
|
|
180
|
-
version: '2.1'
|
|
181
|
-
- !ruby/object:Gem::Dependency
|
|
182
|
-
name: simplecov
|
|
183
|
-
requirement: !ruby/object:Gem::Requirement
|
|
184
|
-
requirements:
|
|
185
|
-
- - ">="
|
|
186
|
-
- !ruby/object:Gem::Version
|
|
187
|
-
version: '0'
|
|
188
|
-
type: :development
|
|
189
|
-
prerelease: false
|
|
190
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
191
|
-
requirements:
|
|
192
|
-
- - ">="
|
|
193
|
-
- !ruby/object:Gem::Version
|
|
194
|
-
version: '0'
|
|
195
|
-
- !ruby/object:Gem::Dependency
|
|
196
|
-
name: thor
|
|
197
|
-
requirement: !ruby/object:Gem::Requirement
|
|
198
|
-
requirements:
|
|
199
|
-
- - ">="
|
|
200
|
-
- !ruby/object:Gem::Version
|
|
201
|
-
version: '0'
|
|
202
|
-
type: :development
|
|
203
|
-
prerelease: false
|
|
204
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
205
|
-
requirements:
|
|
206
|
-
- - ">="
|
|
207
|
-
- !ruby/object:Gem::Version
|
|
208
|
-
version: '0'
|
|
209
|
-
- !ruby/object:Gem::Dependency
|
|
210
|
-
name: webmock
|
|
211
|
-
requirement: !ruby/object:Gem::Requirement
|
|
212
|
-
requirements:
|
|
213
|
-
- - "~>"
|
|
214
|
-
- !ruby/object:Gem::Version
|
|
215
|
-
version: '3.7'
|
|
216
|
-
type: :development
|
|
217
|
-
prerelease: false
|
|
218
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
219
|
-
requirements:
|
|
220
|
-
- - "~>"
|
|
221
|
-
- !ruby/object:Gem::Version
|
|
222
|
-
version: '3.7'
|
|
223
97
|
description: This provides a way to deposit repository objects into the Stanford Digital
|
|
224
98
|
Repository
|
|
225
99
|
email:
|
|
@@ -304,7 +178,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
304
178
|
- !ruby/object:Gem::Version
|
|
305
179
|
version: '0'
|
|
306
180
|
requirements: []
|
|
307
|
-
rubygems_version: 3.
|
|
181
|
+
rubygems_version: 3.3.7
|
|
308
182
|
signing_key:
|
|
309
183
|
specification_version: 4
|
|
310
184
|
summary: The CLI for https://github.com/sul-dlss/sdr-api
|