Releases: dry-rb/dry-auto_inject
Releases · dry-rb/dry-auto_inject
v1.0.1
v1.0.0
Changed
- This version is compatible with recently released dry-rb dependencies (@flash-gordon)
- This version uses zeitwerk for autoloading (@flash-gordon)
v1.0.0.rc1
Changed
- This version is compatible with recently released dry-rb dependencies (@flash-gordon)
- This version uses zeitwerk for autoloading (@flash-gordon)
v0.9.0
Changed
-
[BREAKING] Support for ... was changed, now constructors with such signature are not considered
as pass-through because they can forward arguments to another method (flash-gordon in #78) -
[BREAKING] Support for 2.6 was dropped
v0.8.0
Added
- Support For
...
passthrough-args (@ytaben)
Fixed
- Constructors with kwargs strategy properly forward blocks to super (via #68) (@mintyfresh)
Changed
- [BREAKING] Support for 2.4 and 2.5 was dropped
v0.7.0
0.7.0 / 2019-12-28
Fixed
- Keyword warnings issued by Ruby 2.7 in certain contexts (flash-gordon)
Changed
- [BREAKING] Support for 2.3 was dropped
0.6.1
v0.6.0
0.6.0 / 2018-11-29
Changed
- [BREAKING] 0.6.0 supports Ruby 2.3 and above. If you're on 2.3 keep in mind its EOL is scheduled at the end of March, 2019
Added
- Enhanced support for integrating with existing constructors. The kwargs strategy will now pass dependencies up to the next constructor if it accepts an arbitrary number of arguments with
*args
. Note that this change may break existing code though we think it's unlikely to happen. If something doesn't work for you please report and we'll try to sort it out (flash-gordon + timriley in #48)
Fixed
v0.5.0
0.5.0 / 2018-11-09
Changed
-
Only assign
nil
dependency instance variables from generated#initialize
if the instance variable has not been previously defined. This improves compatibility with objects initialized in non-conventional ways (see example below) (timriley in #47)module SomeFramework class Action def self.new(configuration:, **args) # Do some trickery so `#initialize` on subclasses don't need to worry # about handling a configuration kwarg and passing it to super allocate.tap do |obj| obj.instance_variable_set :@configuration, configuration obj.send :initialize, **args end end end end module MyApp class Action < SomeFramework::Action # Inject the configuration object, which is passed to # SomeFramework::Action.new but not all the way through to any subsequent # `#initialize` calls include Import[configuration: "web.action.configuration"] end class SomeAction < Action # Subclasses of MyApp::Action don't need to concern themselves with # `configuration` dependency include Import["some_repo"] end end
0.4.6
0.4.6 / 2018-03-27
Changed
- In injector-generated
#initialize
methods, set dependency instance variables before callingsuper
(timriley)