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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a983b1932af9c9355daf4d0d5ff4eb628c109bad9f41103041548e97ec0d4abe
4
- data.tar.gz: aae00491b670a9a329e93948818503eed2dd762ee768e9bed9b8d2ecf39dffc5
3
+ metadata.gz: 0c05782edcfff4b5c460c3cc3bd8b3fbec355299a87c977b0400b2b555105de8
4
+ data.tar.gz: dd0316f5502afcea91ac0fa84f0ea6bcb1600aff9b867d5460e934aeafdaa9c2
5
5
  SHA512:
6
- metadata.gz: 124984e2a0e6b360aefb72fb3e9bbbb31af8ab268c7190d48c51c37487c89e75a010c4b7df3b9a17190852df12a478bd4d8663b3fe4127b90e681240f53821cc
7
- data.tar.gz: ddb4d13c37e561f4bc8ebc88b0ef0c17f7aadd2e89627ec602a39e3aec0f892c79fb9ca0739ad28b73e045d30bf4f8143dd6522be9bba62fb1bb2871e00aa5ac
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('; ').to_s
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)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Bulkrax
4
- VERSION = '3.0.0.beta1'
4
+ VERSION = '3.0.0.beta2'
5
5
  end
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.beta1
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-24 00:00:00.000000000 Z
11
+ date: 2022-03-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails