bulkrax 3.0.0.beta5 → 3.0.0.beta6

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: 994ee06cdd4ed63d0dfa79e0e77b1fb6b017528926a7b891d8ff702a15cf7347
4
- data.tar.gz: 55298f93ce2078f1157a1426ce63823b78ae8a04cd4b076947a2ba1ad93ad05c
3
+ metadata.gz: 744a122509bc57b9b9a24367c2eee3660d3184bd8209543de43e7f9bf3b1c6ef
4
+ data.tar.gz: c9156dba83a463872cf700d93d12770b5967a1e28f269aba0141d0ae9a280e8e
5
5
  SHA512:
6
- metadata.gz: 512b254802875cca2dae6377a1317439b25d35038aacd56ce2db18ee2aaaf9d0f1d22bb2f521ce16366a7a5630d5768468f3949579216fc02502b36e06e6159a
7
- data.tar.gz: b25f1d98da59db8bc91f02d90fe44003350d7bf7eb7b67d5610d2006f7e0f5e1b72e9d37601b3a41f01faf34c8c07d8c388e173084edc6ebaf985e5f124f7d4a
6
+ metadata.gz: 3abe5abd1a882ebe4090a75c8600a9c9e35ede83fdaab22aaf33966d5b412fc256835ccef6ab7eaf3776f5ff7a4b0c27eaf94ac77fccf99985b7ad1dc2172c78
7
+ data.tar.gz: 6f1387ce3876c65f23b15cb0cf6824040af2071f59a7f2c3d68377c78994d543f1bd7beced5a334e9467bc7285c1930da9acc6ac7c9e2fdddbdcd0b156541386
@@ -59,6 +59,7 @@ module Bulkrax
59
59
  if factory_class == Collection
60
60
  add_collection_type_gid
61
61
  elsif factory_class == FileSet
62
+ validate_presence_of_filename!
62
63
  add_path_to_file
63
64
  validate_presence_of_parent!
64
65
  else
@@ -250,7 +251,7 @@ module Bulkrax
250
251
  split_references = record[parent_field_mapping].split(/\s*[;|]\s*/)
251
252
  split_references.each do |c_reference|
252
253
  matching_collection_entries = importerexporter.entries.select do |e|
253
- (e.raw_metadata[source_identifier] == c_reference) &&
254
+ (e.raw_metadata&.[](source_identifier) == c_reference) &&
254
255
  e.is_a?(CsvCollectionEntry)
255
256
  end
256
257
  raise ::StandardError, 'Only expected to find one matching entry' if matching_collection_entries.count > 1
@@ -17,6 +17,12 @@ module Bulkrax
17
17
  parsed_metadata['file']
18
18
  end
19
19
 
20
+ def validate_presence_of_filename!
21
+ return if parsed_metadata&.[]('file')&.map(&:present?)&.any?
22
+
23
+ raise StandardError, 'File set must have a filename'
24
+ end
25
+
20
26
  def validate_presence_of_parent!
21
27
  return if parsed_metadata[related_parents_parsed_mapping]&.map(&:present?)&.any?
22
28
 
@@ -193,7 +193,7 @@ module Bulkrax
193
193
  instance_variable_set(instance_var, ActiveFedora::SolrService.post(
194
194
  extra_filters.to_s,
195
195
  fq: [
196
- "#{work_identifier}_sim:(#{complete_entry_identifiers.join(' OR ')})",
196
+ "#{::Solrizer.solr_name(work_identifier)}:(#{complete_entry_identifiers.join(' OR ')})",
197
197
  "has_model_ssim:(#{models_to_search.join(' OR ')})"
198
198
  ],
199
199
  fl: 'id',
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Bulkrax
4
- VERSION = '3.0.0.beta5'
4
+ VERSION = '3.0.0.beta6'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bulkrax
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0.beta5
4
+ version: 3.0.0.beta6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rob Kaufman