rails / thor

Thor is a toolkit for building powerful command-line interfaces.
http://whatisthor.com/
MIT License
5.12k stars 553 forks source link

Use URI.send in apply action to work in Ruby 3 #741

Closed jaredcwhite closed 3 years ago

jaredcwhite commented 3 years ago

In Ruby 3.0.0-rc1, I get the error No such file or directory @ rb_sysopen when using the apply action with a remote URL. By changing the use of open to URI.send(:open …), it works in Ruby 3 while preserving backwards-compatibility (this is already how it's done in the get file manipulation method).

jaredcwhite commented 3 years ago

Looks like there's an issue with request stubs now in the test suite after making this change. I'd appreciate any pointers in how to resolve those.

excid3 commented 3 years ago

Ran into this today as well. 👍

excid3 commented 3 years ago

@jaredcwhite looks like the webmock responses need an update to make the tests pass. Then hopefully we can get his merged!

jaredcwhite commented 3 years ago

Looks like #743 did the trick. Closing.