Skip to content

Commit 37e5ded

Browse files
committed
Bump v2.6.0
1 parent 2b6b210 commit 37e5ded

File tree

2 files changed

+24
-12
lines changed

2 files changed

+24
-12
lines changed

CHANGELOG.md

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/)
66
and this project adheres to [Semantic Versioning](http://semver.org/).
77

8+
## [2.6.0] [2018-09-09]
9+
10+
### Fixed
11+
- `nil` coercion (belousovAV)
12+
13+
When default value is `nil` instead of `Dry::Initializer::UNDEFINED`,
14+
the coercion should be applied to any value, including `nil`, because
15+
we cannot distinct "undefined" `nil` from the "assigned" `nil` value.
16+
817
## [2.4.0] [2018-02-01]
918

1019
### Added
@@ -367,18 +376,20 @@ and to @gzigzigzeo for persuading me to do this refactoring.
367376
### Added
368377
- enhancement via `Dry::Initializer::Attribute.dispatchers` registry (nepalez)
369378
370-
# Register dispatcher for `:string` option
371-
Dry::Initializer::Attribute.dispatchers << ->(string: nil, **op) do
372-
string ? op.merge(type: proc(&:to_s)) : op
373-
end
379+
```ruby
380+
# Register dispatcher for `:string` option
381+
Dry::Initializer::Attribute.dispatchers << ->(string: nil, **op) do
382+
string ? op.merge(type: proc(&:to_s)) : op
383+
end
374384
375-
# Now you can use the `:string` key for `param` and `option`
376-
class User
377-
extend Dry::Initializer
378-
param :name, string: true
379-
end
385+
# Now you can use the `:string` key for `param` and `option`
386+
class User
387+
extend Dry::Initializer
388+
param :name, string: true
389+
end
380390
381-
User.new(:Andy).name # => "Andy"
391+
User.new(:Andy).name # => "Andy"
392+
```
382393

383394
### Changed
384395
- optimize assignments for performance (nepalez)
@@ -757,4 +768,5 @@ First public release
757768
[2.1.0]: https://github.com/dry-rb/dry-initializer/compare/v2.0.0...v2.1.0
758769
[2.2.0]: https://github.com/dry-rb/dry-initializer/compare/v2.1.0...v2.2.0
759770
[2.3.0]: https://github.com/dry-rb/dry-initializer/compare/v2.2.0...v2.3.0
760-
[2.4.0]: https://github.com/dry-rb/dry-initializer/compare/v2.3.0...v2.4.0
771+
[2.4.0]: https://github.com/dry-rb/dry-initializer/compare/v2.3.0...v2.4.0
772+
[2.6.0]: https://github.com/dry-rb/dry-initializer/compare/v2.5.0...v2.6.0

dry-initializer.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Gem::Specification.new do |gem|
22
gem.name = "dry-initializer"
3-
gem.version = "2.5.0"
3+
gem.version = "2.6.0"
44
gem.author = ["Vladimir Kochnev (marshall-lee)", "Andrew Kozin (nepalez)"]
55
gem.email = "[email protected]"
66
gem.homepage = "https://github.com/dryrb/dry-initializer"

0 commit comments

Comments
 (0)