diff --git a/Gemfile.lock b/Gemfile.lock index 063b9ad3..1fde4504 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -100,7 +100,7 @@ GEM aws-sdk-core (~> 3, >= 3.181.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.6) - aws-sdk-sqs (1.65.0) + aws-sdk-sqs (1.67.0) aws-sdk-core (~> 3, >= 3.184.0) aws-sigv4 (~> 1.1) aws-sigv4 (1.6.1) @@ -181,7 +181,7 @@ GEM declarative-option (0.1.0) deprecation (1.1.0) activesupport - derivative-rodeo (0.5.1) + derivative-rodeo (0.5.2) activesupport (>= 5) aws-sdk-s3 aws-sdk-sqs diff --git a/lib/iiif_print/jobs/child_works_from_pdf_job.rb b/lib/iiif_print/jobs/child_works_from_pdf_job.rb index 29667796..c29891a9 100644 --- a/lib/iiif_print/jobs/child_works_from_pdf_job.rb +++ b/lib/iiif_print/jobs/child_works_from_pdf_job.rb @@ -54,14 +54,17 @@ def perform(candidate_for_parency, pdf_paths, user, admin_set_id, *) private # rubocop:disable Metrics/ParameterLists + # rubocop:disable Metrics/MethodLength def split_pdf(original_pdf_path, user, child_model, pdf_file_set) image_files = @parent_work.iiif_print_config.pdf_splitter_service.call(original_pdf_path, file_set: pdf_file_set) # give as much info as possible if we don't have image files to work with. - raise "#{@parent_work.class} (ID=#{@parent_work.id} " + - "to_param:#{@parent_work.to_param}) " + - "original_pdf_path #{original_pdf_path.inspect} " + - "pdf_file_set #{pdf_file_set.inspect}" if image_files.blank? + if image_files.blank? + raise "#{@parent_work.class} (ID=#{@parent_work.id} " / + "to_param:#{@parent_work.to_param}) " / + "original_pdf_path #{original_pdf_path.inspect} " / + "pdf_file_set #{pdf_file_set.inspect}" + end @split_from_pdf_id = pdf_file_set.nil? ? nil : pdf_file_set.id prepare_import_data(original_pdf_path, image_files, user) @@ -84,6 +87,7 @@ def split_pdf(original_pdf_path, user, child_model, pdf_file_set) attributes.merge!(model: child_model.to_s, split_from_pdf_id: @split_from_pdf_id).with_indifferent_access, operation) end + # rubocop:enable Metrics/MethodLength # rubocop:enable Metrics/ParameterLists # rubocop:disable Metrics/MethodLength