lib/hanami/components/components.rb in hanami-1.1.1 vs lib/hanami/components/components.rb in hanami-1.2.0.beta1

- old
+ new

@@ -321,11 +321,11 @@ # Finalizers for the project # # @since 0.9.0 # @api private register 'finalizers' do - requires 'finalizers.initializers' + requires 'plugins', 'finalizers.initializers' resolve { true } end # Load project initializers @@ -335,9 +335,21 @@ register 'finalizers.initializers' do run do Hanami::Utils.require!( Hanami.root.join('config', 'initializers') ) + end + end + + # Load plugins + # + # @since x.x.x + # @api private + register 'plugins' do + resolve do |configuration| + Hanami.plugins.each do |plugin_configuration| + configuration.instance_eval(&plugin_configuration) + end end end # Configure, load and finalize a Hanami application in the project #