documentcloud / docsplit

Break Apart Documents into Images, Text, Pages and PDFs
http://documentcloud.github.io/docsplit/
Other
832 stars 214 forks source link

ruby 3.2 compatibility #158

Open jwoodrow opened 1 year ago

jwoodrow commented 1 year ago

Hi, we're using the Docsplit.extract_text method with output: File.dirname('some/path') as an option. Now this ends up failing with a undefined method 'exists?' for File:Class.

I've looked at the ruby changelogs for 3.2.0 and I saw this:

Removed methods The following deprecated methods are removed.

I've looked into the docsplit code and found this

FileUtils.mkdir_p @output unless File.exists?(@output)

The File.exists? removal does seem to align with the error being raised, would it be possible to look into this ?

Thanks ! 👋