definition

Simple and composable validation and coercion of data structures

MIT License

Downloads
25K
Stars
17
Committers
5
definition - 1.1.2 Latest Release

Published by Goltergaul 2 months ago

Fixed

Fixed "TypeError: no _dump_data is defined for class Proc" error that ocurred when a definition model inherits from another model that uses lambda based definitions

definition - 1.1.1

Published by Goltergaul 2 months ago

Fixed

  • Fixed model inheritance
definition - 1.1.0

Published by Goltergaul 9 months ago

Changed

  • Performance optimizations
definition - 1.0.0

Published by Goltergaul over 1 year ago

Since the interface has proven itself by now, this release marks it officially as stable

Removed deprecated methods

Removed deprecated version of GreaterThanEqual definition that had a typo in it (GreaterThenEqual)
Removed deprecated version of GreaterThan definition that had a typo in it (GreaterThen)
Removed deprecated version of LessThanEqual definition that had a typo in it (LessThenEqual)
Removed deprecated version of LessThan definition that had a typo in it (LessThen)
definition - 0.8.1

Published by Goltergaul about 2 years ago

Fixed

  • Definition::Model#eql? returns true when comparing two models with the same content
definition - 0.8.0

Published by Goltergaul about 2 years ago

Added

  • A Definition::Initializer mixin that can be used to validate keyword arguments of a class constructor

Changed

  • Include more information in the internal non-translated error messages. E.g. the max size of a LessThenEqual definition
  • Renamed GreaterThen, GreaterThenEqual, LessThen and LessThenEqual to fix typo (Then VS Than) Backwards compatibility is ensured

Breaking changes

  • The Definition::ValueObject was removed and replaced by Definition:Model which has a nicer DSL and only works with hash data structures. See upgrade notes
definition - 0.7.1

Published by Goltergaul over 2 years ago

Fixed bugs

  • Passing nil into a Definition::CoercibleType(Float) definition crashed the validation