Skip to content

Commit cb94d0b

Browse files
committed
Bump v2.4.0
1 parent ed951c3 commit cb94d0b

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,22 @@ 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.4.0] [2018-02-01]
9+
10+
### Added
11+
- Dispatchers for adding syntax sugar to `param` and `options` (nepalez)
12+
13+
```ruby
14+
# Converts `integer: true` to `type: proc(&:to_i)`
15+
dispatcher = ->(op) { op[:integer] ? op.merge(type: proc(&:to_i)) : op }
16+
# Register a dispatcher
17+
Dry::Initializer::Dispatchers << dispatcher
18+
# Use syntax sugar
19+
class User
20+
param :id, integer: true # same as param :id, proc(&:to_i)
21+
end
22+
```
23+
824
## [2.3.0] [2017-09-19]
925

1026
### Added
@@ -741,3 +757,4 @@ First public release
741757
[2.1.0]: https://github.com/dry-rb/dry-initializer/compare/v2.0.0...v2.1.0
742758
[2.2.0]: https://github.com/dry-rb/dry-initializer/compare/v2.1.0...v2.2.0
743759
[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

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.3.0"
3+
gem.version = "2.4.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)