Virtus v1.0.0 Release Notes
Release Date: 2013-10-16 // over 10 years ago-
๐ This release no longer works with Ruby 1.8.7.
- [BREAKING CHANGE] Integrated with axiom-types, most of the attribute sub-classes are gone (solnic)
- ๐ง [feature] Configurable coercion via coercible integration (solnic)
- [feature] Strict mode for coercions via
:strict
option (solnic) - 0๏ธโฃ [feature] Lazy-loaded default values via
:lazy
option (solnic) - ๐ [feature] Finalizing models solving circular-dependency issue (see #81) (solnic)
- [feature] Ability to cherry-pick which extension should be included (solnic)
- [feature] Ability to inject a custom coercer object via
:coercer
option (solnic) - ๐ [feature] Extension module builder with pre-defined configuration for attributes (elskwid & solnic)
- ๐ [feature]
Virtus::Attribute
exposes a public API - you can easily build, rename and clone attribute instances and use their coercion power (solnic) - 0๏ธโฃ [feature] Ability to reset attributes to their default values (pewniak747)
- [changed] A meaningful error will be raised if a reserved name is used as an attribute name (solnic)
- 0๏ธโฃ [changed] Default value can be set via private and protected methods now (solnic)
- [changed] New syntax for value objects (solnic)
- 0๏ธโฃ [changed] Default values are now set in the constructor for non-lazy attributes (solnic)
- ๐ง [deprecated]
Virtus::Attribute.coerce
in favor ofVirtus.coerce
or a customized configured module (solnic) - ๐ [deprecated]
include Virtus
in favor ofinclude Virtus.model
(for classes) orVirtus.module
(for modules) (solnic) - ๐ [deprecated]
include Virtus::ValueObject
in favor ofinclude Virtus.value_object
(solnic) - ๐ [deprecated]
Virtus#attributes
in favor ofVirtus#attribute_set
(solnic) - ๐ [fixed] const missing hook now works correctly in modules too (cored)
- ๐ [fixed] value object with Hash type works correctly (solnic)
- ๐ [fixed] issues with value-object subclasses and
#==
method (solnic)