From 4526884d49d3023cc3543d15cb642c6fcfeb56c6 Mon Sep 17 00:00:00 2001 From: Alexandra Dunn Date: Thu, 2 Dec 2021 12:19:19 -0800 Subject: [PATCH 1/2] CharacterizationService: teach #file_name about Valkyrie objects --- .../works/services/characterization_service.rb | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/hydra/works/services/characterization_service.rb b/lib/hydra/works/services/characterization_service.rb index b77c0168..ecb2ee4f 100644 --- a/lib/hydra/works/services/characterization_service.rb +++ b/lib/hydra/works/services/characterization_service.rb @@ -52,10 +52,15 @@ def extract_metadata(content) # Determine the filename to send to Hydra::FileCharacterization. If no source is present, # use the name of the file from the object; otherwise, use the supplied source. def file_name - if source - source.is_a?(File) ? File.basename(source.path) : File.basename(source) - else - object.original_name.nil? ? "original_file" : object.original_name + case object + when Hydra::PCDM::File + if source + source.is_a?(File) ? File.basename(source.path) : File.basename(source) + else + object.original_name.nil? ? "original_file" : object.original_name + end + when Hyrax::FileMetadata + object.original_filename end end From c9e227d41b6906dc3cb9f088b87e316b47b5533d Mon Sep 17 00:00:00 2001 From: Alexandra Dunn Date: Fri, 3 Dec 2021 13:36:09 -0800 Subject: [PATCH 2/2] circleci: bump ruby patch versions --- .circleci/config.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 05e5dd58..09a46f92 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -35,25 +35,25 @@ workflows: jobs: - test: name: ruby2-7_rails6-0 - ruby_version: 2.7.1 + ruby_version: 2.7.4 rails_version: 6.0.3.1 - test: name: ruby2-6_rails6-0 - ruby_version: 2.6.6 + ruby_version: 2.6.8 rails_version: 6.0.3.1 - test: name: ruby2-5_rails6-0 - ruby_version: 2.5.8 + ruby_version: 2.5.9 rails_version: 6.0.3.1 - test: name: ruby2-7_rails5-2 - ruby_version: 2.7.1 + ruby_version: 2.7.4 rails_version: 5.2.4.3 - test: name: ruby2-6_rails5-2 - ruby_version: 2.6.6 + ruby_version: 2.6.8 rails_version: 5.2.4.3 - test: name: ruby2-5_rails5-2 - ruby_version: 2.5.8 + ruby_version: 2.5.9 rails_version: 5.2.4.3