ddollar / foreman

Manage Procfile-based applications
http://ddollar.github.com/foreman
MIT License
6.01k stars 630 forks source link

Rename usage of Dir/File.exists to exist #788

Closed ecnelises closed 4 months ago

ecnelises commented 1 year ago

The singular methods were deprecated long ago and finally removed in Ruby 3.2.0.

See https://github.com/ruby/ruby/commit/bf97415c02b11a8949f715431aca9eeb6311add2

tsrivishnu commented 1 year ago

Looking forward to having this merged. We are seeing these deprecations after upgrading to Ruby 3.1.3.

jweir commented 1 year ago

Ruby 3.2 removes Dir.exists? and File.exists? but that will not yet be discovered via tests since FakeFS is used and it creates its own aliases.I have a PR open to update that FakeFS: https://github.com/fakefs/fakefs/pull/482

Also, updating the workflow to test 3.2 would be kind.

jcoyne commented 1 year ago

Thanks for your efforts @ecnelises . We need this too.

ssuttner commented 1 year ago

Thanks @ecnelises for this work!

@ddollar hey 👋 I see that this is starting to become a blocker for newer versions of Ruby. If I may ask, would it be possible to get some approvers' eyes on it?

Thanks in advanced!

johnleeming commented 10 months ago

just run up against this issue. manual edit of base.rb fixed it locally but next time I update...

bdescamps commented 9 months ago

Any update concerning potential merge ?

graaff commented 7 months ago

There is another File.exists? in spec/foreman_spec.rb

ecnelises commented 7 months ago

There is another File.exists? in spec/foreman_spec.rb

Already fixed by https://github.com/ddollar/foreman/commit/c9441014bed260cadfe056b973d4081c4257c7bd

Geesu commented 4 months ago

There is another File.exists? in spec/foreman_spec.rb

Already fixed by c944101

This just fixes the spec, it is still broken in ruby 3.2

ddollar commented 4 months ago

Thank you!

jcoyne commented 4 months ago

Yay! Thank you so much @ddollar!