CHANGELOG.md in attributor-2.2.1 vs CHANGELOG.md in attributor-2.3.0

- old
+ new

@@ -1,12 +1,20 @@ Attributor Changelog ============================ -next +2.3.0 ------ +* Added `recurse` option to `Type.load` that is used by `Model` and `Hash` to force the loading of values (specifically, so that default values are assigned) even if the loaded value is `nil`. +* Fix `Attributor::CSV` to dump `String` values and generate `String` examples. +* Default values of `false` now work correctly. +* Added `BigDecimal`, `Date` and `Time` types +* `DateTime.load` now raises `CoercionError` (instead of returning `nil`) if given values that can not coerced properly. +* `Hash.dump` now first calls `Hash.load`, and correctly uses defined value types for dumping. +* Added `Hash#get`, for retrieving keys using the same logic the `case_insensitive_load` and `allow_extra` with defined `extra` key. + 2.2.1 ------ * Dumping attributes will now load the values if they're not in the native type. * `Model.valid_type?` now accepts hashes. @@ -20,27 +28,27 @@ * Hash: * Added additional options: * `:case_insensitive_load` for string-keyed hashes. This allows loading hashes with keys that do not exactly match the case defined in the hash. * Added `:allow_extras` option to allow handling of undefined keys when loading. * Added `Hash#set` to encapsulate the above options and attribute loading. - * Added `extra` command in the `keys` DSL, which lets you define a key (whose value should be a Hash), to group any unspecified keys during load. + * Added `extra` command in the `keys` DSL, which lets you define a key (whose value should be a Hash), to group any unspecified keys during load. 2.1.0 ------ * Structs now inherit type-level options from their reference. * Add Collection subclasses for CSVs and Ids * CSV type for Collection of values serialized as comma-separated strings. * Ids type. A helper for creating CSVs with members matching a given a type's :identity option. -* Allow instances of Models to be initialized with initial data. +* Allow instances of Models to be initialized with initial data. * Supported formats for the data are equivalent to the loading formats (i.e. ruby Hash, a JSON string or another instance of the same model type). * Improved context reporting in errors * Added contextual information while loading and dumping attributes. * `load` takes a new `context` argument (defaulting to a system-wide root) in the form of an array of parent segments. * `validate` takes a `context` argument that (instead of a string) is now an array of parent segments. * `dump` takes a `context:` option parameter of the same type * Enhanced error messages to report the correct context scope. - * Make Attribute assignments in models to report a special context (not the attributor root) + * Make Attribute assignments in models to report a special context (not the attributor root) * Instead of reporting "$." as the context , when doing model.field_name=value, they'll now report "assignment.of(field_name)" instead * Truncate the length of values when reporting loading errors when they're long (i.e. >500 chars) * `Model.attributes` may now be called more than once to set add or replace attributes. The exact behavior depends upon the types of the attributes being added or replaced. See [model_spec.rb](spec/types/model_spec.rb) for examples. * Greately enhanced Hash type with individual key specification (rather than simply defining the types of keys)