All Versions
54
Latest Version
Avg Release Cycle
94 days
Latest Release
167 days ago
Changelog History
Page 5
Changelog History
Page 5
-
v0.7.1 Changes
April 06, 2016โ Added
JSON::*
types with JSON-specific coercions (coop)
๐ Fixed
- Schema is properly inherited in Struct (backus)
constructor_type
is properly inherited in Struct (fbernier)
-
v0.7.0 Changes
March 30, 2016๐ Major focus of this release is to make complex type composition possible and improving constraint errors to be more meaningful.
โ Added
Type#try
interface that tries to process the input and return a result object which can be either a success or failure (solnic)#meta
interface for setting arbitrary meta data on types (solnic)ConstraintError
has a message which includes information about the predicate which failed ienil violates constraints (type?(String) failed)
(solnic)Struct
usesDry::Equalizer
too, just likeValue
(AMHOL)Sum::Constrained
which has a disjunction rule built from its types (solnic)- ๐ Compiler supports
[:constructor, [primitive, fn_proc]]
nodes (solnic) - ๐ Compiler supports building schema-less
form.hash
types (solnic)
๐ Fixed
- ๐
Sum
now supports complex types likeArray
orHash
with member types and/or constraints (solnic) - 0๏ธโฃ
Default#constrained
will properly wrap a new constrained type (solnic)
๐ Changed
- [BREAKING] Renamed
Type#{optional=>maybe}
(AMHOL) - ๐ [BREAKING]
Type#optional(other)
builds a sum:Strict::Nil | other
(AMHOL) - [BREAKING] Type objects are now frozen (solnic)
- [BREAKING]
Value
instances are frozen (AMHOL) Array
is no longer a constructor and has aArray::Member
subclass (solnic)Hash
is no longer a constructor and is split intoHash::Safe
,Hash::Strict
andHash::Symbolized
(solnic)Constrained
has now aConstrained::Coercible
subclass which will try to apply its type prior applying its rule (solnic)#maybe
usesStrict::Nil
now (solnic)- 0๏ธโฃ
Type#default
will raise ifnil
was passed forMaybe
type (solnic) Hash
with a schema will set maybe values for missing keys or nils (flash-gordon)
-
v0.6.0 Changes
March 16, 2016๐ Renamed from
dry-data
todry-types
and:โ Added
Dry::Types.module
which returns a namespace for inclusion which has all built-in types defined as constants (solnic)- 0๏ธโฃ
Hash#schema
supports default values now (solnic) Hash#symbolized
passes through keys that are already symbols (solnic)- 0๏ธโฃ
Struct.new
uses an empty hash by default as input (solnic) Struct.constructor_type
macro can be used to change attributes constructor (solnic)- 0๏ธโฃ
default
accepts a block now for dynamic values (solnic) Types.register_class
accepts a second arg which is the name of the class' constructor method, defaults to:new
(solnic)
๐ Fixed
Struct
will simply pass-through the input if it is already a struct (solnic)- 0๏ธโฃ
default
will raise if a value violates constraints (solnic) - 0๏ธโฃ Evaluating a default value tries to use type's constructor which makes it work with types that may coerce an input into nil (solnic)
enum
works just fine with integer-values (solnic)- 0๏ธโฃ
enum
+default
works just fine (solnic) Optional
no longer responds toprimitive
as it makes no sense since there's no single primitive for an optional value (solnic)Optional
passes-through a value which is already a maybe (solnic)
๐ Changed
Dry::Types::Definition
is now the base type definition object (solnic)Dry::Types::Constructor
is now a type definition with a constructor function (solnic)
-
v0.5.1 Changes
January 11, 2016โ Added
Dry::Data::Type#safe
for types which can skip constructor when primitive does not match input's class (solnic)form.array
andform.hash
safe types (solnic)
-
v0.5.0 Changes
January 11, 2016โ Added
- 0๏ธโฃ
Type#default
interface for defining a type with a default value (solnic)
๐ Fixed
attribute
raises proper error when type definition is missing (solnic)
๐ Changed
- [BREAKING]
Dry::Data::Type.new
accepts constructor and options now (solnic) - ๐ Renamed
Dry::Data::Type::{Enum,Constrained}
=>Dry::Data::{Enum,Constrained}
(solnic) dry-logic
is now a dependency for constrained types (solnic)- Constrained types are now always available (solnic)
strict.*
category uses constrained types with:type?
predicate (solnic)SumType#call
no longer needs to rescue fromTypeError
(solnic)
- 0๏ธโฃ
-
v0.4.2 Changes
December 27, 2015โ Added
- ๐ Support for arrays in type compiler (solnic)
๐ Changed
- Array member uses type objects now rather than just their constructors (solnic)
-
v0.4.0 Changes
December 11, 2015โ Added
- ๐ Support for sum-types with constraint type (solnic)
Dry::Data::Type#optional
for defining optional types (solnic)
๐ Changed
- โ
Dry::Data['optional']
was removed in favor ofDry::Data::Type#optional
(solnic)
-
v0.3.2 Changes
December 10, 2015โ Added
Dry::Data::Value
which works like a struct but is a value object with equalizer (solnic)
๐ Fixed
- โ Added missing require for
dry-equalizer
(solnic)
-
v0.3.1 Changes
December 09, 2015๐ Changed
- โ Removed require of constrained type and make it optional (solnic)
-
v0.3.0 Changes
December 09, 2015โ Added
Type#constrained
interface for defining constrained types (solnic)- ๐ง
Dry::Data
can be configured with a type namespace (solnic) - ๐ง
Dry::Data.finalize
can be used to define types as constants under configured namespace (solnic) Dry::Data::Type#enum
for defining an enum from a specific type (solnic)- ๐ New types:
symbol
andclass
along with theirstrict
versions (solnic)