bulkrax 3.0.0.beta1 → 3.0.0.beta2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/factories/bulkrax/object_factory.rb +5 -1
- data/app/models/bulkrax/csv_entry.rb +1 -1
- data/lib/bulkrax/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0c05782edcfff4b5c460c3cc3bd8b3fbec355299a87c977b0400b2b555105de8
|
4
|
+
data.tar.gz: dd0316f5502afcea91ac0fa84f0ea6bcb1600aff9b867d5460e934aeafdaa9c2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fc72772040076f6e527adc335cb4dd6802c199f3b0e94ea81fab7d341d9354973fe76c08b9873e90d7244dd527617c60f0486e141736a589df2afd8e051bcd37
|
7
|
+
data.tar.gz: 3c39be004fd6196d8692643a567a73398a4cb4105a1174535f73cbf7b515b8ca0d6a2bbc8cdb05c012dca814f5bc5b57ab5bfc40a6191ec73fcd40c96eb3e630
|
@@ -182,6 +182,10 @@ module Bulkrax
|
|
182
182
|
# Add child to parent's #member_collections
|
183
183
|
# Add parent to child's #member_of_collections
|
184
184
|
def persist_collection_memberships(parent:, child:)
|
185
|
+
parent.reject!(&:blank?) if parent.respond_to?(:reject!)
|
186
|
+
child.reject!(&:blank?) if child.respond_to?(:reject!)
|
187
|
+
return if parent.blank? || child.blank?
|
188
|
+
|
185
189
|
::Hyrax::Collections::NestedCollectionPersistenceService.persist_nested_collection_for(parent: parent, child: child)
|
186
190
|
end
|
187
191
|
|
@@ -190,7 +194,7 @@ module Bulkrax
|
|
190
194
|
when Hash
|
191
195
|
Collection.find(id[:id])
|
192
196
|
when String
|
193
|
-
Collection.find(id)
|
197
|
+
Collection.find(id) if id.present?
|
194
198
|
when Array
|
195
199
|
id.map { |i| find_collection(i) }
|
196
200
|
else
|
@@ -153,7 +153,7 @@ module Bulkrax
|
|
153
153
|
data = hyrax_record.send(key.to_s)
|
154
154
|
if data.is_a?(ActiveTriples::Relation)
|
155
155
|
if value['join']
|
156
|
-
self.parsed_metadata[key_for_export(key)] = data.map { |d| prepare_export_data(d) }.join('
|
156
|
+
self.parsed_metadata[key_for_export(key)] = data.map { |d| prepare_export_data(d) }.join(' | ').to_s # TODO: make split char dynamic
|
157
157
|
else
|
158
158
|
data.each_with_index do |d, i|
|
159
159
|
self.parsed_metadata["#{key_for_export(key)}_#{i + 1}"] = prepare_export_data(d)
|
data/lib/bulkrax/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bulkrax
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.0.
|
4
|
+
version: 3.0.0.beta2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rob Kaufman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-03-
|
11
|
+
date: 2022-03-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|