Closed rubendinho closed 2 years ago
Is the keyword argument issue fixed? I've been trying to get simple command to work with keyword arguments using Ruby 3.0.0, and I've been getting ArgumentErrors.
Example:
class User::CreateUser
prepend SimpleCommand
def initialize(create_params:)
@create_params = create_params
end
def call
end
end
That will give me an error if I tried to do: User::CreateUser.call(create_params: {first_name:"Alice"})
The error will be: ArgumentError (wrong number of arguments (given 1, expected 0; required keyword: create_params))
Until a new version is released, you should be able to get it working by
using the master
branch.
On Sun, Mar 07, 2021 at 4:55 PM, Rheisen Dennis notifications@github.com wrote:
Is the keyword argument issue fixed? I've been trying to get simple command to work with keyword arguments using Ruby 3.0.0, and I've been getting ArgumentErrors.
Example:
class User::CreateUser prepend SimpleCommand
def initialize(create_params:) @create_params = create_params end
def call end end
That will give me an error if I tried to do: User::CreateUser(create_params: {first_name:"Alice"}) The error will be: ArgumentError (wrong number of arguments (given 1, expected 0; required keyword: create_params))
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/nebulab/simple_command/issues/29#issuecomment-792369292, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC7NEPFQPUBWPIMWILW34A3TCP75PANCNFSM4XSP3F3A .
Any chance a new gem version will be released in the future?
@kennyadsl any chance you could cut a release to ship Ruby 3 compatibility?
I'll try to take a look and release a new gem version tomorrow.
Hi -
Do you plan on releasing a version compatible with Ruby 3, now that it's the latest stable version of Ruby?
I see that the keyword argument issue was already fixed in #28.
Thanks