CHANGELOG.md in attributor-4.0.1 vs CHANGELOG.md in attributor-4.1.0

- old
+ new

@@ -1,16 +1,30 @@ # Attributor Changelog -## next +## next +## 4.1.0 +* Added a `Class` type (useful to avoid demodulization coercions etc...) +* Added `Attributor::FieldSelector` type for parsing hierarchical field + selection hashes from a string. This is similar to the partial `fields` + parameter in Google APIs, or the `fields` parameter in the Facebook's Graph + API. + * For example: the string `'one,two(a,b)'` would select two top-level fields + named 'one' and 'two', retrieving the entire contents of 'one', and only + the 'a' and 'b' sub-fields for 'two'. The type will parse the above string + into the hash: `{one: true, two: {a: true, b: true}}`. + * This type is not automatically required by Attributor. To require it use: + `require 'attributor/extras/field_selector'. + * This type also depends upon the 'parslet' gem. + ## 4.0.1 * `Attribute#check_option!` now calls `load` on any provided value. -## 4.0.0 next +## 4.0.0 * Changed the expectation of the value for an `:example` option of an attribute: * Before, passing an array of values would indicate that those were a few possible examples for it. * Now, any value (except the already existing special regexp or a proc) for an example will need to be of a native type (or coercible to it). This means that an attribute of type `Collection` can take an array example (and be taken as the whole thing) * If anybody wants to provide multiple examples for an attribute they can write a proc, and make it return the different ones. @@ -152,6 +166,5 @@ * Added additional options for Attribute :example values: * explicit nil values * procs that take 2 arguments now receive the context as the second argument. * Circular references are now detected and handled in validation and dumping. * Fixed bug with Model attribute accessors when using false values. -