sdr-client 0.33.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/lib/sdr_client/deposit/model_process.rb +11 -4
- data/lib/sdr_client/version.rb +1 -1
- data/sdr-client.gemspec +1 -1
- metadata +5 -5
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
|
@@ -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
|
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
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
|
@@ -234,7 +234,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
234
234
|
- !ruby/object:Gem::Version
|
235
235
|
version: '0'
|
236
236
|
requirements: []
|
237
|
-
rubygems_version: 3.
|
237
|
+
rubygems_version: 3.0.3
|
238
238
|
signing_key:
|
239
239
|
specification_version: 4
|
240
240
|
summary: The CLI for https://github.com/sul-dlss/sdr-api
|