nebulab / simple_command

A simple, standardized way to build and use Service Objects (aka Commands) in Ruby
http://nebulab.it
MIT License
624 stars 55 forks source link

Cut a new release now that Ruby 3.0 is out #29

Closed rubendinho closed 2 years ago

rubendinho commented 3 years ago

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

Rheisen commented 3 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))

rubendinho commented 3 years ago

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 .

codedeleter commented 2 years ago

Any chance a new gem version will be released in the future?

dpep commented 2 years ago

@kennyadsl any chance you could cut a release to ship Ruby 3 compatibility?

kennyadsl commented 2 years ago

I'll try to take a look and release a new gem version tomorrow.

kennyadsl commented 2 years ago

Done 0.2.0 is out! 🎉