Fix `File.exists?` deprecation warning. Use `File.exist?` instead
Fixes https://github.com/csquared/IMGKit/issues/127
Also closes https://github.com/csquared/IMGKit/pull/126
+1
Hello @techeverri @csquared, is it possible de merge this pull request? Or, is there another version I can use somewhere that fixes the File.exists? deprecation issue? Thanks.
You can monkey patch the File class in your project so that it calls internally File#exist? ^1 instead of File#exists? which should stop the warning. Although monkey patching is not recommended ^2 so use it with caution.
# TODO: remove this monkey patch once https://github.com/csquared/IMGKit/pull/128 is merged
class File
class << self
def exists?(file_name)
exist?(file_name)
end
end
end
Hello @techeverri @csquared, when can we expect this to be merged? TIA
1.6.3 has just been published! Thanks :)