We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ask?
When invoking ask in a runbook which is executed with ruby 3.0 (3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-linux]), following errors are thrown:
ask
3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-linux]
/home/felix/.rvm/gems/ruby-3.0.0/gems/runbook-1.0.0/lib/runbook/statements/ask.rb:5:in `initialize': wrong number of arguments (given 2, expected 1; required keyword: into) (ArgumentError)
The invocation seems correct, like ask 'E-Mail-Address of user:', into: 'email' and works in older ruby versions.
ask 'E-Mail-Address of user:', into: 'email'
I assume this has to do with how keyword arguments are handled in ruby 3.
Other specs also do not pass with ruby 3 (and manually loosened bundler constraint).
E.g. a similar case as for the "ask" case fails like this:
34) Runbook::Runner shared variables capture_all command captures cmd on all hosts Failure/Error: def initialize(cmd, into:, ssh_config: nil, raw: false, strip: true) @cmd = cmd @into = into @ssh_config = ssh_config @raw = raw @strip = strip end ArgumentError: wrong number of arguments (given 2, expected 1; required keyword: into) # ./lib/runbook/statements/capture_all.rb:5:in `initialize' # ./lib/runbook/extensions/statements.rb:6:in `new' # ./lib/runbook/extensions/statements.rb:6:in `method_missing' # ./spec/runner_spec.rb:1036:in `block (7 levels) in <top (required)>' # ./lib/runbook/extensions/steps.rb:16:in `instance_eval' # ./lib/runbook/extensions/steps.rb:16:in `block in step' # <internal:kernel>:90:in `tap' # ./lib/runbook/extensions/steps.rb:14:in `step' # ./spec/runner_spec.rb:1033:in `block (6 levels) in <top (required)>' # ./lib/runbook/extensions/sections.rb:11:in `instance_eval' # ./lib/runbook/extensions/sections.rb:11:in `block in section' # <internal:kernel>:90:in `tap' # ./lib/runbook/extensions/sections.rb:9:in `section' # ./spec/runner_spec.rb:1032:in `block (5 levels) in <top (required)>' # ./lib/runbook.rb:96:in `instance_eval' # ./lib/runbook.rb:96:in `block in book' # <internal:kernel>:90:in `tap' # ./lib/runbook.rb:95:in `book' # ./spec/runner_spec.rb:1031:in `block (4 levels) in <top (required)>' # ./spec/runner_spec.rb:30:in `block (2 levels) in <top (required)>' # ./spec/runner_spec.rb:1060:in `block (4 levels) in <top (required)>' # /home/felix/.rvm/gems/ruby-3.0.0/gems/aruba-0.14.14/lib/aruba/rspec.rb:22:in `block (2 levels) in <top (required)>'
The text was updated successfully, but these errors were encountered:
Pretty sure it has to do with mandatory keyword argument splatting in lib/runbook/extensions/statements.rb#method_missing .
lib/runbook/extensions/statements.rb#method_missing
Sorry, something went wrong.
@fwolfst - have you been able to confirm that the latest release resolves this issue? Version 1.1.0 includes support for Ruby 3.0.
No branches or pull requests
When invoking
ask
in a runbook which is executed with ruby 3.0 (3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-linux]
), following errors are thrown:The invocation seems correct, like
ask 'E-Mail-Address of user:', into: 'email'
and works in older ruby versions.I assume this has to do with how keyword arguments are handled in ruby 3.
Other specs also do not pass with ruby 3 (and manually loosened bundler constraint).
E.g. a similar case as for the "ask" case fails like this:
The text was updated successfully, but these errors were encountered: