nebulab / simple_command

A simple, standardized way to build and use Service Objects (aka Commands) in Ruby

Home Page:http://nebulab.it

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cut a new release now that Ruby 3.0 is out

rubendinho opened this issue · comments

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

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))

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.

Done 0.2.0 is out! 🎉