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
Keyword arguments for a command aren't passed correctly to commands that use callbacks.
I have two gems: hanami-cli that depends on dry-cli, and hanami-rspec that depends on hanami-cli.
hanami-cli
dry-cli
hanami-rspec
The first gem (hanami-cli) defines a command hanami generate slice NAME, which loosely correspond to this implementation:
hanami generate slice NAME
module Hanami module CLI module Generate class Slice < Command argument :name, required: true, desc: "The slice name" def call(name: ) puts "generating slice: #{name}" end end end end end
The second gem (hanami-rspec) hooks into the invocation of hanami generate slice with an after callback.
hanami generate slice
module Hanami module RSpec module Generate class Slice < Command def call(options, **) puts "generating slice: #{options[:name]}" end end end end end
I would have expected that Hanami::RSpec::Generate::Slice#call would have accepted the :name keyword argument. What it does instead, it passes a Hash.
Hanami::RSpec::Generate::Slice#call
:name
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Describe the bug
Keyword arguments for a command aren't passed correctly to commands that use callbacks.
To Reproduce
I have two gems:
hanami-cli
that depends ondry-cli
, andhanami-rspec
that depends onhanami-cli
.The first gem (
hanami-cli
) defines a commandhanami generate slice NAME
, which loosely correspond to this implementation:The second gem (
hanami-rspec
) hooks into the invocation ofhanami generate slice
with an after callback.Expected behavior
I would have expected that
Hanami::RSpec::Generate::Slice#call
would have accepted the:name
keyword argument. What it does instead, it passes a Hash.My environment
The text was updated successfully, but these errors were encountered: