Skip to content

Releases: dry-rb/dry-initializer

Stable release

22 Jan 13:34
Compare
Choose a tag to compare
v1.0.0

Bump v1.0.0

Support of the `initializer` reloading via `super`

02 Jan 17:58
Compare
Choose a tag to compare

ROM integration & support of Ruby 2.4

31 Dec 09:52
Compare
Choose a tag to compare

Bug fix

27 Dec 11:26
Compare
Choose a tag to compare
v0.10.1

Bump v0.10.1

Remove deprecated method `using`

20 Nov 16:31
Compare
Choose a tag to compare
v0.10.0

Update CHANGELOG

Deprecate method `using`

20 Nov 16:26
Compare
Choose a tag to compare

After discussion in PR #17 (many thanks to @sahal2080 and @hrom512 for starting issue and PR), the method using is deprecated and will be removed from v0.10.0.

Fixed validation of param/option names

10 Nov 08:32
Compare
Choose a tag to compare

Support renaming options

06 Nov 21:12
Compare
Choose a tag to compare
class Foo
  include Dry::Initializer::Mixin

  option :bar, as: :foo
end

Foo.new(bar: :BAZ).foo # => :BAZ

Ever-tolerance to options

06 Nov 10:49
Compare
Choose a tag to compare

Default initializer is provided by extending the Mixin (in earlier version it was built only by param or option invocations.

From the very beginning the method accepts any option (ignores unknown ones)

class MyClass
  extend Dry::Initializer::Mixin
end

instance = MyClass.new foo: :bar # undefined options are accepted
instance.respond_to? :foo        # ...but ignored

This was made to provide more consistent behavior (in v0.8.0 tolerance to unknown options occurred all of a sudden after the first option was defined)

Support for `dry-struct`-ish syntax of type constraints

05 Nov 14:18
Compare
Choose a tag to compare

In addition to

param :name, type: Dry::Types['strict.string']

it is possible to use second argument instead of type: option

param :name, Dry::Types['strict.string']