Skip to content

Commit

Permalink
remove testing things
Browse files Browse the repository at this point in the history
  • Loading branch information
alishaevn committed Jan 27, 2022
1 parent 2f032f0 commit 57df749
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 27 deletions.
2 changes: 2 additions & 0 deletions app/factories/bulkrax/object_factory.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ def update
destroy_existing_files if @replace_files && klass != Collection
attrs = attribute_update
run_callbacks :save do
# binding.pry
klass == Collection ? update_collection(attrs) : work_actor.update(environment(attrs))
end
log_updated(object)
Expand Down Expand Up @@ -93,6 +94,7 @@ def create
object.reindex_extent = Hyrax::Adapters::NestingIndexAdapter::LIMITED_REINDEX
run_callbacks :save do
run_callbacks :create do
# binding.pry
klass == Collection ? create_collection(attrs) : work_actor.create(environment(attrs))
end
end
Expand Down
27 changes: 0 additions & 27 deletions app/models/bulkrax/csv_entry.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,40 +39,13 @@ def build_metadata
raise StandardError, "Missing required elements, missing element(s) are: #{importerexporter.parser.missing_elements(keys_without_numbers(record.keys)).join(', ')}" unless importerexporter.parser.required_elements?(keys_without_numbers(record.keys))

self.parsed_metadata = {}
binding.pry
add_identifier
add_metadata_for_model
add_visibility
add_ingested_metadata
add_rights_statement
add_collections
add_local
# {
# "identifier"=>["ULUA Cardinal 19261001", "ULUA Cardinal 19261001"],
# "file"=>[],
# "admin_set_id"=>"admin_set/default",
# "visibility"=>"open",
# "collection_information"=>["https://archivescatalog.library.louisville.edu/resources/louisville-cardinal-newspaper"],
# "contributor"=>[""],
# "date_digital"=>"1/28/2019",
# "date_created"=>["10/1/1926"],
# "description"=>
# ["The University of Louisville’s undergraduate newspaper. The title of this publication has varied over the years, but with the exception of the period 1928-1930, when it was known as the U. of L. News, the title has always been a variation of The Cardinal."],
# "digitization_specification"=>"",
# "format"=>["application/pdf"],
# "language"=>["English"],
# "media_type"=>["Text"],
# "model"=>"Text",
# "resource_type"=>["Newspapers"],
# "ordering_information"=>"To inquire about reproductions, permissions, or for information about prices see: https://library.louisville.edu/archives/order. Please cite the Item Number when ordering.",
# "publisher"=>["University of Louisville Archives and Special Collections"],
# "searchable_text"=>"",
# "source"=>["Scanned from microfilm in the Louisville Cardinal newspapers collection. Item Number ULUA Cardinal 19261001"],
# "subject"=>["Newspapers", "College student newspapers and periodicals", "University of Louisville--Students--Periodicals"],
# "title"=>["The Cardinal News, October 1, 1926."],
# "volume"=>"I",
# "rights_statement"=>[""]
# }

self.parsed_metadata
end
Expand Down
2 changes: 2 additions & 0 deletions app/models/concerns/bulkrax/has_matchers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ def add_metadata(node_name, node_content, index = nil)
single_metadata(node_content)
end

# binding.pry if name == 'format'
object_name.present? ? set_parsed_object_data(object_multiple, object_name, name, index, value) : set_parsed_data(name, value)
end
end
Expand Down Expand Up @@ -159,6 +160,7 @@ def multiple?(field)
#{related_parents_parsed_mapping}
#{related_children_parsed_mapping}
]
binding.pry if field == 'format'

return true if @multiple_bulkrax_fields.include?(field)
return false if field == 'model'
Expand Down

0 comments on commit 57df749

Please sign in to comment.