tty not working with Ruby 3.0.0
kodywilson opened this issue · 1 comments
Describe the problem
I am building a CLI for work and wanted to try tty as I have heard great things about it.
As an FYI, I switched my Ruby environment to 2.7.2 and tried again and it worked just fine, so I'm guessing the issue is with the new Ruby version.
Steps to reproduce the problem
teletype new app
Actual behaviour
❯ teletype new app
/Users/kowilson/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/tty-command-0.9.0/lib/tty/command.rb:54:in `initialize': wrong number of arguments (given 1, expected 0) (ArgumentError)
from /Users/kowilson/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/tty-0.10.0/lib/tty/cmd.rb:33:in `new'
from /Users/kowilson/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/tty-0.10.0/lib/tty/cmd.rb:33:in `command'
from /Users/kowilson/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/tty-0.10.0/lib/tty/commands/new.rb:46:in `initialize'
from /Users/kowilson/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/tty-0.10.0/lib/tty/cli.rb:128:in `new'
from /Users/kowilson/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/tty-0.10.0/lib/tty/cli.rb:128:in `new'
from /Users/kowilson/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
from /Users/kowilson/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
from /Users/kowilson/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
from /Users/kowilson/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/thor-0.20.3/lib/thor/base.rb:466:in `start'
from /Users/kowilson/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/tty-0.10.0/exe/teletype:14:in `<top (required)>'
from /Users/kowilson/.asdf/installs/ruby/3.0.0/bin/teletype:23:in `load'
from /Users/kowilson/.asdf/installs/ruby/3.0.0/bin/teletype:23:in `<main>'
Expected behaviour
I expected the gem to generate a new CLI app.
Describe your environment
- OS version: Mac OS Catalina 10.15.7
- Ruby version: 3.0
- TTY version: v0.10.0
Hi Kody 👋
Thanks for trying tty
gem out.
I must admit the tty
gem release v0.10.0
is horribly out of date. But, all the tty components have been updated and are tested against Ruby 3.0. So please could you use the master branch for now to generate a CLI app? If you have any feedback please let me know by opening a new issue so I can address it before I make a final release soon.
One change you will notice is that all the tty
components will be commented out in the newly generated gemspec. The idea is that you pick what you need and never depend on the tty
gem itself, it's only used for scaffolding new CLI app.