Skip to content

Commit be4d853

Browse files
committed
Bump v1.3.0
1 parent 4082879 commit be4d853

File tree

2 files changed

+39
-10
lines changed

2 files changed

+39
-10
lines changed

CHANGELOG.md

Lines changed: 38 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,63 @@
1+
## v1.3.0 2017-03-05
2+
3+
### Added
4+
- No-undefined configuration of the initializer (nepalez, flash-gordon)
5+
6+
You can either extend or include module `Dry::Initializer` with additional option
7+
`[undefined: false]`. This time `nil` will be assigned instead of
8+
`Dry::Initializer::UNDEFINED`. Readers becomes faster because there is no need
9+
to chech whether a variable was defined or not. At the same time the initializer
10+
doesn't distinct cases when a variable was set to `nil` explicitly, and when it wasn's set at all:
11+
12+
class Foo # old behavior
13+
extend Dry::Initializer
14+
param :qux, optional: true
15+
end
16+
17+
class Bar # new behavior
18+
extend Dry::Initializer[undefined: false]
19+
param :qux, optional: true
20+
end
21+
22+
Foo.new.instance_variable_get(:@qux) # => Dry::Initializer::UNDEFINED
23+
Bar.new.instance_variable_get(:@qux) # => nil
24+
25+
### Internals
26+
- Fixed method definitions for performance at the load time (nepalez, flash-gordon)
27+
28+
[Compare v1.2.0...v1.3.0](https://github.com/dry-rb/dry-initializer/compare/v1.2.0...v1.3.0)
29+
130
## v1.2.0 2017-03-05
231

3-
# Fixed
32+
### Fixed
433
- The `@__options__` variable collects renamed options after default values and coercions were applied (nepalez)
534

635
[Compare v1.1.3...v1.2.0](https://github.com/dry-rb/dry-initializer/compare/v1.1.3...v1.2.0)
736

837
## v1.1.3 2017-03-01
938

10-
# Added
39+
### Added
1140
- Support for lambdas as default values (nepalez, gzigzigzeo)
1241

1342
[Compare v1.1.2...v1.1.3](https://github.com/dry-rb/dry-initializer/compare/v1.1.2...v1.1.3)
1443

1544
## v1.1.2 2017-02-06
1645

17-
# Internals
46+
### Internals
1847
- Remove previously defined methods before redefining them (flash-gordon)
1948

2049
[Compare v1.1.1...v1.1.2](https://github.com/dry-rb/dry-initializer/compare/v1.1.1...v1.1.2)
2150

2251
## v1.1.1 2017-02-04
2352

24-
# Bugs Fixed
53+
### Bugs Fixed
2554
- `@__options__` collects defined options only (nepalez)
2655

2756
[Compare v1.1.0...v1.1.1](https://github.com/dry-rb/dry-initializer/compare/v1.1.0...v1.1.1)
2857

2958
## v1.1.0 2017-01-28
3059

31-
# Added:
60+
### Added:
3261
- enhancement via `Dry::Initializer::Attribute.dispatchers` registry (nepalez)
3362

3463
# Register dispatcher for `:string` option
@@ -44,7 +73,7 @@
4473

4574
User.new(:Andy).name # => "Andy"
4675

47-
# Internals:
76+
### Internals:
4877
- optimize assignments for performance (nepalez)
4978

5079
[Compare v1.0.0...v1.1.0](https://github.com/dry-rb/dry-initializer/compare/v1.0.0...v1.1.0)
@@ -53,10 +82,10 @@
5382

5483
In this version the code has been rewritten for simplicity
5584

56-
# BREAKING CHANGES
85+
### BREAKING CHANGES
5786
- when `param` or `option` was not defined, the corresponding **variable** is set to `Dry::Initializer::UNDEFINED`, but the **reader** (when defined) will return `nil` (nepalez)
5887

59-
# Added:
88+
### Added:
6089
- support for reloading `param` and `option` definitions (nepalez)
6190

6291
class User
@@ -86,7 +115,7 @@ In this version the code has been rewritten for simplicity
86115
User.new(phone: '1234567890').phone # => '1234567890'
87116
User.new(number: '1234567890').phone # => '1234567890'
88117

89-
# Internals
118+
### Internals
90119
- `Dry::Initializer` and `Dry::Initializer::Mixin` became aliases (nepalez)
91120

92121
[Compare v0.11.0...v1.0.0](https://github.com/dry-rb/dry-initializer/compare/v0.11.0...v1.0.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 = "1.2.0"
3+
gem.version = "1.3.0"
44
gem.author = ["Vladimir Kochnev (marshall-lee)", "Andrew Kozin (nepalez)"]
55
66
gem.homepage = "https://github.com/dryrb/dry-initializer"

0 commit comments

Comments
 (0)