Skip to content

Commit

Permalink
🧹 Appease Rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyf committed Nov 27, 2023
1 parent 0a8c676 commit 13a1dfc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
12 changes: 8 additions & 4 deletions lib/iiif_print/jobs/child_works_from_pdf_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down

0 comments on commit 13a1dfc

Please sign in to comment.