Skip to content

Releases: dry-rb/dry-auto_inject

v1.0.1

13 Feb 11:03
v1.0.1
8d17831
Compare
Choose a tag to compare

Fixed

  • Update passthrough parameters list to support ruby 3.2.1 (@hieuk09 in #88)

Compare v1.0.0...v1.0.1

v1.0.0

18 Nov 09:29
v1.0.0
Compare
Choose a tag to compare

Changed

  • This version is compatible with recently released dry-rb dependencies (@flash-gordon)
  • This version uses zeitwerk for autoloading (@flash-gordon)

Compare v0.9.0...v1.0.0

v1.0.0.rc1

04 Nov 17:59
v1.0.0.rc1
Compare
Choose a tag to compare

Changed

  • This version is compatible with recently released dry-rb dependencies (@flash-gordon)
  • This version uses zeitwerk for autoloading (@flash-gordon)

Compare v0.9.0...v1.0.0

v0.9.0

26 Jan 11:26
v0.9.0
Compare
Choose a tag to compare

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

Compare v0.8.0...v0.9.0

v0.8.0

06 Jun 11:27
v0.8.0
Compare
Choose a tag to compare

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

Compare v0.7.0...v0.8.0

v0.7.0

28 Dec 13:08
v0.7.0
1ac4326
Compare
Choose a tag to compare

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

Compare v0.6.1...v0.7.0

0.6.1

15 Apr 22:30
Compare
Choose a tag to compare

0.6.1 / 2019-04-16

Fixed

  • Allow explicit injection of falsey values (timriley in #58)

Compare v0.6.0...v0.6.1

v0.6.0

29 Nov 09:20
v0.6.0
f4d2057
Compare
Choose a tag to compare

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

  • A couple of regressions were fixed along the way, see #46 and #49 (flash-gordon + timriley in #48)

Compare v0.5.0...v0.6.0

v0.5.0

29 Nov 09:19
Compare
Choose a tag to compare

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

Compare v0.4.6...v0.5.0

0.4.6

26 Mar 23:53
Compare
Choose a tag to compare

0.4.6 / 2018-03-27

Changed

  • In injector-generated #initialize methods, set dependency instance variables before calling super (timriley)

Compare v0.4.5...v0.4.6