The main changes are due to a quite different API for newer versions of dry-v.
The real changes are 2:
the way validation_group is initialized and called
validations options are ONLY dynamically added in the schema on CALL since the DSL calls instance_eval on new which will raise an error if any of the methods are not implemented
the result of a dry-v call is not just an hash anymore so we need to use to_h to recreate the same structure as before
Apart from those changes above the rest is just to be able to support 2 major versions of dry in the same gem.
Following the commit history will make the review a bit easier
The main changes are due to a quite different API for newer versions of dry-v. The real changes are 2:
validation_group
is initialized and calledoptions
are ONLY dynamically added in the schema onCALL
since the DSL callsinstance_eval
onnew
which will raise an error if any of the methods are not implementedto_h
to recreate the same structure as beforeApart from those changes above the rest is just to be able to support 2 major versions of dry in the same gem.
Following the commit history will make the review a bit easier
From Reform 3.x we will drop dry-v < 1.x