sdr-client 0.29.0 → 0.34.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop_todo.yml +3 -3
- data/lib/sdr_client/deposit/model_process.rb +11 -4
- data/lib/sdr_client/deposit/request.rb +1 -1
- data/lib/sdr_client/version.rb +1 -1
- data/sdr-client.gemspec +1 -1
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 711cf2c30a41b1194087e917446a0daf2f6170308edae27d8f2735212aa3dc32
|
4
|
+
data.tar.gz: 9b987db8aac5ce702b5fd4b9ba7344527356c82cbeaf66552be4c67079791166
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f0e764c4795efc2155ee7e0a1dc3de3e257e7b514edb6bc571cc8c9868f29509052d428ced2a1ed4477d95a1ae6809936d2abbc24a92da97cc965b355ae3106
|
7
|
+
data.tar.gz: d83a746ad39535ba46cc0330dbd45d2da132fb4de29da11022563f13ce97533c5ad45c320da71607c66598656ec545feffafc56fae5bd770edf520b9797c3dc0
|
data/.rubocop_todo.yml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on 2020-
|
3
|
+
# on 2020-09-08 13:16:08 -0500 using RuboCop version 0.79.0.
|
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
|
@@ -21,9 +21,9 @@ Style/IfUnlessModifier:
|
|
21
21
|
Exclude:
|
22
22
|
- 'exe/sdr'
|
23
23
|
|
24
|
-
# Offense count:
|
24
|
+
# Offense count: 188
|
25
25
|
# Cop supports --auto-correct.
|
26
26
|
# Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
27
27
|
# URISchemes: http, https
|
28
28
|
Layout/LineLength:
|
29
|
-
Max:
|
29
|
+
Max: 1230
|
@@ -73,7 +73,9 @@ module SdrClient
|
|
73
73
|
|
74
74
|
# Map of filenames to request files
|
75
75
|
def request_files
|
76
|
-
@request_files ||=
|
76
|
+
@request_files ||= begin
|
77
|
+
return {} unless request_dro.structural
|
78
|
+
|
77
79
|
Hash[
|
78
80
|
request_dro.structural.contains.map do |file_set|
|
79
81
|
file_set.structural.contains.map do |file|
|
@@ -81,21 +83,26 @@ module SdrClient
|
|
81
83
|
end
|
82
84
|
end.flatten(1)
|
83
85
|
]
|
86
|
+
end
|
84
87
|
end
|
85
88
|
|
89
|
+
# rubocop:disable Metrics/AbcSize
|
86
90
|
def with_external_identifiers(upload_responses)
|
87
91
|
signed_id_map = Hash[upload_responses.map { |response| [response.filename, response.signed_id] }]
|
88
92
|
|
89
93
|
# Manipulating request_dro as hash since immutable
|
90
94
|
request_dro_hash = request_dro.to_h
|
91
|
-
request_dro_hash[:structural]
|
92
|
-
|
93
|
-
|
95
|
+
if request_dro_hash[:structural]
|
96
|
+
request_dro_hash[:structural][:contains].each do |file_set|
|
97
|
+
file_set[:structural][:contains].each do |file|
|
98
|
+
file[:externalIdentifier] = signed_id_map[file[:filename]]
|
99
|
+
end
|
94
100
|
end
|
95
101
|
end
|
96
102
|
|
97
103
|
Cocina::Models::RequestDRO.new(request_dro_hash)
|
98
104
|
end
|
105
|
+
# rubocop:enable Metrics/AbcSize
|
99
106
|
end
|
100
107
|
end
|
101
108
|
end
|
@@ -104,7 +104,7 @@ module SdrClient
|
|
104
104
|
|
105
105
|
def structural
|
106
106
|
{}.tap do |json|
|
107
|
-
json[:isMemberOf] = collection if collection
|
107
|
+
json[:isMemberOf] = [collection] if collection
|
108
108
|
json[:contains] = file_sets.map(&:as_json) unless file_sets.empty?
|
109
109
|
json[:hasMemberOrders] = [{ viewingDirection: viewing_direction }] if viewing_direction
|
110
110
|
end
|
data/lib/sdr_client/version.rb
CHANGED
data/sdr-client.gemspec
CHANGED
@@ -28,7 +28,7 @@ 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.41.0'
|
32
32
|
spec.add_dependency 'dry-monads'
|
33
33
|
spec.add_dependency 'faraday', '>= 0.16'
|
34
34
|
|
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: 0.
|
4
|
+
version: 0.34.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Coyne
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-10-21 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.41.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.41.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: dry-monads
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -219,7 +219,7 @@ metadata:
|
|
219
219
|
homepage_uri: https://github.com/sul-dlss/sdr-client
|
220
220
|
source_code_uri: https://github.com/sul-dlss/sdr-client
|
221
221
|
changelog_uri: https://github.com/sul-dlss/sdr-client/releases
|
222
|
-
post_install_message:
|
222
|
+
post_install_message:
|
223
223
|
rdoc_options: []
|
224
224
|
require_paths:
|
225
225
|
- lib
|
@@ -234,8 +234,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
234
234
|
- !ruby/object:Gem::Version
|
235
235
|
version: '0'
|
236
236
|
requirements: []
|
237
|
-
rubygems_version: 3.
|
238
|
-
signing_key:
|
237
|
+
rubygems_version: 3.0.3
|
238
|
+
signing_key:
|
239
239
|
specification_version: 4
|
240
240
|
summary: The CLI for https://github.com/sul-dlss/sdr-api
|
241
241
|
test_files: []
|