diff --git a/Gemfile.lock b/Gemfile.lock index 96651edd..ecef5d18 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -483,7 +483,7 @@ GEM jquery-ui-rails (6.0.1) railties (>= 3.2.16) json (2.6.3) - json-canonicalization (0.3.2) + json-canonicalization (0.3.1) json-ld (3.1.10) htmlentities (~> 4.3) json-canonicalization (~> 0.2) @@ -1012,6 +1012,7 @@ DEPENDENCIES iiif_print! jbuilder (~> 2.5) jquery-rails + json-canonicalization (= 0.3.1) newspaper_works_fixtures (~> 0.3, >= 0.3.1) puma (~> 3.11) rails (~> 5.2.8, >= 5.2.8.1) diff --git a/iiif_print.gemspec b/iiif_print.gemspec index db2b97a8..8c1a2b12 100644 --- a/iiif_print.gemspec +++ b/iiif_print.gemspec @@ -36,6 +36,7 @@ SUMMARY # TODO: We want to remove dependency on this spec.add_development_dependency 'newspaper_works_fixtures', '~> 0.3', '>=0.3.1' spec.add_development_dependency 'rails-controller-testing', '~> 1' + spec.add_development_dependency 'json-canonicalization', '0.3.1' spec.add_development_dependency 'rspec-rails' spec.add_development_dependency 'rspec-activemodel-mocks' spec.add_development_dependency 'shoulda-matchers', '~> 3.1' 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 16168fa7..30d423bc 100644 --- a/lib/iiif_print/jobs/child_works_from_pdf_job.rb +++ b/lib/iiif_print/jobs/child_works_from_pdf_job.rb @@ -118,7 +118,7 @@ def prepare_import_data(original_pdf_path, image_files, user) begin # Clean up the temporary image path. - File.rm_f(image_path) if File.exist?(image_path) + FileUtils.rm_f(image_path) if File.exist?(image_path) rescue # If we can't delete, let's move on. Maybe it was already cleaned-up. end