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

Allow Errors#add_multiple_errors to copy another Errors object #26

Closed bmorrall closed 2 years ago

bmorrall commented 4 years ago

I had a look at Issue #23 and I think I've found the problem.

It looks like the vdaubry was attempting to use SimpleCommand::Errors#add_mutliple_errors to copy values over from another SimpleCommand::Errors object.

Attempting to do the same thing resulted in the same error he reported on my end.

In the past I've used Array.wrap from ActiveSupport to fix this type of issue, but as we don't have ActiveSupport as a dependency (and probably shouldn't) I ported the logic over.

Added tests to verify the fix.

yasonk commented 3 years ago

Is this gem still maintained? I ran into the multiple errors bug as well