lib/power_stencil/initializer.rb in power_stencil-0.8.13 vs lib/power_stencil/initializer.rb in power_stencil-0.8.14

- old
+ new

@@ -53,17 +53,22 @@ plugin: PowerStencil::CommandProcessors::Plugin, build: PowerStencil::CommandProcessors::Build, describe: PowerStencil::CommandProcessors::Describe, adm: PowerStencil::CommandProcessors::Adm }.each do |command_name, processor| - command_line_manager.register_processor command_line_manager.command_by_alias(command_name), + command = command_line_manager.command_by_alias(command_name) + command_line_manager.register_processor command, processor.new + command.add_provider self end end def setup_climatic(cmd_line_args) mngr = Climatic::ConfigLayers::CommandLineLayer.build_command_line_manager base_commands_definition_file Climatic.bootstrap cmd_line_args: cmd_line_args, command_manager: mngr + mngr.commands.each do |command| + command.add_provider PowerStencil + end begin # Fix command line layer priority to allow a bigger number of plugins config.command_line_layer.priority = 999 config.command_line_layer.reload config.include_gem_layer_for :power_stencil