app/models/bulkrax/exporter.rb in bulkrax-5.1.0 vs app/models/bulkrax/exporter.rb in bulkrax-5.2.0

- old
+ new

@@ -16,22 +16,13 @@ delegate :write, :create_from_collection, :create_from_importer, :create_from_worktype, :create_from_all, to: :parser def export current_run && setup_export_path - case self.export_from - when 'collection' - create_from_collection - when 'importer' - create_from_importer - when 'worktype' - create_from_worktype - when 'all' - create_from_all - end + send("create_from_#{self.export_from}") rescue StandardError => e - status_info(e) + set_status_info(e) end # #export_source accessors # Used in form to prevent it from getting confused as to which value to populate #export_source with. # Also, used to display the correct selected value when rendering edit form. @@ -137,10 +128,10 @@ def exporter_export_zip_files @exporter_export_zip_files ||= Dir["#{exporter_export_zip_path}/**"].map { |zip| Array(zip.split('/').last) } end def export_properties - properties = Hyrax.config.registered_curation_concern_types.map { |work| work.constantize.properties.keys }.flatten.uniq.sort + properties = Bulkrax.curation_concerns.map { |work| work.properties.keys }.flatten.uniq.sort properties.reject { |prop| Bulkrax.reserved_properties.include?(prop) } end def metadata_only? export_type == 'metadata'